convert Beastmaster Ascension to triggers

This commit is contained in:
jendave
2011-08-06 20:40:19 +00:00
parent ed4776c084
commit bb75f34e7e
2 changed files with 18 additions and 27 deletions

View File

@@ -1,7 +1,9 @@
Name:Beastmaster Ascension Name:Beastmaster Ascension
ManaCost:2 G ManaCost:2 G
Types:Enchantment Types:Enchantment
Text:Whenever a creature you control attacks, you may put a quest counter on Beastmaster Ascension. Text:no text
T:Mode$ Attacks | ValidCard$ Creature.YouCtrl | TriggerZones$ Battlefield | Execute$ TrigPut | OptionalDecider$ You | TriggerDescription$ Whenever a creature you control attacks, you may put a quest counter on CARDNAME.
SVar:TrigPut:AB$PutCounter | Cost$ 0 | Defined$ Self | CounterType$ QUEST | CounterNum$ 1
K:stPumpAll:Creature.YouCtrl:5/5:isValid Permanent.countersGE7QUEST:As long as CARDNAME has seven or more quest counters on it, creatures you control get +5/+5. K:stPumpAll:Creature.YouCtrl:5/5:isValid Permanent.countersGE7QUEST:As long as CARDNAME has seven or more quest counters on it, creatures you control get +5/+5.
SVar:PlayMain1:TRUE SVar:PlayMain1:TRUE
SVar:Rarity:Rare SVar:Rarity:Rare

View File

@@ -546,27 +546,27 @@ public class CombatUtil {
//Returns the damage unblocked attackers would deal //Returns the damage unblocked attackers would deal
private static int sumAttack(CardList attackers, Player attacked) private static int sumAttack(CardList attackers, Player attacked)
{ {
int sum = 0; int sum = 0;
for(int i = 0; i < attackers.size(); i++) { for(int i = 0; i < attackers.size(); i++) {
Card a = attackers.get(i); Card a = attackers.get(i);
if (!a.hasKeyword("Infect")) sum += attacked.predictDamage(getAttack(a), a, true); if (!a.hasKeyword("Infect")) sum += attacked.predictDamage(getAttack(a), a, true);
} }
return sum; return sum;
} }
//Returns the number of poison counters unblocked attackers would deal //Returns the number of poison counters unblocked attackers would deal
private static int sumPoison(CardList attackers, Player attacked) private static int sumPoison(CardList attackers, Player attacked)
{ {
int sum = 0; int sum = 0;
for(int i = 0; i < attackers.size(); i++) { for(int i = 0; i < attackers.size(); i++) {
Card a = attackers.get(i); Card a = attackers.get(i);
int damage = attacked.predictDamage(getAttack(a), a, true); int damage = attacked.predictDamage(getAttack(a), a, true);
if (a.hasKeyword("Infect")) sum += damage; if (a.hasKeyword("Infect")) sum += damage;
if (a.hasKeyword("Poisonous") && damage > 0) sum += a.getKeywordMagnitude("Poisonous"); if (a.hasKeyword("Poisonous") && damage > 0) sum += a.getKeywordMagnitude("Poisonous");
} }
return sum; return sum;
} }
//Checks if the life of the attacked Player/Planeswalker is in danger //Checks if the life of the attacked Player/Planeswalker is in danger
@@ -1240,17 +1240,6 @@ public class CombatUtil {
}//creatureAttacked }//creatureAttacked
//Annihilator //Annihilator
//Beastmaster Ascension
if(!c.getCreatureAttackedThisCombat()) {
PlayerZone play = AllZone.getZone(Constant.Zone.Battlefield, c.getController());
CardList list = new CardList(play.getCards());
list = list.getName("Beastmaster Ascension");
for(Card var:list) {
var.addCounter(Counters.QUEST, 1);
}
} //BMA
/* /*
//Fervent Charge //Fervent Charge
if(!c.getCreatureAttackedThisCombat()) { if(!c.getCreatureAttackedThisCombat()) {