From a6034e95c66f0cbe33c8d7dc77a64f8d6216b89c Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Fri, 27 Jan 2023 11:57:43 -0500 Subject: [PATCH] v2.0.0: Duelist now can't use weapon abilities with insufficient str --- core/src/main/assets/messages/items/items.properties | 1 + .../shatteredpixeldungeon/items/weapon/melee/MeleeWeapon.java | 3 +++ 2 files changed, 4 insertions(+) diff --git a/core/src/main/assets/messages/items/items.properties b/core/src/main/assets/messages/items/items.properties index ad55a6726..920768b00 100644 --- a/core/src/main/assets/messages/items/items.properties +++ b/core/src/main/assets/messages/items/items.properties @@ -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. diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/MeleeWeapon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/MeleeWeapon.java index bcf893e2f..2536ad4ca 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/MeleeWeapon.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/MeleeWeapon.java @@ -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"));