User:AVS/Bonus system

From VCMI Project Wiki
< User:AVS
Revision as of 11:27, 27 February 2013 by AVS (talk | contribs)
Jump to: navigation, search

-> Bonus system is core part of mechanics and it`s interface should be independent of particular components.

  • -> extract common interface
    • Bonus (w/o BonusType, new bonus types can be added in future by mods, all hardcoded types should be used only internally by gamehandler)
      • (*) abstract interface for Bonus.
    • BonusList
    • IBonusBearer
    • ILimiter
    • IPropagator
  • -> get rid of dependency from CCreature, CSpell
  • (?) what to do with concrete selectors, limiters, propagators?

Bonus type handler

  • [WiP] convert bonusnames.json to new config
  • [Todo] implement macro substitution for name|description (will be reusable)
    • format ${XXX}
  • [WiP] implement Bonus type handler itself
  • [Todo] integrate to codebase
  • (*) [Todo] implement "id-like class" for bonus type
    • [Todo] refactor for new bonus type identifacation.
  • (**) [Todo] initial bonus configuration for mods.

Leveled bonuses

  • Generalization of handling growing arts, creature exp, hero speciality.
    • Each bearer has Level attribute (impl: virtual getter)
    • Bonus may have configuration for levels.