|
|
|
#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){
|
|
|
|
switch(m.phase){
|
|
|
|
case 0:{
|
|
|
|
m.size=ConfigInt("Phase1.Size")/100;
|
|
|
|
m.diesNormally=false;
|
|
|
|
m.Set(Attribute::IFRAME_TIME_UPON_HIT,0);
|
|
|
|
m.iframe_timer=ConfigFloat("Phase5.IframeTimePerHit");
|
|
|
|
m.phase=1;
|
|
|
|
}break;
|
|
|
|
case 1:{
|
|
|
|
if(m.hp<=m.maxhp*ConfigFloat("Phase2.Change")/100){
|
|
|
|
m.phase=2;
|
|
|
|
m.SetSize(ConfigFloat("Phase2.Size")/100,false);
|
|
|
|
}
|
|
|
|
}break;
|
|
|
|
case 2:{
|
|
|
|
if(m.hp<=m.maxhp*ConfigFloat("Phase3.Change")/100){
|
|
|
|
m.phase=3;
|
|
|
|
m.SetSize(ConfigFloat("Phase3.Size")/100,false);
|
|
|
|
}
|
|
|
|
}break;
|
|
|
|
case 3:{
|
|
|
|
if(m.hp<=m.maxhp*ConfigFloat("Phase4.Change")/100){
|
|
|
|
m.phase=4;
|
|
|
|
m.SetSize(ConfigFloat("Phase4.Size")/100,false);
|
|
|
|
}
|
|
|
|
}break;
|
|
|
|
case 4:{
|
|
|
|
if(m.hp<=0){
|
|
|
|
m.phase=5;
|
|
|
|
m.Set(Attribute::IFRAME_TIME_UPON_HIT,1);
|
|
|
|
}
|
|
|
|
}break;
|
|
|
|
}
|
|
|
|
}
|