The open source repository for the action RPG game in development by Sig Productions titled 'Adventures in Lestoria'! https://forums.lestoria.net
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
AdventuresInLestoria/Crawler/MonsterData.cpp

57 lines
2.6 KiB

#include "olcPixelGameEngine.h"
#include "Monster.h"
#include "Animation.h"
std::map<MonsterName,MonsterData>MONSTER_DATA={
{SLIME_GREEN,MonsterData(MonsterName::SLIME_GREEN,10,5,
{{AnimationState::GREEN_SLIME_IDLE,AnimationState::GREEN_SLIME_JUMP,AnimationState::GREEN_SLIME_ROLL,AnimationState::GREEN_SLIME_DIE,AnimationState::GREEN_SLIME_SPIT}},AnimationState::GREEN_SLIME_JUMP,AnimationState::GREEN_SLIME_SPIT,AnimationState::GREEN_SLIME_DIE
,1.1f,0.8f,MonsterStrategy::RUN_TOWARDS,5)},
{SLIME_BLUE,MonsterData(MonsterName::SLIME_BLUE,30,10,{{AnimationState::BLUE_SLIME_IDLE,AnimationState::BLUE_SLIME_JUMP,AnimationState::BLUE_SLIME_ROLL,AnimationState::BLUE_SLIME_DIE,AnimationState::BLUE_SLIME_SPIT}},AnimationState::BLUE_SLIME_JUMP,AnimationState::BLUE_SLIME_SPIT,AnimationState::BLUE_SLIME_DIE
,0.8f,1.0f,MonsterStrategy::SHOOT_AFAR,0)},
{SLIME_RED,MonsterData(MonsterName::SLIME_RED,25,10,{{AnimationState::RED_SLIME_IDLE,AnimationState::RED_SLIME_JUMP,AnimationState::RED_SLIME_ROLL,AnimationState::RED_SLIME_DIE,AnimationState::RED_SLIME_SPIT}},AnimationState::RED_SLIME_JUMP,AnimationState::RED_SLIME_SPIT,AnimationState::RED_SLIME_DIE
,0.95f,1.2f,MonsterStrategy::RUN_TOWARDS,10)},
{SLIME_YELLOW,MonsterData(MonsterName::SLIME_YELLOW,175,10,{{AnimationState::YELLOW_SLIME_IDLE,AnimationState::YELLOW_SLIME_JUMP,AnimationState::YELLOW_SLIME_ROLL,AnimationState::YELLOW_SLIME_DIE,AnimationState::YELLOW_SLIME_SPIT}},AnimationState::YELLOW_SLIME_JUMP,AnimationState::YELLOW_SLIME_SPIT,AnimationState::YELLOW_SLIME_DIE
,0.4f,1.6f,MonsterStrategy::RUN_TOWARDS,15)},
};
MonsterData::MonsterData(){}
MonsterData::MonsterData(MonsterName type,int hp,int atk,std::vector<AnimationState>animations,AnimationState jumpAnimation,AnimationState shootAnimation,AnimationState deathAnimation
,float moveSpd,float size,MonsterStrategy strategy,int collisionDmg):
type(type),hp(hp),atk(atk),moveSpd(moveSpd),size(size),strategy(strategy),animations(animations),collisionDmg(collisionDmg)
,jumpAnimation(jumpAnimation),shootAnimation(shootAnimation),deathAnimation(deathAnimation){
}
int MonsterData::GetHealth(){
return hp;
}
int MonsterData::GetAttack(){
return atk;
}
float MonsterData::GetMoveSpdMult(){
return moveSpd;
}
float MonsterData::GetSizeMult(){
return size;
}
int MonsterData::GetCollisionDmg(){
return collisionDmg;
}
MonsterName MonsterData::GetType(){
return type;
}
MonsterStrategy MonsterData::GetAIStrategy(){
return strategy;
}
AnimationState MonsterData::GetJumpAnimation(){
return jumpAnimation;
}
AnimationState MonsterData::GetShootAnimation(){
return shootAnimation;
}
AnimationState MonsterData::GetDeathAnimation()
{
return deathAnimation;
}