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)
Stormchannel_ChargeGeneratorStormchannel / Generator_FloatClamped / SkillChargeGeneratortrue0.2trueChargeEffectTemplate0.2The 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)
Stormchannel_SkillEvolutionNoStormchannel / IntClamped / SkillEvolutionNoChargeEvolutionNoInjector_2ChargeEvolutionNoInjector_32The 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
Stormchannel_EnterExit_State_1ElectrocuteStormchannel / IntClamped / Electrocuted1Add_IntTemporaryStormchannel_OnStay — Effect Pack
Stormchannel_OnStayLightningDamageDefault / FloatClamped / Health-2Standard_FloatFor 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_CriticalHit_FloatModibifiable|Critable|AttributeStatsProcessableCriticalRate_ReceivingCriticalRate_ApplyingCriticalMultiplier_ReceivingCriticalMultiplier_ApplyingCriticaltruetrueASContribution_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
Stormchannel_SelfPack_State_3ChargeSelfDamageGeneratorEffectStormchannel / Generator_FloatClamped / StormchannelChargeSelfDamageGenerator-4Add_FloatTemporaryWhen 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)
Water_HealthDefault / FloatClamped / HealthWater_ElectricityDirector1true11Water_ElectricityDirector — Stat (Director)
Water_ElectricityDirectorStormchannel / Director_SrcSep / ElectricityDirectorAdd1IfElectrocutedtrueModifier SourcetruetrueModifier SourceDifNot0(Int)Default1Add1IfElectrocuted — Linker Definition Model
Add1IfElectrocutedAdd1i_IfGT0(Int)Water_Electrocuted