-fix issue 48 (dragon claw endless ability list)
-switched incorrect unsigned int to size_t
This commit is contained in:
wagic.the.homebrew@gmail.com
2009-09-25 15:35:19 +00:00
parent d7e1e73ca3
commit ac120266a9
4 changed files with 42 additions and 10 deletions

View File

@@ -131,6 +131,7 @@ kird_ape.txt
kraken_eye.txt
kraken_eye2.txt
kraken_eye3.txt
kraken_eye4.txt
kudzu.txt
kudzu2.txt
leveler.txt

View File

@@ -0,0 +1,33 @@
#Bug: http://code.google.com/p/wagic/issues/detail?id=48
#Kraken eye adds items to the menu
[INIT]
FIRSTMAIN
[PLAYER1]
inplay:kraken's eye,island
hand:air elemental,unsummon
manapool:{3}{U}{U}
[PLAYER2]
[DO]
air elemental
choice 0
next
#begin
next
#attack
next
#end
next
#secondmain
island
unsummon
air elemental
choice 1
[ASSERT]
SECONDMAIN
[PLAYER1]
inplay:kraken's eye,island
hand:air elemental
graveyard:unsummon
life:21
[PLAYER2]
[END]

View File

@@ -135,6 +135,7 @@ public:
mClone = NULL;
}
void Update(float dt){
MTGAbility::Update(dt);
if (!triggered){
@@ -150,15 +151,12 @@ public:
}
int testDestroy(){
if (triggered){
if (game->mLayers->actionLayer()->menuObject) return 0;
if (game->mLayers->actionLayer()->getIndexOf(mClone) !=-1) return 0;
if (game->mLayers->actionLayer()->getIndexOf(this) !=-1) return 0;
OutputDebugString("Destroy!\n");
return 1;
}
return 0;
if (!triggered) return 0;
if (game->mLayers->actionLayer()->menuObject) return 0;
if (game->mLayers->actionLayer()->getIndexOf(mClone) !=-1) return 0;
//if (game->mLayers->actionLayer()->getIndexOf(this) !=-1) return 0;
OutputDebugString("Destroy!\n");
return 1;
}
int isReactingToTargetClick(Targetable * card){

View File

@@ -482,7 +482,7 @@ int GuiCombat::receiveEventMinus(WEvent* e)
autoaffectDamage(*attacker, step);
for (inner_iterator it = attackers.begin(); it != attackers.end(); ++it)
(*it)->show = ((*it)->card->has(Constants::DOUBLESTRIKE) || ((*it)->card->has(Constants::FIRSTSTRIKE) ^ (DAMAGE == step))) &&
(((*it)->card->has(Constants::TRAMPLE) ? (unsigned int) 0 : (unsigned int) 1) < (*it)->blockers.size()
(((*it)->card->has(Constants::TRAMPLE) ? (size_t) 0 : (size_t) 1) < (*it)->blockers.size()
);
repos<AttackerDamaged>(attackers.begin(), attackers.end(), 0);
active = NULL;