Fix Stage Plates 2-6,2-7,2-8, and 2-B to point to their respective stages. Move the additional pillar spawning code outside of the regular boss' phase cycle since it's supposed to happen while the boss does other things according to the original spec. When new pillars appear/disappear, recalculate the safe areas dynamically. Release Build 9974.
This commit is contained in:
@@ -39,6 +39,7 @@ All rights reserved.
|
||||
#include "MonsterStrategyHelpers.h"
|
||||
#include "util.h"
|
||||
#include "AdventuresInLestoria.h"
|
||||
#include "SoundEffect.h"
|
||||
|
||||
using A=Attribute;
|
||||
|
||||
@@ -60,6 +61,17 @@ void Monster::STRATEGY::BREAKING_PILLAR(Monster&m,float fElapsedTime,std::string
|
||||
m.F(A::BREAK_TIME)=ConfigFloat("Break Time");
|
||||
m.F(A::SHAKE_TIMER)=0.2f;
|
||||
m.phase=RUN;
|
||||
|
||||
m.SetStrategyDeathFunction([&](GameEvent&deathEvent,Monster&m,const std::string&strategy){
|
||||
m.lifetime=0.01f;
|
||||
m.B(A::MARKED_DEAD)=true;
|
||||
const float bulletAngRandomOffset{util::random(PI/2)};
|
||||
for(int i=0;i<ConfigInt("Death Ring Bullet Count");i++){
|
||||
const float bulletAngle=((2*PI)/ConfigInt("Death Ring Bullet Count"))*i+bulletAngRandomOffset;
|
||||
CreateBullet(Bullet)(m.GetPos(),vf2d{ConfigFloat("Death Ring Bullet Speed"),bulletAngle}.cart(),ConfigFloat("Death Ring Bullet Size"),ConfigInt("Death Ring Bullet Damage"),m.OnUpperLevel(),false,ConfigPixel("Death Ring Bullet Color"),vf2d{ConfigFloat("Death Ring Bullet Size")/3,ConfigFloat("Death Ring Bullet Size")/3})EndBullet;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}break;
|
||||
case RUN:{
|
||||
m.F(A::BREAK_TIME)-=fElapsedTime;
|
||||
@@ -74,19 +86,9 @@ void Monster::STRATEGY::BREAKING_PILLAR(Monster&m,float fElapsedTime,std::string
|
||||
if(m.B(A::SHAKE_DIR))m.SetX(m.GetPos().x-2);
|
||||
else m.SetX(m.GetPos().x+2);
|
||||
m.B(A::SHAKE_DIR)=!m.B(A::SHAKE_DIR);
|
||||
SoundEffect::PlaySFX("Pillar Shake",m.GetPos());
|
||||
}
|
||||
}
|
||||
}break;
|
||||
}
|
||||
|
||||
m.SetStrategyDeathFunction([&](GameEvent&deathEvent,Monster&m,const std::string&strategy){
|
||||
m.lifetime=0.01f;
|
||||
m.B(A::MARKED_DEAD)=true;
|
||||
const float bulletAngRandomOffset{util::random(PI/2)};
|
||||
for(int i=0;i<ConfigInt("Death Ring Bullet Count");i++){
|
||||
const float bulletAngle=((2*PI)/ConfigInt("Death Ring Bullet Count"))*i+bulletAngRandomOffset;
|
||||
CreateBullet(Bullet)(m.GetPos(),vf2d{ConfigFloat("Death Ring Bullet Speed"),bulletAngle}.cart(),ConfigFloat("Death Ring Bullet Size"),ConfigInt("Death Ring Bullet Damage"),m.OnUpperLevel(),false,ConfigPixel("Death Ring Bullet Color"),vf2d{ConfigFloat("Death Ring Bullet Size")/3,ConfigFloat("Death Ring Bullet Size")/3})EndBullet;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user