-fix issue 239 (skullcage)
This commit is contained in:
wagic.the.homebrew@gmail.com
2009-12-13 11:18:55 +00:00
parent cc46be7fbe
commit 86c72b7d15
10 changed files with 14 additions and 4 deletions

View File

@@ -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

View File

@@ -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();
}