1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. The contestants were to create water structures for the 20th Terraining Contest. Choose one in the public poll!
    Dismiss Notice
  3. Join other hivers in a friendly concept-art contest. The contestants have to create a genie coming out of its container. We wish you the best of luck!
    Dismiss Notice
  4. The Melee Mapping Contest #4: 2v2 - Results are out! Step by to congratulate the winners!
    Dismiss Notice
  5. We're hosting the 15th Mini-Mapping Contest with YouTuber Abelhawk! The contestants are to create a custom map that uses the hidden content within Warcraft 3 or is inspired by any of the many secrets within the game.
    Dismiss Notice
  6. Check out the Staff job openings thread.
    Dismiss Notice

Spirit protection 1.06

Submitted by .OmG.
This bundle is marked as approved. It works and satisfies the submission rules.
Description
Being attacked, there is a chance to cast random spell to an opponent.
Level 1 - 20% chance
Level 2 - 40% chance
Level 3 - 60% chance

The power of the spells increases with level of ability.


version 1.06
In version 1.06 user can select any chance to cast a random spell, instead of using Max and min factors. Also I have imroved some description.






Credits:
Anachron (good icon for the spell)

Keywords:
attack, random,spell,cast,chance, passive,aura,lightning
Contents

Spirit protection 1.06 (Map)

