|
发表于 2008-7-14 11:31:11
|
显示全部楼层
[codes=jass]function XX takes nothing returns nothing
local real lFc=FDFD(GetEnumUnit(),udg_Unit_Strygwyr_Thirst)
if udg_Integer_Strygwyr_Thirst==0 or GetUnitState(udg_Unit_Strygwyr_Thirst,UNIT_STATE_LIFE)<1 then
call UnitShareVision(GetEnumUnit(),GetOwningPlayer(udg_Unit_Strygwyr_Thirst),false)
else
if lFc>=udg_Integer_Strygwyr_Thirst*1500 or(lFc<udg_Integer_Strygwyr_Thirst*1500 and GetUnitStatePercent(GetEnumUnit(),UNIT_STATE_LIFE,UNIT_STATE_MAX_LIFE)>40)then
call UnitShareVision(GetEnumUnit(),GetOwningPlayer(udg_Unit_Strygwyr_Thirst),false)
endif
if lFc<udg_Integer_Strygwyr_Thirst*1500 and GetUnitLifePercent(GetEnumUnit())<=40 then
call UnitShareVision(GetEnumUnit(),GetOwningPlayer(udg_Unit_Strygwyr_Thirst),true)
set udg_Boolean_Strygwyr_Thirst=true
endif
endif
endfunction[/codes]
先转JASS看看。 |
|