OverrideDamageRemovesReserveActionPoints
Tracking Issue: #903
Tags: events
The OverrideDamageRemovesReserveActionPoints
event allows mods to override
the base game logic that determines that a Unit must lose their Reserve Action Points
when they take damage.
This event triggers after the information about this damage instance has been
added to the UnitState.DamageResults
array, so you can use that last entry
to get any additional info about who damaged whom with what.
OverrideDamageRemovesReserveActionPoints event
Param | Value |
---|---|
EventID | OverrideDamageRemovesReserveActionPoints |
EventData | XComLWTuple |
EventSource | XComGameState_Unit |
NewGameState | yes |
Tuple contents
Index | Name | Type | Direction |
---|---|---|---|
0 | bDamageRemovesReserveActionPoints | bool | inout |
Listener template
static function EventListenerReturn OnOverrideDamageRemovesReserveActionPoints(Object EventData, Object EventSource, XComGameState GameState, Name EventID, Object CallbackObject)
{
local XComGameState_Unit UnitState;
local XComLWTuple Tuple;
local bool bDamageRemovesReserveActionPoints;
UnitState = XComGameState_Unit(EventSource);
Tuple = XComLWTuple(EventData);
bDamageRemovesReserveActionPoints = Tuple.Data[0].b;
// Your code here
Tuple.Data[0].b = bDamageRemovesReserveActionPoints;
return ELR_NoInterrupt;
}