Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class X2Ability_TacticalReloadNew2 extends X2Ability
- config(TacticalReloadNew2);
- var config int TACTICALRELOAD_COOLDOWN;
- var config float TACTICALRELOAD_AIM_MULTIPLIER;
- var config float DAMAGE_MULTIPLIER_TEMP;
- static function array<X2DataTemplate> CreateTemplates()
- {
- local array<X2DataTemplate> Templates;
- Templates.AddItem(TacticalReloadAbility());
- //Templates.AddItem(TacticalReloadDamage());
- return Templates;
- }
- static function AddCooldown(out X2AbilityTemplate Template, int Cooldown)
- {
- local X2AbilityCooldown AbilityCooldown;
- if (Cooldown > 0)
- {
- AbilityCooldown = new class'X2AbilityCooldown';
- AbilityCooldown.iNumTurns = Cooldown;
- Template.AbilityCooldown = AbilityCooldown;
- }
- }
- static function X2AbilityTemplate TacticalReloadAbility()
- {
- local X2AbilityTemplate Template;
- local X2Effect_TacticalReloadDamage TacticalReloadEffect;
- //local X2Condition_UnitEffects EffectCondition;
- local X2AbilityCost_ActionPoints ActionPointCost;
- `CREATE_X2ABILITY_TEMPLATE(Template, 'TacticalReload');
- // Icon
- Template.IconImage = "img:///UILibrary_PerkIcons.UIPerk_reload";
- Template.AbilitySourceName = 'eAbilitySource_Perk';
- Template.ShotHUDPriority = class'UIUtilities_Tactical'.const.CLASS_CORPORAL_PRIORITY;
- Template.eAbilityIconBehaviorHUD = eAbilityIconBehavior_AlwaysShow;
- // Targeting and Triggering
- Template.AbilityToHitCalc = default.DeadEye;
- Template.AbilityTargetStyle = default.SelfTarget;
- Template.AbilityTriggers.AddItem(default.PlayerInputTrigger);
- // Cost
- ActionPointCost = new class'X2AbilityCost_ActionPoints';
- ActionPointCost.iNumPoints = 1;
- ActionPointCost.bConsumeAllPoints = false;
- Template.AbilityCosts.AddItem(ActionPointCost);
- // Cooldown
- AddCooldown(Template, default.TACTICALRELOAD_COOLDOWN);
- // Shooter conditions
- Template.AbilityShooterConditions.AddItem(default.LivingShooterProperty);
- Template.AddShooterEffectExclusions();
- TacticalReloadEffect.fDamageMultiplier = default.DAMAGE_MULTIPLIER_TEMP; // Remove later
- // Infinite duration, but doesn't stack
- TacticalReloadEffect = new class'X2Effect_TacticalReloadDamage';
- //Effect.fDamageMultiplier = default.POWER_UP_DAMAGE_MULTIPLIER;
- TacticalReloadEffect.BuildPersistentEffect(1, false, true, false, eGameRule_PlayerTurnEnd);
- TacticalReloadEffect.SetDisplayInfo(ePerkBuff_Bonus, Template.LocFriendlyName, Template.GetMyLongDescription(), Template.IconImage, true,, Template.AbilitySourceName);
- Template.AddShooterEffect(TacticalReloadEffect);
- Template.SuperConcealmentLoss = class'X2AbilityTemplateManager'.default.SuperConcealmentStandardShotLoss;
- Template.ChosenActivationIncreasePerUse = class'X2AbilityTemplateManager'.default.StandardShotChosenActivationIncreasePerUse;
- Template.LostSpawnIncreasePerUse = class'X2AbilityTemplateManager'.default.StandardShotLostSpawnIncreasePerUse;
- Template.AbilityConfirmSound = "TacticalUI_Activate_Ability_Wraith_Armor";
- Template.Hostility = eHostility_Neutral;
- Template.bShowActivation = false;
- Template.bSkipFireAction = true;
- Template.BuildNewGameStateFn = TypicalAbility_BuildGameState;
- Template.BuildVisualizationFn = TypicalAbility_BuildVisualization;
- //Template.AdditionalAbilities.AddItem('IRI_Rider_AnimPassive');
- if(class'X2DownloadableContentInfo_TacticalReloadNew2'.default.CROSS_CLASS == true)
- {
- Template.bCrossClassEligible = true;
- }
- return Template;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement