Bear strategy implemented. Release Build 5823.

pull/30/head
sigonasr2 11 months ago
parent b7ef0c8712
commit 86925ef031
  1. 7
      Adventures in Lestoria/AdventuresInLestoria.cpp
  2. 5
      Adventures in Lestoria/AdventuresInLestoria.h
  3. 2
      Adventures in Lestoria/Animation.cpp
  4. 51
      Adventures in Lestoria/Bear.cpp
  5. 30
      Adventures in Lestoria/Frog.cpp
  6. 37
      Adventures in Lestoria/Monster.cpp
  7. 10
      Adventures in Lestoria/Monster.h
  8. 55
      Adventures in Lestoria/MonsterData.cpp
  9. 2
      Adventures in Lestoria/RunTowards.cpp
  10. 5
      Adventures in Lestoria/SlimeKing.cpp
  11. 2
      Adventures in Lestoria/Version.h
  12. 15
      Adventures in Lestoria/assets/config/MonsterStrategies.txt
  13. 73
      Adventures in Lestoria/assets/config/Monsters.txt
  14. 5
      Adventures in Lestoria/assets/config/audio/events.txt
  15. 1
      Adventures in Lestoria/assets/config/gfx/gfx.txt
  16. BIN
      Adventures in Lestoria/assets/monsters/Bear.png
  17. BIN
      Adventures in Lestoria/assets/monsters/Slime King - Cast.png
  18. BIN
      Adventures in Lestoria/assets/monsters/Slime King.png
  19. BIN
      Adventures in Lestoria/assets/sounds/bear_slam.ogg
  20. 4
      Adventures in Lestoria/util.cpp
  21. 5
      Adventures in Lestoria/util.h
  22. BIN
      x64/Release/Adventures in Lestoria.exe

