Ok, before anyone says anything this is a JASS spell, not a vJASS spell...
Gald we got that straight..
Ok, I'm am having a few problems with this here ablity I wrote, and I can't seem to figure out the solution to this problem
It is an incrementing AS increaser based on the bloodlust spell
The spell has 6 sets of 5 levels (level 1, 2, 3, 4, 5 and then increaser)
However in use it goes from 1.1 to 1.2 fine
but never gets higher... same for the other levels...
2.1 to 2.2 etc
It needs to go 1. --> 1.2 --> 1.3 up till .5
Oh, and the second thing is : does anyone know how to catch a passive trigger like bash?? If not is there a better way to check for attacks without using a system?
All help much appreciated
Gald we got that straight..
Ok, I'm am having a few problems with this here ablity I wrote, and I can't seem to figure out the solution to this problem
It is an incrementing AS increaser based on the bloodlust spell
The spell has 6 sets of 5 levels (level 1, 2, 3, 4, 5 and then increaser)
However in use it goes from 1.1 to 1.2 fine
but never gets higher... same for the other levels...
2.1 to 2.2 etc
It needs to go 1. --> 1.2 --> 1.3 up till .5
JASS:
function shadow_frenzy_conditions takes nothing returns boolean
return ('H00O' == GetUnitTypeId(GetAttacker())) and ((GetUnitAbilityLevel(GetAttacker(), 'A010')>0))
endfunction
function shadow_frenzy_actions takes nothing returns nothing
//Variables
local unit Caster
local unit DummyUnit
local integer Ability
local integer ShadowLevel
local integer Amount
local integer BuffLevel
local location CasterPos
//Initialise
set Caster = GetAttacker()
set CasterPos = GetUnitLoc(Caster)
//Get the buff level on caster
set BuffLevel = GetUnitAbilityLevel(Caster, 'B00F')+1
//Check if ult is on
if (GetUnitAbilityLevel(Caster, 'B00D') <= 0) then
set ShadowLevel = 0
else
set ShadowLevel = 5
endif
//Get the level
set Ability = (5 * GetUnitAbilityLevel(Caster, 'A010'))
//Get the amount
set Amount = Ability + BuffLevel - 5 + ShadowLevel
//Testing stuff
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS, I2S(Ability))
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS, I2S(BuffLevel))
call DisplayTextToForce(bj_FORCE_ALL_PLAYERS, I2S(Amount))
//Create dummy unit
set DummyUnit = CreateUnit(GetOwningPlayer(Caster),'u000', GetLocationX(CasterPos), GetLocationY(CasterPos), bj_UNIT_FACING )
call ShowUnit( DummyUnit, false )
call SetUnitInvulnerable( DummyUnit, true )
call SetUnitUseFood( DummyUnit, false)
call UnitAddAbility( DummyUnit, 'A00Z')
// Main ability - Cast bloodlust
if (GetUnitAbilityLevel(Caster, 'B00F') < (Ability+ShadowLevel)) then
call SetUnitAbilityLevel(DummyUnit, 'A00Z', Amount )
else
call SetUnitAbilityLevel(DummyUnit, 'A00Z', BuffLevel-1)
endif
call UnitRemoveAbility(Caster, 'B00F')
call IssueTargetOrder(DummyUnit, "bloodlust", Caster)
// Wait and then clean up
call TriggerSleepAction(0.27)
//Clean up
call RemoveUnit(DummyUnit)
call RemoveLocation(CasterPos)
set Caster = null
set DummyUnit = null
set CasterPos = null
endfunction
function AntiLeakFilterShadowFrenzy takes nothing returns boolean
return true
endfunction
//===========================================================================
function InitTrig_Shadow_Frenzy takes nothing returns nothing
local trigger ShadowFrenzy
local filterfunc filter
local integer index
set ShadowFrenzy = CreateTrigger( )
set filter = Filter(function AntiLeakFilterShadowFrenzy)
set index = 0
loop
call TriggerRegisterPlayerUnitEvent(ShadowFrenzy, Player(index), EVENT_PLAYER_UNIT_ATTACKED, filter)
set index = index + 1
exitwhen index == bj_MAX_PLAYER_SLOTS
endloop
call TriggerAddCondition( ShadowFrenzy, Condition( function shadow_frenzy_conditions ) )
call TriggerAddAction( ShadowFrenzy, function shadow_frenzy_actions )
call DestroyFilter(filter)
set ShadowFrenzy = null
set filter = null
endfunction
Oh, and the second thing is : does anyone know how to catch a passive trigger like bash?? If not is there a better way to check for attacks without using a system?
All help much appreciated