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