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

View File

@@ -213,9 +213,16 @@ public class HolyTome extends Artifact {
private ClericSpell quickSpell = null;
public void setQuickSpell(ClericSpell spell){
quickSpell = spell;
if (passiveBuff != null){
ActionIndicator.setAction((ActionIndicator.Action) passiveBuff);
if (quickSpell == spell){
quickSpell = null; //re-assigning the same spell clears the quick spell
if (passiveBuff != null){
ActionIndicator.clearAction((ActionIndicator.Action) passiveBuff);
}
} else {
quickSpell = spell;
if (passiveBuff != null){
ActionIndicator.setAction((ActionIndicator.Action) passiveBuff);
}
}
}