/// <summary> /// Converts the tradier order status into a qc order status /// </summary> protected OrderStatus ConvertStatus(Status2 status) { //TODO switch (status) { case Status2.FLL: return(OrderStatus.Filled); case Status2.CAN: case Status2.OUT: return(OrderStatus.Canceled); //case Status2.OPN: case Status2.ACK: case Status2.DON: return(OrderStatus.Submitted); case Status2.Exp: case Status2.REJ: return(OrderStatus.Invalid); case Status2.OPN: return(OrderStatus.New); case Status2.FLP: return(OrderStatus.PartiallyFilled); default: throw new ArgumentOutOfRangeException(); } }
public void Add(Status2 status) { Assert.IsTrue(!statuses.ContainsKey(status.KeyType), "already has status for " + status.KeyType); Assert.IsTrue(EnumTool.GetValues(status.KeyType).All(x => !ContainsKeyForAssert(x.ToString())), "has member with same name"); statuses.Add(status.KeyType, status); }
public void UpdateStatus(string status) { try { Status2.Invoke(new UpdateStatusDelegate(delegate(string s) { StatusLabel.Text = s; }), new object[] { status }); } catch (Exception) { } }
public bool CanBecomeConfusedBy(PBEPokemon other) { if (other == null) { throw new ArgumentNullException(nameof(other)); } return(!Status2.HasFlag(PBEStatus2.Confused) && !(Ability == PBEAbility.OwnTempo && !other.HasCancellingAbility())); }
public bool CanFlinchFrom(PBEPokemon other) { if (other == null) { throw new ArgumentNullException(nameof(other)); } return(!Status2.HasFlag(PBEStatus2.Flinching) && !(Ability == PBEAbility.InnerFocus && !other.HasCancellingAbility())); }
/// <summary>Returns True if the Pokémon can become <see cref="PBEStatus2.Infatuated"/> with <paramref name="other"/>.</summary> public bool CanBecomeInfatuatedWith(PBEPokemon other) { if (other == null) { throw new ArgumentNullException(nameof(other)); } return(!Status2.HasFlag(PBEStatus2.Infatuated) && ((Gender == PBEGender.Male && other.Gender == PBEGender.Female) || (Gender == PBEGender.Female && other.Gender == PBEGender.Male)) && !(Ability == PBEAbility.Oblivious && !other.HasCancellingAbility())); }
public StageObject(FieldObjectEntity fieldObjectEntity, StageObjectEntity2 stageObjectEntity, FSM parentFsm) : base(fieldObjectEntity, true, parentFsm) { Assert.IsTrue(stageObjectEntity != null); this.stageObjectEntity = stageObjectEntity; this.stat = new Stat2<StageObjectStatType>(StatGenerator.ExportData<StageObjectStatType>(stageObjectEntity)); this.status = new Status2<StageObjectStatusType>(stat, new Status2<StageObjectStatusType>.Init(StageObjectStatusType.hp, 0, StageObjectStatType.maxHP, StageObjectStatType.maxHP)); Register(stat); Register(status); }
public override string ToString() { var sb = new StringBuilder(); sb.AppendLine($"{Shell.Nickname}/{Shell.Species} {GenderSymbol} Lv.{Shell.Level}"); if (Id == byte.MaxValue) { sb.AppendLine($"HP: {HPPercentage:P2}"); } else { sb.AppendLine($"HP: {HP}/{MaxHP} ({HPPercentage:P2})"); } sb.AppendLine($"Position: {FieldPosition}"); sb.AppendLine($"Type1: {Type1}"); sb.AppendLine($"Type2: {Type2}"); sb.AppendLine($"Status1: {Status1}"); sb.AppendLine($"Status2: {Status2}"); if (Id != byte.MaxValue && Status2.HasFlag(PBEStatus2.Substitute)) { sb.AppendLine($"Substitute HP: {SubstituteHP}"); } if (Id != byte.MaxValue) { sb.AppendLine($"Stats: A: {Attack} D: {Defense} SA: {SpAttack} SD: {SpDefense} S: {Speed}"); } sb.AppendLine($"Stat changes: A: {AttackChange} D: {DefenseChange} SA: {SpAttackChange} SD: {SpDefenseChange} S: {SpeedChange} AC: {AccuracyChange} E: {EvasionChange}"); sb.AppendLine($"Item: {(Item == (PBEItem)ushort.MaxValue ? "???" : PBEItemLocalization.Names[Item].English)}"); sb.AppendLine($"Ability: {(Ability == PBEAbility.MAX ? "???" : PBEAbilityLocalization.Names[Ability].English)}"); if (Id != byte.MaxValue) { sb.AppendLine($"Nature: {(Shell.Nature == PBENature.MAX ? "???" : Shell.Nature.ToString())}"); } if (Id != byte.MaxValue) { sb.AppendLine($"Hidden Power: {GetHiddenPowerType()}/{GetHiddenPowerBasePower()}"); } string[] moveStrs = new string[Moves.Length]; for (int i = 0; i < moveStrs.Length; i++) { string mStr = Moves[i] == PBEMove.MAX ? "???" : PBEMoveLocalization.Names[Moves[i]].English; if (Id != byte.MaxValue) { mStr += $" {PP[i]}/{MaxPP[i]}"; } moveStrs[i] = mStr; } sb.Append($"Moves: {string.Join(", ", moveStrs)}"); return(sb.ToString()); }
public void UpdateStatus(string status, Label label) { if (label == Label.StatusLabel) { Status2.Invoke(new UpdateStatusDelegate(delegate(string s) { StatusLabel.Text = s; }), new object[] { status }); } if (label == Label.AlertsLabel) { Status2.Invoke(new UpdateStatusDelegate(delegate(string s) { AlertsLabel.Text = s; }), new object[] { status }); } }
private static void Main(string[] args) { Status1 httpResponse1 = Status1.Error; Console.WriteLine(httpResponse1); Console.WriteLine((int)httpResponse1); Status2 httpResponse2 = Status2.Success; Console.WriteLine(httpResponse2); Console.WriteLine((int)httpResponse2); Status3 httpResponse3 = Status3.Doknow; Console.WriteLine(httpResponse3); Console.WriteLine((int)httpResponse3); }
static Status2<HeroStatusType> InitStatus(ObjectHolder owner, Stat2 stat, SubClassEntity subClassEntity) { var blockAtt1 = TableLoader.GetTable<BlockEntity2>().Get(subClassEntity.attackBlock1); var blockAtt2 = TableLoader.GetTable<BlockEntity2>().Get(subClassEntity.attackBlock2); Status2<HeroStatusType> ret = new Status2<HeroStatusType>(stat, new Status2<HeroStatusType>.Init(HeroStatusType.hp, 0, HeroStatType.maxHP, 0), new Status2<HeroStatusType>.Init(HeroStatusType.ap, 0, HeroStatType.maxAP, 0), new Status2<HeroStatusType>.Init(HeroStatusType.mp, 0, HeroStatType.maxMP, 0), new Status2<HeroStatusType>.Init(HeroStatusType.attack1CP, 0, blockAtt1.maxCP1, 0), new Status2<HeroStatusType>.Init(HeroStatusType.attack1ChargeCount, 0, blockAtt1.maxChargeCount, 0), new Status2<HeroStatusType>.Init(HeroStatusType.attack2CP, 0, blockAtt2.maxCP1, 0), new Status2<HeroStatusType>.Init(HeroStatusType.attack2ChargeCount, 0, blockAtt2.maxChargeCount, 0), new Status2<HeroStatusType>.Init(HeroStatusType.speed, 0, HeroStatType.moveSpeed, 0)); return ret; }
public void UpdateKnownPP(PBEMove move, int amountReduced) { if (move == PBEMove.None || move >= PBEMove.MAX || !Enum.IsDefined(typeof(PBEMove), move)) { throw new ArgumentOutOfRangeException(nameof(move)); } PBEBattleMoveset.PBEBattleMovesetSlot knownSlot = KnownMoves[move]; knownSlot.PP += amountReduced; if (knownSlot.MaxPP == 0) { if (Status2.HasFlag(PBEStatus2.Transformed)) { knownSlot.MaxPP = PBEBattleMoveset.GetTransformPP(Team.Battle.Settings, move); } else if (Team.Battle.Settings.MaxPPUps == 0 || knownSlot.PP > PBEBattleMoveset.GetNonTransformPP(Team.Battle.Settings, move, (byte)(Team.Battle.Settings.MaxPPUps - 1))) { knownSlot.MaxPP = PBEBattleMoveset.GetNonTransformPP(Team.Battle.Settings, move, Team.Battle.Settings.MaxPPUps); } } }
public HeroCharacter(FieldObjectEntity objectField, SubClassEntity subClassEntity, ClassLevelEntity levelEntity, TrainLevelEntity trainLevelEntity, bool toLeft, InGameUser user, PuzzlePanel puzzlePanel, Buff.Handle onBuff, Buff.Handle onDeBuff, FSM parentFsm) : base(objectField, toLeft, parentFsm) { this.subClassEntity = subClassEntity; this.user = user; this.puzzlePanel = puzzlePanel; this.stat = new Stat2<HeroStatType>(StatGenerator.ExportData<HeroStatType>(levelEntity, trainLevelEntity)); this.status = InitStatus(this, stat, subClassEntity); Register(stat); Register(status); /* RegisterDeathCondition(x => x.Get(HeroStatusType.hp) == 0); RegisterBuffHandler(onBuff, onDeBuff); RegistActions(); SkillCommand skillCommand = InitSkill(this, skillId, itemHeroLevel.Level); AddCommandSet("skill", 1, false, E_CommandConsume.Skill, null).TryAdd(skillCommand); * */ }
public IEnumerator FsmTestWithEnumeratorPasses() { // Use the Assert class to test conditions. // yield to skip a frame AshUnityEntry.New(); IFsmManager fsmManager = AshEntry.GetModule <IFsmManager>(); FsmOwer fsmOwer = new FsmOwer(); Status1 status1 = new Status1(); Status2 status2 = new Status2(); //fsmManager.CreateFsm<FsmOwer>( fsmOwer, status1, status2); fsmManager.CreateFsm <FsmOwer>("Test", fsmOwer, status1, status2); Log.Debug("有限状态机的数量时{0}", fsmManager.Count); IFsm <FsmOwer> fsm = fsmManager.GetFsm <FsmOwer> ("Test"); Assert.IsNotNull(fsm); VarString v = new VarString(); v.SetValue("Variable data"); // v.Value = "Variable data"; fsm.SetData("data", v); fsm.Start <Status1> (); Assert.AreEqual(fsm.CurrentState, status1); yield return(new WaitForSeconds(1)); fsm.FireEvent(this, 1, "userData"); // Assert.AreEqual (fsm.CurrentState, status2); yield return(null); }
protected void Register(Status2 status) { statuses.Add(status); }
// Will only be accurate for the host public override string ToString() { var sb = new StringBuilder(); sb.AppendLine($"{Nickname}/{Species} {GenderSymbol} Lv.{Level}"); sb.AppendLine($"HP: {HP}/{MaxHP} ({HPPercentage:P2})"); sb.AppendLine($"Types: {PBELocalizedString.GetTypeName(Type1).English}/{PBELocalizedString.GetTypeName(Type2).English}"); sb.AppendLine($"Position: {Team.TrainerName}'s {FieldPosition}"); sb.AppendLine($"Status1: {Status1}"); if (Status1 == PBEStatus1.Asleep) { sb.AppendLine($"Sleep turns: {Status1Counter}/{SleepTurns}"); } else if (Status1 == PBEStatus1.BadlyPoisoned) { sb.AppendLine($"Toxic Counter: {Status1Counter}"); } sb.AppendLine($"Status2: {Status2}"); if (Status2.HasFlag(PBEStatus2.Confused)) { sb.AppendLine($"Confusion turns: {ConfusionCounter}/{ConfusionTurns}"); } if (Status2.HasFlag(PBEStatus2.Disguised)) { sb.AppendLine($"Disguised as: {DisguisedAsPokemon.Nickname}"); } if (Status2.HasFlag(PBEStatus2.Infatuated)) { sb.AppendLine($"Infatuated with: {InfatuatedWithPokemon.Nickname}"); } if (Status2.HasFlag(PBEStatus2.LeechSeed)) { sb.AppendLine($"Seeded position: {SeededTeam.TrainerName}'s {SeededPosition}"); } if (Status2.HasFlag(PBEStatus2.Substitute)) { sb.AppendLine($"Substitute HP: {SubstituteHP}"); } sb.AppendLine($"Stats: [A] {Attack}, [D] {Defense}, [SA] {SpAttack}, [SD] {SpDefense}, [S] {Speed}, [W] {Weight:0.0}"); PBEStat[] statChanges = GetChangedStats(); if (statChanges.Length > 0) { var statStrs = new List <string>(7); if (Array.IndexOf(statChanges, PBEStat.Attack) != -1) { statStrs.Add($"[A] x{PBEBattle.GetStatChangeModifier(AttackChange, false):0.00}"); } if (Array.IndexOf(statChanges, PBEStat.Defense) != -1) { statStrs.Add($"[D] x{PBEBattle.GetStatChangeModifier(DefenseChange, false):0.00}"); } if (Array.IndexOf(statChanges, PBEStat.SpAttack) != -1) { statStrs.Add($"[SA] x{PBEBattle.GetStatChangeModifier(SpAttackChange, false):0.00}"); } if (Array.IndexOf(statChanges, PBEStat.SpDefense) != -1) { statStrs.Add($"[SD] x{PBEBattle.GetStatChangeModifier(SpDefenseChange, false):0.00}"); } if (Array.IndexOf(statChanges, PBEStat.Speed) != -1) { statStrs.Add($"[S] x{PBEBattle.GetStatChangeModifier(SpeedChange, false):0.00}"); } if (Array.IndexOf(statChanges, PBEStat.Accuracy) != -1) { statStrs.Add($"[AC] x{PBEBattle.GetStatChangeModifier(AccuracyChange, true):0.00}"); } if (Array.IndexOf(statChanges, PBEStat.Evasion) != -1) { statStrs.Add($"[E] x{PBEBattle.GetStatChangeModifier(EvasionChange, true):0.00}"); } sb.AppendLine($"Stat changes: {string.Join(", ", statStrs)}"); } sb.AppendLine($"Ability: {PBELocalizedString.GetAbilityName(Ability).English}"); sb.AppendLine($"Known ability: {(KnownAbility == PBEAbility.MAX ? "???" : PBELocalizedString.GetAbilityName(KnownAbility).English)}"); sb.AppendLine($"Item: {PBELocalizedString.GetItemName(Item).English}"); sb.AppendLine($"Known item: {(KnownItem == (PBEItem)ushort.MaxValue ? "???" : PBELocalizedString.GetItemName(KnownItem).English)}"); if (Array.IndexOf(Moves, PBEMove.Frustration) != -1 || Array.IndexOf(Moves, PBEMove.Return) != -1) { sb.AppendLine($"Friendship: {Friendship} ({Friendship / (double)byte.MaxValue:P2})"); } if (Array.IndexOf(Moves, PBEMove.HiddenPower) != -1) { sb.AppendLine($"{PBELocalizedString.GetMoveName(PBEMove.HiddenPower).English}: {PBELocalizedString.GetTypeName(IndividualValues.HiddenPowerType).English}/{IndividualValues.HiddenPowerBasePower}"); } string[] moveStrs = new string[Moves.Length]; for (int i = 0; i < moveStrs.Length; i++) { moveStrs[i] = $"{PBELocalizedString.GetMoveName(Moves[i]).English} {PP[i]}/{MaxPP[i]}"; } sb.AppendLine($"Moves: {string.Join(", ", moveStrs)}"); sb.AppendLine($"Usable moves: {string.Join(", ", GetUsableMoves().Select(m => PBELocalizedString.GetMoveName(m).English))}"); sb.Append($"Known moves: {string.Join(", ", KnownMoves.Select(m => m == PBEMove.MAX ? "???" : PBELocalizedString.GetMoveName(m).English))}"); return(sb.ToString()); }
public bool CanBecomeConfusedBy(PBEPokemon other) { return(!Status2.HasFlag(PBEStatus2.Confused) && !(Ability == PBEAbility.OwnTempo && !other.HasCancellingAbility())); }
/// <summary>Sets and clears all information required for switching out.</summary> public void ClearForSwitch() { FieldPosition = PBEFieldPosition.None; switch (Ability) { case PBEAbility.NaturalCure: { Status1 = PBEStatus1.None; Status1Counter = SleepTurns = 0; break; } case PBEAbility.Regenerator: { HP = PBEUtils.Clamp((ushort)(HP + (MaxHP / 3)), ushort.MinValue, MaxHP); HPPercentage = (double)HP / MaxHP; break; } } PBEPokemonData pData; if (Shaymin_CannotChangeBackToSkyForm) { pData = PBEPokemonData.GetData(Species = KnownSpecies = PBESpecies.Shaymin); Ability = pData.Abilities[0]; } else { pData = PBEPokemonData.GetData(Species = KnownSpecies = OriginalSpecies); Ability = OriginalAbility; } KnownAbility = PBEAbility.MAX; KnownGender = Gender; KnownItem = (PBEItem)ushort.MaxValue; KnownMoves.SetUnknown(); KnownNickname = Nickname; KnownShiny = Shiny; KnownType1 = Type1 = pData.Type1; KnownType2 = Type2 = pData.Type2; AttackChange = DefenseChange = SpAttackChange = SpDefenseChange = SpeedChange = AccuracyChange = EvasionChange = 0; if (Status1 == PBEStatus1.Asleep) { Status1Counter = 0; } else if (Status1 == PBEStatus1.BadlyPoisoned) { Status1Counter = 1; } ConfusionCounter = ConfusionTurns = 0; DisguisedAsPokemon = null; SeededPosition = PBEFieldPosition.None; SeededTeam = null; SubstituteHP = 0; if (Id != byte.MaxValue && Status2.HasFlag(PBEStatus2.Transformed)) { Moves.Reset(TransformBackupMoves); TransformBackupMoves.SetUnknown(); } Status2 = PBEStatus2.None; TempLockedMove = ChoiceLockedMove = PBEMove.None; TempLockedTargets = PBETurnTarget.None; ExecutedMoves.Clear(); SpeedBoost_AbleToSpeedBoostThisTurn = false; if (Id != byte.MaxValue) { SetStats(); } }
/// <summary> /// Searches for the requested sector /// </summary> /// <returns></returns> private FloppyDisk.Sector GetSector() { FloppyDisk.Sector sector = null; // get the current track var trk = ActiveDrive.Disk.DiskTracks[ActiveDrive.TrackIndex]; // get the current sector index int index = ActiveDrive.SectorIndex; // make sure this index exists if (index > trk.Sectors.Length) { index = 0; } // index hole count int iHole = 0; // loop through the sectors in a track // the loop ends with either the sector being found // or the index hole being passed twice while (iHole <= 2) { // does the requested sector match the current sector if (trk.Sectors[index].SectorIDInfo.C == ActiveCommandParams.Cylinder && trk.Sectors[index].SectorIDInfo.H == ActiveCommandParams.Head && trk.Sectors[index].SectorIDInfo.R == ActiveCommandParams.Sector && trk.Sectors[index].SectorIDInfo.N == ActiveCommandParams.SectorSize) { // sector has been found sector = trk.Sectors[index]; UnSetBit(SR2_BC, ref Status2); UnSetBit(SR2_WC, ref Status2); break; } // check for bad cylinder if (trk.Sectors[index].SectorIDInfo.C == 255) { SetBit(SR2_BC, ref Status2); } // check for no cylinder else if (trk.Sectors[index].SectorIDInfo.C != ActiveCommandParams.Cylinder) { SetBit(SR2_WC, ref Status2); } // incrememnt sector index index++; // have we reached the index hole? if (trk.Sectors.Length <= index) { // wrap around index = 0; iHole++; } } // search loop has completed and the sector may or may not have been found // bad cylinder detected? if (Status2.Bit(SR2_BC)) { // remove WC UnSetBit(SR2_WC, ref Status2); } // update sectorindex on drive ActiveDrive.SectorIndex = index; return(sector); }
public bool CanBecomeInfatuatedWith(PBEPokemon other) { return(!Status2.HasFlag(PBEStatus2.Infatuated) && ((Gender == PBEGender.Male && other.Gender == PBEGender.Female) || (Gender == PBEGender.Female && other.Gender == PBEGender.Male)) && !(Ability == PBEAbility.Oblivious && !other.HasCancellingAbility())); }
private void UpdateStatusHandler(Object sender, UpdateStatusEventArgs e) { Status2.Invoke(new SetStatusDelegate(SetStatus), new object[] { e.text }); }
public async Task UpdateApplication(Application applicationToBeUpdated, Status2 status) { applicationToBeUpdated.Position = status; await _unitOfWork.Save(); }
// Will only be accurate for the host public override string ToString() { var sb = new StringBuilder(); sb.AppendLine($"{Nickname}/{Species} {GenderSymbol} Lv.{Level}"); sb.AppendLine($"HP: {HP}/{MaxHP} ({HPPercentage:P2})"); sb.Append($"Types: {PBELocalizedString.GetTypeName(Type1).English}"); if (Type2 != PBEType.None) { sb.Append($"/{PBELocalizedString.GetTypeName(Type2).English}"); } sb.AppendLine(); sb.Append($"Known types: {PBELocalizedString.GetTypeName(KnownType1).English}"); if (KnownType2 != PBEType.None) { sb.Append($"/{PBELocalizedString.GetTypeName(KnownType2).English}"); } sb.AppendLine(); sb.AppendLine($"Position: {Team.TrainerName}'s {FieldPosition}"); sb.AppendLine($"Status1: {Status1}"); if (Status1 == PBEStatus1.Asleep) { sb.AppendLine($"Sleep turns: {Status1Counter}/{SleepTurns}"); } else if (Status1 == PBEStatus1.BadlyPoisoned) { sb.AppendLine($"Toxic Counter: {Status1Counter}"); } sb.AppendLine($"Status2: {Status2}"); if (Status2.HasFlag(PBEStatus2.Confused)) { sb.AppendLine($"Confusion turns: {ConfusionCounter}/{ConfusionTurns}"); } if (Status2.HasFlag(PBEStatus2.Disguised)) { sb.AppendLine($"Disguised as: {DisguisedAsPokemon.Nickname}"); } if (Status2.HasFlag(PBEStatus2.Infatuated)) { sb.AppendLine($"Infatuated with: {InfatuatedWithPokemon.Nickname}"); } if (Status2.HasFlag(PBEStatus2.LeechSeed)) { sb.AppendLine($"Seeded position: {SeededTeam.TrainerName}'s {SeededPosition}"); } if (Status2.HasFlag(PBEStatus2.Substitute)) { sb.AppendLine($"Substitute HP: {SubstituteHP}"); } sb.AppendLine($"Stats: [A] {Attack}, [D] {Defense}, [SA] {SpAttack}, [SD] {SpDefense}, [S] {Speed}, [W] {Weight:0.0}"); PBEStat[] statChanges = GetChangedStats(); if (statChanges.Length > 0) { var statStrs = new List <string>(7); if (Array.IndexOf(statChanges, PBEStat.Attack) != -1) { statStrs.Add($"[A] x{PBEBattle.GetStatChangeModifier(AttackChange, false):0.00}"); } if (Array.IndexOf(statChanges, PBEStat.Defense) != -1) { statStrs.Add($"[D] x{PBEBattle.GetStatChangeModifier(DefenseChange, false):0.00}"); } if (Array.IndexOf(statChanges, PBEStat.SpAttack) != -1) { statStrs.Add($"[SA] x{PBEBattle.GetStatChangeModifier(SpAttackChange, false):0.00}"); } if (Array.IndexOf(statChanges, PBEStat.SpDefense) != -1) { statStrs.Add($"[SD] x{PBEBattle.GetStatChangeModifier(SpDefenseChange, false):0.00}"); } if (Array.IndexOf(statChanges, PBEStat.Speed) != -1) { statStrs.Add($"[S] x{PBEBattle.GetStatChangeModifier(SpeedChange, false):0.00}"); } if (Array.IndexOf(statChanges, PBEStat.Accuracy) != -1) { statStrs.Add($"[AC] x{PBEBattle.GetStatChangeModifier(AccuracyChange, true):0.00}"); } if (Array.IndexOf(statChanges, PBEStat.Evasion) != -1) { statStrs.Add($"[E] x{PBEBattle.GetStatChangeModifier(EvasionChange, true):0.00}"); } sb.AppendLine($"Stat changes: {string.Join(", ", statStrs)}"); } sb.AppendLine($"Ability: {PBELocalizedString.GetAbilityName(Ability).English}"); sb.AppendLine($"Known ability: {(KnownAbility == PBEAbility.MAX ? "???" : PBELocalizedString.GetAbilityName(KnownAbility).English)}"); sb.AppendLine($"Item: {PBELocalizedString.GetItemName(Item).English}"); sb.AppendLine($"Known item: {(KnownItem == (PBEItem)ushort.MaxValue ? "???" : PBELocalizedString.GetItemName(KnownItem).English)}"); if (Moves.Contains(PBEMove.Frustration) || Moves.Contains(PBEMove.Return)) { sb.AppendLine($"Friendship: {Friendship} ({Friendship / byte.MaxValue:P2})"); } if (Moves.Contains(PBEMove.HiddenPower)) { sb.AppendLine($"{PBELocalizedString.GetMoveName(PBEMove.HiddenPower).English}: {PBELocalizedString.GetTypeName(IndividualValues.HiddenPowerType).English}:{IndividualValues.HiddenPowerBasePower}"); } sb.Append("Moves: "); for (int i = 0; i < Team.Battle.Settings.NumMoves; i++) { PBEBattleMoveset.PBEBattleMovesetSlot slot = Moves[i]; PBEMove move = slot.Move; if (i > 0) { sb.Append(", "); } sb.Append(PBELocalizedString.GetMoveName(slot.Move).English); if (move != PBEMove.None) { sb.Append($" ({slot.PP}/{slot.MaxPP})"); } } sb.AppendLine(); sb.Append("Known moves: "); for (int i = 0; i < Team.Battle.Settings.NumMoves; i++) { PBEBattleMoveset.PBEBattleMovesetSlot slot = KnownMoves[i]; PBEMove move = slot.Move; int pp = slot.PP; int maxPP = slot.MaxPP; if (i > 0) { sb.Append(", "); } sb.Append(move == PBEMove.MAX ? "???" : PBELocalizedString.GetMoveName(move).English); if (move != PBEMove.None && move != PBEMove.MAX) { sb.Append($" ({pp}{(maxPP == 0 ? ")" : $"/{maxPP})")}"); } }
public bool CanFlinchFrom(PBEPokemon other) { return(!Status2.HasFlag(PBEStatus2.Flinching) && !(Ability == PBEAbility.InnerFocus && !other.HasCancellingAbility())); }
public void UpdateStatus(string status) { Status2.Invoke(new UpdateStatusDelegate(delegate(string s) { StatusLabel.Text = s; }), new object[] { status }); }
public void PrintStatus(string line) { Status2.Invoke(new TreeViewUpdateDelegate(delegate(string line1) { Status2.Nodes.Add(line1).EnsureVisible(); }), new object[] { line }); }