|
|
|
@ -105,6 +105,7 @@ void Monster::STRATEGY::OCTOPUS_ARM(Monster&m,float fElapsedTime,std::string str |
|
|
|
|
m->SetCollisionRadius(0.f); |
|
|
|
|
if(!m->IsDead())m->Heal(armHealAmtOnDeath,true); |
|
|
|
|
m->GetFloat(A::RECOVERY_TIME)=reemergeWaitTime+delayTimePerArm; |
|
|
|
|
m->SetStrategyDrawFunction([](AiL*game,Monster&monster,const std::string&strategy){}); |
|
|
|
|
if(m->HasBuff(BuffType::STAT_UP)){ |
|
|
|
|
bool found{false}; |
|
|
|
|
for(Buff&b:m->EditBuffs(BuffType::STAT_UP)){ |
|
|
|
@ -157,11 +158,11 @@ void Monster::STRATEGY::OCTOPUS_ARM(Monster&m,float fElapsedTime,std::string str |
|
|
|
|
|
|
|
|
|
m.SetStrategyDrawFunction([arc=attackArc,&storedArc=m.ANY(A::STORED_ARC),&alphaTimer=m.F(A::ENVIRONMENT_TIMER),attackEffectTime=ConfigFloat("Attack Effect Time")](AiL*game,Monster&monster,const std::string&strategy){ |
|
|
|
|
const float alphaTimer{float(std::fmod(game->GetRunTime(),2.f))}; |
|
|
|
|
uint8_t alpha{util::lerp(uint8_t(0),uint8_t(255),alphaTimer)}; |
|
|
|
|
if(alphaTimer>1.f)alpha=util::lerp(0,255,1-(alphaTimer-1)); |
|
|
|
|
const_cast<Arc&>(arc).Draw(game,{0,0,255,uint8_t(alpha)}); |
|
|
|
|
uint8_t alpha{util::lerp(uint8_t(0),uint8_t(128),alphaTimer)}; |
|
|
|
|
if(alphaTimer>1.f)alpha=util::lerp(0,128,1-(alphaTimer-1)); |
|
|
|
|
const_cast<Arc&>(arc).Draw(game,{0,0,128,uint8_t(alpha)}); |
|
|
|
|
if(storedArc.has_value()){ |
|
|
|
|
const uint8_t effectAlpha{util::lerp(uint8_t(0),uint8_t(255),alphaTimer/attackEffectTime)}; |
|
|
|
|
const uint8_t effectAlpha{util::lerp(uint8_t(0),uint8_t(128),alphaTimer/attackEffectTime)}; |
|
|
|
|
std::any_cast<Arc>(storedArc).Draw(game,{255,255,255,effectAlpha}); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|