convert Megrim to triggers

This commit is contained in:
jendave
2011-08-06 19:17:32 +00:00
parent f5fc770120
commit dee7305f6e
3 changed files with 4 additions and 28 deletions

View File

@@ -1,7 +1,9 @@
Name:Megrim Name:Megrim
ManaCost:2 B ManaCost:2 B
Types:Enchantment Types:Enchantment
Text:Whenever an opponent discards a card, Megrim deals 2 damage to that player. Text:no text
T:Mode$ Discarded | ValidCard$ Card.YouDontCtrl | TriggerZones$ Battlefield | Execute$ TrigDealDamage | TriggerDescription$ Whenever an opponent discards a card, CARDNAME deals 2 damage to that player.
SVar:TrigDealDamage:AB$DealDamage | Cost$ 0 | Defined$ Opponent | NumDmg$ 2
SVar:Rarity:Uncommon SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/megrim.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/megrim.jpg
SetInfo:8ED|Uncommon|http://magiccards.info/scans/en/8e/143.jpg SetInfo:8ED|Uncommon|http://magiccards.info/scans/en/8e/143.jpg

View File

@@ -339,30 +339,6 @@ public class GameAction {
c.setCounter(Counters.P1P1, 2, false); c.setCounter(Counters.P1P1, 2, false);
} }
public void discard_megrim(Card c) {
/*
* Whenever an opponent discards a card, Megrim deals 2 damage to that player.
*/
final Player owner = c.getOwner(); //discarded card owner
final Player opponent = owner.getOpponent(); //check this for Megrim
CardList megrims = AllZoneUtil.getPlayerCardsInPlay(opponent, "Megrim");
for(Card megrim:megrims) {
final Card thisMegrim = megrim;
final Ability ability = new Ability(megrim, "0") {
@Override
public void resolve() {
owner.addDamage(2, thisMegrim);
}
};
StringBuilder sb = new StringBuilder();
sb.append(megrim.getName()).append(" - deals 2 damage to ").append(owner);
ability.setStackDescription(sb.toString());
AllZone.Stack.add(ability);
}
}
public void discard_madness(Card c) { public void discard_madness(Card c) {
// Whenever a card with madness is discarded, you may cast it for it's madness cost // Whenever a card with madness is discarded, you may cast it for it's madness cost
if (!c.hasMadness()) if (!c.hasMadness())

View File

@@ -648,8 +648,6 @@ public abstract class Player extends MyObservable{
} }
} }
AllZone.GameAction.discard_megrim(c);
// necro disrupts madness // necro disrupts madness
if(AllZoneUtil.getPlayerCardsInPlay(c.getOwner(), "Necropotence").size() > 0) { if(AllZoneUtil.getPlayerCardsInPlay(c.getOwner(), "Necropotence").size() > 0) {
AllZone.GameAction.exile(c); AllZone.GameAction.exile(c);