[Help] New Jahrakal Fervor Ability

TheDeadFight

New Member
Reaction score
1
When Jah'rakal engages an opponent, his animalistic nature grants him even greater proficiency in single combat. With each continuous blow on the same target, Jah'rakal gains understanding of the prey's defenses, and guides each strike with greater ease than the last.

68557895.jpg


Please make this spell with JASS for v 1.24b

I need this spell for my maps :D
 

TheDeadFight

New Member
Reaction score
1
just add it into my map =_=

you know, i want to create hero based on "Sentinel Archer". I think jahrakal fervor skill would be nice with her.
 

kingkingyyk3

Visitor (Welcome to the Jungle, Baby!)
Reaction score
216
Ability Required : Item Attack Speed Bonus, set it to 5% increase per level. Total 20 levels.

JASS:
scope Fervor initializer Init

    globals
        private constant integer ABIL_ID = 'A000'
        private constant integer ATTACK_SPEED_ID = 'A001'
    endglobals
    
    
    private struct Data
        unit cs
        integer stacklevel
        unit lasttarg

        method onDestroy takes nothing returns nothing
            set this.lasttarg = null
        endmethod
        //! runtextmacro PUI()
    endstruct
    
    private function Act2 takes nothing returns nothing
        local Data d = Data[GetAttacker()]
        if d.lasttarg == GetTriggerUnit() then
            set d.stacklevel = d.stacklevel + GetUnitAbilityLevel(d.cs,ABIL_ID)
        else
            set d.stacklevel = d.stacklevel / 2
            set d.lasttarg = GetTriggerUnit()
        endif
        call SetUnitAbilityLevel(d.cs,ATTACK_SPEED_ID,d.stacklevel)
    endfunction
    
    private function Cond2 takes nothing returns boolean
        return Data[GetAttacker()] != 0
    endfunction
    
    private function Act takes nothing returns nothing
        local Data d = Data.create()
        set d.cs = GetTriggerUnit()
        set d.stacklevel = 1
        call UnitAddAbility(d.cs,ATTACK_SPEED_ID)
        set Data[d.cs] = d
    endfunction
    
    private function Cond takes nothing returns boolean
        return GetUnitAbilityLevel(GetTriggerUnit(),ABIL_ID) == 1
    endfunction
    
    private function Init takes nothing returns nothing
        local trigger t 
        
        set t = CreateTrigger()
        call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_HERO_SKILL)
        call TriggerAddCondition(t,Condition(function Cond))
        call TriggerAddAction(t,function Act)
        
        set t = CreateTrigger()
        call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_ATTACKED)
        call TriggerAddCondition(t,Condition(function Cond2))
        call TriggerAddAction(t,function Act2)
    endfunction
    
endscope

Requires : PUI (Click Me!)
 

Tom_Kazansky

--- wraith it ! ---
Reaction score
157
Here is a GUI version, non-MUI but it shows you how this skill is made :)

Trigger:
  • Fervor Learn
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Fervor
    • Actions
      • Set Fervor_Caster = (Triggering unit)
      • Set Fervor_Level = (Level of Fervor for Fervor_Caster)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Fervor_Level Equal to 1
        • Then - Actions
          • Set Fervor_Target = No unit
          • Unit - Set level of Fervor AS bonus for Fervor_Caster to 1
          • -------- event: "notices a target in range" occurs just a little bit before "a unit is attacked" --------
          • Trigger - Add to Fervor Attack <gen> the event (Unit - Fervor_Caster Notices a target in range)
          • -------- generic unit event takes 16 handles, specific unit event takes onle ONE handle --------
          • -------- if you don't get what I mean, just trust me, it's better --------
        • Else - Actions


Trigger:
  • Fervor Attack
    • Events
    • Conditions
    • Actions
      • Set TempUnit = (Targeted unit)
      • -------- --- fisrt time attack after learning the spell, the target should be no unit --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Fervor_Target Equal to No unit
        • Then - Actions
          • Set Fervor_Target = TempUnit
          • -------- first attack, so no need to go any further --------
          • Skip remaining actions
        • Else - Actions
      • -------- ---------- --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • Fervor_Target Equal to TempUnit
        • Then - Actions
          • -------- continuously attack --------
          • -------- every continuous attack gives 5/10/15/20% AS --------
          • -------- each level of "AS bonus ability" gives 5% AS --------
          • -------- so the "leveljump" should equal to the level of Fervor --------
          • -------- as I have said before, at level 1 the "AS bonus ability" gives 0% AS, so the actual level should plus 1 --------
          • Set TempInt = ((Level of Fervor AS bonus for Fervor_Caster) - 1)
          • Unit - Set level of Fervor AS bonus for Fervor_Caster to ((TempInt + Fervor_Level) + 1)
        • Else - Actions
          • -------- changed target --------
          • Set Fervor_Target = TempUnit
          • -------- once again, level 1 gives 0% AS bonus --------
          • Set TempInt = ((Level of Fervor AS bonus for Fervor_Caster) - 1)
          • -------- dropped by half --------
          • Set TempInt = (TempInt / 2)
          • Unit - Set level of Fervor AS bonus for Fervor_Caster to (TempInt + 1)
      • -------- the line below is a debug, delete if not needed --------
      • Game - Display to (All players) the text: (AS bonus abi level = + (String((Level of Fervor AS bonus for Fervor_Caster))))


