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:
@@ -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();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user