1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  3. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  4. We have recently started the 16th edition of the Mini Mapping Contest. The theme is mini RPG. Do check it out and have fun.
    Dismiss Notice
  5. Dismiss Notice
  6. The Highway to Hell has been laid open. Come along and participate in the 5th Special Effect Contest.
    Dismiss Notice
  7. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Attack Passives System

Submitted by BloodForBlood
This bundle is marked as awaiting update. A staff member has requested changes to it before it can be approved.
Attack Passives System v1.04
Created by: BloodForBlood

Requirements:
1.JassHelper 0.A.2.B or above
2.Damage Event
By: looking_for_help aka eey
3.Stun System
By: iAyanami aka Ayanami
4.Jass NewGen Pack or WEX
5.Table(New Table)


What is this:
It's a triggered version of attack passive abilities with
additional features. You can also add special effects on it.

How to import:
1.Simply copy the folder "Attacks Passives" to your map.
2.Then read each required libraries to how to import.

Spell Functions:
Code (vJASS):
    Functions or System API:
        CriticalStrike.update takes unit whichUnit, real multiplier, real chance, string fx, string attachment, string msg returns nothing
            // This adds critical strike on unit.
            Example: call CriticalStrike.update(u, 2.0, 25.0, "Abilities\\Weapons\\HydraliskImpact\\HydraliskImpact.mdl", "chest", "|cFFFF0000<>!|r")
            Tip: You can set fx to ".mdl" to create no effects.
            Note: The <> represents the damage amount.
        CriticalStrike.remove takes unit whichUnit returns nothing
            // This removes the critical strike from unit.
            Example: call CriticalStrike.remove(u)
        Bash.update takes unit whichUnit, real damagebonus, real duration, real chance, string fx, string attachment returns nothing
            // This adds bash on unit.
            Example: call Bash.update(u, 50.00, 2.00, 25.00, ".mdl", "chest")
            Tip: You can set fx to ".mdl" to create no effects.
        Bash.remove takes unit whichUnit returns nothing
            // This removes the bash from unit.
            Example: call Bash.remove(u)
        Evasion.update takes unit whichUnit, real chance, string fx, string attachment, string msg returns nothing
            // This adds evasion on unit.
            Example: call Evasion.update(u, 30.00, ".mdl", "chest", "|cFFFF0000miss|r")
            Tip: You can set fx to ".mdl" to create no effects.
        Evasion.remove takes unit whichUnit returns nothing
            // This removes the evasion from unit.
            Example: call Evasion.remove(u)
        Cleave.update takes unit whichUnit, real dmgfactor, real AoE, string fx, string attach returns nothing
            // This adds cleave on unit.
            Example: call Cleave.update(u, 0.75, 200, ".mdl", "chest")
            Tip: You can set fx to ".mdl" to create no effects.
        Cleave.remove takes unit whichUnit returns nothing
            // This removes the cleave from unit.
            Example: call Cleave.remove(u)
 
Changelog
Code (Text):
v1.04:
Added Cleave as requested
Renamed library to "AttackPassivesSystem"
Added custom floating text as requested
Backwards Compatibility is tottally dead
Optimized code
v1.03:
Removed unit indexer requirement.
I used vJASS version of "Physical Damage Detection" instead.
Using HashTable instead of TableArray.
Fixed some bugs.
Removed some useless codes.
v1.02:
Replaced hashtable with Table.
Added effects for bash and evasion.
Added requirement: Any unit indexer
Fix a bug that bash still procs in evasion.
Removed some useless functions:
    the Disable and Enable trigger thing...
v1.01:
Changed scope to library.
Using 1 hashtable instead of 3 and
merged into 1 trigger.
v1.00:
First release.
Special Thanks to:
looking_for_help aka eey for "Physical Damage Detection"
iAyanami aka Ayanami for "StunSystem"
Bribe for "NewTable"
Vexorian
Nestharus
Contents

Attack Passives System (Map)

