コード例 #1
0
        public override bool CanActivateOnTarget(ManualSkill ActiveSkill)
        {
            if (Context.EffectOwnerSquad.CurrentLeader == null || Context.EffectOwnerSquad.CurrentLeader.Pilot == null || Context.EffectOwnerSquad.IsDead)
            {
                return(false);
            }

            for (int U = Context.EffectOwnerSquad.UnitsAliveInSquad - 1; U >= 0; --U)
            {
                if (Context.EffectOwnerSquad[U] == null || Context.EffectOwnerSquad[U].Pilot == null)
                {
                    continue;
                }

                Context.SetContext(Context.EffectOwnerSquad, Context.EffectOwnerUnit, Context.EffectOwnerCharacter,
                                   Context.EffectOwnerSquad, Context.EffectOwnerUnit, Context.EffectOwnerSquad[U].Pilot,
                                   Context.Map.ActiveParser);

                if (ActiveSkill.CanActivateEffectsOnTarget(Context.EffectOwnerSquad[U].Pilot.Effects))
                {
                    return(true);
                }
            }

            return(false);
        }
コード例 #2
0
        public override void ActivateSkillFromMenu(ManualSkill ActiveSkill)
        {
            Context.SetContext(Context.EffectOwnerSquad, Context.EffectOwnerUnit, Context.EffectOwnerCharacter, Context.EffectOwnerSquad, Context.EffectOwnerUnit, Context.EffectOwnerCharacter);

            AddAndExecuteEffect(ActiveSkill, Context.EffectOwnerCharacter.Effects);
            Context.EffectOwnerCharacter.SP -= ActiveSkill.SPCost;
        }
コード例 #3
0
        public override bool CanActivateOnTarget(ManualSkill ActiveSkill)
        {
            for (int P = Context.Map.ListPlayer.Count - 1; P >= 0; --P)
            {
                for (int Squad = Context.Map.ListPlayer[P].ListSquad.Count - 1; Squad >= 0; --Squad)
                {
                    if (Context.Map.ListPlayer[P].ListSquad[Squad].CurrentLeader == null || Context.Map.ListPlayer[P].ListSquad[Squad].CurrentLeader.Pilot == null || Context.Map.ListPlayer[P].ListSquad[Squad].IsDead)
                    {
                        continue;
                    }

                    for (int U = Context.Map.ListPlayer[P].ListSquad[Squad].UnitsAliveInSquad - 1; U >= 0; --U)
                    {
                        if (Context.Map.ListPlayer[P].ListSquad[Squad][U] == null || Context.Map.ListPlayer[P].ListSquad[Squad][U].Pilot == null)
                        {
                            continue;
                        }

                        Context.SetContext(Context.EffectOwnerSquad, Context.EffectOwnerUnit, Context.EffectOwnerCharacter,
                                           Context.Map.ListPlayer[P].ListSquad[Squad], Context.Map.ListPlayer[P].ListSquad[Squad][U], Context.Map.ListPlayer[P].ListSquad[Squad][U].Pilot);

                        if (ActiveSkill.CanActivateEffectsOnTarget(Context.Map.ListPlayer[P].ListSquad[Squad][U].Pilot.Effects))
                        {
                            return(true);
                        }
                    }
                }
            }

            return(false);
        }
コード例 #4
0
 public void AddAndExecuteEffect(ManualSkill ActiveSkill, EffectHolder Effects)
 {
     for (int E = ActiveSkill.ListEffect.Count - 1; E >= 0; --E)
     {
         //Init Skill.
         Effects.AddAndExecuteEffect(ActiveSkill.ListEffect[E], ActiveSkill.Name);
     }
 }
コード例 #5
0
 public SelectSkillTargetScreen(DeathmatchMap Map, ManualSkill ActiveSkill, Character SkillPilot, Unit SkillUnit, Squad SkillSquad, DeathmatchContext Context, ManualSkillTarget Owner)
 {
     this.Map         = Map;
     this.ActiveSkill = ActiveSkill;
     this.SkillPilot  = SkillPilot;
     this.SkillUnit   = SkillUnit;
     this.SkillSquad  = SkillSquad;
     this.Context     = Context;
     this.Owner       = Owner;
 }
コード例 #6
0
        public override void ActivateSkillFromMenu(ManualSkill ActiveSkill)
        {
            for (int U = Context.EffectOwnerSquad.UnitsAliveInSquad - 1; U >= 0; --U)
            {
                Context.SetContext(Context.EffectOwnerSquad, Context.EffectOwnerUnit, Context.EffectOwnerCharacter, Context.EffectOwnerSquad, Context.EffectOwnerUnit, Context.EffectOwnerSquad[U].Pilot);

                AddAndExecuteEffect(ActiveSkill, Context.EffectOwnerSquad[U].Pilot.Effects);
                Context.EffectOwnerCharacter.SP -= ActiveSkill.SPCost;
            }
        }
コード例 #7
0
        public override bool CanActivateOnTarget(ManualSkill ActiveSkill)
        {
            if (Context.EffectOwnerSquad.CurrentLeader == null || Context.EffectOwnerSquad.CurrentLeader.Pilot == null || Context.EffectOwnerSquad.IsDead)
            {
                return(false);
            }

            Context.SetContext(Context.EffectOwnerSquad, Context.EffectOwnerUnit, Context.EffectOwnerCharacter, Context.EffectOwnerSquad, Context.EffectOwnerUnit, Context.EffectOwnerCharacter);

            return(ActiveSkill.CanActivateEffectsOnTarget(Context.EffectOwnerCharacter.Effects));
        }
コード例 #8
0
        public override void ActivateSkillFromMenu(ManualSkill ActiveSkill)
        {
            for (int P = Context.Map.ListPlayer.Count - 1; P >= 0; --P)
            {
                for (int S = Context.Map.ListPlayer[P].ListSquad.Count - 1; S >= 0; --S)
                {
                    for (int U = Context.Map.ListPlayer[P].ListSquad[S].UnitsAliveInSquad - 1; U >= 0; --U)
                    {
                        Context.SetContext(Context.EffectOwnerSquad, Context.EffectOwnerUnit, Context.EffectOwnerCharacter,
                                           Context.Map.ListPlayer[P].ListSquad[S], Context.Map.ListPlayer[P].ListSquad[S][U], Context.Map.ListPlayer[P].ListSquad[S][U].Pilot);

                        AddAndExecuteEffect(ActiveSkill, Context.Map.ListPlayer[P].ListSquad[S][U].Pilot.Effects);
                    }
                }
            }
        }
コード例 #9
0
 public abstract bool CanActivateOnTarget(ManualSkill ActiveSkill);
コード例 #10
0
 public abstract void ActivateSkillFromMenu(ManualSkill ActiveSkill);
コード例 #11
0
 public override void ActivateSkillFromMenu(ManualSkill ActiveSkill)
 {
     Context.Map.PushScreen(new SelectSkillTargetScreen(Context.Map, ActiveSkill, Context.EffectOwnerCharacter, Context.EffectOwnerUnit, Context.EffectOwnerSquad, Context, this));
 }