@ -659,12 +659,15 @@ void AiL::UpdateBullets(float fElapsedTime){
}
std::erase_if(BULLET_LIST,[](std::unique_ptr<Bullet>&b){return b->dead;});
}
void AiL::HurtEnemies(vf2d pos,float radius,int damage,bool upperLevel,float z){
const MonsterHurtList AiL::HurtEnemies(vf2d pos,float radius,int damage,bool upperLevel,float z){
MonsterHurtList hitList;
for(Monster&m:MONSTER_LIST){
if(geom2d::overlaps(geom2d::circle(pos,radius),geom2d::circle(m.GetPos(),12*m.GetSizeMult()))){
m.Hurt(damage,upperLevel,z);
HurtReturnValue returnVal=m.Hurt(damage,upperLevel,z);
hitList.push_back({&m,returnVal});
}
}
return hitList;
}
void AiL::PopulateRenderLists(){

@ -59,6 +59,9 @@ All rights reserved.
#define CreateBullet(type) BULLET_LIST.push_back(std::make_unique<type>(type
#define EndBullet ));
using HurtReturnValue=bool;
using MonsterHurtList=std::vector<std::pair<Monster*,HurtReturnValue>>;
class AiL : public olc::PixelGameEngine
{
friend class GameState;
@ -150,7 +153,7 @@ public:
void AddEffect(std::unique_ptr<Effect>foreground,std::unique_ptr<Effect>background);
//If back is true, places the effect in the background
void AddEffect(std::unique_ptr<Effect>foreground,bool back=false);
void HurtEnemies(vf2d pos,float radius,int damage,bool upperLevel,float z);
const MonsterHurtList HurtEnemies(vf2d pos,float radius,int damage,bool upperLevel,float z);
vf2d GetWorldMousePos();
bool LeftHeld();
bool RightHeld();

@ -233,8 +233,6 @@ void sig::Animation::InitializeAnimations(){
CreateHorizontalAnimationSequence("lightning_splash_effect.png",5,{24,24});
CreateHorizontalAnimationSequence("monsters/Slime King - Cast.png",10,{24,24},{0.04f});
CreateStillAnimation("meteor.png",{192,192});
for(int i=0;i<5;i++){

@ -45,13 +45,62 @@ All rights reserved.
INCLUDE_game
INCLUDE_BULLET_LIST
INCLUDE_GFX
INCLUDE_MONSTER_LIST
INCLUDE_MONSTER_DATA
using A=Attribute;
void Monster::STRATEGY::BEAR(Monster&m,float fElapsedTime,std::string strategy){
switch(m.I(A::PHASE)){
case 0:{
float distToPlayer=geom2d::line<float>(m.GetPos(),game->GetPlayer()->GetPos()).length();
if(distToPlayer<operator""_Pixels(ConfigFloat("Attack Range"))){
m.I(A::PHASE)=1;
m.PerformShootAnimation();
m.F(A::CASTING_TIMER)=ConfigFloat("Chargeup Time");
m.V(A::LOCKON_POS)=geom2d::line<float>(m.GetPos(),game->GetPlayer()->GetPos()).vector();
m.SetStrategyDrawFunction([&](AiL*game){
if(m.IsAlive()){
game->view.DrawRotatedDecal(m.GetPos()+m.V(A::LOCKON_POS),GFX["range_indicator.png"].Decal(),0.f,{12.f,12.f},vf2d{_GetFloat(m,"Smash Attack Diameter",MONSTER_DATA[m.GetName()].GetAIStrategy()),_GetFloat(m,"Smash Attack Diameter",MONSTER_DATA[m.GetName()].GetAIStrategy())}/100.f,{255,255,0,160});
}
});
m.RotateTowardsPos(m.GetPos()+m.V(A::LOCKON_POS));
}else{
m.target=game->GetPlayer()->GetPos();
RUN_TOWARDS(m,fElapsedTime,"Run Towards");
}
}break;
case 1:{
m.F(A::CASTING_TIMER)=std::max(0.f,m.F(A::CASTING_TIMER)-fElapsedTime);
if(m.F(A::CASTING_TIMER)==0.f){
m.I(A::PHASE)=2;
m.F(A::CASTING_TIMER)=ConfigFloat("Attack Animation Wait Time");
m.PerformOtherAnimation(0);
}
}break;
case 2:{
m.F(A::CASTING_TIMER)=std::max(0.f,m.F(A::CASTING_TIMER)-fElapsedTime);
if(m.F(A::CASTING_TIMER)==0.f){
SoundEffect::PlaySFX("Bear Slam Attack",m.GetPos()+m.V(A::LOCKON_POS));
m.I(A::PHASE)=0;
geom2d::circle<float>attackCircle={m.GetPos()+m.V(A::LOCKON_POS),float(operator""_Pixels(ConfigFloat("Smash Attack Diameter"))/2.f)};
float lockOnDistToPlayer=geom2d::line<float>(m.V(A::LOCKON_POS),game->GetPlayer()->GetPos()).length();
if(geom2d::overlaps(attackCircle,game->GetPlayer()->Hitbox())){
if(game->GetPlayer()->Hurt(m.GetAttack(),m.OnUpperLevel(),0.f)){
game->GetPlayer()->Knockup(ConfigFloat("Attack Knockup Duration"));
}
}
for(Monster&otherM:MONSTER_LIST){
if(!otherM.AttackAvoided(m.GetZ())&&&m!=&otherM&&
geom2d::overlaps(attackCircle,otherM.Hitbox())){
otherM.Knockup(ConfigFloat("Attack Knockup Duration"));
}
}
m.spriteRot=0.f;
game->SetupWorldShake(0.2f);
m.SetStrategyDrawFunction([&](AiL*game){});
}
}break;
}
}

@ -58,36 +58,10 @@ void Monster::STRATEGY::FROG(Monster&m,float fElapsedTime,std::string strategy){
m.I(A::PHASE)++;
m.F(A::LOCKON_WAITTIME)=ConfigFloat("Lockon Wait Time");
m.V(A::LOCKON_POS)=game->GetPlayer()->GetPos();
float dirToPlayer=util::angleTo(m.GetPos(),m.V(A::LOCKON_POS));
#pragma region Face towards lockon direction
if(abs(dirToPlayer)<0.5f*PI){ //This sprite is supposed to be facing right (flipped)
m.facingDirection=RIGHT;
m.spriteRot=dirToPlayer;
}else{
m.facingDirection=LEFT;
if(dirToPlayer>0){
m.spriteRot=-PI+dirToPlayer;
}else{
m.spriteRot=PI+dirToPlayer;
}
}
#pragma endregion
m.RotateTowardsPos(m.V(A::LOCKON_POS));
goto phase;
}
float dirToPlayer=util::angleTo(m.GetPos(),m.target);
#pragma region Face towards target direction
if(abs(dirToPlayer)<0.5f*PI){ //This sprite is supposed to be facing right (flipped)
m.facingDirection=RIGHT;
m.spriteRot=dirToPlayer;
}else{
m.facingDirection=LEFT;
if(dirToPlayer>0){
m.spriteRot=-PI+dirToPlayer;
}else{
m.spriteRot=PI+dirToPlayer;
}
}
#pragma endregion
m.RotateTowardsPos(m.target);
RUN_TOWARDS(m,fElapsedTime,"Run Towards");
m.PerformJumpAnimation();
}break;

@ -109,9 +109,6 @@ float Monster::GetSizeMult(){
Animate2D::Frame Monster::GetFrame(){
return animation.GetFrame(internal_animState);
}
void Monster::UpdateAnimation(std::string state){
animation.ChangeState(internal_animState,state);
}
void Monster::PerformJumpAnimation(){
animation.ChangeState(internal_animState,MONSTER_DATA[name].GetJumpAnimation());
}
@ -121,6 +118,9 @@ void Monster::PerformShootAnimation(){
void Monster::PerformIdleAnimation(){
animation.ChangeState(internal_animState,MONSTER_DATA[name].GetIdleAnimation());
}
void Monster::PerformOtherAnimation(const uint8_t otherInd){
animation.ChangeState(internal_animState,MONSTER_DATA[name].GetAnimations()[4+otherInd]);
}
bool Monster::_SetX(float x,const bool monsterInvoked){
vf2d newPos={x,pos.y};
vi2d tilePos=vi2d(newPos/float(game->GetCurrentMapData().tilewidth))*game->GetCurrentMapData().tilewidth;
@ -380,8 +380,12 @@ void Monster::Moved(){
std::string Monster::GetDeathAnimationName(){
return MONSTER_DATA[name].GetDeathAnimation();
}
const bool Monster::AttackAvoided(const float attackZ)const{
return HasIframes()||abs(GetZ()-attackZ)>1;
}
bool Monster::Hurt(int damage,bool onUpperLevel,float z){
if(!IsAlive()||onUpperLevel!=OnUpperLevel()||HasIframes()||abs(GetZ()-z)>1) return false;
if(!IsAlive()||onUpperLevel!=OnUpperLevel()||AttackAvoided(z)) return false;
if(game->InBossEncounter()){
game->StartBossEncounter();
}
@ -537,11 +541,11 @@ void Monster::SetState(State::State newState){
state=newState;
}
bool Monster::HasIframes(){
const bool Monster::HasIframes()const{
return iframe_timer>0;
}
float Monster::GetZ(){
const float Monster::GetZ()const{
return z;
}
@ -618,4 +622,25 @@ void Monster::Knockup(float duration){
knockUpTimer+=duration;
totalKnockupTime+=duration;
knockUpZAmt+=32*pow(duration,2);
}
const std::string&Monster::GetName()const{
return name;
}
void Monster::RotateTowardsPos(const vf2d&targetPos){
float dirToPlayer=util::angleTo(GetPos(),targetPos);
#pragma region Face towards lockon direction
if(abs(dirToPlayer)<0.5f*PI){ //This sprite is supposed to be facing right (flipped)
facingDirection=RIGHT;
spriteRot=dirToPlayer;
}else{
facingDirection=LEFT;
if(dirToPlayer>0){
spriteRot=-PI+dirToPlayer;
}else{
spriteRot=PI+dirToPlayer;
}
}
#pragma endregion
}

@ -125,7 +125,6 @@ public:
float GetMoveSpdMult();
float GetSizeMult();
Animate2D::Frame GetFrame();
void UpdateAnimation(std::string state);
bool Update(float fElapsedTime);
//Returns true when damage is actually dealt. Provide whether or not the attack is on the upper level or not. Monsters must be on the same level to get hit by it. (there is a death check and level check here.)
//If you need to hurt multiple enemies try AiL::HurtEnemies()
@ -150,6 +149,7 @@ public:
void PerformJumpAnimation();
void PerformShootAnimation();
void PerformIdleAnimation();
void PerformOtherAnimation(const uint8_t otherInd);
bool OnUpperLevel();
void Moved();
//Returns false if a path could not be found.
@ -162,8 +162,8 @@ public:
State::State GetState();
void SetState(State::State newState);
static void InitializeStrategies();
bool HasIframes();
float GetZ();
const bool HasIframes()const;
const float GetZ()const;
void SetZ(float z);
const std::function<void(Monster&,float,std::string)>&GetStrategy()const;
void SetSize(float newSize,bool immediate=true);
@ -177,6 +177,10 @@ public:
void Knockback(const vf2d&vel);
//Knockup the player for duration amount of seconds, and Zamt pixels.
void Knockup(float duration);
const bool AttackAvoided(const float attackZ)const;
const std::string&GetName()const;
//Rotates this enemy's sprite towards a given location. Also flips it to face the correct direction.
void RotateTowardsPos(const vf2d&targetPos);
private:
std::string name;
vf2d pos;

@ -86,6 +86,14 @@ void MonsterData::InitializeMonsterData(){
walkSound=DATA["Monsters"][MonsterName]["Walk Sound"].GetString();
}
auto CreateHorizontalAnimationSequence=[&](Renderable&img,int frameCount,vf2d size,std::string state,int row,AnimationData data={}){
Animate2D::FrameSequence anim(data.frameDuration,data.style);
for(int i=0;i<frameCount;i++){
anim.AddFrame({&img,{{int(i*size.x),int(row*size.y)},size}});
}
ANIMATION_DATA[state]=anim;
};
for(int i=0;i<animations.size();i++){
std::string animationConfigName="";
std::string imgName="";
@ -110,34 +118,53 @@ void MonsterData::InitializeMonsterData(){
Animate2D::Style style=Animate2D::Style::Repeat;
if(DATA["Monsters"][MonsterName][animationConfigName+"Animation"].GetString(2)=="Repeat"){
style=Animate2D::Style::Repeat;
} else
}else
if(DATA["Monsters"][MonsterName][animationConfigName+"Animation"].GetString(2)=="OneShot"){
style=Animate2D::Style::OneShot;
} else
}else
if(DATA["Monsters"][MonsterName][animationConfigName+"Animation"].GetString(2)=="PingPong"){
style=Animate2D::Style::PingPong;
} else
}else
if(DATA["Monsters"][MonsterName][animationConfigName+"Animation"].GetString(2)=="Reverse"){
style=Animate2D::Style::Reverse;
}else{
ERR(std::format("WARNING! Invalid Animation Style specified: {}",int(style)));
}
auto CreateHorizontalAnimationSequence=[&](Renderable&img,int frameCount,vf2d size,std::string state,int row,AnimationData data={}){
Animate2D::FrameSequence anim(data.frameDuration,data.style);
for(int i=0;i<frameCount;i++){
anim.AddFrame({&img,{{int(i*size.x),int(row*size.y)},size}});
}
ANIMATION_DATA[state]=anim;
};
int frameCount = DATA["Monsters"][MonsterName][animationConfigName+"Animation"].GetInt(0);
vf2d frameSize = vf2d{float(DATA["Monsters"][MonsterName]["SheetFrameSize"].GetInt(0)),float(DATA["Monsters"][MonsterName]["SheetFrameSize"].GetInt(1))};
int frameCount=DATA["Monsters"][MonsterName][animationConfigName+"Animation"].GetInt(0);
vf2d frameSize=vf2d{float(DATA["Monsters"][MonsterName]["SheetFrameSize"].GetInt(0)),float(DATA["Monsters"][MonsterName]["SheetFrameSize"].GetInt(1))};
CreateHorizontalAnimationSequence(*MonsterData::imgs[MonsterName],frameCount,frameSize,MonsterName+imgName,i,AnimationData{float(DATA["Monsters"][MonsterName][animationConfigName+"Animation"].GetReal(1)),style});
}
//Add additional custom animations defined in the config.
int animationCounter=0;
int row=4;
while(DATA["Monsters"][MonsterName].HasProperty("ANIMATION["+std::to_string(animationCounter)+"]")){
animations.push_back(DATA["Monsters"][MonsterName]["ANIMATION["+std::to_string(animationCounter)+"]"].GetString());
animations.push_back(MonsterName+"ANIMATION["+std::to_string(animationCounter)+"]");
#pragma region Parse Animation Data
Animate2D::Style style;
if(DATA["Monsters"][MonsterName]["ANIMATION["+std::to_string(animationCounter)+"]"].GetString(2)=="Repeat"){
style=Animate2D::Style::Repeat;
}else
if(DATA["Monsters"][MonsterName]["ANIMATION["+std::to_string(animationCounter)+"]"].GetString(2)=="OneShot"){
style=Animate2D::Style::OneShot;
}else
if(DATA["Monsters"][MonsterName]["ANIMATION["+std::to_string(animationCounter)+"]"].GetString(2)=="PingPong"){
style=Animate2D::Style::PingPong;
}else
if(DATA["Monsters"][MonsterName]["ANIMATION["+std::to_string(animationCounter)+"]"].GetString(2)=="Reverse"){
style=Animate2D::Style::Reverse;
}else{
ERR(std::format("WARNING! Invalid Animation Style specified: {}",int(style)));
}
int frameCount=DATA["Monsters"][MonsterName]["ANIMATION["+std::to_string(animationCounter)+"]"].GetInt(0);
vf2d frameSize=vf2d{float(DATA["Monsters"][MonsterName]["SheetFrameSize"].GetInt(0)),float(DATA["Monsters"][MonsterName]["SheetFrameSize"].GetInt(1))};
CreateHorizontalAnimationSequence(*MonsterData::imgs[MonsterName],frameCount,frameSize,MonsterName+"ANIMATION["+std::to_string(animationCounter)+"]",row,AnimationData{float(DATA["Monsters"][MonsterName]["ANIMATION["+std::to_string(animationCounter)+"]"].GetReal(1)),style});
#pragma endregion
row++;
animationCounter++;
}

@ -78,7 +78,7 @@ void Monster::STRATEGY::RUN_TOWARDS(Monster&m,float fElapsedTime,std::string str
m.PerformJumpAnimation();
} else {
m.SetState(State::NORMAL);//Revert state once we've finished moving towards target.
m.UpdateAnimation(MONSTER_DATA[m.name].GetIdleAnimation());
m.PerformIdleAnimation();
}
}break;
case State::PATH_AROUND:{

@ -50,6 +50,7 @@ INCLUDE_game
INCLUDE_BULLET_LIST
INCLUDE_ANIMATION_DATA
INCLUDE_MONSTER_DATA
INCLUDE_GFX
using A=Attribute;
@ -215,7 +216,7 @@ void Monster::STRATEGY::SLIMEKING(Monster&m,float fElapsedTime,std::string strat
} else
if(m.F(A::JUMP_LANDING_TIMER)<=ConfigFloat("JumpWarningIndicatorTime")){
m.SetStrategyDrawFunction([&](AiL*game){
Decal*dec=ANIMATION_DATA["range_indicator.png"].GetFrame(game->GetElapsedTime()).GetSourceImage()->Decal();
Decal*dec=GFX["range_indicator.png"].Decal();
game->view.DrawRotatedDecal(m.GetPos(),dec,0,dec->sprite->Size()/2,vf2d{m.GetSizeMult(),m.GetSizeMult()},RED);
});
}
@ -223,7 +224,7 @@ void Monster::STRATEGY::SLIMEKING(Monster&m,float fElapsedTime,std::string strat
}
if(m.GetState()==State::CASTING){
m.UpdateAnimation("monsters/Slime King - Cast.png");
m.PerformOtherAnimation(0);
if(m.F(A::CASTING_TIMER)==0){
m.SetState(State::NORMAL);
m.I(A::JUMP_COUNT)++;

@ -39,7 +39,7 @@ All rights reserved.
#define VERSION_MAJOR 0
#define VERSION_MINOR 2
#define VERSION_PATCH 1
#define VERSION_BUILD 5799
#define VERSION_BUILD 5823
#define stringify(a) stringify_(a)
#define stringify_(a) #a

@ -212,6 +212,19 @@ MonsterStrategy
}
Bear
{
# How close the bear has to get to begin its attack.
Attack Range = 120
# How long the bear charges up its attack.
Chargeup Time = 1.3s
# How large the range of the attack is.
Smash Attack Diameter = 160
# How long to wait in animation time before the attack hits.
Attack Animation Wait Time = 0.6s
# How long the duration of the knockup is.
Attack Knockup Duration = 0.7s
}
}

@ -32,9 +32,10 @@ Monsters
Hurt Sound = Monster Hurt
Death Sound = Slime Dead
Walk Sound = Slime Walk
#Additional custom animations go down below. Start with ANIMATION[0]. Order is:
# Frame Count, Frame Speed (s), Frame Cycling (Repeat,OneShot,PingPong,Reverse)
#Additional custom animations go down below. Start with ANIMATION[0] Order is:
# File name, Frame Count, Frame Speed (s), Frame Cycling (Repeat,OneShot,PingPong,Reverse)
# NOTE: ANIMATION[0] will always be row 5 of an animation sheet, all numbers that follow are each below each other.
#ANIMATION[0] = 6, 0.1, Repeat
}
Blue Slime
@ -68,9 +69,11 @@ Monsters
DROP[0] = Blue Slime Remains,65%,1,2
DROP[1] = Minor Health Potion,5%,1,1
DROP[2] = Berries,5%,1,1
#Additional custom animations go down below. Start with ANIMATION[0]
#ANIMATION[0] = MY_NEW_ANIMATION
#Additional custom animations go down below. Start with ANIMATION[0] Order is:
# File name, Frame Count, Frame Speed (s), Frame Cycling (Repeat,OneShot,PingPong,Reverse)
# NOTE: ANIMATION[0] will always be row 5 of an animation sheet, all numbers that follow are each below each other.
#ANIMATION[0] = 6, 0.1, Repeat
}
Red Slime
{
@ -103,9 +106,11 @@ Monsters
DROP[0] = Red Slime Remains,65%,1,2
DROP[1] = Minor Health Potion,5%,1,1
DROP[2] = Berries,5%,1,1
#Additional custom animations go down below. Start with ANIMATION[0]
#ANIMATION[0] = MY_NEW_ANIMATION
#Additional custom animations go down below. Start with ANIMATION[0] Order is:
# File name, Frame Count, Frame Speed (s), Frame Cycling (Repeat,OneShot,PingPong,Reverse)
# NOTE: ANIMATION[0] will always be row 5 of an animation sheet, all numbers that follow are each below each other.
#ANIMATION[0] = 6, 0.1, Repeat
}
Yellow Slime
{
@ -136,9 +141,11 @@ Monsters
# Drop Item Name, Drop Percentage(0-100%), Drop Min Quantity, Drop Max Quantity
DROP[0] = Berries,5%,1,1
#Additional custom animations go down below. Start with ANIMATION[0]
#ANIMATION[0] = MY_NEW_ANIMATION
#Additional custom animations go down below. Start with ANIMATION[0] Order is:
# File name, Frame Count, Frame Speed (s), Frame Cycling (Repeat,OneShot,PingPong,Reverse)
# NOTE: ANIMATION[0] will always be row 5 of an animation sheet, all numbers that follow are each below each other.
#ANIMATION[0] = 6, 0.1, Repeat
}
Flower Turret
{
@ -171,9 +178,11 @@ Monsters
DROP[0] = Bandages,30%,1,1
DROP[1] = Berries,5%,1,1
DROP[2] = Flower Petals,10%,1,1
#Additional custom animations go down below. Start with ANIMATION[0]
#ANIMATION[0] = MY_NEW_ANIMATION
#Additional custom animations go down below. Start with ANIMATION[0] Order is:
# File name, Frame Count, Frame Speed (s), Frame Cycling (Repeat,OneShot,PingPong,Reverse)
# NOTE: ANIMATION[0] will always be row 5 of an animation sheet, all numbers that follow are each below each other.
#ANIMATION[0] = 6, 0.1, Repeat
}
Slime King
{
@ -206,8 +215,10 @@ Monsters
# Drop Item Name, Drop Percentage(0-100%), Drop Min Quantity, Drop Max Quantity
DROP[0] = Berries,5%,1,1
#Additional custom animations go down below. Start with ANIMATION[0]
ANIMATION[0] = monsters/Slime King - Cast.png
#Additional custom animations go down below. Start with ANIMATION[0] Order is:
# File name, Frame Count, Frame Speed (s), Frame Cycling (Repeat,OneShot,PingPong,Reverse)
# NOTE: ANIMATION[0] will always be row 5 of an animation sheet, all numbers that follow are each below each other.
ANIMATION[0] = 10, 0.04, Repeat
}
Wolf
{
@ -238,9 +249,10 @@ Monsters
Hurt Sound = Monster Hurt
Death Sound = Slime Dead
Walk Sound = Slime Walk
#Additional custom animations go down below. Start with ANIMATION[0]. Order is:
# Frame Count, Frame Speed (s), Frame Cycling (Repeat,OneShot,PingPong,Reverse)
#Additional custom animations go down below. Start with ANIMATION[0] Order is:
# File name, Frame Count, Frame Speed (s), Frame Cycling (Repeat,OneShot,PingPong,Reverse)
# NOTE: ANIMATION[0] will always be row 5 of an animation sheet, all numbers that follow are each below each other.
#ANIMATION[0] = 6, 0.1, Repeat
}
Frog
@ -272,9 +284,10 @@ Monsters
Hurt Sound = Monster Hurt
Death Sound = Slime Dead
Walk Sound = Slime Walk
#Additional custom animations go down below. Start with ANIMATION[0]. Order is:
# Frame Count, Frame Speed (s), Frame Cycling (Repeat,OneShot,PingPong,Reverse)
#Additional custom animations go down below. Start with ANIMATION[0] Order is:
# File name, Frame Count, Frame Speed (s), Frame Cycling (Repeat,OneShot,PingPong,Reverse)
# NOTE: ANIMATION[0] will always be row 5 of an animation sheet, all numbers that follow are each below each other.
#ANIMATION[0] = 6, 0.1, Repeat
}
Bear
@ -282,14 +295,14 @@ Monsters
Health = 210
Attack = 45
CollisionDmg = 10
CollisionDmg = 5
MoveSpd = 60%
Size = 200%
XP = 27
Strategy = Run Towards
Strategy = Bear
#Size of each animation frame
SheetFrameSize = 24,24
@ -301,14 +314,16 @@ Monsters
DeathAnimation = 4, 0.15, OneShot
# Drop Item Name, Drop Percentage(0-100%), Drop Min Quantity, Drop Max Quantity
DROP[0] = Frog Skin,35%,1,2
DROP[0] = Bear Blood,35%,1,2
DROP[1] = Bear Claw,40%,1,2
Hurt Sound = Monster Hurt
Death Sound = Slime Dead
Walk Sound = Slime Walk
#Additional custom animations go down below. Start with ANIMATION[0]. Order is:
# Frame Count, Frame Speed (s), Frame Cycling (Repeat,OneShot,PingPong,Reverse)
#Additional custom animations go down below. Start with ANIMATION[0] Order is:
# File name, Frame Count, Frame Speed (s), Frame Cycling (Repeat,OneShot,PingPong,Reverse)
# NOTE: ANIMATION[0] will always be row 5 of an animation sheet, all numbers that follow are each below each other.
ANIMATION[0] = 4, 0.2, OneShot
}
}

@ -7,6 +7,11 @@ Events
SFX
{
Bear Slam Attack
{
# Specify file names, followed by volume %
File[0] = bear_slam.ogg, 70%
}
Consume Potion
{
# Specify file names, followed by volume %

@ -35,7 +35,6 @@ Images
GFX_Splash_Effect = splash_effect.png
GFX_Warrior_Sheet = nico-warrior.png
GFX_Wizard_Sheet = nico-wizard.png
GFX_SlimeKing_Cast = monsters/Slime King - Cast.png
GFX_SkillOverlayIcon = skill_overlay_icon.png
GFX_SkillOverlayIconOverlay = skill_overlay_icon_overlay.png
GFX_FinishRing = finishring.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.1 KiB

After

Width:  |  Height:  |  Size: 19 KiB

@ -138,4 +138,8 @@ std::u32string util::WrapText(PixelGameEngine*pge,std::u32string str,int width,F
}
}
return newStr;
}
long double operator""_Pixels(long double unitDist){
return unitDist/100*24.;
}

@ -56,4 +56,7 @@ namespace olc::util{
std::string timerStr(float time);
std::string WrapText(PixelGameEngine*pge,std::string str,int width,bool proportional,vd2d scale);
std::u32string WrapText(PixelGameEngine*pge,std::u32string str,int width,Font&font,vd2d scale);
}
}
//Converts unit distances to pixels. (Every 100 units = 24 pixels)
long double operator""_Pixels(long double unitDist);
Loading…
Cancel
Save