Skip to content

Commit

Permalink
Fix scope range table effect
Browse files Browse the repository at this point in the history
  • Loading branch information
Musashi1584 committed Nov 5, 2018
1 parent c94516a commit 8a9e478
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 66 deletions.
Binary file modified RPG.v12.XCOM_suo
Binary file not shown.
120 changes: 60 additions & 60 deletions RPG/Config/ExtendedUpgrades/XComExtendedUpgrades.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ AUTO_LOADER_MAX_AMMO_BSC = 4
AUTO_LOADER_MAX_AMMO_ADV = 6
AUTO_LOADER_MAX_AMMO_SUP = 8

SCOPE_RANGE_CHANGE_BSC [0]=-5
SCOPE_RANGE_CHANGE_BSC [1]=-5
SCOPE_RANGE_CHANGE_BSC [2]=-5
SCOPE_RANGE_CHANGE_BSC [3]=-5
SCOPE_RANGE_CHANGE_BSC [4]=-5
SCOPE_RANGE_CHANGE_BSC [5]=-5
SCOPE_RANGE_CHANGE_BSC [6]=-5
SCOPE_RANGE_CHANGE_BSC [7]=-5
SCOPE_RANGE_CHANGE_BSC [8]=5
SCOPE_RANGE_CHANGE_BSC [9]=5
SCOPE_RANGE_CHANGE_BSC[0] =-5
SCOPE_RANGE_CHANGE_BSC[1] =-5
SCOPE_RANGE_CHANGE_BSC[2] =-5
SCOPE_RANGE_CHANGE_BSC[3] =-5
SCOPE_RANGE_CHANGE_BSC[4] =-5
SCOPE_RANGE_CHANGE_BSC[5] =-5
SCOPE_RANGE_CHANGE_BSC[6] =-5
SCOPE_RANGE_CHANGE_BSC[7] =-5
SCOPE_RANGE_CHANGE_BSC[8] =5
SCOPE_RANGE_CHANGE_BSC[9] =5
SCOPE_RANGE_CHANGE_BSC[10]=5
SCOPE_RANGE_CHANGE_BSC[11]=5
SCOPE_RANGE_CHANGE_BSC[12]=5
Expand All @@ -50,16 +50,16 @@ SCOPE_RANGE_CHANGE_BSC[23]=5
SCOPE_RANGE_CHANGE_BSC[24]=5
SCOPE_RANGE_CHANGE_BSC[25]=5

SCOPE_RANGE_CHANGE_ADV [0]=-5
SCOPE_RANGE_CHANGE_ADV [1]=-5
SCOPE_RANGE_CHANGE_ADV [2]=-5
SCOPE_RANGE_CHANGE_ADV [3]=-5
SCOPE_RANGE_CHANGE_ADV [4]=-5
SCOPE_RANGE_CHANGE_ADV [5]=-5
SCOPE_RANGE_CHANGE_ADV [6]=-5
SCOPE_RANGE_CHANGE_ADV [7]=-5
SCOPE_RANGE_CHANGE_ADV [8]=10
SCOPE_RANGE_CHANGE_ADV [9]=10
SCOPE_RANGE_CHANGE_ADV[0] =-5
SCOPE_RANGE_CHANGE_ADV[1] =-5
SCOPE_RANGE_CHANGE_ADV[2] =-5
SCOPE_RANGE_CHANGE_ADV[3] =-5
SCOPE_RANGE_CHANGE_ADV[4] =-5
SCOPE_RANGE_CHANGE_ADV[5] =-5
SCOPE_RANGE_CHANGE_ADV[6] =-5
SCOPE_RANGE_CHANGE_ADV[7] =-5
SCOPE_RANGE_CHANGE_ADV[8] =10
SCOPE_RANGE_CHANGE_ADV[9] =10
SCOPE_RANGE_CHANGE_ADV[10]=10
SCOPE_RANGE_CHANGE_ADV[11]=10
SCOPE_RANGE_CHANGE_ADV[12]=10
Expand All @@ -77,16 +77,16 @@ SCOPE_RANGE_CHANGE_ADV[23]=10
SCOPE_RANGE_CHANGE_ADV[24]=10
SCOPE_RANGE_CHANGE_ADV[25]=10

