added HINT:castpriority(blah,blah,blah,blah,ect)

this is a method to set the order in which ai decides to play cards, you can for example tell ai to look for 2 instants, before trying to find a creature.
be sure to list all main types of the deck otherwise ai will pass on stuff
this is the current
const char* types[] = {"planeswalker","creature", "enchantment", "artifact", "sorcery", "instant"};

so be sure you include them if the decks need them.
other the above example would be coded
HINT:castpriority(instant,instant,creature,planeswalker,enchantment,artifact,sorcery)

as you can see this deck will now look for and play if possible, 2 instants before any of the other types.
this will really help with decks which rely on cards like dark ritual to produce mana to cast creature, simply by listing instant before creature. if the deck had dark rituals, in the above example, and it had them in hand, it would then cast dark ritual, dark ritual, then one of the remaining types. this is actually tested not just assumed.
This commit is contained in:
omegablast2002@yahoo.com
2012-04-06 23:10:11 +00:00
parent e4d6f83191
commit 864727b208
3 changed files with 49 additions and 11 deletions

View File

@@ -17,6 +17,7 @@ public:
string mCondition;
string mAction;
string mCombatAttackTip;
vector<string>castOrder;
int mSourceId;
AIHint(string line);
};
@@ -38,6 +39,7 @@ public:
AIHints (AIPlayerBaka * player);
AIAction * suggestAbility(ManaCost * potentialMana);
bool HintSaysDontAttack(GameObserver* observer,MTGCardInstance * card = NULL);
vector<string> mCastOrder();
void add(string line);
~AIHints();
};