update sprite generation + update bullet stats

This commit is contained in:
Leonwang4234
2020-11-08 14:35:06 -08:00
parent d133709423
commit 82348d4fff
5 changed files with 27 additions and 13 deletions

View File

@@ -336,6 +336,8 @@ public class UnitTypes implements ContentList{
lightningLength = 7;
lightningLengthRand = 7;
shootEffect = Fx.shootHeal;
//Does not actually do anything; Just here to make stats work
healPercent = 2f;
lightningType = new BulletType(0.0001f, 0f){{
lifetime = Fx.lightning.lifetime;

View File

@@ -53,10 +53,15 @@ public class AmmoListValue<T extends UnlockableContent> implements StatValue{
sep(bt, Core.bundle.format("bullet.knockback", Strings.fixed(type.knockback, 1)));
}
if(type.pierce || type.pierceCap != -1){
//sap bullets don't really have pierce
if((type.pierce || type.pierceCap != -1) && !(type instanceof SapBulletType)){
sep(bt, type.pierceCap == -1 ? "@bullet.infinitepierce" : Core.bundle.format("bullet.pierce", type.pierceCap));
}
if((type.healPercent > 0f)){
sep(bt, Core.bundle.format("bullet.healpercent", (int)type.healPercent));
}
if((type.status == StatusEffects.burning || type.status == StatusEffects.melting) || type.incendAmount > 0){
sep(bt, "@bullet.incendiary");
}
@@ -69,6 +74,10 @@ public class AmmoListValue<T extends UnlockableContent> implements StatValue{
sep(bt, "@bullet.tarred");
}
if(type.status == StatusEffects.sapped){
sep(bt, "@bullet.sapping");
}
if(type.homingPower > 0.01f){
sep(bt, "@bullet.homing");
}

View File

@@ -34,15 +34,11 @@ public class WeaponListValue implements StatValue{
Weapon weapon = weapons.get(i);
if(weapon.flipSprite){
//fliped weapons are not given stats
continue;
}
if(weapon.outlineRegion.found()){
table.image(Core.atlas.find(unit.name + "-weapon" + i)).size(15 * 8).right().top();
}else{
table.image(unit.icon(Cicon.full)).size(15 * 8).right().top();
}
table.image(Core.atlas.find(unit.name + "-weapon" + i)).size(15 * 8).right().top();
table.table(Tex.underline, w -> {
w.left().defaults().padRight(3).left();