Phase 1&2 prepping.
Co-authored-by: sigonasr2 <sigonasr2@gmail.com>
This commit is contained in:
parent
77ba0369fb
commit
aabc9e4cc5
@ -244,7 +244,7 @@ void Monster::STRATEGY::SLIMEKING(Monster&m,float fElapsedTime,std::string strat
|
||||
m.phase=ConfigInt("StartPhase");
|
||||
}break;
|
||||
case 1:{
|
||||
if(m.hp<=m.stats.A("Health")*ConfigFloat("Phase2.Change")/100){
|
||||
if(m.GetRemainingHPPct()<=ConfigFloat("Phase2.Change")/100.f){
|
||||
m.phase=2;
|
||||
m.SetSize(ConfigFloat("Phase2.Size")/100,false);
|
||||
TransitionPhase(m.phase);
|
||||
@ -277,7 +277,7 @@ void Monster::STRATEGY::SLIMEKING(Monster&m,float fElapsedTime,std::string strat
|
||||
}
|
||||
}break;
|
||||
case 2:{
|
||||
if(m.hp<=m.stats.A("Health")*ConfigFloat("Phase3.Change")/100){
|
||||
if(m.GetRemainingHPPct()<=ConfigFloat("Phase3.Change")/100.f){
|
||||
m.phase=3;
|
||||
m.SetSize(ConfigFloat("Phase3.Size")/100,false);
|
||||
TransitionPhase(m.phase);
|
||||
@ -302,7 +302,7 @@ void Monster::STRATEGY::SLIMEKING(Monster&m,float fElapsedTime,std::string strat
|
||||
}
|
||||
}break;
|
||||
case 3:{
|
||||
if(m.hp<=m.stats.A("Health")*ConfigFloat("Phase4.Change")/100){
|
||||
if(m.GetRemainingHPPct()<=ConfigFloat("Phase4.Change")/100.f){
|
||||
m.phase=4;
|
||||
m.SetSize(ConfigFloat("Phase4.Size")/100,false);
|
||||
m.AddBuff(BuffType::SLOWDOWN,99999,ConfigFloat("Phase4.MoveSpdModifier")/100);
|
||||
|
@ -52,15 +52,26 @@ INCLUDE_MONSTER_DATA
|
||||
using A=Attribute;
|
||||
|
||||
void Monster::STRATEGY::URSULE(Monster&m,float fElapsedTime,std::string strategy){
|
||||
switch(m.I(A::PHASE)){
|
||||
switch(m.phase){
|
||||
case 0:{
|
||||
m.phase=ConfigInt("StartPhase");
|
||||
}break;
|
||||
case 1:{ //Run bear strategy in phase 1.
|
||||
if(m.GetRemainingHPPct()<=ConfigInt("Phase 2.Change")/100.f){
|
||||
m.I(A::PHASE)=2;
|
||||
}
|
||||
if(m.GetRemainingHPPct()<=ConfigFloat("Phase 2.Change")/100.f){
|
||||
if(m.F(A::RUN_AWAY_TIMER)==0.f)m.F(A::RUN_AWAY_TIMER)=10.f;
|
||||
//before moving to Phase 2, we need to make sure we're in Phase 0 of the bear AI.
|
||||
//We also need to move to the center of the map.
|
||||
if(m.I(A::PHASE)!=0.f)goto bear;
|
||||
else{
|
||||
float distToCenter=geom2d::line<float>(m.GetPos(),game->GetCurrentMap().MapData.MapSize*{game->GetCurrentMap().MapData.tilewidth,game->GetCurrentMap().MapData.tileheight}).length();
|
||||
if(){
|
||||
|
||||
}else{ //Now we're finally good for phase 2.
|
||||
m.phase=2;
|
||||
}
|
||||
}
|
||||
}
|
||||
bear:
|
||||
BEAR(m,fElapsedTime,"Bear");
|
||||
}break;
|
||||
case 2:{
|
||||
|
@ -233,6 +233,9 @@ MonsterStrategy
|
||||
# Which phase to start on. Should be 1 most of the time.
|
||||
StartPhase = 1
|
||||
|
||||
# The maximum amount of time to spend trying to run to the center of the map.
|
||||
Run To Center Max Time = 10.0s
|
||||
|
||||
Wisp Pattern 0
|
||||
{
|
||||
Row[0] = .O...O..
|
||||
|
Loading…
x
Reference in New Issue
Block a user