mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
convert Mirri the Cursed to triggers
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
Name:Mirri the Cursed
|
||||
ManaCost:2 B B
|
||||
Types:Legendary Creature Vampire Cat
|
||||
Text:Whenever Mirri the Cursed deals combat damage to a creature, put a +1/+1 counter on Mirri the Cursed.
|
||||
Text:no text
|
||||
PT:3/2
|
||||
K:First Strike
|
||||
K:Flying
|
||||
K:Haste
|
||||
T:Mode$ DamageDone | ValidSource$ Card.Self | ValidTarget$ Creature | CombatDamage$ True | TriggerZones$ Battlefield | Execute$ TrigPutCounter | TriggerDescription$ Whenever CARDNAME deals combat damage to a creature, put a +1/+1 counter on CARDNAME.
|
||||
SVar:TrigPutCounter:AB$PutCounter | Cost$ 0 | Defined$ Self | CounterType$ P1P1 | CounterNum$ 1
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/mirri_the_cursed.jpg
|
||||
SetInfo:PLC|Rare|http://magiccards.info/scans/en/pc/75.jpg
|
||||
|
||||
@@ -1,37 +1,36 @@
|
||||
package forge;
|
||||
//import java.util.*;
|
||||
|
||||
//handles "until end of combat" and "at end of combat" commands from cards
|
||||
public class EndOfCombat implements java.io.Serializable
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = 3035250030566186842L;
|
||||
private static final long serialVersionUID = 3035250030566186842L;
|
||||
|
||||
private CommandList at = new CommandList();
|
||||
private CommandList until = new CommandList();
|
||||
private CommandList at = new CommandList();
|
||||
private CommandList until = new CommandList();
|
||||
|
||||
public void addAt(Command c) {at.add(c);}
|
||||
public void addUntil(Command c) {until.add(c);}
|
||||
public void addAt(Command c) {at.add(c);}
|
||||
public void addUntil(Command c) {until.add(c);}
|
||||
|
||||
public void executeAt()
|
||||
{
|
||||
//AllZone.StateBasedEffects.rePopulateStateBasedList();
|
||||
execute(at);
|
||||
}//executeAt()
|
||||
public void executeAt()
|
||||
{
|
||||
//AllZone.StateBasedEffects.rePopulateStateBasedList();
|
||||
execute(at);
|
||||
}//executeAt()
|
||||
|
||||
|
||||
public void executeUntil() {
|
||||
execute(until);
|
||||
}
|
||||
public void executeUntil() {
|
||||
execute(until);
|
||||
}
|
||||
|
||||
public int sizeAt() {return at.size();}
|
||||
public int sizeUntil() {return until.size();}
|
||||
public int sizeAt() {return at.size();}
|
||||
public int sizeUntil() {return until.size();}
|
||||
|
||||
private void execute(CommandList c)
|
||||
{
|
||||
int length = c.size();
|
||||
private void execute(CommandList c)
|
||||
{
|
||||
int length = c.size();
|
||||
|
||||
for(int i = 0; i < length; i++)
|
||||
c.remove(0).execute();
|
||||
}
|
||||
for(int i = 0; i < length; i++)
|
||||
c.remove(0).execute();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1911,11 +1911,7 @@ public class GameActionUtil {
|
||||
public static void removeAttackedBlockedThisTurn() {
|
||||
// resets the status of attacked/blocked this turn
|
||||
Player player = AllZone.Phase.getPlayerTurn();
|
||||
PlayerZone play = AllZone.getZone(Constant.Zone.Battlefield, player);
|
||||
|
||||
CardList list = new CardList();
|
||||
list.addAll(play.getCards());
|
||||
list = list.getType("Creature");
|
||||
CardList list = AllZoneUtil.getCreaturesInPlay(player);
|
||||
|
||||
for(int i = 0; i < list.size(); i++) {
|
||||
Card c = list.get(i);
|
||||
@@ -1972,8 +1968,6 @@ public class GameActionUtil {
|
||||
|
||||
public static void executeLandfallEffects(Card c) {
|
||||
if(c.getName().equals("Lotus Cobra")) landfall_Lotus_Cobra(c);
|
||||
|
||||
|
||||
}
|
||||
|
||||
private static boolean checkValakutCondition(Card valakutCard, Card mtn) {
|
||||
@@ -2144,25 +2138,8 @@ public class GameActionUtil {
|
||||
public static void executeCombatDamageToCreatureEffects(final Card source, final Card affected, int damage) {
|
||||
|
||||
if (damage <= 0) return;
|
||||
|
||||
if(source.getName().equals("Mirri the Cursed") ) {
|
||||
final Card thisCard = source;
|
||||
Ability ability2 = new Ability(thisCard, "0") {
|
||||
@Override
|
||||
public void resolve() {
|
||||
thisCard.addCounter(Counters.P1P1, 1);
|
||||
}
|
||||
}; // ability2
|
||||
|
||||
StringBuilder sb2 = new StringBuilder();
|
||||
sb2.append(thisCard.getName()).append(" - gets a +1/+1 counter");
|
||||
ability2.setStackDescription(sb2.toString());
|
||||
|
||||
AllZone.Stack.addSimultaneousStackEntry(ability2);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//placeholder for any future needs (everything that was here is converted to script)
|
||||
}
|
||||
|
||||
//not restricted to combat damage, restricted to dealing damage to creatures
|
||||
|
||||
Reference in New Issue
Block a user