• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Berserker Blood

Status
Not open for further replies.
Level 16
Joined
May 1, 2008
Messages
1,605
Wasn't this the passive ability of dat Huskar?

Well I think it's not that difficult. You just have to use the Item-Abilities: "Attackspeed Bonus" and "Damage Bonus".

Then you create a trigger, which periodically checks the current health of the hero and increase, decrease or set the hidden ability to a certain level, which gives the attackspeed and damage.
 
Level 12
Joined
Sep 11, 2011
Messages
1,176
here is the triggers i made for the spell.

  • Berserkers Blood
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Berserker's Blood
    • Actions
      • Set u = (Triggering unit)
      • Set cv = (Custom value of u)
      • Unit Group - Add u to tempGroup
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Berserker's Blood for u) Equal to 2
        • Then - Actions
          • Unit - Set level of BB Damage Bonus (2) for u to (Level of BB Damage Bonus (1) for u)
          • Unit - Set level of BB Damage Bonus (1) for u to 1
          • Unit - Set level of BB ASPD Bonus (2) for u to (Level of BB ASPD Bonus (1) for u)
          • Unit - Set level of BB ASPD Bonus (1) for u to 1
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Berserker's Blood for u) Equal to 3
        • Then - Actions
          • Unit - Set level of BB Damage Bonus (3) for u to (Level of BB Damage Bonus (2) for u)
          • Unit - Set level of BB Damage Bonus (2) for u to 1
          • Unit - Set level of BB ASPD Bonus (3) for u to (Level of BB ASPD Bonus (2) for u)
          • Unit - Set level of BB ASPD Bonus (2) for u to 1
        • Else - Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Level of Berserker's Blood for u) Equal to 4
        • Then - Actions
          • Unit - Set level of BB Damage Bonus (4) for u to (Level of BB Damage Bonus (3) for u)
          • Unit - Set level of BB Damage Bonus (3) for u to 1
          • Unit - Set level of BB ASPD Bonus (4) for u to (Level of BB ASPD Bonus (3) for u)
          • Unit - Set level of BB ASPD Bonus (3) for u to 1
        • Else - Actions
      • For each (Integer A) from 1 to 14, do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Berserker's Blood for u) Equal to 1
            • Then - Actions
              • Set BB_Life[cv] = ((Max life of u) - ((Max life of u) x (((Real((Integer A))) x 7.00) / 100.00)))
              • Trigger - Add to BB Effects <gen> the event (Unit - u's life becomes Less than or equal to BB_Life[cv])
              • Trigger - Add to BB Effects Remover <gen> the event (Unit - u's life becomes Greater than or equal to BB_Life[cv])
              • Trigger - Add to BB Life Checking <gen> the event (Unit - u Gains a level)
              • Trigger - Turn on BB Effects <gen>
              • Trigger - Turn on BB Effects Remover <gen>
              • Trigger - Turn on BB Life Checking <gen>
            • Else - Actions
  • BB Effects
    • Events
    • Conditions
    • Actions
      • Unit Group - Pick every unit in tempGroup and do (Actions)
        • Loop - Actions
          • Set u = (Picked unit)
          • Set cv = (Custom value of u)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Berserker's Blood for u) Equal to 1
            • Then - Actions
              • Unit - Set level of BB Damage Bonus (1) for u to ((Level of BB Damage Bonus (1) for u) + 1)
              • Unit - Set level of BB ASPD Bonus (1) for u to ((Level of BB ASPD Bonus (1) for u) + 1)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Berserker's Blood for u) Equal to 2
            • Then - Actions
              • Unit - Set level of BB Damage Bonus (2) for u to ((Level of BB Damage Bonus (2) for u) + 1)
              • Unit - Set level of BB ASPD Bonus (2) for u to ((Level of BB ASPD Bonus (2) for u) + 1)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Berserker's Blood for u) Equal to 3
            • Then - Actions
              • Unit - Set level of BB Damage Bonus (3) for u to ((Level of BB Damage Bonus (3) for u) + 1)
              • Unit - Set level of BB ASPD Bonus (3) for u to ((Level of BB ASPD Bonus (3) for u) + 1)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Berserker's Blood for u) Equal to 4
            • Then - Actions
              • Unit - Set level of BB Damage Bonus (4) for u to ((Level of BB Damage Bonus (4) for u) + 1)
              • Unit - Set level of BB ASPD Bonus (4) for u to ((Level of BB ASPD Bonus (4) for u) + 1)
            • Else - Actions
  • BB Effects Remover
    • Events
    • Conditions
    • Actions
      • Unit Group - Pick every unit in tempGroup and do (Actions)
        • Loop - Actions
          • Set u = (Picked unit)
          • Set cv = (Custom value of u)
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Berserker's Blood for u) Equal to 1
            • Then - Actions
              • Unit - Set level of BB Damage Bonus (1) for u to ((Level of BB Damage Bonus (1) for u) - 1)
              • Unit - Set level of BB ASPD Bonus (1) for u to ((Level of BB ASPD Bonus (1) for u) - 1)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Berserker's Blood for u) Equal to 2
            • Then - Actions
              • Unit - Set level of BB Damage Bonus (2) for u to ((Level of BB Damage Bonus (2) for u) - 1)
              • Unit - Set level of BB ASPD Bonus (2) for u to ((Level of BB ASPD Bonus (2) for u) - 1)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Berserker's Blood for u) Equal to 3
            • Then - Actions
              • Unit - Set level of BB Damage Bonus (3) for u to ((Level of BB Damage Bonus (3) for u) - 1)
              • Unit - Set level of BB ASPD Bonus (3) for u to ((Level of BB ASPD Bonus (3) for u) - 1)
            • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • (Level of Berserker's Blood for u) Equal to 4
            • Then - Actions
              • Unit - Set level of BB Damage Bonus (4) for u to ((Level of BB Damage Bonus (4) for u) - 1)
              • Unit - Set level of BB ASPD Bonus (4) for u to ((Level of BB ASPD Bonus (4) for u) - 1)
            • Else - Actions
  • BB Life Checking
    • Events
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 14, do (Actions)
        • Loop - Actions
          • Set BB_Life[cv] = ((Max life of u) - ((Max life of u) x (((Real((Integer A))) x 7.00) / 100.00)))

some explanations of how the spell works.

This spell let you gain ((Level of Berserker's Blood) x (3.00/100.00)) ASPD and ((Level of Berserker's Blood) x 2.00) Damages for each 7% loss of health points up to 14 times. When the hero recovers Health points, for each 7% of recovered health point will decrease your hero's ASPD by ((Level of Berserker's Blood) x (3.00/100.00)) and your hero's damage by ((Level of Berserker's Blood) x 2.00) and when the hero regain the damage taken, the process recommences.


