Bugfixes / Negative knockback / Unit progress
BIN
core/assets-raw/sprites/units/spiroct-cell.png
Normal file
|
After Width: | Height: | Size: 606 B |
BIN
core/assets-raw/sprites/units/spiroct-foot.png
Normal file
|
After Width: | Height: | Size: 467 B |
BIN
core/assets-raw/sprites/units/spiroct-joint.png
Normal file
|
After Width: | Height: | Size: 281 B |
BIN
core/assets-raw/sprites/units/spiroct-leg-base.png
Normal file
|
After Width: | Height: | Size: 411 B |
BIN
core/assets-raw/sprites/units/spiroct-leg.png
Normal file
|
After Width: | Height: | Size: 495 B |
BIN
core/assets-raw/sprites/units/spiroct.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
core/assets-raw/sprites/units/weapons/mount-purple-weapon.png
Normal file
|
After Width: | Height: | Size: 697 B |
BIN
core/assets-raw/sprites/units/weapons/spiroct-weapon.png
Normal file
|
After Width: | Height: | Size: 446 B |
|
|
@ -632,6 +632,15 @@ public class Fx{
|
|||
|
||||
}),
|
||||
|
||||
sapped = new Effect(40f, e -> {
|
||||
color(Pal.sap);
|
||||
|
||||
randLenVectors(e.id, 2, 1f + e.fin() * 2f, (x, y) -> {
|
||||
Fill.square(e.x + x, e.y + y, e.fslope() * 1.1f, 45f);
|
||||
});
|
||||
|
||||
}),
|
||||
|
||||
oily = new Effect(42f, e -> {
|
||||
color(Liquids.oil.color);
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import mindustry.type.StatusEffect;
|
|||
import static mindustry.Vars.*;
|
||||
|
||||
public class StatusEffects implements ContentList{
|
||||
public static StatusEffect none, burning, freezing, wet, melting, tarred, overdrive, shielded, shocked, blasted, corroded, boss;
|
||||
public static StatusEffect none, burning, freezing, wet, melting, sapped, tarred, overdrive, shielded, shocked, blasted, corroded, boss;
|
||||
|
||||
@Override
|
||||
public void load(){
|
||||
|
|
@ -74,6 +74,13 @@ public class StatusEffects implements ContentList{
|
|||
});
|
||||
}};
|
||||
|
||||
sapped = new StatusEffect("sapped"){{
|
||||
speedMultiplier = 0.7f;
|
||||
armorMultiplier = 0.8f;
|
||||
effect = Fx.sapped;
|
||||
effectChance = 0.1f;
|
||||
}};
|
||||
|
||||
tarred = new StatusEffect("tarred"){{
|
||||
speedMultiplier = 0.6f;
|
||||
effect = Fx.oily;
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ public class UnitTypes implements ContentList{
|
|||
hitsize = 9f;
|
||||
range = 10f;
|
||||
health = 500;
|
||||
armor = 1f;
|
||||
armor = 2f;
|
||||
|
||||
immunities.add(StatusEffects.burning);
|
||||
|
||||
|
|
@ -91,7 +91,7 @@ public class UnitTypes implements ContentList{
|
|||
rotateSpeed = 3f;
|
||||
targetAir = false;
|
||||
health = 790;
|
||||
armor = 4f;
|
||||
armor = 5f;
|
||||
|
||||
weapons.add(new Weapon("artillery"){{
|
||||
y = 1f;
|
||||
|
|
@ -267,6 +267,7 @@ public class UnitTypes implements ContentList{
|
|||
legTrns = 0.6f;
|
||||
legMoveSpace = 1.4f;
|
||||
hovering = true;
|
||||
armor = 3f;
|
||||
|
||||
weapons.add(new Weapon("eruption"){{
|
||||
shootY = 3f;
|
||||
|
|
@ -290,7 +291,7 @@ public class UnitTypes implements ContentList{
|
|||
spiroct = new UnitType("spiroct"){{
|
||||
speed = 0.4f;
|
||||
drag = 0.4f;
|
||||
hitsize = 10f;
|
||||
hitsize = 12f;
|
||||
rotateSpeed = 3f;
|
||||
health = 600;
|
||||
immunities = ObjectSet.with(StatusEffects.burning, StatusEffects.melting);
|
||||
|
|
@ -300,6 +301,7 @@ public class UnitTypes implements ContentList{
|
|||
legMoveSpace = 1.4f;
|
||||
legBaseOffset = 2f;
|
||||
hovering = true;
|
||||
armor = 3f;
|
||||
|
||||
weapons.add(new Weapon("spiroct-weapon"){{
|
||||
shootY = 4f;
|
||||
|
|
@ -314,12 +316,13 @@ public class UnitTypes implements ContentList{
|
|||
|
||||
bullet = new SapBulletType(){{
|
||||
length = 75f;
|
||||
damage = 14;
|
||||
damage = 15;
|
||||
shootEffect = Fx.shootSmall;
|
||||
hitColor = color = Color.valueOf("bf92f9");
|
||||
despawnEffect = Fx.none;
|
||||
width = 0.54f;
|
||||
lifetime = 35f;
|
||||
knockback = -1f;
|
||||
}};
|
||||
}});
|
||||
|
||||
|
|
@ -331,12 +334,13 @@ public class UnitTypes implements ContentList{
|
|||
|
||||
bullet = new SapBulletType(){{
|
||||
length = 40f;
|
||||
damage = 9;
|
||||
damage = 10;
|
||||
shootEffect = Fx.shootSmall;
|
||||
hitColor = color = Color.valueOf("bf92f9");
|
||||
despawnEffect = Fx.none;
|
||||
width = 0.4f;
|
||||
lifetime = 25f;
|
||||
knockback = -0.5f;
|
||||
}};
|
||||
}});
|
||||
}};
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@ public class SapBulletType extends BulletType{
|
|||
hitSize = 0f;
|
||||
hittable = false;
|
||||
hitEffect = Fx.hitLiquid;
|
||||
status = StatusEffects.sapped;
|
||||
statusDuration = 60f * 3f;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ import static mindustry.Vars.*;
|
|||
abstract class BulletComp implements Timedc, Damagec, Hitboxc, Teamc, Posc, Drawc, Shielderc, Ownerc, Velc, Bulletc, Timerc{
|
||||
@Import Team team;
|
||||
@Import Entityc owner;
|
||||
@Import float x,y;
|
||||
|
||||
IntSeq collided = new IntSeq(6);
|
||||
Object data;
|
||||
|
|
@ -91,7 +92,7 @@ abstract class BulletComp implements Timedc, Damagec, Hitboxc, Teamc, Posc, Draw
|
|||
|
||||
if(other instanceof Unit){
|
||||
Unit unit = (Unit)other;
|
||||
unit.vel.add(Tmp.v3.set(unit).sub(x, y).setLength(type.knockback / unit.mass()));
|
||||
unit.impulse(Tmp.v3.set(unit).sub(this.x, this.y).nor().scl(type.knockback * 80f));
|
||||
unit.apply(type.status, type.statusDuration);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ abstract class PuddleComp implements Posc, Puddlec, Drawc{
|
|||
//effects-only code
|
||||
if(amount >= maxLiquid / 2f && updateTime <= 0f){
|
||||
Units.nearby(rect.setSize(Mathf.clamp(amount / (maxLiquid / 1.5f)) * 10f).setCenter(x, y), unit -> {
|
||||
if(unit.isGrounded()){
|
||||
if(unit.isGrounded() && !unit.hovering){
|
||||
unit.hitbox(rect2);
|
||||
if(rect.overlaps(rect2)){
|
||||
unit.apply(liquid.effect, 60 * 2);
|
||||
|
|
@ -80,11 +80,11 @@ abstract class PuddleComp implements Posc, Puddlec, Drawc{
|
|||
}
|
||||
});
|
||||
|
||||
if(liquid.temperature > 0.7f && (tile.build != null) && Mathf.chance(0.3 * Time.delta())){
|
||||
if(liquid.temperature > 0.7f && (tile.build != null) && Mathf.chance(0.5)){
|
||||
Fires.create(tile);
|
||||
}
|
||||
|
||||
updateTime = 20f;
|
||||
updateTime = 40f;
|
||||
}
|
||||
|
||||
updateTime -= Time.delta();
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ public class Pal{
|
|||
items = Color.valueOf("2ea756"),
|
||||
command = Color.valueOf("eab678"),
|
||||
|
||||
sap = Color.valueOf("665c9f"),
|
||||
|
||||
shield = Color.valueOf("ffd37f").a(0.7f),
|
||||
shieldIn = Color.black.cpy().a(0f),
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@ public class StatusEffect extends MappableContent{
|
|||
public float speedMultiplier = 1f;
|
||||
/** Damage per frame. */
|
||||
public float damage;
|
||||
/** Chance of effect appearing. */
|
||||
public float effectChance = 0.15f;
|
||||
/** If true, the effect never disappears. */
|
||||
public boolean permanent;
|
||||
/** Tint color of effect. */
|
||||
|
|
@ -51,8 +53,8 @@ public class StatusEffect extends MappableContent{
|
|||
unit.heal(damage * Time.delta());
|
||||
}
|
||||
|
||||
if(effect != Fx.none && Mathf.chanceDelta(0.15f)){
|
||||
effect.at(unit.x() + Mathf.range(unit.bounds() / 2f), unit.y() + Mathf.range(unit.bounds() / 2f));
|
||||
if(effect != Fx.none && Mathf.chanceDelta(effectChance)){
|
||||
effect.at(unit.x + Mathf.range(unit.bounds() / 2f), unit.y + Mathf.range(unit.bounds() / 2f));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||