Example #1
0
            public virtual void Frame(ISkillArgs args, IGameUnit unit, int range)
            {
                if (con == null && !StringUtil.IsNullOrEmpty(condition))
                {
                    con = new ExpParaCondition(condition);
                }
                BaseEventArgs bea = (BaseEventArgs)args;

                bea.TempUse("give", unit);
                foreach (IGameUnit gu in args.GetGameUnits())
                {
                    if (((XYZPara.XYZ)gu.GetXYZ().GetValue()).Distance(((XYZPara.XYZ)unit.GetXYZ().GetValue())) <= range)
                    {
                        bea.TempUse("get", gu);
                        if (con == null || con.Meet(args))
                        {
                            effect.SetKey(this.key);
                            effect.SetSource(unit.GetID());
                            if (effect.GetTime() < 200)
                            {
                                effect.SetTime(200);
                            }
                            gu.GetUnitSkill().AddSkillEffect(effect);
                        }
                        bea.Resume("get");
                    }
                }
                bea.Resume("give");
            }
Example #2
0
 private void IniCon()
 {
     if (con == null || (condition != null && condition.Contains(FreeUtil.VAR_START) &&
                         condition.Contains(FreeUtil.VAR_END)))
     {
         if (!string.IsNullOrEmpty(condition))
         {
             con = new ExpParaCondition(condition);
         }
     }
 }
 private void IniCon()
 {
     if (con == null || (condition != null && (condition.IndexOf(FreeUtil.VAR_START_CHAR) > -1) &&
                         (condition.IndexOf(FreeUtil.VAR_END_CHAR) > -1)))
     {
         if (!string.IsNullOrEmpty(condition))
         {
             con = new ExpParaCondition(condition);
         }
     }
 }
 private void Ini(IEventArgs args)
 {
     if (con == null || (condition != null && (condition.IndexOf(FreeUtil.VAR_START_CHAR) > -1) && (condition.IndexOf(FreeUtil.VAR_END_CHAR) > -1)))
     {
         if (!StringUtil.IsNullOrEmpty(condition))
         {
             con = new ExpParaCondition(FreeUtil.ReplaceVar(condition, args));
         }
         if (StringUtil.IsNullOrEmpty(selectedName))
         {
             selectedName = "current";
         }
     }
 }
Example #5
0
 public override ISkillTrigger.TriggerStatus Triggered(ISkillArgs args)
 {
     if (conditon == null && !StringUtil.IsNullOrEmpty(exp))
     {
         conditon = new ExpParaCondition(exp);
     }
     if (action != null)
     {
         action.Act(args);
     }
     if (conditon == null || conditon.Meet(args))
     {
         return(IsInter(args));
     }
     else
     {
         return(ISkillTrigger.TriggerStatus.Failed);
     }
 }