Spellpack Hero: Mogul Kahn

ReVolver

Mega Super Ultra Cool Member
Reaction score
609
BTNChaosGrom.gif
In the war of Humans and Orcs that occured long ago many Orcish warriors were corrupted by demonic influence and became tools of blackest darkness. One such warrior was the leader of the Half-Tribe of the Bloodied Axe Clan; Mogul Kahn. Mogul was slain by human Paladins but mysteriously was seen fighting alongside the Scourge around the time Mannoroth started to command the Orcs in the war against Archimonde. The Axe has been revived by demons and uses his reflexes and powerful blows to hunt down and seek out the Sentinels' agile warriors and cut them down to size, even projecting his lust for war onto them.​

Implement Instructions:
-Requires NewGen World Editor
-Kattana's Handle Variables


Spells:

BTN_BerserkerCall.gif
Berserker's Call​
beserkerscallwi4.jpg


JASS:
scope BerserkersCall

//===========================================================================
//  Mogul Kahn's Berserker's Call
//  Description: Mogul Kahn focuses all of his enemies' hatred on him, causing them to attack him at all costs.
//          300 AoE.
//      Level 1 - 1.5 seconds, 5 bonus armor.
//      Level 2 - 2 seconds, 10 bonus armor.
//      Level 3 - 2.5 seconds, 15 bonus armor.
//      Level 4 - 3 seconds, 20 bonus armor. 
//
//  Author: Orc_Tamer
//  Date: 07.December.2007
//
//  You will need:
//  Berserker's Call Ability 'A003'
//  Berserker's Call Buff 'B002'
//  Berserker's Call Item Armor Bonus Ability 'A004'
//
//===========================================================================

globals
    private integer SpellID = 'A003'
    private integer Armor = 'A004'
    private unit Axe
    private real AoE = 300
    private real Wait
endglobals

private function Conditions takes nothing returns boolean
    return GetSpellAbilityId() == SpellID
endfunction

private function BUnit takes nothing returns boolean
    return GetBooleanAnd( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(Axe)) == true, IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction

private function AttackAxe takes nothing returns nothing
    if UnitHasBuffBJ(GetFilterUnit(),'B002') == true then
    call IssueTargetOrder(GetEnumUnit(), "attack", Axe)
    endif
endfunction

private function Actions takes nothing returns nothing
    local timer t = CreateTimer()
    local group g = CreateGroup()
    local unit tmpUnit
    set Axe = GetTriggerUnit()
    call GroupEnumUnitsInRange(g, GetUnitX(Axe), GetUnitY(Axe), AoE, Condition(function BUnit))
        loop
        set tmpUnit = FirstOfGroup(g)
        exitwhen (tmpUnit == null)
        call IssueTargetOrder(tmpUnit, "attack", Axe)
        call TimerStart(t,.5,true,function AttackAxe)
        call GroupRemoveUnit(g, tmpUnit)
     endloop
    set Wait = 1 + .5*GetUnitAbilityLevel(Axe,SpellID)
    call UnitAddAbility(Axe,Armor)
    call SetUnitAbilityLevel(Axe,Armor, GetUnitAbilityLevel(Axe,SpellID))
    call DisableTrigger( GetTriggeringTrigger() )
    call PolledWait(Wait)
    call PauseTimer(t)
    call DestroyTimer(t)
    call UnitRemoveAbility(Axe, Armor)
    set Axe = null
    call EnableTrigger( GetTriggeringTrigger())
    call DestroyGroup(g)
endfunction

public function InitTrig takes nothing returns nothing
    local trigger t = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( t, Condition( function Conditions ) )
    call TriggerAddAction( t, function Actions )
endfunction

endscope


BTNIncinerate.gif
Battle Hunger​
battlehungertx8.jpg


