mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
Remove redundant checks
This commit is contained in:
@@ -25,7 +25,6 @@ public enum AbilityKey {
|
||||
AttackedTarget("AttackedTarget"),
|
||||
Blocker("Blocker"),
|
||||
Blockers("Blockers"),
|
||||
CastOrCopy("CastOrCopy"),
|
||||
CastSA("CastSA"),
|
||||
CastSACMC("CastSACMC"),
|
||||
Card("Card"),
|
||||
|
||||
@@ -80,32 +80,6 @@ public class TriggerSpellAbilityCastOrCopy extends Trigger {
|
||||
final Card cast = spellAbility.getHostCard();
|
||||
final Game game = cast.getGame();
|
||||
final SpellAbilityStackInstance si = game.getStack().getInstanceFromSpellAbility(spellAbility);
|
||||
String castOrCopy = (String) runParams.get(AbilityKey.CastOrCopy);
|
||||
|
||||
// Specific checks for trigger types
|
||||
if (castOrCopy.equals("Copy")) {
|
||||
if (this.getMode().equals(TriggerType.AbilityCast) ||
|
||||
this.getMode().equals(TriggerType.SpellAbilityCast) ||
|
||||
this.getMode().equals(TriggerType.SpellCast)) {
|
||||
return false;
|
||||
}
|
||||
} else if (castOrCopy.equals("Cast")) {
|
||||
if (this.getMode().equals(TriggerType.SpellAbilityCopy) ||
|
||||
this.getMode().equals(TriggerType.SpellCopy)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (spellAbility.isSpell()) {
|
||||
if (this.getMode().equals(TriggerType.AbilityCast)) {
|
||||
return false;
|
||||
}
|
||||
} else if (spellAbility.isAbility()) {
|
||||
if (this.getMode().equals(TriggerType.SpellCast) ||
|
||||
this.getMode().equals(TriggerType.SpellCopy) ||
|
||||
this.getMode().equals(TriggerType.SpellCastOrCopy)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (hasParam("ActivatedOnly")) {
|
||||
if (spellAbility.isTrigger()) {
|
||||
|
||||
@@ -301,7 +301,6 @@ public class MagicStack /* extends MyObservable */ implements Iterable<SpellAbil
|
||||
runParams.put(AbilityKey.CurrentStormCount, thisTurnCast.size());
|
||||
runParams.put(AbilityKey.CurrentCastSpells, Lists.newArrayList(thisTurnCast));
|
||||
if (!sp.isCopied()) {
|
||||
runParams.put(AbilityKey.CastOrCopy, "Cast");
|
||||
// Run SpellAbilityCast triggers
|
||||
game.getTriggerHandler().runTrigger(TriggerType.SpellAbilityCast, runParams, true);
|
||||
|
||||
@@ -334,7 +333,6 @@ public class MagicStack /* extends MyObservable */ implements Iterable<SpellAbil
|
||||
game.getTriggerHandler().runTrigger(TriggerType.Crewed, runParams, false);
|
||||
}
|
||||
} else {
|
||||
runParams.put(AbilityKey.CastOrCopy, "Copy");
|
||||
// Run Copy triggers
|
||||
if (sp.isSpell()) {
|
||||
game.getTriggerHandler().runTrigger(TriggerType.SpellCopy, runParams, false);
|
||||
|
||||
Reference in New Issue
Block a user