diff --git a/projects/mtg/bin/Res/test/_tests.txt b/projects/mtg/bin/Res/test/_tests.txt index b7e704604..411e278b8 100644 --- a/projects/mtg/bin/Res/test/_tests.txt +++ b/projects/mtg/bin/Res/test/_tests.txt @@ -311,6 +311,14 @@ seedcradle_witch.txt seismic_assault.txt seismic_spike_i191.txt selesnya_guildmage.txt +skullcage0_i239.txt +skullcage1_i239.txt +skullcage2_i239.txt +skullcage3_i239.txt +skullcage4_i239.txt +skullcage5_i239.txt +skullcage6_i239.txt +skullcage7_i239.txt shepherd_of_rot.txt shivan_hellkite.txt shock.txt diff --git a/projects/mtg/bin/Res/test/bugs/skullcage0_i239.txt b/projects/mtg/bin/Res/test/skullcage0_i239.txt similarity index 100% rename from projects/mtg/bin/Res/test/bugs/skullcage0_i239.txt rename to projects/mtg/bin/Res/test/skullcage0_i239.txt diff --git a/projects/mtg/bin/Res/test/bugs/skullcage1_i239.txt b/projects/mtg/bin/Res/test/skullcage1_i239.txt similarity index 100% rename from projects/mtg/bin/Res/test/bugs/skullcage1_i239.txt rename to projects/mtg/bin/Res/test/skullcage1_i239.txt diff --git a/projects/mtg/bin/Res/test/bugs/skullcage2_i239.txt b/projects/mtg/bin/Res/test/skullcage2_i239.txt similarity index 100% rename from projects/mtg/bin/Res/test/bugs/skullcage2_i239.txt rename to projects/mtg/bin/Res/test/skullcage2_i239.txt diff --git a/projects/mtg/bin/Res/test/bugs/skullcage3_i239.txt b/projects/mtg/bin/Res/test/skullcage3_i239.txt similarity index 100% rename from projects/mtg/bin/Res/test/bugs/skullcage3_i239.txt rename to projects/mtg/bin/Res/test/skullcage3_i239.txt diff --git a/projects/mtg/bin/Res/test/bugs/skullcage4_i239.txt b/projects/mtg/bin/Res/test/skullcage4_i239.txt similarity index 100% rename from projects/mtg/bin/Res/test/bugs/skullcage4_i239.txt rename to projects/mtg/bin/Res/test/skullcage4_i239.txt diff --git a/projects/mtg/bin/Res/test/bugs/skullcage5_i239.txt b/projects/mtg/bin/Res/test/skullcage5_i239.txt similarity index 100% rename from projects/mtg/bin/Res/test/bugs/skullcage5_i239.txt rename to projects/mtg/bin/Res/test/skullcage5_i239.txt diff --git a/projects/mtg/bin/Res/test/bugs/skullcage6_i239.txt b/projects/mtg/bin/Res/test/skullcage6_i239.txt similarity index 100% rename from projects/mtg/bin/Res/test/bugs/skullcage6_i239.txt rename to projects/mtg/bin/Res/test/skullcage6_i239.txt diff --git a/projects/mtg/bin/Res/test/bugs/skullcage7_i239.txt b/projects/mtg/bin/Res/test/skullcage7_i239.txt similarity index 100% rename from projects/mtg/bin/Res/test/bugs/skullcage7_i239.txt rename to projects/mtg/bin/Res/test/skullcage7_i239.txt diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index 4bd4ea54f..7d91a8fb3 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -1706,6 +1706,8 @@ class AAsLongAs:public ListMaintainerAbility{ int resolve(){ //TODO check if ability is oneShot ? updateTargets(); + size_t size = cards.size(); + if (maxi && size < maxi && (!mini || size > mini)) addAbilityToGame(); //special case for 0 cards.clear(); players.clear(); return 1; @@ -1716,7 +1718,7 @@ class AAsLongAs:public ListMaintainerAbility{ a = ability->clone(); if (a->oneShot){ a->resolve(); - SAFE_DELETE(a); + delete(a); }else{ a->addToGame(); } @@ -1732,9 +1734,9 @@ class AAsLongAs:public ListMaintainerAbility{ int _added(Damageable * d){ size_t size = cards.size(); - if (mini && (int)size <= mini) return 0; - if (maxi && (int)size >= maxi) return removeAbilityFromGame(); - if (!mini && !maxi && size !=1) return 0; + if (maxi && size >= maxi) return removeAbilityFromGame(); + if (maxi) return 0; + if (size <= mini) return 0; return addAbilityToGame(); }