Reviews
MyPad
Having evolved from just a Bash, Evasion and Critical Strike System, I will leave another review: Notes: CriticalStrike -> should extend array (No allocator found) Bash -> should extend array (No allocator found) Evasion -> should extend array (No...
Dr Super Good
Required for Approval: Code quality requires improvement. Tabs and spaces are used inconsistently to format code. This makes the code hard to read in standard World Editor as a tab is 8 spaces wide. To indent code one should use either all spaces (4...
  1. BloodForBlood

    BloodForBlood

    Joined:
    Mar 15, 2017
    Messages:
    96
    Resources:
    0
    Resources:
    0
    You mean stacking?
     
  2. AGD

    AGD

    Joined:
    Mar 29, 2016
    Messages:
    400
    Resources:
    13
    Spells:
    7
    Tutorials:
    1
    JASS:
    5
    Resources:
    13
    Yeah
     
  3. BloodForBlood

    BloodForBlood

    Joined:
    Mar 15, 2017
    Messages:
    96
    Resources:
    0
    Resources:
    0
    Sure.
     
  4. MyPad

    MyPad

    Spell Reviewer

    Joined:
    May 9, 2014
    Messages:
    1,333
    Resources:
    7
    Models:
    1
    Icons:
    2
    Spells:
    3
    JASS:
    1
    Resources:
    7
    Having evolved from just a Bash, Evasion and Critical Strike System, I will leave another review:

    Notes:


    • CriticalStrike -> should extend array (No allocator found)
    • Bash -> should extend array (No allocator found)
    • Evasion -> should extend array (No allocator found)
    • Cleave -> should extend array (No allocator found)
    • CriticalStrike, Bash, Evasion, Cleave -> Uses string hash, which could produce key collisions in certain cases. See [vJASS] - StringHashEx guaranteed no-collision string hash, Spell Effect Indexer v1.5 (Message #26)
    • CriticalStrike_Actions -> uses GetLastCreatedTextTag() instead of bj_lastCreatedTextTag
    • Evasion_Actions -> uses GetLastCreatedTextTag() instead of bj_lastCreatedTextTag

    Nitpicks:



    • Cleave_Filter -> Could use some delimited comments as replacement for a lot of if-then conditions. -> /**/

      You can copy these if you want:

      Code (vJASS):

          return (GetWidgetLife(u) > 0.405) /*
      */
      and (u != null) /*
      */
      and (GetUnitTypeId(u) == 0) /*
      */
      and not (IsUnitAlly(u, p))
       

    Additional Comments:



    Map works fine, as intended.
    However, a more favorable Damage Detection System is preferred (I suggest Flux's DamagePackage).
    Stacking will be included, right?

    Status:


    • Awaiting Update
     
  5. IcemanBo

    IcemanBo

    Joined:
    Sep 6, 2013
    Messages:
    6,210
    Resources:
    22
    Maps:
    3
    Spells:
    11
    Template:
    1
    Tutorials:
    4
    JASS:
    3
    Resources:
    22
    StringHash acts not case sensitive, but others than that ... ? It's still fine for most cases.
     
  6. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,724
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    Required for Approval:
    Code quality requires improvement.
    • Tabs and spaces are used inconsistently to format code. This makes the code hard to read in standard World Editor as a tab is 8 spaces wide. To indent code one should use either all spaces (4 per block level) or all tabs and not both.
    • Hashes of constant strings should be turned into constant variables as the resulting value is constant. This improves code maintainability since one can change the hashed string in a single location. Since hashes of strings might not be safe due to collision potential, it is usually recommended to use the key keyword functionality of variables declared in the globals blocks of vJASS to allocate unique named key values for use with hashtables.
    Comments and suggestions:
    Potentially useful for some RPGs where passive effects are often computed on custom stats. Might also be useful for some custom ability effects that add temporary passives of a nature that cannot be simulated with a hidden ability.

    Cleave AoE calculation might not be correct as it does not factor in unit collision radius. This may require checking against the cleave ability as I think that does factor in collision radius when determining if targets are hit. One simulates such hit detection by enumerating units in a larger area (AoE + maximum collision radius) and then filtering the results using the IsUnitInRange set of functions as those functions factor in unit collision size.

    The use of Damage Event might no longer be required due to the addition of new natives to handle this functionality in recent patches.

    The test map should revive the player's hero upon death. Without this it is very easy for the player to quickly lose their hero which effectively ends the test session before experiencing all the functionality on display.​
     
  7. noob

    noob

    Joined:
    Sep 28, 2011
    Messages:
    717
    Resources:
    0
    Resources:
    0
    Wow now there is a cleave system on the hive workshop.
    Good job.
    I hope that soon whatever needed to be updated will be because it is a system that was missing from warcraft 3 before you created it.
     
  8. BloodForBlood

    BloodForBlood

    Joined:
    Mar 15, 2017
    Messages:
    96
    Resources:
    0
    Resources:
    0
    I have no idea if my cleave formula was correct, I am thinking if it's a circle sector. What do you think?
    I have abandoned this, but I never thought someone will like this, so I will continue this work. By the way, my bash system sucks, it doesn't work on magic immune units. I HAVE A LOT OF THINGS TO FIX, I was not good at vJass that time. Take a look at my code, the code design sucks.
     
  9. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,724
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    You will need to test. It most likely factors in unit collision radius, which was my major complaint since so many AoE abilities fail to do so which is mechanically incorrect.