Add in lockin target time property to regular run towards monster strategy. Yellow Slime Jump target speed increased from 70 -> 90. Yellow Slime Jump lock-in target time increased from 0.0s -> 0.2s. Release Build 8087. #36

Merged
sigonasr2 merged 1 commits from YellowSlimeJumpChanges into master 9 months ago
  1. 29
      Adventures in Lestoria/RunTowards.cpp
  2. 2
      Adventures in Lestoria/Version.h
  3. 2
      Adventures in Lestoria/assets/config/MonsterStrategies.txt
  4. 4
      Adventures in Lestoria/assets/config/Monsters.txt
  5. BIN
      x64/Release/Adventures in Lestoria.exe

@ -79,11 +79,12 @@ void Monster::STRATEGY::RUN_TOWARDS(Monster&m,float fElapsedTime,std::string str
m.UpdateFacingDirection(m.target);
}
const auto StartJumpTowardsPlayer=[&](float jumpDuration,float recoveryTime,float jumpMoveSpd){
const auto StartJumpTowardsPlayer=[&](float jumpDuration,float recoveryTime,float jumpMoveSpd,float moveTowardsTargetLockinTime){
m.F(A::JUMP_ORIGINAL_LANDING_TIMER)=m.F(A::JUMP_LANDING_TIMER)=jumpDuration;
m.B(A::JUMP_TOWARDS_PLAYER)=true;
m.F(A::RECOVERY_TIME)=recoveryTime;
m.F(A::JUMP_MOVE_SPD)=jumpMoveSpd;
m.F(A::JUMP_MOVE_TO_TARGET_TIMER)=moveTowardsTargetLockinTime;
m.SetState(State::JUMP);
};
const auto Landed=[&](){
@ -114,7 +115,7 @@ void Monster::STRATEGY::RUN_TOWARDS(Monster&m,float fElapsedTime,std::string str
m.F(A::LAST_JUMP_TIMER)=std::max(0.f,m.F(A::LAST_JUMP_TIMER)-fElapsedTime);
if(m.F(A::LAST_JUMP_TIMER)==0.f){
if(geom2d::line(m.pos,m.target).length()<=ConfigInt("MaxPlayerJumpEngageDistance")/100.f*24){
StartJumpTowardsPlayer(ConfigFloat("JumpDelayTime"),ConfigFloat("JumpRecoveryTime"),ConfigFloat("JumpMoveSpd"));
StartJumpTowardsPlayer(ConfigFloat("JumpDelayTime"),ConfigFloat("JumpRecoveryTime"),ConfigFloat("JumpMoveSpd"),ConfigFloat("JumpLockinTargetTime"));
}
m.F(A::LAST_JUMP_TIMER)=ConfigFloat("JumpTimer");
}
@ -129,17 +130,19 @@ void Monster::STRATEGY::RUN_TOWARDS(Monster&m,float fElapsedTime,std::string str
if(m.B(A::JUMP_TOWARDS_PLAYER)){
jumpTargetPos=game->GetPlayer()->GetPos();
}
if(m.GetPos().x>jumpTargetPos.x){
m.SetX(std::max(jumpTargetPos.x,m.GetPos().x-m.F(A::JUMP_MOVE_SPD)*game->GetElapsedTime()));
} else
if(m.GetPos().x<jumpTargetPos.x){
m.SetX(std::min(jumpTargetPos.x,m.GetPos().x+m.F(A::JUMP_MOVE_SPD)*game->GetElapsedTime()));
}
if(m.GetPos().y>jumpTargetPos.y){
m.SetY(std::max(jumpTargetPos.y,m.GetPos().y-m.F(A::JUMP_MOVE_SPD)*game->GetElapsedTime()));
} else
if(m.GetPos().y<jumpTargetPos.y){
m.SetY(std::min(jumpTargetPos.y,m.GetPos().y+m.F(A::JUMP_MOVE_SPD)*game->GetElapsedTime()));
if(m.F(A::JUMP_LANDING_TIMER)>m.F(A::JUMP_MOVE_TO_TARGET_TIMER)){
if(m.GetPos().x>jumpTargetPos.x){
m.SetX(std::max(jumpTargetPos.x,m.GetPos().x-m.F(A::JUMP_MOVE_SPD)*game->GetElapsedTime()));
} else
if(m.GetPos().x<jumpTargetPos.x){
m.SetX(std::min(jumpTargetPos.x,m.GetPos().x+m.F(A::JUMP_MOVE_SPD)*game->GetElapsedTime()));
}
if(m.GetPos().y>jumpTargetPos.y){
m.SetY(std::max(jumpTargetPos.y,m.GetPos().y-m.F(A::JUMP_MOVE_SPD)*game->GetElapsedTime()));
} else
if(m.GetPos().y<jumpTargetPos.y){
m.SetY(std::min(jumpTargetPos.y,m.GetPos().y+m.F(A::JUMP_MOVE_SPD)*game->GetElapsedTime()));
}
}
if(m.F(A::JUMP_LANDING_TIMER)>=m.F(A::JUMP_ORIGINAL_LANDING_TIMER)/2){
m.SetZ(util::lerp(0,float(ConfigInt("JumpHeight")),1-jumpLandingTimerRatio));

@ -39,7 +39,7 @@ All rights reserved.
#define VERSION_MAJOR 0
#define VERSION_MINOR 5
#define VERSION_PATCH 1
#define VERSION_BUILD 8086
#define VERSION_BUILD 8087
#define stringify(a) stringify_(a)
#define stringify_(a) #a

@ -63,6 +63,8 @@ MonsterStrategy
JumpHeight = 750
# Maximum distance the player can be away from the enemy for a jump to occur.
MaxPlayerJumpEngageDistance = 900
# How much time remaining for the jump target being locked into place.
JumpLockinTargetTime = 0.0
}
Shoot Afar

@ -143,7 +143,9 @@ Monsters
JumpTimer = 10.0
JumpAttackDamage = 20
JumpKnockbackFactor = 50.0
JumpMoveSpd = 70
JumpMoveSpd = 90
# How much time remaining for the jump target being locked into place.
JumpLockinTargetTime = 0.2
# Drop Item Name, Drop Percentage(0-100%), Drop Min Quantity, Drop Max Quantity
DROP[0] = Yellow Slime Remains,30%,1,1

Loading…
Cancel
Save