mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Added Rain of Gore
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user