private static void TastyBerry(PokemonProxy pm) { if (ATs.Gluttony(pm) && pm.CanHpRecover(false)) { pm.HpRecoverByOneNth(2, false, Ls.ItemHpRecover, pm.Pokemon.Item, true); if (pm.Pokemon.Nature.DislikeTaste(ITs.GetTaste(pm.Pokemon.Item))) { pm.AddState(pm, AttachedState.Confuse, false); } } }
private static void Debut(Condition hazard, PokemonProxy pm) { switch (hazard.Move.Id) { case Ms.SPIKES: if (HasEffect.IsGroundAffectable(pm, true, false)) { pm.EffectHurtByOneNth(hazard.Int, Ls.Spikes); } break; case Ms.TOXIC_SPIKES: if (HasEffect.IsGroundAffectable(pm, true, false)) { if (pm.OnboardPokemon.HasType(BattleType.Poison)) { De(pm.Controller.ReportBuilder, pm.Field, hazard.Move); } else if (pm.CanAddState(pm, AttachedState.PSN, false)) { pm.AddState(pm, AttachedState.PSN, false, hazard.Bool ? 15 : 0); } } break; case Ms.STEALTH_ROCK: int revise = BattleType.Rock.EffectRevise(pm.OnboardPokemon.Types); //羽栖有效无效都无所谓 int hp = (revise > 0 ? pm.Pokemon.MaxHp << revise : pm.Pokemon.MaxHp >> -revise) >> 3; pm.EffectHurt(hp, Ls.StealthRock); break; case Ms.STICKY_WEB: if (HasEffect.IsGroundAffectable(pm, true, false)) { pm.ShowLogPm("StickyWeb"); pm.ChangeLv7D(null, StatType.Speed, -1, false, false); } break; } }