v3.0.0: re-assigning the same quick cast spell now clears it

This commit is contained in:
Evan Debenham
2024-12-20 12:24:03 -05:00
parent 7b92da1895
commit cbe3c64716
@@ -213,9 +213,16 @@ public class HolyTome extends Artifact {
private ClericSpell quickSpell = null; private ClericSpell quickSpell = null;
public void setQuickSpell(ClericSpell spell){ public void setQuickSpell(ClericSpell spell){
quickSpell = spell; if (quickSpell == spell){
if (passiveBuff != null){ quickSpell = null; //re-assigning the same spell clears the quick spell
ActionIndicator.setAction((ActionIndicator.Action) passiveBuff); if (passiveBuff != null){
ActionIndicator.clearAction((ActionIndicator.Action) passiveBuff);
}
} else {
quickSpell = spell;
if (passiveBuff != null){
ActionIndicator.setAction((ActionIndicator.Action) passiveBuff);
}
} }
} }