- Added Arboria, Premature Burial, and Sacred Ground

This commit is contained in:
swordshine
2013-11-10 05:14:26 +00:00
parent c073d39cd6
commit a3376b0502
7 changed files with 44 additions and 0 deletions

View File

@@ -978,6 +978,8 @@ public class AbilityUtils {
}
}
}
} else if (defined.equals("ActivePlayer")) {
players.add(game.getPhaseHandler().getPlayerTurn());
} else if (defined.equals("You")) {
players.add(sa.getActivatingPlayer());
} else if (defined.equals("Each")) {

View File

@@ -50,6 +50,7 @@ public class TriggerSacrificed extends Trigger {
@Override
public final boolean performTest(final java.util.Map<String, Object> runParams2) {
final Card sac = (Card) runParams2.get("Card");
final SpellAbility sourceSA = (SpellAbility) runParams2.get("Cause");
if (this.mapParams.containsKey("ValidPlayer")) {
if (!matchesValid(sac.getController(), this.mapParams.get("ValidPlayer").split(","),
this.getHostCard())) {
@@ -62,6 +63,12 @@ public class TriggerSacrificed extends Trigger {
return false;
}
}
if (this.mapParams.containsKey("ValidSourceController")) {
if (sourceSA == null || !sourceSA.getActivatingPlayer().isValid(this.mapParams.get("ValidSourceController"),
this.getHostCard().getController(), this.getHostCard())) {
return false;
}
}
return true;
}

View File

@@ -1210,6 +1210,7 @@ public class GameAction {
// Run triggers
final HashMap<String, Object> runParams = new HashMap<String, Object>();
runParams.put("Card", c);
runParams.put("Cause", source);
game.getTriggerHandler().runTrigger(TriggerType.Sacrificed, runParams, false);
return true;
}