v3.0.0: fixed spirit form crashes when armor isn't quickslotted

This commit is contained in:
Evan Debenham
2025-02-08 15:45:18 -05:00
committed by Evan Debenham
parent d1cb9e1c49
commit 96d0746fe1

View File

@@ -209,14 +209,18 @@ public class SpiritForm extends ClericSpell {
} else if (effect instanceof EtherealChains){ } else if (effect instanceof EtherealChains){
GameScene.selectCell(((EtherealChains) effect).caster); GameScene.selectCell(((EtherealChains) effect).caster);
QuickSlotButton.useTargeting(Dungeon.quickslot.getSlot(armor)); if (Dungeon.quickslot.contains(armor)) {
QuickSlotButton.useTargeting(Dungeon.quickslot.getSlot(armor));
}
} else if (effect instanceof HornOfPlenty){ } else if (effect instanceof HornOfPlenty){
((HornOfPlenty) effect).doEatEffect(Dungeon.hero, 1); ((HornOfPlenty) effect).doEatEffect(Dungeon.hero, 1);
} else if (effect instanceof MasterThievesArmband){ } else if (effect instanceof MasterThievesArmband){
GameScene.selectCell(((MasterThievesArmband) effect).targeter); GameScene.selectCell(((MasterThievesArmband) effect).targeter);
QuickSlotButton.useTargeting(Dungeon.quickslot.getSlot(armor)); if (Dungeon.quickslot.contains(armor)) {
QuickSlotButton.useTargeting(Dungeon.quickslot.getSlot(armor));
}
} else if (effect instanceof SandalsOfNature){ } else if (effect instanceof SandalsOfNature){
((SandalsOfNature) effect).curSeedEffect = Random.oneOf( ((SandalsOfNature) effect).curSeedEffect = Random.oneOf(
@@ -225,7 +229,9 @@ public class SpiritForm extends ClericSpell {
); );
GameScene.selectCell(((SandalsOfNature) effect).cellSelector); GameScene.selectCell(((SandalsOfNature) effect).cellSelector);
QuickSlotButton.useTargeting(Dungeon.quickslot.getSlot(armor)); if (Dungeon.quickslot.contains(armor)) {
QuickSlotButton.useTargeting(Dungeon.quickslot.getSlot(armor));
}
} else if (effect instanceof TalismanOfForesight){ } else if (effect instanceof TalismanOfForesight){
GameScene.selectCell(((TalismanOfForesight) effect).scry); GameScene.selectCell(((TalismanOfForesight) effect).scry);