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.

This commit is contained in:
sigonasr2 2024-05-29 14:05:49 -05:00
parent 35bcdb3ec2
commit df56fec448
5 changed files with 28 additions and 1 deletions

View File

@ -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;

View File

@ -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

View File

@ -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:{

View File

@ -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
}
}
}