internal void Debut() { if (Action == PokemonAction.Debuting) { Tile.Debut(); if (!(OnboardPokemon.HasCondition(Cs.Substitute) || AbilityE(As.OVERCOAT))) { EHTs.Debut(this); } if (!PTs.CheckFaint(this)) { if (ItemE(Is.BLUE_ORB) && PTs.CanChangeForm(this, Ps.KYOGRE, 1) || ItemE(Is.RED_ORB) && PTs.CanChangeForm(this, Ps.GROUNDON, 1)) { PTs.ChangeForm(this, 1, true, Ls.Primal); } if (OnboardPokemon.Ability != As.FLOWER_GIFT && OnboardPokemon.Ability != As.FORECAST) { AbilityAttach.Execute(this); } if (!ITs.AirBalloon(this)) { ITs.Attach(this); } } Action = PokemonAction.Done; } }
public bool CanTransform(PokemonProxy target) { if (target == null) { return(false); } var to = target.OnboardPokemon; return(!(OnboardPokemon.HasCondition(Cs.Transform) || to.HasCondition(Cs.Illusion) || to.HasCondition(Cs.Transform) || to.HasCondition(Cs.Substitute))); }
/// <summary> /// 同一精灵的Outward在一段战报中可能出现多次,每次应是不同的Outward /// </summary> /// <returns></returns> internal PokemonOutward GetOutward() { Pokemon o = OnboardPokemon.GetCondition <Pokemon>(Cs.Illusion); var form = o == null ? OnboardPokemon.Form : o.Form; if (o == null) { o = Pokemon; } var name = o.Name; var gender = o.Gender;//即使对战画面中不显示性别,实际性别也与变身对象一致,可以被着迷。 var lv = Pokemon.Lv; var shiny = o.Shiny; var position = new Position(Pokemon.TeamId, OnboardPokemon.X, OnboardPokemon.CoordY); var substitute = OnboardPokemon.HasCondition(Cs.Substitute); var hp = Pokemon.Hp; var state = State; var outward = new PokemonOutward(Id, Pokemon.TeamId, Pokemon.MaxHp); outward.SetAll(name, form, gender, lv, position, substitute, hp, state, shiny); return(outward); }