示例#1
0
        public static void Execute(PokemonProxy pm, int ability)
        {
            switch (ability)
            {
            case As.ZEN_MODE:
                if (pm.CanChangeForm(555, 0))
                {
                    pm.ChangeForm(0, false, "DeZenMode");
                }
                break;

            case As.Shields_Down:
                if (pm.CanChangeForm(774, 0))
                {
                    pm.ChangeForm(0, false, "DeShields_Down");
                }
                break;

            case As.Schooling:
                if (pm.CanChangeForm(746, 0))
                {
                    pm.ChangeForm(0, false, "DeSchooling");
                }
                break;

            case As.ILLUSION:
                ATs.DeIllusion(pm);
                break;

            case As.FLOWER_GIFT:
                WeatherObserver(pm, 421);
                break;

            case As.FORECAST:
                WeatherObserver(pm, 351);
                break;

            case As.PRIMORDIAL_SEA:
                ATs.DeSpWeather(pm, ability, Ls.DeHeavyRain);
                break;

            case As.DESOLATE_LAND:
                ATs.DeSpWeather(pm, ability, Ls.DeHarshSunlight);
                break;

            case As.DELTA_STREAM:
                ATs.DeSpWeather(pm, ability, Ls.DeMysteriousAirCurrent);
                break;
            }
        }
示例#2
0
 private static void WeatherObserver(PokemonProxy pm, int number)
 {
     if (pm.CanChangeForm(number, 0))
     {
         pm.ChangeForm(0);
     }
     pm.OnboardPokemon.RemoveCondition(Cs.ObserveWeather);
 }
 private static void WeatherObserver(PokemonProxy pm, int number, int form)
 {
     if (pm.CanChangeForm(number, form))
     {
         //pm.OnboardPokemon.SetCondition("ObserveWeather"); Sp.Abilities.AttachWeatherObserver
         pm.RaiseAbility();
         pm.ChangeForm(form);
     }
 }