SCOPE_RANGE_CHANGE_SUP [0]=-5
SCOPE_RANGE_CHANGE_SUP [1]=-5
SCOPE_RANGE_CHANGE_SUP [2]=-5
SCOPE_RANGE_CHANGE_SUP [3]=-5
SCOPE_RANGE_CHANGE_SUP [4]=-5
SCOPE_RANGE_CHANGE_SUP [5]=-5
SCOPE_RANGE_CHANGE_SUP [6]=-5
SCOPE_RANGE_CHANGE_SUP [7]=-5
SCOPE_RANGE_CHANGE_SUP [8]=15
SCOPE_RANGE_CHANGE_SUP [9]=15
SCOPE_RANGE_CHANGE_SUP[0] =-5
SCOPE_RANGE_CHANGE_SUP[1] =-5
SCOPE_RANGE_CHANGE_SUP[2] =-5
SCOPE_RANGE_CHANGE_SUP[3] =-5
SCOPE_RANGE_CHANGE_SUP[4] =-5
SCOPE_RANGE_CHANGE_SUP[5] =-5
SCOPE_RANGE_CHANGE_SUP[6] =-5
SCOPE_RANGE_CHANGE_SUP[7] =-5
SCOPE_RANGE_CHANGE_SUP[8] =15
SCOPE_RANGE_CHANGE_SUP[9] =15
SCOPE_RANGE_CHANGE_SUP[10]=15
SCOPE_RANGE_CHANGE_SUP[11]=15
SCOPE_RANGE_CHANGE_SUP[12]=15
Expand All @@ -105,16 +105,16 @@ SCOPE_RANGE_CHANGE_SUP[24]=15
SCOPE_RANGE_CHANGE_SUP[25]=15


LASER_SIGHT_CHANGE_BSC [0]=0
LASER_SIGHT_CHANGE_BSC [1]=0
LASER_SIGHT_CHANGE_BSC [2]=0
LASER_SIGHT_CHANGE_BSC [3]=0
LASER_SIGHT_CHANGE_BSC [4]=0
LASER_SIGHT_CHANGE_BSC [5]=0
LASER_SIGHT_CHANGE_BSC [6]=0
LASER_SIGHT_CHANGE_BSC [7]=0
LASER_SIGHT_CHANGE_BSC [8]=0
LASER_SIGHT_CHANGE_BSC [9]=-15
LASER_SIGHT_CHANGE_BSC[0] =0
LASER_SIGHT_CHANGE_BSC[1] =0
LASER_SIGHT_CHANGE_BSC[2] =0
LASER_SIGHT_CHANGE_BSC[3] =0
LASER_SIGHT_CHANGE_BSC[4] =0
LASER_SIGHT_CHANGE_BSC[5] =0
LASER_SIGHT_CHANGE_BSC[6] =0
LASER_SIGHT_CHANGE_BSC[7] =0
LASER_SIGHT_CHANGE_BSC[8] =0
LASER_SIGHT_CHANGE_BSC[9] =-15
LASER_SIGHT_CHANGE_BSC[10]=-15
LASER_SIGHT_CHANGE_BSC[11]=-15
LASER_SIGHT_CHANGE_BSC[12]=-15
Expand All @@ -132,16 +132,16 @@ LASER_SIGHT_CHANGE_BSC[23]=-20
LASER_SIGHT_CHANGE_BSC[24]=-20
LASER_SIGHT_CHANGE_BSC[25]=-20

LASER_SIGHT_CHANGE_ADV [0]=0
LASER_SIGHT_CHANGE_ADV [1]=0
LASER_SIGHT_CHANGE_ADV [2]=0
LASER_SIGHT_CHANGE_ADV [3]=0
LASER_SIGHT_CHANGE_ADV [4]=0
LASER_SIGHT_CHANGE_ADV [5]=0
LASER_SIGHT_CHANGE_ADV [6]=0
LASER_SIGHT_CHANGE_ADV [7]=0
LASER_SIGHT_CHANGE_ADV [8]=0
LASER_SIGHT_CHANGE_ADV [9]=-10
LASER_SIGHT_CHANGE_ADV[0] =0
LASER_SIGHT_CHANGE_ADV[1] =0
LASER_SIGHT_CHANGE_ADV[2] =0
LASER_SIGHT_CHANGE_ADV[3] =0
LASER_SIGHT_CHANGE_ADV[4] =0
LASER_SIGHT_CHANGE_ADV[5] =0
LASER_SIGHT_CHANGE_ADV[6] =0
LASER_SIGHT_CHANGE_ADV[7] =0
LASER_SIGHT_CHANGE_ADV[8] =0
LASER_SIGHT_CHANGE_ADV[9] =-10
LASER_SIGHT_CHANGE_ADV[10]=-10
LASER_SIGHT_CHANGE_ADV[11]=-10
LASER_SIGHT_CHANGE_ADV[12]=-10
Expand All @@ -160,16 +160,16 @@ LASER_SIGHT_CHANGE_ADV[24]=-15
LASER_SIGHT_CHANGE_ADV[25]=-15


