SelectEnemy ChoiceInput logic¶
This page details the logic of GetChoiceInput when currentaction is SelectEnemy.
CreateHelpBox is called followed by excludeself being set to false.
The rest is input handling logic.
Input 2 / 3 (left / right)¶
These 2 inputs are only processed if itemarea isn't AllParty, AllEnemies or All.
These inputs changes the option by one depending on the direction (decrement if left, increment if right with wrap around from 0 to maxoptions - 1 using DecreaseOption and IncreaseOption).
Additionally, a Scroll sound played on sounds[10] before changing the option and UpdateText is called after changing it.
Input 5 (cancel)¶
ReturnToMainSelect is called which does the following:
- The
Cancelsound is played on AudioSource 10 - currentaction is set to
BaseAction optionis set tolastoptionselecteditemis set to -1- DestroyHelpBox is called which sets
helpboxidto -1 and destroyshelpboxif it existed in 0.5 seconds with shrink before setting it to null - SetMaxOptions is called
- UpdateText is called
Input 4 (confirm)¶
A Confirm sound is played on sounds[10] followed by target being set to option.
What happens after depends on the currentchoice (nothing happen if it's not among these Actions).
Attack¶
A DoAction action coroutine is started changing to an uncontrolled flow on playerdata[currentturn].battleentity using -1 as the action id (the basic attack id).
Item¶
CheckItemUse is called with the selecteditem which ends starting a UseItem action coroutine changing to an uncontrolled flow.
Skill¶
lastskillis set toselecteditem- A DoAction action coroutine is started changing to an uncontrolled flow on
playerdata[currentturn].battleentityusingselecteditemas the action id (the skill id).
Strategy¶
- ItemList's
listredirectis set to -1 (this workarounds a potential inlist issue) - currentaction is set to
BaseAction - A Tattle action coroutine is started changing to an uncontrolled flow if
disablespyis false.