mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
convert Megrim to triggers
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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())
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user