JASS:
scope BattleHunger
//===========================================================================
//  Mogul Kahn's Battle Hunger
//  Description: Afflicts a target with a terrible killing hunger. The target will take damage per second until it kills a unit.
//      Level 1 - 15 damage/second, lasts 10 seconds.
//      Level 2 - 20 damage/second, lasts 15 seconds.
//      Level 3 - 25 damage/second, lasts 20 seconds.
//      Level 4 - 30 damage/second, lasts 25 seconds. 
//
//  Author: Orc_Tamer
//  Date: 07.December.2007
//
//  You will need:
//  Battle Hunger Ability 'A002'
//  Battle Hunger Buff 'B001'
//  RemoveHunger Trigger
//
//===========================================================================

globals
    private integer SpellID = 'A002' //Battle Hunger's Spell Raw Code
    private integer BuffID = 'B001' //Battle Hunger's Buff Raw Code
    private real Duration = 5 //This is the base number for the equation #+5*Level of Battle Hunger
    private real Damage = 10 //This is the base number for the equation #+5*Level of Battle Hunger
endglobals

private function Conditions takes nothing returns boolean
    return GetSpellAbilityId() == SpellID
endfunction

private function HungerDamage takes nothing returns nothing
    local timer t = GetExpiredTimer()
    local unit c = GetHandleUnit(t,"victim")
    local unit tg = GetHandleUnit(t,"source")
    local integer time = GetHandleInt(t, "update")
    local integer d = GetHandleInt(t,"duration")
    if UnitHasBuffBJ(c, BuffID) == true and IsUnitAliveBJ(c) == true then
    call UnitDamageTarget(tg, c,Damage+5*GetUnitAbilityLevel(tg,SpellID), true, true, ATTACK_TYPE_MAGIC, DAMAGE_TYPE_NORMAL, null)
    call SetHandleReal(t, "duration", d-1)
    endif
    if (d <= 1) or IsUnitAliveBJ(c) == false or UnitHasBuffBJ(c, BuffID) == false then
    call FlushHandleLocals(t)
    call DestroyTimer(t)
    set t = null
    set c = null
    set tg = null
    endif
endfunction

private function Actions takes nothing returns nothing
    local timer t = CreateTimer()
    local unit c = GetTriggerUnit()
    local unit tg = GetSpellTargetUnit()
    local integer time = 1
    local integer d = R2I(Duration+5*GetUnitAbilityLevel(tg,SpellID))
    call SetHandleHandle(t, "victim", tg)
    call SetHandleHandle(t, "source", c)
    call SetHandleInt(t, "update", time)
    call SetHandleInt(t, "duration",d)
    call TimerStart(t, time, true, function HungerDamage)
endfunction

public function InitTrig takes nothing returns nothing
    local trigger t = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( t, Condition( function Conditions ) )
    call TriggerAddAction( t, function Actions )
endfunction

endscope


BTNStaffOfSanctuary.gif
Counter Helix​
counterhelixww9.jpg


JASS:
scope CounterHelix

//===========================================================================
//  Mogul Kahn's Counter Helix
//  Description: Mogul Kahn counters some blows made to him dealing damage to all nearby enemy units.
//      Level 1 - 15% chance to counter with 100 damage.
//      Level 2 - 15% chance to counter with 125 damage.
//      Level 3 - 15% chance to counter with 150 damage.
//      Level 4 - 15% chance to counter with 175 damage.
//
//  Author: Orc_Tamer
//  Date: 07.December.2007
//
//  You will need:
//  Counter Helix Ability 'A000'
//  Counter Helix Buff 'B000'
//  Remove Hunger Trigger
//
//===========================================================================

globals
    private integer SpellID = 'A000'
    private integer BuffID = 'B000'
    private integer Damage = 100
    private integer Radius = 300
    private integer Chance = 15
    private string SpellEffect = "Abilities\\Spells\\Other\\Stampede\\StampedeMissileDeath.mdl"
endglobals

