Class DamageSourceKillExpStrategySO
- Namespace
- ElectricDrill.AstraHealth.Experience.Strategies
- Assembly
- com.electricdrill.astra-health.Runtime.dll
Experience collection strategy that grants experience when the damage source matches a configured source. Useful for environmental damage, traps, or any other specific damage source scenarios. For example: create an "Environmental" DamageSource and assign it to grant XP when enemies die from fall damage.
public class DamageSourceKillExpStrategySO : ExpCollectionStrategySO, ITaggable
- Inheritance
-
objectDamageSourceKillExpStrategySO
- Implements
-
ITaggable
- Inherited Members
Methods
Validate(EntityCore, EntityCore, DamageResolutionContext, out float)
Override this method to implement the specific validation logic for the strategy.
protected override bool Validate(EntityCore collector, EntityCore victim, DamageResolutionContext dmgResolutionContext, out float multiplier)
Parameters
collectorEntityCoreThe entity attempting to collect experience.
victimEntityCoreThe entity that died and may provide experience.
dmgResolutionContextDamageResolutionContextThe damage resolution that caused the death.
multiplierfloatOutput multiplier to apply to the base experience (1.0 = full exp).
Returns
- bool
True if the strategy's conditions are met, false otherwise.