- Fixed Temporal Extortion

This commit is contained in:
swordshine
2014-06-02 12:23:59 +00:00
parent 7afd1cea5d
commit c6da06f3b1
2 changed files with 6 additions and 3 deletions

View File

@@ -1246,7 +1246,7 @@ public class AbilityUtils {
final boolean isSwitched = sa.hasParam("UnlessSwitched");
// The cost
final Cost cost;
Cost cost;
String unlessCost = sa.getParam("UnlessCost").trim();
if (unlessCost.equals("CardManaCost")) {
cost = new Cost(source.getManaCost(), true);
@@ -1283,6 +1283,10 @@ public class AbilityUtils {
boolean alreadyPaid = false;
for (Player payer : allPayers) {
if (unlessCost.equals("LifeTotalHalfUp")) {
String halfup = Integer.toString((int) Math.ceil(payer.getLife() / 2.0));
cost = new Cost("PayLife<" + halfup + ">", true);
}
alreadyPaid |= payer.getController().payCostToPreventEffect(cost, sa, alreadyPaid, allPayers);
}

View File

@@ -2,8 +2,7 @@ Name:Temporal Extortion
ManaCost:B B B B
Types:Sorcery
T:Mode$ SpellCast | ValidCard$ Card.Self | Execute$ TrigCounter | TriggerDescription$ When you play CARDNAME, any player may pay half his or her life, rounded up. If a player does, counter CARDNAME.
SVar:TrigCounter:DB$ Counter | Cost$ 0 | UnlessCost$ PayLife<X> | Defined$ TriggeredSpellAbility | UnlessPayer$ Player | UnlessSwitched$ True | UnlessAI$ Never
SVar:X:Count$YourLifeTotal/HalfUp
SVar:TrigCounter:DB$ Counter | Cost$ 0 | UnlessCost$ LifeTotalHalfUp | Defined$ TriggeredSpellAbility | UnlessPayer$ Player | UnlessSwitched$ True | UnlessAI$ Never
A:SP$ AddTurn | Cost$ B B B B | NumTurns$ 1 | SpellDescription$ Take an extra turn after this one.
SVar:Picture:http://www.wizards.com/global/images/magic/general/temporal_extortion.jpg
Oracle:When you cast Temporal Extortion, any player may pay half his or her life, rounded up. If a player does, counter Temporal Extortion.\nTake an extra turn after this one.