Final Player UI cleanup

This commit is contained in:
aldelaro5
2024-03-09 18:56:10 -05:00
parent b670e42059
commit 72960f55ed
16 changed files with 77 additions and 77 deletions

View File

@@ -138,7 +138,7 @@ This is all the BattleControl fields.
|----|----|---------|-----------|
|currentaction|[Pick](Player%20UI/Pick.md)|Yes|The current menu being naviguated by the player. Set to `BaseAction` on [StartBattle](StartBattle.md)|
|currentchoice|[Actions](Player%20UI/Actions.md)|Yes|The current action being selected on the `BaseAction` menu. Set to `Attack` on [StartBattle](StartBattle.md)|
|itemarea|[AttackArea](AttackArea.md)|No|Tells what actors are selectable to perform the current action|
|itemarea|[AttackArea](Player%20UI/AttackArea.md)|No|Tells what actors are selectable to perform the current action|
|maxoptions|int|No|The amount of available `option` on the main vine menu|
|lastoption|int|No|The last selected `option` on the main vine menu|
|selecteditem|int|No|The selected `listvar` option from an [ItemList](../ItemList/ItemList.md), set by [SetItem](Player%20UI/SetItem.md)|

View File

@@ -8,4 +8,4 @@ This enum describes the current sub interface the player selected or is in the p
|2|Item|The player chose to use an [item](../../Enums%20and%20IDs/Items.md)|
|3|Strategy|The player chose to use a strategy|
|4|Relay|The player chose to relay|
|5|Swap|The player chose the Swap option in the strategy menu|
|5|Swap|The player chose the Swap option in the strategy menu|

View File