Reviews
Moderator
19th Jul 2011 Maker: Simple but could be useful. Change GetLastCreatedUnit() to bj_lastCreatedUnit
  1. .OmG.

    .OmG.

    Joined:
    May 9, 2010
    Messages:
    256
    Resources:
    2
    Spells:
    2
    Resources:
    2
    Help? Why?
     
  2. Ketsuno Anson

    Ketsuno Anson

    Joined:
    May 14, 2011
    Messages:
    392
    Resources:
    0
    Resources:
    0
    For posting the codes
     
  3. .OmG.

    .OmG.

    Joined:
    May 9, 2010
    Messages:
    256
    Resources:
    2
    Spells:
    2
    Resources:
    2
    Is the people who can to open and save it in JNGP?
     
  4. Ketsuno Anson

    Ketsuno Anson

    Joined:
    May 14, 2011
    Messages:
    392
    Resources:
    0
    Resources:
    0
    Well,ask bribe or maker about it,they are experts
     
  5. .OmG.

    .OmG.

    Joined:
    May 9, 2010
    Messages:
    256
    Resources:
    2
    Spells:
    2
    Resources:
    2
    They are can not.
     
  6. Bribe

    Bribe

    Joined:
    Sep 26, 2009
    Messages:
    7,854
    Resources:
    25
    Maps:
    3
    Spells:
    10
    Tutorials:
    3
    JASS:
    9
    Resources:
    25
    Why did you save this yet again in UMSWE after all the work we went through getting it working in World Editor? Just change your orders to strings.
     
  7. .OmG.

    .OmG.

    Joined:
    May 9, 2010
    Messages:
    256
    Resources:
    2
    Spells:
    2
    Resources:
    2
    The spell has been updated again.
    Now, it is workable in normal WE (thanks Bribe who helped me)
     
    Last edited: Jun 27, 2011
  8. wickedforehand

    wickedforehand

    Joined:
    Jul 31, 2011
    Messages:
    36
    Resources:
    0
    Resources:
    0
    Excuse me... how do you change the percentage or chances it will cast in triggers? I guess 50% is overkill... I just made the spell to be 4 levels that's why... How can I make it:
    Level 1 - 10%
    Level 2 - 20%
    Level 3 - 30%
    Level 4 - 40%

    Sorry, I do not understand what it means by the Factor_max and Factor_min in the triggers... help pls...


    *Solved... Tnx .OmG.
     
    Last edited: Aug 5, 2011
  9. .OmG.

    .OmG.

    Joined:
    May 9, 2010
    Messages:
    256
    Resources:
    2
    Spells:
    2
    Resources:
    2
    Version 1.05b:
    used bj_lastCreatedUnit instead of GetLastCreatedUnit()
     
  10. Cihparg

    Cihparg

    Joined:
    Jul 4, 2008
    Messages:
    958
    Resources:
    1
    Models:
    1
    Resources:
    1

    Short Review



    For now this spell is too simple to be approved, as well as it is way too easy to abuse in game because it is using
    • Unit - A unit Is attacked
    which makes the spell extremely abusable.

    I will rate this spell.. 1/5.
    That is enough for a vote of rejection.

    HELP FOR FUTURE;
    Go learn some tutorials at this place, go for either indexing or hashtables.

    TRIGGERS;
    • spirit protection ini
      • Events
        • Map initialization
      • Conditions
      • Actions
        • -------- Choose the number of your dummy spells --------
        • Set Random_spell_Count = 8
        • -------- This is value - the max number for the chance --------
        • -------- For example: --------
        • -------- if [1] value = 8 and [2] value = 1 --------
        • -------- then the change to cast random spell is --------
        • -------- 1/(8-1*lvl) * 100% --------
        • -------- 1 lvl - 14.28% --------
        • -------- 2 lvl - 16.66% --------
        • -------- 3 lvl - 20.00% --------
        • Set Factor_max = 5
        • -------- This is value - factor of descreasing change --------
        • Set Factor_min = 1
        • -------- --------
        • -------- --------
        • -------- choose your dummy spells --------
        • Set Random_Spell[1] = Shadow Strike random spell
        • Set Random_Spell[2] = Polymorph random spell
        • Set Random_Spell[3] = Chain Lightning random spell
        • Set Random_Spell[4] = Purge random spell
        • Set Random_Spell[5] = Frost Nova random spell
        • Set Random_Spell[6] = Entangling Roots random spell
        • Set Random_Spell[7] = Curse random spell
        • Set Random_Spell[8] = Mana Burn random spell
        • -------- --------
        • -------- --------
        • -------- choose ordercodes of your spells --------
        • -------- In the same procedure --------
        • Set Order[1] = shadowstrike
        • Set Order[2] = polymorph
        • Set Order[3] = chainlightning
        • Set Order[4] = purge
        • Set Order[5] = frostnova
        • Set Order[6] = entanglingroots
        • Set Order[7] = curse
        • Set Order[8] = manaburn
    • spirit protection effect
      • Events
        • Unit - A unit Is attacked
      • Conditions
        • (Level of Spirit protection for (Triggering unit)) Not equal to 0
      • Actions
        • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
          • If - Conditions
            • (Random integer number between 1 and (Factor_max - (Factor_min x (Level of Spirit protection for (Triggering unit))))) Equal to 1
          • Then - Actions
            • -------- This is a random value beetween 1 and the count of your random spells --------
            • Set Random_Value = (Random integer number between 1 and Random_spell_Count)
            • Set TempPoint = (Position of (Triggering unit))
            • Unit - Create 1 dummy for (Owner of (Triggering unit)) at TempPoint facing Default building facing degrees
            • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
            • -------- order to cast your chose spell with the correspond orders --------
            • Unit - Add Random_Spell[Random_Value] to (Last created unit)
            • Unit - Set level of Random_Spell[Random_Value] for (Last created unit) to (Level of Spirit protection for (Triggering unit))
            • Custom script: call IssueTargetOrder( bj_lastCreatedUnit, udg_Order[udg_Random_Value], GetAttacker() )
            • Custom script: call RemoveLocation(udg_TempPoint)
          • Else - Actions
     
  11. .OmG.

    .OmG.

    Joined:
    May 9, 2010
    Messages:
    256
    Resources:
    2
    Spells:
    2
    Resources:
    2
    In this site there are a lot of approved simple spells.
    The spell mustn`t be hard with a lot of special effects.
     
  12. Bribe

    Bribe

    Joined:
    Sep 26, 2009
    Messages:
    7,854
    Resources:
    25
    Maps:
    3
    Spells:
    10
    Tutorials:
    3
    JASS:
    9
    Resources:
    25
    OffGraphic, since the enemy unit would be the one attacking, and the enemy unit would be hurt by abusing this
    event, the "unit is attacked" in this case is admissable.

    I agree the spell is simple but there is a point where you draw the line between simple and complexity just for
    the sake of complexity.