and the demo map attached below
 

Attachments

  • [Spell] Fervor.w3x
    45.2 KB · Views: 347

TheDeadFight

New Member
Reaction score
1
Ability Required : Item Attack Speed Bonus, set it to 5% increase per level. Total 20 levels.

JASS:

scope Fervor initializer Init

    globals
        private constant integer ABIL_ID = 'A000'
        private constant integer ATTACK_SPEED_ID = 'A001'
    endglobals
    
    
    private struct Data
        unit cs
        integer stacklevel
        unit lasttarg

        method onDestroy takes nothing returns nothing
            set this.lasttarg = null
        endmethod
        //! runtextmacro PUI()
    endstruct
    
    private function Act2 takes nothing returns nothing
        local Data d = Data[GetAttacker()]
        if d.lasttarg == GetTriggerUnit() then
            set d.stacklevel = d.stacklevel + GetUnitAbilityLevel(d.cs,ABIL_ID)
        else
            set d.stacklevel = d.stacklevel / 2
            set d.lasttarg = GetTriggerUnit()
        endif
        call SetUnitAbilityLevel(d.cs,ATTACK_SPEED_ID,d.stacklevel)
    endfunction
    
    private function Cond2 takes nothing returns boolean
        return Data[GetAttacker()] != 0
    endfunction
    
    private function Act takes nothing returns nothing
        local Data d = Data.create()
        set d.cs = GetTriggerUnit()
        set d.stacklevel = 1
        call UnitAddAbility(d.cs,ATTACK_SPEED_ID)
        set Data[d.cs] = d
    endfunction
    
    private function Cond takes nothing returns boolean
        return GetUnitAbilityLevel(GetTriggerUnit(),ABIL_ID) == 1
    endfunction
    
    private function Init takes nothing returns nothing
        local trigger t 
        
        set t = CreateTrigger()
        call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_HERO_SKILL)
        call TriggerAddCondition(t,Condition(function Cond))
        call TriggerAddAction(t,function Act)
        
        set t = CreateTrigger()
        call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_ATTACKED)
        call TriggerAddCondition(t,Condition(function Cond2))
        call TriggerAddAction(t,function Act2)
    endfunction
    
endscope

Requires : PUI (Click Me!)

my triggers is errors

JASS:
scope Fervor initializer Init

    globals
        private constant integer ABIL_ID = 'A01D'
        private constant integer ATTACK_SPEED_ID = 'A001'
    endglobals
    
    
    private struct Data
        unit cs
        integer stacklevel
        unit lasttarg

        method onDestroy takes nothing returns nothing
            set this.lasttarg = null
        endmethod
        //! runtextmacro PUI()
    endstruct
    
    private function Act2 takes nothing returns nothing
        local Data d = Data[GetAttacker()]
        if d.lasttarg == GetTriggerUnit() then
            set d.stacklevel = d.stacklevel + GetUnitAbilityLevel(d.cs,ABIL_ID)
        else
            set d.stacklevel = d.stacklevel / 2
            set d.lasttarg = GetTriggerUnit()
        endif
        call SetUnitAbilityLevel(d.cs,ATTACK_SPEED_ID,d.stacklevel)
    endfunction
    
    private function Cond2 takes nothing returns boolean
        return Data[GetAttacker()] != 0
    endfunction
    
    private function Act takes nothing returns nothing
        local Data d = Data.create()
        set d.cs = GetTriggerUnit()
        set d.stacklevel = 1
        call UnitAddAbility(d.cs,ATTACK_SPEED_ID)
        set Data[d.cs] = d
    endfunction
    
    private function Cond takes nothing returns boolean
        return GetUnitAbilityLevel(GetTriggerUnit(),ABIL_ID) == 1
    endfunction
    
    private function Init takes nothing returns nothing
        local trigger t 
        
        set t = CreateTrigger()
        call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_HERO_SKILL)
        call TriggerAddCondition(t,Condition(function Cond))
        call TriggerAddAction(t,function Act)
        
        set t = CreateTrigger()
        call TriggerRegisterAnyUnitEventBJ(t,EVENT_PLAYER_UNIT_ATTACKED)
        call TriggerAddCondition(t,Condition(function Cond2))
        call TriggerAddAction(t,function Act2)
    endfunction
    
endscope

//===========================================================================
function InitTrig_Focus_Fire takes nothing returns nothing
    set gg_trg_Focus_Fire = CreateTrigger(  )
    call TriggerAddAction( gg_trg_Focus_Fire, function Trig_Focus_Fire_Actions )
endfunction


can you fix it or give me demo file please ? :banghead::banghead:
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top