mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
- Added Rain of Gore
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -8295,6 +8295,7 @@ res/cardsfolder/r/rain_of_blades.txt svneol=native#text/plain
|
|||||||
res/cardsfolder/r/rain_of_daggers.txt -text
|
res/cardsfolder/r/rain_of_daggers.txt -text
|
||||||
res/cardsfolder/r/rain_of_embers.txt svneol=native#text/plain
|
res/cardsfolder/r/rain_of_embers.txt svneol=native#text/plain
|
||||||
res/cardsfolder/r/rain_of_filth.txt -text svneol=unset#text/plain
|
res/cardsfolder/r/rain_of_filth.txt -text svneol=unset#text/plain
|
||||||
|
res/cardsfolder/r/rain_of_gore.txt -text
|
||||||
res/cardsfolder/r/rain_of_rust.txt svneol=native#text/plain
|
res/cardsfolder/r/rain_of_rust.txt svneol=native#text/plain
|
||||||
res/cardsfolder/r/rain_of_salt.txt svneol=native#text/plain
|
res/cardsfolder/r/rain_of_salt.txt svneol=native#text/plain
|
||||||
res/cardsfolder/r/rain_of_tears.txt svneol=native#text/plain
|
res/cardsfolder/r/rain_of_tears.txt svneol=native#text/plain
|
||||||
|
|||||||
10
res/cardsfolder/r/rain_of_gore.txt
Normal file
10
res/cardsfolder/r/rain_of_gore.txt
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
Name:Rain of Gore
|
||||||
|
ManaCost:B R
|
||||||
|
Types:Enchantment
|
||||||
|
R:Event$ GainLife | ActiveZones$ Battlefield | ValidSource$ Card | SourceController$ True | ReplaceWith$ RLoseLife | Description$ If a spell or ability would cause its controller to gain life, that player loses that much life instead.
|
||||||
|
SVar:RLoseLife:AB$ LoseLife | Cost$ 0 | LifeAmount$ X | Defined$ ReplacedPlayer | References$ X
|
||||||
|
SVar:X:ReplaceCount$LifeGained
|
||||||
|
SVar:RemRandomDeck:True
|
||||||
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/rain_of_gore.jpg
|
||||||
|
Oracle:If a spell or ability would cause its controller to gain life, that player loses that much life instead.
|
||||||
|
SetInfo:DIS Rare
|
||||||
@@ -206,7 +206,7 @@ public class ChooseTypeEffect extends SpellAbilityEffect {
|
|||||||
for (Card c : lands) {
|
for (Card c : lands) {
|
||||||
for (String t : c.getType()) {
|
for (String t : c.getType()) {
|
||||||
if (!invalidTypes.contains(t)
|
if (!invalidTypes.contains(t)
|
||||||
&& CardType.isALandType(t)) {
|
&& CardType.getLandTypes().contains(t)) {
|
||||||
choice = t;
|
choice = t;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,6 +51,16 @@ public class ReplaceGainLife extends ReplacementEffect {
|
|||||||
return false;
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -73,6 +83,7 @@ public class ReplaceGainLife extends ReplacementEffect {
|
|||||||
@Override
|
@Override
|
||||||
public void setReplacingObjects(Map<String, Object> runParams, SpellAbility sa) {
|
public void setReplacingObjects(Map<String, Object> runParams, SpellAbility sa) {
|
||||||
sa.setReplacingObject("LifeGained", runParams.get("LifeGained"));
|
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("Event", "GainLife");
|
||||||
repParams.put("Affected", this);
|
repParams.put("Affected", this);
|
||||||
repParams.put("LifeGained", toGain);
|
repParams.put("LifeGained", toGain);
|
||||||
|
repParams.put("Source", source);
|
||||||
if (game.getReplacementHandler().run(repParams) != ReplacementResult.NotReplaced) {
|
if (game.getReplacementHandler().run(repParams) != ReplacementResult.NotReplaced) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user