private function Conditions takes nothing returns boolean
    return GetUnitAbilityLevel(GetTriggerUnit(),BuffID) > 0
    return GetRandomInt(1,100) <= Chance
endfunction

private function IsAttackedEnemy takes nothing returns boolean
    return IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(GetTriggerUnit())) == true and IsUnitAliveBJ(GetFilterUnit()) == true
endfunction

private function Actions takes nothing returns nothing
    local unit  attacked = GetTriggerUnit()
    local group g        = CreateGroup()
    local unit  tmpUnit
     call GroupEnumUnitsInRange(g, GetUnitX(attacked), GetUnitY(attacked), Radius, Condition(function IsAttackedEnemy))
     call SetUnitAnimation(attacked, "spin")
     loop
        set tmpUnit = FirstOfGroup(g)
        exitwhen (tmpUnit == null)
        call UnitDamageTarget(attacked, tmpUnit, Damage+25*GetUnitAbilityLevel(attacked,SpellID), true, true, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL, null)
        call DestroyEffect(AddSpecialEffectTarget(SpellEffect, tmpUnit,"chest"))
        call GroupRemoveUnit(g, tmpUnit)
     endloop
     call DisableTrigger(GetTriggeringTrigger())
     call TriggerSleepAction(.6)
     call SetUnitAnimation(attacked, "stand")
     call EnableTrigger(GetTriggeringTrigger())
     call DestroyGroup(g)
     set attacked = null
     set tmpUnit  = null
     set g        = null
endfunction

public function InitTrig takes nothing returns nothing
    local trigger t = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_ATTACKED )
    call TriggerAddCondition( t, Condition( function Conditions ) )
    call TriggerAddAction( t, function Actions )
endfunction

endscope



BTNOrcMeleeUpThree.gif
Culling Blade​
cullingbladero8.jpg


JASS:
scope CullingBlade

//===========================================================================
//  Mogul Kahn's Culling Blade
//  Description: Purges the weak from Mogul Kahn's sight. Deals moderate damage, but will kill a target that is low on life.
//      Level 1 - Deals 150 damage, will kill if target is below 300.
//      Level 2 - Deals 250 damage, will kill if target is below 450.
//      Level 3 - Deals 300 damage, will kill if target is below 625. 
//
//  Author: Orc_Tamer
//  Date: 07.December.2007
//
//  You will need:
//  Culling Blade Ability 'A001'
//
//===========================================================================

globals
        private integer SpellID = 'A001'
endglobals

private function Conditions takes nothing returns boolean
    return GetSpellAbilityId() == SpellID 
endfunction

private function Actions takes nothing returns nothing
    local unit caster = GetTriggerUnit()
    local unit target = GetSpellTargetUnit()
    if  GetUnitState(target,UNIT_STATE_LIFE) <= 300 and GetUnitAbilityLevel(caster,SpellID) == 1 then
    call UnitDamageTarget(caster,target,10000000.,true,true, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_UNKNOWN,WEAPON_TYPE_WHOKNOWS)
    elseif GetUnitAbilityLevel(caster,SpellID) == 1 then
    call SetUnitLifeBJ( target, ( GetUnitStateSwap(UNIT_STATE_LIFE, target) - 150.00 ) )    
    endif
    if  GetUnitState(target,UNIT_STATE_LIFE) <= 450 and GetUnitAbilityLevel(caster,SpellID) == 2 then
    call UnitDamageTarget(caster,target,10000000.,true,true, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_UNKNOWN,WEAPON_TYPE_WHOKNOWS)
    elseif GetUnitAbilityLevel(caster,SpellID) == 2 then
    call SetUnitLifeBJ( target, ( GetUnitStateSwap(UNIT_STATE_LIFE, target) - 250.00 ) )    
    endif
    if  GetUnitState(target,UNIT_STATE_LIFE) <= 625 and GetUnitAbilityLevel(caster,SpellID) == 3 then
    call UnitDamageTarget(caster,target,10000000.,true,true, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_UNKNOWN,WEAPON_TYPE_WHOKNOWS)
    elseif GetUnitAbilityLevel(caster,SpellID) == 3 then
    call SetUnitLifeBJ( target, ( GetUnitStateSwap(UNIT_STATE_LIFE, target) - 300.00 ) )    
    endif
    set caster = null
    set target = null
    endfunction

