パッケージ simulation

クラス Party

java.lang.Object
simulation.Party

public class Party extends Object
Represents the active four-character party in a simulation run. Tracks all party members by name and maintains a reference to the currently on-field (active) character. Character switch-out callbacks are intentionally delegated to CombatSimulator.switchCharacter(java.lang.String) so that the simulator can supply the necessary combat context.
  • コンストラクタの詳細

    • Party

      public Party()
  • メソッドの詳細

    • addMember

      public void addMember(Character character)
      Adds a character to the party, keyed by their name. If this is the first character added, they become the active character.
      パラメータ:
      character - the character to add
    • getMember

      public Character getMember(String name)
      Returns the party member with the given name, or null if not found.
      パラメータ:
      name - the character's name as registered via addMember(model.entity.Character)
      戻り値:
      the matching Character, or null
    • getActiveCharacter

      public Character getActiveCharacter()
      Returns the character currently on-field.
      戻り値:
      the active Character
    • switchCharacter

      public void switchCharacter(String name)
      Switches the active character to the party member with the given name. Does nothing if the name is not in the party. Note: switch-out side effects (e.g. onSwitchOut) are handled by CombatSimulator.switchCharacter(java.lang.String) to preserve combat context.
      パラメータ:
      name - the name of the character to switch to
    • applyTeamBuff

      public void applyTeamBuff(Buff buff)
      Directly applies a buff to every member of the party.
      パラメータ:
      buff - the Buff to distribute
    • getMembers

      public Collection<Character> getMembers()
      Returns a view of all party members.
      戻り値:
      collection of all Character objects in the party