diff --git a/Adventures in Lestoria/Arrow.cpp b/Adventures in Lestoria/Arrow.cpp index a60891ca..9fe27559 100644 --- a/Adventures in Lestoria/Arrow.cpp +++ b/Adventures in Lestoria/Arrow.cpp @@ -81,7 +81,6 @@ void Arrow::PointToBestTargetPath(const uint8_t perceptionLevel){ if(distToPlayerGetPlayer()->GetPos()); const bool outsideMaxShootingRange=distToPlayer>=ConfigPixelsArr("Stand Still and Shoot Range",1); @@ -103,12 +103,14 @@ void Monster::STRATEGY::GOBLIN_BOW(Monster&m,float fElapsedTime,std::string stra float targetDir=m.B(A::RANDOM_DIRECTION)==CW?dirFromPlayer+PI/4:dirFromPlayer-PI/4; m.target=game->GetPlayer()->GetPos()+vf2d{m.F(A::RANDOM_RANGE),targetDir}.cart(); RUN_TOWARDS(m,fElapsedTime,"Run Towards"); - }else{ //Only the stand still and shoot range remains... + }else + if(m.F(A::ATTACK_COOLDOWN)>=ConfigFloat("Attack Reload Time")/2.f){ //Only the stand still and shoot range remains, which is twice as fast... PrepareToShoot(); } }break; case WINDUP:{ m.F(A::SHOOT_TIMER)-=fElapsedTime; + m.UpdateFacingDirection(game->GetPlayer()->GetPos()); if(m.F(A::SHOOT_TIMER)<=0){ geom2d::line pointTowardsPlayer(m.GetPos(),game->GetPlayer()->GetPos()); vf2d extendedLine=pointTowardsPlayer.upoint(1.1f); @@ -116,7 +118,9 @@ void Monster::STRATEGY::GOBLIN_BOW(Monster&m,float fElapsedTime,std::string stra Arrow&arrow=static_cast(*BULLET_LIST.back()); arrow.PointToBestTargetPath(m.F(A::PERCEPTION_LEVEL)); + m.F(A::ATTACK_COOLDOWN)=0.f; m.F(A::PERCEPTION_LEVEL)=std::min(ConfigFloat("Maximum Perception Level"),m.F(A::PERCEPTION_LEVEL)+ConfigFloat("Perception Level Increase")); + m.PerformAnimation("IDLE",m.GetFacingDirectionToTarget(game->GetPlayer()->GetPos())); m.phase=MOVE; } m.B(A::RANDOM_DIRECTION)=util::random()%2; diff --git a/Adventures in Lestoria/Version.h b/Adventures in Lestoria/Version.h index fecceb19..cbe520c8 100644 --- a/Adventures in Lestoria/Version.h +++ b/Adventures in Lestoria/Version.h @@ -39,7 +39,7 @@ All rights reserved. #define VERSION_MAJOR 1 #define VERSION_MINOR 2 #define VERSION_PATCH 0 -#define VERSION_BUILD 9169 +#define VERSION_BUILD 9174 #define stringify(a) stringify_(a) #define stringify_(a) #a diff --git a/Adventures in Lestoria/assets/Campaigns/2_1.tmx b/Adventures in Lestoria/assets/Campaigns/2_1.tmx index 47f6eebf..60c8302d 100644 --- a/Adventures in Lestoria/assets/Campaigns/2_1.tmx +++ b/Adventures in Lestoria/assets/Campaigns/2_1.tmx @@ -1,5 +1,5 @@ - + @@ -1887,7 +1887,12 @@ - + + + + + + diff --git a/Adventures in Lestoria/assets/config/Monsters.txt b/Adventures in Lestoria/assets/config/Monsters.txt index ca909164..09705cf0 100644 --- a/Adventures in Lestoria/assets/config/Monsters.txt +++ b/Adventures in Lestoria/assets/config/Monsters.txt @@ -591,7 +591,7 @@ Monsters # The First Four animations must represent a standing, walking, attack, and death animation. Their names are up to the creator. IDLE = 2, 0.6, Repeat WALK = 3, 0.2, Repeat - SHOOT = 4, 0.03, OneShot + SHOOT = 4, 0.06, OneShot DEATH = 4, 0.15, OneShot } diff --git a/x64/Release/Adventures in Lestoria.exe b/x64/Release/Adventures in Lestoria.exe index 6064445f..66f55592 100644 Binary files a/x64/Release/Adventures in Lestoria.exe and b/x64/Release/Adventures in Lestoria.exe differ