• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Lina's Fiery Soul skill

Status
Not open for further replies.
Level 1
Joined
Dec 9, 2020
Messages
6
Hello ppl, i need help with this particular spell (bloodlust like effect when caster casts something), how does this spell work? i know it uses a dummy to cast bloodlust on the caster when it uses spells, but how does the stacking part work? because i remember trying to replicate this spell before but it never stacked pretty much, is there a way to make it work?

here's a ss of the tooltip of said ability btw.

siu.png


Thanks in advance :]
 
Level 21
Joined
Mar 29, 2020
Messages
1,237
this is one way to do it:

 
Level 1
Joined
Dec 9, 2020
Messages
6
this is one way to do it:

heeeey, thanks for the help buddy, but i dont seem to get it, all that variable stuff for example is killing me
maybe im too novice still to do this kind of stuff, oh well u_u appreciate the help tho!
 
If you use version 1.31+, you can use New Bonus [vJASS][LUA] and add timed bonuses each time, probably cast a dummy spell to give buff, or add an aura that only target self (that has no effect) that gives buff/effect, that you remove after time has expired.

In essence, New Bonus sets values of item-abilities (+damage, +attack speed, etc. abilities) that are added to units, and then use the 1.31 natives to set the amounts.
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,596
Attached a map with a spell that's identical to DotA 2's Fiery Soul. It will work for multiple players but only 1 Hero per player (MPI).

The issue with using Bloodlust is that it can be dispelled. That or stolen from spellbreakers. Fiery Soul is intended to be a passive bonus that cannot be dispelled and even persists through death (if somehow the Hero were to revive prior to the 10 second duration expiring).

Requires the latest version (1.32+).
 

Attachments

  • Fiery Soul 1.w3m
    21.2 KB · Views: 13
