- Joined
- Aug 31, 2014
- Messages
- 137
hello ive been runing into a slight issue with a spell buging im not sure if its piggy backing on other thou..... but here is the code in jass and gui
heres the other WHICH WORKS
I do remove leaks with all spells just missed the codes for the leaks.
[jass=spell]//===========================================================================
// Trigger: No time for the weak
//===========================================================================
function Trig_No_time_for_the_weak_Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetAttacker()) == 'Nbst' ) ) then
return false
endif
if ( not ( GetUnitLifePercent(GetAttackedUnitBJ()) < 50.00 ) ) then
return false
endif
return true
endfunction
function Trig_No_time_for_the_weak_Actions takes nothing returns nothing
if ( Trig_No_time_for_the_weak_Func001C() ) then
set udg_Target = GetAttackedUnitBJ()
set udg_hero = GetAttacker()
set udg_Abilitylevel = I2R(GetHeroLevel(udg_hero))
call SetUnitAnimation( udg_hero, "Spell Slam" )
call UnitDamageTargetBJ( udg_hero, udg_Target, ( I2R(GetHeroStatBJ(bj_HEROSTAT_STR, udg_hero, true)) * udg_Abilitylevel ), ATTACK_TYPE_CHAOS, DAMAGE_TYPE_NORMAL )
set udg_Abilitylevel = 0.00
set udg_Target = null
set udg_hero = null[/code]
// Trigger: No time for the weak
//===========================================================================
function Trig_No_time_for_the_weak_Func001C takes nothing returns boolean
if ( not ( GetUnitTypeId(GetAttacker()) == 'Nbst' ) ) then
return false
endif
if ( not ( GetUnitLifePercent(GetAttackedUnitBJ()) < 50.00 ) ) then
return false
endif
return true
endfunction
function Trig_No_time_for_the_weak_Actions takes nothing returns nothing
if ( Trig_No_time_for_the_weak_Func001C() ) then
set udg_Target = GetAttackedUnitBJ()
set udg_hero = GetAttacker()
set udg_Abilitylevel = I2R(GetHeroLevel(udg_hero))
call SetUnitAnimation( udg_hero, "Spell Slam" )
call UnitDamageTargetBJ( udg_hero, udg_Target, ( I2R(GetHeroStatBJ(bj_HEROSTAT_STR, udg_hero, true)) * udg_Abilitylevel ), ATTACK_TYPE_CHAOS, DAMAGE_TYPE_NORMAL )
set udg_Abilitylevel = 0.00
set udg_Target = null
set udg_hero = null[/code]
[trigger=gui]No time for the weak
Events
Unit - A unit Is attacked
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Attacking unit)) Equal to Beastmaster
(Percentage life of (Attacked unit)) Less than 50.00
Then - Actions
Set Target = (Attacked unit)
Set hero = (Attacking unit)
Set Abilitylevel = (Real((Hero level of hero)))
Animation - Play hero's Spell Slam animation
Unit - Cause hero to damage Target, dealing ((Real((Strength of hero (Include bonuses)))) x Abilitylevel) damage of attack type Chaos and damage type Normal
Set Abilitylevel = 0.00
Set Target = No unit
Set hero = No unit
Else - Actions
[/trigger]
Events
Unit - A unit Is attacked
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Unit-type of (Attacking unit)) Equal to Beastmaster
(Percentage life of (Attacked unit)) Less than 50.00
Then - Actions
Set Target = (Attacked unit)
Set hero = (Attacking unit)
Set Abilitylevel = (Real((Hero level of hero)))
Animation - Play hero's Spell Slam animation
Unit - Cause hero to damage Target, dealing ((Real((Strength of hero (Include bonuses)))) x Abilitylevel) damage of attack type Chaos and damage type Normal
Set Abilitylevel = 0.00
Set Target = No unit
Set hero = No unit
Else - Actions
[/trigger]
heres the other WHICH WORKS
[jass=spell]//===========================================================================
// Trigger: Clumsy Dwaf
//===========================================================================
function Trig_Clumsy_Dwaf_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetAttacker()) == 'Hmkg' ) ) then
return false
endif
return true
endfunction
function Trig_Clumsy_Dwaf_Actions takes nothing returns nothing
set udg_hero = GetAttacker()
set udg_Target = GetAttackedUnitBJ()
set udg_Abilitylevel = I2R(GetHeroStatBJ(bj_HEROSTAT_STR, udg_hero, true))
set udg_point = GetUnitLoc(udg_Target)
call SetUnitAnimation( udg_hero, "Spell Slam" )
call UnitDamagePointLoc( udg_hero, 0, 100.00, udg_point, ( udg_Abilitylevel * 2.00 ), ATTACK_TYPE_SIEGE, DAMAGE_TYPE_NORMAL )
set udg_Abilitylevel = 0.00
set udg_hero = null
set udg_Target = null[/code]
// Trigger: Clumsy Dwaf
//===========================================================================
function Trig_Clumsy_Dwaf_Conditions takes nothing returns boolean
if ( not ( GetUnitTypeId(GetAttacker()) == 'Hmkg' ) ) then
return false
endif
return true
endfunction
function Trig_Clumsy_Dwaf_Actions takes nothing returns nothing
set udg_hero = GetAttacker()
set udg_Target = GetAttackedUnitBJ()
set udg_Abilitylevel = I2R(GetHeroStatBJ(bj_HEROSTAT_STR, udg_hero, true))
set udg_point = GetUnitLoc(udg_Target)
call SetUnitAnimation( udg_hero, "Spell Slam" )
call UnitDamagePointLoc( udg_hero, 0, 100.00, udg_point, ( udg_Abilitylevel * 2.00 ), ATTACK_TYPE_SIEGE, DAMAGE_TYPE_NORMAL )
set udg_Abilitylevel = 0.00
set udg_hero = null
set udg_Target = null[/code]
[trigger=spell]Clumsy Dwaf
Events
Unit - A unit Is attacked
Conditions
(Unit-type of (Attacking unit)) Equal to Mountain King
Actions
Set hero = (Attacking unit)
Set Target = (Attacked unit)
Set Abilitylevel = (Real((Strength of hero (Include bonuses))))
Set point = (Position of Target)
Animation - Play hero's Spell Slam animation
Unit - Cause hero to damage circular area after 0.00 seconds of radius 100.00 at point, dealing (Abilitylevel x 2.00) damage of attack type Siege and damage type Normal
Set Abilitylevel = 0.00
Set hero = No unit
Set Target = No unit
Custom script: call RemoveLocation (udg_point)
[/trigger]
Events
Unit - A unit Is attacked
Conditions
(Unit-type of (Attacking unit)) Equal to Mountain King
Actions
Set hero = (Attacking unit)
Set Target = (Attacked unit)
Set Abilitylevel = (Real((Strength of hero (Include bonuses))))
Set point = (Position of Target)
Animation - Play hero's Spell Slam animation
Unit - Cause hero to damage circular area after 0.00 seconds of radius 100.00 at point, dealing (Abilitylevel x 2.00) damage of attack type Siege and damage type Normal
Set Abilitylevel = 0.00
Set hero = No unit
Set Target = No unit
Custom script: call RemoveLocation (udg_point)
[/trigger]
I do remove leaks with all spells just missed the codes for the leaks.
Last edited: