diff options
author | Fedja Beader <fedja@protonmail.ch> | 2024-08-28 19:33:27 +0000 |
---|---|---|
committer | Fedja Beader <fedja@protonmail.ch> | 2024-08-28 19:33:27 +0000 |
commit | 315867beac8c4836e802856d2dae29c5ef58911a (patch) | |
tree | 819446992648bc55e10f822825f2256a563f73da /src | |
parent | f0fb11cdfe92921ac76d6bb34a1da64334a01a17 (diff) | |
download | plus-315867beac8c4836e802856d2dae29c5ef58911a.tar.gz plus-315867beac8c4836e802856d2dae29c5ef58911a.tar.bz2 plus-315867beac8c4836e802856d2dae29c5ef58911a.tar.xz plus-315867beac8c4836e802856d2dae29c5ef58911a.zip |
Fix off-by-one causing archer attack mode to approach to within attack range - 1
****
mana/plus!96
Diffstat (limited to 'src')
-rw-r--r-- | src/actormanager.cpp | 2 | ||||
-rw-r--r-- | src/being/localplayer.cpp | 5 | ||||
-rw-r--r-- | src/gamemodifiers.cpp | 28 |
3 files changed, 18 insertions, 17 deletions
diff --git a/src/actormanager.cpp b/src/actormanager.cpp index f1c61318e..a7ebc8acc 100644 --- a/src/actormanager.cpp +++ b/src/actormanager.cpp @@ -1150,7 +1150,7 @@ Being *ActorManager::findNearestLivingBeing(const Being *const aroundBeing, const int attackRange = localPlayer->getAttackRange(); bool specialDistance = false; - if (settings.moveToTargetType == 11 + if (settings.moveToTargetType == 11 // archer && localPlayer->getAttackRange() > 2) { specialDistance = true; diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp index 670fb58cd..f7576a01d 100644 --- a/src/being/localplayer.cpp +++ b/src/being/localplayer.cpp @@ -1371,12 +1371,12 @@ void LocalPlayer::moveToTarget(int dist) ServerType::TMWATHENA); switch (dist) { - case 10: + case 11: // archer dist = mAttackRange; if (dist == 1 && broken) dist = 2; break; - case 11: + case 12: // range-1 dist = mAttackRange - 1; if (dist < 1) dist = 1; @@ -2710,6 +2710,7 @@ void LocalPlayer::fixAttackTarget() if ((mMap == nullptr) || (mTarget == nullptr)) return; + // 11 == archer if (settings.moveToTargetType == 11 || (settings.attackType == 0U) || !config.getBoolValue("autofixPos")) { diff --git a/src/gamemodifiers.cpp b/src/gamemodifiers.cpp index 01d54b212..3205c56bf 100644 --- a/src/gamemodifiers.cpp +++ b/src/gamemodifiers.cpp @@ -200,33 +200,33 @@ std::string GameModifiers::getCrazyMoveTypeString() addModifier2(MoveToTargetType, moveToTargetType, "moveToTargetType", 13, { // TRANSLATORS: move to target type in status bar - N_("(0) default moves to target"), + N_("(0) default moves to target"), // 0 // TRANSLATORS: move to target type in status bar - N_("(1) moves to target in distance 1"), + N_("(1) moves to target in distance 1"), // 1 // TRANSLATORS: move to target type in status bar - N_("(2) moves to target in distance 2"), + N_("(2) moves to target in distance 2"), // 2 // TRANSLATORS: move to target type in status bar - N_("(3) moves to target in distance 3"), + N_("(3) moves to target in distance 3"), // 3 // TRANSLATORS: move to target type in status bar - N_("(4) moves to target in distance 4"), + N_("(4) moves to target in distance 4"), // 4 // TRANSLATORS: move to target type in status bar - N_("(5) moves to target in distance 5"), + N_("(5) moves to target in distance 5"), // 5 // TRANSLATORS: move to target type in status bar - N_("(6) moves to target in distance 6"), + N_("(6) moves to target in distance 6"), // 6 // TRANSLATORS: move to target type in status bar - N_("(7) moves to target in distance 7"), + N_("(7) moves to target in distance 7"), // 7 // TRANSLATORS: move to target type in status bar - N_("(8) moves to target in distance 8"), + N_("(8) moves to target in distance 8"), // 8 // TRANSLATORS: move to target type in status bar - N_("(9) moves to target in distance 9"), + N_("(9) moves to target in distance 9"), // 9 // TRANSLATORS: move to target type in status bar - N_("(A) moves to target in attack range"), + N_("(A) moves to target in attack range"), // 10 // TRANSLATORS: move to target type in status bar - N_("(a) archer attack range"), + N_("(a) archer attack range"), // 11 // TRANSLATORS: move to target type in status bar - N_("(B) moves to target in attack range - 1"), + N_("(B) moves to target in attack range - 1"), // 12 // TRANSLATORS: move to target type in status bar - N_("(?) move to target") + N_("(?) move to target") // 13 }) addModifier2(FollowMode, followMode, "followMode", 4, |