Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static function EventListenerReturn BscReflectorListener(Object EventData, Object EventSource, XComGameState GameState, Name EventID, Object CallbackData)
- {
- local XComGameStateContext_Ability AbilityContext;
- local XComGameState NewGameState;
- local XComGameState_Unit UnitState, SourceUnit; //UnitState is the dude being shot at, SourceUnit is the shooter
- AbilityContext = XComGameStateContext_Ability(GameState.GetContext());
- if (AbilityContext != none && AbilityContext.InterruptionStatus != eInterruptionStatus_Interrupt)
- {
- SourceUnit = XComGameState_Unit(EventSource);
- NewGameState = class'XComGameStateContext_ChangeContainer'.static.CreateChangeState("Templar Reflect Data");
- UnitState = XComGameState_Unit(NewGameState.ModifyStateObject(class'XComGameState_Unit', SourceUnit.ObjectID));
- UnitState.ReflectedAbilityContext = AbilityContext;
- `TACTICALRULES.SubmitGameState(NewGameState);
- class'XComGameStateContext_Ability'.static.ActivateAbilityByTemplateName(SourceUnit.GetReference(), 'BasicReflectorAttack', AbilityContext.InputContext.SourceObject);
- }
- return ELR_NoInterrupt;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement