|
|
@ -71,7 +71,7 @@ struct MonsterDropData{ |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
struct MonsterData{ |
|
|
|
struct MonsterData{ |
|
|
|
private: |
|
|
|
private: |
|
|
|
std::string name; |
|
|
|
std::string name; |
|
|
|
int hp; |
|
|
|
int hp; |
|
|
|
int atk; |
|
|
|
int atk; |
|
|
@ -88,7 +88,8 @@ struct MonsterData{ |
|
|
|
EventName deathSound=""; |
|
|
|
EventName deathSound=""; |
|
|
|
EventName walkSound=""; |
|
|
|
EventName walkSound=""; |
|
|
|
std::vector<MonsterDropData> dropData; |
|
|
|
std::vector<MonsterDropData> dropData; |
|
|
|
public: |
|
|
|
bool isNPC=false; |
|
|
|
|
|
|
|
public: |
|
|
|
MonsterData(); |
|
|
|
MonsterData(); |
|
|
|
MonsterData(std::string name,int hp,int atk,const uint32_t xp,std::vector<std::string>animations,std::vector<MonsterDropData>drops,float moveSpd=1.0f,float size=1.0f,std::string strategy="Run Towards",int collisionDmg=0); |
|
|
|
MonsterData(std::string name,int hp,int atk,const uint32_t xp,std::vector<std::string>animations,std::vector<MonsterDropData>drops,float moveSpd=1.0f,float size=1.0f,std::string strategy="Run Towards",int collisionDmg=0); |
|
|
|
int GetHealth(); |
|
|
|
int GetHealth(); |
|
|
@ -105,6 +106,7 @@ struct MonsterData{ |
|
|
|
const EventName&GetHurtSound(); |
|
|
|
const EventName&GetHurtSound(); |
|
|
|
const EventName&GetDeathSound(); |
|
|
|
const EventName&GetDeathSound(); |
|
|
|
const EventName&GetWalkSound(); |
|
|
|
const EventName&GetWalkSound(); |
|
|
|
|
|
|
|
const bool IsNPC()const; |
|
|
|
std::vector<std::string>GetAnimations(){ |
|
|
|
std::vector<std::string>GetAnimations(){ |
|
|
|
return animations; |
|
|
|
return animations; |
|
|
|
} |
|
|
|
} |
|
|
@ -193,6 +195,7 @@ public: |
|
|
|
void RotateTowardsPos(const vf2d&targetPos); |
|
|
|
void RotateTowardsPos(const vf2d&targetPos); |
|
|
|
const float GetDamageReductionFromBuffs()const; |
|
|
|
const float GetDamageReductionFromBuffs()const; |
|
|
|
const float GetCollisionDamage()const; |
|
|
|
const float GetCollisionDamage()const; |
|
|
|
|
|
|
|
const bool IsNPC()const; |
|
|
|
private: |
|
|
|
private: |
|
|
|
std::string name; |
|
|
|
std::string name; |
|
|
|
vf2d pos; |
|
|
|
vf2d pos; |
|
|
|