Skip to main content

Stormchannel

Fires a continuous lightning attack while the input is held.

Charges over time and changes Skill State as the charge increases.

Consists of 3 States. Critical hits begin in the second State, and remaining in the third State causes the player to take self-damage.

Implementation​

Stormchannel is a toggle Skill. While the input is held, a ChargeGenerator Stat continuously raises a Charge Stat over time, while AimActivation enables aiming and MovementBlock locks the player in place.

Stormchannel_ChargeGenerator — Stat (Generator Clamped Float)
Stat (Generator Clamped Float): Stormchannel_ChargeGenerator
Stat Key:Stormchannel / Generator_FloatClamped / SkillChargeGenerator
Use Interval:true
Interval_Float:0.2
Toggle Off On Zero:true
Generating Effect Template:ChargeEffectTemplate
Max:0.2

The Skill's SkillEvolutionNo is driven by the Charge value through StatInjector definitions. When Charge reaches 1, the Skill advances to State 2; when it reaches 2.2, it advances to State 3.

Stormchannel_SkillEvolutionNo — Stat (Clamped Int)
Stat (Clamped Int): Stormchannel_SkillEvolutionNo
Stat Key:Stormchannel / IntClamped / SkillEvolutionNo
Injectors [0]:ChargeEvolutionNoInjector_2
Injectors [1]:ChargeEvolutionNoInjector_3
Max:2

The lightning itself is an OnStay Effector that applies LightningDamage (a flat -2 to Health) and Electrocute to every Actor inside the beam each tick.

Stormchannel_EnterExit_State_1 — Effect Pack
Effect Pack: Stormchannel_EnterExit_State_1
Int Stat Effect (BS): Electrocute
Target Stat:Stormchannel / IntClamped / Electrocuted
Value:1
Processor:Add_Int
Apply Type:Temporary
Stormchannel_OnStay — Effect Pack
Effect Pack: Stormchannel_OnStay
Float Stat Effect (MAS): LightningDamage
Target Stat:Default / FloatClamped / Health
Value:-2
Processor:Standard_Float

For critical hits, the Stormchannel_AttackCritModifierByCharge Stat conditionally modifies CritRate and CritMultiplier through the CritProcessor, based on the current Charge. This enables critical hits once the Skill has reached the second State.

MASContribution_CriticalHit_Float — MASContribution Critical Hit Float
MASContribution Critical Hit Float: MASContribution_CriticalHit_Float
Required Attributes:Modibifiable|Critable|AttributeStatsProcessable
Receiving Critical Rate Key:CriticalRate_Receiving
Applying Critical Rate Key:CriticalRate_Applying
Receiving Critical Multiplier Key:CriticalMultiplier_Receiving
Applying Critical Multiplier Key:CriticalMultiplier_Applying
Critical Result Attribute:Critical
Use Conditional Rate Modifier:true
Use Conditional Multiplier Modififier:true
Conditional Modifier Processor:ASContribution_ConditionalModifier(Float-Generic)

While in the third State, a ChargeSelfDamageGenerator Stat generates recurring negative Health Effects on the source Actor, so holding the attack too long becomes dangerous.

Stormchannel_SelfPack_State_3 — Effect Pack
Effect Pack: Stormchannel_SelfPack_State_3
Float Stat Effect (BS): ChargeSelfDamageGeneratorEffect
Target Stat:Stormchannel / Generator_FloatClamped / StormchannelChargeSelfDamageGenerator
Value:-4
Processor:Add_Float
Apply Type:Temporary

When the Skill is interrupted or toggled off, ResetCharge, Stormchannel_ZeroCharge, and Stormchannel_ZeroEvolutionNo reset the state, and Stormchannel_Cooldown applies the cooldown.

Water interaction​

Water Actors use their own Water Stats. When the beam touches water, its Electrocuted Stat is raised, and AddElectrictyReflectorIfElectrocuted adds an electricity director so the current spreads through connected water via Stormchannel_Water_ElectricityDirector. The ElectrucedAnimation script tints electrified water.

Water_Health — Stat (Clamped Float)
Stat (Clamped Float): Water_Health
Stat Key:Default / FloatClamped / Health
Relation: Director_ReceivingAS:Water_ElectricityDirector
Default:1
Allow Exceed:true
Min:1
Max:1
Water_ElectricityDirector — Stat (Director)
Stat (Director): Water_ElectricityDirector
Stat Key:Stormchannel / Director_SrcSep / ElectricityDirector
Injectors [0]:Add1IfElectrocuted
Allow Exceed:true
Redirection Target:Modifier Source
State Check:true
Multi Stat Check:true
Multi Stat Checker › Stats [1] › Actor:Modifier Source
Multi Stat Checker › Condition:DifNot0(Int)
Targeting Environment Id:Default
Max:1
Add1IfElectrocuted — Linker Definition Model
Linker Definition Model: Add1IfElectrocuted
Injector:Add1i_IfGT0(Int)
Injector Stat Key:Water_Electrocuted