@@ -1,5 +1,5 @@
# `BaseAction` ChoiceInput logic
This page details the logic of [GetChoiceInput](../GetChoiceInput.md) when `currentaction` is `BaseAction`.
This page details the logic of [GetChoiceInput](../GetChoiceInput.md) when [currentaction](../Pick.md) 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`.
@@ -20,7 +20,7 @@ This input is only processed if [GetFreePlayerAmmount](../../Actors%20states/Pla
- `currentturn` is set to -1 which unselects the player (the new one will be cycle on the next [player phase](../../Battle%20flow/Main%20turn%20life%20cycle.md#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`). NOTE: this implies that it is possible to switch after an action if that action killed all, but one party member.
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`). NOTE: this implies that it is possible to switch after an action if that action killed all, but one party member TODO: recheck.
- `caninputcooldown` is set to 2.0
- The `Switch` sound is played
@@ -34,26 +34,26 @@ This input is only processed when AllPartyFree returns true (all `playerdata` ha
- `lastoption` is set to `option`
- `vineoption` is set to `maxoptions`
- `lastaction` is set to `option`
- `currentchoice` is set to the `Actions` value whose numerical value is `option`
- [currentchoice](../Actions.md) is set to the `Actions` value whose numerical value is `option`
From there, what happens depends on `currentchoice` and after, [UpdateText](../../Visual%20rendering/UpdateText.md) is called.
From there, what happens depends on [currentchoice](../Actions.md) and after, [UpdateText](../../Visual%20rendering/UpdateText.md) is called.
### `Attack`
- [SetTargets](../../Actors%20states/Targetting/SetTargets.md) is called
- If there's no `availabletargets`, PlayBuzzer is called
- If there's no `availabletargets`, PlayBuzzer is called (the attack usage is denied because no targets is available)
- Otherwise:
- `maxoptions` is set to the length of `availabletargets`
- `currentaction` is set to `SelectEnemy`
- `itemarea` is set to `SingleEnemy`
- [currentaction](../Pick.md) is set to `SelectEnemy`
- [itemarea](../../Player%20UI/AttackArea.md) is set to `SingleEnemy`
- `option` is set to 0
### `Skill`
- `excludeself` is set to false
- `playerdata[currentturn].lockskills` is true or it has the `Taunted` or `Inked` [condition](../../Actors%20states/Conditions.md), PlayBuzzer is called
- `playerdata[currentturn].lockskills` is true or it has the [Taunted](../../Actors%20states/BattleCondition/Taunted.md) or [Inked](../../Actors%20states/BattleCondition/Inked.md) condition, PlayBuzzer is called (the skill usage is denied)
- Otherwise:
- `currentaction` is set to `SkillList`
- [currentaction](../Pick.md) is set to `SkillList`
- MainManager.[RefreshSkills](../../RefreshSkills.md) is called
- A couple of [ItemList](../../../ItemList/ItemList.md) fields are initialised (with an instance.`inputcooldown` of 5.0):
- `storeid`: 0
@@ -67,9 +67,9 @@ From there, what happens depends on `currentchoice` and after, [UpdateText](../.
- `excludeself` is set to false
- [GetAvaliableTargets](../../Actors%20states/Targetting/GetAvaliableTargets.md) is called with onlyground without onlyfront using -1 as the acttackid
- If instance.`items[0]` is empty (no standard items) or `playerdata[currentturn].lockitems` is true or it has the `Taunted` or `Sticky` condition, PlayBuzzer is called
- If instance.`items[0]` is empty (no standard items) or `playerdata[currentturn].lockitems` is true or it has the [Taunted](../../Actors%20states/BattleCondition/Taunted.md) or [Sticky](../../Actors%20states/BattleCondition/Sticky.md) condition, PlayBuzzer is called (the item usage is denied)
- Otherwise:
- `currentaction` is set to `ItemList`
- [currentaction](../Pick.md) is set to `ItemList`
- A couple of [ItemList](../../../ItemList/ItemList.md) field are initialised (with an instance.`inputcooldown` of 5.0):
- `storeid`: 0
- [listtype](../../../ItemList/listtype.md): 0 which is the [standard items list type](../../../ItemList/List%20Types%20Group%20Details/Items%20List%20Type.md)
@@ -81,7 +81,7 @@ From there, what happens depends on `currentchoice` and after, [UpdateText](../.
### `Strategy`
- `currentaction` is set to `StrategyList`
- [currentaction](../Pick.md) is set to `StrategyList`
- A couple of [ItemList](../../../ItemList/ItemList.md) field are initialised (with an instance.`inputcooldown` of 5.0):
- `storeid`: 0
- [listtype](../../../ItemList/listtype.md): 9 which is the [battle strategy list type](../../../ItemList/List%20Types%20Group%20Details/Battle%20Strategy%20List%20Type.md)
@@ -93,7 +93,7 @@ From there, what happens depends on `currentchoice` and after, [UpdateText](../.
### `Relay`
- If there's 1 or less `playerdata` or `playerdata[currentturn].locktri` or `haspassed` is true or it has the `Taunted` [condition](../../Actors%20states/Conditions.md), PlayBuzzer is called
- If there's 1 or less `playerdata` or `playerdata[currentturn].locktri` (unable to relay) or `haspassed` is true (already relayed on the same main turn) or it has the [Taunted](../../Actors%20states/BattleCondition/Taunted.md) condition, PlayBuzzer is called (the relay is denied)
- Otherwise:
- `excludeself` is set to true
- `option` is set to 0
@@ -101,7 +101,7 @@ From there, what happens depends on `currentchoice` and after, [UpdateText](../.
- `maxoptions` is set to the length of `playerdata`
- `itemarea` is set to `SingleAlly`
- `option` is incremented with wrap around to `maxoptions` - 1 repeatedly via IncreaseOption until its value is `currentturn`
- `currentaction` is set to `SelectPlayer`
- [currentaction](../Pick.md) is set to `SelectPlayer`
### `Swap`
@@ -110,4 +110,4 @@ From there, what happens depends on `currentchoice` and after, [UpdateText](../.
- `helpboxid` is set to -1
- `maxoptions` is set to the length of `playerdata`
- `option` is incremented with wrap around to `maxoptions` - 1 repeatedly via IncreaseOption until its value is `currentturn`
- `currentaction` is set to `SelectPlayer`
- [currentaction](../Pick.md) is set to `SelectPlayer`

View File

@@ -1,12 +1,12 @@
# `SelectEnemy` ChoiceInput logic
This page details the logic of [GetChoiceInput](../GetChoiceInput.md) when `currentaction` is `SelectEnemy`.
This page details the logic of [GetChoiceInput](../GetChoiceInput.md) when [currentaction](../Pick.md) is `SelectEnemy`.
[CreateHelpBox](../../Visual%20rendering/CreateHelpBox.md) 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 2 inputs are only processed if [itemarea](../../Player%20UI/AttackArea.md) 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).
@@ -16,7 +16,7 @@ Additionally, a `Scroll` sound played on `sounds[10]` before changing the `optio
ReturnToMainSelect is called which does the following:
- The `Cancel` sound is played on AudioSource 10
- `currentaction` is set to `BaseAction`
- [currentaction](../Pick.md) is set to `BaseAction`
- `option` is set to `lastoption`
- `selecteditem` is set to -1
- DestroyHelpBox is called which sets `helpboxid` to -1 and destroys `helpbox` if it existed in 0.5 seconds with shrink before setting it to null
@@ -26,10 +26,10 @@ ReturnToMainSelect is called which does the following:
## 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`).
What happens after depends on the [currentchoice](../Actions.md) (nothing happen if it's not among these `Actions`).
### `Attack`
A [DoAction](../../Battle%20flow/Action%20coroutines/DoAction.md) action coroutine is started changing to an [uncontrolled flow](../../Battle%20flow/Update%20flows/Uncontrolled%20flow.md) on `playerdata[currentturn].battleentity` using -1 as the action id.
A [DoAction](../../Battle%20flow/Action%20coroutines/DoAction.md) action coroutine is started changing to an [uncontrolled flow](../../Battle%20flow/Update%20flows/Uncontrolled%20flow.md) 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](../../Battle%20flow/Action%20coroutines/UseItem.md) action coroutine changing to an [uncontrolled flow](../../Battle%20flow/Update%20flows/Uncontrolled%20flow.md).
@@ -37,10 +37,10 @@ CheckItemUse is called with the `selecteditem` which ends starting a [UseItem](.
### `Skill`
- `lastskill` is set to `selecteditem`
- A [DoAction](../../Battle%20flow/Action%20coroutines/DoAction.md) action coroutine is started changing to an [uncontrolled flow](../../Battle%20flow/Update%20flows/Uncontrolled%20flow.md) on `playerdata[currentturn].battleentity` using `selecteditem` as the action id.
- A [DoAction](../../Battle%20flow/Action%20coroutines/DoAction.md) action coroutine is started changing to an [uncontrolled flow](../../Battle%20flow/Update%20flows/Uncontrolled%20flow.md) on `playerdata[currentturn].battleentity` using `selecteditem` as the action id (the [skill](../../../Enums%20and%20IDs/Skills.md) id).
### `Strategy`
- [ItemList](../../../ItemList/ItemList.md)'s `listredirect` is set to -1 (this workarounds a potential [inlist issue](../../../ItemList/inlist%20issue.md))
- `currentaction` is set to `BaseAction`
- [currentaction](../Pick.md) is set to `BaseAction`
- A [Tattle](../../Battle%20flow/Action%20coroutines/Tattle.md) action coroutine is started changing to an [uncontrolled flow](../../Battle%20flow/Update%20flows/Uncontrolled%20flow.md) if `disablespy` is false.

View File

@@ -1,15 +1,15 @@
# `SelectPlayer` ChoiceInput logic
This page details the logic of [GetChoiceInput](../GetChoiceInput.md) when `currentaction` is `SelectPlayer`.
This page details the logic of [GetChoiceInput](../GetChoiceInput.md) when [currentaction](../Pick.md) is `SelectPlayer`.
All the logic present here is input handling logic.
## Input 2 / 3 (left / right)
These 2 inputs are only processed if `itemarea` isn't `AllParty`, `AllEnemies` or `All`.
These 2 inputs are only processed if [itemarea](../../Player%20UI/AttackArea.md) 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). However, there are 2 exceptions (only one is applied)
- If `excludeself` is true, the increment/decrement is redone over and over until `option` isn't `currentturn` (meaning the player that will be selected isn't the one performing an action)
- Otherwise, if PartyInOrder returns false (meaning more than 1 member exists and swaps occured such that it is no longer in one of the 3 expected order), the reverse change will be done instead. This works because all combinations where the party is out of order happens to cycle in reverse order (intuitively, think of fixing the first number, your only choices are +1 and -1 in the cycle which locks in the last one and the latter choice is out of order)
- Otherwise, if PartyInOrder returns false (meaning more than 1 member exists and swaps occured such that it is no longer in one of the 3 expected order), the reverse change will be done instead. This works because all combinations where the party is out of order happens to cycle in reverse order (intuitively, think of fixing the first number, your only choices are +1 and -1 in the cycle which locks in the last one and the latter choice is out of order while the former choice is in order)
Additionally, a `Scroll` sound played on `sounds[10]` before changing the `option` and [UpdateText](../../Visual%20rendering/UpdateText.md) is called after changing it.
@@ -17,7 +17,7 @@ Additionally, a `Scroll` sound played on `sounds[10]` before changing the `optio
ReturnToMainSelect is called which does the following:
- The `Cancel` sound is played on AudioSource 10
- `currentaction` is set to `BaseAction`
- [currentaction](../Pick.md) is set to `BaseAction`
- `option` is set to `lastoption`
- `selecteditem` is set to -1
- DestroyHelpBox is called which sets `helpboxid` to -1 and destroys `helpbox` if it existed in 0.5 seconds with shrink before setting it to null
@@ -25,16 +25,16 @@ ReturnToMainSelect is called which does the following:
- [UpdateText](../../Visual%20rendering/UpdateText.md) is called
## Input 4 (confirm)
If `itemarea` is `AllParty`, `option` is set to `currentturn`.
If [itemarea](../../Player%20UI/AttackArea.md) is `AllParty`, `option` is set to `currentturn`.
What happens after depends on the `currentchoice` (nothing happen if it's not among these `Actions`).
What happens after depends on the [currentchoice](../Actions.md) (nothing happen if it's not among these `Actions`).
### `Item`
CheckItemUse is called with the `selecteditem` which may end starting a [UseItem](../../Battle%20flow/Action%20coroutines/UseItem.md) action coroutine changing to an [uncontrolled flow](../../Battle%20flow/Update%20flows/Uncontrolled%20flow.md).
However, this item usage may be denied which won't cause UseItem to be called and instead, PlayBuzzer will be called.
The condition for the item usage to be allowed is `playerdata[option].eatenby` must not exist and either `playerdata[option].hp` is above 0 or it's not, but the [item data](../../../TextAsset%20Data/Items%20data.md) of `selecteditem` has a `Revive` or `ReviveAll` `ItemUsage`. It is disallowed otherwise.
The condition for the item usage to be allowed is `playerdata[option].eatenby` must not exist and either `playerdata[option].hp` is above 0 or it's not, but the [item data](../../../TextAsset%20Data/Items%20data.md) of `selecteditem` has a `Revive` or `ReviveAll` `ItemUsage` (meaning the player party member isn't eaten, but it's dead while the item can revive them). It is disallowed otherwise.
### `Relay`
If CanBeRelayed returns true on `option`, a [Relay](../../Battle%20flow/Action%20coroutines/Relay.md) action coroutine is started changing to an [uncontrolled flow](../../Battle%20flow/Update%20flows/Uncontrolled%20flow.md) otherwise, PlayBuzzer is called.
@@ -42,20 +42,20 @@ If CanBeRelayed returns true on `option`, a [Relay](../../Battle%20flow/Action%2
For CanBeRelayed to return true, all of the following must be true on `playerdata[option]` (false is returned otherwise):
- Its `hp` is above 0
- Its `lockrelayreceive` is false
- It doesn't have the `Numb` [condition](../../Actors%20states/Conditions.md)
- It doesn't have the `Sleep` [condition](../../Actors%20states/Conditions.md)
- It doesn't have the `Freeze` [condition](../../Actors%20states/Conditions.md)
- It doesn't have the `Taunted` [condition](../../Actors%20states/Conditions.md)
- It doesn't have the `Sturdy` [condition](../../Actors%20states/Conditions.md)
- It doesn't have the `EventStop` [condition](../../Actors%20states/Conditions.md)
- Its `lockrelayreceive` is false (nothing is preventing the actor from being relayed to)
- It doesn't have the [Numb](../../Actors%20states/BattleCondition/Numb.md) condition
- It doesn't have the [Sleep](../../Actors%20states/BattleCondition/Sleep.md) condition
- It doesn't have the [Freeze](../../Actors%20states/BattleCondition/Freeze.md) condition
- It doesn't have the [Taunted](../../Actors%20states/BattleCondition/Taunted.md) condition
- It doesn't have the [Sturdy](../../Actors%20states/BattleCondition/Sturdy.md) condition
- It doesn't have the [EventStop](../../Actors%20states/BattleCondition/EventStop.md) condition
- It doesn't have an `eatenby`
### `Swap`
A [SwitchPos](../../Battle%20flow/Action%20coroutines/SwitchPos.md) action coroutine is started changing to an [uncontrolled flow](../../Battle%20flow/Update%20flows/Uncontrolled%20flow.md) to swap `currentturn` as the called with `option` as the target.
### `Skill`
For the [skill](../../../Enums%20and%20IDs/Skills.md) to be used, if `skilldata` of `tempskill` reports that it can only target alive party members, `playerdata[target].hp` must be above 0. Alternatively, if `skilldata` of `tempskill` reports that it can only target dead party members, `playerdata[target].hp` must be 0 or below. This doesn't apply if neither restrictions applies on the skill, but no matter what, `playerdata[target].eatenby` must not exist.
For the [skill](../../../Enums%20and%20IDs/Skills.md) to be used, if the [skilldata](../../../TextAsset%20Data/Skills%20data.md#skilldata) of `tempskill` reports that it can only target alive party members, `playerdata[target].hp` must be above 0. Alternatively, if the`skilldata` of `tempskill` reports that it can only target dead party members, `playerdata[target].hp` must be 0 or below. This doesn't apply if neither restrictions applies on the skill, but no matter what, `playerdata[target].eatenby` must not exist.
If the skill can be used, a [DoAction](../../Battle%20flow/Action%20coroutines/DoAction.md) action coroutine is started changing to an [uncontrolled flow](../../Battle%20flow/Update%20flows/Uncontrolled%20flow.md) on `playerdata[currentturn].battleentity` using `tempskill` as the action id.

View File

@@ -1,7 +1,7 @@
# GetChoiceInput
This method manages the UI naviguation called from [PlayerTurn](../Battle%20flow/PlayerTurn.md) when `turncooldown` expired.
The logic depends on the `currentaction` and most of the logic involves input handling through the different menus. The logics are located in their own page matching the corresponding [Pick](Pick.md) value handled by this method (the others are handled somewhere else such as MainManager in the case of an [ItemList](../../ItemList/ItemList.md)).
The logic depends on the [currentaction](Pick.md) and most of the logic involves input handling through the different menus. The logics are located in their own page matching the corresponding [Pick](Pick.md) value handled by this method (the others are handled somewhere else such as MainManager in the case of an [ItemList](../../ItemList/ItemList.md)).
|`currentaction`|Link to its UI handling logic page|
|--------------:|---------------------------------|

View File

@@ -5,32 +5,32 @@ If the confirmation handling needs to move to target selection (which happens fr
private void GotoSelect(bool overridemax)
```
Here is the logic of that method depending on the `itemarea` (nothing happens if it's not among them):
Here is the logic of that method depending on the [itemarea](../Player%20UI/AttackArea.md) (nothing happens if it's not among them):
## `SingleAlly`
- `maxoptions` is set to the length of `playerdata`
- `currentaction` is set to `SelectPlayer`
- [currentaction](Pick.md) is set to `SelectPlayer`
## `SingleEnemy`
- If overridemax is false, `maxoptions` is set to the length of `availabletargets`
- `currentaction` is set to `SelectEnemy`
- [currentaction](Pick.md) is set to `SelectEnemy`
## `AllEnemies`
- `option` is set to 0
- `maxoptions` is set to 1
- `currentaction` is set to `SelectEnemy`
- [currentaction](Pick.md) is set to `SelectEnemy`
## `AllParty`
- `option` is set to `currentturn`
- `maxoptions` is set to 1
- `currentaction` is set to `SelectPlayer`
- [currentaction](Pick.md) is set to `SelectPlayer`
## `All`
- `option` is set to 0
- `maxoptions` is set to 1
- `currentaction` is set to `SelectEnemy`
- [currentaction](Pick.md) is set to `SelectEnemy`

View File

@@ -8,8 +8,8 @@ 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`
- [itemarea](../../Player%20UI/AttackArea.md) is set to `SingleAlly`
- [currentchoice](../Actions.md) is set to `Swap`
- `helpboxid` is set to -1
- `excludeself` is set to true
- If `currentturn` is 0, `option` is set to 1
@@ -18,10 +18,10 @@ Otherwise:
## 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](../../../Enums%20and%20IDs/Medal.md) being equipped on the member (more can stack, these aren't mutually exclusive):
- 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](../../../Enums%20and%20IDs/Medal.md) being equipped on the `currentturn` 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 the `Heal2` sound being played and `MagicUp` particles playing at `playerdata[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 to `playerdata[currentturn].maxhp`. This is followed by the `Heal` sound being played (If no `Meditation` is equipped) and `Heal` particles playing at `playerdata[currentturn].battleentity` position + (0.0, 0.5, 0.0)
- `Reflection`: If no `Prayer` or `Meditation` medals is equipped, the `StatUp` sound is played. This is followed by a [StatEffect](../../Visual%20rendering/StatEffect.md) starting on the battleentity with type 1 (blue, up arrow) and if the player party member doesn't have the `Reflection` condition, [SetCondition](../../Actors%20states/Conditions%20methods/SetCondition.md) is called with `Reflection` on the player party member with a turn amount being the amount of medals equipped
- `Reflection`: If no `Prayer` or `Meditation` medals is equipped, the `StatUp` sound is played. This is followed by a [StatEffect](../../Visual%20rendering/StatEffect.md) starting on the battleentity with type 1 (blue, up arrow) and if the player party member doesn't have the [Reflection](../../Actors%20states/BattleCondition/Reflection.md) condition, [SetCondition](../../Actors%20states/Conditions%20methods/SetCondition.md) is called with `Reflection` 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](../../Battle%20flow/EndPlayerTurn.md) is called
- [CancelList](../CancelList.md) is called
@@ -34,7 +34,7 @@ The `Switch` sound is played followed by a [SwitchParty](../../Battle%20flow/Act
- [ItemList](../../../ItemList/ItemList.md)'s `listredirect` is set to -1 (this is to workaround a potential [inlist issue](../../../ItemList/inlist%20issue.md))
- `availabletargets` is set to the return of GetTattleable which is all `enemydata` whose `notattle` 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:
- `currentaction` is set to `StrategyList`
- [currentaction](../Pick.md) is set to `StrategyList`
- `helpboxid` is set to -1
- A couple of [ItemList](../../../ItemList/ItemList.md) field are initialised (with an instance.`inputcooldown` of 5.0):
- `storeid`: 0
@@ -46,9 +46,9 @@ The `Switch` sound is played followed by a [SwitchParty](../../Battle%20flow/Act
- [UpdateText](../../Visual%20rendering/UpdateText.md) is called
- Otherwise:
- [CreateHelpBox](../../Visual%20rendering/CreateHelpBox.md) with id 0 is called
- `itemarea` is set to `SingleEnemy`
- [itemarea](../../Damage%20pipeline/AttackProperty.md) is set to `SingleEnemy`
- `maxoptions` is set to the length of `availabletargets`
- `currentaction` is set to `SelectEnemy`
- [currentaction](../Pick.md) is set to `SelectEnemy`
## 3 (Flee)
If `canflee` is true, a [TryFlee](../../Battle%20flow/Action%20coroutines/TryFlee.md) action coroutine is started changing to an [uncontrolled flow](../../Battle%20flow/Update%20flows/Uncontrolled%20flow.md). This ends the handler.

View File

@@ -1,15 +1,15 @@
# Skills list type confirmation handling
This page describes the logic [SetItem](../SetItem.md) has when handling a [listtype](../../../ItemList/listtype.md) of [Skills](../../../ItemList/List%20Types%20Group%20Details/Skills%20List%20Type.md).
- `maxoptions` is set to the length of `availabletargets` (NOTE: this should be up to date as [SetTargets](../../Actors%20states/Targetting/SetTargets.md) was called the last time [PlayerTurn](../../Battle%20flow/PlayerTurn.md) happened while we were in the main vine menu)
- `maxoptions` is set to the length of `availabletargets`. This should be up to date as [SetTargets](../../Actors%20states/Targetting/SetTargets.md) was called the last time [PlayerTurn](../../Battle%20flow/PlayerTurn.md) happened while we were in the main vine menu
- `tempskill` is set to the sent `listvar` option which is the chosen [skill](../../../Enums%20and%20IDs/Skills.md) id
- `currentchoice` is set to `Skill`
- [currentchoice](../Actions.md) is set to `Skill`
- `helpboxid` is set to the one that comes from the [skilldata](../../../TextAsset%20Data/Skills%20data.md#skilldata), but if MainManager.`mashcommandalt` is true (sequential keys is set in the settings):
- 4 (`TappingKey`) is overriden to 8 (`RandomTappingKeysTimer`)
- 10 (`RandomTappingBar`) is overriden to 8 (`RandomTappingKeysTimer`)
- 11 (`RandomPressKeyTimer`) is overriden to 8 (`RandomTappingKeysTimer`)
- 9 (`RandomPressBar`) is overriden to 12 (`MultiPressBar`)
- `itemarea` is set to the `AttackArea` from `skilldata`
- `excludeself` is set to the the value from `skilldata`
- If `itemarea` is `User`, there is no need to have [GetChoiceInput](../GetChoiceInput.md) handle this so it is handled immediately by starting a [DoAction](../../Battle%20flow/Action%20coroutines/DoAction.md) action coroutine changing to an [uncontrolled flow](../../Battle%20flow/Update%20flows/Uncontrolled%20flow.md)
- [itemarea](../../Player%20UI/AttackArea.md) is set to the `AttackArea` from [skilldata](../../../TextAsset%20Data/Skills%20data.md)
- `excludeself` is set to the the value from [skilldata](../../../TextAsset%20Data/Skills%20data.md)
- If [itemarea](../../Player%20UI/AttackArea.md) is `User`, there is no need to have [GetChoiceInput](../GetChoiceInput.md) handle this so it is handled immediately by starting a [DoAction](../../Battle%20flow/Action%20coroutines/DoAction.md) action coroutine changing to an [uncontrolled flow](../../Battle%20flow/Update%20flows/Uncontrolled%20flow.md)
- Otherwise, [GotoSelect](../GotoSelect.md) is called with overridemax

View File

@@ -3,17 +3,17 @@ This page describes the logic [SetItem](../SetItem.md) has when handling a [list
- We first check if the item is usable. There are 2 ways in which an item may not be usable:
- Any `ItemUse` from [itemdata](../../../TextAsset%20Data/Items%20data.md#itemdata) has an `UsageType` of `None`
- The `AttackArea` from `itemdata` is `AllEnemies` or `SingleEnemy` and [GetAvaliableTargets](../../Actors%20states/Targetting/GetAvaliableTargets.md) for attackid -1 without onlyground or onlyground, but with excludeunderground causes `availabletargets` to become empty
- The [AttackArea](../../Player%20UI/AttackArea.md) from [itemdata](../../../TextAsset%20Data/Items%20data.md#itemdata) is `AllEnemies` or `SingleEnemy` and [GetAvaliableTargets](../../Actors%20states/Targetting/GetAvaliableTargets.md) for attackid -1 without onlyground or onlyground, but with excludeunderground causes `availabletargets` to become empty (in other words, the item affects one or all enemy party members, but there's no one above ground to be targetted)
- If the item isn't usable, ReturnToMainSelect is called which does the following:
- The `Cancel` sound is played on AudioSource 10
- `currentaction` is set to `BaseAction`
- [currentaction](../Pick.md) is set to `BaseAction`
- `option` is set to `lastoption`
- `selecteditem` is set to -1
- DestroyHelpBox is called which sets `helpboxid` to -1 and destroys `helpbox` if it existed in 0.5 seconds with shrink before setting it to null
- [SetMaxOptions](../SetMaxOptions.md) is called
- [UpdateText](../../Visual%20rendering/UpdateText.md) is called
- Otherwise, if the item is usable:
- `currentchoice` is set to `Item`
- `itemarea` is set to the one from `itemdata`
- [currentchoice](../Actions.md) is set to `Item`
- [itemarea](../../Player%20UI/AttackArea.md) is set to the one from [itemdata](../../../TextAsset%20Data/Items%20data.md#itemdata)
- `helpboxid` is set to -1
- [GotoSelect](../GotoSelect.md) is called without overridemax

View File

@@ -6,8 +6,8 @@ This enum describes the current top level interface the player is naviguating. T
|0|BaseAction|The main vine action menu|
|1|SelectEnemy|Selecting an enemy party member|
|2|SelectPlayer|Selecting a player party member|
|3|SkillList|Selecting a [skill](../../Enums%20and%20IDs/Skills.md) in its [ItemList](../../ItemList/ItemList.md)|
|4|ItemList|Selecting an [item](../../Enums%20and%20IDs/Items.md) in its [ItemList](../../ItemList/ItemList.md)|
|5|StrategyList|Selecting a strategy in its [ItemList](../../ItemList/ItemList.md)|
|3|SkillList|Selecting a [skill](../../Enums%20and%20IDs/Skills.md) in its [ItemList](../../ItemList/List%20Types%20Group%20Details/Skills%20List%20Type.md)|
|4|ItemList|Selecting an [item](../../Enums%20and%20IDs/Items.md) in its [ItemList](../../ItemList/List%20Types%20Group%20Details/Items%20List%20Type.md)|
|5|StrategyList|Selecting a strategy in its [ItemList](../../ItemList/List%20Types%20Group%20Details/Battle%20Strategy%20List%20Type.md)|
|6|Relay|UNUSED|
|7|Chompy|The chompy vine menu used in [Chompy](../Battle%20flow/Action%20coroutines/Chompy.md)|

View File

@@ -15,4 +15,4 @@ The logics are located in their own page matching the corresponding `listtype`.
|-------:|---------------------------------|
|Battle strategy|[Battle strategy list type](ItemList%20confirmation%20handling/Battle%20strategy%20list%20type.md)|
|Skills|[Skills list type](ItemList%20confirmation%20handling/Skills%20list%20type.md)|
|Standard items|[Standard items list type](ItemList%20confirmation%20handling/Standard%20items%20list%20type.md)|
|Standard items|[Standard items list type](ItemList%20confirmation%20handling/Standard%20items%20list%20type.md)|

View File

@@ -8,16 +8,16 @@ This method sets `maxoptions`, `availabletargets` and the `vineicons` meterials
- If `choivevine` exists and `currentturn` isn't negative (a player is selected for acting), the materials of the `vineicons` are updated to MainManager.`grayscale` if the choice is disabled or MainManager.`spritedefaultunity` if the choice is enabled (only applicable if the element at the index exists):
- `vineicons[0]` (attack) option is disabled if there's no `availabletargets`, enabled otherwise
- `vineicons[1]` (skills) option is disabled if any of the following are true about the `playerdata` of `currentturn` (enabled otherwise):
- It has no `skills`
- It has no [skills](../../Enums%20and%20IDs/Skills.md)
- Its `lockskills` is true
- It has the `Inked` [condition](../Actors%20states/Conditions.md)
- It has the `Taunted` [condition](../Actors%20states/Conditions.md)
- It has the [Inked](../Actors%20states/BattleCondition/Inked.md) condition
- It has the [Taunted](../Actors%20states/BattleCondition/Taunted.md) condition
- `vineicons[2]` (items) option is disabled if instance.`items[0]` is empty (no standard items) or any of the following are true about the `playerdata` of `currentturn` (enabled otherwise):
- Its `lockitems` is true
- It has the `Sticky` [condition](../Actors%20states/Conditions.md)
- It has the `Taunted` [condition](../Actors%20states/Conditions.md)
- It has the [Sticky](../Actors%20states/BattleCondition/Sticky.md) condition
- It has the [Taunted](../Actors%20states/BattleCondition/Taunted.md)
- `vineicons[4]` (turn relay) option is disabled if there's only one `playerdata` or any of the following are true about the `playerdata` of `currentturn` (enabled otherwise):
- Its `haspassed` is true
- Its `locktri` is true
- It has the `Taunted` [condition](../Actors%20states/Conditions.md)
- Its `haspassed` is true (a relay from this player party member already happened in the same main turn)
- Its `locktri` is true (relay is disabled)
- It has the [Taunted](../Actors%20states/BattleCondition/Taunted.md)
- `vineoption` is set to `maxoption`

View File

@@ -15,7 +15,7 @@ This section only applies if `choicevine` exists which is after [StartBattle](..
## `cursor` updates
This section only applies if `cursor` exists which is after [StartBattle](../StartBattle.md) called CreateCursor.
The `cursor` is only rendered on screen if we are in a [controlled flow](../Battle%20flow/Update%20flows/Controlled%20flow.md) while [currentaction](../Player%20UI/Pick.md) isn't `BaseAction` (the main vine action menu) and [itemarea](../AttackArea.md) is `SingleAlly` or `SingleEnemy`. Otherwise, its position is set to offscreen at (0.0, 100.0, 0.0)
The `cursor` is only rendered on screen if we are in a [controlled flow](../Battle%20flow/Update%20flows/Controlled%20flow.md) while [currentaction](../Player%20UI/Pick.md) isn't `BaseAction` (the main vine action menu) and [itemarea](../Player%20UI/AttackArea.md) is `SingleAlly` or `SingleEnemy`. Otherwise, its position is set to offscreen at (0.0, 100.0, 0.0)
When it needs to be rendered, the `cursor` position setting logic depends on [currentaction](../Player%20UI/Pick.md).
### `SelectEnemy`

View File

@@ -69,7 +69,7 @@ This section depends on the `currentaction`
- `actiontext` local position is set to (-5.0, -2.5, 10.0)
- All SetText objects under `actiontext` are destroyed via MainManager.DestroyText
- A string is built depending on the [itemarea](../AttackArea.md), but it always starts with `|`[center](../../SetText/Individual%20commands/Center.md)`|`:
- A string is built depending on the [itemarea](../Player%20UI/AttackArea.md), but it always starts with `|`[center](../../SetText/Individual%20commands/Center.md)`|`:
- `SingleEnemy`:
- If the [languageid](../../SetText/languageid.md#languageid) is `Japanese` or the `availabletargets[option].entityname` (the selected enemy's name) has a length of 5 or above, `|`[size](../../SetText/Individual%20commands/size.md)`,X,0.7|` is appended where `X` is 1.0 - 0.05 * `availabletargets[option].entityname.length` - 5 clamped from 0.5 to 0.8
- `avaliabletargets[option].entityname` is appended
@@ -83,7 +83,7 @@ This section depends on the `currentaction`
- `actiontext` local position is set to (-5.0, -2.5, 10.0)
- All SetText objects under `actiontext` are destroyed via MainManager.DestroyText
- A string is built depending on the [itemarea](../AttackArea.md), but it always starts with `|`[center](../../SetText/Individual%20commands/Center.md)`|`:
- A string is built depending on the [itemarea](../Player%20UI/AttackArea.md), but it always starts with `|`[center](../../SetText/Individual%20commands/Center.md)`|`:
- `SingleAlly`:
- `playerdata[option].entityname` is appended
- If [currentchoice](../Player%20UI/Actions.md) is `Item` while the `WeakStomach` [medal](../../Enums%20and%20IDs/Medal.md) is equipped on `playerdata[option].trueid`, ` |`[size](../../SetText/Individual%20commands/size.md)`,1,0.6||`[icon](../../SetText/Individual%20commands/Icon.md)`,184|` is appended