function Trig_First_Hero_Kill _Conditions takes nothing returns boolea

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
function Trig_First_Hero_Kill_Conditions takes nothing returns boolean
if ( not ( IsUnitType(GetDyingUnit(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
if ( not ( IsUnitType(GetKillingUnitBJ(), UNIT_TYPE_HERO) == true ) ) then
return false
endif
return true
endfunction
function Trig_First_Hero_Kill_Actions takes nothing returns nothing
call DisableTrigger( GetTriggeringTrigger() )
call AdjustPlayerStateBJ( 20, GetOwningPlayer(GetKillingUnitBJ()), PLAYER_STATE_RESOURCE_GOLD )
call QuestMessageBJ( GetPlayersAll(), bj_QUESTMESSAGE_ALWAYSHINT, ( ( "|cff00ccffFirst Blood|r - " + GetPlayerName(GetOwningPlayer(GetKillingUnitBJ())) ) + ( "Has just killed" + ( GetPlayerName(GetOwningPlayer(GetDyingUnit())) + " for an additional 20 Gold and a bonus 1 kill point." ) ) ) )
call AdjustPlayerStateBJ( 1, GetOwningPlayer(GetKillingUnitBJ()), PLAYER_STATE_RESOURCE_FOOD_USED )
call PlaySoundBJ( gg_snd_GruntYes4 )
endfunction
script
|-- function Trig_First_Hero_Kill_Conditions(nothing) : boolean
| |-- if (not (IsUnitType(GetDyingUnit(),UNIT_TYPE_HERO) == (None, <nodes.ExprNode object at 0x024F9690>)))
| | `-- return False
| |-- if (not (IsUnitType(GetKillingUnitBJ(),UNIT_TYPE_HERO) == (None, <nodes.ExprNode object at 0x024F9970>)))
| | `-- return False
| `-- return true
`-- function Trig_First_Hero_Kill_Actions(nothing) : nothing
|-- DisableTrigger(GetTriggeringTrigger())
|-- AdjustPlayerStateBJ(20,GetOwningPlayer(GetKillingUnitBJ()),PLAYER_STATE_RESOURCE_GOLD)
|-- QuestMessageBJ(GetPlayersAll(),bj_QUESTMESSAGE_ALWAYSHINT,(("|cff00ccffFirst Blood|r - "+GetPlayerName(GetOwningPlayer(GetKillingUnitBJ())))+("Has just killed"+(GetPlayerName(GetOwningPlayer(GetDyingUnit()))+" for an additional 20 Gold and a bonus 1 kill point."))))
|-- AdjustPlayerStateBJ(1,GetOwningPlayer(GetKillingUnitBJ()),PLAYER_STATE_RESOURCE_FOOD_USED)
`-- PlaySoundBJ(gg_snd_GruntYes4)