Battle strategy list type confirmation handling¶
This page describes the logic SetItem has when handling a listtype of Battle strategy.
The logic depends on the listvar option:
271 (Swap)¶
This acts as if 0 (Switch) was selected if there is 2 or less playerdata.
Otherwise:
- itemarea is set to
SingleAlly - currentchoice is set to
Swap helpboxidis set to -1excludeselfis set to true- If
currentturnis 0,optionis set to 1 - GotoSelect without overridemax is called
2 (Do Nothing)¶
DoNothing is called which does the following:
- If
playerdata[currentturn].didnothingis false (the player party member didn't already did nothing), several effects can happen depending on at least 1 instance of a specific medal being equipped on thecurrentturnplayer party member (more can stack, these aren't mutually exclusive):Meditation: instance.tpis incremented by the amount of medals equipped then clamped from 0 to instance.maxtp. This is followed by theHeal2sound being played andMagicUpparticles playing atplayerdata[currentturn].battleentityposition + (0.0, 0.5, 0.0)Prayer:playerdata[currentturn].hpis incremented by the amount of medals equipped * 2 then clamped from 0 toplayerdata[currentturn].maxhp. This is followed by theHealsound being played (If noMeditationis equipped) andHealparticles playing atplayerdata[currentturn].battleentityposition + (0.0, 0.5, 0.0)Reflection: If noPrayerorMeditationmedals is equipped, theStatUpsound is played. This is followed by a StatEffect starting on the battleentity with type 1 (blue, up arrow) and if the player party member doesn't have the Reflection condition, SetCondition is called withReflectionon the player party member with a turn amount being the amount of medals equipped
playerdata[currentturn].didnothingis set to true which prevents the medals effects to apply on a second do nothing- EndPlayerTurn is called
- CancelList is called
0 (Switch)¶
The Switch sound is played followed by a SwitchParty action coroutine starting switching to an uncontrolled flow.
1 (Spy)¶
- ItemList's
listredirectis set to -1 (this is to workaround a potential inlist issue) availabletargetsis set to the return of GetTattleable which is allenemydatawhosenotattleis false- If
availabletargetsis empty, PlayBuzzer is called followed by ReloadStrategy being called and invoked another time in 0.1 seconds. The method does the following (essentially denies the spy):- currentaction is set to
StrategyList helpboxidis set to -1- A couple of ItemList field are initialised (with an instance.
inputcooldownof 5.0):storeid: 0- listtype: 9 which is the battle strategy list type
listammount: 6listdesc: truelistsell: false
- ShowItemList is called with 9 as the list type, MainManager.
defaultlistposas the position with showdescription and without sell - UpdateText is called
- currentaction is set to
- Otherwise (the spy is accepted):
- CreateHelpBox with id 0 is called
- itemarea is set to
SingleEnemy maxoptionsis set to the length ofavailabletargets- currentaction is set to
SelectEnemy
3 (Flee)¶
If canflee is true, a TryFlee action coroutine is started changing to an uncontrolled flow. This ends the handler.
If it's false however (this denies the flee with a message):
- CancelList is called
- ItemList's
listredirectis set to -1 (this is to workaround a potential inlist issue) - SetText is called in dialogue mode using
|boxstyle,4||spd,0|followed bymenutext[73](a message informing the player they cannot flee) as the text and the following:- fonttype of 0 (
BubblegumSans) - linebreak of MainManager.
messagebreak - No tridimensional
- position of Vector3.zero
- No cameraoffset
- size of Vector2.one
- No parent
- No caller
- fonttype of 0 (
- A
WaitForMessagecoroutine is started which yields as long as the message lock is grabbed followed by calling UpdateText followed by a frame yield - UpdateText is called