-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
+1
View File
@@ -131,6 +131,7 @@ kird_ape.txt
kraken_eye.txt kraken_eye.txt
kraken_eye2.txt kraken_eye2.txt
kraken_eye3.txt kraken_eye3.txt
kraken_eye4.txt
kudzu.txt kudzu.txt
kudzu2.txt kudzu2.txt
leveler.txt leveler.txt
+33
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]
+3 -5
View File
@@ -135,6 +135,7 @@ public:
mClone = NULL; mClone = NULL;
} }
void Update(float dt){ void Update(float dt){
MTGAbility::Update(dt); MTGAbility::Update(dt);
if (!triggered){ if (!triggered){
@@ -150,17 +151,14 @@ public:
} }
int testDestroy(){ int testDestroy(){
if (triggered){ if (!triggered) return 0;
if (game->mLayers->actionLayer()->menuObject) return 0; if (game->mLayers->actionLayer()->menuObject) return 0;
if (game->mLayers->actionLayer()->getIndexOf(mClone) !=-1) return 0; if (game->mLayers->actionLayer()->getIndexOf(mClone) !=-1) return 0;
if (game->mLayers->actionLayer()->getIndexOf(this) !=-1) return 0; //if (game->mLayers->actionLayer()->getIndexOf(this) !=-1) return 0;
OutputDebugString("Destroy!\n"); OutputDebugString("Destroy!\n");
return 1; return 1;
} }
return 0;
}
int isReactingToTargetClick(Targetable * card){ int isReactingToTargetClick(Targetable * card){
OutputDebugString("IsReacting ???\n"); OutputDebugString("IsReacting ???\n");
if (card == source) return 1; if (card == source) return 1;
+1 -1
View File
@@ -482,7 +482,7 @@ int GuiCombat::receiveEventMinus(WEvent* e)
autoaffectDamage(*attacker, step); autoaffectDamage(*attacker, step);
for (inner_iterator it = attackers.begin(); it != attackers.end(); ++it) 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)->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); repos<AttackerDamaged>(attackers.begin(), attackers.end(), 0);
active = NULL; active = NULL;