1) fix Crumble to be destroyNoRegeneration

2) add Divine Offering via the same code block
This commit is contained in:
jendave
2011-08-06 04:20:36 +00:00
parent a6833e0a03
commit 87d56c6767
3 changed files with 62 additions and 42 deletions

View File

@@ -38,6 +38,7 @@ snow_covered_mountain.jpg http://www.wizards.com/global/images/magic/gene
snow_covered_mountain1.jpg http://www.wizards.com/global/images/magic/general/snow_covered_mountain.jpg snow_covered_mountain1.jpg http://www.wizards.com/global/images/magic/general/snow_covered_mountain.jpg
snow_covered_mountain2.jpg http://www.magickartenmarkt.de/img/cards/Ice_Age/snow_covered_mountain.jpg snow_covered_mountain2.jpg http://www.magickartenmarkt.de/img/cards/Ice_Age/snow_covered_mountain.jpg
snow_covered_mountain3.jpg http://www.magickartenmarkt.de/img/cards/Ice_Age/snow_covered_mountain.jpg snow_covered_mountain3.jpg http://www.magickartenmarkt.de/img/cards/Ice_Age/snow_covered_mountain.jpg
divine_offering.jpg http://www.wizards.com/global/images/magic/general/divine_offering.jpg
argothian_pixies.jpg http://www.wizards.com/global/images/magic/general/argothian_pixies.jpg argothian_pixies.jpg http://www.wizards.com/global/images/magic/general/argothian_pixies.jpg
arc_slogger.jpg http://www.wizards.com/global/images/magic/general/arc_slogger.jpg arc_slogger.jpg http://www.wizards.com/global/images/magic/general/arc_slogger.jpg
fireball.jpg http://www.wizards.com/global/images/magic/general/fireball.jpg fireball.jpg http://www.wizards.com/global/images/magic/general/fireball.jpg

View File

@@ -1,3 +1,8 @@
Divine Offering
1 W
Instant
Destroy target artifact. You gain life equal to its converted mana cost.
Argothian Pixies Argothian Pixies
1 G 1 G
Creature Faerie Creature Faerie

View File

@@ -17405,21 +17405,36 @@ public class CardFactory implements NewConstants {
}//*************** END ************ END ************************** }//*************** END ************ END **************************
//*************** START *********** START ************************** //*************** START *********** START **************************
else if(cardName.equals("Crumble")) { else if(cardName.equals("Crumble") || cardName.equals("Divine Offering")) {
/*
* Destroy target artifact. It can't be regenerated. That artifact's controller
* gains life equal to its converted mana cost.
*/
SpellAbility spell = new Spell(card) { SpellAbility spell = new Spell(card) {
private static final long serialVersionUID = 4752943254606319269L; private static final long serialVersionUID = 4752943254606319269L;
@Override @Override
public void resolve() { public void resolve() {
if(AllZone.GameAction.isCardInPlay(getTargetCard()) Card target = getTargetCard();
&& CardFactoryUtil.canTarget(card, getTargetCard())) { if(AllZone.GameAction.isCardInPlay(target)
&& CardFactoryUtil.canTarget(card, target)) {
//add life //add life
String player = getTargetCard().getController(); String player;
if(cardName.equals("Crumble")) {
player = target.getController();
}
else {
player = card.getController();
}
PlayerLife life = AllZone.GameAction.getPlayerLife(player); PlayerLife life = AllZone.GameAction.getPlayerLife(player);
life.addLife(CardUtil.getConvertedManaCost(getTargetCard())); life.addLife(CardUtil.getConvertedManaCost(target));
//remove card from play if(cardName.equals("Crumble")) {
AllZone.GameAction.removeFromGame(getTargetCard()); AllZone.GameAction.destroyNoRegeneration(target);
}
else { //Divine Offering
AllZone.GameAction.destroy(target);
}
} }
}//resolve() }//resolve()
@@ -17443,7 +17458,6 @@ public class CardFactory implements NewConstants {
} }
}; };
spell.setBeforePayMana(CardFactoryUtil.input_targetType(spell, "Artifact")); spell.setBeforePayMana(CardFactoryUtil.input_targetType(spell, "Artifact"));
card.clearSpellAbility(); card.clearSpellAbility();
card.addSpellAbility(spell); card.addSpellAbility(spell);
}//*************** END ************ END ************************** }//*************** END ************ END **************************