v2.0.0: Duelist now can't use weapon abilities with insufficient str

This commit is contained in:
Evan Debenham
2023-01-27 11:57:43 -05:00
parent fdaa3279ec
commit a6034e95c6
2 changed files with 4 additions and 0 deletions

View File

@@ -1609,6 +1609,7 @@ items.weapon.melee.meleeweapon.probably_too_heavy=Probably this weapon is too he
items.weapon.melee.meleeweapon.stats_desc=
items.weapon.melee.meleeweapon.swift_equip=You quickly switch your equipped weapon.
items.weapon.melee.meleeweapon.ability_need_equip=You must equip that weapon to use its ability.
items.weapon.melee.meleeweapon.ability_low_str=You aren't strong enough to use this weapon's ability.
items.weapon.melee.meleeweapon.ability_no_charge=You don't have enough energy to use that ability.
items.weapon.melee.meleeweapon.ability_cant_use=You can't use that ability right now.
items.weapon.melee.meleeweapon.ability_no_target=There is no target there.

View File

@@ -108,6 +108,9 @@ public class MeleeWeapon extends Weapon {
GLog.w(Messages.get(this, "ability_need_equip"));
usesTargeting = false;
}
} else if (STRReq() > hero.STR()){
GLog.w(Messages.get(this, "ability_low_str"));
usesTargeting = false;
} else if (hero.belongings.weapon == this &&
(Buff.affect(hero, Charger.class).charges + Buff.affect(hero, Charger.class).partialCharge) < abilityChargeUse(hero)) {
GLog.w(Messages.get(this, "ability_no_charge"));