Erwan
- a few bug fixes with cards that bring other cards back to play (zombify, resurrection...) - bug fix with abilities parsing "reachshadow" - a few card fixes
This commit is contained in:
@@ -548,8 +548,8 @@ toughness=2
|
||||
[/card]
|
||||
[card]
|
||||
text=Other Giant creatures you control get +2/+2 and have trample.
|
||||
auto=lord(giant) 2/2 other
|
||||
auto=lord(giant) trample other
|
||||
auto=lord(giant|myinplay) 2/2 other
|
||||
auto=lord(giant|myinplay) trample other
|
||||
id=139667
|
||||
name=Sunrise Sovereign
|
||||
rarity=R
|
||||
|
||||
@@ -1034,7 +1034,7 @@ id=3252
|
||||
name=Horrible Hordes
|
||||
type=Artifact Creature
|
||||
subtype=Spirit
|
||||
auto=rampage
|
||||
abilities=rampage
|
||||
mana={3}
|
||||
power=2
|
||||
toughness=2
|
||||
|
||||
@@ -1074,7 +1074,7 @@ text=Return target creature card from your graveyard to play.
|
||||
id=29847
|
||||
name=Zombify
|
||||
target=Creature|mygraveyard
|
||||
alias=1360
|
||||
auto=moveTo(myInPlay)
|
||||
mana={3}{B}
|
||||
color=black
|
||||
type=Sorcery
|
||||
|
||||
@@ -220,6 +220,7 @@ abilities={2}:regenerate
|
||||
[/card]
|
||||
[card]
|
||||
text=Flying When Cloudchaser Eagle comes into play, destroy target enchantment.
|
||||
abilities=flying
|
||||
id=4871
|
||||
name=Cloudchaser Eagle
|
||||
auto=may destroy target(enchantment)
|
||||
|
||||
@@ -103,10 +103,13 @@ sword_to_plowshares.txt
|
||||
terror.txt
|
||||
tranquil_domain.txt
|
||||
volcanic_island.txt
|
||||
wall_of_diffusion.txt
|
||||
wall_of_diffusion2.txt
|
||||
white_knight1.txt
|
||||
wrath_of_god.txt
|
||||
zombie_master.txt
|
||||
zombify.txt
|
||||
########################
|
||||
#Momir Basic Tests
|
||||
########################
|
||||
momir/keldon_warlord.txt
|
||||
momir/keldon_warlord.txt
|
||||
24
projects/mtg/bin/Res/test/wall_of_diffusion.txt
Normal file
24
projects/mtg/bin/Res/test/wall_of_diffusion.txt
Normal file
@@ -0,0 +1,24 @@
|
||||
#Bug: Wall of diffusion has reach
|
||||
[INIT]
|
||||
COMBATATTACKERS
|
||||
[PLAYER1]
|
||||
inplay:air elemental
|
||||
[PLAYER2]
|
||||
inplay:wall of diffusion
|
||||
[DO]
|
||||
air elemental
|
||||
next
|
||||
#blockers
|
||||
wall of diffusion
|
||||
next
|
||||
#damage
|
||||
next
|
||||
#end
|
||||
[ASSERT]
|
||||
COMBATEND
|
||||
[PLAYER1]
|
||||
inplay:air elemental
|
||||
[PLAYER2]
|
||||
inplay:wall of diffusion
|
||||
life:16
|
||||
[END]
|
||||
23
projects/mtg/bin/Res/test/wall_of_diffusion2.txt
Normal file
23
projects/mtg/bin/Res/test/wall_of_diffusion2.txt
Normal file
@@ -0,0 +1,23 @@
|
||||
#Wall of diffusionShadow
|
||||
[INIT]
|
||||
COMBATATTACKERS
|
||||
[PLAYER1]
|
||||
inplay:dauthi marauder
|
||||
[PLAYER2]
|
||||
inplay:wall of diffusion
|
||||
[DO]
|
||||
dauthi marauder
|
||||
next
|
||||
#blockers
|
||||
wall of diffusion
|
||||
next
|
||||
#damage
|
||||
next
|
||||
#end
|
||||
[ASSERT]
|
||||
COMBATEND
|
||||
[PLAYER1]
|
||||
inplay:dauthi marauder
|
||||
[PLAYER2]
|
||||
inplay:wall of diffusion
|
||||
[END]
|
||||
44
projects/mtg/bin/Res/test/zombify.txt
Normal file
44
projects/mtg/bin/Res/test/zombify.txt
Normal file
@@ -0,0 +1,44 @@
|
||||
#Bug: zombify on a Roowalla doesn't give the rootwalla it's abilities back
|
||||
[INIT]
|
||||
FIRSTMAIN
|
||||
[PLAYER1]
|
||||
hand:zombify
|
||||
graveyard:rootwalla
|
||||
inplay:swamp,forest
|
||||
manapool:{3}{B}
|
||||
[PLAYER2]
|
||||
[DO]
|
||||
zombify
|
||||
rootwalla
|
||||
eot
|
||||
eot
|
||||
#untap
|
||||
next
|
||||
#upkeep
|
||||
next
|
||||
#draw
|
||||
next
|
||||
#main 1
|
||||
swamp
|
||||
forest
|
||||
rootwalla
|
||||
next
|
||||
#combat begins
|
||||
next
|
||||
#attackers
|
||||
rootwalla
|
||||
next
|
||||
#blockers
|
||||
next
|
||||
#damage
|
||||
next
|
||||
#end
|
||||
[ASSERT]
|
||||
COMBATEND
|
||||
[PLAYER1]
|
||||
graveyard:zombify
|
||||
inplay:swamp,forest,rootwalla
|
||||
manapool:{0}
|
||||
[PLAYER2]
|
||||
life:16
|
||||
[END]
|
||||
@@ -243,9 +243,9 @@ public:
|
||||
destinationZone = destZone;
|
||||
}
|
||||
|
||||
int resolve(){
|
||||
MTGCardInstance * _target = tc->getNextCardTarget();
|
||||
if(_target){
|
||||
static int moveTarget(MTGCardInstance * _target, string destinationZone, MTGCardInstance * source){
|
||||
GameObserver * g = GameObserver::GetInstance();
|
||||
if(_target){
|
||||
Player* p = _target->controller();
|
||||
if (p){
|
||||
MTGGameZone * fromZone = _target->getCurrentZone();
|
||||
@@ -253,8 +253,8 @@ public:
|
||||
|
||||
//inplay is a special zone !
|
||||
for (int i=0; i < 2; i++){
|
||||
if (destZone == game->players[i]->game->inPlay){
|
||||
MTGCardInstance * copy = game->players[i]->game->putInZone(_target, fromZone, game->players[i]->game->stack);
|
||||
if (destZone == g->players[i]->game->inPlay){
|
||||
MTGCardInstance * copy = g->players[i]->game->putInZone(_target, fromZone, g->players[i]->game->stack);
|
||||
Spell * spell = NEW Spell(copy);
|
||||
|
||||
spell->resolve();
|
||||
@@ -267,6 +267,11 @@ public:
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int resolve(){
|
||||
MTGCardInstance * _target = tc->getNextCardTarget();
|
||||
return moveTarget(_target,destinationZone, source);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -369,9 +369,7 @@ int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card){
|
||||
game->addObserver(a);
|
||||
}
|
||||
}else{
|
||||
MTGGameZone * fromZone = target->getCurrentZone();//this is technically incorrect. The initial zone should be as described in the targetchooser
|
||||
MTGGameZone * destZone = MTGGameZone::stringToZone(szone, card, target);
|
||||
target->controller()->game->putInZone(target,fromZone,destZone);
|
||||
AZoneMover::moveTarget(target,szone,card);
|
||||
}
|
||||
}
|
||||
result++;
|
||||
|
||||
@@ -62,10 +62,22 @@ int MTGAllCards::processConfLine(string s, MTGCard *card){
|
||||
}else if (key.compare("abilities")==0){
|
||||
//Specific Abilities
|
||||
std::transform( value.begin(), value.end(), value.begin(),::tolower );
|
||||
for (int j = 0; j < Constants::NB_BASIC_ABILITIES; j++){
|
||||
unsigned int found = value.find(Constants::MTGBasicAbilities[j]);
|
||||
if (found != string::npos){
|
||||
card->basicAbilities[j] = 1;
|
||||
while (value.size()){
|
||||
string attribute;
|
||||
size_t found2 = value.find(",");
|
||||
if (found2 != string::npos){
|
||||
attribute = value.substr(0,found2);
|
||||
value = value.substr(found2+1);
|
||||
}else{
|
||||
attribute = value;
|
||||
value = "";
|
||||
}
|
||||
for (int j = Constants::NB_BASIC_ABILITIES-1; j >=0 ; j--){
|
||||
size_t found = attribute.find(Constants::MTGBasicAbilities[j]);
|
||||
if (found != string::npos){
|
||||
card->basicAbilities[j] = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}else if(key.compare("id")==0){
|
||||
|
||||
@@ -225,8 +225,13 @@ MTGCardInstance * MTGMomirRule::genCreature( int id){
|
||||
}
|
||||
|
||||
int MTGMomirRule::genRandomCreatureId(int convertedCost){
|
||||
if (convertedCost > 20) return 0;
|
||||
int total_cards = pool[convertedCost].size();
|
||||
if (convertedCost > 20) convertedCost = 20;
|
||||
int total_cards = 0;
|
||||
int i = convertedCost;
|
||||
while (!total_cards && i >=0){
|
||||
total_cards = pool[i].size();
|
||||
i--;
|
||||
}
|
||||
if (!total_cards) return 0;
|
||||
int start = (rand() % total_cards);
|
||||
return pool[convertedCost][start];
|
||||
|
||||
@@ -70,6 +70,7 @@ void SimpleMenuItem::Relocate(int x, int y)
|
||||
|
||||
int SimpleMenuItem::GetWidth()
|
||||
{
|
||||
mFont->SetScale(1.0);
|
||||
return mFont->GetStringWidth(mText.c_str());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user