DamageReflectEffect ​
Inherits: Effect < DatabaseResource < Resource
DamageReflectEffect reflects a portion of damage taken back to the attacker.
Properties ​
float | percentage_of_damage | 50.0 |
int | maximum_damage_per_reflect | 0 |
int | total_damage_to_reflect | 0 |
int | reflect_damage_type | 0 |
bool | can_reflect_be_avoided | true |
CombatOptions.BasisChoice | reflect_basis | CombatOptions.BasisChoice.PROJECT_DEFAULT |
int | max_reflect_chain | -1 |
Methods ​
void | specific_effect_logic( effect_instance: EffectInstance ) |
void | on_apply_finished( effect_instance: EffectInstance ) |
float | get_damage_reflected( effect_instance: EffectInstance ) |
int | get_remaining_reflect_capacity( effect_instance: EffectInstance ) |
float | get_reflection_preview( base_damage: float ) |
bool | is_reflect_active( effect_instance: EffectInstance ) |
String | get_effect_description() |
String | get_editor_description() |
Property descriptions ​
float percentage_of_damage = 50.0 ​
The percent of damage to reflect back
int maximum_damage_per_reflect = 0 ​
The maximum amount of damage that can be reflected per hit (0 = no limit)
int total_damage_to_reflect = 0 ​
The total amount of damage that can be reflected from effect (0 = no limit)
int reflect_damage_type = 0 ​
Damage type for reflected damage (empty = use original type)
bool can_reflect_be_avoided = true ​
Whether reflected damage can be avoided by the attacker
CombatOptions.BasisChoice reflect_basis = CombatOptions.BasisChoice.PROJECT_DEFAULT ​
Which number of the hit the reflection is taken from. HEALTH_ONLY reflects only what reached health (not what shields absorbed); AFTER_TAKEN also counts the shield-absorbed part. Project default: GameplayConfig, Damage Results
int max_reflect_chain = -1 ​
How many reactions deep a hit may be and still be reflected. 1: a normal hit is reflected, a reflection is never reflected again. Higher values let reflections ping-pong between two damage reflection users that many times. -1 = the project default (GameplayConfig, Damage Results)
Method descriptions ​
void specific_effect_logic( effect_instance: EffectInstance ) ​
Applies the specific logic for this effect, setting up damage reflection
void on_apply_finished( effect_instance: EffectInstance ) ​
Handles the finishing of the effect, cleaning up tracking data
float get_damage_reflected( effect_instance: EffectInstance ) ​
Gets the current amount of damage reflected for a specific effect instance
int get_remaining_reflect_capacity( effect_instance: EffectInstance ) ​
Gets the remaining damage that can be reflected for a specific effect instance
float get_reflection_preview( base_damage: float ) ​
Calculate potential reflection amount for preview/tooltip purposes
bool is_reflect_active( effect_instance: EffectInstance ) ​
Check if damage reflection effect is still active and has capacity
String get_effect_description() ​
Generates effect description for tooltips
String get_editor_description() ​
A short text for the effect editor that says what the effect does.