#pragma once
#include "CS_MyCharAi.h"
#include "CS_Ai_AtkZone.h"
#define CS_SANTAAI_CREATENAME L"CS_santa_ai"
class CS_Santa;
//战斗的boss对象
class CS_Boss_ControlCore;
//桑塔AI
class CS_SantaAi :
    public CS_MyCharAi
{
public:
    CS_SantaAi();
    void Init(std::weak_ptr<Entity> self) override;
    void Step() override;
    void SetState(std::wstring stateName, int lr) override;
    void Destroy() override;
    bool AttackAround() override;//攻击周围的敌人
    void FaceAtWind();//面向水流方向
    //攻击区域
    std::weak_ptr<CS_Ai_AtkZone> atkZone;
    std::vector<std::weak_ptr<Entity>> enemyList;
    int atk_interval_counter = 0;
    int atk_interval_counter_max = 8;
    int stateID = 0;
    std::weak_ptr<CS_Boss_ControlCore> controlCore;
    void FightControlCore();
    void FightPuuTala();
    bool StaticAttack(std::weak_ptr<Entity> e);
    bool MovingAttack(std::weak_ptr<Entity> e);
    bool FilterEnemy();
    std::weak_ptr<Entity> GetClosestEnemy(float* outDis = nullptr);
    std::weak_ptr<Entity> GetPlayer();
    void SkillAttack(std::shared_ptr<CS_Santa>& mychar);
    std::list<GameInput> shadowOpList;
};

std::shared_ptr<Entity> CreateCS_SantaAi();
