本文整理汇总了C++中SimpleAI类的典型用法代码示例。如果您正苦于以下问题:C++ SimpleAI类的具体用法?C++ SimpleAI怎么用?C++ SimpleAI使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了SimpleAI类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetAI
CreatureAI* GetAI(Creature* creature) const
{
SimpleAI* ai = new SimpleAI(creature);
ai->Spell[0].Enabled = true;
ai->Spell[0].Spell_Id = SPELL_CONE_OF_FIRE;
ai->Spell[0].Cooldown = 7000;
ai->Spell[0].First_Cast = 10000;
ai->Spell[0].Cast_Target_Type = CAST_HOSTILE_TARGET;
uint32 RandDebuff = RAND(SPELL_GROUND_STOMP, SPELL_ANCIENT_DREAD, SPELL_CAUTERIZING_FLAMES,
SPELL_WITHERING_HEAT, SPELL_ANCIENT_DESPAIR, SPELL_ANCIENT_HYSTERIA);
ai->Spell[1].Enabled = true;
ai->Spell[1].Spell_Id = RandDebuff;
ai->Spell[1].Cooldown = 24000;
ai->Spell[1].First_Cast = 15000;
ai->Spell[1].Cast_Target_Type = CAST_HOSTILE_TARGET;
ai->Spell[2].Enabled = true;
ai->Spell[2].Spell_Id = SPELL_BITE;
ai->Spell[2].Cooldown = 6000;
ai->Spell[2].First_Cast = 4000;
ai->Spell[2].Cast_Target_Type = CAST_HOSTILE_TARGET;
ai->EnterEvadeMode();
return ai;
}
示例2: GetAI
CreatureAI* GetAI(Creature* creature) const
{
SimpleAI* ai = new SimpleAI (creature);
ai->Spell[0].Enabled = true;
ai->Spell[0].Spell_Id = 31345; //Cleave
ai->Spell[0].Cooldown = 15000;
ai->Spell[0].CooldownRandomAddition = 5000;
ai->Spell[0].First_Cast = 5000;
ai->Spell[0].Cast_Target_Type = CAST_HOSTILE_RANDOM;
ai->EnterEvadeMode();
return ai;
}
示例3: testmJump
void testmJump() {
using std::cout;
using std::endl;
Game g(false, false);
SimpleAI a;
Move move;
do {
cout << "P1: " << g.getP1score() <<"P2: " << g.getP2score() << endl;
g.print();
move = a.evaluate_game(g);
cout << errorTable[g.move(move)];
} while (g.getP1score() > 0 && g.getP2score() > 0);
}
示例4: GetAI_mob_ancient_core_hound
CreatureAI* GetAI_mob_ancient_core_hound(Creature *_Creature)
{
SimpleAI *ai = new SimpleAI(_Creature);
ai->Spell[0].Enabled = true;
ai->Spell[0].Spell_Id = SPELL_CONE_OF_FIRE;
ai->Spell[0].Cooldown = 7000;
ai->Spell[0].First_Cast = 10000;
ai->Spell[0].Cast_Target_Type = CAST_HOSTILE_TARGET;
uint32 RandDebuff;
switch(rand()%6)
{
case 0 : RandDebuff = SPELL_GROUND_STOMP; break;
case 1 : RandDebuff = SPELL_ANCIENT_DREAD; break;
case 2 : RandDebuff = SPELL_CAUTERIZING_FLAMES; break;
case 3 : RandDebuff = SPELL_WITHERING_HEAT; break;
case 4 : RandDebuff = SPELL_ANCIENT_DESPAIR; break;
case 5 : RandDebuff = SPELL_ANCIENT_HYSTERIA; break;
}
ai->Spell[1].Enabled = true;
ai->Spell[1].Spell_Id = RandDebuff;
ai->Spell[1].Cooldown = 24000;
ai->Spell[1].First_Cast = 15000;
ai->Spell[1].Cast_Target_Type = CAST_HOSTILE_TARGET;
ai->Spell[2].Enabled = true;
ai->Spell[2].Spell_Id = SPELL_BITE;
ai->Spell[2].Cooldown = 6000;
ai->Spell[2].First_Cast = 4000;
ai->Spell[2].Cast_Target_Type = CAST_HOSTILE_TARGET;
ai->EnterEvadeMode();
return ai;
}