- Joined
- Oct 10, 2009
- Messages
- 1,426
So yeah, I'm trying to add a poison effect to Fan of Knives.
I managed to create it, it fails in two different and annoying ways.
1) that the poison buff never goes away. The unit no longer get hurt, it just still has the buff.
The base ability of the buff is unholy aura with a -10% move speed modifer and a poison buff on the caster in 0 range.
2) It also annoys me by only picking out a few units from all the units within range.
It always picks three, when there are more than three. It will add the effect to them all, but only damages the three.
Any help would be appreciated. greatly.
In the hidden tags are all 4 triggers, even though I could have made it just 3.
You can completely redo them and the spell, or just tell me what's wrong. Either way you will get rep if it fixes the problem or helps show me what's wrong.
Triggers have been converted to Jass.
But I have the longest one in both GUI and Jass.
I managed to create it, it fails in two different and annoying ways.
1) that the poison buff never goes away. The unit no longer get hurt, it just still has the buff.
The base ability of the buff is unholy aura with a -10% move speed modifer and a poison buff on the caster in 0 range.
2) It also annoys me by only picking out a few units from all the units within range.
It always picks three, when there are more than three. It will add the effect to them all, but only damages the three.
Any help would be appreciated. greatly.

In the hidden tags are all 4 triggers, even though I could have made it just 3.
You can completely redo them and the spell, or just tell me what's wrong. Either way you will get rep if it fixes the problem or helps show me what's wrong.
Triggers have been converted to Jass.
But I have the longest one in both GUI and Jass.
JASS:
function Trig_FoK_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'AEfk' ) ) then
return false
endif
return true
endfunction
function Trig_FoK_Func002001003001 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == Player(11) )
endfunction
function Trig_FoK_Func002001003002 takes nothing returns boolean
return ( GetOwningPlayer(GetFilterUnit()) == Player(PLAYER_NEUTRAL_AGGRESSIVE) )
endfunction
function Trig_FoK_Func002001003 takes nothing returns boolean
return GetBooleanOr( Trig_FoK_Func002001003001(), Trig_FoK_Func002001003002() )
endfunction
function Trig_FoK_Func002A takes nothing returns nothing
call GroupAddUnitSimple( GetEnumUnit(), udg_PoisonGroup )
call UnitAddAbilityBJ( 'A00F', GetEnumUnit() )
endfunction
function Trig_FoK_Actions takes nothing returns nothing
call DisplayTextToForce( GetPlayersAll(), "TRIGSTR_609" )
call ForGroupBJ( GetUnitsInRangeOfLocMatching(450.00, GetUnitLoc(GetTriggerUnit()), Condition(function Trig_FoK_Func002001003)), function Trig_FoK_Func002A )
call EnableTrigger( gg_trg_Ticking )
call StartTimerBJ( udg_TenSecPoisonTimer, false, 10.00 )
endfunction
//===========================================================================
function InitTrig_FoK takes nothing returns nothing
set gg_trg_FoK = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_FoK, EVENT_PLAYER_UNIT_SPELL_CAST )
call TriggerAddCondition( gg_trg_FoK, Condition( function Trig_FoK_Conditions ) )
call TriggerAddAction( gg_trg_FoK, function Trig_FoK_Actions )
endfunction

JASS:
function Trig_Ticking_Func001A takes nothing returns nothing
call SetUnitLifeBJ( GetEnumUnit(), ( GetUnitStateSwap(UNIT_STATE_LIFE, GetEnumUnit()) - 30.00 ) )
endfunction
function Trig_Ticking_Actions takes nothing returns nothing
call ForGroup( udg_PoisonGroup, function Trig_Ticking_Func001A )
endfunction
//===========================================================================
function InitTrig_Ticking takes nothing returns nothing
set gg_trg_Ticking = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Ticking, 2 )
call TriggerAddAction( gg_trg_Ticking, function Trig_Ticking_Actions )
endfunction
JASS:
function Trig_Stop_Poison_Actions takes nothing returns nothing
call DisableTrigger( gg_trg_Ticking )
call TriggerExecute( gg_trg_Remove_Poison )
set udg_PoisonGroup = null
set udg_TenSecPoisonTimer = null
endfunction
//===========================================================================
function InitTrig_Stop_Poison takes nothing returns nothing
set gg_trg_Stop_Poison = CreateTrigger( )
call TriggerRegisterTimerExpireEvent( gg_trg_Stop_Poison, udg_TenSecPoisonTimer )
call TriggerAddAction( gg_trg_Stop_Poison, function Trig_Stop_Poison_Actions )
endfunction
JASS:
function Trig_Untitled_Trigger_002_Func001A takes nothing returns nothing
call UnitRemoveAbilityBJ( 'A00F', GetEnumUnit() )
call UnitRemoveBuffBJ( 'Bpoi', GetEnumUnit() )
endfunction
function Trig_Untitled_Trigger_002_Actions takes nothing returns nothing
call ForGroupBJ( udg_PoisonGroup, function Trig_Untitled_Trigger_002_Func001A )
endfunction
//===========================================================================
function InitTrig_Remove_Poison takes nothing returns nothing
set gg_trg_Remove_Poison = CreateTrigger( )
call TriggerAddAction( gg_trg_Remove_Poison, function Trig_Untitled_Trigger_002_Actions )
endfunction