From 43be15e83263cbbd0cdf5464a555a7882578b4d4 Mon Sep 17 00:00:00 2001 From: valfieri Date: Mon, 16 Sep 2019 20:57:51 +0200 Subject: [PATCH] Fixed Loxodon Lifechanter --- projects/mtg/bin/Res/sets/primitives/M20.txt | 9 +++++---- projects/mtg/include/AllAbilities.h | 11 ++++++++++- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/M20.txt b/projects/mtg/bin/Res/sets/primitives/M20.txt index 40fcd692a..93e07b845 100644 --- a/projects/mtg/bin/Res/sets/primitives/M20.txt +++ b/projects/mtg/bin/Res/sets/primitives/M20.txt @@ -421,8 +421,9 @@ toughness=1 [/card] [card] name=Loxodon Lifechanter -auto={5}{W}:thisforeach(controllerlife) 1/1 -text=When Loxodon Lifechanter enters the battlefield, you may have your life total become the total toughness of creatures you control. -- 5{W}: Loxodon Lifechanter gets +X/+X until end of turn, where X is your life total. +auto=may lifeset:toughnesstotalinplay controller +auto={5}{W}:lifetotal/lifetotal ueot +text=When Loxodon Lifechanter enters the battlefield, you may have your life total become the total toughness of creatures you control. -- {5}{W}: Loxodon Lifechanter gets +X/+X until end of turn, where X is your life total. mana={5}{W} type=Creature subtype=Elephant Cleric @@ -973,7 +974,7 @@ toughness=2 [card] name=Bloodthirsty Aerialist abilities=flying -auto=@lifeof(player) except(Angel of Vitality): counter(1/1,1) +auto=@lifeof(player): counter(1/1,1) text=Flying -- Whenever you gain life, put a +1/+1 counter on Bloodthirsty Aerialist. mana={1}{B}{B} type=Creature @@ -1626,7 +1627,7 @@ toughness=2 [/card] [card] name=Twinblade Paladin -auto=@lifeof(player) except(Angel of Vitality): counter(1/1) +auto=@lifeof(player): counter(1/1) auto=this(controllerlife > 24) double strike text=Whenever you gain life, put a +1/+1 counter on Twinblade Paladin. -- As long as you have 25 or more life, Twinblade Paladin has double strike. (It deals both first-strike and regular combat damage.) mana={3}{W} diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index 681f63385..238a98f49 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -998,7 +998,16 @@ private: for (int j = card->controller()->game->inPlay->nb_cards - 1; j >= 0; --j) { if (card->controller()->game->inPlay->cards[j]->hasType(Subtypes::TYPE_CREATURE)) - intValue += card->controller()->game->inPlay->cards[j]->power; + intValue += card->controller()->game->inPlay->cards[j]->getCurrentPower(); + } + } + else if (s == "toughnesstotalinplay")//Count Total toughness of Creatures you control... Formidable + { + intValue = 0; + for (int j = card->controller()->game->inPlay->nb_cards - 1; j >= 0; --j) + { + if (card->controller()->game->inPlay->cards[j]->hasType(Subtypes::TYPE_CREATURE)) + intValue += card->controller()->game->inPlay->cards[j]->getCurrentToughness(); } } else if (s == "mypos")