LASER_SIGHT_CHANGE_SUP [0]=0
LASER_SIGHT_CHANGE_SUP [1]=0
LASER_SIGHT_CHANGE_SUP [2]=0
LASER_SIGHT_CHANGE_SUP [3]=0
LASER_SIGHT_CHANGE_SUP [4]=0
LASER_SIGHT_CHANGE_SUP [5]=0
LASER_SIGHT_CHANGE_SUP [6]=0
LASER_SIGHT_CHANGE_SUP [7]=0
LASER_SIGHT_CHANGE_SUP [8]=0
LASER_SIGHT_CHANGE_SUP [9]=-5
LASER_SIGHT_CHANGE_SUP[0] =0
LASER_SIGHT_CHANGE_SUP[1] =0
LASER_SIGHT_CHANGE_SUP[2] =0
LASER_SIGHT_CHANGE_SUP[3] =0
LASER_SIGHT_CHANGE_SUP[4] =0
LASER_SIGHT_CHANGE_SUP[5] =0
LASER_SIGHT_CHANGE_SUP[6] =0
LASER_SIGHT_CHANGE_SUP[7] =0
LASER_SIGHT_CHANGE_SUP[8] =0
LASER_SIGHT_CHANGE_SUP[9] =-5
LASER_SIGHT_CHANGE_SUP[10]=-5
LASER_SIGHT_CHANGE_SUP[11]=-5
LASER_SIGHT_CHANGE_SUP[12]=-5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -398,10 +398,10 @@ static function X2AbilityTemplate ScopeAttachment(name TemplateName, array<int>

AimModifier = new class 'X2Effect_Scope';
AimModifier.SCOPE_RANGE_CHANGE = BonusRange;
AimModifier.BuildPersistentEffect (1, true, false);
//AimModifier.SetDisplayInfo(ePerkBuff_Passive, Template.LocFriendlyName, Template.GetMyLongDescription(), Template.IconImage, true,,Template.AbilitySourceName);

Template.AddTargetEffect (AimModifier);
AimModifier.BuildPersistentEffect (1, true, false, false, eGameRule_PlayerTurnBegin);
AimModifier.SetDisplayInfo(ePerkBuff_Passive, Template.LocFriendlyName, Template.GetMyLongDescription(), Template.IconImage, false,,Template.AbilitySourceName);
Template.AddTargetEffect(AimModifier);

Template.bCrossClassEligible = false;
Template.BuildNewGameStateFn = TypicalAbility_BuildGameState;

Expand Down
4 changes: 2 additions & 2 deletions RPG/Src/ExtendedUpgrades/Classes/X2Effect_Scope.uc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function GetToHitModifiers(XComGameState_Effect EffectState, XComGameState_Unit
local ShotModifierInfo ShotInfo;

SourceWeapon = AbilityState.GetSourceWeapon();
//`LOG("X2Effect_ScopeRange.GetToHitModifiers" @ SourceWeapon.ObjectID @ EffectState.ApplyEffectParameters.ItemStateObjectRef.ObjectID,, 'ExtendedUpgrades');
//`LOG("X2Effect_ScopeRange.GetToHitModifiers" @ SourceWeapon.ObjectID @ EffectState.ApplyEffectParameters.ItemStateObjectRef.ObjectID @ SCOPE_RANGE_CHANGE.Length,, 'ExtendedUpgrades');
if(SourceWeapon != none && SourceWeapon.ObjectID == EffectState.ApplyEffectParameters.ItemStateObjectRef.ObjectID)
{

Expand All @@ -25,7 +25,7 @@ function GetToHitModifiers(XComGameState_Effect EffectState, XComGameState_Unit
ShotInfo.Value = SCOPE_RANGE_CHANGE[SCOPE_RANGE_CHANGE.Length - 1];
}

`LOG("X2Effect_ScopeRange.GetToHitModifiers" @ SourceWeapon.GetMyTemplateName() @ "modifying range by" @ ShotInfo.Value,, 'ExtendedUpgrades');
//`LOG("X2Effect_ScopeRange.GetToHitModifiers" @ SourceWeapon.GetMyTemplateName() @ "modifying range by" @ ShotInfo.Value,, 'ExtendedUpgrades');
ShotInfo.ModType = eHit_Success;
ShotInfo.Reason = FriendlyName; //class'XLocalizedData'.default.WeaponRange;
ShotModifiers.AddItem(ShotInfo);
Expand Down

0 comments on commit 8a9e478

Please sign in to comment.