Setup wind debris random variables. On the Overworld map selection, the currently selected stage now shows the selection cursor when the mouse cursor is not hovering over another stage to better indicate what stage you are looking at. Release Build 9486.

mac-build
sigonasr2 6 months ago
parent 563471f7e8
commit e83515e6a0
  1. 3
      Adventures in Lestoria/State_OverworldMap.cpp
  2. 2
      Adventures in Lestoria/Version.h
  3. 19
      Adventures in Lestoria/Zephy.cpp
  4. 5
      Adventures in Lestoria/assets/config/MonsterStrategies.txt
  5. BIN
      x64/Release/Adventures in Lestoria.exe

@ -170,12 +170,15 @@ void State_OverworldMap::Draw(AiL*game){
} }
} }
} }
bool highlightedAStage=false;
for(ConnectionPoint&cp:connections){ for(ConnectionPoint&cp:connections){
if(Unlock::IsUnlocked(cp)&&geom2d::overlaps(game->GetWorldMousePos(),cp.rect)&&(&cp==currentConnectionPoint||cp.IsNeighbor(*currentConnectionPoint))){ if(Unlock::IsUnlocked(cp)&&geom2d::overlaps(game->GetWorldMousePos(),cp.rect)&&(&cp==currentConnectionPoint||cp.IsNeighbor(*currentConnectionPoint))){
drawutil::DrawCrosshairDecalTransformedView(game->view,cp.rect,currentTime); drawutil::DrawCrosshairDecalTransformedView(game->view,cp.rect,currentTime);
highlightedAStage=true;
break; 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. //In radians.
using AngleTotal=float; using AngleTotal=float;

@ -39,7 +39,7 @@ All rights reserved.
#define VERSION_MAJOR 1 #define VERSION_MAJOR 1
#define VERSION_MINOR 2 #define VERSION_MINOR 2
#define VERSION_PATCH 3 #define VERSION_PATCH 3
#define VERSION_BUILD 9484 #define VERSION_BUILD 9486
#define stringify(a) stringify_(a) #define stringify(a) stringify_(a)
#define stringify_(a) #a #define stringify_(a) #a

@ -44,6 +44,7 @@ All rights reserved.
INCLUDE_game INCLUDE_game
INCLUDE_MONSTER_DATA INCLUDE_MONSTER_DATA
INCLUDE_WINDOW_SIZE
using A=Attribute; using A=Attribute;
@ -202,8 +203,26 @@ void Monster::STRATEGY::ZEPHY(Monster&m,float fElapsedTime,std::string strategy)
}break; }break;
case WIND_ATTACK:{ case WIND_ATTACK:{
const bool OnLeftLandingSite=m.I(A::ATTACK_CHOICE); const bool OnLeftLandingSite=m.I(A::ATTACK_CHOICE);
if(OnLeftLandingSite)m.PerformAnimation("ATTACK",Direction::EAST); if(OnLeftLandingSite)m.PerformAnimation("ATTACK",Direction::EAST);
else m.PerformAnimation("ATTACK",Direction::WEST); 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; }break;
case HALFHEALTH_PHASE:{ case HALFHEALTH_PHASE:{

@ -834,6 +834,11 @@ MonsterStrategy
Wind Overlay Sprite = "wind_vignette.png" Wind Overlay Sprite = "wind_vignette.png"
Wind Overlay Color = 64, 64, 64, 255 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
} }
} }
} }
Loading…
Cancel
Save