- Joined
- Apr 13, 2005
- Messages
- 630
I only have 1 spell right now that doesnt wanna work
Troll Blood - this passive spell is suppose to allow an attacked unit to regenerate hp over combat but 6 seconds after leaving combat the regen shuts off til he enters combat. It doesnt seem to be firing at all
Troll Blood Check
Troll Blood - this passive spell is suppose to allow an attacked unit to regenerate hp over combat but 6 seconds after leaving combat the regen shuts off til he enters combat. It doesnt seem to be firing at all
JASS:
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Troll_Blood_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetAttacker()) == 'U00G' ) ) then
return false
endif
if ( not ( GetHeroLevel(GetAttacker()) >= 5 ) ) then
return false
endif
return true
endfunction
function Trig_Troll_Blood_Func005C takes nothing returns boolean
return udg_BloodBool[GetPlayerId(GetOwningPlayer(GetAttacker())) + 1] == true
endfunction
function Trig_Troll_Blood_Actions takes nothing returns nothing
set udg_BerserkerBloodInt[GetPlayerId(GetOwningPlayer(GetAttacker())) + 1] = 0
if ( Trig_Troll_Blood_Func005C() ) then
set udg_BloodBool[GetPlayerId(GetOwningPlayer(GetAttacker())) + 1] = false
call UnitAddAbility( GetAttacker(), 'A0W5' )
else
call TriggerExecute(gg_trg_Troll_Blood_Check)
endif
endfunction
//===========================================================================
function InitTrig_Troll_Blood takes nothing returns nothing
set gg_trg_Troll_Blood = CreateTrigger( )
call TriggerRegisterPlayerUnitEvent(gg_trg_Troll_Blood, Player(0), EVENT_PLAYER_UNIT_ATTACKED, null)
call TriggerRegisterPlayerUnitEvent(gg_trg_Troll_Blood, Player(1), EVENT_PLAYER_UNIT_ATTACKED, null)
call TriggerRegisterPlayerUnitEvent(gg_trg_Troll_Blood, Player(2), EVENT_PLAYER_UNIT_ATTACKED, null)
call TriggerRegisterPlayerUnitEvent(gg_trg_Troll_Blood, Player(3), EVENT_PLAYER_UNIT_ATTACKED, null)
call TriggerRegisterPlayerUnitEvent(gg_trg_Troll_Blood, Player(4), EVENT_PLAYER_UNIT_ATTACKED, null)
call TriggerRegisterPlayerUnitEvent(gg_trg_Troll_Blood, Player(5), EVENT_PLAYER_UNIT_ATTACKED, null)
call TriggerRegisterPlayerUnitEvent(gg_trg_Troll_Blood, Player(6), EVENT_PLAYER_UNIT_ATTACKED, null)
call TriggerRegisterPlayerUnitEvent(gg_trg_Troll_Blood, Player(7), EVENT_PLAYER_UNIT_ATTACKED, null)
call TriggerRegisterPlayerUnitEvent(gg_trg_Troll_Blood, Player(8), EVENT_PLAYER_UNIT_ATTACKED, null)
call TriggerRegisterPlayerUnitEvent(gg_trg_Troll_Blood, Player(9), EVENT_PLAYER_UNIT_ATTACKED, null)
call TriggerAddCondition( gg_trg_Troll_Blood, Condition( function Trig_Troll_Blood_Conditions ) )
call TriggerAddAction( gg_trg_Troll_Blood, function Trig_Troll_Blood_Actions )
endfunction
Troll Blood Check
JASS:
//TESH.scrollpos=0
//TESH.alwaysfold=0
function Trig_Troll_Blood_Check_Func003C takes nothing returns boolean
return udg_BerserkerBloodInt[GetPlayerId(GetOwningPlayer(GetAttacker())) + 1] >= 11
endfunction
function Trig_Troll_Blood_Check_Actions takes nothing returns nothing
call TriggerSleepAction( 1.00 )
set udg_BerserkerBloodInt[GetPlayerId(GetOwningPlayer(GetAttacker())) + 1] = ( udg_BerserkerBloodInt[GetPlayerId(GetOwningPlayer(GetAttacker())) + 1] + 1 )
if ( Trig_Troll_Blood_Check_Func003C() ) then
set udg_BloodBool[GetPlayerId(GetOwningPlayer(GetAttacker())) + 1] = true
call UnitRemoveAbility( GetAttacker(), 'A0W5' )
call UnitRemoveAbility(GetAttacker(), 'B02F')
endif
endfunction
//===========================================================================
function InitTrig_Troll_Blood_Check takes nothing returns nothing
set gg_trg_Troll_Blood_Check = CreateTrigger( )
call DisableTrigger( gg_trg_Troll_Blood_Check )
call TriggerAddAction( gg_trg_Troll_Blood_Check, function Trig_Troll_Blood_Check_Actions )
endfunction
Last edited: