Spell Instant Chain Lightning

Weep

Godspeed to the sound of the pounding
Reaction score
400
Instant Chain Lightning
by Weep
Version 3.1

142vcdy.jpg


I don't know what kind of wimpy electricity the Far Seer uses, but where I come from, lightning travels faster than you can blink... ;)

-- General information --

This spell is an instant-hit version of Chain Lightning. All bounces hit simultaneously, immediately; there is no "walking" of the spell from bounce to bounce.

Custom spell behaviors can be easily added - modify the Hit Actions and Target Conditions triggers. Want to make chain mana burn, chain stun, chain heal, chain charm, and so on? All possible.

-- Pros --
  • GUI (mostly!)
  • MUI without indexing or periodic actions
  • Leakless (as much as GUI+custom script can be)
  • Properly targets all units, even flying units near cliffs and trees
  • Easily modified and enhanced
  • Easily duplicated in the same map
  • Satisfyin' (zap!)

-- Cons --
  • GUI :)P)
  • Sets more values on cast than strictly necessary (makes customization easier)
  • Uses Spirit Link to generate the lightning bounces, so it will cancel existing instances of Spirit Link on targets. (Spirit Link sucks as a stock ability anyway.)

-- Description and implementation instructions --
Code:
Instant Chain Lightning -- v3.1 -- by Weep
http://www.thehelper.net/forums/showthread.php?t=134499

   Requires:
   1. Unit "Dummy Caster"
   2. An ability for the spell base, default is "Instant Lightning Base (For Hero)"
   3. The dummy ability "Instant Lightning Effects (Chain)"
   3b. Any spells used for modifications to the defaults (check the Hit Actions trigger)
   4. The three triggers in this category

-- What? --
   This spell is an instant-hit version of Chain Lightning with easy customizability.
   All bounces hit simultaneously, immediately; there is no "walking" of the spell from
   bounce to bounce.

   It is fully MUI, and can be called easily by other triggers to create compound abilities.

-- How To Implement --
   1. Be sure "Automatically create unknown variables while pasting trigger data" is
      enabled in the World Editor general preferences.
   2. Copy the requirements listed above into your map.
   3. The rawcodes for the imported units and abilities have probably changed;
      pick your base ability in the conditions of the Cast trigger,
      and set the variables in the first section of the trigger to the specified resources.

-- How To Modify --
   This spell is easy to duplicate for multiple versions, even in the same map.  The
   global values set at the start are there for convenience; they are only used in that
   trigger, so making a new copy of the spell is as easy as renaming the triggers
   and changing the settings before copying it into your map.
   
   To change the lightning type, copy and edit the Instant Lightning Base and
   Instant Lightning Effects abilities.

   Custom spell behaviors can be easily added - modify the Hit Actions and Target Conditions
   triggers.  Want to make chain mana burn, chain stun, chain heal, chain charm, and so on?
   All possible.

-- Credits --
   Feel free to customize this spell for your map, but please do not specifically post
   spells based on it.  Credit in your map not needed, but appreciated, but please
   include this README.

-- Version History --
   3.0: Second release; overhauled for simplicity and ease of modification, at slight cost
        to ease of duplication.
   1.0 (array): First release.

