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

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

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

@ -143,7 +143,9 @@ Monsters
JumpTimer = 10.0 JumpTimer = 10.0
JumpAttackDamage = 20 JumpAttackDamage = 20
JumpKnockbackFactor = 50.0 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 Item Name, Drop Percentage(0-100%), Drop Min Quantity, Drop Max Quantity
DROP[0] = Yellow Slime Remains,30%,1,1 DROP[0] = Yellow Slime Remains,30%,1,1

Loading…
Cancel
Save