- Joined
- Apr 23, 2011
- Messages
- 460
Hey, I'm having a little difficulty making some vJass spells. I need these spells to run off of timers to check when they're off cool down for the other abilities and I simply can't get this dynamic indexing down. Here's the spells I need to get done. I'm trying to get work done on them but it's confusing and I'm spending more time reading other scripts to learn than actually coding it. I hate having to do requests but, I'm very busy and still reading through these scripts. If you can contribute please do, I thank you in advance. Spells are listed below, I have part of a spell done and that will be posted on the bottom.
Battle Focus - Passive
When spells are not casted/on cooldown, Omiz'ragul gets (R2I(Level/(2/3)) * number of spells not on cooldown/casting) bonus attack damage. When this effect is active, Omiz'ragul's mana is constantly drained by (Ability Level+5) per second, until a spell is cast.
Axel Boost - No Target
After activation, the 5th attack after this ability is cast would be ((5 * Ability Level) /100) percent stronger than usual and stun it for (.5 * Ability Level) seconds and knock them back (Ability Level * 50 + 100
Earsplit Roar - Point Target
Lets loose a roar in a straight line. The roar temporarily reduces all affected units armor to 0 for (Ability Level * 1.5) seconds.
Mark of the Paw - No Target (Ultimate)
Active Effect: When cast, Omiz'ragul shows his true self, a vicious Elder Bear. Omiz'ragul would have 25 percent bonus attack, attack speed and movement speed, but it would make his armor lowered by 15 percent. All abilities of Omiz'ragul would be removed, except for Earsplit Roar and Battle Focus. He would get Scavenge instead of Axel Boost. (Scavenge is Cannibalize, but it prolongs the duration of this ability when cast). Lasts (Ability Level*15 + 15) seconds.
Passive Effect: All unit attacked by Omiz'ragul would get a Paw Mark Buff, which lasts (Ability Level * 5) seconds. Paw Mark Buffs decrease their attack speed and movement speed by ((Ability Level * 5) /100) percent . Can stack up to 3 times.
If you need the models being used, please just ask. The spells are more tedious to create because they all need timers for each unit of the hero type that has them (even though in my map there is only 1 person that could be this hero, if I choose to recycle this hero and place him in another map). The current progress I have is the setup for Axel Boost posted below.
Battle Focus - Passive
When spells are not casted/on cooldown, Omiz'ragul gets (R2I(Level/(2/3)) * number of spells not on cooldown/casting) bonus attack damage. When this effect is active, Omiz'ragul's mana is constantly drained by (Ability Level+5) per second, until a spell is cast.
Axel Boost - No Target
After activation, the 5th attack after this ability is cast would be ((5 * Ability Level) /100) percent stronger than usual and stun it for (.5 * Ability Level) seconds and knock them back (Ability Level * 50 + 100
Earsplit Roar - Point Target
Lets loose a roar in a straight line. The roar temporarily reduces all affected units armor to 0 for (Ability Level * 1.5) seconds.
Mark of the Paw - No Target (Ultimate)
Active Effect: When cast, Omiz'ragul shows his true self, a vicious Elder Bear. Omiz'ragul would have 25 percent bonus attack, attack speed and movement speed, but it would make his armor lowered by 15 percent. All abilities of Omiz'ragul would be removed, except for Earsplit Roar and Battle Focus. He would get Scavenge instead of Axel Boost. (Scavenge is Cannibalize, but it prolongs the duration of this ability when cast). Lasts (Ability Level*15 + 15) seconds.
Passive Effect: All unit attacked by Omiz'ragul would get a Paw Mark Buff, which lasts (Ability Level * 5) seconds. Paw Mark Buffs decrease their attack speed and movement speed by ((Ability Level * 5) /100) percent . Can stack up to 3 times.
If you need the models being used, please just ask. The spells are more tedious to create because they all need timers for each unit of the hero type that has them (even though in my map there is only 1 person that could be this hero, if I choose to recycle this hero and place him in another map). The current progress I have is the setup for Axel Boost posted below.
JASS:
library AxelBoost
struct AxelBoost extends array
private static integer spell = 'axel'
private static unit array Caster
private static integer heroType = 'omiz'
private static integer AtkNeed = 5
private static integer array Attacks
private static real array Stun
private static real array boost //Percent
/*
* Dynamic Indexing Variables
*/
private static integer array rn
private static integer ic = 0
/*
* Dynamic Indexing Functions
*/
private static method allocate takes nothing returns thistype
local thistype this = rn[0]
if this == 0 then
set ic = ic + 1
set thistype.Attacks[this] = 0
set .Caster[this] = GetTriggerUnit()
set Stun[this] = I2R(.5* GetUnitAbilityLevel(Caster[this], spell))
set .boost[this] = I2R(5 * (GetUnitAbilityLevel(Caster[this], spell)) /100)
return ic
endif
set rn[0] = rn[this]
return this
endmethod
private method deallocate takes nothing returns nothing
set rn[this] = rn[0]
set rn[0] = this
endmethod
private static method AxelBuff takes thistype this returns nothing
endmethod
/*
* Attack Counter
*/
private static method CountAttack takes thistype this returns nothing
if GetUnitTypeId(GetAttacker()) == heroType then
if Attacks[this] == AtkNeed then
call AxelBuff(this)
return
endif
set Attacks[this] = Attacks[this] + 1
endif
endmethod
endstruct
endlibrary
Last edited: