* Add a plasma effect on the cards back
This commit is contained in:
jean.chalard
2009-05-30 14:06:52 +00:00
parent 5de26cc509
commit b4d040b263
13 changed files with 145 additions and 51 deletions
+29 -31
View File
@@ -33,7 +33,7 @@ MTGAbility * AIMomirPlayer::getMomirAbility(){
}
int AIMomirPlayer::momir(){
if (!game->hand->nb_cards) return 0; //nothing to discard :/
if (!game->hand->nb_cards) return 0; //nothing to discard :/
int result = 0;
int opponentCreatures = getCreaturesInfo(opponent(), INFO_NBCREATURES);
int myCreatures = getCreaturesInfo(this, INFO_NBCREATURES );
@@ -68,9 +68,9 @@ int AIMomirPlayer::computeActions(){
Another gift from Alex Majlaton on my first day playing Momir, and it has served me well ever since. It goes a little something like this: (a) if you are on the play, hit your Two through Four, skip your Five, and then hit all the way to Eight; (b) if you are on the draw and your opponent skips his One, you make Two through Eight; (c) if you are on the draw and your opponent hits a One, you match him drop-for-drop for the rest of the game.
You skip your Five on the play because it is the weakest drop. There are plenty of serviceable guys there, but very few bombs compared to other drops
the general rule is this: if you want to get to Eight, you have to skip two drops on the play and one drop on the draw.
the general rule is this: if you want to get to Eight, you have to skip two drops on the play and one drop on the draw.
*/
GameObserver * g = GameObserver::GetInstance();
GameObserver * g = GameObserver::GetInstance();
Player * p = g->currentPlayer;
if (!(g->currentlyActing() == this)) return 0;
if (chooseTarget()) return 1;
@@ -81,38 +81,36 @@ GameObserver * g = GameObserver::GetInstance();
}else if (p == this && g->mLayers->stackLayer()->count(0,NOT_RESOLVED) == 0){ //standard actions
CardDescriptor cd;
MTGCardInstance * card = NULL;
//No mana, try to get some
getPotentialMana();
//No mana, try to get some
getPotentialMana();
switch(currentGamePhase){
case Constants::MTG_PHASE_FIRSTMAIN:
if (canPutLandsIntoPlay && (potentialMana->getConvertedCost() <8 || game->hand->nb_cards > 1) ){
//Attempt to put land into play
cd.init();
cd.setColor(Constants::MTG_COLOR_LAND);
card = cd.match(game->hand);
if (card){
MTGAbility * putIntoPlay = g->mLayers->actionLayer()->getAbility(MTGAbility::PUT_INTO_PLAY);
AIAction * a = NEW AIAction(putIntoPlay,card); //TODO putinplay action
clickstream.push(a);
return 1;
}
}
momir();
return 1;
break;
case Constants::MTG_PHASE_SECONDMAIN:
selectAbility();
return 1;
break;
default:
return AIPlayerBaka::computeActions();
break;
}
}else{
return AIPlayerBaka::computeActions();
if (canPutLandsIntoPlay && (potentialMana->getConvertedCost() <8 || game->hand->nb_cards > 1) ){
//Attempt to put land into play
cd.init();
cd.setColor(Constants::MTG_COLOR_LAND);
card = cd.match(game->hand);
if (card){
MTGAbility * putIntoPlay = g->mLayers->actionLayer()->getAbility(MTGAbility::PUT_INTO_PLAY);
AIAction * a = NEW AIAction(putIntoPlay,card); //TODO putinplay action
clickstream.push(a);
return 1;
}
}
momir();
return 1;
break;
case Constants::MTG_PHASE_SECONDMAIN:
selectAbility();
return 1;
break;
default:
return AIPlayerBaka::computeActions();
break;
}
}
return AIPlayerBaka::computeActions();
}
/*