예제 #1
0
        public override void ExecuteAndAddEffectToTarget(BaseEffect ActiveSkillEffect, string SkillName)
        {
            GlobalContext.OpponentCreature = GlobalContext.Invader;
            if (ActiveSkillEffect.CanActivate())
            {
                GlobalContext.OpponentCreature.Effects.AddAndExecuteEffect(ActiveSkillEffect, SkillName);
            }

            GlobalContext.OpponentCreature = GlobalContext.Defender;
            if (ActiveSkillEffect.CanActivate())
            {
                GlobalContext.OpponentCreature.Effects.AddAndExecuteEffect(ActiveSkillEffect, SkillName);
            }
        }
예제 #2
0
        public override bool CanExecuteEffectOnTarget(BaseEffect ActiveSkillEffect)
        {
            GlobalContext.SetContext(GlobalContext.EffectOwnerSquad, GlobalContext.EffectOwnerUnit, GlobalContext.EffectOwnerCharacter,
                                     GlobalContext.EffectOwnerSquad, GlobalContext.EffectOwnerUnit, GlobalContext.EffectOwnerCharacter, GlobalContext.ActiveParser);

            return(ActiveSkillEffect.CanActivate());
        }
예제 #3
0
        public override bool CanExecuteEffectOnTarget(BaseEffect ActiveSkillEffect)
        {
            GlobalContext.OpponentCreature = GlobalContext.Invader;
            if (ActiveSkillEffect.CanActivate())
            {
                return(true);
            }

            GlobalContext.OpponentCreature = GlobalContext.Defender;
            if (ActiveSkillEffect.CanActivate())
            {
                return(true);
            }

            return(false);
        }
예제 #4
0
        public override bool CanExecuteEffectOnTarget(BaseEffect ActiveSkillEffect)
        {
            for (int P = GlobalContext.Map.ListPlayer.Count - 1; P >= 0; --P)
            {
                if (GlobalContext.Map.ListPlayer[P].Team != GlobalContext.Map.ListPlayer[GlobalContext.Map.ActivePlayerIndex].Team)
                {
                    continue;
                }

                for (int S = GlobalContext.Map.ListPlayer[P].ListSquad.Count - 1; S >= 0; --S)
                {
                    float Distance = Math.Abs(GlobalContext.Map.ActiveSquad.X - GlobalContext.Map.ListPlayer[P].ListSquad[S].X) + Math.Abs(GlobalContext.Map.ActiveSquad.Y - GlobalContext.Map.ListPlayer[P].ListSquad[S].Y);
                    if (Distance > ActiveSkillEffect.Range)
                    {
                        continue;
                    }

                    for (int U = GlobalContext.Map.ListPlayer[P].ListSquad[S].UnitsAliveInSquad - 1; U >= 0; --U)
                    {
                        if (ActiveSkillEffect.CanActivate())
                        {
                            return(true);
                        }
                    }
                }
            }

            return(false);
        }
예제 #5
0
        public override bool CanExecuteEffectOnTarget(BaseEffect ActiveSkillEffect)
        {
            for (int U = GlobalContext.EffectOwnerSquad.UnitsAliveInSquad - 1; U >= 0; --U)
            {
                if (ActiveSkillEffect.CanActivate())
                {
                    return(true);
                }
            }

            return(false);
        }
예제 #6
0
 public override void ExecuteAndAddEffectToTarget(BaseEffect ActiveSkillEffect, string SkillName)
 {
     foreach (Layer ActiveLayer in GlobalContext.Map.ListLayer)
     {
         foreach (RobotAnimation ActiveRobot in ActiveLayer.DicRobot.Values)
         {
             GlobalContext.Target = ActiveRobot;
             if (ActiveSkillEffect.CanActivate())
             {
                 ActiveRobot.Effects.AddAndExecuteEffect(ActiveSkillEffect, SkillName);
             }
         }
     }
 }
예제 #7
0
 public override bool CanExecuteEffectOnTarget(BaseEffect ActiveSkillEffect)
 {
     foreach (Layer ActiveLayer in GlobalContext.Map.ListLayer)
     {
         foreach (RobotAnimation ActiveRobot in ActiveLayer.DicRobot.Values)
         {
             GlobalContext.Target = ActiveRobot;
             if (ActiveSkillEffect.CanActivate())
             {
                 return(true);
             }
         }
     }
     return(false);
 }
예제 #8
0
        public override bool CanExecuteEffectOnTarget(BaseEffect ActiveSkillEffect)
        {
            for (int P = GlobalContext.Map.ListPlayer.Count - 1; P >= 0; --P)
            {
                if (P != GlobalContext.Map.ActivePlayerIndex)
                {
                    continue;
                }

                for (int S = GlobalContext.Map.ListPlayer[P].ListSquad.Count - 1; S >= 0; --S)
                {
                    for (int U = GlobalContext.Map.ListPlayer[P].ListSquad[S].UnitsAliveInSquad - 1; U >= 0; --U)
                    {
                        if (ActiveSkillEffect.CanActivate())
                        {
                            return(true);
                        }
                    }
                }
            }

            return(false);
        }
예제 #9
0
 public override bool CanExecuteEffectOnTarget(BaseEffect ActiveSkillEffect)
 {
     return(ActiveSkillEffect.CanActivate());
 }