added TriggedPlayer to calculateAmount method. added Havoc Festival

This commit is contained in:
ArsenalNut
2012-09-30 16:00:59 +00:00
parent 2e0c868bee
commit 2db05868db
3 changed files with 23 additions and 0 deletions

1
.gitattributes vendored
View File

@@ -4377,6 +4377,7 @@ res/cardsfolder/h/havenwood_battleground.txt svneol=native#text/plain
res/cardsfolder/h/havenwood_wurm.txt svneol=native#text/plain res/cardsfolder/h/havenwood_wurm.txt svneol=native#text/plain
res/cardsfolder/h/havoc.txt svneol=native#text/plain res/cardsfolder/h/havoc.txt svneol=native#text/plain
res/cardsfolder/h/havoc_demon.txt svneol=native#text/plain res/cardsfolder/h/havoc_demon.txt svneol=native#text/plain
res/cardsfolder/h/havoc_festival.txt -text
res/cardsfolder/h/hawkeater_moth.txt svneol=native#text/plain res/cardsfolder/h/hawkeater_moth.txt svneol=native#text/plain
res/cardsfolder/h/haze_of_rage.txt svneol=native#text/plain res/cardsfolder/h/haze_of_rage.txt svneol=native#text/plain
res/cardsfolder/h/hazerider_drake.txt svneol=native#text/plain res/cardsfolder/h/hazerider_drake.txt svneol=native#text/plain

View File

@@ -0,0 +1,13 @@
Name:Havoc Festival
ManaCost:4 B R
Types:Enchantment
Text:no text
S:Mode$ Continuous | Affected$ Player | AddKeyword$ You can't gain life. | Description$ Players can't gain life.
T:Mode$ Phase | Phase$ Upkeep | ValidPlayer$ Player | TriggerZones$ Battlefield | Execute$ TrigLoseLife | TriggerDescription$ At the beginning of each player's upkeep, that player loses half his or her life, rounded up.
SVar:TrigLoseLife:AB$ LoseLife | Cost$ 0 | Defined$ TriggeredPlayer | LifeAmount$ HavocX
SVar:HavocX:TriggeredPlayer$LifeTotal/HalfUp
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/havoc_festival.jpg
SetInfo:RTR|Rare|http://magiccards.info/scans/en/rtr/166.jpg
Oracle:Players can't gain life.\nAt the beginning of each player's upkeep, that player loses half his or her life, rounded up.
End

View File

@@ -1703,6 +1703,15 @@ public class AbilityFactory {
} }
return CardFactoryUtil.playerXCount(players, calcX[1], card) * multiplier; return CardFactoryUtil.playerXCount(players, calcX[1], card) * multiplier;
} }
if (calcX[0].startsWith("TriggeredPlayer")) {
final SpellAbility root = ability.getRootSpellAbility();
Object o = root.getTriggeringObject("Player");
final ArrayList<Player> players = new ArrayList<Player>();
if (o instanceof Player) {
players.add((Player) o);
}
return CardFactoryUtil.playerXCount(players, calcX[1], card) * multiplier;
}
CardList list = new CardList(); CardList list = new CardList();
if (calcX[0].startsWith("Sacrificed")) { if (calcX[0].startsWith("Sacrificed")) {