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
helpboxid
is set to -1excludeself
is set to true- If
currentturn
is 0,option
is set to 1 - GotoSelect without overridemax is called
2 (Do Nothing)¶
DoNothing is called which does the following:
- If
playerdata[currentturn].didnothing
is 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 thecurrentturn
player party member (more can stack, these aren't mutually exclusive):Meditation
: instance.tp
is incremented by the amount of medals equipped then clamped from 0 to instance.maxtp
. This is followed by theHeal2
sound being played andMagicUp
particles playing atplayerdata[currentturn].battleentity
position + (0.0, 0.5, 0.0)Prayer
:playerdata[currentturn].hp
is incremented by the amount of medals equipped * 2 then clamped from 0 toplayerdata[currentturn].maxhp
. This is followed by theHeal
sound being played (If noMeditation
is equipped) andHeal
particles playing atplayerdata[currentturn].battleentity
position + (0.0, 0.5, 0.0)Reflection
: If noPrayer
orMeditation
medals is equipped, theStatUp
sound 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 withReflection
on the player party member with a turn amount being the amount of medals equipped
playerdata[currentturn].didnothing
is 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
listredirect
is set to -1 (this is to workaround a potential inlist issue) availabletargets
is set to the return of GetTattleable which is allenemydata
whosenotattle
is false- If
availabletargets
is 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
helpboxid
is set to -1- A couple of ItemList field are initialised (with an instance.
inputcooldown
of 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.
defaultlistpos
as 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
maxoptions
is 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
listredirect
is 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
WaitForMessage
coroutine is started which yields as long as the message lock is grabbed followed by calling UpdateText followed by a frame yield - UpdateText is called