public function InitTrig takes nothing returns nothing
    local trigger t = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( t, Condition( function Conditions ) )
    call TriggerAddAction( t, function Actions )
endfunction

endscope
 

Attachments

  • DotA Axe.w3x
    28.4 KB · Views: 322

waaaks!

Zinctified
Reaction score
256
bersekrer's call
emjlr3 already made this but its in gui
u can optimize the code

JASS:
scope BerserkersCall

//===========================================================================
//  Mogul Kahn's Berserker's Call
//  Description: Mogul Kahn focuses all of his enemies' hatred on him, causing them to attack him at all costs.
//          300 AoE.
//      Level 1 - 1.5 seconds, 5 bonus armor.
//      Level 2 - 2 seconds, 10 bonus armor.
//      Level 3 - 2.5 seconds, 15 bonus armor.
//      Level 4 - 3 seconds, 20 bonus armor.
//
//  Author: Orc_Tamer
//  Date: 07.December.2007
//
//  You will need:
//  Berserker's Call Ability 'A003'
//  Berserker's Call Buff 'B002'
//  Berserker's Call Item Armor Bonus Ability 'A004'
//
//===========================================================================

globals
    private integer SpellID = 'A003'
    private integer Armor = 'A004'
    private unit Axe
    private real AoE = 300
    private real fac = 5
endglobals

private function Conditions takes nothing returns boolean
    return GetSpellAbilityId() == SpellID
endfunction

private function BUnit takes nothing returns boolean
    return GetBooleanAnd( IsUnitEnemy(GetFilterUnit(), GetOwningPlayer(Axe)) == true, IsUnitAliveBJ(GetFilterUnit()) == true )
endfunction

private function AttackAxe takes nothing returns nothing
    if UnitHasBuffBJ(GetFilterUnit(),'B002') == true then
    call IssueTargetOrder(GetEnumUnit(), "attack", Axe)
    endif
endfunction

private function Actions takes nothing returns nothing
    local timer t = CreateTimer()
    local group g = CreateGroup()
    local unit tmpUnit
    local integer l
    local real wait
    set Axe = GetTriggerUnit()
    set l = GetUnitAbilityLevel(Axe, 'A003')
    set wait = 1 + (5*l)
    call GroupEnumUnitsInRange(g, GetUnitX(Axe), GetUnitY(Axe), AoE, Condition(function BUnit))
        loop
         set tmpUnit = FirstOfGroup(g)
         exitwhen (tmpUnit == null)
         call IssueTargetOrder(tmpUnit, "attack", Axe)
         call TimerStart(t,.5,true,function AttackAxe)
         call GroupRemoveUnit(g, tmpUnit)
        endloop
    call UnitAddAbility(Axe,Armor)
    call SetUnitAbilityLevel(Axe,Armor, GetUnitAbilityLevel(Axe,SpellID))
    call DisableTrigger( GetTriggeringTrigger() )
    call PolledWait(wait)
    call PauseTimer(t)
    call DestroyTimer(t)
    call UnitRemoveAbility(Axe, Armor)
    set Axe = null
    call EnableTrigger( GetTriggeringTrigger())
    call DestroyGroup(g)
endfunction

public function InitTrig takes nothing returns nothing
    local trigger t = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_SPELL_EFFECT )
    call TriggerAddCondition( t, Condition( function Conditions ) )
    call TriggerAddAction( t, function Actions )
endfunction

endscope


EDIT: for battle hunger, wheres the trigger where it removes the buff when it kills a unit?
counter helix, emjlr3 already made it, but still in GUI
also for culling blade

