Magentix
if (OP.statement == false) postCount++;
- Reaction score
- 107
JASS / MUI / No leaks
And coding-wise I think it's JESP?
Implementation: very easy
Requires: vJASS (e.g.: NewGen) and ABC (included within)
Code:
Tooltip:
Infuses someone with the gift of life,
increasing their dexterity for a split second
and giving them near-immortality for a short while.
However, as every upside has its downside:
The unit will receive full damage afterwards for
any harm done to him while under the enchantment.
Level 1 - 100% MS/IAS, 5 second duration.
Level 2 - 200% MS/IAS, 7 second duration.
Level 3 - 300% MS/IAS, 9 second duration.
Motive:
Basically, it's an ultimate that fully heals someone and give great regen, but if the unit takes an amount of damage that would kill him, he'll still die after the effect wears off. So it kinda prolongues someone's life during a group fight.
This ability can do a few things:
- Help an ally escape: fast movement speed + full heal ftw
- Make a temporary tank out of someone, for example a low-hp nuker can actually survive a group fight now
- Heal someone
Upsides:
- Full heal
- Temporarily be near-immortal
- Great escape ability
- If a unit should die afterwards, it counts as a deny made by the caster.
Downsides:
- Long cooldown, high manacost
- You'll still die afterwards if you took a lot of damage during the gang.
- You can still be oneshotted
- Little eyecandy
NOTE: requires to have "allow negative real values in object editor" to be enabled in Preferences
And coding-wise I think it's JESP?
Implementation: very easy
Requires: vJASS (e.g.: NewGen) and ABC (included within)
Code:
JASS:
library GiftOfLife initializer Init requires ABC
//////////////////////////////////////////////////////////////////////////////
// //
// Gift of Life, by Magentix //
// ========================= //
// - Requires vJASS //
// - Requires Cohadar's ABC Struct Attachment System //
// //
// Configure spell IDs here: //
// ------------------------- //
// //
globals //
private constant integer SPELL_ID = 039;A000039; // The spell itself //
private constant integer BUFF_ID = 039;B001039; // The buff it places //
endglobals //
// //
//////////////////////////////////////////////////////////////////////////////
// //
// PLEASE GIVE CREDIT WHEN USING //
// //
//////////////////////////////////////////////////////////////////////////////
private struct GOLData
unit Caster
unit Target
real Damage
real Duration
trigger T
endstruct
private function CheckForBuff takes nothing returns nothing
local timer t = GetExpiredTimer()
local GOLData dat = GetTimerStructA(t)
call UnitDamageTarget(dat.Caster,dat.Target,0.00-(GetUnitState(dat.Target, UNIT_STATE_MAX_LIFE)/25.00),false,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
set dat.Duration = dat.Duration - 0.04
if (GetUnitAbilityLevel(dat.Target,BUFF_ID) <= 0 or dat.Duration <= 0) then
call UnitDamageTarget(dat.Caster,dat.Target,dat.Damage,false,false,ATTACK_TYPE_NORMAL,DAMAGE_TYPE_MAGIC,WEAPON_TYPE_WHOKNOWS)
call ClearTriggerStructA(dat.T)
call DestroyTrigger(dat.T)
call ClearTimerStructA(t)
call dat.destroy()
call PauseTimer(t)
call DestroyTimer(t)
endif
set t = null
endfunction
private function AddDamageConditions takes nothing returns boolean
local trigger T = GetTriggeringTrigger()
local unit u = GetEventDamageSource()
local GOLData dat = GetTriggerStructA(T)
local boolean b = true
if (dat.Caster == u) then
set b = false
endif
set u = null
set T = null
return b
endfunction
private function AddDamage takes nothing returns nothing
local trigger T = GetTriggeringTrigger()
local GOLData dat = GetTriggerStructA(T)
set dat.Damage = dat.Damage + GetEventDamage()
set T = null
endfunction
private function Conditions takes nothing returns boolean
return GetSpellAbilityId() == SPELL_ID
endfunction
private function Actions takes nothing returns nothing
local timer t = CreateTimer()
local unit u = GetTriggerUnit()
local unit v = GetSpellTargetUnit()
local integer i = GetUnitAbilityLevel(u,SPELL_ID)
local GOLData dat = GOLData.create()
set dat.Caster = u
set dat.Target = v
set dat.Damage = 0.00
set dat.Duration = 3.00 + (i * 2.00)
set dat.T = CreateTrigger()
call TriggerRegisterUnitEvent(dat.T,dat.Target,EVENT_UNIT_DAMAGED)
call TriggerAddCondition(dat.T,Condition(function AddDamageConditions))
call TriggerAddAction(dat.T,function AddDamage)
call SetTriggerStructA(dat.T,dat)
call SetTimerStructA(t,dat)
call TimerStart(t,0.04,true,function CheckForBuff)
set t = null
set u = null
set v = null
endfunction
//===========================================================================
private function Init 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)
set T = null
endfunction
endlibrary
Tooltip:
Infuses someone with the gift of life,
increasing their dexterity for a split second
and giving them near-immortality for a short while.
However, as every upside has its downside:
The unit will receive full damage afterwards for
any harm done to him while under the enchantment.
Level 1 - 100% MS/IAS, 5 second duration.
Level 2 - 200% MS/IAS, 7 second duration.
Level 3 - 300% MS/IAS, 9 second duration.
Motive:
Basically, it's an ultimate that fully heals someone and give great regen, but if the unit takes an amount of damage that would kill him, he'll still die after the effect wears off. So it kinda prolongues someone's life during a group fight.
This ability can do a few things:
- Help an ally escape: fast movement speed + full heal ftw
- Make a temporary tank out of someone, for example a low-hp nuker can actually survive a group fight now
- Heal someone
Upsides:
- Full heal
- Temporarily be near-immortal
- Great escape ability
- If a unit should die afterwards, it counts as a deny made by the caster.
Downsides:
- Long cooldown, high manacost
- You'll still die afterwards if you took a lot of damage during the gang.
- You can still be oneshotted
- Little eyecandy
NOTE: requires to have "allow negative real values in object editor" to be enabled in Preferences