|
|
|
@ -140,6 +140,15 @@ void Monster::STRATEGY::URSULE(Monster&m,float fElapsedTime,std::string strategy |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(m.I(A::BEAR_STOMP_COUNT)%(ConfigInt("Phase 1.Stomp Count")+1)==ConfigInt("Phase 1.Stomp Count")){ |
|
|
|
|
m.F(A::RUN_AWAY_TIMER)=ConfigFloat("Phase 1.Run Time"); |
|
|
|
|
m.I(A::PREVIOUS_PHASE)=m.phase; |
|
|
|
|
m.AddBuff(SPEEDBOOST,10.f,ConfigFloat("Phase 1.Run Speed Boost")/100.f); |
|
|
|
|
m.phase=6; |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bear: |
|
|
|
|
BEAR(m,fElapsedTime,"Bear"); |
|
|
|
|
}break; |
|
|
|
@ -261,7 +270,6 @@ void Monster::STRATEGY::URSULE(Monster&m,float fElapsedTime,std::string strategy |
|
|
|
|
if(m.I(A::PHASE)!=0)goto bear2; //Prevent doing anything else if a part of bear AI is still running.
|
|
|
|
|
|
|
|
|
|
if(m.GetRemainingHPPct()<=ConfigFloat("Phase 4.Change")/100.f){ |
|
|
|
|
|
|
|
|
|
auto TransitionToPhase5=[&](){ |
|
|
|
|
m.phase=5; |
|
|
|
|
m.PerformOtherAnimation(1); |
|
|
|
@ -294,7 +302,11 @@ void Monster::STRATEGY::URSULE(Monster&m,float fElapsedTime,std::string strategy |
|
|
|
|
|
|
|
|
|
if(distToPlayer>=ConfigFloat("Phase 3.Charge Range")/100.f*24.f&&m.F(A::CHARGE_COOLDOWN)==0.f){ |
|
|
|
|
if(ConfigFloat("Phase 3.Charge Cast Time")!=0.f){ |
|
|
|
|
if(m.F(A::CASTING_TIMER)==0.f)m.F(A::CASTING_TIMER)=ConfigFloat("Phase 3.Charge Cast Time"); |
|
|
|
|
if(m.F(A::CASTING_TIMER)==0.f){ |
|
|
|
|
m.F(A::CASTING_TIMER)=ConfigFloat("Phase 3.Charge Cast Time"); |
|
|
|
|
m.UpdateFacingDirection(geom2d::line<float>(m.GetPos(),game->GetPlayer()->GetPos()).vector()); |
|
|
|
|
m.PerformOtherAnimation(4); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if(m.F(A::CASTING_TIMER)>0.f){ |
|
|
|
|
m.F(A::CASTING_TIMER)=std::max(0.f,m.F(A::CASTING_TIMER)-fElapsedTime); |
|
|
|
@ -310,8 +322,18 @@ void Monster::STRATEGY::URSULE(Monster&m,float fElapsedTime,std::string strategy |
|
|
|
|
m.F(A::TARGET_TIMER)=ConfigFloat("Phase 3.Charge Max Run Time"); |
|
|
|
|
m.F(A::CHARGE_COOLDOWN)=ConfigFloat("Phase 3.Charge Attack Cooldown"); |
|
|
|
|
m.PerformOtherAnimation(3); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if(m.F(A::CASTING_TIMER)==0.f){ |
|
|
|
|
if(m.I(A::BEAR_STOMP_COUNT)%(ConfigInt("Phase 3.Stomp Count")+1)==ConfigInt("Phase 3.Stomp Count")){ |
|
|
|
|
m.F(A::RUN_AWAY_TIMER)=ConfigFloat("Phase 3.Run Time"); |
|
|
|
|
m.AddBuff(SPEEDBOOST,10.f,ConfigFloat("Phase 3.Run Speed Boost")/100.f); |
|
|
|
|
m.I(A::PREVIOUS_PHASE)=m.phase; |
|
|
|
|
m.phase=6; |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -399,6 +421,18 @@ void Monster::STRATEGY::URSULE(Monster&m,float fElapsedTime,std::string strategy |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}break; |
|
|
|
|
case 6:{ |
|
|
|
|
//Run towards the target for a set amount of time.
|
|
|
|
|
m.F(A::RUN_AWAY_TIMER)=std::max(0.f,m.F(A::RUN_AWAY_TIMER)-fElapsedTime); |
|
|
|
|
m.targetAcquireTimer=20.f; |
|
|
|
|
m.target=game->GetPlayer()->GetPos(); |
|
|
|
|
RUN_TOWARDS(m,fElapsedTime,"Run Towards"); |
|
|
|
|
if(m.F(A::RUN_AWAY_TIMER)==0.f){ |
|
|
|
|
m.phase=m.I(A::PREVIOUS_PHASE); |
|
|
|
|
m.RemoveBuff(SPEEDBOOST); |
|
|
|
|
m.I(A::BEAR_STOMP_COUNT)=0; |
|
|
|
|
} |
|
|
|
|
}break; |
|
|
|
|
default:{ |
|
|
|
|
ERR(std::format("WARNING! Unknown phase {} for {} reached!",m.phase,m.GetName())); |
|
|
|
|
} |
|
|
|
|