private static void AttackedUpItem(DefContext def, MoveCategory cat, StatType stat) { if (def.AtkContext.Move.Move.Category == cat) { ITs.ChangeLv5D(def.Defender, stat, 1); } }
private static void StarfBerry(PokemonProxy pm) { if (ATs.Gluttony(pm)) { var ss = new List <StatType>(5); if (pm.CanChangeLv7D(pm, StatType.Atk, 2, false) != 0) { ss.Add(StatType.Atk); } if (pm.CanChangeLv7D(pm, StatType.Def, 2, false) != 0) { ss.Add(StatType.Def); } if (pm.CanChangeLv7D(pm, StatType.SpAtk, 2, false) != 0) { ss.Add(StatType.SpAtk); } if (pm.CanChangeLv7D(pm, StatType.SpDef, 2, false) != 0) { ss.Add(StatType.SpDef); } if (pm.CanChangeLv7D(pm, StatType.Speed, 2, false) != 0) { ss.Add(StatType.Speed); } var n = ss.Count; if (n != 0) { ITs.ChangeLv5D(pm, ss[pm.Controller.GetRandomInt(0, n - 1)], 2); } } }
private static void AttackedUpItem(DefContext def, BattleType type, StatType stat) { if (def.AtkContext.Type == type) { ITs.ChangeLv5D(def.Defender, stat, 1); } }
private static void Up1Berry(PokemonProxy pm, StatType stat) { if (ATs.Gluttony(pm)) { ITs.ChangeLv5D(pm, stat, 1); } }