Character interface is the central data model in Kaizen, representing the player’s current state, stats, progression, and prestige data.
Interface definition
Properties
Identity
Unique identifier for the character
Display name of the character (defaults to “Hero”)
Current character level
Base stats
Base strength stat value, affects physical damage output
Base intelligence stat value, affects magical damage output
Base endurance stat value, affects health and survivability
Stat modifiers
Multiplier applied to base strength from upgrades and effects
Multiplier applied to base intelligence from upgrades and effects
Multiplier applied to base endurance from upgrades and effects
Prestige system
Number of times the character has prestiged (reset with bonuses)
Permanent multipliers earned through prestige that affect each stat
Premium currency earned through prestiging, used for prestige upgrades
Economy
Current gold amount, earned through combat and spent on gold upgrades
Campaign progress
Current stage number in the campaign (advances every 10 waves)
Current wave number within the stage (1-10)
Timestamps
Timestamp when the character was created
Timestamp of the character’s last activity
Usage example
Creating a default character
Modifying character stats
Prestige reset
Related services
- CharacterService - Manages character state and provides methods for stat modification
- PrestigeService - Handles prestige mechanics and character resets
- CombatService - Uses character stats for combat calculations
When resetting a character through prestige, the following fields are preserved:
prestigeLevelprestigeMultipliersprestigeCoresgold
The character state is persisted to the database through the
CharacterService.updateDatabase() method, which selectively saves only the fields that need server-side persistence.