Added in config parameters for slime king

Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
pull/28/head
Nic0Nic0Nii 1 year ago
parent dd78b8f56d
commit c8dba733d0
  1. 2
      Crawler/Monster.h
  2. 5
      Crawler/RUN_STRATEGY.cpp
  3. 12
      Crawler/SlimeKing.cpp
  4. 39
      Crawler/assets/config/MonsterStrategies.txt
  5. 3
      Crawler/test

@ -50,6 +50,7 @@ struct MonsterData{
static std::map<int,Renderable*>imgs; static std::map<int,Renderable*>imgs;
}; };
struct Monster{ struct Monster{
friend struct STRATEGY; friend struct STRATEGY;
private: private:
@ -136,6 +137,7 @@ private:
static void RUN_TOWARDS(Monster&m,float fElapsedTime,int strategyNumber); static void RUN_TOWARDS(Monster&m,float fElapsedTime,int strategyNumber);
static void SHOOT_AFAR(Monster&m,float fElapsedTime,int strategyNumber); static void SHOOT_AFAR(Monster&m,float fElapsedTime,int strategyNumber);
static void TURRET(Monster&m,float fElapsedTime,int strategyNumber); static void TURRET(Monster&m,float fElapsedTime,int strategyNumber);
static void SLIMEKING(Monster&m,float fElapsedTime,int strategyNumber);
}; };
}; };

@ -34,8 +34,11 @@ void Monster::STRATEGY::RUN_STRATEGY(Monster&m,float fElapsedTime){
case 1:{//Shoot Afar case 1:{//Shoot Afar
Monster::STRATEGY::SHOOT_AFAR(m,fElapsedTime,m.strategy); Monster::STRATEGY::SHOOT_AFAR(m,fElapsedTime,m.strategy);
}break; }break;
case 2:{//Turret. case 2:{//Turret
Monster::STRATEGY::TURRET(m,fElapsedTime,m.strategy); Monster::STRATEGY::TURRET(m,fElapsedTime,m.strategy);
}break; }break;
case 3:{//Slime King
Monster::STRATEGY::SLIMEKING(m,fElapsedTime,m.strategy);
}break;
} }
} }

@ -0,0 +1,12 @@
#include "Monster.h"
#include "MonsterStrategyHelpers.h"
#include "DEFINES.h"
#include "Crawler.h"
#include "utils.h"
INCLUDE_game
INCLUDE_BULLET_LIST
void Monster::STRATEGY::SLIMEKING(Monster&m,float fElapsedTime,int strategyNumber){
}

@ -68,4 +68,43 @@ MonsterStrategy
BulletSize = 30 BulletSize = 30
BulletColor = 0, 255, 0, 255 BulletColor = 0, 255, 0, 255
} }
3
{
# The Slime King Boss script.
Name = Slime King
Phase1
{
Size = 800
ShootRepeatTime = 4.0
ShootRingCount = 3
#In degrees.
RingOffset = 10
# Number of pattern repeats before a jump occurs.
JumpAfter = 4
AirborneTime = 3.0
LandingRingCount = 1
LandingRecoveryTime = 2.0
}
Phase2
{
Size = 600
# Percentage of health to transition to Phase 2
Change = 75%
MonsterSpawnOnChange = Red Slime, 2
}
Phase2Change = 75
Phase2Size = 600
# Percentage of health to transition to Phase 3
Phase3Change = 50
Phase3Size = 400
# Percentage of health to transition to Phase 4
Phase4Change = 25
Phase4Size = 200
# How often the enemy shoots.
ShootingSpeed = 0.6
BulletSpeed = 450
BulletSize = 30
BulletColor = 0, 255, 0, 255
}
} }

@ -1,3 +0,0 @@
test 1
test 2
test 3
Loading…
Cancel
Save