[Request]Holy Axe

GameOver[GR]

New Member
Reaction score
11
i thought about an ability which will be nice for my map so i need some help here.

Ability Information
Holy Axe is an ability [Active] a unit casts this ability [it targets only heroes ( enemies)] stun enemy for 3 seconds and damage him for 30 % of the target's full hitpoints .If target has equal or less than 30 % when ability casted on him then kill hero instand.

Thanks Very Much.
 

Larcenist

REP: Respect, Envy, Prosperity?
Reaction score
211
Goddamnit, this isn't a place for you to request stuff.

So all the people requesting spells and ideas daily are doing so against the rules? If someone is willing to make the actual requests what's the problem?

A suggestion though would be to make a request thread where you post all your requests rather than one thread for each request, just to avoid flooding.

As for the spell, base it off of storm bolt and use this:

JASS:
function Holy_Axe_GetSpellId takes nothing returns integer
    return 'A000'    //Raw ID of your Holy Axe spell
endfunction

function Trig_Holy_Axe_Conditions takes nothing returns boolean
    return GetSpellAbilityId() == Holy_Axe_GetSpellId()
endfunction

function Trig_Holy_Axe_Actions takes nothing returns nothing
    local unit u = GetTriggerUnit()
    local unit t = GetSpellTargetUnit()
    local real State = GetUnitState(t, UNIT_STATE_LIFE)
    local real CheckState = GetUnitState(t, UNIT_STATE_MAX_LIFE) * .3
    if State <= CheckState then
        call UnitDamageTarget(u, t, 9999999., true, false, ATTACK_TYPE_HERO, DAMAGE_TYPE_UNIVERSAL, WEAPON_TYPE_WHOKNOWS)
    else
        call UnitDamageTarget(u, t, CheckState, true, false, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL, WEAPON_TYPE_WHOKNOWS)
    endif
    
    set u = null
    set t = null
endfunction

function InitTrig_Holy_Axe takes nothing returns nothing
    local trigger t = CreateTrigger()
    call TriggerRegisterAnyUnitEventBJ(t, EVENT_PLAYER_UNIT_SPELL_EFFECT)
    call TriggerAddCondition(t, Condition(function Trig_Holy_Axe_Conditions))
    call TriggerAddAction(t, function Trig_Holy_Axe_Actions)
endfunction


Haven't tried it but it should work as intended. Just change the value in the function Holy_Axe_GetSpellId to your raw ID of the Storm Bolt ability.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top