Erwan
- Bug fixes for Kird ape(RV), Dingus Egg(RV), Ankh of Mishra(RV), Ancient Tomb(TMP), Wooded Bastion (SHM) - Added tests in the test suite to confirm/infirm some bug reports
This commit is contained in:
@@ -767,7 +767,7 @@ text={T}: Add {1} to your mana pool. {GW}, {T}: Add {G}{G}, {G}{W}, or {W}{W
|
|||||||
auto={T}:Add{1}
|
auto={T}:Add{1}
|
||||||
auto={GW}{T}:Add{G}{G}
|
auto={GW}{T}:Add{G}{G}
|
||||||
auto={GW}{T}:Add{G}{W}
|
auto={GW}{T}:Add{G}{W}
|
||||||
auto={GW}{T}:Add{G}{W}
|
auto={GW}{T}:Add{W}{W}
|
||||||
id=146747
|
id=146747
|
||||||
name=Wooded Bastion
|
name=Wooded Bastion
|
||||||
rarity=R
|
rarity=R
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ type=Sorcery
|
|||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
text={T}: Add {2} to your mana pool. Ancient Tomb deals 2 damage to you.
|
text={T}: Add {2} to your mana pool. Ancient Tomb deals 2 damage to you.
|
||||||
auto={T}: Add {2} && Damage 1 controller
|
auto={T}: Add {2} && Damage 2 controller
|
||||||
id=4636
|
id=4636
|
||||||
name=Ancient Tomb
|
name=Ancient Tomb
|
||||||
rarity=U
|
rarity=U
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ generic/first_strike2.txt
|
|||||||
generic/first_strike3.txt
|
generic/first_strike3.txt
|
||||||
generic/hybrid_mana.txt
|
generic/hybrid_mana.txt
|
||||||
generic/hybrid_mana_2.txt
|
generic/hybrid_mana_2.txt
|
||||||
|
generic/hybrid_mana_3.txt
|
||||||
generic/legendary.txt
|
generic/legendary.txt
|
||||||
generic/persist.txt
|
generic/persist.txt
|
||||||
generic/wither.txt
|
generic/wither.txt
|
||||||
@@ -16,6 +17,7 @@ afflict.txt
|
|||||||
anarchy.txt
|
anarchy.txt
|
||||||
animate_dead.txt
|
animate_dead.txt
|
||||||
animate_dead2.txt
|
animate_dead2.txt
|
||||||
|
ankh_of_mishra.txt
|
||||||
ardakar_wastes.txt
|
ardakar_wastes.txt
|
||||||
ascendant_evincar.txt
|
ascendant_evincar.txt
|
||||||
ascendant_evincar2.txt
|
ascendant_evincar2.txt
|
||||||
@@ -32,7 +34,9 @@ counsel_of_the_soratami.txt
|
|||||||
counterspell.txt
|
counterspell.txt
|
||||||
counterspell2.txt
|
counterspell2.txt
|
||||||
creature_bond.txt
|
creature_bond.txt
|
||||||
|
dingus_egg.txt
|
||||||
doomed_necromancer.txt
|
doomed_necromancer.txt
|
||||||
|
dragon_fodder.txt
|
||||||
drain_life.txt
|
drain_life.txt
|
||||||
flare.txt
|
flare.txt
|
||||||
force_of_nature.txt
|
force_of_nature.txt
|
||||||
@@ -45,6 +49,7 @@ goblin_balloon_brigade2.txt
|
|||||||
goblin_king.txt
|
goblin_king.txt
|
||||||
hymn_of_rebirth.txt
|
hymn_of_rebirth.txt
|
||||||
keldon_warlord.txt
|
keldon_warlord.txt
|
||||||
|
kird_ape.txt
|
||||||
kudzu.txt
|
kudzu.txt
|
||||||
kudzu2.txt
|
kudzu2.txt
|
||||||
lifeforce.txt
|
lifeforce.txt
|
||||||
|
|||||||
24
projects/mtg/bin/Res/test/ankh_of_mishra.txt
Normal file
24
projects/mtg/bin/Res/test/ankh_of_mishra.txt
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# bug : Ankh of Mishra : Doesn<73>ft deal damage if a land was destroyed then a new one is put into play
|
||||||
|
# Ankh of Mishra : (RV) 1094
|
||||||
|
# text=Whenever a land comes into play, Ankh of Mishra deals 2 damage to that land's controller.
|
||||||
|
# Will destroy a land with stone rain, then put a plains into play
|
||||||
|
[INIT]
|
||||||
|
FIRSTMAIN
|
||||||
|
[PLAYER1]
|
||||||
|
inplay:1397,1094
|
||||||
|
hand:1396,1321
|
||||||
|
manapool:{R}{2}
|
||||||
|
[PLAYER2]
|
||||||
|
[DO]
|
||||||
|
1321
|
||||||
|
1397
|
||||||
|
1396
|
||||||
|
[ASSERT]
|
||||||
|
FIRSTMAIN
|
||||||
|
[PLAYER1]
|
||||||
|
graveyard:1397,1321
|
||||||
|
inplay:1094,1396
|
||||||
|
manapool:{0}
|
||||||
|
life:18
|
||||||
|
[PLAYER2]
|
||||||
|
[END]
|
||||||
26
projects/mtg/bin/Res/test/dingus_egg.txt
Normal file
26
projects/mtg/bin/Res/test/dingus_egg.txt
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
# bug : Dingus Egg can be put into play but does not deal damage when a player loses a land
|
||||||
|
# Dingus Egg : (RV) 1105
|
||||||
|
#text=Whenever a land is put into a graveyard from play, Dingus Egg deals 2 damage to that land's controller.
|
||||||
|
# Will destroy 2 lands with stone rains
|
||||||
|
[INIT]
|
||||||
|
FIRSTMAIN
|
||||||
|
[PLAYER1]
|
||||||
|
inplay:1397,1105
|
||||||
|
hand:1321,1321,1396
|
||||||
|
manapool:{R}{2}{R}{2}
|
||||||
|
[PLAYER2]
|
||||||
|
[DO]
|
||||||
|
1321
|
||||||
|
1397
|
||||||
|
1396
|
||||||
|
1321
|
||||||
|
1396
|
||||||
|
[ASSERT]
|
||||||
|
FIRSTMAIN
|
||||||
|
[PLAYER1]
|
||||||
|
graveyard:1397,1321,1396,1321
|
||||||
|
inplay:1105
|
||||||
|
manapool:{0}
|
||||||
|
life:16
|
||||||
|
[PLAYER2]
|
||||||
|
[END]
|
||||||
19
projects/mtg/bin/Res/test/dragon_fodder.txt
Normal file
19
projects/mtg/bin/Res/test/dragon_fodder.txt
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
#Testing Tokens
|
||||||
|
# Dragon Fodder (ALA) 174936
|
||||||
|
# text=Put two 1/1 red Goblin creature tokens into play.
|
||||||
|
[INIT]
|
||||||
|
FIRSTMAIN
|
||||||
|
[PLAYER1]
|
||||||
|
hand:174936
|
||||||
|
manapool:{R}{1}
|
||||||
|
[PLAYER2]
|
||||||
|
[DO]
|
||||||
|
174936
|
||||||
|
[ASSERT]
|
||||||
|
FIRSTMAIN
|
||||||
|
[PLAYER1]
|
||||||
|
graveyard:174936
|
||||||
|
inplay:-174936,-174936
|
||||||
|
manapool:{0}
|
||||||
|
[PLAYER2]
|
||||||
|
[END]
|
||||||
18
projects/mtg/bin/Res/test/generic/hybrid_mana_3.txt
Normal file
18
projects/mtg/bin/Res/test/generic/hybrid_mana_3.txt
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
#Testing Hybrid Mana
|
||||||
|
# Spectral possession: text=({2W} can be paid with any two mana or with {W}. This card's converted mana cost is 6.) Put three 1/1 white Spirit creature tokens with flying into play.
|
||||||
|
[INIT]
|
||||||
|
FIRSTMAIN
|
||||||
|
[PLAYER1]
|
||||||
|
hand:152070
|
||||||
|
manapool:{R}{R}{G}{G}{W}{W}
|
||||||
|
[PLAYER2]
|
||||||
|
[DO]
|
||||||
|
152070
|
||||||
|
[ASSERT]
|
||||||
|
FIRSTMAIN
|
||||||
|
[PLAYER1]
|
||||||
|
graveyard:152070
|
||||||
|
inplay:-152070,-152070,-152070
|
||||||
|
manapool:{0}
|
||||||
|
[PLAYER2]
|
||||||
|
[END]
|
||||||
43
projects/mtg/bin/Res/test/kird_ape.txt
Normal file
43
projects/mtg/bin/Res/test/kird_ape.txt
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
# bug : Kird Ape : keeps his power/toughness bonus when unsummoned. This allows to cheat and bost the Kird ape like crazy.
|
||||||
|
# Kird Ape : (RV) 1302
|
||||||
|
# text=Kird Ape gets +1/+2 as long as you control a Forest.
|
||||||
|
# Will unsummon and reput into play
|
||||||
|
[INIT]
|
||||||
|
FIRSTMAIN
|
||||||
|
[PLAYER1]
|
||||||
|
inplay:1386,1302
|
||||||
|
hand:1229
|
||||||
|
manapool:{R}{U}
|
||||||
|
[PLAYER2]
|
||||||
|
[DO]
|
||||||
|
1229
|
||||||
|
1302
|
||||||
|
1302
|
||||||
|
eot
|
||||||
|
eot
|
||||||
|
next
|
||||||
|
#upkeep
|
||||||
|
next
|
||||||
|
#draw
|
||||||
|
next
|
||||||
|
#firstmain
|
||||||
|
next
|
||||||
|
#combatbegins
|
||||||
|
next
|
||||||
|
#attackers
|
||||||
|
1302
|
||||||
|
next
|
||||||
|
#blockers
|
||||||
|
next
|
||||||
|
#damage
|
||||||
|
next
|
||||||
|
#combatend
|
||||||
|
[ASSERT]
|
||||||
|
COMBATEND
|
||||||
|
[PLAYER1]
|
||||||
|
graveyard:1229
|
||||||
|
inplay:1386,1302
|
||||||
|
manapool:{0}
|
||||||
|
[PLAYER2]
|
||||||
|
life:18
|
||||||
|
[END]
|
||||||
@@ -1217,23 +1217,31 @@ class AAladdinsLamp: public TargetAbility{
|
|||||||
|
|
||||||
|
|
||||||
//Ankh of Mishra
|
//Ankh of Mishra
|
||||||
class AAnkhOfMishra: public MTGAbility{
|
class AAnkhOfMishra: public ListMaintainerAbility{
|
||||||
public:
|
public:
|
||||||
int playerLands[2];
|
int init;
|
||||||
AAnkhOfMishra(int id, MTGCardInstance * _source):MTGAbility(id, _source){
|
AAnkhOfMishra(int id, MTGCardInstance * _source):ListMaintainerAbility(id, _source){
|
||||||
for (int i=0; i< 2; i++){
|
init = 0;
|
||||||
playerLands[i] = GameObserver::GetInstance()->players[i]->game->inPlay->countByType("land");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Update(float dt){
|
void Update(float dt){
|
||||||
for (int i=0; i < 2; i++){
|
ListMaintainerAbility::Update(dt);
|
||||||
int lands = GameObserver::GetInstance()->players[i]->game->inPlay->countByType("land");
|
init = 1;
|
||||||
while (lands > playerLands[i]){
|
}
|
||||||
GameObserver::GetInstance()->mLayers->stackLayer()->addDamage(source,GameObserver::GetInstance()->players[i], 2);
|
|
||||||
playerLands[i]++;
|
int canBeInList(MTGCardInstance * card){
|
||||||
}
|
if (card->hasType("land")) return 1;
|
||||||
}
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int added(MTGCardInstance * card){
|
||||||
|
if (!init) return 0;
|
||||||
|
game->mLayers->stackLayer()->addDamage(source,card->controller(), 2);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int removed(MTGCardInstance * card){
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1472,23 +1480,23 @@ class ACreatureBond:public TriggeredAbility{
|
|||||||
};
|
};
|
||||||
|
|
||||||
//1105: Dingus Egg
|
//1105: Dingus Egg
|
||||||
class ADingusEgg: public MTGAbility{
|
class ADingusEgg: public ListMaintainerAbility{
|
||||||
public:
|
public:
|
||||||
int playerLands[2];
|
ADingusEgg(int id, MTGCardInstance * _source):ListMaintainerAbility(id, _source){
|
||||||
ADingusEgg(int id, MTGCardInstance * _source):MTGAbility(id, _source){
|
|
||||||
for (int i=0; i< 2; i++){
|
|
||||||
playerLands[i] = GameObserver::GetInstance()->players[i]->game->inPlay->countByType("land");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Update(float dt){
|
int canBeInList(MTGCardInstance * card){
|
||||||
for (int i=0; i < 2; i++){
|
if (card->hasType("land")) return 1;
|
||||||
int lands = GameObserver::GetInstance()->players[i]->game->inPlay->countByType("land");
|
return 0;
|
||||||
while (lands < playerLands[i]){
|
}
|
||||||
GameObserver::GetInstance()->mLayers->stackLayer()->addDamage(source,GameObserver::GetInstance()->players[i], 2);
|
|
||||||
playerLands[i]--;
|
int added(MTGCardInstance * card){
|
||||||
}
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int removed(MTGCardInstance * card){
|
||||||
|
game->mLayers->stackLayer()->addDamage(source,card->controller(), 2);
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1908,15 +1916,6 @@ class AKudzu: public TargetAbility{
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
int reactToClick(MTGCardInstance * card){
|
|
||||||
if (!waitingForAnswer) {
|
|
||||||
}else{
|
|
||||||
tc->toggleTarget(card);
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
int resolve(){
|
int resolve(){
|
||||||
target = tc->getNextCardTarget();
|
target = tc->getNextCardTarget();
|
||||||
@@ -2423,30 +2422,7 @@ class AKeldonWarlord:public ListMaintainerAbility{
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//1302 : Kird Ape
|
|
||||||
class AKirdApe:public MTGAbility{
|
|
||||||
public:
|
|
||||||
int init;
|
|
||||||
AKirdApe(int _id, MTGCardInstance * _source):MTGAbility(_id, _source){
|
|
||||||
init = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Update(float dt){
|
|
||||||
if (source->controller()->game->inPlay->hasType("forest")){
|
|
||||||
if(!init){
|
|
||||||
init = 1;
|
|
||||||
source->power+=1;
|
|
||||||
source->addToToughness(2);
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
if (init){
|
|
||||||
init = 0;
|
|
||||||
source->power-=1;
|
|
||||||
source->addToToughness(-2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
//1309 Orcish Artilery
|
//1309 Orcish Artilery
|
||||||
class AOrcishArtillery: public ADamager{
|
class AOrcishArtillery: public ADamager{
|
||||||
@@ -2589,30 +2565,6 @@ class ANorthernPaladin:public TargetAbility{
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//Sedge Troll
|
|
||||||
class ASedgeTroll:public MTGAbility{
|
|
||||||
public:
|
|
||||||
int init;
|
|
||||||
ASedgeTroll(int _id, MTGCardInstance * _source):MTGAbility(_id, _source){
|
|
||||||
init = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Update(float dt){
|
|
||||||
if (source->controller()->game->inPlay->hasType("swamp")){
|
|
||||||
if(!init){
|
|
||||||
init = 1;
|
|
||||||
source->power+=1;
|
|
||||||
source->addToToughness(1);
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
if (init){
|
|
||||||
init = 0;
|
|
||||||
source->power-=1;
|
|
||||||
source->addToToughness(-1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
//Soul Net
|
//Soul Net
|
||||||
class ASoulNet:public ActivatedAbility{
|
class ASoulNet:public ActivatedAbility{
|
||||||
@@ -2883,33 +2835,45 @@ class ACreaturePowerToughnessModifierForAllTypeControlled:public ListMaintainerA
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//GenericKirdApe
|
//Generic Kird Ape
|
||||||
//Erwan 2008/11/15 : this cannot work as type is never initialized...
|
class AKirdApe:public ListMaintainerAbility{
|
||||||
class AGenericKirdApe:public MTGAbility{
|
|
||||||
public:
|
public:
|
||||||
int init;
|
TargetChooser * tc;
|
||||||
char type [20];
|
|
||||||
int power;
|
int power;
|
||||||
int toughness;
|
int toughness;
|
||||||
AGenericKirdApe(int _id, MTGCardInstance * _source, const char * _type, int _power, int _toughness):MTGAbility(_id, _source){
|
AKirdApe(int _id, MTGCardInstance * _source, TargetChooser * _tc, int _power, int _toughness):ListMaintainerAbility(_id, _source){
|
||||||
init = 0;
|
power = _power;
|
||||||
}
|
toughness = _toughness;
|
||||||
|
tc = _tc;
|
||||||
|
}
|
||||||
|
|
||||||
|
int canBeInList(MTGCardInstance * card){
|
||||||
|
if (card->controller() == source->controller() && tc->canTarget(card)) return 1;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int added(MTGCardInstance * card){
|
||||||
|
if (cards.size()== 1){
|
||||||
|
source->power+=power;
|
||||||
|
source->addToToughness(toughness);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int removed(MTGCardInstance * card){
|
||||||
|
if (cards.size()== 0){
|
||||||
|
source->power-=power;
|
||||||
|
source->addToToughness(-toughness);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
~AKirdApe(){
|
||||||
|
delete tc;
|
||||||
|
}
|
||||||
|
|
||||||
void Update(float dt){
|
|
||||||
if (source->controller()->game->inPlay->hasType(type)){
|
|
||||||
if(!init){
|
|
||||||
init = 1;
|
|
||||||
source->power+=power;
|
|
||||||
source->addToToughness(toughness);
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
if (init){
|
|
||||||
init = 0;
|
|
||||||
source->power-=power;
|
|
||||||
source->addToToughness(-toughness);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ class MTGCardInstance: public MTGCard, public Damageable, public Targetable {
|
|||||||
public:
|
public:
|
||||||
bool isToken;
|
bool isToken;
|
||||||
MTGGameZone * getCurrentZone();
|
MTGGameZone * getCurrentZone();
|
||||||
|
MTGGameZone * previousZone;
|
||||||
int doDamageTest;
|
int doDamageTest;
|
||||||
int summoningSickness;
|
int summoningSickness;
|
||||||
// The recommended method to test for summoning Sickness !
|
// The recommended method to test for summoning Sickness !
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ class TestSuite{
|
|||||||
TestSuiteState initState;
|
TestSuiteState initState;
|
||||||
TestSuiteState endState;
|
TestSuiteState endState;
|
||||||
TestSuiteActions actions;
|
TestSuiteActions actions;
|
||||||
string files[128];
|
string files[1024];
|
||||||
int nbfiles;
|
int nbfiles;
|
||||||
int currentfile;
|
int currentfile;
|
||||||
void load(const char * filename);
|
void load(const char * filename);
|
||||||
|
|||||||
@@ -1122,7 +1122,8 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){
|
|||||||
}
|
}
|
||||||
case 1315: //Sedge Troll
|
case 1315: //Sedge Troll
|
||||||
{
|
{
|
||||||
game->addObserver( NEW ASedgeTroll(_id, card));
|
TargetChooser * tc = NEW TypeTargetChooser("swamp",card);
|
||||||
|
game->addObserver(NEW AKirdApe(_id, card,tc,1,1));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 1221: //Serendib Efreet
|
case 1221: //Serendib Efreet
|
||||||
@@ -1281,7 +1282,8 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){
|
|||||||
}
|
}
|
||||||
case 1302: //Kird Ape
|
case 1302: //Kird Ape
|
||||||
{
|
{
|
||||||
game->addObserver(NEW AKirdApe(_id, card));
|
TargetChooser * tc = NEW TypeTargetChooser("forest",card);
|
||||||
|
game->addObserver(NEW AKirdApe(_id, card,tc,1,2));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 1309: //Orcish Artillery
|
case 1309: //Orcish Artillery
|
||||||
@@ -1862,12 +1864,14 @@ void ListMaintainerAbility::Update(float dt){
|
|||||||
|
|
||||||
//Destroy the spell -> remove all targets
|
//Destroy the spell -> remove all targets
|
||||||
int ListMaintainerAbility::destroy(){
|
int ListMaintainerAbility::destroy(){
|
||||||
map<MTGCardInstance *,bool>::iterator it;
|
map<MTGCardInstance *,bool>::iterator it = cards.begin();
|
||||||
|
|
||||||
for ( it=cards.begin() ; it != cards.end(); it++ ){
|
while ( it!=cards.end()){
|
||||||
removed((*it).first);
|
MTGCardInstance * card = (*it).first;
|
||||||
|
cards.erase(card);
|
||||||
|
removed(card);
|
||||||
|
it = cards.begin();
|
||||||
}
|
}
|
||||||
cards.clear();
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ void MTGCardInstance::initMTGCI(){
|
|||||||
owner = NULL;
|
owner = NULL;
|
||||||
changedZoneRecently = 0;
|
changedZoneRecently = 0;
|
||||||
counters = NEW Counters(this);
|
counters = NEW Counters(this);
|
||||||
|
previousZone = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -160,6 +160,7 @@ MTGCardInstance * MTGGameZone::removeCard(MTGCardInstance * card){
|
|||||||
if (cards[i] == card){
|
if (cards[i] == card){
|
||||||
cards[i] = cards[nb_cards -1];
|
cards[i] = cards[nb_cards -1];
|
||||||
nb_cards--;
|
nb_cards--;
|
||||||
|
card->previousZone = this;
|
||||||
return card;
|
return card;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user