Table of Contents

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
object
DamageSourceKillExpStrategySO
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

collector EntityCore

The entity attempting to collect experience.

victim EntityCore

The entity that died and may provide experience.

dmgResolutionContext DamageResolutionContext

The damage resolution that caused the death.

multiplier float

Output multiplier to apply to the base experience (1.0 = full exp).

Returns

bool

True if the strategy's conditions are met, false otherwise.