From d682711a0bad51f48805d3e84b0f8089b7ffd777 Mon Sep 17 00:00:00 2001 From: bla-rs Date: Sun, 31 Jan 2016 20:27:49 +0100 Subject: [PATCH] Change `LifeForm::MaxSpeed` Old formula max-speed_old(agility) = agility / 5 New formula max-speed_new(agility, weight) = 1.5 * agility / (agility * weight + 7.5) The new formula prevents the speed from increasing too fast while allowing ridiculously high agilities (see discussion in issue #120). --- CHANGELOG.md | 1 + src/game/lifeforms/LifeForm.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4a2c00e8..79ed9d79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ Legend Upcoming release ---------------- + * `[*]` [Violet will speed up slower](https://github.com/ooxi/violetland/pull/120) * `[*]` [Use standard libintl detection module](https://github.com/ooxi/violetland/pull/134) * `[+]` [Local preview of GitHub flavoured Markdown](https://github.com/ooxi/violetland/pull/127) * `[*]` [Violet will level up faster](https://github.com/ooxi/violetland/pull/115) diff --git a/src/game/lifeforms/LifeForm.cpp b/src/game/lifeforms/LifeForm.cpp index 06328c72..9e4f0273 100644 --- a/src/game/lifeforms/LifeForm.cpp +++ b/src/game/lifeforms/LifeForm.cpp @@ -126,7 +126,7 @@ const int LifeForm::AttackDelay() const { } const float LifeForm::MaxSpeed() const { - return getAgility() / 5.0f; + return 1.5f * getAgility() / ( getAgility() * getWeight() + 7.5f ); } const float LifeForm::HealthRegen() const {