mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 03:38:01 +00:00
- Added Arboria, Premature Burial, and Sacred Ground
This commit is contained in:
@@ -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")) {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user