Skip to content

CombatOptions ​

Inherits: RefCounted

The project's combat result options (GameplayConfig, Combat category, "Damage Results" group) with sensible fallbacks when no config can be loaded (tests, a project without a config file). See docs/systems/entity-stats.md, section 18.3.

Variables ​

GameplayConfigoverride_confignull

Methods ​

DamageResult.DamageBasisresolve_basis( choice: BasisChoice, reaction: Reaction ) static
DamageResult.DamageBasisdefault_basis( reaction: Reaction ) static
booluse_threat_system() static
floatheal_threat_multiplier() static
floatdamage_threat_multiplier() static
intmax_reflect_chain() static
boolzero_damage_counts_as_hit() static
GameplayConfighit_config() static
floatminimum_damage() static
boolround_damage() static
GameplayConfig.CapacityRulecapacity_change_rule() static
intdefault_npc_growth_profile_id() static
GameplayConfig.CapacityRulelevel_up_capacity_rule() static

Enumerations ​

enum Reaction ​

Which reaction asks for a basis

  • THREAT = 0
  • LEECH = 1
  • REFLECT = 2

enum BasisChoice ​

What an effect's "basis choice" export selects. PROJECT_DEFAULT follows GameplayConfig; the rest force one number

  • PROJECT_DEFAULT = 0
  • RAW = 1
  • AFTER_DONE = 2
  • AFTER_TAKEN = 3
  • HEALTH_ONLY = 4

Variable descriptions ​

GameplayConfig override_config = null ​

Tests set this to use their own options instead of the project's

Method descriptions ​

DamageResult.DamageBasis resolve_basis( choice: BasisChoice, reaction: Reaction ) ​

The number of the hit a reaction uses: the effect's own choice, or the project default for that reaction

DamageResult.DamageBasis default_basis( reaction: Reaction ) ​

The damage basis a reaction uses by default, from the settings of the game.

bool use_threat_system() ​

Does the project use the threat system? Off: enemies attack the nearest of the entities fighting them

float heal_threat_multiplier() ​

The share of healing done that becomes threat on the enemies fighting the healed entity

float damage_threat_multiplier() ​

The multiplier on the threat a hit of damage makes

int max_reflect_chain() ​

How many reactions deep a hit may be and still be reflected

bool zero_damage_counts_as_hit() ​

Does a hit that does no damage still count as a hit (from the settings)?

GameplayConfig hit_config() ​

The project's settings (Game settings, Combat, Hit Rules read from it by HitRules)

float minimum_damage() ​

The least damage a hit does (from the settings).

bool round_damage() ​

Is damage rounded to whole numbers (from the settings)?

GameplayConfig.CapacityRule capacity_change_rule() ​

What happens to a pool's current value when its maximum changes (equipment, buffs, stats)

int default_npc_growth_profile_id() ​

The growth profile that closes the chain of every NPC (a GrowthProfile id, 0 = none)

GameplayConfig.CapacityRule level_up_capacity_rule() ​

What happens to a pool whose maximum grows because the entity levelled up