diff --git a/Adventures in Lestoria/AdventuresInLestoria.cpp b/Adventures in Lestoria/AdventuresInLestoria.cpp index fec06457..705d2964 100644 --- a/Adventures in Lestoria/AdventuresInLestoria.cpp +++ b/Adventures in Lestoria/AdventuresInLestoria.cpp @@ -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; } } } diff --git a/Adventures in Lestoria/Monster.h b/Adventures in Lestoria/Monster.h index 2c3f76f1..fac02544 100644 --- a/Adventures in Lestoria/Monster.h +++ b/Adventures in Lestoria/Monster.h @@ -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); diff --git a/Adventures in Lestoria/RUN_STRATEGY.cpp b/Adventures in Lestoria/RUN_STRATEGY.cpp index a1a2fd40..76f2b3a1 100644 --- a/Adventures in Lestoria/RUN_STRATEGY.cpp +++ b/Adventures in Lestoria/RUN_STRATEGY.cpp @@ -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 { diff --git a/Adventures in Lestoria/Ursule.cpp b/Adventures in Lestoria/Ursule.cpp index f45eb256..940cf5bf 100644 --- a/Adventures in Lestoria/Ursule.cpp +++ b/Adventures in Lestoria/Ursule.cpp @@ -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(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(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)--; diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index e570269a..73c8dfb7 100644 --- a/Adventures in Lestoria/Version.h +++ b/Adventures in Lestoria/Version.h @@ -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 diff --git a/Adventures in Lestoria/assets/config/audio/events.txt b/Adventures in Lestoria/assets/config/audio/events.txt index 36d3f891..c0501e59 100644 --- a/Adventures in Lestoria/assets/config/audio/events.txt +++ b/Adventures in Lestoria/assets/config/audio/events.txt @@ -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%) diff --git a/Adventures in Lestoria/assets/sounds/ursule_phase_transition.ogg b/Adventures in Lestoria/assets/sounds/ursule_phase_transition.ogg new file mode 100644 index 00000000..9e975e07 Binary files /dev/null and b/Adventures in Lestoria/assets/sounds/ursule_phase_transition.ogg differ diff --git a/Adventures in Lestoria/assets/wisp.png b/Adventures in Lestoria/assets/wisp.png index 87cdae83..69451b11 100644 Binary files a/Adventures in Lestoria/assets/wisp.png and b/Adventures in Lestoria/assets/wisp.png differ diff --git a/Adventures in Lestoria/olcUTIL_DataFile.h b/Adventures in Lestoria/olcUTIL_DataFile.h index c15988f7..af30496e 100644 --- a/Adventures in Lestoria/olcUTIL_DataFile.h +++ b/Adventures in Lestoria/olcUTIL_DataFile.h @@ -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 "< 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 diff --git a/x64/Release/Adventures in Lestoria.exe b/x64/Release/Adventures in Lestoria.exe index ae850e18..b7cb28ea 100644 Binary files a/x64/Release/Adventures in Lestoria.exe and b/x64/Release/Adventures in Lestoria.exe differ