Erwan
- Fixed a few bugs (animate dead(RV), Goblins Deathraiders(ALA), Druid of Anima(ALA))
This commit is contained in:
@@ -201,9 +201,9 @@ toughness=3
|
|||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
text={T}: Add {R}, {G}, or {W} to your mana pool.
|
text={T}: Add {R}, {G}, or {W} to your mana pool.
|
||||||
auto={T]:Add {R}
|
auto={T}:Add {R}
|
||||||
auto={T]:Add {G}
|
auto={T}:Add {G}
|
||||||
auto={T]:Add {W}
|
auto={T}:Add {W}
|
||||||
id=174903
|
id=174903
|
||||||
name=Druid of the Anima
|
name=Druid of the Anima
|
||||||
rarity=C
|
rarity=C
|
||||||
@@ -294,6 +294,7 @@ subtype=Forest
|
|||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
text=Trample
|
text=Trample
|
||||||
|
abilities=trample
|
||||||
id=177596
|
id=177596
|
||||||
name=Goblin Deathraiders
|
name=Goblin Deathraiders
|
||||||
rarity=C
|
rarity=C
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ afflict.txt
|
|||||||
anarchy.txt
|
anarchy.txt
|
||||||
animate_dead.txt
|
animate_dead.txt
|
||||||
animate_dead2.txt
|
animate_dead2.txt
|
||||||
|
animate_dead3.txt
|
||||||
ankh_of_mishra.txt
|
ankh_of_mishra.txt
|
||||||
ardakar_wastes.txt
|
ardakar_wastes.txt
|
||||||
ascendant_evincar.txt
|
ascendant_evincar.txt
|
||||||
|
|||||||
@@ -1743,6 +1743,7 @@ class AAnimateDead:public MTGAbility{
|
|||||||
int destroy(){
|
int destroy(){
|
||||||
MTGCardInstance * card = (MTGCardInstance *) target;
|
MTGCardInstance * card = (MTGCardInstance *) target;
|
||||||
card->power++;
|
card->power++;
|
||||||
|
card->controller()->game->putInZone(card, card->controller()->game->inPlay,card->owner->game->graveyard);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -72,11 +72,8 @@ class GameObserver{
|
|||||||
void addObserver(MTGAbility * observer);
|
void addObserver(MTGAbility * observer);
|
||||||
void removeObserver(ActionElement * observer);
|
void removeObserver(ActionElement * observer);
|
||||||
void startGame(int shuffle = 1, int draw = 1);
|
void startGame(int shuffle = 1, int draw = 1);
|
||||||
void nextStep();
|
|
||||||
void untapPhase();
|
void untapPhase();
|
||||||
void draw();
|
void draw();
|
||||||
int canPutInPlay(MTGCardInstance * card);
|
|
||||||
void putInPlay(MTGCardInstance * card);
|
|
||||||
int isInPlay(MTGCardInstance * card);
|
int isInPlay(MTGCardInstance * card);
|
||||||
int isACreature(MTGCardInstance * card);
|
int isACreature(MTGCardInstance * card);
|
||||||
int tryToTapOrUntap(MTGCardInstance * card);
|
int tryToTapOrUntap(MTGCardInstance * card);
|
||||||
|
|||||||
@@ -222,11 +222,6 @@ void GameObserver::Render(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void GameObserver::nextStep(){
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void GameObserver::ButtonPressed (int controllerId, PlayGuiObject * _object){
|
void GameObserver::ButtonPressed (int controllerId, PlayGuiObject * _object){
|
||||||
@@ -345,67 +340,8 @@ TargetChooser * GameObserver::getCurrentTargetChooser(){
|
|||||||
return targetChooser;
|
return targetChooser;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Check if it is possible to put a card into play
|
|
||||||
//TODO : improve according to spells in game...
|
|
||||||
int GameObserver::canPutInPlay(MTGCardInstance * card){
|
|
||||||
Player * player = currentlyActing();
|
|
||||||
LOG("CANPUTINPLAY- check if card belongs to current player\n");
|
|
||||||
if (!player->game->hand->hasCard(card)) return 0;
|
|
||||||
LOG("CANPUTINPLAY- check if card is land or can be played\n");
|
|
||||||
if (card->hasType("land")){
|
|
||||||
LOG("CANPUTINPLAY- card is land - check if can be played\n");
|
|
||||||
if (player == currentPlayer && currentPlayer->canPutLandsIntoPlay && (currentGamePhase == Constants::MTG_PHASE_FIRSTMAIN || currentGamePhase == Constants::MTG_PHASE_SECONDMAIN)){
|
|
||||||
LOG("CANPUTINPLAY- Land, ok\n");
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}else if ((card->hasType("instant")) || card->has(Constants::FLASH) || (player == currentPlayer && (currentGamePhase == Constants::MTG_PHASE_FIRSTMAIN || currentGamePhase == Constants::MTG_PHASE_SECONDMAIN))){
|
|
||||||
LOG("CANPUTINPLAY- correct time to play\n");
|
|
||||||
if (checkManaCost(card)){
|
|
||||||
LOG("CANPUTINPLAY- ManaCost ok\n");
|
|
||||||
if (targetListIsSet(card)){
|
|
||||||
#ifdef LOG
|
|
||||||
LOG("CANPUTINPLAY- Targets chosen -> OK\n");
|
|
||||||
#endif
|
|
||||||
return 1;
|
|
||||||
}else{
|
|
||||||
#ifdef LOG
|
|
||||||
LOG("CANPUTINPLAY- Targets not chosen yet\n");
|
|
||||||
#endif
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void GameObserver::putInPlay(MTGCardInstance * card){
|
|
||||||
Player * player = currentlyActing();
|
|
||||||
ManaCost * previousManaPool = NEW ManaCost(player->getManaPool());
|
|
||||||
player->getManaPool()->pay(card->getManaCost());
|
|
||||||
ManaCost * spellCost = previousManaPool->Diff(player->getManaPool());
|
|
||||||
delete previousManaPool;
|
|
||||||
if (card->hasType("land")){
|
|
||||||
Spell * spell = NEW Spell(card);
|
|
||||||
player->game->putInZone(card, player->game->hand, player->game->stack);
|
|
||||||
spell->resolve();
|
|
||||||
delete spellCost;
|
|
||||||
delete spell;
|
|
||||||
}else{
|
|
||||||
if (targetChooser){
|
|
||||||
mLayers->stackLayer()->addSpell(card,targetChooser->targets,targetChooser->cursor, spellCost);
|
|
||||||
delete targetChooser;
|
|
||||||
targetChooser = NULL;
|
|
||||||
}else{
|
|
||||||
mLayers->stackLayer()->addSpell(card,NULL,0, spellCost);
|
|
||||||
}
|
|
||||||
player->game->putInZone(card, player->game->hand, player->game->stack);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Returns true if the card is in one of the player's play zone */
|
/* Returns true if the card is in one of the player's play zone */
|
||||||
int GameObserver::isInPlay(MTGCardInstance * card){
|
int GameObserver::isInPlay(MTGCardInstance * card){
|
||||||
for (int i = 0; i < 2; i++){
|
for (int i = 0; i < 2; i++){
|
||||||
@@ -415,7 +351,6 @@ int GameObserver::isInPlay(MTGCardInstance * card){
|
|||||||
}
|
}
|
||||||
|
|
||||||
void GameObserver::draw(){
|
void GameObserver::draw(){
|
||||||
//TODO checks to allow multiple draw, or no draw, etc...
|
|
||||||
currentPlayer->game->drawFromLibrary();
|
currentPlayer->game->drawFromLibrary();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user