Erwan
- Added name effect for Momir - Fixed a couple bugs with "moveTo", see test/Amugaba.txt
This commit is contained in:
@@ -55,6 +55,7 @@ class AIPlayer: public Player{
|
||||
int interruptIfICan();
|
||||
int chooseAttackers();
|
||||
int chooseBlockers();
|
||||
int canFirstStrikeKill(MTGCardInstance * card, MTGCardInstance *ennemy);
|
||||
int effectBadOrGood(MTGCardInstance * card);
|
||||
int getCreaturesInfo(Player * player, int neededInfo = INFO_NBCREATURES , int untapMode = 0, int canAttack = 0);
|
||||
AIStats * getStats();
|
||||
|
||||
@@ -270,6 +270,45 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
//Moves Cards from a zone to another
|
||||
//TODO: this looks awfully similar to the equivalent targetAbility...woudln't there be a way to merge them ?
|
||||
class AZoneSelfMover:public ActivatedAbility{
|
||||
|
||||
public:
|
||||
string destinationZone;
|
||||
|
||||
AZoneSelfMover(int _id, MTGCardInstance * _source,string destZone, ManaCost * _cost = NULL, int _tap=0):ActivatedAbility(_id,_source,_cost,0,_tap){
|
||||
destinationZone = destZone;
|
||||
}
|
||||
|
||||
int resolve(){
|
||||
MTGCardInstance * _target = source;
|
||||
if(_target){
|
||||
Player* p = _target->controller();
|
||||
if (p){
|
||||
MTGGameZone * fromZone = _target->getCurrentZone();
|
||||
MTGGameZone * destZone = MTGGameZone::stringToZone(destinationZone, source,_target);
|
||||
//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);
|
||||
Spell * spell = NEW Spell(copy);
|
||||
|
||||
spell->resolve();
|
||||
delete spell;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
p->game->putInZone(_target,fromZone,destZone);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
//Copier. TargetAbility
|
||||
class ACopier:public TargetAbility{
|
||||
public:
|
||||
|
||||
@@ -127,6 +127,9 @@ private:
|
||||
int genRandomCreatureId(int convertedCost);
|
||||
static vector<int> pool[20];
|
||||
static int initialized;
|
||||
|
||||
int textAlpha;
|
||||
string text;
|
||||
public:
|
||||
|
||||
int alreadyplayed;
|
||||
@@ -134,6 +137,7 @@ public:
|
||||
MTGCardInstance * genCreature(int id);
|
||||
int testDestroy();
|
||||
void Update(float dt);
|
||||
void Render();
|
||||
MTGMomirRule(int _id, MTGAllCards * _collection);
|
||||
int isReactingToClick(MTGCardInstance * card, ManaCost * mana = NULL);
|
||||
int reactToClick(MTGCardInstance * card);
|
||||
|
||||
Reference in New Issue
Block a user