- Added Grave Scrabbler

This commit is contained in:
swordshine
2014-06-08 13:28:53 +00:00
parent 0dfa4c1ab2
commit f38e8e546f
7 changed files with 29 additions and 14 deletions

1
.gitattributes vendored
View File

@@ -6186,6 +6186,7 @@ forge-gui/res/cardsfolder/g/grave_exchange.txt -text
forge-gui/res/cardsfolder/g/grave_pact.txt svneol=native#text/plain
forge-gui/res/cardsfolder/g/grave_peril.txt svneol=native#text/plain
forge-gui/res/cardsfolder/g/grave_robbers.txt svneol=native#text/plain
forge-gui/res/cardsfolder/g/grave_scrabbler.txt -text
forge-gui/res/cardsfolder/g/grave_servitude.txt -text
forge-gui/res/cardsfolder/g/grave_shell_scarab.txt svneol=native#text/plain
forge-gui/res/cardsfolder/g/grave_titan.txt svneol=native#text/plain

View File

@@ -212,7 +212,7 @@ public class PlayEffect extends SpellAbilityEffect {
} else if (sa.hasParam("PlayMadness")) {
Cost abCost = new Cost(sa.getParam("PlayMadness"), false);
tgtSA = tgtSA.copyWithDefinedCost(abCost);
tgtSA.setMadness(true);
tgtSA.getHostCard().setMadness(true);
}
if (tgtSA.usesTargeting() && !optional) {

View File

@@ -156,6 +156,7 @@ public class Card extends GameEntity implements Comparable<Card> {
private boolean suspendCast = false;
private boolean suspend = false;
private boolean tributed = false;
private boolean madness = false;
private boolean phasedOut = false;
private boolean directlyPhasedOut = true;
@@ -5796,6 +5797,10 @@ public class Card extends GameEntity implements Comparable<Card> {
if (this.tributed) {
return false;
}
} else if (property.startsWith("madness")) {
if (!this.madness) {
return false;
}
} else if (property.contains("Paired")) {
if (property.contains("With")) { // PairedWith
if (!this.isPaired() || this.pairedWith != source) {
@@ -7903,6 +7908,15 @@ public class Card extends GameEntity implements Comparable<Card> {
this.tributed = b;
}
// Madness
public boolean isMadness() {
return madness;
}
public void setMadness(boolean madness) {
this.madness = madness;
}
/**
* <p>
* Setter for the field <code>monstrous</code>.

View File

@@ -114,7 +114,6 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
private List<Card> tappedForConvoke = new ArrayList<Card>();
private Card sacrificedAsOffering = null;
private int conspireInstances = 0;
private boolean madness = false;
private HashMap<String, String> sVars = new HashMap<String, String>();
@@ -1721,15 +1720,6 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
return this.conspireInstances;
} // End of Conspire methods
// Madness
public boolean isMadness() {
return madness;
}
public void setMadness(boolean madness) {
this.madness = madness;
}
public boolean isCumulativeupkeep() {
return cumulativeupkeep;
}

View File

@@ -0,0 +1,9 @@
Name:Grave Scrabbler
ManaCost:3 B
Types:Creature Zombie
PT:2/2
K:Madness:1 B
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self+madness | Execute$ TrigReturn | OptionalDecider$ You | TriggerDescription$ When CARDNAME enters the battlefield, if its madness cost was paid, you may return target creature card from a graveyard to its owner's hand.
SVar:TrigReturn:AB$ ChangeZone | Cost$ 0 | ValidTgts$ Creature | Origin$ Graveyard | Destination$ Hand
SVar:Picture:http://www.wizards.com/global/images/magic/general/grave_scrabbler.jpg
Oracle:Madness {1}{B} (If you discard this card, you may cast it for its madness cost instead of putting it into your graveyard.)\nWhen Grave Scrabbler enters the battlefield, if its madness cost was paid, you may return target creature card from a graveyard to its owner's hand.

View File

@@ -6,3 +6,4 @@ SVar:DBRepeat:DB$ RepeatEach | RepeatSubAbility$ DBGainControl | RecordChoice$ T
SVar:DBGainControl:DB$ GainControl | NewController$ Remembered | AllValid$ Card.IsImprinted
SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/order_of_succession.jpg
Oracle:Choose left or right. Starting with you and proceeding in the chosen direction, each player chooses a creature controlled by the next player in that direction. Each player gains control of the creature he or she chose.

View File

@@ -97,10 +97,10 @@ public class HumanPlaySpellAbility {
if (!prerequisitesMet) {
if (!ability.isTrigger()) {
rollbackAbility(fromZone, zonePosition);
if (ability.isMadness()) {
if (ability.getHostCard().isMadness()) {
// if a player failed to play madness cost, move the card to graveyard
game.getAction().moveToGraveyard(c);
ability.setMadness(false);
ability.getHostCard().setMadness(false);
} else if (ability.getHostCard().isBestowed()) {
ability.getHostCard().unanimateBestow();
}