diff --git a/Adventures in Lestoria/RunTowards.cpp b/Adventures in Lestoria/RunTowards.cpp index b106411b..cd76bf42 100644 --- a/Adventures in Lestoria/RunTowards.cpp +++ b/Adventures in Lestoria/RunTowards.cpp @@ -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().xGetElapsedTime())); - } - 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().yGetElapsedTime())); + 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().xGetElapsedTime())); + } + 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().yGetElapsedTime())); + } } 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)); diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index d2aed00b..0c18ee2d 100644 --- a/Adventures in Lestoria/Version.h +++ b/Adventures in Lestoria/Version.h @@ -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 diff --git a/Adventures in Lestoria/assets/config/MonsterStrategies.txt b/Adventures in Lestoria/assets/config/MonsterStrategies.txt index 6972fb50..2e5f53b4 100644 --- a/Adventures in Lestoria/assets/config/MonsterStrategies.txt +++ b/Adventures in Lestoria/assets/config/MonsterStrategies.txt @@ -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 diff --git a/Adventures in Lestoria/assets/config/Monsters.txt b/Adventures in Lestoria/assets/config/Monsters.txt index 8cc2c4d1..e6e3b6ad 100644 --- a/Adventures in Lestoria/assets/config/Monsters.txt +++ b/Adventures in Lestoria/assets/config/Monsters.txt @@ -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 diff --git a/x64/Release/Adventures in Lestoria.exe b/x64/Release/Adventures in Lestoria.exe index 0a0c8513..904dafca 100644 Binary files a/x64/Release/Adventures in Lestoria.exe and b/x64/Release/Adventures in Lestoria.exe differ