1. Are you planning to upload your awesome spell or system to Hive? Please review the rules here.
    Dismiss Notice
  2. The poll for our 11th Music Contest is up! Help us choose the most awesome cinematic tracks by casting a vote!
    Dismiss Notice
  3. Melee Mapping contest #3 - Poll is up! Vote for the best 4v4 melee maps!
    Dismiss Notice
  4. The 30th edition of the Modeling Contest is finally up! The Portable Buildings need your attention, so come along and have a blast!
    Dismiss Notice
  5. The Aftermath has been revealed for the 19th Terraining Contest! Be sure to check out the Results and see what came out of it.
    Dismiss Notice

Attack Passives System

Submitted by BloodForBlood
This bundle is marked as pending. It has not been reviewed by a staff member yet.
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...
  1. MyPad

    MyPad

    Spell Reviewer

    Joined:
    May 9, 2014
    Messages:
    1,137
    Resources:
    3
    Models:
    1
    Icons:
    1
    JASS:
    1
    Resources:
    3

    Notes:


    • The idea behind this .. spell is somewhat too simplistic. A more vivid description about the spell would be more helpful.
    • The Main System Code utilizes scopes, which are not recommended in public resources such as this. Libraries would be required.
    • Modularity is not too keenly observed (Having a new hashtable per system instead of relying on Table instances?)
    • The library DamageEvent isn't a library per se, which requires enclosing it within a newly-declared library.

    Suggestions:


    • Encase the Main System code in libraries instead of scopes.
    • Rename the spell to Bash, Critical Strike, and Evasion System.
    • The requirement JNGP should be changed to Sharpcraft WEX as it (JNGP) is outdated and incompatible with the current versions.
    • More to be added..
     
    Last edited: Jul 29, 2018
  2. zv27

    zv27

    Joined:
    Aug 21, 2010
    Messages:
    296
    Resources:
    0
    Resources:
    0
    Very good system for only one reason.Very faithfully shows all the defects and inefficiency of the damage system.Crit, bash, and evasion should be part of the system.

    This method
    call DisableTrigger( GetTriggeringTrigger() )
    call UnitDamageTargetBJ(udg_PDD_source, udg_PDD_target, bonus, ATTACK_TYPE_HERO, DAMAGE_TYPE_NORMAL) call EnableTrigger( GetTriggeringTrigger() )
    is a story for itself.
    Attacking damage should be automatic.
    Attacking damage should support crit, bash,evasion and so on.
    Only spell damage should be triggered.
    As for your system.
    Since it is based on another not so efficient system I can not say anything.
     
  3. BloodForBlood

    BloodForBlood

    Joined:
    Mar 15, 2017
    Messages:
    73
    Resources:
    0
    Resources:
    0
    Okay I'll change it to library..
    And sorry,I don't know about WEX.And also where can I find the JassHelper for WEX??

    I disabled that because I was using Physical Damage Detection which I can modify its damage by changing PDD_amount.

    And also,I don't know how to use table.I'm a beginner at vJASS(not really beginner,but It's like I only have medium knowledge for it).
     
    Last edited by a moderator: Apr 14, 2018
  4. BloodForBlood

    BloodForBlood

    Joined:
    Mar 15, 2017
    Messages:
    73
    Resources:
    0
    Resources:
    0
    New update: 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...

    If someone cares... :slp:
     
    Last edited: Apr 23, 2018
  5. MyPad

    MyPad

    Spell Reviewer

    Joined:
    May 9, 2014
    Messages:
    1,137
    Resources:
    3
    Models:
    1
    Icons:
    1
    JASS:
    1
    Resources:
    3
    Good. Good.

    I find the ability to adapt to coding conventions quite impressive. As it stands, my former remarks are no longer applicable to a certain extent.
     
  6. AGD

    AGD

    JASS Reviewer

    Joined:
    Mar 29, 2016
    Messages:
    396
    Resources:
    13
    Spells:
    7
    Tutorials:
    1
    JASS:
    5
    Resources:
    13
    Since you're using vJass, you might want to use the vJass version of PDDS.

    It's also nice to use a single Table instead of a TableArray.
    You can do it like
    Code (vJASS):

    local integer i = GetUnitUserData(u)*9 //9 is just an example, u must replace it with the number of the kinds of data you store into the table
    set table.real[i + 0] = ... //crit chance
    set table.real[i + 1] = ... //crit factor
    set table.string[i + 2] = ... //crit sfx
    //and so on


    And there is one very important issue that bugs me - the evasion does not even remotely mimic the proper behavior of an actual evasion. Blocking a damage is not the way to go. Using this system, even when an attack was supposedly evaded, it still triggers orb effects, lifesteal, bash/crit chance, etc. and most importantly, it also triggers a damage event - which it should not. Even I could not think of a way to mimic the game's default evasion behavior. The only way is if we are provided with an "Attack/Missile Launch Event" and a control over the launced attack's/missile's behavior, which is currently not the case.
     
  7. BloodForBlood

    BloodForBlood

    Joined:
    Mar 15, 2017
    Messages:
    73
    Resources:
    0
    Resources:
    0
    hmm,I didn't think of that...And I'll find a way to bypass that issue..

    Thanks,I just wan't to improve my knowledge on vJASS
     
    Last edited: Apr 25, 2018
  8. emperor_d3st

    emperor_d3st

    Joined:
    Apr 13, 2008
    Messages:
    1,408
    Resources:
    0
    Resources:
    0
    Good job, my man. ;)
     
  9. BloodForBlood

    BloodForBlood

    Joined:
    Mar 15, 2017
    Messages:
    73
    Resources:
    0
    Resources:
    0
    Thanks..I neeed to fix the evasion first,still procs orb effects at miss..lol!
     
  10. BloodForBlood

    BloodForBlood

    Joined:
    Mar 15, 2017
    Messages:
    73
    Resources:
    0
    Resources:
    0
    UPDATED!
    (I didn't open this map for 2 weeks, then I review it.Then I realize that I was stupid before.
    It got useless codes and I used "CreateUnit"(The native function) then I use "GetLastCreatedUnit"...
    LOL!)
     
  11. Love Seeker

    Love Seeker

    Joined:
    Mar 21, 2014
    Messages:
    850
    Resources:
    1
    Tutorials:
    1
    Resources:
    1
    Nice system IMO :p
    I got questions to ask you. I think that the unit procing critical won't play "attack slam" animation, will they? Also, is there a way to configure floating text for each critical strike? I mean floating text for one critical is "put your text here :p" while the other is like original?

    Anyway, 4/5!
     
  12. BloodForBlood

    BloodForBlood

    Joined:
    Mar 15, 2017
    Messages:
    73
    Resources:
    0
    Resources:
    0
    Yeah,sadly..It won't play attack slam.I'm trying to find a way to add that feature.
    I'll add that custom floating text for ya.
     
  13. noob2

    noob2

    Joined:
    Mar 27, 2017
    Messages:
    106
    Resources:
    0
    Resources:
    0
    Is there is someone who made a triggered cleave that takes armour in account before?
     
  14. BloodForBlood

    BloodForBlood

    Joined:
    Mar 15, 2017
    Messages:
    73
    Resources:
    0
    Resources:
    0
    Next update, I'll add cleave.And I'll rename this to...What do you think is the better name?
     
  15. noob2

    noob2

    Joined:
    Mar 27, 2017
    Messages:
    106
    Resources:
    0
    Resources:
    0
    Maybe battle passives?
    I am not very good at names but the current name (which is Bash,Critical Strike & Evasion System) is quite clear on what the system does which is good
     
  16. BloodForBlood

    BloodForBlood

    Joined:
    Mar 15, 2017
    Messages:
    73
    Resources:
    0
    Resources:
    0
    Maybe "Attack Passives System", but on next update!

    EDIT:
    Updated!
    Added custom floating text and cleave!
     
    Last edited: Jul 15, 2018
  17. AGD

    AGD

    JASS Reviewer

    Joined:
    Mar 29, 2016
    Messages:
    396
    Resources:
    13
    Spells:
    7
    Tutorials:
    1
    JASS:
    5
    Resources:
    13
    How's the evasion? :D
     
  18. BloodForBlood

    BloodForBlood

    Joined:
    Mar 15, 2017
    Messages:
    73
    Resources:
    0
    Resources:
    0
    Still dead.. I have no idea though..
     
  19. AGD

    AGD

    JASS Reviewer

    Joined:
    Mar 29, 2016
    Messages:
    396
    Resources:
    13
    Spells:
    7
    Tutorials:
    1
    JASS:
    5
    Resources:
    13
    For a proper evasion, wait till blizzard provides us with the neccessary natives and object or when someone creates an alternative to the default attack system xD. Whichever comes first.

    EDIT:
    Btw, currently a unit is limited to only one instance of each type of passive, which is quite limiting. Maybe you should provide allow a unit to have as many instance as the user would. For this, you have to create a
    create()
    method for each attack passive. Then also provide a method to register/unregister a unit to/from a passive's instance.
     
    Last edited: Jul 16, 2018