- Converted Crumbling Sanctuary to script

This commit is contained in:
swordshine
2013-07-31 11:01:35 +00:00
parent 235abb58f4
commit 732bc9be73
2 changed files with 3 additions and 13 deletions

View File

@@ -1,7 +1,9 @@
Name:Crumbling Sanctuary
ManaCost:5
Types:Artifact
Text:For each 1 damage that would be dealt to a player, that player exiles the top card of his or her library instead.
R:Event$ DamageDone | ActiveZones$ Battlefield | ValidTarget$ Player | ReplaceWith$ ExileTop | PreventionEffect$ True | Description$ If damage would be dealt to a player, that player exiles that many cards from the top of his or her library instead.
SVar:ExileTop:AB$ Mill | Cost$ 0 | Defined$ ReplacedTarget | NumCards$ X | Destination$ Exile | References$ X
SVar:X:ReplaceCount$DamageAmount
SVar:NonStackingEffect:True
SVar:RemRandomDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/crumbling_sanctuary.jpg

View File

@@ -832,18 +832,6 @@ public class Player extends GameEntity implements Comparable<Player> {
return 0;
}
if (game.isCardInPlay("Crumbling Sanctuary")) {
for (int i = 0; i < damage; i++) {
final List<Card> lib = this.getCardsIn(ZoneType.Library);
if (lib.size() > 0) {
game.getAction().exile(lib.get(0));
}
}
// return so things like Lifelink, etc do not trigger. This is a
// replacement effect I think.
return 0;
}
return damage;
}