Level 1
Joined
Dec 9, 2020
Messages
6
Those seem to be neat solutions (especially the map Uncle did, wow!)
But, since im playing in an older version which is 1.29, its probably unlikely that i would be able to use em, which is a damn shame :[ idk if there's another way (would ask, but i would feel like im asking too much already) but again, the help you offered is greatly appreciated guys, thanks!
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,596
Unfortunate, I'm not sure what is available in 1.29 in order to make this spell work properly. Here are the triggers anyway:
  • Fiery Soul Learn
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Fiery Soul
    • Actions
      • Set VariableSet FS_PN = (Player number of (Owner of (Triggering unit)))
      • -------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Learned skill level) Equal to 1
        • Then - Actions
          • Set VariableSet FS_Hero[FS_PN] = (Triggering unit)
        • Else - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • FS_Stacks[FS_PN] Greater than 0
            • Then - Actions
              • -------- Add and adjust the as/ms ability: --------
              • Set VariableSet FS_Level[FS_PN] = (Learned skill level)
              • Set VariableSet FS_Real = (0.25 + ((Real(FS_Level[FS_PN])) x 0.15))
              • Ability - Set Ability: (Unit: FS_Hero[FS_PN]'s Ability with Ability Code: Fiery Soul (AS/MS))'s Real Level Field: Attack Speed Increase (%) ('Oae2') of Level: 0 to (FS_Real x (Real(FS_Stacks[FS_PN])))
              • Set VariableSet FS_Real = (0.04 + ((Real(FS_Level[FS_PN])) x 0.01))
              • Ability - Set Ability: (Unit: FS_Hero[FS_PN]'s Ability with Ability Code: Fiery Soul (AS/MS))'s Real Level Field: Movement Speed Increase (%) ('Oae1') of Level: 0 to (FS_Real x (Real(FS_Stacks[FS_PN])))
              • Unit - For (Triggering unit), Ability Fiery Soul (AS/MS), Disable ability: True, Hide UI: True
              • Unit - For (Triggering unit), Ability Fiery Soul (AS/MS), Disable ability: False, Hide UI: False
            • Else - Actions
  • Fiery Soul Gain Stack
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • Or - Any (Conditions) are true
        • Conditions
          • (Ability being cast) Equal to Thunder Clap
          • (Ability being cast) Equal to Storm Bolt
    • Actions
      • Set VariableSet FS_PN = (Player number of (Triggering player))
      • Set VariableSet FS_Level[FS_PN] = (Level of Fiery Soul for (Triggering unit))
      • -------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • FS_Level[FS_PN] Greater than 0
        • Then - Actions
          • -------- This will start or reset the timer: --------
          • Countdown Timer - Start FS_Timer[FS_PN] as a One-shot timer that will expire in 10.00 seconds
          • -------- --------
          • -------- Increase # of stacks: --------
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • FS_Stacks[FS_PN] Less than 3
            • Then - Actions
              • Set VariableSet FS_Stacks[FS_PN] = (FS_Stacks[FS_PN] + 1)
            • Else - Actions
          • -------- --------
          • -------- Add and adjust the as/ms ability: --------
          • Unit - Add Fiery Soul (AS/MS) to FS_Hero[FS_PN]
          • Set VariableSet FS_Real = (0.25 + ((Real(FS_Level[FS_PN])) x 0.15))
          • Ability - Set Ability: (Unit: FS_Hero[FS_PN]'s Ability with Ability Code: Fiery Soul (AS/MS))'s Real Level Field: Attack Speed Increase (%) ('Oae2') of Level: 0 to (FS_Real x (Real(FS_Stacks[FS_PN])))
          • Set VariableSet FS_Real = (0.04 + ((Real(FS_Level[FS_PN])) x 0.01))
          • Ability - Set Ability: (Unit: FS_Hero[FS_PN]'s Ability with Ability Code: Fiery Soul (AS/MS))'s Real Level Field: Movement Speed Increase (%) ('Oae1') of Level: 0 to (FS_Real x (Real(FS_Stacks[FS_PN])))
          • Unit - For (Triggering unit), Ability Fiery Soul (AS/MS), Disable ability: True, Hide UI: True
          • Unit - For (Triggering unit), Ability Fiery Soul (AS/MS), Disable ability: False, Hide UI: False
        • Else - Actions
  • Fiery Soul Lose Stacks
    • Events
      • Time - FS_Timer[1] expires
      • Time - FS_Timer[2] expires
      • Time - FS_Timer[3] expires
    • Conditions
    • Actions
      • Custom script: local integer i = 0
      • -------- --------
      • -------- !!!Make sure your Timer Array Size is big enough to support each player!!! --------
      • -------- Get the expired timer # and the Player Number associated with it: --------
      • Custom script: loop
      • Custom script: set i = i + 1
      • Custom script: if (GetExpiredTimer() == udg_FS_Timer[i]) then
      • Custom script: set udg_FS_PN = i
      • Custom script: set i = 0
      • Custom script: endif
      • Custom script: exitwhen i == 0
      • Custom script: endloop
      • -------- --------
      • -------- Remove stacks/ability/buff: --------
      • Set VariableSet FS_Stacks[FS_PN] = 0
      • Unit - Remove Fiery Soul (AS/MS) from FS_Hero[FS_PN]
      • Unit - Remove Fiery Soul buff from FS_Hero[FS_PN]
The Set Ability Real and Disable/Enable Ability For Unit functions are only available in 1.31+. That being said, you could probably replace these actions with something else that works. For example, Endurance Aura with 12 levels could be used to grant the attack speed/movement speed. You'd add it to your hero and set it's level using a formula like: FS_Stacks[FS_PN] + (3 * (Level of Fiery Soul - 1))

Only issue here is that auras have a delay before updating their level and don't apply the stats immediately. You can fix this in version 1.31+ by Disabling/Enabling the ability for the specific unit (Disable For Player doesn't work) but I don't know of a way in 1.29.
 
Last edited:
Level 25
Joined
Sep 26, 2009
Messages
2,390
Since you want v1.29 and the spell increases movement and attack speed, you can use the bit flag approach
  • create X copies of the haste spells.
  • Each copy has only one level and gives 2^n bonus haste. Start from 0 (2^0): therefore first spell should give 1 bonus haste, the second 2 bonus, third 4 bonus, fourth 8 bonus, etc. - the bonus should always be to the power of two (1, 2, 4, 8, 16, 32, 64, 128,...).
    • For example if you have 10 spells, then the last spell should give you 2^9 bonus, which is 512. If you sum the range of numbers from 2^0 to 2^9, you get a total of 1023 - so potentially the spell's max bonus haste could be this 1023.
  • Place all those abilities in an ability array, order them from smallest bonus to largest. Start indexing from 0 instead of 1.
  • The idea here is that when you want to add X bonus haste to your unit upon casting an ability, you take that number X and divide it by 2^n... and depending on the result you want to add or remove from the the unit the ability that matches the ability from abilities array under index 'n'. You do this iteratively for each 2^n you have, from greatest 'n' to smallest
    • If the division result was greater than 0, you add the ability and in further calculation use the division remainder (modulo) of the current number
    • If the division result was 0, you remove the ability and continue
The triggers below are an example for an ability that increases movement speed by 5 each time it is used and will last up to 10 seconds (with a maximum bonus of 120).
The movement speed bonus abilities are all based on the "Item Move Speed Bonus" ability.


  • HasteBonusIni
    • Events
      • Map initialization
    • Conditions
    • Actions
      • Set VariableSet HasteBonusCaster = Rifleman 0000 <gen>
      • -------- -------------------- --------
      • Set VariableSet HasteBonusAbils[0] = Move Speed Bonus (+1)
      • Set VariableSet HasteBonusAbils[1] = Move Speed Bonus (+2)
      • Set VariableSet HasteBonusAbils[2] = Move Speed Bonus (+4)
      • Set VariableSet HasteBonusAbils[3] = Move Speed Bonus (+8)
      • Set VariableSet HasteBonusAbils[4] = Move Speed Bonus (+16)
      • Set VariableSet HasteBonusAbils[5] = Move Speed Bonus (+32)
      • Set VariableSet HasteBonusAbils[6] = Move Speed Bonus (+64)
      • -------- -------------------- --------
      • -------- Is equal to the max index in HasteBonusAbils array --------
      • Set VariableSet HasteBonusMaxIndex = 6
      • -------- -------------------- --------
      • Set VariableSet HasteBonusCurrentBonus = 0
      • Set VariableSet HasteBonusMaxBonus = 120
      • -------- -------------------- --------
      • -------- pre-calculate powers of two --------
      • For each (Integer loopInt) from 0 to HasteBonusMaxIndex, do (Actions)
        • Loop - Actions
          • Set VariableSet powersOfTwo[loopInt] = (Integer((Power(2.00, (Real(loopInt))))))


  • HasteBonusCast
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Berserk
    • Actions
      • Set VariableSet HasteBonusCurrentBonus = (Min(HasteBonusMaxBonus, (HasteBonusCurrentBonus + 5)))
      • Set VariableSet HasteBonusTimeRemaining = 10.00
      • Set VariableSet bonusToCalculate = HasteBonusCurrentBonus
      • Trigger - Run CalculateHasteBonus <gen> (checking conditions)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (HasteBonusPeriodic <gen> is on) Equal to False
        • Then - Actions
          • Trigger - Turn on HasteBonusPeriodic <gen>
        • Else - Actions


  • HasteBonusPeriodic
    • Events
      • Time - Every 0.10 seconds of game time
    • Conditions
    • Actions
      • Set VariableSet HasteBonusTimeRemaining = (HasteBonusTimeRemaining - 0.10)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • HasteBonusTimeRemaining Less than or equal to 0.00
        • Then - Actions
          • Set VariableSet HasteBonusCurrentBonus = 0
          • Set VariableSet bonusToCalculate = 0
          • Trigger - Run CalculateHasteBonus <gen> (checking conditions)
          • Trigger - Turn off (This trigger)
        • Else - Actions


  • CalculateHasteBonus
    • Events
    • Conditions
    • Actions
      • For each (Integer loopInt) from 0 to HasteBonusMaxIndex, do (Actions)
        • Loop - Actions
          • Set VariableSet divisor = powersOfTwo[(HasteBonusMaxIndex - loopInt)]
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • bonusToCalculate Greater than 0
              • (bonusToCalculate / divisor) Greater than 0
            • Then - Actions
              • Set VariableSet bonusToCalculate = (bonusToCalculate mod divisor)
              • Unit - Add HasteBonusAbils[(HasteBonusMaxIndex - loopInt)] to HasteBonusCaster
            • Else - Actions
              • Unit - Remove HasteBonusAbils[(HasteBonusMaxIndex - loopInt)] from HasteBonusCaster



Edit:
Will just add an example calculation.
Let's say the bonus we want to add is 95.
  1. We take the largest divisor 64 (2^6) and check if 95/64 > 0.
    1. It is, so we add ability under index 6 and calculate division remainder
    2. division remainder is 31
  2. We take next divisor 32 (2^5) and check if 31/32 > 0
    1. It is not, so we remove the ability under index 5
  3. We take next divisor 16 (2^4) and check if 31/16 > 0
    1. It is, so we add ability under index 4 and calculate remainder... which is 15
  4. we continue this way until divisor 1 (2^0)
 
Last edited:
Level 1
Joined
Dec 9, 2020
Messages
6
hey again, that seems like it would work! can i perhaps get a test map with that stuff u posted? if it wouldn't be too much to ask of course! thanks for the help m8's :D
 
Level 1
Joined
Dec 9, 2020
Messages
6
aw, thats a shame indeed :[ but no matter, its my fault for playing an older version i suppose, anyways, i will see what i can do with the triggers y'all posted, maybe i can make em work! ty ppl ;]
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,596
In my earlier post I explain how you could do this using an Endurance Aura with 12 levels (4 levels of Fiery Soul * 3 stacks = 12). You could also use Bloodlust if you don't care about the buff being dispellable. My triggers point you in right direction for how this can be handled. You'd just replace all of the fancy 1.32 stuff I'm doing with abilities with whatever approach you choose.

Bloodlust would use a Dummy unit to cast a specific level of Bloodlust on the Caster -> Bloodlust levels 1-3 for Fiery Soul lvl 1, 4-6 for FS 2, 7-9 for FS 3, and 10-12 for FS 4. If you're unsure of how to do that I suggest looking up tutorials on using Dummy units, there's 100's of examples on this site.
 
Status
Not open for further replies.
Top