Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example banish #1450

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1490,6 +1490,11 @@ simulated function UpdateReaperHUD()

SuperConcealedModifier += UnitState.SuperConcealmentLoss;

if (SelectedAbilityState.GetMyTemplate().ConcealmentRule == eConceal_Never)
{
SuperConcealedModifier = 100;
}

if (SuperConcealedModifier > 100)
SuperConcealedModifier = 100;
if (SuperConcealedModifier < 0)
Expand All @@ -1499,7 +1504,7 @@ simulated function UpdateReaperHUD()
if (!class'Helpers'.static.IsObjectiveTarget(CurrentTargetID))
{
WeaponState = SelectedAbilityState.GetSourceWeapon();
if (WeaponState != none && WeaponState.InventorySlot == eInvSlot_PrimaryWeapon)
if (WeaponState != none && WeaponState.InventorySlot == eInvSlot_PrimaryWeapon && SelectedAbilityState.GetMyTemplate().ConcealmentRule != eConceal_Never)
{
if (SuperConcealedModifier > class'X2AbilityTemplateManager'.default.SuperConcealShotMax)
SuperConcealedModifier = class'X2AbilityTemplateManager'.default.SuperConcealShotMax;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1153,14 +1153,15 @@ static function X2AbilityTemplate SoulReaper()
Template.BuildNewGameStateFn = TypicalAbility_BuildGameState;
Template.BuildVisualizationFn = TypicalAbility_BuildVisualization;
Template.BuildInterruptGameStateFn = TypicalAbility_BuildInterruptGameState;
Template.SuperConcealmentLoss = 0;
//Template.SuperConcealmentLoss = 0;

Template.AdditionalAbilities.AddItem('SoulReaperContinue');
Template.PostActivationEvents.AddItem('SoulReaperContinue');

// this ability will always break concealment at the end and we don't want to roll on it
Template.ConcealmentRule = eConceal_Always;
Template.SuperConcealmentLoss = 0;
// We now want to roll on this
Template.ConcealmentRule = eConceal_Never;
//Template.SuperConcealmentLoss = 0;
Template.ChosenActivationIncreasePerUse = class'X2AbilityTemplateManager'.default.StandardShotChosenActivationIncreasePerUse;
Template.LostSpawnIncreasePerUse = class'X2AbilityTemplateManager'.default.StandardShotLostSpawnIncreasePerUse;
//BEGIN AUTOGENERATED CODE: Template Overrides 'SoulReaper'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3367,10 +3367,10 @@ function EventListenerReturn SoulReaperListener(Object EventData, Object EventSo
bAbilityContinues = AbilityTriggerAgainstSingleTarget(BestTargetRef, false);
}
}
if (!bAbilityContinues)
{
SourceUnit.BreakConcealment();
}
//if (!bAbilityContinues)
//{
// SourceUnit.BreakConcealment();
//}
}
return ELR_NoInterrupt;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9658,7 +9658,11 @@ function EventListenerReturn OnAbilityActivated(Object EventData, Object EventSo
// handle changing the existing modifier if necessary
SourceUnitState = XComGameState_Unit(History.GetGameStateForObjectID(ActivatedAbilityStateContext.InputContext.SourceObject.ObjectID));
SuperConcealedModifier = SourceUnitState.GetSuperConcealedModifier( ActivatedAbilityState, GameState );

// Over-ride for never conceal abilities so they can still use the HUD
if (ActivatedAbilityState.GetMyTemplate().ConcealmentRule == eConceal_Never)
{
SuperConcealedModifier = 100;
}
if (SuperConcealedModifier > 0)
{
SuperConcealedState = class'XComGameStateContext_ChangeContainer'.static.CreateChangeState("SuperConcealmentLossChance Modified");
Expand All @@ -9671,7 +9675,8 @@ function EventListenerReturn OnAbilityActivated(Object EventData, Object EventSo
if (!class'Helpers'.static.IsObjectiveTarget(ActivatedAbilityStateContext.InputContext.PrimaryTarget.ObjectID, GameState))
{
WeaponState = ActivatedAbilityState.GetSourceWeapon();
if (WeaponState != none && WeaponState.InventorySlot == eInvSlot_PrimaryWeapon && ActivatedAbilityState.IsAbilityInputTriggered())
// Don't cap the HUD if the ability is explicity set to eConceal_Never
if (WeaponState != none && WeaponState.InventorySlot == eInvSlot_PrimaryWeapon && ActivatedAbilityState.IsAbilityInputTriggered() && ActivatedAbilityState.GetMyTemplate().ConcealmentRule != eConceal_Never)
{


Expand Down
Loading