- Joined
- Apr 24, 2012
- Messages
- 9,802
Once an enemy is marked the aura will grant lifesteal. Kindly repeat if you were talking about something else.
Rules said:Teamwork is not allowed; however, finding testers to help you with your submission is not considered teamwork.
Kingstride Aura
Nearby allies gain movement speed and attack damage. When an enemy hero within 750 range of the Marshal drops below 40% health, such enemy is marked with true sight and the aura also grants lifesteal.
Lifesteal increases for every enemy hero after the first marked.
Statistics
Area of Effect: 600
Attack Damage Bonus: 25%
Lifesteal: 15%
Lifesteal Per Hero After First: 10%
Movement Bonus: 25%
Credits
- JesusHipster (Kingstride Buff Model)
- Nudl9 (Kingstride Icon)
- looking_for_help (Damage Event)
The Kingstride Aura itself is a material change from the Thorns Aura.
//////////////////////////////////////////////////////////////////////////////
// _ __ ___ _ //
// | |/ // ___| /_\ //
// | | \___ \ / _ \ //
// |_|\_\|____//_/ \_\ //
// //
// Kingstride Aura v 1.3 //
// by CakeMaster //
// //
//////////////////////////////////////////////////////////////////////////////
function KS_RadarCondition takes nothing returns boolean
return GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) > 0.405 and GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) < (GetUnitState(GetFilterUnit(), UNIT_STATE_MAX_LIFE) * udg_Config_KS_Threshold) and IsUnitType(GetFilterUnit(), UNIT_TYPE_HERO) == true and IsUnitEnemy(GetFilterUnit(), udg_KS_Player[udg_A]) == true
endfunction
function KS_GatherCondition takes nothing returns boolean
return GetUnitState(GetFilterUnit(), UNIT_STATE_LIFE) > 0.405 and IsUnitAlly(GetFilterUnit(), udg_KS_Player[udg_A]) == true
endfunction
function KS_Setup takes nothing returns boolean
//On init
local integer i = -1
loop
set i = i + 1
exitwhen i == 15
call SetPlayerAbilityAvailable(Player(i), 'A001', false)
endloop
set udg_KS_Dummy = CreateUnit(Player(0), 'h001', 0., 0., 0.)
call UnitAddAbility(udg_KS_Dummy, udg_Config_KS_DummyAbility)
return false
endfunction
function KS_LearnedCache takes nothing returns boolean
//After a hero learns, cache his data
if GetLearnedSkill() == 'A000' then
set udg_KS_Index = ( udg_KS_Index + 1 )
set udg_KS_Caster[udg_KS_Index] = GetTriggerUnit()
set udg_KS_Enumerated[udg_KS_Index] = 0
set udg_KS_Group[udg_KS_Index] = CreateGroup()
set udg_KS_Player[udg_KS_Index] = GetOwningPlayer(udg_KS_Caster[udg_KS_Index])
call UnitAddAbility(udg_KS_Caster[udg_KS_Index], udg_Config_KS_SpellBook)
if udg_KS_Index == 1 then
call EnableTrigger(gg_trg_Kingstride)
endif
endif
return false
endfunction
function KS_Lifesteal takes nothing returns boolean
//Lifesteal, the only part that stacks with other Kingstride Auras
local integer a = 0
local real f = 0
local real r = 0.
if GetUnitAbilityLevel(udg_source, 'B000') > 0 then
loop
set a = a + 1
exitwhen a > udg_KS_Index
if udg_KS_Enumerated[a] > 0 and IsUnitInGroup(udg_source, udg_KS_Group[a]) == true then
set f = udg_Config_KS_Lifesteal + (udg_Config_KS_LifestealIncrease * udg_KS_Enumerated[a])
set r = r + (udg_amount * f)
endif
endloop
if r > 0. then
call SetUnitState(udg_source, UNIT_STATE_LIFE, (GetUnitState(udg_source, UNIT_STATE_LIFE) + r))
call DestroyEffect(AddSpecialEffect(udg_Config_KS_StealFX, GetUnitX(udg_source), GetUnitY(udg_source)))
endif
endif
return false
endfunction
function Kingstride takes nothing returns boolean
local real x
local real y
local group g
local unit u
local integer i
local real tx
local real ty
set udg_A = 1
loop
exitwhen udg_A > udg_KS_Index
set x = GetUnitX(udg_KS_Caster[udg_A])
set y = GetUnitY(udg_KS_Caster[udg_A])
set g = CreateGroup()
//Group Enumeration
call GroupEnumUnitsInRange(g, x, y, udg_Config_KS_Range, Condition(function KS_RadarCondition))
set i = 0
//Check for units to mark
loop
set u = FirstOfGroup(g)
exitwhen u == null
call SetUnitOwner(udg_KS_Dummy, udg_KS_Player[udg_A], false)
call UnitShareVision(u, udg_KS_Player[udg_A], true)
call IssueTargetOrder(udg_KS_Dummy, "faeriefire", u)
call UnitShareVision(u, udg_KS_Player[udg_A], false)
set i = i + 1
call GroupRemoveUnit(g, u)
endloop
//Radar Check
if i <= 0 then
// No weak enemies in range
set udg_KS_Enumerated[udg_A] = 0
call GroupClear(udg_KS_Group[udg_A])
else
// Weak enemy/ies in range
set udg_KS_Enumerated[udg_A] = i
//Add units to the group, auto-remove all units un-included
call GroupEnumUnitsInRange(udg_KS_Group[udg_A], x, y, udg_Config_KS_Range, Condition(function KS_GatherCondition))
endif
call DestroyGroup(g)
set udg_A = udg_A + 1
endloop
set g = null
set u = null
return false
endfunction
//===========================================================================
function InitTrig_Kingstride takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_HERO_SKILL)
call TriggerAddCondition(t, Condition(function KS_LearnedCache))
set t = CreateTrigger()
call TriggerRegisterTimerEvent(t, 0., false)
call TriggerAddCondition(t, Condition(function KS_Setup))
set t = CreateTrigger()
call TriggerRegisterVariableEvent(t, "udg_damageEventTrigger", EQUAL, 1.)
call TriggerAddCondition(t, Condition(function KS_Lifesteal))
set t = null
set gg_trg_Kingstride = CreateTrigger()
call DisableTrigger(gg_trg_Kingstride)
call TriggerAddCondition(gg_trg_Kingstride, Condition(function Kingstride))
endfunction
Changes said:- Added configuration for abilities
- Removed a useless variable
That means no one can use any libraries either; since it's code they didn't write, or write specifically for this contest.I'd have thought it wouldn't be permitted, particularly if they're giving you code solutions, bug testing is fine. but not actually writing the code for you - that would be teamwork in that the final code would not be written exclusively by yourself
but what I was saying was more to do with spell/system code itself, not libraries or things which are external to the main code, which the spell/system itself usesRules said:You can use any enhancing system (xe, IsDestructableTree, Damage detection systems, etc.), as long as the judge(s) and/or host give(s) consent to its usage.
Nice you post a WIP. Code is most important here, but you also should present the idea and the basic concept in some short statements.
I promise you, you get my spell on 1st of Augustfeel free to edit it as much as you like then (but give me credits in that case too)!
Speaking of which, can we upload the spells onto hive after the contest is over?
I'm afraid I'll have to stick to booleans (manually set to whether it uses tileset modifier) as otherwise mods would be like:Also, a boolean won't work, you'd have to try and always assume it failed.
There have been cases of people uploading their submission in spell section and getting user reviews regarding code before contest ending before, thus allowing for higher coding score.
I see this as cheating personally.
Presumably this would be when people have done it before the polling stage - since the entry thread would be closed and they'd be unable to post any updates after the polling thread is made
Luminosity
A burning aura creates scorched ground around the bearer (random patches of ground (algorithm will favor positions closer to enemy units to prevent total uselessness)). Units afflicted take X damage per second and lose Y armor.
Active: Intensify - Burns the life force of the caster to intensify the flame. Burns up to 33/44/55% of current hp as additional flame over 5 seconds. Unit's caught in intense flame keep on burning after moving away from the ground for additional 2 seconds. Units that die under this effect create scorched ground.
Desparation
An aura of decay surrounds the bearer causing up to X nearby enemies to rapidly decay. Decaying enemies lose Y% of their max hp per Z seconds and move and attack slower.
Active: Pestilence - Grants control over the decaying units if their current hp is under a certain threshold. Units controlled still decay uncontrollably but will spread decay to nearby units upon death.
The contest shall begin on 1st of July and conclude on 1st of August.
I guess we'll find out.Oh man. I have 5 periodic triggers in my spell. Is that practical?
Nonsense. As the great Dusk once said "helping my enemies means they might actually pose a challenge".Pssst. Don't help your future "enemy".
-jk![]()