Page MenuHomeWildfire Games

Allow area damages to have a minimum range.
Needs ReviewPublic

Authored by Freagarach on Sep 9 2019, 12:44 PM.

Details

Reviewers
wraitii
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Summary

This is split from D1838 and allows for area damages to have a minimum range, where the target is not damaged. No use case (yet) for vanilla, but useful for modders.

Test Plan
  • Use a catapult to test that splash damage still works fine.
  • One can add a MinRange to a splash and verify that works (unit will still be damaged by the projectile itself).

Event Timeline

Freagarach created this revision.Sep 9 2019, 12:44 PM
Owners added a subscriber: Restricted Owners Package.Sep 9 2019, 12:44 PM

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/105/display/redirect

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/614/display/redirect

Stan added a subscriber: Stan.Sep 9 2019, 4:09 PM

Maybe this should be affectable by tech, (ie researching close combat weapon or whatever) ? Just an idea it would also work having #252

Freagarach added a comment.EditedSep 9 2019, 4:19 PM

This patch enables a splash to have a minimum range: e.g. when the projectile lands and it has a minRange of 5 m, the first 5 m would not be damaged, only in the range between the minRange and the maxRange damage is dealt.

Stan added a comment.Sep 9 2019, 4:27 PM
In D2270#94462, @Stan wrote:

Maybe this should be affectable by tech, (ie researching close combat weapon or whatever) ? Just an idea it would also work having #252

This patch enables a splash to have a minimum range: e.g. when the projectile lands and it has a minRange of 5 m, the first 5 m would not be damaged, only in the range between the minRange and the maxRange damage is dealt.

Yeah I meant be able to change that during the game :)

Freagarach added a comment.EditedSep 9 2019, 4:52 PM

Oh, I thought focus on the second part ;)
But I thought about adding that (upgradable) here also, but I don't want to spam diffs too much, there's a lot to do already and me creating more diffs is not good for review-morale (although I have a list of diffs I want to create ;) ) and it (upgradable) is out of scope for this one.

Freagarach updated this revision to Diff 11539.Mar 24 2020, 4:49 PM
  • Rebased.
  • Remove unnecessary spaces in JSDoc in Attacking.js.

Successful build - Chance fights ever on the side of the prudent.

Linter detected issues:
Executing section Source...
Executing section JS...

binaries/data/mods/public/simulation/components/Attack.js
| 425| »   return·{
|    | [NORMAL] ESLintBear (consistent-return):
|    | Function expected no return value.
Executing section cli...

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/1901/display/redirect