コード例 #1
0
        public static void SendingOut(PokemonProxy pm)
        {
            pm.Reset();
            var o = pm.OnboardPokemon;

            if (pm.State == PokemonState.BadlyPSN)
            {
                o.SetCondition(Cs.BadlyPSN, pm.Controller.TurnNumber);
            }
            var pass = pm.Tile.GetCondition <OnboardPokemon>(Cs.BatonPass);

            if (pass != null)
            {
                o.SetLv7D(pass.Lv5D.Atk, pass.Lv5D.Def, pass.Lv5D.SpAtk, pass.Lv5D.SpDef, pass.Lv5D.Speed, pass.AccuracyLv, pass.EvasionLv);
                pm.Tile.RemoveCondition(Cs.BatonPass);
                object c;
                //混乱状态
                c = pass.GetCondition <object>(Cs.Confuse);
                if (c != null)
                {
                    o.SetCondition(Cs.Confuse, c);
                }
                //寄生种子状态
                c = pass.GetCondition <object>(Cs.LeechSeed);
                if (c != null)
                {
                    o.SetCondition(Cs.LeechSeed, c);
                }
                //扣押状态
                c = pass.GetCondition <object>(Cs.Embargo);
                if (c != null)
                {
                    o.SetCondition(Cs.Embargo, c);
                }
                //回复封印状态
                c = pass.GetCondition <object>(Cs.HealBlock);
                if (c != null)
                {
                    o.SetCondition(Cs.HealBlock, c);
                }
                //念动力状态
                c = pass.GetCondition <object>(Cs.Telekinesis);
                if (c != null)
                {
                    o.SetCondition(Cs.Telekinesis, c);
                }
                //胃液状态
                if (pass.HasCondition(Cs.GastroAcid))
                {
                    o.SetCondition(Cs.GastroAcid);
                }
                //扎根状态
                if (pass.HasCondition(Cs.Ingrain))
                {
                    o.SetCondition(Cs.Ingrain);
                }
                //液态圈状态
                if (pass.HasCondition(Cs.AquaRing))
                {
                    o.SetCondition(Cs.AquaRing);
                }
                //蓄气状态
                if (pass.HasCondition(Cs.FocusEnergy))
                {
                    o.SetCondition(Cs.FocusEnergy);
                }
                //替身状态
                c = pass.GetCondition <object>(Cs.Substitute);
                if (c != null)
                {
                    o.SetCondition(Cs.Substitute, c);
                }
                //电磁浮游状态
                c = pass.GetCondition <object>(Cs.MagnetRise);
                if (c != null)
                {
                    o.SetCondition(Cs.MagnetRise, c);
                }
                //灭亡之歌状态
                c = pass.GetCondition <object>(Cs.PerishSong);
                if (c != null)
                {
                    o.SetCondition(Cs.PerishSong, c);
                }
            }
            ATs.Illusion(pm);//幻影特性以交换前的队伍顺序决定
        }