anyways good job
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
This is more likely a compact version of every spell. Since this hero's spells are easy to be made, most of it had been made by others.
 

ReVolver

Mega Super Ultra Cool Member
Reaction score
609
Isn't berserker's call just a taunt with armor bonus?

The real version was not made using taunt, I guess it will be abusive/imbalanced or something.
 

darkRae

Ueki Fan (Ueki is watching you)
Reaction score
173
If Berserker's Call were just a plain Taunt, units could be ordered again after getting Taunted.
Taunt just orders units to attack the caster (<- can be canceled by re-ordering the units)
 

waaaks!

Zinctified
Reaction score
256
i used taunt last time, and u know what...all of my enemy creeps keep on attacking me even im in my base...not like berserker's call
 

darkRae

Ueki Fan (Ueki is watching you)
Reaction score
173
^That's because they are ordered to attack you, and since they have to chase you to attack, then they're following you.

(wait, unless you're saying that you're in your base, and ALL creeps in the map began to chase you)
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
>>i used taunt last time, and u know what...all of my enemy creeps keep on attacking me even im in my base...not like berserker's call
Isn't there is a place you may modify for range and duration?
 

PurgeandFire

zxcvmkgdfg
Reaction score
509
Nice, but I think you should remove the BJs and use structs instead of handles for easier implementation.
 

hell_knight

Playing WoW
Reaction score
126
From first glance I see a flaw, you see that ogre magi? He auto casted his bloodlust.
Thats the first bug xD , I've seen qutie a few of these think emj3 made one?
I think in dota , they made it if a unit is issued anything but attack , it is re-ordered to attack.
 

Sim

Forum Administrator
Staff member
Reaction score
534
>I think in dota , they made it if a unit is issued anything but attack , it is re-ordered to attack.

Exactly.

> Isn't berserker's call just a taunt with armor bonus?

It is not the same as Taunt.

First of all Taunt has no duration: it lasts indefinitely. Until the unit is re-ordered. That would explain creeps chasing one of the above posters.

Second, Taunt can be canceled (as explained above).
 

ReVolver

Mega Super Ultra Cool Member
Reaction score
609
I forgot to add a trigger the map, it's been updated, right know I'm trying to optimize some of my triggers.
 

Tinki3

Special Member
Reaction score
418
I've already made Counter Helix and Culling Blade (check my sig under "3 DotA spells, 4 customs) :p.

Only major difference - your versions are in JASS, with my version of Counter Helix not MUI (not "so" MUI, anyway).

It's good having Axe's spells all in one thread/spellpack, but if I recall, the rules say don't make what's been made before.

We could probably let you off anyway :p
 

~GaLs~

† Ғσſ ŧħə ѕαĸε Φƒ ~Ğ䣚~ †
Reaction score
180
1. You had alot of BJs usage in your code, get rid of it.
2. Your battlehunger can be canceled? I don't see the category of killing unit removes the effect in your code.
 

soulreaping

New Member
Reaction score
17
Another one?
Meh, stop making this hero it is so boring and easy to make.

Also, why the hell you use local handle vars when you use NewGen and use struct attachment which is much faster?
 

emjlr3

Change can be a good thing
Reaction score
395
it should be noted that neither Counter Helix or Berserk's Call are MUI

and please, quit with the Kattanas, they are so 2004.....
 

ReVolver

Mega Super Ultra Cool Member
Reaction score
609
it should be noted that neither Counter Helix or Berserk's Call are MUI

and please, quit with the Kattanas, they are so 2004.....

Yea, I learned Kattana a little too late >< What do you suggest me to know in order to attach units to a timer? ect?
 

Trollvottel

never aging title
Reaction score
262
dont attach units to the timer, attach a struct containing the unit to the timer, there are many struct attachment systems out there (TT,ABCT, ABC etc...)
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      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