- fixed a bug with "/" keyword in _cards.dat parser
- added @next [phasename] keyword in parser
- new tests for recent changes
This commit is contained in:
wagic.the.homebrew
2008-11-14 15:03:27 +00:00
parent 3d22a25100
commit 28393e8f8a
5 changed files with 58 additions and 9 deletions

View File

@@ -1151,7 +1151,7 @@ text=Flare deals 1 damage to target creature or player. Draw a card at the begin
id=2621
target=creature,player
auto=damage:1
auto=draw:1
auto=@next upkeep:draw:1
name=Flare
rarity=C
type=Instant
@@ -1162,7 +1162,7 @@ text=Target creature gains banding until end of turn. Draw a card at the beginni
id=2685
target=creature
auto=:banding
auto=draw:1
auto=@next upkeep:draw:1
name=Formation
rarity=R
type=Instant
@@ -1172,7 +1172,7 @@ mana={1}{W}
text=Target creature gains first strike until end of turn. Draw a card at the beginning of the next turn's upkeep.
id=2702
auto=:first strike
auto=draw:1
auto=@next upkeep:draw:1
name=Lightning Blow
rarity=R
type=Instant
@@ -1182,7 +1182,7 @@ mana={1}{W}
text=Target creature gains flying until end of turn. Draw a card at the beginning of the next turn's upkeep.
id=2541
auto=:flying
auto=draw:1
auto=@next upkeep:draw:1
name=Updraft
rarity=U
type=Instant

View File

@@ -23,6 +23,7 @@ counsel_of_the_soratami.txt
counterspell.txt
counterspell2.txt
drain_life.txt
flare.txt
force_of_nature.txt
force_of_nature2.txt
force_of_nature3.txt
@@ -30,6 +31,7 @@ ghost_warden.txt
giant_growth.txt
goblin_balloon_brigade.txt
goblin_balloon_brigade2.txt
goblin_king.txt
keldon_warlord.txt
kudzu.txt
kudzu2.txt

View File

@@ -0,0 +1,29 @@
#Testing flare effects. does it kill a 2/1 goblin piker ? Does player draw a card at next upkeep ?
[INIT]
FIRSTMAIN
[PLAYER1]
hand:2621
library:2772,2773
manapool:{2}{R}
[PLAYER2]
inplay:129580
[DO]
2621
129580
eot
#untap
next
#upkeep
next
#draw
next
#firstmain
[ASSERT]
FIRSTMAIN
[PLAYER1]
graveyard:2621
hand:2773
library:2772
[PLAYER2]
graveyard:129580
[END]

View File

@@ -0,0 +1,21 @@
#does goblin king (10E) give +1/+1 to goblins ? (Goblin piker 2/1 VS canopy spider 1/3)
[INIT]
COMBATATTACKERS
[PLAYER1]
inplay:129578,129580
[PLAYER2]
inplay:135185
[DO]
129580
next
135185
next
next
135185
[ASSERT]
COMBATEND
[PLAYER1]
inplay:129578,129580
[PLAYER2]
graveyard:135185
[END]

View File

@@ -318,7 +318,7 @@ int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card){
found = s.find("/");
if (found != string::npos){
unsigned int start = s.find(":");
if (start == string::npos) start = -1;
if (start == string::npos) start = found-2;
int power = atoi(s.substr(start+1,size-found).c_str());
unsigned int end = s.find(" ",start);
int toughness;
@@ -1654,9 +1654,6 @@ void TriggeredAbility::Update(float dt){
}
}
if (doDelete || !canBeInList(card)){
#if defined (WIN32) || defined (LINUX)
OutputDebugString("DELETE FRO LISTMAINTAINER\n");
#endif
cards.erase(card);
removed(card);
}
@@ -1709,7 +1706,7 @@ OutputDebugString("DELETE FRO LISTMAINTAINER\n");
TriggerAtPhase::TriggerAtPhase(int _phaseId):Trigger(),phaseId(_phaseId){
currentPhase = game->getCurrentGamePhase();
newPhase = -1;
newPhase = game->getCurrentGamePhase();
}
int TriggerAtPhase::trigger(){