Skip to content

Commit

Permalink
Augmentation Abilities
Browse files Browse the repository at this point in the history
  • Loading branch information
Musashi1584 committed Dec 14, 2017
1 parent 236050b commit b3334d3
Show file tree
Hide file tree
Showing 8 changed files with 114 additions and 19 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.int diff
Binary file modified RPG.v12.XCOM_suo
Binary file not shown.
2 changes: 2 additions & 0 deletions RPG/Config/Augmentations/XComAugmentations.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
AUGMENTATION_BASE_MITIGATION_AMOUNT=1

[Augmentations.X2Item_Augmentations]
CYBER_ARM_BASEDAMAGE=(Damage=5, Spread = 1, PlusOne = 0, Crit = 3, Pierce = 0, Shred=0, Tag = "", DamageType="Melee")

CLAWS_BASEDAMAGE=(Damage=7, Spread=1, PlusOne=0, Crit=3, Pierce=2, Shred=1, Tag="", DamageType="Melee")
CLAWS_AIM=20
CLAWS_CRITCHANCE=10
Expand Down
19 changes: 10 additions & 9 deletions RPG/Config/XComClassData.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ NumInDeck=0
NumInForcedDeck=0
NumInDeck=0

[SpecOps X2SoldierClassTemplate]
NumInForcedDeck=0
NumInDeck=0
;[SpecOps X2SoldierClassTemplate]
;NumInForcedDeck=0
;NumInDeck=0

[Samurai X2SoldierClassTemplate]
NumInForcedDeck=0
NumInDeck=0
;[Samurai X2SoldierClassTemplate]
;NumInForcedDeck=0
;NumInDeck=0

[Infiltrator X2SoldierClassTemplate]
NumInForcedDeck=0
NumInDeck=0
;[Infiltrator X2SoldierClassTemplate]
;NumInForcedDeck=0
;NumInDeck=0

[XComGame.X2SoldierClass_DefaultClasses]
+SoldierClasses=UniversalSoldier
Expand All @@ -40,6 +40,7 @@ NumInDeck=0
+KillAssistsPerKill=4
+bAllowAWCAbilities=1
+bCanHaveBonds=true
+MinSuperConcealedDistance=2.5f
+SquaddieLoadout="Squaddie_UniversalSoldier"
+AllowedWeapons=(SlotType=eInvSlot_PrimaryWeapon, WeaponType="rifle")
+AllowedWeapons=(SlotType=eInvSlot_PrimaryWeapon, WeaponType="sniper_rifle")
Expand Down
9 changes: 8 additions & 1 deletion RPG/Localization/Augmentations/XComGame.int
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,11 @@ LocFriendlyName="Claw Slash"
LocLongDescription="Melee slash that does not end turn if you have action points left."
LocHelpText="Melee slash that does not end turn if you have action points left."
LocFlyOverText="Claw Slash"
LocPromotionPopupText="Melee slash that does not end turn if you have action points left."
LocPromotionPopupText="Melee slash that does not end turn if you have action points left."

[CyberPunch X2AbilityTemplate]
LocFriendlyName="Augmented Strike"
LocLongDescription="Cybernetically enhanced strike that disorients and knocks back targets."
LocHelpText="Cybernetically enhanced strike"
LocFlyOverText="Augmented Strike"
LocPromotionPopupText="Cybernetically enhanced strike that disorients and knocks back targets."
49 changes: 47 additions & 2 deletions RPG/Src/Augmentations/Classes/X2Ability_Augmentations_Abilities.uc
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
class X2Ability_Augmentations_Abilities extends X2Ability config (Augmentations);

var config int AUGMENTATION_BASE_MITIGATION_AMOUNT;
var config int AUGMENTED_STRIKE_DAMAGE;

static function array<X2DataTemplate> CreateTemplates()
{
local array<X2DataTemplate> Templates;

Templates.AddItem(ExMachina());
Templates.AddItem(CyberPunch());
Templates.AddItem(CyberPunchAnimSet());
Templates.AddItem(AugmentationBaseStats());
Expand All @@ -15,14 +17,50 @@ static function array<X2DataTemplate> CreateTemplates()
return Templates;
}

