- Added Rain of Gore

This commit is contained in:
swordshine
2013-04-08 05:13:24 +00:00
parent e9c61b6fcd
commit 1b71f3a409
5 changed files with 24 additions and 1 deletions

View File

@@ -206,7 +206,7 @@ public class ChooseTypeEffect extends SpellAbilityEffect {
for (Card c : lands) {
for (String t : c.getType()) {
if (!invalidTypes.contains(t)
&& CardType.isALandType(t)) {
&& CardType.getLandTypes().contains(t)) {
choice = t;
break;
}

View File

@@ -51,6 +51,16 @@ public class ReplaceGainLife extends ReplacementEffect {
return false;
}
}
if (this.getMapParams().containsKey("ValidSource")) {
if (!matchesValid(runParams.get("Source"), this.getMapParams().get("ValidSource").split(","), this.getHostCard())) {
return false;
}
}
if ("True".equals(this.getMapParams().get("SourceController"))) {
if (runParams.get("Source") == null || !runParams.get("Affected").equals(((Card)runParams.get("Source")).getController())) {
return false;
}
}
return true;
}
@@ -73,6 +83,7 @@ public class ReplaceGainLife extends ReplacementEffect {
@Override
public void setReplacingObjects(Map<String, Object> runParams, SpellAbility sa) {
sa.setReplacingObject("LifeGained", runParams.get("LifeGained"));
sa.setReplacingObject("Player", runParams.get("Affected"));
}
}

View File

@@ -441,6 +441,7 @@ public abstract class Player extends GameEntity implements Comparable<Player> {
repParams.put("Event", "GainLife");
repParams.put("Affected", this);
repParams.put("LifeGained", toGain);
repParams.put("Source", source);
if (game.getReplacementHandler().run(repParams) != ReplacementResult.NotReplaced) {
return false;
}