v2.4.0: fixed the chilling enchant possibly reducing chill duration

This commit is contained in:
Evan Debenham
2024-02-12 19:13:20 -05:00
committed by Evan Debenham
parent 2466974a71
commit 55ba5757da

View File

@@ -52,8 +52,10 @@ public class Chilling extends Weapon.Enchantment {
if (existing != null){ if (existing != null){
durationToAdd = Math.min(durationToAdd, (6f*powerMulti)-existing.cooldown()); durationToAdd = Math.min(durationToAdd, (6f*powerMulti)-existing.cooldown());
} }
Buff.affect( defender, Chill.class, durationToAdd ); if (durationToAdd > 0) {
Buff.affect(defender, Chill.class, durationToAdd);
}
Splash.at( defender.sprite.center(), 0xFFB2D6FF, 5); Splash.at( defender.sprite.center(), 0xFFB2D6FF, 5);
} }