Opened 3 years ago

Closed 3 years ago

Last modified 3 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 3 years ago.
with division
capture.diff (876 bytes) - added by fatherbushido 3 years ago.
or mul

Download all attachments as: .zip

Change History (6)

comment:1 Changed 3 years ago by mimo

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).

Changed 3 years ago by fatherbushido

Attachment: capture2.diff added

with division

Changed 3 years ago by fatherbushido

Attachment: capture.diff added

or mul

comment:2 Changed 3 years ago by fatherbushido

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 3 years ago by fatherbushido (previous) (diff)

comment:3 Changed 3 years ago by mimo

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 Changed 3 years ago by mimo

Keywords: review removed

Thanks for the patch

Note: See TracTickets for help on using tickets.