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
Cancel
sound is played on AudioSource 10 - currentaction is set to
BaseAction
option
is set tolastoption
selecteditem
is set to -1- DestroyHelpBox is called which sets
helpboxid
to -1 and destroyshelpbox
if 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
¶
lastskill
is set toselecteditem
- A DoAction action coroutine is started changing to an uncontrolled flow on
playerdata[currentturn].battleentity
usingselecteditem
as the action id (the skill id).
Strategy
¶
- ItemList's
listredirect
is 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
disablespy
is false.