public void ClearTurnChoices() { ComboPartners.Clear(); SelectedSkill = null; SelectedItem = null; SelectedWeapon = null; SelectedTargets.Clear(); MovingLocation = -1; CriticalHitRatio = 1; TargetResults.Clear(); EffectResults.Clear(); }
public void DecideMove(List <Player> players, List <Enemy> enemies) { if (!IsConscious) { return; } SelectedTargets.Clear(); SelectedSkill = Skills.Count > 0 ? Skills[RandInt(0, Skills.Count - 1)] : null; SelectedItem = null; SelectedWeapon = Weapons.Count > 0 && SelectedSkill != null && SelectedSkill.IsOffense() ? Weapons[RandInt(0, Weapons.Count - 1)] : null; SelectedTargets.Add(players[RandInt(0, players.Count - 1)]); }
// Helper function for RedirectUnconsciousTarget private void RedirectScopeSplash <T>(List <T> opponents, int i) where T : Battler { T newTarget = opponents[i]; SelectedTargets.Clear(); SelectedTargets.Add(newTarget); foreach (T oneTarget in opponents) { int xDist = Math.Abs(oneTarget.XPosition - newTarget.XPosition); int zDist = Math.Abs(oneTarget.ZPosition - newTarget.ZPosition); if (xDist > 1 && zDist > 1) { continue; } if (xDist != 0 || zDist != 0) { SelectedTargets.Add(newTarget); } } }