Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#268 closed enhancement (released)

Restructure stats for re-use

Reported by: ibboard Owned by:
Priority: major Milestone: WarFoundry 0.1
Component: WarFoundry-API Version: Trunk
Keywords: stats multiple reuse Cc:
Blocked By: Blocking: #269, #281

Description

The current stats require duplication, but a lot of stats (e.g. "a goblin) are common. It would be more efficient if we could reference these central stats. It would also make extensions that care about trooper type more than unit type (i.e. "goblin" rather than "goblin spearman") a bit easier.

Included in this restructure we should allow per-unit stats with no requirement to reference and re-use (i.e. the current behaviour), per-unit overrides with references (i.e. a reference and a current behaviour) and multiple stat lines.

Change History (9)

comment:1 Changed 10 years ago by ibboard

Blocking: 269 added

comment:2 Changed 10 years ago by ibboard

Milestone: WarFoundry 0.1
Status: newconfirmed

comment:3 Changed 10 years ago by ibboard

(In r548) Re #268: Restructure stats for re-use

  • Add "Member Type" class
  • Add member type setting and getting to Race
  • Load member types from XML files
  • Make unit type pull stat line from stats or first member type, or fall back to a blank stat line
  • Change Stats object to initialise blank values
  • Change schema
    • Make stats optional
    • Add member type list to race
    • Add optional member type references to units

comment:4 Changed 10 years ago by ibboard

(In r549) Re #268: Restructure stats for re-use

  • Test new stat line behaviour

comment:5 Changed 10 years ago by ibboard

(In r550) Re #268: Restructure stats for re-use

  • Add multi-stat properties to unit types
  • Deprecate single versions and make them return just the first stat line (since we guarantee at least one line)

comment:6 Changed 10 years ago by ibboard

(In r551) Re #268: Restructure stats for re-use

  • Add tests for multiple stat lines/referenced types and for overriding the stats

comment:7 Changed 10 years ago by ibboard

Resolution: fixed
Status: confirmedclosed

(In r552) Fixes #268: Restructure stats for re-use

  • Present new stats through Unit
  • Add property to get array of type IDs

comment:8 Changed 10 years ago by ibboard

Blocking: 281 added

comment:9 Changed 10 years ago by ibboard

Resolution: fixedreleased

Release as part of v0.1b9

Note: See TracTickets for help on using tickets.