Fix bullet patterns, add transition sound effect. Fix bug involving accidental multi-hit bullets.
This commit is contained in:
parent
4d3b3b4930
commit
7705a64624
@ -668,8 +668,8 @@ void AiL::UpdateBullets(float fElapsedTime){
|
||||
if(!b->hitsMultiple){
|
||||
if(b->MonsterHit(m)){
|
||||
b->dead=true;
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
b->hitList.insert(&m);
|
||||
}
|
||||
@ -680,8 +680,8 @@ void AiL::UpdateBullets(float fElapsedTime){
|
||||
if(player->Hurt(b->damage,b->OnUpperLevel(),0)){
|
||||
if(b->PlayerHit(player.get())){
|
||||
b->dead=true;
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -249,7 +249,7 @@ private:
|
||||
static int _GetInt(Monster&m,std::string param,std::string strategy,int index=0);
|
||||
static float _GetFloat(Monster&m,std::string param,std::string strategy,int index=0);
|
||||
static Pixel _GetPixel(Monster&m,std::string param,std::string strategy,int index=0);
|
||||
static std::string _GetString(Monster&m,std::string param,std::string strategy,int index=0);
|
||||
static const std::string&_GetString(Monster&m,std::string param,std::string strategy,int index=0);
|
||||
static datafile _Get(Monster&m,std::string param,std::string strategy);
|
||||
static void RUN_STRATEGY(Monster&m,float fElapsedTime);
|
||||
static void RUN_TOWARDS(Monster&m,float fElapsedTime,std::string strategy);
|
||||
|
@ -70,7 +70,7 @@ float Monster::STRATEGY::_GetFloat(Monster&m,std::string param,std::string strat
|
||||
return float(DATA["MonsterStrategy"][strategy].GetProperty(param).GetReal(index));
|
||||
}
|
||||
}
|
||||
std::string Monster::STRATEGY::_GetString(Monster&m,std::string param,std::string strategy,int index){
|
||||
const std::string&Monster::STRATEGY::_GetString(Monster&m,std::string param,std::string strategy,int index){
|
||||
if(DATA["Monsters"][m.name].HasProperty(param)){
|
||||
return DATA["Monsters"][m.name].GetProperty(param).GetString(index);
|
||||
} else {
|
||||
|
@ -65,6 +65,7 @@ void Monster::STRATEGY::URSULE(Monster&m,float fElapsedTime,std::string strategy
|
||||
m.PerformOtherAnimation(1);
|
||||
m.AddBuff(BARRIER_DAMAGE_REDUCTION,INFINITE,ConfigFloat("Phase 2.Barrier Damage Reduction")/100.f);
|
||||
m.I(A::PHASE_REPEAT_COUNT)=ConfigInt("Phase 2.Wisp Pattern Spawn Count");
|
||||
SoundEffect::PlaySFX("Ursule Phase Transition",SoundEffect::CENTERED);
|
||||
};
|
||||
|
||||
if(m.GetRemainingHPPct()<=ConfigFloat("Phase 2.Change")/100.f){
|
||||
@ -135,8 +136,11 @@ void Monster::STRATEGY::URSULE(Monster&m,float fElapsedTime,std::string strategy
|
||||
int rowCount=Config(std::format("Wisp Pattern {}",wispPattern)).GetKeys().size();
|
||||
for(float x=0;x<mapWidth;x+=wispSize.x){
|
||||
for(int y=0;y<rowCount;y++){
|
||||
float ySpawn=ConfigInt("Phase 2.Wisp Pattern Spawn Y")+y*wispSize.y;
|
||||
BULLET_LIST.push_back(std::make_unique<Wisp>(vf2d{x,ySpawn},vf2d{0,ConfigFloat("Phase 2.Wisp Speed")},wispSize.x/2,m.GetAttack(),m.OnUpperLevel(),false,ConfigPixel("Phase 2.Wisp Color")));
|
||||
std::string_view row=ConfigString(std::format("Wisp Pattern {}.Row[{}]",wispPattern,y));
|
||||
if(row[int(x/wispSize.x)%row.length()]!='.'){
|
||||
float ySpawn=ConfigInt("Phase 2.Wisp Pattern Spawn Y")+y*wispSize.y;
|
||||
BULLET_LIST.push_back(std::make_unique<Wisp>(vf2d{x,ySpawn},vf2d{0,ConfigFloat("Phase 2.Wisp Speed")},wispSize.x/2,m.GetAttack(),m.OnUpperLevel(),false,ConfigPixel("Phase 2.Wisp Color")));
|
||||
}
|
||||
}
|
||||
}
|
||||
m.I(A::PHASE_REPEAT_COUNT)--;
|
||||
|
@ -39,7 +39,7 @@ All rights reserved.
|
||||
#define VERSION_MAJOR 0
|
||||
#define VERSION_MINOR 3
|
||||
#define VERSION_PATCH 0
|
||||
#define VERSION_BUILD 6308
|
||||
#define VERSION_BUILD 6316
|
||||
|
||||
#define stringify(a) stringify_(a)
|
||||
#define stringify_(a) #a
|
||||
|
@ -139,6 +139,11 @@ Events
|
||||
File[1] = slime_walk2.ogg, 10%
|
||||
File[2] = slime_walk3.ogg, 10%
|
||||
}
|
||||
Ursule Phase Transition
|
||||
{
|
||||
# Specify file names, followed by volume %. Optional min and max pitch adjustment (Defaults are 90%,110%)
|
||||
File[0] = ursule_phase_transition.ogg, 100%
|
||||
}
|
||||
Warrior Auto Attack
|
||||
{
|
||||
# Specify file names, followed by volume %. Optional min and max pitch adjustment (Defaults are 90%,110%)
|
||||
|
BIN
Adventures in Lestoria/assets/sounds/ursule_phase_transition.ogg
Normal file
BIN
Adventures in Lestoria/assets/sounds/ursule_phase_transition.ogg
Normal file
Binary file not shown.
Binary file not shown.
Before Width: | Height: | Size: 744 B After Width: | Height: | Size: 730 B |
@ -88,11 +88,11 @@ namespace olc::utils
|
||||
}
|
||||
|
||||
// Retrieves the String Value of a Property (for a given index) or ""
|
||||
inline const std::string GetString(const size_t nItem = 0) const
|
||||
inline const std::string&GetString(const size_t nItem = 0) const
|
||||
{
|
||||
if (nItem >= m_vContent.size()){
|
||||
ERR("WARNING! Accesing out-of-bounds list item "<<nItem<<" of "<<lastAccessedProperty<<"!");
|
||||
return "";
|
||||
return BLANK;
|
||||
}
|
||||
else {
|
||||
return m_vContent[nItem];
|
||||
@ -100,7 +100,7 @@ namespace olc::utils
|
||||
}
|
||||
|
||||
// Retrieves the String Value of a Property, to include all values that are normally separated by the list separator.
|
||||
inline const std::string GetFullString() const
|
||||
inline std::string GetFullString() const
|
||||
{
|
||||
return std::accumulate(m_vContent.begin(),m_vContent.end(),""s,[](std::string str,const std::string&data){
|
||||
if(str.size()==0){
|
||||
@ -506,6 +506,7 @@ namespace olc::utils
|
||||
std::unordered_map<std::string, size_t> m_mapObjects;
|
||||
|
||||
inline static std::string lastAccessedProperty="";
|
||||
inline static std::string BLANK="";
|
||||
|
||||
protected:
|
||||
// Used to identify if a property is a comment or not, not user facing
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user