Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class X2Ability_PsiClass_Extended extends X2Ability_PsiOperativeAbilitySet;
- static function array<X2DataTemplate> CreateTemplates()
- {
- local array<X2DataTemplate> Templates;
- Templates.AddItem(Meph_Busted());
- Templates.AddItem(PurePassive('BustedTraining_Passive', "img:///UILibrary_PerkIcons.UIPerk_XXXXX", false , 'eAbilitySource_Psionic'));
- return Templates;
- }
- // When your concealment is broken, gain a bonus to dodge for a few turns. Passive.
- static function X2AbilityTemplate Meph_Busted()
- {
- local X2AbilityTemplate Template;
- local X2Effect_PersistentStatChange DodgeEffect;
- local X2AbilityTrigger_EventListener Trigger;
- `CREATE_X2ABILITY_TEMPLATE(Template, 'BustedTraining');
- Template.IconImage = "img:///UILibrary_PerkIcons.UIPerk_XXXXXX";
- Template.AbilitySourceName = 'eAbilitySource_Psionic';
- Template.eAbilityIconBehaviorHUD = EAbilityIconBehavior_NeverShow;
- Template.Hostility = eHostility_Neutral;
- Template.AbilityToHitCalc = default.DeadEye;
- Template.AbilityTargetStyle = default.SelfTarget;
- // Ability is triggered when individual concealment is broken
- Trigger = new class'X2AbilityTrigger_EventListener';
- Trigger.ListenerData.Deferral = ELD_OnStateSubmitted;
- Trigger.ListenerData.EventID = 'UnitConcealmentBroken';
- Trigger.ListenerData.Filter = eFilter_Unit;
- Trigger.ListenerData.EventFn = class'XComGameState_Ability'.static.AbilityTriggerEventListener_Self;
- Template.AbilityTriggers.AddItem(Trigger);
- // Ability is triggered when squad concealment is broken
- Trigger = new class'X2AbilityTrigger_EventListener';
- Trigger.ListenerData.Deferral = ELD_OnStateSubmitted;
- Trigger.ListenerData.EventID = 'SquadConcealmentBroken';
- Trigger.ListenerData.Filter = eFilter_Unit;
- Trigger.ListenerData.EventFn = class'XComGameState_Ability'.static.AbilityTriggerEventListener_Self;
- Template.AbilityTriggers.AddItem(Trigger);
- // Create a persistent stat change effect that grants a defense bonus
- DodgeEffect = new class'X2Effect_PersistentStatChange';
- DodgeEffect.EffectName = 'BustedTraining_Effect';
- DodgeEffect.AddPersistentStatChange(eStat_Dodge, default.BUSTED_DODGE_BONUS);
- DodgeEffect.SetDisplayInfo(ePerkBuff_Passive, Template.LocFriendlyName, Template.LocLongDescription, Template.IconImage, true, ,Template.AbilitySourceName);
- // Prevent the effect from applying to a unit more than once
- DodgeEffect.DuplicateResponse = eDupe_Refresh;
- // The effect lasts for a specified duration
- DodgeEffect.BuildPersistentEffect(default.BUSTED_DURATION, false, true, false, eGameRule_PlayerTurnBegin);
- Template.AddShooterEffect(DodgeEffect);
- Template.AdditionalAbilities.AddItem('BustedTraining_Passive');
- //Template.SetUIStatMarkup(class'XLocalizedData'.default.DodgeLabel, eStat_Dodge, default.BUSTED_DODGE_BONUS);
- return Template;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement