|
|
|
@ -200,9 +200,15 @@ void Monster::STRATEGY::ZEPHY(Monster&m,float fElapsedTime,std::string strategy) |
|
|
|
|
if(m.GetZ()==0.f){ |
|
|
|
|
m.phase=WIND_ATTACK; |
|
|
|
|
game->GetOverlay().Enable(); |
|
|
|
|
m.F(A::CASTING_TIMER)=ConfigFloat("Wind Attack.Wind Duration"); |
|
|
|
|
m.F(A::WIND_STRENGTH)=ConfigFloat("Wind Attack.Wind Starting Strength")/100.f; |
|
|
|
|
m.F(A::WIND_PHASE_TIMER)=ConfigFloat("Wind Attack.Wind Increase Phase Wait Time"); |
|
|
|
|
} |
|
|
|
|
}break; |
|
|
|
|
case WIND_ATTACK:{ |
|
|
|
|
m.F(A::CASTING_TIMER)-=fElapsedTime; |
|
|
|
|
m.F(A::WIND_PHASE_TIMER)-=fElapsedTime; |
|
|
|
|
|
|
|
|
|
const bool OnLeftLandingSite=m.I(A::ATTACK_CHOICE); |
|
|
|
|
|
|
|
|
|
if(OnLeftLandingSite)m.PerformAnimation("ATTACK",Direction::EAST); |
|
|
|
@ -238,6 +244,25 @@ void Monster::STRATEGY::ZEPHY(Monster&m,float fElapsedTime,std::string strategy) |
|
|
|
|
m.F(A::ENVIRONMENT_TIMER)=ConfigFloat("Wind Attack.Wind Streak Spawn Rate"); |
|
|
|
|
} |
|
|
|
|
#pragma endregion |
|
|
|
|
|
|
|
|
|
if(m.F(A::WIND_STRENGTH)<ConfigFloat("Wind Attack.Wind Max Strength")/100.f&&m.F(A::WIND_PHASE_TIMER)<=0.f){ |
|
|
|
|
m.F(A::WIND_STRENGTH)=std::min(ConfigFloat("Wind Attack.Wind Max Strength")/100.f,m.F(A::WIND_STRENGTH)+ConfigFloat("Wind Attack.Wind Strength Increase")/100.f); |
|
|
|
|
m.F(A::WIND_PHASE_TIMER)=ConfigFloat("Wind Attack.Wind Increase Phase Wait Time"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
#pragma region Wind |
|
|
|
|
const bool LeftLandingSite=m.I(A::ATTACK_CHOICE); |
|
|
|
|
|
|
|
|
|
vf2d windSpd={m.F(A::WIND_STRENGTH)*"Player.MoveSpd"_F,0.f}; //Assume we landed left and causing a wind attack to the right.
|
|
|
|
|
if(!LeftLandingSite)windSpd*=-1; |
|
|
|
|
game->GetPlayer()->AddVelocity(windSpd); |
|
|
|
|
m.F(A::CASTING_TIMER)=ConfigFloat("Wind Attack.Wind Duration"); |
|
|
|
|
#pragma endregion |
|
|
|
|
|
|
|
|
|
if(m.F(A::CASTING_TIMER)<=0.f){ |
|
|
|
|
m.phase=IDLE; |
|
|
|
|
game->GetOverlay().Disable(); |
|
|
|
|
} |
|
|
|
|
}break; |
|
|
|
|
case HALFHEALTH_PHASE:{ |
|
|
|
|
|
|
|
|
|