|
|
@ -46,6 +46,8 @@ All rights reserved. |
|
|
|
using A=Attribute; |
|
|
|
using A=Attribute; |
|
|
|
|
|
|
|
|
|
|
|
INCLUDE_game |
|
|
|
INCLUDE_game |
|
|
|
|
|
|
|
INCLUDE_MONSTER_LIST |
|
|
|
|
|
|
|
INCLUDE_MONSTER_DATA |
|
|
|
|
|
|
|
|
|
|
|
void Monster::STRATEGY::OCTOPUS_ARM(Monster&m,float fElapsedTime,std::string strategy){ |
|
|
|
void Monster::STRATEGY::OCTOPUS_ARM(Monster&m,float fElapsedTime,std::string strategy){ |
|
|
|
enum PhaseName{ |
|
|
|
enum PhaseName{ |
|
|
@ -73,6 +75,24 @@ void Monster::STRATEGY::OCTOPUS_ARM(Monster&m,float fElapsedTime,std::string str |
|
|
|
m.PerformAnimation("RISE",game->GetPlayer()->GetPos()); |
|
|
|
m.PerformAnimation("RISE",game->GetPlayer()->GetPos()); |
|
|
|
m.F(A::CASTING_TIMER)=m.GetCurrentAnimation().GetTotalAnimationDuration(); |
|
|
|
m.F(A::CASTING_TIMER)=m.GetCurrentAnimation().GetTotalAnimationDuration(); |
|
|
|
SETPHASE(RISE_ANIMATION); |
|
|
|
SETPHASE(RISE_ANIMATION); |
|
|
|
|
|
|
|
m.SetStrategyDeathFunction([bossDamageOnDeath=ConfigInt("Boss Damage On Death")](GameEvent&event,Monster&m,const StrategyName&strategyName){ |
|
|
|
|
|
|
|
const std::string GIANT_OCTOPUS_NAME{"Giant Octopus"}; |
|
|
|
|
|
|
|
const std::string OCTOPUS_ARM_NAME{"Octopus Arm"}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(!MONSTER_DATA.count(GIANT_OCTOPUS_NAME))ERR("WARNING! Octopus" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
auto boss{std::find_if(MONSTER_LIST.begin(),MONSTER_LIST.end(),[&GIANT_OCTOPUS_NAME](const std::shared_ptr<Monster>&m){ |
|
|
|
|
|
|
|
return m->GetName()==GIANT_OCTOPUS_NAME; |
|
|
|
|
|
|
|
})}; |
|
|
|
|
|
|
|
if(boss!=MONSTER_LIST.end()){ |
|
|
|
|
|
|
|
Monster&bossMonster{**boss}; |
|
|
|
|
|
|
|
bossMonster.Hurt(bossDamageOnDeath,m.OnUpperLevel(),m.GetZ()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
std::for_each(MONSTER_LIST.begin(),MONSTER_LIST.end(),[&OCTOPUS_ARM_NAME](const std::shared_ptr<Monster>&m){ |
|
|
|
|
|
|
|
if(m->GetName()==OCTOPUS_ARM_NAME) |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
}); |
|
|
|
}break; |
|
|
|
}break; |
|
|
|
case RISE_ANIMATION:{ |
|
|
|
case RISE_ANIMATION:{ |
|
|
|
m.F(A::CASTING_TIMER)-=fElapsedTime; |
|
|
|
m.F(A::CASTING_TIMER)-=fElapsedTime; |
|
|
|