-Bug fix: Selesnya Guildmage ability ueot
This commit is contained in:
wagic.the.homebrew@gmail.com
2009-09-06 04:55:05 +00:00
parent 4e7db4423d
commit 1d4b8ef177
4 changed files with 44 additions and 4 deletions

View File

@@ -161,6 +161,7 @@ royal_assassin.txt
safehold_duo.txt
sedge_sliver.txt
seismic_assault.txt
selesnya_guildmage.txt
siege_gang_commander.txt
shepherd_of_rot.txt
shivan_hellkite.txt

View File

@@ -0,0 +1,38 @@
#Bug: Selesnya guildmage's ability doesn't wear off at the end of turn
# {3}{W}: creatures you control gain +1/+1 until end of turn
[INIT]
FIRSTMAIN
[PLAYER1]
inplay:selesnya guildmage,grizzly bears
manapool:{3}{W}
[PLAYER2]
inplay:mountain
hand:shock
[DO]
selesnya guildmage
next
#combat begins
next
#attackers
grizzly bears
eot
#untap
next
#upkeep
next
#draw
next
#main
mountain
shock
grizzly bears
[ASSERT]
FIRSTMAIN
[PLAYER1]
inplay:selesnya guildmage
graveyard:grizzly bears
[PLAYER2]
inplay:mountain
graveyard:shock
life:17
[END]

View File

@@ -202,7 +202,7 @@ class AbilityFactory{
int countCards(TargetChooser * tc, Player * player = NULL, int option = 0);
int parsePowerToughness(string s, int *power, int *toughness);
TriggeredAbility * parseTrigger(string s, int id, Spell * spell, MTGCardInstance *card, Targetable * target);
MTGAbility * parseMagicLine(string s, int id, Spell * spell, MTGCardInstance *card, int activated = 0);
MTGAbility * parseMagicLine(string s, int id, Spell * spell, MTGCardInstance *card, int activated = 0, int forceUEOT = 0);
public:
int abilityEfficiency(MTGAbility * a, Player * p, int mode = MODE_ABILITY);
int magicText(int id, Spell * spell, MTGCardInstance * card = NULL);

View File

@@ -131,7 +131,7 @@ TriggeredAbility * AbilityFactory::parseTrigger(string magicText, int id, Spell
//Parses a string and returns the corresponding MTGAbility object
// Returns NULL if parsing failed
MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTGCardInstance *card, int activated){
MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTGCardInstance *card, int activated, int forceUEOT){
size_t found;
string whitespaces (" \t\f\v\n\r");
@@ -259,13 +259,14 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
TargetChooser * lordTargets = tcf.createTargetChooser(lordTargetsString, card);
MTGAbility * a = parseMagicLine(s1,id,spell, card);
MTGAbility * a = parseMagicLine(s1,id,spell, card,0,activated); //activated lords usually force an end of turn ability
if (!a){
SAFE_DELETE(lordTargets);
return NULL;
}
MTGAbility * result = NULL;
int oneShot = 0;
if (activated) oneShot = 1;
if (card->hasType("sorcery") || card->hasType("instant")) oneShot = 1;
if (i == 3) oneShot = 1;
if (a->oneShot) oneShot = 1;
@@ -545,7 +546,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
return NULL;
}
int forceUEOT = 0;
found = s.find("ueot");
if (found!= string::npos) forceUEOT = 1;