Class DirectKillExpStrategySO
- Namespace
- ElectricDrill.AstraHealth.Experience.Strategies
- Assembly
- com.electricdrill.astra-health.Runtime.dll
Experience collection strategy that grants experience when the collector is the dealer of the killing blow. This is the default behavior - only the entity that dealt the final damage receives experience.
public class DirectKillExpStrategySO : ExpCollectionStrategySO, ITaggable
- Inheritance
-
objectDirectKillExpStrategySO
- Implements
-
ITaggable
- Inherited Members
Remarks
Kill-credit attribution is Experimental — this API may still change. "Dealer" is resolved through KillCreditAttribution: under the default ElectricDrill.AstraRpgFramework.Ownership.EntityAttribution.Direct this is the literal damage performer; under ElectricDrill.AstraRpgFramework.Ownership.EntityAttribution.Owner/ElectricDrill.AstraRpgFramework.Ownership.EntityAttribution.Root it is the performer's resolved owner (e.g. a ship credited for a kill dealt by its weapon).
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.