public static bool ChangeLv7D(this PokemonProxy pm, PokemonProxy by, bool showFail, bool ability, int a, int d = 0, int sa = 0, int sd = 0, int s = 0, int ac = 0, int e = 0) { a = CanChangeLv7D(pm, by, StatType.Atk, a, false); d = CanChangeLv7D(pm, by, StatType.Def, d, false); sa = CanChangeLv7D(pm, by, StatType.SpAtk, sa, false); sd = CanChangeLv7D(pm, by, StatType.SpDef, sd, false); s = CanChangeLv7D(pm, by, StatType.Speed, s, false); ac = CanChangeLv7D(pm, by, StatType.Accuracy, ac, false); e = CanChangeLv7D(pm, by, StatType.Evasion, e, false); if (a != 0 || d != 0 || sa != 0 || sd != 0 || s != 0 || ac != 0 || e != 0) { if (ability) { ATs.RaiseAbility(pm); } ChangeLv7DImplement(pm, by, StatType.Atk, a, null); ChangeLv7DImplement(pm, by, StatType.SpAtk, sa, null); ChangeLv7DImplement(pm, by, StatType.Def, d, null); ChangeLv7DImplement(pm, by, StatType.SpDef, sd, null); ChangeLv7DImplement(pm, by, StatType.Speed, s, null); ChangeLv7DImplement(pm, by, StatType.Accuracy, ac, null); ChangeLv7DImplement(pm, by, StatType.Evasion, e, null); ITs.WhiteHerb(pm); return(true); } return(false); }
/// <summary> /// null log to show default log /// </summary> /// <param name="by"></param> /// <param name="stat"></param> /// <param name="change"></param> /// <param name="showFail"></param> /// <param name="log"></param> /// <returns></returns> public static bool ChangeLv7D(this PokemonProxy pm, PokemonProxy by, StatType stat, int change, bool showFail, bool ability = false, string log = null) { change = CanChangeLv7D(pm, by, stat, change, showFail); if (change != 0) { if (ability) { ATs.RaiseAbility(pm); } ChangeLv7DImplement(pm, by, stat, change, log); ITs.WhiteHerb(pm); return(true); } return(false); }
public static bool ChangeLv7D(this PokemonProxy pm, PokemonProxy by, MoveTypeE move) { bool r = false; var c = move.Lv7DChanges; if (c != null) { bool showFail = move.Move.Category == MoveCategory.Status; if (c.Type1 == StatType.All) { r = ChangeLv7D(pm, by, showFail, false, c.Change1, c.Change1, c.Change1, c.Change1, c.Change1); } else { var ac = CanChangeLv7D(pm, by, c.Type1, c.Change1, showFail); if (ac != 0) { ChangeLv7DImplement(pm, by, c.Type1, ac, null); r = true; } ac = CanChangeLv7D(pm, by, c.Type2, c.Change2, showFail); if (ac != 0) { ChangeLv7DImplement(pm, by, c.Type2, ac, null); r = true; } ac = CanChangeLv7D(pm, by, c.Type3, c.Change3, showFail); if (ac != 0) { ChangeLv7DImplement(pm, by, c.Type3, ac, null); r = true; } if (r) { ITs.WhiteHerb(pm); } } } return(r); }