Advertisement
Drakten

Untitled

Jun 12th, 2020
306
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. static function EventListenerReturn BscReflectorListener(Object EventData, Object EventSource, XComGameState GameState, Name EventID, Object CallbackData)
  2. {
  3. local XComGameStateContext_Ability AbilityContext;
  4. local XComGameState NewGameState;
  5. local XComGameState_Unit UnitState, SourceUnit; //UnitState is the dude being shot at, SourceUnit is the shooter
  6.  
  7. AbilityContext = XComGameStateContext_Ability(GameState.GetContext());
  8.  
  9. if (AbilityContext != none && AbilityContext.InterruptionStatus != eInterruptionStatus_Interrupt)
  10. {
  11. SourceUnit = XComGameState_Unit(EventSource);
  12.  
  13. NewGameState = class'XComGameStateContext_ChangeContainer'.static.CreateChangeState("Templar Reflect Data");
  14.  
  15. UnitState = XComGameState_Unit(NewGameState.ModifyStateObject(class'XComGameState_Unit', SourceUnit.ObjectID));
  16.  
  17. UnitState.ReflectedAbilityContext = AbilityContext;
  18.  
  19. `TACTICALRULES.SubmitGameState(NewGameState);
  20.  
  21. class'XComGameStateContext_Ability'.static.ActivateAbilityByTemplateName(SourceUnit.GetReference(), 'BasicReflectorAttack', AbilityContext.InputContext.SourceObject);
  22. }
  23. return ELR_NoInterrupt;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement