Better Ability Stats (#9654)
* Fix armor plate multiplier + change Math.round to Strings.autoFixed * Missing ability name bundles * Center ability name * SuppressionFieldAbility stats * Is two per row is acceptable? I can revert this commit if not. * LiquidExplodeAbility stat display * MoveLightningAbility stat display * Better SpawnDeathAbility display * Fix multiplier coloring inconsistencies Some had [lightgray] before %/x, some had it after * Consistent content name display Match with bullet status effects * Consistent stat formatting Convert from some being "stat: #" and some being "# stat" to all being "# stat" * Re-order stats * Optimize Imports * Add ability descriptions * Apparently I forgot LiquidRegenAbility * Mention healing allies if displayHeal = true
This commit is contained in:
@@ -14,7 +14,6 @@ import mindustry.game.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.graphics.*;
|
||||
import mindustry.type.*;
|
||||
import mindustry.world.meta.*;
|
||||
|
||||
import static mindustry.Vars.*;
|
||||
|
||||
@@ -53,23 +52,29 @@ public class EnergyFieldAbility extends Ability{
|
||||
|
||||
@Override
|
||||
public void addStats(Table t){
|
||||
t.add(Core.bundle.format("bullet.damage", damage));
|
||||
if(displayHeal){
|
||||
t.add(Core.bundle.get(getBundle() + ".healdescription")).wrap().width(descriptionWidth);
|
||||
}else{
|
||||
t.add(Core.bundle.get(getBundle() + ".description")).wrap().width(descriptionWidth);
|
||||
}
|
||||
t.row();
|
||||
t.add("[lightgray]" + Stat.reload.localized() + ": [white]" + Strings.autoFixed(60f / reload, 2) + " " + StatUnit.perSecond.localized());
|
||||
t.row();
|
||||
t.add("[lightgray]" + Stat.shootRange.localized() + ": [white]" + Strings.autoFixed(range / tilesize, 2) + " " + StatUnit.blocks.localized());
|
||||
t.row();
|
||||
t.add(Core.bundle.format("ability.energyfield.maxtargets", maxTargets));
|
||||
|
||||
t.add(Core.bundle.format("bullet.range", Strings.autoFixed(range / tilesize, 2)));
|
||||
t.row();
|
||||
t.add(abilityStat("firingrate", Strings.autoFixed(60f / reload, 2)));
|
||||
t.row();
|
||||
t.add(abilityStat("maxtargets", maxTargets));
|
||||
t.row();
|
||||
t.add(Core.bundle.format("bullet.damage", damage));
|
||||
if(status != StatusEffects.none){
|
||||
t.row();
|
||||
t.add((status.hasEmoji() ? status.emoji() : "") + "[stat]" + status.localizedName);
|
||||
}
|
||||
if(displayHeal){
|
||||
t.row();
|
||||
t.add(Core.bundle.format("bullet.healpercent", Strings.autoFixed(healPercent, 2)));
|
||||
t.row();
|
||||
t.add(Core.bundle.format("ability.energyfield.sametypehealmultiplier", Math.round(sameTypeHealMult * 100f)));
|
||||
}
|
||||
if(status != StatusEffects.none){
|
||||
t.row();
|
||||
t.add(status.emoji() + " " + status.localizedName);
|
||||
t.add(abilityStat("sametypehealmultiplier", (sameTypeHealMult < 1f ? "[negstat]" : "") + Strings.autoFixed(sameTypeHealMult * 100f, 2)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user