v2.0.0: fixed abilityWeapon not being cleared in several cases

This commit is contained in:
Evan Debenham
2023-02-10 13:27:58 -05:00
parent cc527dc8e0
commit 601b8c585e
5 changed files with 5 additions and 0 deletions

View File

@@ -80,6 +80,7 @@ public class Greataxe extends MeleeWeapon {
hero.belongings.abilityWeapon = this;
if (!hero.canAttack(enemy)){
GLog.w(Messages.get(this, "ability_bad_position"));
hero.belongings.abilityWeapon = null;
return;
}
hero.belongings.abilityWeapon = null;

View File

@@ -77,6 +77,7 @@ public class Mace extends MeleeWeapon {
hero.belongings.abilityWeapon = wep;
if (!hero.canAttack(enemy)){
GLog.w(Messages.get(wep, "ability_bad_position"));
hero.belongings.abilityWeapon = null;
return;
}
hero.belongings.abilityWeapon = null;

View File

@@ -78,6 +78,7 @@ public class RunicBlade extends MeleeWeapon {
if (!hero.canAttack(enemy)){
GLog.w(Messages.get(this, "ability_bad_position"));
tracker.detach();
hero.belongings.abilityWeapon = null;
return;
}
hero.belongings.abilityWeapon = null;

View File

@@ -79,6 +79,7 @@ public class Sai extends MeleeWeapon {
hero.belongings.abilityWeapon = wep;
if (!hero.canAttack(enemy)){
GLog.w(Messages.get(wep, "ability_bad_position"));
hero.belongings.abilityWeapon = null;
return;
}
hero.belongings.abilityWeapon = null;

View File

@@ -80,6 +80,7 @@ public class Sword extends MeleeWeapon {
hero.belongings.abilityWeapon = wep;
if (!hero.canAttack(enemy)){
GLog.w(Messages.get(wep, "ability_bad_position"));
hero.belongings.abilityWeapon = null;
return;
}
hero.belongings.abilityWeapon = null;