Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#1633 closed enhancement (fixed)

Use floats for entity health values instead of integers.

Reported by: Deiz Owned by: peter
Priority: Should Have Milestone: Alpha 14
Component: UI & Simulation Keywords:
Cc: Patch:

Description

The current integer approach causes a number of problems. Poor granularity makes it difficult to balance slow healing rates, such as healing while garrisoned, as well as the as-yet-unimplemented passive health regeneration for units.

It was suggested on IRC that health be stored as a float, and converted to an integer when passed to the GUI (via Math.ceil() or similar, such that a health value of '0.01' would display as '1' in the GUI).

This is a superficially simple change (simply modifying an XML schema or two, replacing integers with decimals and rounding up in the GUI) but it may require further consideration or have unintended consequences, thus it's best left to alpha 12.

Change History (5)

comment:1 by Deiz, 12 years ago

In 12651:

Add support for non-integer GarrisonHolder regen rates; round health up in the GUI. Refs #1633.

comment:2 by Kieran P, 11 years ago

Milestone: Alpha 12Backlog

comment:3 by peter, 11 years ago

Owner: set to peter
Resolution: fixed
Status: newclosed

In 13507:

Use floats for health. Fix #1633

comment:4 by peter, 11 years ago

In 13508:

Replace decimal with nonNegativeDecimal. Refs #1633

comment:5 by Kieran P, 11 years ago

Milestone: BacklogAlpha 14
Note: See TracTickets for help on using tickets.