static function X2AbilityTemplate ExMachina()
{
local X2AbilityTemplate Template;
local X2Effect_PersistentStatChange PersistentStatChangeEffect;
local X2Effect_DamageImmunity DamageImmunity;

`CREATE_X2ABILITY_TEMPLATE(Template, 'ExMachina');
Template.IconImage = "img:///UILibrary_XPACK_Common.PerkIcons.UIPerk_divinearmor";

Template.AbilitySourceName = 'eAbilitySource_Item';
Template.eAbilityIconBehaviorHUD = EAbilityIconBehavior_NeverShow;
Template.Hostility = eHostility_Neutral;
Template.bDisplayInUITacticalText = false;

Template.AbilityToHitCalc = default.DeadEye;
Template.AbilityTargetStyle = default.SelfTarget;
Template.AbilityTriggers.AddItem(default.UnitPostBeginPlayTrigger);

DamageImmunity = new class'X2Effect_DamageImmunity';
DamageImmunity.EffectName = 'ExMachina';
DamageImmunity.DuplicateResponse = eDupe_Ignore;
DamageImmunity.ImmuneTypes.AddItem('Fire');
DamageImmunity.ImmuneTypes.AddItem('Poison');
DamageImmunity.ImmuneTypes.AddItem('Acid');
DamageImmunity.ImmuneTypes.AddItem(class'X2Item_DefaultDamageTypes'.default.ParthenogenicPoisonType);
DamageImmunity.BuildPersistentEffect(1, true, false, false);
DamageImmunity.SetDisplayInfo(ePerkBuff_Passive, Template.LocFriendlyName, Template.GetMyLongDescription(), Template.IconImage, false, , Template.AbilitySourceName);
DamageImmunity.TargetConditions.AddItem(new class'X2Condition_Cyborg');
Template.AddTargetEffect(DamageImmunity);

Template.BuildNewGameStateFn = TypicalAbility_BuildGameState;

return Template;
}

static function X2AbilityTemplate CyberPunch()
{
local X2AbilityTemplate Template;
local X2Effect_Knockback KnockbackEffect;
local X2Effect_ApplyWeaponDamage DamageEffect;

Template = class'X2Ability_RangerAbilitySet'.static.AddSwordSliceAbility('CyberPunch');

Template.IconImage = "img:///CyberPunchIcon";
Template.IconImage = "img:///UILibrary_PerkIcons.UIPerk_beserker_punch";

Template.CustomFireAnim = 'FF_MeleeCyberPunchA';
Template.CustomFireKillAnim = 'FF_MeleeCyberPunchA';
Expand All @@ -33,12 +71,19 @@ static function X2AbilityTemplate CyberPunch()
Template.CustomMovingTurnRightFireAnim = 'MV_RunTurn90RightMeleeCyberPunchA';
Template.CustomMovingTurnRightFireKillAnim = 'MV_RunTurn90RightMeleeCyberPunchA';

Template.AbilityTargetEffects.Length = 0;

KnockbackEffect = new class'X2Effect_Knockback';
KnockbackEffect.KnockbackDistance = 10;
KnockbackEffect.KnockbackDistance = 20;
KnockbackEffect.bKnockbackDestroysNonFragile = true;
KnockbackEffect.OnlyOnDeath = false;
Template.AddTargetEffect(KnockbackEffect);
Template.bOverrideMeleeDeath = true;

DamageEffect = new class'X2Effect_ApplyWeaponDamage';
Template.AddTargetEffect(DamageEffect);

Template.AddTargetEffect(class'X2StatusEffects'.static.CreateDisorientedStatusEffect(true));

Template.AdditionalAbilities.AddItem('CyberPunchAnimSet');

Expand Down
32 changes: 32 additions & 0 deletions RPG/Src/Augmentations/Classes/X2Condition_Cyborg.uc
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
class X2Condition_Cyborg extends X2Condition;

event name CallMeetsCondition(XComGameState_BaseObject kTarget)
{
local XComGameState_Unit TargetUnit;
local name AutopsyName;

TargetUnit = XComGameState_Unit(kTarget);

if (IsCyborg(TargetUnit))
{
return 'AA_Success';
}

return 'AA_NoCyborg';
}

static function bool IsCyborg(XComGameState_Unit TargetUnit)
{
local EInventorySlot InvSlot;
local XComGameState_Item ItemState;

foreach class'X2Item_Augmentations'.default.AugmentationSlots(InvSlot)
{
If (TargetUnit.GetItemInSlot(InvSlot) == none)
{
return false;
}
}

return true;
}
21 changes: 14 additions & 7 deletions RPG/Src/Augmentations/Classes/X2Item_Augmentations.uc
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ var config int CLAWS_ISOUNDRANGE;
var config int CLAWS_IENVIRONMENTDAMAGE;
var config int CLAWS_UPGRADE_SLOTS;

var config WeaponDamageValue CYBER_ARM_BASEDAMAGE;

static function array<X2DataTemplate> CreateTemplates()
{
local array<X2DataTemplate> Items;
Expand Down Expand Up @@ -45,6 +47,7 @@ static function X2DataTemplate AugmentationHead_Base_CV()
Template.strImage = "img:///UILibrary_Augmentations.Inv_Augmentations_Head";
Template.EquipSound = "StrategyUI_Mindshield_Equip";

Template.Abilities.AddItem('ExMachina');
Template.Abilities.AddItem('AugmentationBaseStats');
Template.SetUIStatMarkup(class'XLocalizedData'.default.ArmorLabel, eStat_ArmorMitigation, class'X2Ability_Augmentations_Abilities'.default.AUGMENTATION_BASE_MITIGATION_AMOUNT);

Expand Down Expand Up @@ -82,6 +85,7 @@ static function X2DataTemplate AugmentationTorso_Base_CV()
Template.strImage = "img:///UILibrary_Augmentations.Inv_Augmentation_Torso";
Template.EquipSound = "StrategyUI_Mindshield_Equip";

Template.Abilities.AddItem('ExMachina');
Template.Abilities.AddItem('AugmentationBaseStats');
Template.SetUIStatMarkup(class'XLocalizedData'.default.ArmorLabel, eStat_ArmorMitigation, class'X2Ability_Augmentations_Abilities'.default.AUGMENTATION_BASE_MITIGATION_AMOUNT);

Expand Down Expand Up @@ -109,21 +113,22 @@ static function X2DataTemplate AugmentationTorso_Base_CV()

static function X2DataTemplate AugmentationArms_Base_CV()
{
local X2EquipmentTemplate Template;
local X2WeaponTemplate Template;
local ArtifactCost Resources;
local ArtifactCost Artifacts;

`CREATE_X2TEMPLATE(class'X2EquipmentTemplate', Template, 'AugmentationArms_Base_CV');
`CREATE_X2TEMPLATE(class'X2WeaponTemplate', Template, 'AugmentationArms_Base_CV');
Template.ItemCat = 'augmentation_arms';
Template.InventorySlot = eInvSlot_AugmentationArms;
Template.strImage = "img:///UILibrary_Augmentations.Inv_Augmentation_Arm";
Template.EquipSound = "StrategyUI_Mindshield_Equip";

Template.BaseDamage = default.CYBER_ARM_BASEDAMAGE;
Template.Abilities.AddItem('CyberPunch');
Template.Abilities.AddItem('ExMachina');
Template.Abilities.AddItem('AugmentationBaseStats');
Template.SetUIStatMarkup(class'XLocalizedData'.default.ArmorLabel, eStat_ArmorMitigation, class'X2Ability_Augmentations_Abilities'.default.AUGMENTATION_BASE_MITIGATION_AMOUNT);

Template.Abilities.AddItem('CyberPunch');

Template.CanBeBuilt = true;
Template.TradingPostValue = 12;
Template.PointsToComplete = 0;
Expand Down Expand Up @@ -159,6 +164,7 @@ static function X2DataTemplate AugmentationLegs_Base_CV()
Template.strImage = "img:///UILibrary_Augmentations.Inv_Augmentation_Leg";
Template.EquipSound = "StrategyUI_Mindshield_Equip";

Template.Abilities.AddItem('ExMachina');
Template.Abilities.AddItem('AugmentationBaseStats');
Template.SetUIStatMarkup(class'XLocalizedData'.default.ArmorLabel, eStat_ArmorMitigation, class'X2Ability_Augmentations_Abilities'.default.AUGMENTATION_BASE_MITIGATION_AMOUNT);

Expand Down Expand Up @@ -205,6 +211,7 @@ static function X2DataTemplate AugmentationArms_Claws_MG()
Template.GameArchetype = "CyberClaws_Augmentations.Archetypes.WP_Claws_LG";
Template.Tier = 2;

Template.Abilities.AddItem('ExMachina');
Template.Abilities.AddItem('ClawsSlash');
Template.Abilities.AddItem('AugmentationBaseStats');
Template.SetUIStatMarkup(class'XLocalizedData'.default.ArmorLabel, eStat_ArmorMitigation, class'X2Ability_Augmentations_Abilities'.default.AUGMENTATION_BASE_MITIGATION_AMOUNT);
Expand Down Expand Up @@ -275,11 +282,11 @@ static function X2DataTemplate AugmentationArms_Grapple_MG()
Template.strImage = "img:///UILibrary_Augmentations.Inv_Augmentation_Arm";
Template.EquipSound = "StrategyUI_Mindshield_Equip";

Template.Abilities.AddItem('AugmentationBaseStats');
Template.SetUIStatMarkup(class'XLocalizedData'.default.ArmorLabel, eStat_ArmorMitigation, class'X2Ability_Augmentations_Abilities'.default.AUGMENTATION_BASE_MITIGATION_AMOUNT);

Template.Abilities.AddItem('ExMachina');
Template.Abilities.AddItem('CyberPunch');
Template.Abilities.AddItem('GrapplePowered');
Template.Abilities.AddItem('AugmentationBaseStats');
Template.SetUIStatMarkup(class'XLocalizedData'.default.ArmorLabel, eStat_ArmorMitigation, class'X2Ability_Augmentations_Abilities'.default.AUGMENTATION_BASE_MITIGATION_AMOUNT);

Template.CanBeBuilt = true;
Template.TradingPostValue = 12;
Expand Down

0 comments on commit b3334d3

Please sign in to comment.