diff --git a/res/bundles/bundle.properties b/res/bundles/bundle.properties index 8e1df5ec..0047a5cc 100644 --- a/res/bundles/bundle.properties +++ b/res/bundles/bundle.properties @@ -34,6 +34,7 @@ stat.attacksbosses = [accent]may hack guardians[] stat.lifetime = Lifetime stat.unitdamageres = Resistance per Unit stat.hackchancemultiplier = Hack Chance Multiplier +stat.hackhpthreshold = Health Thresholds unittype = [gray]Type: [] unittype.infantry = [accent]Infantry[] @@ -353,7 +354,7 @@ unit.fos-king.description = A controllable battle mech produced by Core: City. S unit.fos-sergeant.name = Sergeant unit.fos-sergeant.description = A weak drone capable of turning weak enemies to its team's side. Hacked enemies will die eventually. unit.fos-lieutenant.name = Lieutenant -unit.fos-lieutenant.description = Shoots lightning arcs to make enemies more vulnerable to hack attacks. +unit.fos-lieutenant.description = Shoots homing ball lightning to make enemies more vulnerable to hack attacks. unit.fos-captain.name = Captain unit.fos-captain.description = A missile drone able to turn one or multiple targets to its team's side. Has decent damage. unit.fos-general.name = General diff --git a/res/bundles/bundle_ru.properties b/res/bundles/bundle_ru.properties index f3e2c1c7..7ac3ad2f 100644 --- a/res/bundles/bundle_ru.properties +++ b/res/bundles/bundle_ru.properties @@ -34,6 +34,7 @@ stat.attacksbosses = [accent]может взломать стражей[] stat.lifetime = Время жизни stat.unitdamageres = Устойчивость на боевую единицу stat.hackchancemultiplier = Множитель шанса взлома +stat.hackhpthreshold = Пороги прочности unittype = [gray]Тип: [] unittype.infantry = [accent]Пехота[] @@ -353,7 +354,7 @@ unit.fos-king.description = Управляемый боевой мех, прои unit.fos-sergeant.name = Сержант unit.fos-sergeant.description = Слабый дрон, позволяющий обратить слабых врагов в свою сторону. Взломанные враги рано или поздно будут уничтожены. unit.fos-lieutenant.name = Лейтенант -unit.fos-lieutenant.description = Стреляет молниями, делая врагов более уязвимыми ко взлому. +unit.fos-lieutenant.description = Стреляет самонаводящимися шаровыми молниями, делая врагов более уязвимыми ко взлому. unit.fos-captain.name = Капитан unit.fos-captain.description = Дрон с ракетницами, позволяющие обратить одного или нескольких врагов в свою сторону. Имеет неплохой урон. unit.fos-general.name = Генерал diff --git a/src/fos/content/FOSBlocks.java b/src/fos/content/FOSBlocks.java index fbc7ba90..71eaa1e5 100644 --- a/src/fos/content/FOSBlocks.java +++ b/src/fos/content/FOSBlocks.java @@ -404,50 +404,50 @@ public static void load() { //endregion //region defense tinWall = new Wall("tin-wall"){{ - scaledHealth = 400; + scaledHealth = 800; size = 1; buildCostMultiplier = 3f; requirements(Category.defense, with(tin, 6)); }}; tinWallLarge = new Wall("tin-wall-large"){{ - scaledHealth = 400; + scaledHealth = 800; size = 2; buildCostMultiplier = 3f; requirements(Category.defense, with(tin, 24)); }}; diamondWall = new Wall("diamond-wall"){{ - scaledHealth = 625; + scaledHealth = 1250; size = 1; buildCostMultiplier = 3f; requirements(Category.defense, with(diamond, 6)); }}; diamondWallLarge = new Wall("diamond-wall-large"){{ - scaledHealth = 625; + scaledHealth = 1250; size = 2; buildCostMultiplier = 3f; requirements(Category.defense, with(diamond, 24)); }}; vanadiumWall = new Wall("vanadium-wall"){{ - scaledHealth = 800; + scaledHealth = 1600; size = 1; buildCostMultiplier = 3f; requirements(Category.defense, with(vanadium, 6)); }}; vanadiumWallLarge = new Wall("vanadium-wall-large"){{ - scaledHealth = 800; + scaledHealth = 1600; size = 2; buildCostMultiplier = 3f; requirements(Category.defense, with(vanadium, 24)); }}; cuberiumWall = new Wall("cuberium-wall"){{ - scaledHealth = 600; + scaledHealth = 1200; size = 1; absorbLasers = true; buildCostMultiplier = 3f; requirements(Category.defense, with(cuberium, 6)); }}; cuberiumWallLarge = new Wall("cuberium-wall-large"){{ - scaledHealth = 600; + scaledHealth = 1200; size = 2; absorbLasers = true; buildCostMultiplier = 3f; @@ -481,7 +481,7 @@ public static void load() { ); }}; ammo( - tin, new BasicBulletType(3f, 10){{ + tin, new BasicBulletType(3f, 20){{ width = 3f; height = 6f; lifetime = 44f; trailColor = frontColor = FOSPal.tin; @@ -491,7 +491,7 @@ tin, new BasicBulletType(3f, 10){{ ammoMultiplier = 2f; buildingDamageMultiplier = 0.3f; }}, - diamond, new BasicBulletType(3f, 18){{ + diamond, new BasicBulletType(3f, 36){{ width = 3f; height = 6f; lifetime = 44f; trailColor = frontColor = FOSPal.diamond; @@ -503,7 +503,7 @@ diamond, new BasicBulletType(3f, 18){{ pierceCap = 2; buildingDamageMultiplier = 0.3f; }}, - silicon, new BasicBulletType(3f, 14){{ + silicon, new BasicBulletType(3f, 28){{ width = 3f; height = 6f; lifetime = 44f; trailColor = frontColor = Pal.unitFront; @@ -515,7 +515,7 @@ silicon, new BasicBulletType(3f, 14){{ homingPower = 0.1f; buildingDamageMultiplier = 0.3f; }}, - vanadium, new BasicBulletType(4f, 20){{ + vanadium, new BasicBulletType(4f, 40){{ width = 3f; height = 6f; lifetime = 44f; rangeChange = 44f; @@ -526,7 +526,7 @@ vanadium, new BasicBulletType(4f, 20){{ ammoMultiplier = 3f; buildingDamageMultiplier = 0.3f; }}, - nickel, new BasicBulletType(4f, 22){{ + nickel, new BasicBulletType(4f, 44){{ width = 4f; height = 8f; lifetime = 44f; rangeChange = 44f; @@ -541,7 +541,7 @@ nickel, new BasicBulletType(4f, 22){{ luminium, new BasicBulletType(){{ width = 4f; height = 8f; speed = 4.5f; - damage = 26.25f; + damage = 52.5f; lifetime = 44f; rangeChange = 66f; trailColor = frontColor = FOSPal.luminium1; @@ -574,7 +574,7 @@ luminium, new BasicBulletType(){{ squareSprite = false; consumeLiquid(tokicite, 0.1f); ammo( - tin, new StickyBulletType(8f, 10, 90){{ + tin, new StickyBulletType(8f, 20, 90){{ lifetime = 45f; width = height = 10f; trailColor = FOSPal.tinBack; @@ -582,11 +582,11 @@ tin, new StickyBulletType(8f, 10, 90){{ frontColor = FOSPal.tokicite; ammoMultiplier = 2f; scaleLife = true; - splashDamage = 40; + splashDamage = 80; splashDamageRadius = 12f; buildingDamageMultiplier = 0.3f; }}, - diamond, new StickyBulletType(8f, 30, 90){{ + diamond, new StickyBulletType(8f, 60, 90){{ lifetime = 45f; width = height = 10f; trailColor = FOSPal.diamondBack; @@ -594,7 +594,7 @@ diamond, new StickyBulletType(8f, 30, 90){{ frontColor = FOSPal.tokicite; ammoMultiplier = 3f; scaleLife = true; - splashDamage = 50; + splashDamage = 100; splashDamageRadius = 16f; buildingDamageMultiplier = 0.3f; }} @@ -626,7 +626,7 @@ diamond, new StickyBulletType(8f, 30, 90){{ consumePower(2f); drawer = new DrawTurret("lumoni-"); shootType = new RailBulletType(){{ - damage = 4f; + damage = 16f; length = 225f; lifetime = 10f; pierceDamageFactor = 1f; @@ -653,7 +653,7 @@ diamond, new StickyBulletType(8f, 30, 90){{ particulator = new ItemTurret("particulator"){{ health = 2400; size = 3; - range = 120; + range = 240; targetAir = targetGround = true; recoil = 2; reload = 40; @@ -662,7 +662,7 @@ diamond, new StickyBulletType(8f, 30, 90){{ shootSound = Sounds.shootBig; squareSprite = false; ammo( - silver, new BasicBulletType(2f, 40){{ + silver, new BasicBulletType(4f, 80){{ lifetime = 60f; width = 16f; height = 24f; backColor = FOSPal.silverBack; @@ -678,7 +678,7 @@ silver, new BasicBulletType(2f, 40){{ hitEffect = despawnEffect = Fx.explosion; buildingDamageMultiplier = 0.3f; fragBullets = 6; - fragBullet = new BasicBulletType(0.8f, 5){{ + fragBullet = new BasicBulletType(0.8f, 10){{ lifetime = 60f * 5; //frags will stay for pretty long drag = 0.024f; width = height = 6f; @@ -695,8 +695,8 @@ silver, new BasicBulletType(2f, 40){{ buildingDamageMultiplier = 0.3f; }}; }}, - vanadium, new BasicBulletType(2f, 60){{ - lifetime = 60f; + vanadium, new BasicBulletType(6f, 120){{ + lifetime = 40f; width = 16f; height = 24f; backColor = vanadium.color.cpy().mul(0.8f); frontColor = trailColor = lightColor = vanadium.color; @@ -711,7 +711,7 @@ vanadium, new BasicBulletType(2f, 60){{ hitEffect = despawnEffect = Fx.explosion; buildingDamageMultiplier = 0.3f; fragBullets = 7; - fragBullet = new BasicBulletType(0.8f, 8){{ + fragBullet = new BasicBulletType(0.8f, 16){{ lifetime = 60f * 5; //frags will stay for pretty long drag = 0.024f; width = height = 6f; diff --git a/src/fos/content/FOSStatuses.java b/src/fos/content/FOSStatuses.java index e1fb765f..6c63937f 100644 --- a/src/fos/content/FOSStatuses.java +++ b/src/fos/content/FOSStatuses.java @@ -1,8 +1,11 @@ package fos.content; +import arc.graphics.g2d.*; +import arc.util.Time; import fos.graphics.FOSPal; import fos.type.draw.FOSStats; import fos.type.statuses.HackedEffect; +import mindustry.gen.Unit; import mindustry.type.StatusEffect; import mindustry.world.meta.StatUnit; @@ -19,6 +22,15 @@ public void setStats() { super.setStats(); stats.add(FOSStats.hackChanceMultiplier, 125f, StatUnit.percent); } + + @Override + public void draw(Unit unit) { + Draw.color(FOSPal.hacked); + for (int i = 0; i < 360; i += 120) { + Lines.arc(unit.x, unit.y, unit.hitSize * 1.1f, 0.25f, i + Time.time); + } + Draw.reset(); + } }; tokiciteSlowed = new StatusEffect("tokicite-slowed"){{ speedMultiplier = 0.4f; diff --git a/src/fos/content/FOSUnitTypes.java b/src/fos/content/FOSUnitTypes.java index aef4b458..ed9b5726 100644 --- a/src/fos/content/FOSUnitTypes.java +++ b/src/fos/content/FOSUnitTypes.java @@ -215,10 +215,9 @@ public static void load(){ //aiController = GroundBossAI::new; }}; - //TODO: campaign boss citadel = new BossUnitType("citadel"){{ - health = 3750; - armor = 30; + health = 9000; + armor = 20; hitSize = 40; rotateSpeed = 2f; speed = 0.2f; @@ -227,7 +226,8 @@ public static void load(){ weapons.add( new Weapon("fos-citadel-shotgun"){{ x = 18; y = 0; - rotate = false; + rotate = true; + rotationLimit = 10f; mirror = true; alternate = true; //layerOffset = -0.15f; @@ -235,8 +235,8 @@ public static void load(){ recoilTime = 60f; reload = 30f; inaccuracy = 10f; - shoot.shots = 6; - bullet = new BasicBulletType(4f, 15f){{ + shoot.shots = 8; + bullet = new BasicBulletType(4f, 60f){{ lifetime = 40f; width = 4f; height = 8f; trailWidth = 2f; @@ -251,9 +251,9 @@ public static void load(){ mirror = true; alternate = true; recoil = 2f; - reload = 90f; + reload = 60f; inaccuracy = 3f; - bullet = new StickyBulletType(2f, 1f, 180){{ + bullet = new StickyBulletType(2f, 20f, 180){{ lifetime = 120f; width = height = 16f; trailWidth = 3f; @@ -264,7 +264,7 @@ public static void load(){ ejectEffect = Fx.smokeCloud; hitSound = Sounds.mud; despawnEffect = Fx.explosion; - splashDamage = 40f; + splashDamage = 60f; splashDamageRadius = 16f; collidesGround = collidesAir = true; collidesTiles = true; @@ -582,11 +582,12 @@ public static void load(){ }}; sergeant = new TrailUnitType("sergeant"){{ - health = 75; + health = 220; + armor = 4; hitSize = 12; speed = 2f; hovering = true; - omniMovement = false; + omniMovement = true; immunities.add(hacked); circleTarget = false; engineColorInner = FOSPal.hacked; @@ -597,16 +598,28 @@ public static void load(){ trailType = ArrowFadeTrail.class; useEngineElevation = false; aiController = InjectorAI::new; + + parts.add(new HoverPart(){{ + x = 4f; + y = 1f; + mirror = true; + radius = 4f; + phase = 90f; + stroke = 2f; + layerOffset = -0.001f; + color = FOSPal.hackedBack; + }}); + weapons.add( new InjectorWeapon("fos-injector"){{ x = 0; y = 0; - reload = 60; + reload = 45; ejectEffect = Fx.casing1; shootSound = Sounds.bolt; - bullet = new InjectorBasicBulletType(0, 0.3f, 25, 200, false){{ + bullet = new InjectorBasicBulletType(0, 0.5f, 200, 450, false){{ homingPower = 0.2f; width = 4f; height = 6f; - damage = 10; + damage = 60; speed = 6f; lifetime = 50f; trailColor = FOSPal.hackedBack; @@ -616,11 +629,13 @@ public static void load(){ ); }}; lieutenant = new TrailUnitType("lieutenant"){{ - health = 360; + health = 1600; + armor = 6; hitSize = 16; - speed = 2.4f; + speed = 1.6f; hovering = true; - omniMovement = false; + shadowElevation = 0.2f; + omniMovement = true; aiController = InjectorAI::new; engineColorInner = FOSPal.hacked; engineColor = FOSPal.hackedBack; @@ -631,29 +646,75 @@ public static void load(){ lightRadius = 16f; useEngineElevation = false; immunities.addAll(hacked, injected); + + parts.add(new HoverPart(){{ + x = 6f; + y = 2f; + mirror = true; + radius = 8f; + phase = 90f; + stroke = 2f; + layerOffset = -0.001f; + color = FOSPal.hackedBack; + }}); + weapons.add( new InjectorWeapon(){{ x = y = 0; - shootY = 4f; mirror = false; - rotate = true; reload = 40f; + inaccuracy = 8f; + shootCone = 15f; + rotate = false; + shootY = 4f; shootSound = Sounds.spark; - bullet = new LightningBulletType(){{ - lightningColor = FOSPal.hacked; - damage = 20f; - lightningLength = 15; - lightningLengthRand = 4; + bullet = new BasicBulletType(){{ + width = height = 12f; + backColor = FOSPal.hackedBack; + frontColor = FOSPal.hacked; + speed = 2f; lifetime = 90f; + rotateSpeed = 9f; + homingPower = 0.2f; + homingDelay = 30f; + + trailLength = 6; + trailWidth = 4; + trailColor = FOSPal.hackedBack; + + intervalBullets = 2; + bulletInterval = 4f; + intervalBullet = new LightningBulletType(){{ + lightningLength = 4; + lightningLengthRand = 2; + lightningColor = FOSPal.hacked; + status = injected; + statusDuration = 300f; + damage = 20; + }}; + + fragBullets = 2; + fragOnHit = true; + despawnHit = false; + fragBullet = new LightningBulletType(){{ + lightningLength = 6; + lightningLengthRand = 4; + lightningColor = FOSPal.hacked; + status = injected; + statusDuration = 300f; + damage = 80; + }}; + status = injected; - statusDuration = 180f; + statusDuration = 300f; }}; }} ); }}; captain = new TrailUnitType("captain"){{ - health = 900; + health = 4200; + armor = 8; hitSize = 20; - speed = 1.1f; + speed = 0.3f; hovering = true; engineColorInner = FOSPal.hacked; engineColor = FOSPal.hackedBack; @@ -665,6 +726,7 @@ public static void load(){ aiController = InjectorAI::new; immunities.add(hacked); weapons.add( + // TODO: rework new InjectorWeapon("fos-injector-missile"){{ x = 9; y = 0; top = true; @@ -723,8 +785,8 @@ public static void load(){ }}; radix = new FOSUnitType("radix"){{ - health = 300; - armor = 1; + health = 1000; + armor = 5; speed = 0.6f; hitSize = 12; rotateSpeed = 2f; @@ -749,7 +811,7 @@ public static void load(){ recoil = 1f; mirror = false; layerOffset = -0.0001f; - reload = 45f; + reload = 30f; rotate = false; shootSound = Sounds.missile; bullet = new BasicBulletType(){{ @@ -768,7 +830,7 @@ public static void load(){ fragBullets = 3; fragOnHit = true; fragBullet = new LightningBulletType(){{ - damage = 5; + damage = 10; lightningLength = 3; lightningLengthRand = 2; }}; @@ -777,8 +839,8 @@ public static void load(){ ); }}; foetus = new FOSUnitType("foetus"){{ - health = 550; - armor = 3; + health = 1950; + armor = 5; speed = 0.4f; hitSize = 18; rotateSpeed = 1.8f; @@ -797,11 +859,12 @@ public static void load(){ legForwardScl = 0.9075F; legMoveSpace = 1.085F; - abilities.add(new EnergyFieldAbility(40f, 90f, 90f){{ + abilities.add(new EnergyFieldAbility(20f, 30f, 90f){{ x = 0; y = -2; statusDuration = 120f; maxTargets = 10; color = Pal.surge; + healPercent = 2f; //buildingDamageMultiplier = 1.25f; }}); @@ -826,8 +889,8 @@ public static void load(){ }}); }}; vitarus = new FOSUnitType("vitarus"){{ - health = 2100; - armor = 4; + health = 3100; + armor = 7; speed = 0.35f; hitSize = 22; rotateSpeed = 1f; @@ -854,7 +917,7 @@ public static void load(){ rotationLimit = 30f; layerOffset = -0.0001f; mirror = true; - reload = 120f; + reload = 66f; shootSound = Sounds.shootSmite; bullet = new RailBulletType(){{ @@ -872,11 +935,11 @@ public static void load(){ hitEffect = Fx.blastExplosion; status = StatusEffects.blasted; - fragBullets = 4; + fragBullets = 3; fragOnHit = true; fragRandomSpread = 0f; fragBullet = new LightningBulletType(){{ - damage = 10; + damage = 20; //buildingDamageMultiplier = 0.6f; lightningLength = 7; lightningLengthRand = 7; @@ -916,8 +979,8 @@ public static void load(){ }}; assault = new FOSUnitType("assault"){{ - health = 200; - armor = 2f; + health = 800; + //armor = 2f; hitSize = 9f; hovering = true; shadowElevation = 0.1f; @@ -950,7 +1013,7 @@ public static void load(){ mirror = alternate = true; shoot.shots = 2; shoot.shotDelay = 20; - reload = 80f; + reload = 50f; bullet = new MissileBulletType(){{ damage = 50; speed = 5; lifetime = 40; @@ -959,7 +1022,7 @@ public static void load(){ backColor = trailColor = Pal.sapBulletBack; frontColor = Pal.reactorPurple2; trailLength = 12; - buildingDamageMultiplier = 0.3f; + buildingDamageMultiplier = 0.5f; }}; }} ); @@ -1075,7 +1138,7 @@ public static void load(){ }}; bugSmall = new BugUnitType("bug-small", false){{ - health = 80; + health = 160; armor = 8; hitSize = 16f; speed = 0.3f; @@ -1089,10 +1152,10 @@ public static void load(){ }}; bugMedium = new BugUnitType("bug-medium", false){{ - health = 240; - armor = 20; + health = 480; + armor = 15; hitSize = 18f; - speed = 0.4f; + speed = 0.48f; segments = 4; crushDamage = 0.6f; diff --git a/src/fos/type/bullets/InjectorBlastBulletType.java b/src/fos/type/bullets/InjectorBlastBulletType.java deleted file mode 100644 index 649f0b73..00000000 --- a/src/fos/type/bullets/InjectorBlastBulletType.java +++ /dev/null @@ -1,61 +0,0 @@ -package fos.type.bullets; - -import mindustry.content.Fx; -import mindustry.entities.Units; -import mindustry.entities.bullet.BulletType; -import mindustry.gen.*; - -public class InjectorBlastBulletType extends BulletType implements InjectorBulletType { - public float chance = 0.1f; - public boolean attacksGuardians = false; - - //used by Lieutenant aka tier 2 Injector - public InjectorBlastBulletType(float chance, boolean attacksGuardians) { - super(); - this.chance = chance; - this.attacksGuardians = attacksGuardians; - - collidesTiles = collides = false; - hitSound = Sounds.explosion; - rangeOverride = 16f; - hitEffect = Fx.pulverize; - speed = 0f; - killShooter = true; - instantDisappear = true; - hittable = false; - collidesAir = collidesGround = true; - } - - @Override - public float minChance() { - return chance; - } - - @Override - public float maxChance() { - return chance; - } - - @Override - public float minHP() { - return 0f; - } - - @Override - public float maxHP() { - return 0f; - } - - @Override - public boolean attacksGuardians() { - return attacksGuardians; - } - - @Override - public void hit(Bullet b) { - super.hit(b); - - //do the actual "injection" here - Units.nearbyEnemies(b.team, b.x, b.y, b.type.splashDamageRadius, u -> onHit(b, u)); - } -} diff --git a/src/fos/type/bullets/InjectorHackLaserBulletType.java b/src/fos/type/bullets/InjectorHackLaserBulletType.java new file mode 100644 index 00000000..93ce4363 --- /dev/null +++ b/src/fos/type/bullets/InjectorHackLaserBulletType.java @@ -0,0 +1,32 @@ +package fos.type.bullets; + +import mindustry.entities.bullet.ContinuousLaserBulletType; + +public class InjectorHackLaserBulletType extends ContinuousLaserBulletType implements InjectorBulletType { + public float minChance, maxChance, minHP, maxHP; + + @Override + public float minChance() { + return minChance; + } + + @Override + public float maxChance() { + return maxChance; + } + + @Override + public float minHP() { + return minHP; + } + + @Override + public float maxHP() { + return maxHP; + } + + @Override + public boolean attacksGuardians() { + return true; + } +} diff --git a/src/fos/type/units/comp/DamageAbsorbComp.java b/src/fos/type/units/comp/DamageAbsorbComp.java new file mode 100644 index 00000000..41eeccff --- /dev/null +++ b/src/fos/type/units/comp/DamageAbsorbComp.java @@ -0,0 +1,26 @@ +package fos.type.units.comp; + +import arc.math.Mathf; +import fos.type.units.types.FOSUnitType; +import mindustry.Vars; +import mindustry.entities.Damage; +import mindustry.gen.Unitc; +import mindustry.type.UnitType; + +import static mindustry.annotations.Annotations.*; + +@Component +public abstract class DamageAbsorbComp implements Unitc { + @Import float armor, healthMultiplier; + @Import UnitType type; + + @Override + @Replace + public void damage(float amount) { + if (type instanceof FOSUnitType fu) { + rawDamage(Damage.applyArmor(amount * Mathf.clamp(1 - fu.absorption), armor) / healthMultiplier / Vars.state.rules.unitHealthMultiplier); + } else { + rawDamage(Damage.applyArmor(amount, armor) / healthMultiplier / Vars.state.rules.unitHealthMultiplier); + } + } +} diff --git a/src/fos/type/units/types/FOSUnitType.java b/src/fos/type/units/types/FOSUnitType.java index 7b88692c..fc649ee1 100644 --- a/src/fos/type/units/types/FOSUnitType.java +++ b/src/fos/type/units/types/FOSUnitType.java @@ -4,6 +4,13 @@ import mindustry.type.UnitType; public class FOSUnitType extends UnitType { + /** + * Physical damage reduction fraction, 0 to 1. Applied before armour. + * Does not affect damage from status effects. + * FIXME: doesn't work. + */ + public float absorption = 0f; + public FOSUnitType(String name) { super(name); outlineColor = Color.valueOf("2b2f36"); diff --git a/src/fos/type/units/weapons/InjectorWeapon.java b/src/fos/type/units/weapons/InjectorWeapon.java index e60b767a..b070e56e 100644 --- a/src/fos/type/units/weapons/InjectorWeapon.java +++ b/src/fos/type/units/weapons/InjectorWeapon.java @@ -3,7 +3,7 @@ import arc.Core; import arc.math.Mathf; import arc.scene.ui.layout.Table; -import fos.type.bullets.InjectorBasicBulletType; +import fos.type.bullets.InjectorBulletType; import mindustry.type.*; public class InjectorWeapon extends Weapon { @@ -18,12 +18,14 @@ public InjectorWeapon() { public void addStats(UnitType u, Table t) { super.addStats(u, t); - if (bullet instanceof InjectorBasicBulletType b) { + if (bullet instanceof InjectorBulletType b) { t.row(); - t.add("[lightgray]" + Core.bundle.get("stat.hackchance") + ": [][white]" + (b.minChance == b.maxChance ? (Mathf.round(b.minChance * 100) + "%") - : (Mathf.round(b.minChance * 100) + "~" + Mathf.round(b.maxChance * 100) + "%"))); + t.add("[lightgray]" + Core.bundle.get("stat.hackchance") + ": [][white]" + (b.minChance() == b.maxChance() ? (Mathf.round(b.minChance() * 100) + "%") + : (Mathf.round(b.minChance() * 100) + "~" + Mathf.round(b.maxChance() * 100) + "%"))); + t.row(); + t.add("[lightgray]" + Core.bundle.get("stat.hackhpthreshold") + ": [][white]" + Mathf.round(b.maxHP()) + "~" + Mathf.round(b.minHP())); - if (b.attacksGuardians) { + if (b.attacksGuardians()) { t.row(); t.add("@stat.attacksbosses"); }