It requires you to create 4 kind of "Item Damage bonus" ability with 15 levels each.

BB Damage Bonus (1)
Level 1 - 0 Damages
Level 2 - 2 Damages
Level 3 - 4 Damages
...
Level 15 - 28 Damages

BB Damage Bonus (2)

Level 1 - 0 Damages
Level 2 - 4 Damages
Level 3 - 8 Damages
...
Level 15 - 56 Damages

BB Damage Bonus (3)

Level 1 - 0 Damages
Level 2 - 6 Damages
Level 3 - 12 Damages
...
Level 15 - 84 Damages

BB Damage Bonus (4)
Level 1 - 0 Damages
Level 2 - 8 Damages
Level 3 - 16 Damages
...
Level 15 - 112 Damages

The same thing goes for "Item Attack Speed Bonus".


to makes this spell works, you also need to import "Unit Indexer" created by Bribe, here is the link http://www.hiveworkshop.com/forums/spells-569/gui-unit-indexer-1-2-0-2-a-197329/?prev=search%3DUnit%2520Indexer%26d%3Dlist%26r%3D20, there already provides tutorial to import "Unit Indexer" by Bribe.


BB Effects, BB Effects Remover and BB Life Check Triggers should be "Initially On" (as shown on the test map).


and here, i made a test map for you.
you can copy & paste all the abilities there.
here's the list of all the abilities you need to copy
1. BB Damage Bonus (1)
2. BB Damage Bonus (2)
3. BB Damage Bonus (3)
4. BB Damage Bonus (4)
5. BB ASPD Bonus (1)
6. BB ASPD Bonus (2)
7. BB ASPD Bonus (3)
8. BB ASPD Bonus (4)

9. Berserker's Blood


After you copied all of the abilities, attach BB Damage Bonus (1), (2), (3), & (4) and BB ASPD Bonus (1), (2), (3), & (4) to Abilities - Normal of the hero who will own Berserker's Blood.
 

Attachments

  • Berserker's Blood.w3x
    46.6 KB · Views: 457
Last edited:
Level 20
Joined
Jul 14, 2011
Messages
3,213
Damn TwoVenomous! I'm really happy to see you creating abilities, systems and all sort of stuff for people :p Even I wondered a lot of times how to create a skill like this one :p
 
Level 5
Joined
Mar 26, 2020
Messages
66
this reply might be flagged as necro-posting but how'd you do that but only 1 level? i tried doing it but its not detecting it (if possible not hero ability/cannot lvl up, just plain passive)
 
