BaseAction ChoiceInput logic¶
This page details the logic of GetChoiceInput when currentaction is BaseAction.
All of the logic present here involves handling inputs. The input isn't processed if caninputcooldown hasn't expired yet and nothing happens except decreasing the cooldown by MainManager.framestep.
Input 7 (toggle HUD)¶
This input is handled specifically where pressing it will set idletimer to 250 when pressed which will show the hexpcounter without needing to wait 200 frames. Any other input will cause the idletimer to be set to 0 which resets the timer.
Input 2 / 3 (left / right)¶
These inputs changes the option by one depending on the direction (decrement if right, increment if left with wrap around from 0 to maxoptions - 1).
Either input will have caninputcooldown set to 2.0 frames, a Scroll sound played on sounds[10] and UpdateText being called.
Input 5 (cancel)¶
This input is only processed if GetFreePlayerAmmount returns more than 1 player being free to act.
caninputcooldownis set to 2.0 frames- The
Moneysound is player with a pitch of 1.0 +currentturn/ 10.0 which shifts the pitch slightly using a rate that depends on the selected player that we are switching away from lastoptionis set tooptioncurrentturnis set to -1 which unselects the player (the new one will be cycle on the next player phase update)
Input 6 (switch party)¶
This input is only processed when AllPartyFree returns true (all playerdata have a cantmove of 0 or below) or GetAlivePlayerAmmount returns exactly 1 (there is only one player with an hp above 0 with no eatenby):
caninputcooldownis set to 2.0- The
Switchsound is played - The SwitchParty action coroutine is started (without fast) which changes to an uncontrolled flow
Input 4 (confirm)¶
caninputcooldownis set to 2.0- instance.
inputcooldownis set to 2.0 - A
Confirmsound is played onsounds[10] lastoptionis set tooptionvineoptionis set tomaxoptionslastactionis set tooption- currentchoice is set to the
Actionsvalue whose numerical value isoption
From there, what happens depends on currentchoice and after, UpdateText is called.
Attack¶
- SetTargets is called
- If there's no
availabletargets, PlayBuzzer is called (the attack usage is denied because no targets is available) - Otherwise (the basic attack is accepted):
maxoptionsis set to the length ofavailabletargets- currentaction is set to
SelectEnemy - itemarea is set to
SingleEnemy optionis set to 0
Skill¶
excludeselfis set to falseplayerdata[currentturn].lockskillsis true or it has the Taunted or Inked condition, PlayBuzzer is called (the skill usage is denied)- Otherwise (the skill usage is accepted):
- currentaction is set to
SkillList - MainManager.RefreshSkills is called
- A couple of ItemList fields are initialised (with an instance.
inputcooldownof 5.0):storeid: 0- listtype: -
currentturn- 1 which is the skills list type of the corresponding player party member listammount: 5listdesc: truelistsell: false
- ShowItemList is called with -
currentturn- 1 as the list type, MainManager.defaultlistposas the position with showdescription and without sell
- currentaction is set to
Item¶
excludeselfis set to false- GetAvaliableTargets is called with onlyground without onlyfront using -1 as the acttackid
- If instance.
items[0]is empty (no standard items) orplayerdata[currentturn].lockitemsis true or it has the Taunted or Sticky condition, PlayBuzzer is called (the item usage is denied) - Otherwise (the item usage is accepted):
- currentaction is set to
ItemList - A couple of ItemList field are initialised (with an instance.
inputcooldownof 5.0):storeid: 0- listtype: 0 which is the standard items list type
listammount: 5listdesc: truelistsell: false
- ShowItemList is called with 0 as the list type, MainManager.
defaultlistposas the position with showdescription and without sell - UpdateText is called
- currentaction is set to
Strategy¶
- currentaction is set to
StrategyList - 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
Relay¶
- If there's 1 or less
playerdataorplayerdata[currentturn].locktri(unable to relay) orhaspassedis true (already relayed on the same main turn) or it has the Taunted condition, PlayBuzzer is called (the relay is denied) - Otherwise (the relay is accepted):
excludeselfis set to trueoptionis set to 0helpboxidis set to -1maxoptionsis set to the length ofplayerdataitemareais set toSingleAllyoptionis incremented with wrap around tomaxoptions- 1 repeatedly via IncreaseOption until its value iscurrentturn- currentaction is set to
SelectPlayer
Swap¶
excludeselfis set to trueoptionis set to 0helpboxidis set to -1maxoptionsis set to the length ofplayerdataoptionis incremented with wrap around tomaxoptions- 1 repeatedly via IncreaseOption until its value iscurrentturn- currentaction is set to
SelectPlayer