mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-08 14:57:18 +07:00
implement content
This commit is contained in:
@ -330,6 +330,17 @@ public class UnitTypes implements ContentList{
|
|||||||
lightningLength = 7;
|
lightningLength = 7;
|
||||||
lightningLengthRand = 7;
|
lightningLengthRand = 7;
|
||||||
shootEffect = Fx.shootHeal;
|
shootEffect = Fx.shootHeal;
|
||||||
|
|
||||||
|
lightningHitter = new BulletType(0.0001f, 0f){{
|
||||||
|
lifetime = Fx.lightning.lifetime;
|
||||||
|
hitEffect = Fx.hitLancer;
|
||||||
|
despawnEffect = Fx.none;
|
||||||
|
status = StatusEffects.shocked;
|
||||||
|
statusDuration = 10f;
|
||||||
|
hittable = false;
|
||||||
|
healPercent = 5f;
|
||||||
|
collidesTeam = true;
|
||||||
|
}};
|
||||||
}};
|
}};
|
||||||
}});
|
}});
|
||||||
}};
|
}};
|
||||||
@ -371,6 +382,8 @@ public class UnitTypes implements ContentList{
|
|||||||
sideAngle = 45f;
|
sideAngle = 45f;
|
||||||
sideWidth = 1f;
|
sideWidth = 1f;
|
||||||
sideLength = 70f;
|
sideLength = 70f;
|
||||||
|
healPercent = 10f;
|
||||||
|
collidesTeam = true;
|
||||||
colors = new Color[]{Pal.heal.cpy().a(0.4f), Pal.heal, Color.white};
|
colors = new Color[]{Pal.heal.cpy().a(0.4f), Pal.heal, Color.white};
|
||||||
}};
|
}};
|
||||||
}});
|
}});
|
||||||
@ -430,6 +443,10 @@ public class UnitTypes implements ContentList{
|
|||||||
incendSpread = 5f;
|
incendSpread = 5f;
|
||||||
incendAmount = 1;
|
incendAmount = 1;
|
||||||
|
|
||||||
|
//constant healing
|
||||||
|
healPercent = 0.5f;
|
||||||
|
collidesTeam = true;
|
||||||
|
|
||||||
colors = new Color[]{Pal.heal.cpy().a(.2f), Pal.heal.cpy().a(.5f), Pal.heal.cpy().mul(1.2f), Color.white};
|
colors = new Color[]{Pal.heal.cpy().a(.2f), Pal.heal.cpy().a(.5f), Pal.heal.cpy().mul(1.2f), Color.white};
|
||||||
}};
|
}};
|
||||||
|
|
||||||
@ -500,6 +517,9 @@ public class UnitTypes implements ContentList{
|
|||||||
|
|
||||||
shootEffect = Fx.greenLaserCharge;
|
shootEffect = Fx.greenLaserCharge;
|
||||||
|
|
||||||
|
healPercent = 20f;
|
||||||
|
collidesTeam = true;
|
||||||
|
|
||||||
sideAngle = 15f;
|
sideAngle = 15f;
|
||||||
sideWidth = 0f;
|
sideWidth = 0f;
|
||||||
sideLength = 0f;
|
sideLength = 0f;
|
||||||
|
@ -119,6 +119,10 @@ public class Damage{
|
|||||||
collidedBlocks.add(tile.pos());
|
collidedBlocks.add(tile.pos());
|
||||||
hitter.type.hit(hitter, tile.x, tile.y);
|
hitter.type.hit(hitter, tile.x, tile.y);
|
||||||
}
|
}
|
||||||
|
//can heal?
|
||||||
|
if(tile != null && !collidedBlocks.contains(tile.pos()) && hitter.type.collides(hitter, tile)){
|
||||||
|
hitter.type.hitTile(hitter, tile, 0f);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if(hitter.type.collidesGround){
|
if(hitter.type.collidesGround){
|
||||||
|
@ -36,7 +36,13 @@ public class Lightning{
|
|||||||
random.setSeed(seed);
|
random.setSeed(seed);
|
||||||
hit.clear();
|
hit.clear();
|
||||||
|
|
||||||
BulletType bulletType = hitter != null && !hitter.type.collidesAir ? Bullets.damageLightningGround : Bullets.damageLightning;
|
BulletType bulletType;
|
||||||
|
if(hitter != null && hitter.type.lightningHitter != null) {
|
||||||
|
bulletType = hitter.type.lightningHitter;
|
||||||
|
} else {
|
||||||
|
bulletType = hitter != null && !hitter.type.collidesAir ? Bullets.damageLightningGround : Bullets.damageLightning;
|
||||||
|
}
|
||||||
|
|
||||||
Seq<Vec2> lines = new Seq<>();
|
Seq<Vec2> lines = new Seq<>();
|
||||||
bhit = false;
|
bhit = false;
|
||||||
|
|
||||||
|
@ -112,6 +112,8 @@ public abstract class BulletType extends Content{
|
|||||||
public float lightningDamage = -1;
|
public float lightningDamage = -1;
|
||||||
public float lightningCone = 360f;
|
public float lightningCone = 360f;
|
||||||
public float lightningAngle = 0f;
|
public float lightningAngle = 0f;
|
||||||
|
/** The lighting "hitter"; Use when trying to implement special lightning. */
|
||||||
|
public BulletType lightningHitter;
|
||||||
|
|
||||||
public float weaveScale = 1f;
|
public float weaveScale = 1f;
|
||||||
public float weaveMag = -1f;
|
public float weaveMag = -1f;
|
||||||
|
Reference in New Issue
Block a user