SwitchParty¶
This action coroutine alloews to rotate the party once. It is possible to do it without a fancy visual animation.
private IEnumerator SwitchParty(bool fast)
NOTE: The process of switching is complex and involves battle
playerdataaddressing documentation. It is recommended to check this documentation to fully understand how a party rotation works.
Parameters¶
fast: Whether to include vidual animations and waiting.
Procedure¶
actionis set to true changing to an uncontrolled flowcurrentturnis set to -1 which unselects the current player party member- SetLastTurns is called which resets
lastturnsto a new aray with the length being the amount of free players - 1 and all elements being -1 (this resets the player selection cycle) - If fast is false
- All player party members has their battleentity.
spinset to (0.0, -20.0, 0.0) - 0.33 seconds are yielded
- All player party members has their battleentity.
- MainManager.SwitchParty is called with the battle version which rotates the
partypointerelements - 0.1 seconds are yielded
- For each player party members, the second part of the rotation is performed:
- battleentity.
overridejumpis set to true - battleentity.
spinis zeroed out pointeris set to the matchingpartypointer. This gives a way to do the same function thanpartypointer, but usingplayerdataindexes. In practice, this feature is UNUSED because the field is only written toplayerdata[partypointer[j]].battleentity position is set to the matchingpartypos. This can be thought as the player party member who had this formation position in the player party is moved to be physically at the matching position of that formation position- If battleentity.
deathcoroutineis in progress, it is stopped and set to null followed by battleentity.animstate being set to 18 (KO)
- battleentity.
- 0.7 seconds are yielded if fast is false
- CancelList is called
- UpdateConditionIcons is called which calls UpdateConditionBubbles on all battleentity (all
playerdatawith right to false and allenemydatawithhpabove 0 with right to true) - A frame is yielded
actionis set to false changing to a controlled flow- A frame is yielded (this frame will process in a controlled flow, but the rest is just visual updates so it's safe)
- UpdateAnim is called
- UpdateText is called