From ba3ca7018b1a04b3a9296c761e48ebc408228a75 Mon Sep 17 00:00:00 2001 From: "omegablast2002@yahoo.com" Date: Sat, 4 Dec 2010 21:12:58 +0000 Subject: [PATCH] reduced the Eff by 50 up from 20 on Adrawer, and reduced to 0 if more then 10 cards in hand, theres too high of a chance that Ai will not be able to actually cast any of that and is just milling himself. --- projects/mtg/src/AIPlayer.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/projects/mtg/src/AIPlayer.cpp b/projects/mtg/src/AIPlayer.cpp index d102fa569..bc990a3cd 100644 --- a/projects/mtg/src/AIPlayer.cpp +++ b/projects/mtg/src/AIPlayer.cpp @@ -510,12 +510,13 @@ int AIAction::getEfficiency() //eff of drawing ability is calculated by base 20 + the amount of cards in library minus the amount of cards in hand times 7. //drawing is never going to return a hundred eff because later eff is multiplied by 1.3 if no cards in hand. efficiency = int(20 + p->game->library->nb_cards) - int(p->game->hand->nb_cards * 7); - if(p->game->hand->nb_cards > 8)//reduce by 20 if cards in hand are over 8, high chance ai cant play them. + if(p->game->hand->nb_cards > 8)//reduce by 50 if cards in hand are over 8, high chance ai cant play them. { - efficiency -= 20; + efficiency -= 50; } - if(a->nbcardAmount >= p->game->library->nb_cards)//if the amount im drawing will mill me to death, eff is 0; + if(a->nbcardAmount >= p->game->library->nb_cards || p->game->hand->nb_cards > 10) { + //if the amount im drawing will mill me to death or i have more then 10 cards in hand, eff is 0; efficiency = 0; } break;