Level 1
Joined
Jan 7, 2022
Messages
2
I also have a problem with this spell, I tried to make it an innate passive spell, means the hero already has the skill by the time it enters the map...
But the problem is, as the hero developed throughout the game (i.e. Gaining levels, acquiring items, or anything that increases it's hit points) the spell is like stuck on the first trigger:

  • Dragon Blood setup
    • Events
      • Unit - A unit enters lake <gen>
    • Conditions
    • Actions
      • Set db_unit = (Triggering unit)
      • Set db_i = (Custom value of db_unit)
      • Unit Group - Add db_unit to db_group
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Set db_life[db_i] = ((Max life of db_unit) - ((Max life of db_unit) x (((Real((Integer A))) x 8.00) / 100.00)))
          • Trigger - Add to Dragon Blood increase <gen> the event (Unit - db_unit's life becomes Less than or equal to db_life[db_i])
          • Trigger - Add to Dragon Blood decrease <gen> the event (Unit - db_unit's life becomes Greater than db_life[db_i])
          • Trigger - Add to Dragon Blood lifecheck <gen> the event (Unit - db_unit Gains a level)
          • Trigger - Add to Dragon Blood lifecheck <gen> the event (Unit - db_unit Acquires an item)
          • Trigger - Add to Dragon Blood lifecheck <gen> the event (Unit - db_unit Loses an item)
          • Trigger - Turn on Dragon Blood lifecheck <gen>
          • Trigger - Turn on Dragon Blood decrease <gen>
          • Trigger - Turn on Dragon Blood increase <gen>
  • Dragon Blood increase
    • Events
    • Conditions
    • Actions
      • Unit Group - Pick every unit in db_group and do (Actions)
        • Loop - Actions
          • Set db_unit = (Picked unit)
          • Set db_i = (Custom value of db_unit)
          • Unit - Set level of Dragon Blood (spell book) for db_unit to ((Level of Dragon Blood (spell book) for db_unit) + 1)
  • Dragon Blood decrease
    • Events
    • Conditions
    • Actions
      • Unit Group - Pick every unit in db_group and do (Actions)
        • Loop - Actions
          • Set db_unit = (Picked unit)
          • Set db_i = (Custom value of db_unit)
          • Unit - Set level of Dragon Blood (spell book) for db_unit to ((Level of Dragon Blood (spell book) for db_unit) - 1)
  • Dragon Blood lifecheck
    • Events
    • Conditions
    • Actions
      • For each (Integer A) from 1 to 12, do (Actions)
        • Loop - Actions
          • Set db_life[db_i] = ((Max life of db_unit) - ((Max life of db_unit) x (((Real((Integer A))) x 8.00) / 100.00)))
The trigger 'Dragon Blood lifecheck' does updating the variable 'db_life[db_i]' based on the hero's max life in the game, but these triggers 'Dragon Blood increase' and 'Dragon Blood decrease' still functioning based on the hero's max life in the trigger 'Dragon Blood setup', and not on 'Dragon Blood lifecheck', how should I fix that...?

Thanks in advance... :)
 

Uncle

Warcraft Moderator
Level 70
Joined
Aug 10, 2018
Messages
7,394
I wouldn't use this design. Just use a Periodic Interval or Timer that checks the status of your Berserker Blood unit(s) every 0.25 second or so. Then update the values of the Berserker Blood abilities according to your unit's current life.

In version 1.31+ we can toss out the Spellbook/Set level design and modify ability fields directly through triggers. An example can be found here:
So your unit would be given hidden Attack Speed/Attack Damage abilities and you would modify their field values directly instead of messing with ability level.
 
Level 1
Joined
Jan 7, 2022
Messages
2
So, in this case, where is the cause of the problem (for this design)...?

I wouldn't use this design. Just use a Periodic Interval or Timer that checks the status of your Berserker Blood unit(s) every 0.25 second or so. Then update the values of the Berserker Blood abilities according to your unit's current life.
This seems a very preferable alternative, I like the simplicity of it... Anyway, let just say there will be more custom units with the same spell, and the lifecheck will be performed every 0.1 second, how many of them can be handle without affecting game performance...?

In version 1.31+ we can toss out the Spellbook/Set level design and modify ability fields directly through triggers. An example can be found here:
So your unit would be given hidden Attack Speed/Attack Damage abilities and you would modify their field values directly instead of messing with ability level.
I'm still playing the old version ones, v1.27... XD
But thanks for the reply...
 

Uncle

Warcraft Moderator
Level 70
Joined
Aug 10, 2018
Messages
7,394
So, in this case, where is the cause of the problem (for this design)...?


This seems a very preferable alternative, I like the simplicity of it... Anyway, let just say there will be more custom units with the same spell, and the lifecheck will be performed every 0.1 second, how many of them can be handle without affecting game performance...?


I'm still playing the old version ones, v1.27... XD
But thanks for the reply...
You won't notice a change in performance, you're only checking life totals and possibly changing ability levels.
Edit: I guess I shouldn't say this so definitively. You more than likely won't notice a change.
 
Last edited:
Status
Not open for further replies.
Top