Skip to content

Commit

Permalink
Change LifeForm::MaxSpeed
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
bla-rs authored and ooxi committed Dec 9, 2016
1 parent 736d827 commit d682711
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/game/lifeforms/LifeForm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit d682711

Please sign in to comment.