- barbed sliver, sedge sliver, basal sliver bug fix
This commit is contained in:
wagic.the.homebrew@gmail.com
2009-07-28 13:33:30 +00:00
parent 22c7f02fe9
commit b775eec20f
8 changed files with 128 additions and 48 deletions
+1 -1
View File
@@ -557,7 +557,7 @@ subtype=Sliver
power=2 power=2
toughness=2 toughness=2
text=All Sliver creatures have "This creature gets +1/+1 as long as you control a Swamp." All Slivers have "{B}: Regenerate this permanent." text=All Sliver creatures have "This creature gets +1/+1 as long as you control a Swamp." All Slivers have "{B}: Regenerate this permanent."
auto=lord(sliver) aslongas(swamp|myinplay) 1/1 auto=aslongas(swamp|myinplay) lord(sliver) 1/1
auto=lord(sliver) {B}:regenerate auto=lord(sliver) {B}:regenerate
rarity=R rarity=R
[/card] [/card]
+3
View File
@@ -39,6 +39,8 @@ ascendant_evincar2.txt
ascendant_evincar3.txt ascendant_evincar3.txt
ashen_firebeast.txt ashen_firebeast.txt
ashen_firebeast2.txt ashen_firebeast2.txt
barbed_sliver.txt
basal_sliver.txt
beacon_of_unrest.txt beacon_of_unrest.txt
#befoul.txt #befoul.txt
blessed_wine.txt blessed_wine.txt
@@ -141,6 +143,7 @@ resurrection.txt
righteous_cause.txt righteous_cause.txt
rootwalla.txt rootwalla.txt
royal_assassin.txt royal_assassin.txt
sedge_sliver.txt
seismic_assault.txt seismic_assault.txt
siege_gang_commander.txt siege_gang_commander.txt
shivan_hellkite.txt shivan_hellkite.txt
@@ -0,0 +1,27 @@
#Bug:barbed sliver's ability gives +1/+0 to itself
[INIT]
FIRSTMAIN
[PLAYER1]
inplay:barbed sliver,metallic sliver
manapool:{2}
[PLAYER2]
[DO]
metallic sliver
next
#begin
next
#attackers
metallic sliver
next
#blockers
next
#damage
next
#end
[ASSERT]
COMBATEND
[PLAYER1]
inplay:barbed sliver,metallic sliver
[PLAYER2]
life:18
[END]
@@ -0,0 +1,16 @@
#Bug:basal sliver's ability doesn't give mana
[INIT]
FIRSTMAIN
[PLAYER1]
inplay:basal sliver,metallic sliver
[PLAYER2]
[DO]
metallic sliver
[ASSERT]
FIRSTMAIN
[PLAYER1]
inplay:basal sliver
graveyard:metallic sliver
manapool:{B}{B}
[PLAYER2]
[END]
@@ -0,0 +1,21 @@
#Bug:sedge sliver's ability gives +1/+1 to itself
[INIT]
COMBATATTACKERS
[PLAYER1]
inplay:sedge sliver,metallic sliver,swamp
[PLAYER2]
[DO]
metallic sliver
next
#blockers
next
#damage
next
#end
[ASSERT]
COMBATEND
[PLAYER1]
inplay:sedge sliver,metallic sliver,swamp
[PLAYER2]
life:18
[END]
+1
View File
@@ -240,6 +240,7 @@ class GenericActivatedAbility:public ActivatedAbility{
int resolve(){ int resolve(){
counters++; counters++;
ability->target = target; //may have been updated...
if (ability) return ability->resolve(); if (ability) return ability->resolve();
return 0; return 0;
} }
+1
View File
@@ -236,6 +236,7 @@ class AManaProducer: public MTGAbility{
void Render(); void Render();
int isReactingToClick(MTGCardInstance * _card, ManaCost * mana = NULL); int isReactingToClick(MTGCardInstance * _card, ManaCost * mana = NULL);
int resolve(); int resolve();
int destroy();
int reactToClick(MTGCardInstance * _card); int reactToClick(MTGCardInstance * _card);
const char * getMenuText(); const char * getMenuText();
int testDestroy(); int testDestroy();
+17 -6
View File
@@ -244,8 +244,15 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
//Lord, foreach, aslongas //Lord, foreach, aslongas
string lords[] = {"lord(","foreach(", "aslongas(", "all("}; string lords[] = {"lord(","foreach(", "aslongas(", "all("};
for (int i = 0; i < 4; ++i){ found = string::npos;
found = s.find(lords[i]); int i = -1;
for (int j = 0; j < 4; ++j){
size_t found2 = s.find(lords[j]);
if (found2!=string::npos && ((found == string::npos) || found2 < found)){
found = found2;
i = j;
}
}
if (found != string::npos){ if (found != string::npos){
size_t header = lords[i].size(); size_t header = lords[i].size();
size_t end = s.find(")", found+header); size_t end = s.find(")", found+header);
@@ -289,7 +296,6 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG
} }
return NULL; return NULL;
} }
}
//Fizzle (counterspell...) //Fizzle (counterspell...)
@@ -2420,10 +2426,7 @@ other solutions need to be provided for abilities that add mana (ex: mana flare)
animation -= 4 *dt; animation -= 4 *dt;
if (!animation) animation = -1; if (!animation) animation = -1;
if (animation < 0){ if (animation < 0){
animation = 0;
currentlyTapping--;
resolve(); resolve();
if (mParticleSys) mParticleSys->Stop();
} }
} }
@@ -2450,8 +2453,11 @@ other solutions need to be provided for abilities that add mana (ex: mana flare)
} }
int AManaProducer::resolve(){ int AManaProducer::resolve(){
animation = 0;
if (currentlyTapping > 0) currentlyTapping--;
controller = source->controller(); controller = source->controller();
controller->getManaPool()->add(output); controller->getManaPool()->add(output);
if (mParticleSys) mParticleSys->Stop();
return 1; return 1;
} }
@@ -2488,6 +2494,11 @@ other solutions need to be provided for abilities that add mana (ex: mana flare)
return 1; return 1;
} }
int AManaProducer::destroy(){
if (animation >0) resolve(); //if we get destroyed while the animation was taking place (dirty...)
return MTGAbility::destroy();
}
const char * AManaProducer::getMenuText(){ const char * AManaProducer::getMenuText(){
if (menutext.size())return menutext.c_str(); if (menutext.size())return menutext.c_str();
menutext = "Add "; menutext = "Add ";