パッケージ simulation
クラス Party
java.lang.Object
simulation.Party
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.-
コンストラクタの概要
コンストラクタ -
メソッドの概要
修飾子とタイプメソッド説明voidAdds a character to the party, keyed by their name.voidapplyTeamBuff(Buff buff) Directly applies a buff to every member of the party.Returns the character currently on-field.Returns the party member with the given name, ornullif not found.Returns a view of all party members.voidswitchCharacter(String name) Switches the active character to the party member with the given name.
-
コンストラクタの詳細
-
Party
public Party()
-
-
メソッドの詳細
-
addMember
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
Returns the party member with the given name, ornullif not found.- パラメータ:
name- the character's name as registered viaaddMember(model.entity.Character)- 戻り値:
- the matching
Character, ornull
-
getActiveCharacter
Returns the character currently on-field.- 戻り値:
- the active
Character
-
switchCharacter
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 byCombatSimulator.switchCharacter(java.lang.String)to preserve combat context.- パラメータ:
name- the name of the character to switch to
-
applyTeamBuff
Directly applies a buff to every member of the party.- パラメータ:
buff- theBuffto distribute
-
getMembers
Returns a view of all party members.- 戻り値:
- collection of all
Characterobjects in the party
-