示例#4
0
        public static void Execute(PokemonProxy pm)
        {
            switch (pm.Ability)
            {
            case As.DRIZZLE:     //2
                STs.SetWeather(pm, Weather.Rain, true, false);
                break;

            case As.DROUGHT:
                STs.SetWeather(pm, Weather.IntenseSunlight, true, false);
                break;

            case As.SAND_STREAM:
                STs.SetWeather(pm, Weather.Sandstorm, true, false);
                break;

            case As.SNOW_WARNING:
                STs.SetWeather(pm, Weather.Hailstorm, true, false);
                break;

            case As.PRIMORDIAL_SEA:
                SpWeather(pm, Weather.Rain, Ls.EnHeavyRain);
                break;

            case As.DESOLATE_LAND:
                SpWeather(pm, Weather.IntenseSunlight, Ls.EnHarshSunlight);
                break;

            case As.DELTA_STREAM:
                SpWeather(pm, Weather.Normal, Ls.EnMysteriousAirCurrent);
                break;

            case As.LIMBER:     //7
                CantAddState(pm, PokemonState.PAR);
                break;

            case As.INSOMNIA:     //15
            case As.VITAL_SPIRIT: //72
                CantAddState(pm, PokemonState.SLP);
                break;

            case As.MAGMA_ARMOR:     //40
                CantAddState(pm, PokemonState.FRZ);
                break;

            case As.WATER_VEIL:     //41
            case As.Water_Bubble:   //199
                CantAddState(pm, PokemonState.BRN);
                break;

            case As.OBLIVIOUS:     //12
                if (pm.OnboardPokemon.RemoveCondition(Cs.Attract))
                {
                    pm.RaiseAbility();
                    pm.ShowLogPm("DeAttract");
                }
                break;

            case As.IMMUNITY:     //17
                if (pm.State == PokemonState.PSN || pm.State == PokemonState.BadlyPSN)
                {
                    pm.RaiseAbility();
                    pm.DeAbnormalState();
                }
                break;

            case As.OWN_TEMPO:     //20
                if (pm.OnboardPokemon.RemoveCondition(Cs.Confuse))
                {
                    pm.RaiseAbility();
                    pm.ShowLogPm("DeConfuse");
                }
                break;

            case As.IMPOSTER:
                Imposter(pm);
                break;

            case As.FRISK:
                Frisk(pm);
                break;

            case As.FLOWER_GIFT:
                WeatherObserver(pm, 421, pm.Controller.Weather == Weather.IntenseSunlight ? 1 : 0);
                break;

            case As.FORECAST:
            {
                var form = (int)pm.Controller.Weather;
                WeatherObserver(pm, 351, form > 3 ? 0 : form);
            }
            break;

            case As.FOREWARN:
                Forewarn(pm);
                break;

            case As.FLASH_FIRE:
                pm.OnboardPokemon.RemoveCondition(Cs.FlashFire);
                break;

            case As.AIR_LOCK:     //总觉得多个天气锁的可能会有问题,未测
                pm.RaiseAbility();
                pm.Controller.ReportBuilder.ShowLog("AirLock");
                if (pm.Controller.Board.Weather != Weather.Normal)
                {
                    ATs.WeatherChanged(pm.Controller);
                }
                break;

            case As.INTIMIDATE:
                pm.RaiseAbility();
                foreach (var p in pm.Controller.Board[1 - pm.Pokemon.TeamId].GetAdjacentPokemonsByOppositeX(pm.OnboardPokemon.X))
                {
                    if (p.OnboardPokemon.HasCondition(Cs.Substitute))
                    {
                        p.ShowLogPm("NoEffect");
                    }
                    else
                    {
                        p.ChangeLv7D(pm, StatType.Atk, -1, true);
                        if (p.ItemE(Is.Adrenaline_Orb))
                        {
                            p.ConsumeItem();
                            p.ShowLogPm("Adrenaline_Orb");
                            p.ChangeLv7D(pm, StatType.Speed, 1, true);
                        }
                    }
                }
                break;

            case As.Comatose:
                if (pm.State != PokemonState.SLP)
                {
                    pm.RaiseAbility();
                    pm.ShowLogPm("EnComatose");
                    pm.Pokemon.State   = PokemonState.SLP;
                    pm.Pokemon.SLPTurn = 0;
                }
                break;

            case As.TRACE:
                Trace(pm);
                break;

            case As.PRESSURE:
                SimpleAttachRaise(pm, "Pressure");
                break;

            case As.MOLD_BREAKER:
                SimpleAttachRaise(pm, "MoldBreaker");
                break;

            case As.TURBOBLAZE:
                SimpleAttachRaise(pm, "Turboblaze");
                break;

            case As.TERAVOLT:
                SimpleAttachRaise(pm, "Teravolt");
                break;

            case As.DOWNLOAD:
                Download(pm);
                break;

            case As.ANTICIPATION:
                Anticipation(pm);
                break;

            case As.SLOW_START:
                pm.OnboardPokemon.SetCondition(Cs.SlowStart, pm.Controller.TurnNumber + 5);
                pm.RaiseAbility();
                pm.ShowLogPm("EnSlowStart");
                break;

            case As.Electric_Surge:
                Terrain(pm, Cs.ElectricTerrain);
                break;

            case As.Psychic_Surge:
                Terrain(pm, Cs.PsychicTerrain);
                break;

            case As.Grassy_Surge:
                Terrain(pm, Cs.GrassyTerrain);
                break;

            case As.Misty_Surge:
                Terrain(pm, Cs.MistyTerrain);
                break;

            case As.Schooling:
                if (pm.Hp << 2 >= pm.Pokemon.MaxHp && pm.Pokemon.Lv >= 20 && pm.CanChangeForm(746, 1) && pm.RaiseAbility(As.Schooling))
                {
                    pm.ChangeForm(1, true, "DeSchooling");
                }
                break;
            }
        }