#pragma once
#include "Entity.h"
class CS_Boss_SoapKingMagicFloor_FloatFloor;
#define CS_BOSS_SOAPKING_CREATENAME L"CS_boss_soapking"

struct PressFloorMagic
{
    float x;
    float y;
    float angle;
    int count;
    float pressAngle;
};

//Boss：肥皂王
class CS_Boss_SoapKing :
    public ActionEntity
{
public:
    CS_Boss_SoapKing();
    void Init(std::weak_ptr<Entity> self) override;
    void Step() override;
    void SetState(int stateID, int lr) override;
    void SetState(std::wstring stateName, int lr) override;
    void Attack(std::weak_ptr<Entity> dst, int* outDamage, float* outAngle, bool* outTakedown, int* outElemType, float* outShockForce, float* outHeavy) override;
    bool Hurt(std::weak_ptr<Entity> src, int getDamage, float angle, bool bTakedown, int elemType, float shockForce, float heavy, int* outRealDamage) override;
    int stateID = 0;
    //图层显示
    float animation_moveSpeed = 0x200 / ts;
    bool animation_delay = false;//走路动画延迟一帧（对齐到整格）
    std::weak_ptr<Entity> target;
    std::weak_ptr<CS_Boss_SoapKingMagicFloor_FloatFloor> floor;
    bool bFixOnFloor = false;
    float bFloorY = 0;
    float bFloorX = 0;
    std::list<PressFloorMagic> pfmList;
    int lightning_counter = 0;
    int flashcounter = 0;
    bool enableflash = false;
    bool bNormalMode = false;
};

std::shared_ptr<Entity> CreateCS_Boss_SoapKing();