v3.0.1: holy wep and ward extension now caps at 100 turns

This commit is contained in:
Evan Debenham
2025-03-10 14:38:34 -04:00
parent f3c076ab16
commit 1c9eced78d
3 changed files with 18 additions and 2 deletions

View File

@@ -88,10 +88,10 @@ public abstract class ClericSpell {
Talent.onArtifactUsed(hero);
if (hero.subClass == HeroSubClass.PALADIN){
if (this != HolyWeapon.INSTANCE && hero.buff(HolyWeapon.HolyWepBuff.class) != null){
Buff.affect(hero, HolyWeapon.HolyWepBuff.class, 10*chargeUse(hero));
hero.buff(HolyWeapon.HolyWepBuff.class).extend(10*chargeUse(hero));
}
if (this != HolyWard.INSTANCE && hero.buff(HolyWard.HolyArmBuff.class) != null){
Buff.affect(hero, HolyWard.HolyArmBuff.class, 10*chargeUse(hero));
hero.buff(HolyWard.HolyArmBuff.class).extend(10*chargeUse(hero));
}
}

View File

@@ -101,6 +101,14 @@ public class HolyWard extends ClericSpell {
super.detach();
Item.updateQuickslot();
}
public void extend(float extension){
if (cooldown()+extension <= 2*DURATION){
spend(extension);
} else {
postpone(2*DURATION);
}
}
}
}

View File

@@ -106,6 +106,14 @@ public class HolyWeapon extends ClericSpell {
super.detach();
Item.updateQuickslot();
}
public void extend(float extension){
if (cooldown()+extension <= 2*DURATION){
spend(extension);
} else {
postpone(2*DURATION);
}
}
}
}