-- Triggers --
Trigger:
  • Instant Chain Cast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Instant Lightning Base (For Hero)
    • Actions
      • -------- Instant Chain Template by Weep --------
      • -------- http://www.thehelper.net/forums/showthread.php?t=134499 --------
      • -------- @@@ Globals @@@ --------
      • -------- --------
      • -------- ••• The base hero ability ••• --------
      • -------- Default is "Instant Lightning Base (For Hero)" --------
      • Set INST__BaseAbility = Instant Lightning Base (For Hero)
      • -------- --------
      • -------- ••• The dummy unit-type ••• --------
      • -------- Default is "Dummy Caster" --------
      • Set INST__DummyType = Dummy Caster
      • -------- --------
      • -------- ••• The dummy ability for lightning effects ••• --------
      • -------- Default is "Instant Lightning Effects (Chain)" --------
      • Set INST__EffectAbility = Instant Lightning Effects (Chain)
      • -------- --------
      • -------- ••• The number of bounces of the spell, per level ••• --------
      • -------- which means Total Targets Hit = Bounces + 1 --------
      • Set INST__Bounces[1] = 2
      • Set INST__Bounces[2] = 3
      • Set INST__Bounces[3] = 4
      • Set INST__Bounces[4] = 5
      • -------- --------
      • -------- ••• Maximum range for the spell to bounce, per level ••• --------
      • Set INST__AreaToBounce[1] = 500.00
      • Set INST__AreaToBounce[2] = 500.00
      • Set INST__AreaToBounce[3] = 500.00
      • Set INST__AreaToBounce[4] = 500.00
      • -------- --------
      • -------- ••• The number of steps to use when finding a nearby target ••• --------
      • -------- Too high and it may lag; too low and it will be imprecise --------
      • Set INST__RangeSteps = 10
      • -------- --------
      • -------- ••• The base damage of the spell, per level ••• --------
      • Set INST__BaseDamage[1] = 75.00
      • Set INST__BaseDamage[2] = 100.00
      • Set INST__BaseDamage[3] = 125.00
      • Set INST__BaseDamage[4] = 150.00
      • -------- --------
      • -------- ••• The multiplier applied to the damage for each bounce, per level ••• --------
      • Set INST__BounceMultiplier[1] = 0.85
      • Set INST__BounceMultiplier[2] = 0.85
      • Set INST__BounceMultiplier[3] = 0.85
      • Set INST__BounceMultiplier[4] = 0.85
      • -------- --------
      • -------- @@@ Spell actions @@@ --------
      • -------- ••••••••••••••••••••••••••••••••••••••• --------
      • -------- Prepare the dummy caster, if necessary --------
      • -------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (INST_DummyCaster is dead) Equal to True
        • Then - Actions
          • Set INST_TargetPoint = (Point(0.00, 0.00))
          • Unit - Create 1 INST__DummyType for Neutral Passive at INST_TargetPoint facing Default building facing degrees
          • Unit - Add INST__EffectAbility to (Last created unit)
          • Set INST_DummyCaster = (Last created unit)
          • Custom script: call RemoveLocation(udg_INST_TargetPoint)
        • Else - Actions
      • -------- ••••••••••••••••••••••••••••••••••••••• --------
      • -------- ••• Remove the Anicent classification from all units because that is how the effects are targeted ••• --------
      • -------- --------
      • Set INST_Ancients = (Units in (Playable map area) matching (((Matching unit) is An Ancient) Equal to True))
      • Unit Group - Pick every unit in INST_Ancients and do (Actions)
        • Loop - Actions
          • Unit - Remove classification of An Ancient from (Picked unit)
      • -------- ••••••••••••••••••••••••••••••••••••••••••••••••• --------
      • -------- Perform the hit actions on the first target --------
      • -------- --------
      • Set INST_CurrentBounce = 0
      • Set INST_Target = (Target unit of ability being cast)
      • Trigger - Run Instant Chain Hit Actions <gen> (checking conditions)
      • -------- ••••••••••••••••••••••••••••••••••••••• --------
      • -------- Find a chain and save it into a group --------
      • -------- --------
      • For each (Integer INST_CurrentBounce) from 1 to INST__Bounces[(Level of INST__BaseAbility for (Triggering unit))], do (Actions)
        • Loop - Actions
          • Unit Group - Add INST_Target to INST_TargetGroup
          • -------- ••••••••••••••••••••••••••••••••••••••• --------
          • Set INST_TargetPoint = (Position of INST_Target)
          • For each (Integer INST_TempInteger) from 1 to INST__RangeSteps, do (Actions)
            • Loop - Actions
              • -------- ••••••••••••••••••••••••••••••••••••••• --------
              • -------- ••• Finding the next target ••• --------
              • -------- --------
              • Set INST_TempGroup = (Units within (INST__AreaToBounce[(Level of INST__BaseAbility for (Triggering unit))] x ((Real(INST_TempInteger)) / (Real(INST__RangeSteps)))) of INST_TargetPoint matching ((((Matching unit) is in INST_TargetGroup) Equal to False) and ((((Matching unit) is al
              • Set INST_TempUnit = (Random unit from INST_TempGroup)
              • -------- ••••••••••••••••••••••••••••••••••••••• --------
              • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                • If - Conditions
                  • INST_TempUnit Not equal to No unit
                • Then - Actions
                  • -------- ••••••••••••••••••••••••••••••••••••••••••••••••• --------
                  • -------- Create the FX for the next bounce if there is a valid target --------
                  • -------- --------
                  • Unit - Add classification of An Ancient to INST_Target
                  • Unit - Add classification of An Ancient to INST_TempUnit
                  • Unit - Order INST_DummyCaster to Orc Spirit Walker - Spirit Link INST_Target
                  • Unit - Remove Tornado (Timed Life) buff from INST_Target
                  • Unit - Remove Tornado (Timed Life) buff from INST_TempUnit
                  • Unit - Remove classification of An Ancient from INST_Target
                  • Unit - Remove classification of An Ancient from INST_TempUnit
                  • -------- ••••••••••••••••••••••••••••••••••••••••••••••••• --------
                  • -------- Perform the hit actions on the target --------
                  • -------- --------
                  • Set INST_Target = INST_TempUnit
                  • Trigger - Run Instant Chain Hit Actions <gen> (checking conditions)
                  • Custom script: exitwhen true
                • Else - Actions
                  • Custom script: call DestroyGroup(udg_INST_TempGroup)
          • Custom script: call RemoveLocation(udg_INST_TargetPoint)
          • Custom script: call DestroyGroup(udg_INST_TempGroup)
          • -------- ••••••••••••••••••••••••••••••••••••••••••••••••• --------
          • -------- Stop the chain if there are no valid targets --------
          • -------- --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • INST_TempUnit Equal to No unit
            • Then - Actions
              • Custom script: exitwhen true
            • Else - Actions
      • -------- ••••••••••••••••••••••••••••••••••••••• --------
      • -------- ••• Restore the Anicent classification to units which ought to have it ••• --------
      • -------- --------
      • Unit Group - Pick every unit in INST_Ancients and do (Actions)
        • Loop - Actions
          • Unit - Add classification of An Ancient to (Picked unit)
      • Custom script: call DestroyGroup(udg_INST_Ancients)
      • -------- ••••••••••••••••••••••••••••••••••••••• --------
      • Unit Group - Remove all units from INST_TargetGroup

Trigger:
  • Instant Chain Hit Actions
    • Events
    • Conditions
    • Actions
      • -------- The unit being hit is INST_Target. --------
      • -------- The original caster is (Triggering unit). --------
      • -------- The current bounce number is INST_CurrentBounce. --------
      • -------- ••••••••••••••••••••••••••••••••••••••••••••••••• --------
      • -------- --------
      • Unit - Cause (Triggering unit) to damage INST_Target, dealing (INST__BaseDamage[(Level of INST__BaseAbility for (Triggering unit))] x (Power(INST__BounceMultiplier[(Level of INST__BaseAbility for (Triggering unit))], (Real(INST_CurrentBounce))))) damage of attack type Spells and damage type Magic
      • Special Effect - Create a special effect attached to the origin of INST_Target using Abilities\Weapons\Bolt\BoltImpact.mdl
      • Special Effect - Destroy (Last created special effect)

Trigger:
  • Instant Chain Target Conditions
    • Events
    • Conditions
      • ((Matching unit) is visible to (Owner of (Triggering unit))) Equal to True
      • ((Matching unit) is A structure) Equal to False
      • ((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True
      • ((Matching unit) is Magic Immune) Equal to False
    • Actions
      • -------- Add conditions to this trigger to specify permitted targets! --------
      • -------- The unit being checked is (Matching unit). --------
      • -------- The original caster is (Triggering unit). --------

-- Version history --
Code:
3.1: Fixed a tiny but important error.
3.0: Second release; overhauled for simplicity and ease of modification, at slight cost to ease of duplication.
1.0: Initial release.

-- Bonus --
No bonus in initial the 3.0 release...
[del]Pre-made variants on the base spell - Instant Chain Stun, Instant Healing Wave, Instant Chain Mana Burn, Instant Chain Venom, Instant Chain Explosion.[/del]

--------------------------------------​

Feedback welcome.
 

Attachments

  • Instant Chain 3.1.w3x
    51.1 KB · Views: 763

Weep

Godspeed to the sound of the pounding
Reaction score
400
...i think you can make the default chain lightning instant by changing a certain field.. i think the default is 0.3.. but you can reduce it.
I've looked pretty hard and haven't found any setting that changes the chain bounce rate - not missile speed, not duration... Have I overlooked it? Do you know where this setting is?

but the other spells you included are nice.
Thanks. :)
 

Tom_Kazansky

--- wraith it ! ---
Reaction score
157
...i think you can make the default chain lightning instant by changing a certain field.. i think the default is 0.3.. but you can reduce it.

it's 0.25, I tested it :)

and I don't think there is a field like that :rolleyes:
---------
Instant Chain Mana Burn, Instant Chain Venom, Instant Chain Explosion

nice ;)
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
Updated to version 3.0. 2.0 was not released and was based on a faily attempt to use Forked Lightning as a glyph item; faily since many units can't use items even if given a hero inventory (eg. illusions). 3.0 is based on my realization that Spirit Link already nearly creates the visual effect of this on its own, so I can use it in the triggers.
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
Bump because nobody's seen it since being un-graveyarded. :eek:
 

BlackRose

Forum User
Reaction score
239
I don't see anything wrong with it. Makes for a nice GUI custom lightning template thingy. I think it is ready to go to heaven. Unless some evil reason comes in and intervenes.
 

Sim

Forum Administrator
Staff member
Reaction score
534
My bad I missed this one. :p

Approved!
 

emjlr3

Change can be a good thing
Reaction score
395
i remember the old days of coding with GUI

just looking at that makes my head spin
 

sergykid

Cool Member
Reaction score
0
what if you use the trigger to it ? just set in the trigger the event "unit get hit by the spell..." stun the target of ability, and in the object editor you set the damage to 0, and the units that get hit are stunned from the trigger, and you have a chain stun. Would work ?
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
what if you use the trigger to it ?

To add triggered effects, edit the actions in the trigger named "Instant Chain Hit Actions". For a chain stun, have a dummy caster use a stunning ability on the INST_Target unit.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Varine Varine:
    How can you tell the difference between real traffic and indexing or AI generation bots?
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air
  • The Helper The Helper:
    New dessert added to recipes Southern Pecan Praline Cake https://www.thehelper.net/threads/recipe-southern-pecan-praline-cake.193555/
  • The Helper The Helper:
    Another bot invasion 493 members online most of them bots that do not show up on stats
  • Varine Varine:
    I'm looking at a solid 378 guests, but 3 members. Of which two are me and VSNES. The third is unlisted, which makes me think its a ghost.
    +1
  • The Helper The Helper:
    Some members choose invisibility mode
    +1
  • The Helper The Helper:
    I bitch about Xenforo sometimes but it really is full featured you just have to really know what you are doing to get the most out of it.
  • The Helper The Helper:
    It is just not easy to fix styles and customize but it definitely can be done
  • The Helper The Helper:
    I do know this - xenforo dropped the ball by not keeping the vbulletin reputation comments as a feature. The loss of the Reputation comments data when we switched to Xenforo really was the death knell for the site when it came to all the users that left. I know I missed it so much and I got way less interested in the site when that feature was gone and I run the site.
  • Blackveiled Blackveiled:
    People love rep, lol
    +1
  • The Helper The Helper:
    The recipe today is Sloppy Joe Casserole - one of my faves LOL https://www.thehelper.net/threads/sloppy-joe-casserole-with-manwich.193585/
  • The Helper The Helper:
    Decided to put up a healthier type recipe to mix it up - Honey Garlic Shrimp Stir-Fry https://www.thehelper.net/threads/recipe-honey-garlic-shrimp-stir-fry.193595/

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top