举个例- function Trig_ZhiZunRA01_Func004Func007001003001 takes nothing returns boolean
return (IsUnitAliveBJ(GetFilterUnit()))//满足匹配的单位是存活的 endfunction function Trig_ZhiZunRA01_Func004Func007001003002 takes nothing returns boolean return (IsUnitEnemy(GetFilterUnit(),GetOwningPlayer(GetTriggerUnit())))//满足条件匹配的是敌对单位 endfunction function Trig_ZhiZunRA01_Func004Func007001003 takes nothing returns boolean return GetBooleanAnd(Trig_ZhiZunRA01_Func004Func007001003001(),Trig_ZhiZunRA01_Func004Func007001003002()) endfunction function Trig_ZhiZunRA01_Func004Func007A takes nothing returns nothing set udg_ZhiZunRCC2=(udg_ZhiZunRCC2+1) set udg_ZhiZunREU2[udg_ZhiZunRCC2]=GetEnumUnit() call PauseUnitBJ(true,GetEnumUnit()) set udg_ZhiZunRTeX2[udg_ZhiZunRCC2]=AddLightningLoc("LEAS",GetUnitLoc(GetTriggerUnit()),GetUnitLoc(GetEnumUnit())) call UnitDamageTarget(GetTriggerUnit(),GetEnumUnit(),((I2R(GetHeroLevel(GetTriggerUnit()))*I2R(GetHeroAgi(GetTriggerUnit(),true)))*GetRandomReal(2.00,5.00)),true,false,ATTACK_TYPE_CHAOS,DAMAGE_TYPE_ENHANCED,WEAPON_TYPE_WHOKNOWS) call RemoveLocation(GetUnitLoc(GetEnumUnit()))//对选取单位造成,触发单位等级*单位的敏捷*随机实数2-5 endfunction function Trig_ZhiZunRA01_Func004C takes nothing returns boolean return ((GetRandomInt(1,100)<=5))and((udg_ZhiZunRBool2))//条件;满足随机数1-100<5和布尔值ZhiZunRBool2=真时触发 endfunction
if (Trig_ZhiZunRA01_Func004C()) then // 技能触发条件 call CreateTextTagUnitBJ(("|cFFFFFF00鬼魔反击之困锁|r"+"|cFF1FBF00发动!|r"),GetAttacker(),0,10,100,100,100,0) call SetTextTagVelocityBJ(GetLastCreatedTextTag(),64,90) call SetTextTagPermanent(GetLastCreatedTextTag(),false) call SetTextTagLifespan(GetLastCreatedTextTag(),2.00) set udg_ZhiZunRBool2=false set udg_ZhiZunRCC2=0 call ForGroupBJ(GetUnitsInRangeOfLocMatching(600.00,GetUnitLoc(GetTriggerUnit()),Condition(function Trig_ZhiZunRA01_Func004Func007001003)),function Trig_ZhiZunRA01_Func004Func007A) //600范围内满足条件Trig_ZhiZunRA01_Func004Func007001003,做Trig_ZhiZunRA01_Func004Func007A的动作
call RemoveLocation(GetUnitLoc(GetTriggerUnit())) call TriggerSleepAction(0.30) call TriggerExecute(gg_trg_ZhiZunRA12) endif endfunction
复制代码 |