diff --git a/Adventures in Lestoria/State_OverworldMap.cpp b/Adventures in Lestoria/State_OverworldMap.cpp index 46cc7cdc..a005ce14 100644 --- a/Adventures in Lestoria/State_OverworldMap.cpp +++ b/Adventures in Lestoria/State_OverworldMap.cpp @@ -170,12 +170,15 @@ void State_OverworldMap::Draw(AiL*game){ } } } + bool highlightedAStage=false; for(ConnectionPoint&cp:connections){ if(Unlock::IsUnlocked(cp)&&geom2d::overlaps(game->GetWorldMousePos(),cp.rect)&&(&cp==currentConnectionPoint||cp.IsNeighbor(*currentConnectionPoint))){ drawutil::DrawCrosshairDecalTransformedView(game->view,cp.rect,currentTime); + highlightedAStage=true; break; } } + if(!highlightedAStage)drawutil::DrawCrosshairDecalTransformedView(game->view,currentConnectionPoint->rect,currentTime); //Highlight the current stage instead then if we haven't moused over a new one. //In radians. using AngleTotal=float; diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index 2526a0ff..7c0a4f20 100644 --- a/Adventures in Lestoria/Version.h +++ b/Adventures in Lestoria/Version.h @@ -39,7 +39,7 @@ All rights reserved. #define VERSION_MAJOR 1 #define VERSION_MINOR 2 #define VERSION_PATCH 3 -#define VERSION_BUILD 9484 +#define VERSION_BUILD 9486 #define stringify(a) stringify_(a) #define stringify_(a) #a diff --git a/Adventures in Lestoria/Zephy.cpp b/Adventures in Lestoria/Zephy.cpp index a2231f84..cec14458 100644 --- a/Adventures in Lestoria/Zephy.cpp +++ b/Adventures in Lestoria/Zephy.cpp @@ -44,6 +44,7 @@ All rights reserved. INCLUDE_game INCLUDE_MONSTER_DATA +INCLUDE_WINDOW_SIZE using A=Attribute; @@ -202,8 +203,26 @@ void Monster::STRATEGY::ZEPHY(Monster&m,float fElapsedTime,std::string strategy) }break; case WIND_ATTACK:{ const bool OnLeftLandingSite=m.I(A::ATTACK_CHOICE); + if(OnLeftLandingSite)m.PerformAnimation("ATTACK",Direction::EAST); else m.PerformAnimation("ATTACK",Direction::WEST); + + #pragma region Wind Streak Effect + m.F(A::ENVIRONMENT_TIMER)-=fElapsedTime; + //Assuming facing right / on left landing site for initial values. + if(m.F(A::ENVIRONMENT_TIMER)<=0.f){ + vf2d randomScreenOffset={util::random(WINDOW_SIZE.x/2.f),float(WINDOW_SIZE.y)}; + float randomSpeed=util::random_range(ConfigFloatArr("Wind Attack.Wind Streak Speed Range",0),ConfigFloatArr("Wind Attack.Wind Streak Speed Range",1)); + float randomLifetime=util::random_range(ConfigFloatArr("Wind Attack.Wind Streak Lifetime Range",0),ConfigFloatArr("Wind Attack.Wind Streak Lifetime Range",1)); + + if(!OnLeftLandingSite){ + randomScreenOffset.x+=WINDOW_SIZE.x/2.f; + randomSpeed*=-1.f; + } + + m.F(A::ENVIRONMENT_TIMER)=ConfigFloat("Wind Attack.Wind Streak Spawn Rate"); + } + #pragma endregion }break; case HALFHEALTH_PHASE:{ diff --git a/Adventures in Lestoria/assets/config/MonsterStrategies.txt b/Adventures in Lestoria/assets/config/MonsterStrategies.txt index 408c7624..1ef67d8b 100644 --- a/Adventures in Lestoria/assets/config/MonsterStrategies.txt +++ b/Adventures in Lestoria/assets/config/MonsterStrategies.txt @@ -834,6 +834,11 @@ MonsterStrategy Wind Overlay Sprite = "wind_vignette.png" Wind Overlay Color = 64, 64, 64, 255 + + Wind Streak Spawn Rate = 0.15s + # In pixels/sec + Wind Streak Speed Range = 24px/s, 128px/s + Wind Streak Lifetime Range = 2s, 8s } } } \ No newline at end of file diff --git a/x64/Release/Adventures in Lestoria.exe b/x64/Release/Adventures in Lestoria.exe index ca9bf51e..26154307 100644 Binary files a/x64/Release/Adventures in Lestoria.exe and b/x64/Release/Adventures in Lestoria.exe differ