当前位置: 首页>>代码示例>>C++>>正文


C++ SimpleAI类代码示例

本文整理汇总了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;
    }
开发者ID:Eralan,项目名称:Darkcore,代码行数:29,代码来源:molten_core.cpp

示例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;
    }
开发者ID:FirstCore,项目名称:FunCore,代码行数:15,代码来源:boss_lady_vashj.cpp

示例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);

}
开发者ID:MarkJr94,项目名称:checkers,代码行数:19,代码来源:AI_test.cpp

示例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;
}
开发者ID:megamage,项目名称:mangos,代码行数:37,代码来源:molten_core.cpp


注:本文中的SimpleAI类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。