v2.0.0: added a safety check to champion weapon swapping

This commit is contained in:
Evan Debenham
2023-02-09 20:53:30 -05:00
parent 98c190315e
commit a058591e33

View File

@@ -516,6 +516,10 @@ public class MeleeWeapon extends Weapon {
@Override
public void doAction() {
if (Dungeon.hero.subClass != HeroSubClass.CHAMPION){
return;
}
if (Dungeon.hero.belongings.secondWep == null && Dungeon.hero.belongings.backpack.items.size() >= Dungeon.hero.belongings.backpack.capacity()){
GLog.w(Messages.get(MeleeWeapon.class, "swap_full"));
return;