Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#3973 closed enhancement (fixed)

[PATCH] Capturerate threshold

Reported by: elexis Owned by: mimo
Priority: Should Have Milestone: Alpha 21
Component: UI & Simulation Keywords: simple patch
Cc: Patch:


Currently the capturerate depends linearily on the health-points of buildings. This means ruins will be captured instantaneously and can switch ownership back- and forth quickly.

There should be a threshold with regards to the capture rate. Buildings with less than (for example) 10% health could be treated like having 10% health.

mimo who reported this issue suggests a slightly different formula: cP * (0.1 + 0.9*health/maxhealth) instead of cP * health/maxhealth.

Attachments (2)

capture2.diff (844 bytes ) - added by fatherbushido 4 years ago.
with division
capture.diff (876 bytes ) - added by fatherbushido 4 years ago.
or mul

Download all attachments as: .zip

Change History (6)

comment:1 by mimo, 4 years ago

As it is made a "simple" ticket, better to be precise in the description. As it is the strength of the capturing unit which is modified in Attack.js, it is currently multiplied by maxHealth/health (which becomes very big when health -> 0) and could be changed to maxHealth/(0.1*maxHealth + 0.9*health).

by fatherbushido, 4 years ago

Attachment: capture2.diff added

with division

by fatherbushido, 4 years ago

Attachment: capture.diff added

or mul

comment:2 by fatherbushido, 4 years ago

Keywords: patch review added
Milestone: BacklogAlpha 21
Summary: Capturerate threshold[PATCH] Capturerate threshold

That's a nice idea which will prevent that "capture recapture capture recapture then destroy" thing. And mimo's formula is nice as it doesn't really change the actual multiplier for healthy building.

hp/maxHP  current multiplier new multiplier
to 0 infinite 10
0.1 10 5.3
0.2 5 3.6
0.3 3.3 2.7
0.4 2.5 2.2
0.5 2 1.8
0.6 1.7 1.6
0.7 1.4 1.4
0.8 1.3 1.2
0.9 1.1 1.1
1 1 1
Last edited 4 years ago by fatherbushido (previous) (diff)

comment:3 by mimo, 4 years ago

Owner: set to mimo
Resolution: fixed
Status: newclosed

In 18215:

do not let the captureStrength become infinite when capturing a damaged structure, fix #3973, patch by fatherbushido

comment:4 by mimo, 4 years ago

Keywords: review removed

Thanks for the patch

Note: See TracTickets for help on using tickets.