ProjectKorra/ProjectKorra — pull request #74 by nathank33 (2014-12-29 20:19:13+00:00)
Title: Reworked Lightning

Lightning is now completely reworked:
The previous version of Lightning involved a white pillar of light that struck down from the sky to attack nearby foes. By default it required 3.5 seconds to charge, and reached it's destination instantly.

This new version involves a greenish/blue lightning bolt that launches from the players hands, seeking nearby living hosts. The bolt always generates a unique travel path and has a chance to generate new arcs of lightning that can reach even more enemies.

Chain Lightning:
Once an enemy is hit there is a moderate chance that the bolt will attempt to seek additional nearby enemies and chain to those as-well. The chain effect can hit up to 4 enemies by default and has a seeking range of 6.

Water Arcs:
If the lightning bolt hits water (or ice if configured to do so) it will then branch off into 4 additional arcs that spread out in random directions. Consequently, since these arcs are now uncontrollable they can turn around and strike the player if the player is standing in water. If one of these arcs hits an enemy in the water it will attempt to chain to additional close enemies.

Close Damage and Ice:
If a player shoots a lightning bolt too close to themselves they will take damage. By default lightning will not pass through ice, or cause additional arcs to form by passing through ice. This is to allow Waterbenders to have a chance at defending themselves against lightning.

Paralysis:
There is a small chance that an enemy will be paralysed for about a second if they are struck by lightning.

Redirection:
If another Firebender gets hit by lightning while charging up their own lightning bolt, the second player's bolt will instantly charge and they will not take any damage.

Config:
Note: All of these values are stronger in the daytime than what they appear, these are the night time values.
Damage: The damage caused by the strike
Range: The max range of the main arc (sub arcs, chain arcs, and water arcs can cause this to extend a bit further)
ChargeTime: The initial charge up time (ms)
Cooldown: The cooldown (ms)
StunChance: The chance for an enemy to be stunned
StunDuration: The duration of the stun (ticks)
MaxArcAngle: The maximum spread angle between arcs
SubArcChance: The chance for a sub arc to be created at each point
ChainArcRange: The seeking range of a chain arc
ChainArcChance: The chance for the lightning to arc to another enemy
MaxChainArcs: The maximum amount of times an arc can chain
WaterArcs: The amount of arcs created when hitting water
WaterArcRange: The range of each water arc
SelfHitWater: The player will take damage if they are in water
SelfHitClose: The player will take damage if they shoot too close to themselves
ArcOnIce: Ice will be treated as water, and will create water arcs