- Yet another attempt at fixing counterspells. Needs testing
This commit is contained in:
wagic.the.homebrew@gmail.com
2009-05-10 13:31:33 +00:00
parent 62f6b92332
commit ab48516788
4 changed files with 68 additions and 8 deletions

View File

@@ -42,6 +42,8 @@ control_magic2.txt
counsel_of_the_soratami.txt
counterspell.txt
counterspell2.txt
counterspell3.txt
counterspell4.txt
creature_bond.txt
deja_vu.txt
dingus_egg.txt
@@ -115,4 +117,3 @@ zombify.txt
#Momir Basic Tests
########################
momir/keldon_warlord.txt

View File

@@ -0,0 +1,30 @@
#Testing counterspell extensively
[INIT]
FIRSTMAIN
[PLAYER1]
hand:lightning bolt
inplay:mountain
[PLAYER2]
hand:counterspell
inplay:hill giant,1393,1392
[DO]
mountain
lightning bolt
hill giant
no
yes
1392
1393
counterspell
lightning bolt
endinterruption
[ASSERT]
FIRSTMAIN
[PLAYER1]
graveyard:lightning bolt
inplay:mountain
[PLAYER2]
graveyard:counterspell
inplay:hill giant,1393,1392
life:20
[END]

View File

@@ -0,0 +1,27 @@
#Testing counterspell on bad moon
[INIT]
FIRSTMAIN
[PLAYER1]
hand:bad moon
manapool:{1}{B}
[PLAYER2]
hand:counterspell
manapool:{U}{U}
[DO]
bad moon
no
yes
counterspell
bad moon
endinterruption
[ASSERT]
FIRSTMAIN
[PLAYER1]
graveyard:bad moon
manapool:{0}
life:20
[PLAYER2]
graveyard:counterspell
manapool:{0}
life:20
[END]

View File

@@ -502,6 +502,7 @@ void ActionStack::Update(float dt){
TargetChooser * tc = game->getCurrentTargetChooser();
int newState = game->getCurrentGamePhase();
currentState = newState;
if (!tc) checked = 0;
//Select Stack's display mode
if (mode==ACTIONSTACK_STANDARD && tc && !checked){
@@ -509,15 +510,16 @@ void ActionStack::Update(float dt){
unpackDamageStacks();
for (int i = 0; i < mCount ; i++){
Interruptible * current = (Interruptible *)mObjects[i];
OutputDebugString("OH MY GOD, TAARGET MODE!\n");
if (tc->canTarget(current)){
if (mObjects[mCurr]) mObjects[mCurr]->Leaving(PSP_CTRL_UP);
current->display = 1;
mCurr = i;
mObjects[mCurr]->Entering();
mode=ACTIONSTACK_TARGET;
modal = 1;
if (mObjects[mCurr]) mObjects[mCurr]->Leaving(PSP_CTRL_UP);
current->display = 1;
mCurr = i;
mObjects[mCurr]->Entering();
mode=ACTIONSTACK_TARGET;
modal = 1;
}else{
current->display = 0;
current->display = 0;
}
}
if (mode != ACTIONSTACK_TARGET){