1. Find your way through the deepest dungeon in the 18th Mini Mapping Contest Poll.
    Dismiss Notice
  2. A brave new world lies beyond the seven seas. Join the 34th Modeling Contest today!
    Dismiss Notice
  3. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
Hive 3 Remoosed BETA - NOW LIVE. Go check it out at BETA Hive Workshop! Post your feedback in this new forum BETA Feedback.
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Arrow spell request

Discussion in 'Requests' started by Eagle XI, Nov 27, 2015.

  1. Eagle XI

    Eagle XI

    Joined:
    Mar 9, 2012
    Messages:
    1,359
    Resources:
    117
    Models:
    2
    Icons:
    109
    Packs:
    4
    Skins:
    2
    Resources:
    117
    Fires an arrow at the target unit, that deals fixamount dmg and applies damage over time debuff with fix damage intervalls. If target dies with the debuff hero is healed for amount% of fixamount damage(not the Dot!). Edit: oh i forgot to say that the debuff needs to be can be dispellable.

    Example level 1 tooltip:
    Fires an arrow at the target unit, dealing 150 dmg and haunting it for additional 35 dmg every 3sec over 30sec.
    If target dies whilst being affected by this spell, the hero is healed for 20% of the damage dealt by the shot.

    If it already does exist, just point me in the direction.
     
  2. DEE-BOO

    DEE-BOO

    Joined:
    Apr 4, 2010
    Messages:
    505
    Resources:
    1
    Icons:
    1
    Resources:
    1
    So pretty much shadow strike with percentage heal based on damage dealt (if target dies).

    EDIT: I made the spell, but there is a weird bug that I cannot figure out, maybe someone can help me, help you. I should use a missile system, but I don't. Instead I use a Damage Engine to detect zero damage when a dummy missile connects to the target. What happens in the bug is that the previous caster gets healed as well, like I didn't de-index properly.

    TRIGGERS

    • Healing Shadow Strike Init
      • Events
        • Map initialization
      • Conditions
      • Actions
        • -------- Inital Damage Dealt Upon Cast --------
        • Set HSS_Buff = Acid Bomb
        • Set HSS_AbilityMain = Healing Shadow Strike
        • Set HSS_AbilityDummy = Acid Bomb
        • -------- Damage Dealt Once Missle Hits --------
        • Set HSS_ConfigDamageInitial[1] = 100.00
        • Set HSS_ConfigDamageInitial[2] = 200.00
        • Set HSS_ConfigDamageInitial[3] = 300.00
        • -------- Damage Dealt Every [X] Seconds --------
        • Set HSS_ConfigDamagePerTick[1] = 50.00
        • Set HSS_ConfigDamagePerTick[2] = 75.00
        • Set HSS_ConfigDamagePerTick[3] = 100.00
        • -------- Damage is dealt every [X] Seconds --------
        • Set HSS_ConfigDurationPerTick[1] = 3.00
        • Set HSS_ConfigDurationPerTick[2] = 3.00
        • Set HSS_ConfigDurationPerTick[3] = 3.00
        • -------- Percentage of Damage Dealt Healed if Target Dies. --------
        • Set HSS_ConfigHealPercentage[1] = 0.20
        • Set HSS_ConfigHealPercentage[2] = 0.30
        • Set HSS_ConfigHealPercentage[3] = 0.40
        • -------- Dummy Pre-load --------
        • Set HSS_TempPoint = (Center of (Playable map area))
        • Unit - Create 1 Dummy for HSS_Player[HSS_Index] at HSS_TempPoint facing Default building facing degrees
        • Set HSS_Dummy[0] = (Last created unit)
        • Unit - Add HSS_AbilityDummy to HSS_Dummy[0]
        • Unit - Remove HSS_Dummy[0] from the game
        • Custom script: call RemoveLocation (udg_HSS_TempPoint)

    • Healing Shadow Strike Dummy Cast
      • Events
        • Unit - A unit Starts the effect of an ability
      • Conditions
        • (Ability being cast) Equal to HSS_AbilityMain
      • Actions
        • Set HSS_Index = (HSS_Index + 1)
        • Set HSS_Caster[HSS_Index] = (Casting unit)
        • Set HSS_Target[HSS_Index] = (Target unit of ability being cast)
        • Set HSS_Player[HSS_Index] = (Owner of HSS_Caster[HSS_Index])
        • Set HSS_LevelofAbility[HSS_Index] = (Level of HSS_AbilityMain for HSS_Caster[HSS_Index])
        • Set HSS_DamageStorage[HSS_Index] = 0.00
        • Set HSS_DurationPerTick[HSS_Index] = 0.00
        • Set HSS_MissileHit[HSS_Index] = False
        • Set HSS_TempPoint = (Position of HSS_Caster[HSS_Index])
        • Unit - Create 1 Dummy for HSS_Player[HSS_Index] at HSS_TempPoint facing Default building facing degrees
        • Set HSS_Dummy[HSS_Index] = (Last created unit)
        • Unit - Add HSS_AbilityDummy to HSS_Dummy[HSS_Index]
        • Unit - Set level of HSS_AbilityDummy for HSS_Dummy[HSS_Index] to HSS_LevelofAbility[HSS_Index]
        • Unit - Order HSS_Dummy[HSS_Index] to Neutral Alchemist - Acid Bomb HSS_Target[HSS_Index]
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • HSS_Index Equal to 1
          • Then - Actions
            • Trigger - Turn on Healing Shadow Strike Loop <gen>
          • Else - Actions
        • Custom script: call RemoveLocation (udg_HSS_TempPoint)

    • Healing Shadow Strike Real Cast
      • Events
        • Game - DamageEvent becomes Equal to 2.00
      • Conditions
      • Actions
        • For each (Integer HSS_Loop) from 1 to HSS_Index, do (Actions)
          • Loop - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • DamageEventSource Equal to HSS_Dummy[HSS_Loop]
                • DamageEventTarget Equal to HSS_Target[HSS_Loop]
              • Then - Actions
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • HSS_MissileHit[HSS_Loop] Equal to False
                    • (HSS_Target[HSS_Loop] has buff HSS_Buff) Equal to True
                  • Then - Actions
                    • Set HSS_MissileHit[HSS_Loop] = True
                    • Unit - Cause HSS_Dummy[HSS_Loop] to damage HSS_Target[HSS_Loop], dealing HSS_ConfigDamageInitial[HSS_LevelofAbility[HSS_Loop]] damage of attack type Spells and damage type Normal
                  • Else - Actions
              • Else - Actions

    • Healing Shadow Strike Heal Storage
      • Events
        • Game - DamageEvent becomes Equal to 1.00
      • Conditions
      • Actions
        • For each (Integer HSS_Loop) from 1 to HSS_Index, do (Actions)
          • Loop - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • DamageEventSource Equal to HSS_Dummy[HSS_Loop]
                • DamageEventTarget Equal to HSS_Target[HSS_Loop]
                • HSS_MissileHit[HSS_Loop] Equal to True
              • Then - Actions
                • Set HSS_DamageStorage[HSS_Loop] = (HSS_DamageStorage[HSS_Loop] + DamageEventAmount)
              • Else - Actions

    • Healing Shadow Strike Loop
      • Events
        • Time - Every 0.03 seconds of game time
      • Conditions
      • Actions
        • For each (Integer HSS_Loop) from 1 to HSS_Index, do (Actions)
          • Loop - Actions
            • Set HSS_DurationPerTick[HSS_Loop] = (HSS_DurationPerTick[HSS_Loop] + 0.03)
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • HSS_DurationPerTick[HSS_Loop] Greater than or equal to HSS_ConfigDurationPerTick[HSS_LevelofAbility[HSS_Loop]]
              • Then - Actions
                • Special Effect - Create a special effect attached to the origin of HSS_Target[HSS_Loop] using Abilities\Spells\Other\AcidBomb\BottleMissile.mdl
                • Special Effect - Destroy (Last created special effect)
                • Set HSS_DurationPerTick[HSS_Loop] = 0.00
                • Unit - Cause HSS_Dummy[HSS_Loop] to damage HSS_Target[HSS_Loop], dealing HSS_ConfigDamagePerTick[HSS_LevelofAbility[HSS_Loop]] damage of attack type Spells and damage type Normal
              • Else - Actions
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • HSS_MissileHit[HSS_Loop] Equal to True
              • Then - Actions
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • Or - Any (Conditions) are true
                      • Conditions
                        • (HSS_Target[HSS_Loop] has buff HSS_Buff) Equal to False
                        • (HSS_Target[HSS_Loop] is dead) Equal to True
                  • Then - Actions
                    • Unit - Remove HSS_Dummy[HSS_Loop] from the game
                    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • (HSS_Target[HSS_Loop] is dead) Equal to True
                      • Then - Actions
                        • Unit - Set life of HSS_Caster[HSS_Loop] to ((Life of HSS_Caster[HSS_Loop]) + (HSS_DamageStorage[HSS_Loop] x HSS_ConfigHealPercentage[HSS_LevelofAbility[HSS_Loop]]))
                        • Special Effect - Create a special effect attached to the origin of HSS_Caster[HSS_Loop] using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
                        • Special Effect - Destroy (Last created special effect)
                      • Else - Actions
                    • Set HSS_Caster[HSS_Loop] = HSS_Caster[HSS_Index]
                    • Set HSS_Dummy[HSS_Loop] = HSS_Dummy[HSS_Index]
                    • Set HSS_Target[HSS_Loop] = HSS_Target[HSS_Index]
                    • Set HSS_Player[HSS_Loop] = HSS_Player[HSS_Index]
                    • Set HSS_LevelofAbility[HSS_Loop] = HSS_LevelofAbility[HSS_Index]
                    • Set HSS_DamageStorage[HSS_Loop] = HSS_DamageStorage[HSS_Index]
                    • Set HSS_DurationPerTick[HSS_Loop] = HSS_DurationPerTick[HSS_Index]
                    • Set HSS_MissileHit[HSS_Loop] = HSS_MissileHit[HSS_Index]
                    • Set HSS_Index = (HSS_Index - 1)
                    • Set HSS_Loop = (HSS_Loop - 1)
                    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • HSS_Index Equal to 0
                      • Then - Actions
                        • Trigger - Turn off (This trigger)
                      • Else - Actions
                  • Else - Actions
              • Else - Actions

     

    Attached Files:

    Last edited: Nov 28, 2015
  3. KILLCIDE

    KILLCIDE

    Administrator

    Joined:
    Jul 22, 2015
    Messages:
    3,505
    Resources:
    20
    Models:
    2
    Icons:
    10
    Spells:
    7
    Tutorials:
    1
    Resources:
    20
    That's a super convoluted solution, DEE-BOO! Since the missle is homing, you can just easily keep moving the missle until it reaches its target and deindex. However, right before the deindex, start a DoT timer loop, index that DoT timer, and then deindex when its over.

    Missle Init
    • Missle Init
      • Events
        • Unit - A unit Starts the effect of an ability
      • Conditions
        • (Ability being cast) Equal to Missle Ability
      • Actions
        • -------- index missle init variables --------
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • index1 Equal to 1
          • Then - Actions
            • Trigger - Turn on Move Missle Loop
          • Else - Actions

    Move Missle Loop
    • Move Missle Loop
      • Events
        • Time - Every 0.03 seconds of game time
      • Conditions
      • Actions
        • For each (Integer loop integer 1) from 1 to index1, do (Actions)
          • Loop - Actions
            • -------- move missle --------
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • -------- has missle reached target? if not keep moving --------
              • Then - Actions
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • (target is alive) Equal to True
                  • Then - Actions
                    • -------- index necessary DoT variables --------
                    • -------- ex: caster + target + ability level --------
                    • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                      • If - Conditions
                        • index2 Equal to 1
                      • Then - Actions
                        • Trigger - Turn on DoT Loop
                      • Else - Actions
                        • -------- loop is already on --------
                  • Else - Actions
                    • -------- target died, do not start a new DoT instance --------
                • -------- deindex missle init variables --------
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • index1 Equal to 0
                  • Then - Actions
                    • Trigger - Turn off (This trigger)
                  • Else - Actions
              • Else - Actions


    DoT Loop
    • DoT Loop
      • Events
        • Time - Every 0.03 seconds of game time
      • Conditions
      • Actions
        • For each (loop integer 2) from 1 to index2, do (Actions)
          • Loop - Actions
            • -------- deal damage --------
            • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
              • If - Conditions
                • -------- is duration over or did the target die? --------
              • Then - Actions
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • -------- did the target die? --------
                  • Then - Actions
                    • -------- heal caster --------
                  • Else - Actions
                    • -------- target did not die; do not heal caster --------
                • -------- deindex DoT variables --------
                • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                  • If - Conditions
                    • index2 Equal to 0
                  • Then - Actions
                    • Trigger - Turn off (This trigger)
                  • Else - Actions
              • Else - Actions
     
    Last edited: Nov 30, 2015
  4. DEE-BOO

    DEE-BOO

    Joined:
    Apr 4, 2010
    Messages:
    505
    Resources:
    1
    Icons:
    1
    Resources:
    1
    I'm the embodiment of convolution ( ͡° ͜ʖ ͡°)
    I managed to fixed my weird version, I just had to re-arrange some stuff in the periodic loop. It doesn't use a missile system, it's just a DoT trigger.
     

    Attached Files:

  5. Eagle XI

    Eagle XI

    Joined:
    Mar 9, 2012
    Messages:
    1,359
    Resources:
    117
    Models:
    2
    Icons:
    109
    Packs:
    4
    Skins:
    2
    Resources:
    117
    Thanks :3