From a4c2fa37976f1f5b04ea63225996df325a7a426c Mon Sep 17 00:00:00 2001 From: swordshine Date: Wed, 8 Jan 2014 12:26:14 +0000 Subject: [PATCH] - Converted Psychic Transfer for multiplayer --- forge-gui/res/cardsfolder/a/arbiter_of_knollridge.txt | 2 +- forge-gui/res/cardsfolder/l/liu_bei_lord_of_shu.txt | 1 + forge-gui/res/cardsfolder/p/psychic_transfer.txt | 7 ++++--- .../src/main/java/forge/game/card/CardFactoryUtil.java | 8 ++------ 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/forge-gui/res/cardsfolder/a/arbiter_of_knollridge.txt b/forge-gui/res/cardsfolder/a/arbiter_of_knollridge.txt index e4304b52872..365ac78df83 100644 --- a/forge-gui/res/cardsfolder/a/arbiter_of_knollridge.txt +++ b/forge-gui/res/cardsfolder/a/arbiter_of_knollridge.txt @@ -5,6 +5,6 @@ PT:5/5 K:Vigilance T:Mode$ ChangesZone | ValidCard$ Card.Self | Origin$ Any | Destination$ Battlefield | Execute$ TrigLife | TriggerDescription$ When CARDNAME enters the battlefield, each player's life total becomes the highest life total among all players. SVar:TrigLife:AB$SetLife | Cost$ 0 | Defined$ Each | LifeAmount$ X | References$ X -SVar:X:Count$HighestLifeTotal +SVar:X:PlayerCountPlayers$HighestLifeTotal SVar:Picture:http://www.wizards.com/global/images/magic/general/arbiter_of_knollridge.jpg Oracle:Vigilance\nWhen Arbiter of Knollridge enters the battlefield, each player's life total becomes the highest life total among all players. \ No newline at end of file diff --git a/forge-gui/res/cardsfolder/l/liu_bei_lord_of_shu.txt b/forge-gui/res/cardsfolder/l/liu_bei_lord_of_shu.txt index b9ceba52ac0..e023eceb525 100644 --- a/forge-gui/res/cardsfolder/l/liu_bei_lord_of_shu.txt +++ b/forge-gui/res/cardsfolder/l/liu_bei_lord_of_shu.txt @@ -7,5 +7,6 @@ K:Horsemanship SVar:X:Count$NamedYouCtrl.Guan Yu, Sainted Warrior SVar:Y:Count$NamedYouCtrl.Zhang Fei, Fierce Warrior SVar:Z:SVar$X/Plus.Y +DeckHints:Name$Guan Yu, Sainted Warrior|Zhang Fei, Fierce Warrior SVar:Picture:http://www.wizards.com/global/images/magic/general/liu_bei_lord_of_shu.jpg Oracle:Horsemanship (This creature can't be blocked except by creatures with horsemanship.)\nLiu Bei, Lord of Shu gets +2/+2 as long as you control a permanent named Guan Yu, Sainted Warrior or a permanent named Zhang Fei, Fierce Warrior. \ No newline at end of file diff --git a/forge-gui/res/cardsfolder/p/psychic_transfer.txt b/forge-gui/res/cardsfolder/p/psychic_transfer.txt index d9195aca050..0679bddb902 100644 --- a/forge-gui/res/cardsfolder/p/psychic_transfer.txt +++ b/forge-gui/res/cardsfolder/p/psychic_transfer.txt @@ -1,9 +1,10 @@ Name:Psychic Transfer ManaCost:4 U Types:Sorcery -A:SP$ ExchangeLife | Cost$ 4 U | ValidTgts$ Player | ConditionCheckSVar$ Y | ConditionSVarCompare$ LE5 | References$ Y,Z | SpellDescription$ If the difference between your life total and target player's life total is 5 or less, exchange life totals with that player. -SVar:Y:Count$HighestLifeTotal/Minus.Z -SVar:Z:Count$LowestLifeTotal +A:SP$ ExchangeLife | Cost$ 4 U | ValidTgts$ Player | ConditionCheckSVar$ X | ConditionSVarCompare$ LE5 | References$ X,Y,Z | SpellDescription$ If the difference between your life total and target player's life total is 5 or less, exchange life totals with that player. +SVar:X:SVar$Y/Abs +SVar:Y:Count$YourLifeTotal/Minus.Z +SVar:Z:Count$TargetedLifeTotal SVar:RemAIDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/psychic_transfer.jpg Oracle:If the difference between your life total and target player's life total is 5 or less, exchange life totals with that player. \ No newline at end of file diff --git a/forge-gui/src/main/java/forge/game/card/CardFactoryUtil.java b/forge-gui/src/main/java/forge/game/card/CardFactoryUtil.java index a00c06bdbb7..dbff2889172 100644 --- a/forge-gui/src/main/java/forge/game/card/CardFactoryUtil.java +++ b/forge-gui/src/main/java/forge/game/card/CardFactoryUtil.java @@ -1158,12 +1158,6 @@ public class CardFactoryUtil { if (sq[0].contains("YourLandsPlayed")) return doXMath(cc.getNumLandsPlayed(), m, c); if (sq[0].contains("OppLandsPlayed")) return doXMath(ccOpp.getNumLandsPlayed(), m, c); - - // Count$HighestLifeTotal - if (sq[0].contains("HighestLifeTotal")) { - return doXMath(Aggregates.max(cc.getGame().getPlayers(), Player.Accessors.FN_GET_LIFE), m, c); - } - // Count$LowestLifeTotal if (sq[0].contains("LowestLifeTotal")) { final String[] playerType = sq[0].split(" "); @@ -1674,6 +1668,8 @@ public class CardFactoryUtil { } } else if (s[0].contains("Mod")) { return num % secondaryNum; + } else if (s[0].contains("Abs")) { + return Math.abs(num); } else if (s[0].contains("LimitMax")) { if (num < secondaryNum) { return num;