Added building damage to bullet stats

This commit is contained in:
Anuken
2020-12-21 16:55:04 -05:00
parent 952639a72e
commit 806cea4b33
6 changed files with 12 additions and 8 deletions

View File

@@ -1763,7 +1763,7 @@ public class Blocks implements ContentList{
despawnEffect = Fx.instBomb;
trailSpacing = 20f;
damage = 1350;
tileDamageMultiplier = 0.3f;
buildingDamageMultiplier = 0.3f;
speed = brange;
hitShake = 6f;
ammoMultiplier = 1f;

View File

@@ -182,7 +182,7 @@ public class UnitTypes implements ContentList{
lightningLength = 6;
lightningColor = Pal.surge;
//standard bullet damage is far too much for lightning
lightningDamage = 30;
lightningDamage = 20;
}};
}},
@@ -1759,7 +1759,7 @@ public class UnitTypes implements ContentList{
lifetime = 60f;
shootEffect = Fx.shootSmall;
smokeEffect = Fx.shootSmallSmoke;
tileDamageMultiplier = 0.01f;
buildingDamageMultiplier = 0.01f;
}};
}});
}};
@@ -1801,7 +1801,7 @@ public class UnitTypes implements ContentList{
lifetime = 60f;
shootEffect = Fx.shootSmall;
smokeEffect = Fx.shootSmallSmoke;
tileDamageMultiplier = 0.01f;
buildingDamageMultiplier = 0.01f;
}};
}});
}};
@@ -1841,7 +1841,7 @@ public class UnitTypes implements ContentList{
lifetime = 70f;
shootEffect = Fx.shootSmall;
smokeEffect = Fx.shootSmallSmoke;
tileDamageMultiplier = 0.01f;
buildingDamageMultiplier = 0.01f;
homingPower = 0.04f;
}};
}});

View File

@@ -41,7 +41,7 @@ public abstract class BulletType extends Content{
/** Multiplied by turret reload speed to get final shoot speed. */
public float reloadMultiplier = 1f;
/** Multiplier of how much base damage is done to tiles. */
public float tileDamageMultiplier = 1f;
public float buildingDamageMultiplier = 1f;
/** Recoil from shooter entities. */
public float recoil;
/** Whether to kill the shooter when this is shot. For suicide bombers. */

View File

@@ -1165,7 +1165,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
/** Handle a bullet collision.
* @return whether the bullet should be removed. */
public boolean collision(Bullet other){
damage(other.damage() * other.type().tileDamageMultiplier);
damage(other.damage() * other.type().buildingDamageMultiplier);
return true;
}

View File

@@ -46,6 +46,10 @@ public class AmmoListValue<T extends UnlockableContent> implements StatValue{
bt.add(Core.bundle.format("bullet.damage", type.damage));
}
if(type.buildingDamageMultiplier != 1){
sep(bt, Core.bundle.format("bullet.buildingdamage", type.buildingDamageMultiplier * 100));
}
if(type.splashDamage > 0){
sep(bt, Core.bundle.format("bullet.splashdamage", (int)type.splashDamage, Strings.fixed(type.splashDamageRadius / tilesize, 1)));
}