Fix player UI links
This commit is contained in:
@@ -9,22 +9,22 @@ This input is handled specifically where pressing it will set `idletimer` to 250
|
||||
## 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](../Visual%20rendering/UpdateText.md) being called.
|
||||
Either input will have `caninputcooldown` set to 2.0 frames, a `Scroll` sound played on `sounds[10]` and [UpdateText](../../Visual%20rendering/UpdateText.md) being called.
|
||||
|
||||
## Input 5 (cancel)
|
||||
This input is only processed if [GetFreePlayerAmmount](../Actors%20states/GetFreePlayerAmmount.md) returns more than 1 player being free to act.
|
||||
This input is only processed if [GetFreePlayerAmmount](../../Actors%20states/Player%20party%20members/GetFreePlayerAmmount.md) returns more than 1 player being free to act.
|
||||
|
||||
- `caninputcooldown` is set to 2.0 frames
|
||||
- The `Money` sound 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
|
||||
- `lastoption` is set to `option`
|
||||
- `currentturn` is set to -1 which unselects the player (the new one will be cycle on the next [player phase](../Battle%20flow/Update.md#player-phase) update)
|
||||
- `currentturn` is set to -1 which unselects the player (the new one will be cycle on the next [player phase](../../Battle%20flow/Update.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.
|
||||
|
||||
- `caninputcooldown` is set to 2.0
|
||||
- The `Switch` sound is played
|
||||
- The [SwitchParty](../Battle%20flow/Action%20coroutines/SwitchParty.md) action coroutine is started (without fast) which changes to an [uncontrolled flow](../Battle%20flow/Update.md#uncontrolled-flow)
|
||||
- The [SwitchParty](../../Battle%20flow/Action%20coroutines/SwitchParty.md) action coroutine is started (without fast) which changes to an [uncontrolled flow](../../Battle%20flow/Update.md#uncontrolled-flow)
|
||||
|
||||
## Input 4 (confirm)
|
||||
|
||||
@@ -36,11 +36,11 @@ This input is only processed when AllPartyFree returns true (all `playerdata` ha
|
||||
- `lastaction` is set to `option`
|
||||
- `currentchoice` 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` and after, [UpdateText](../../Visual%20rendering/UpdateText.md) is called.
|
||||
|
||||
### `Attack`
|
||||
|
||||
- [SetTargets](../Actors%20states/SetTargets.md) is called
|
||||
- [SetTargets](../../Actors%20states/Targetting/SetTargets.md) is called
|
||||
- If there's no `availabletargets`, PlayBuzzer is called
|
||||
- Otherwise:
|
||||
- `maxoptions` is set to the length of `availabletargets`
|
||||
@@ -51,49 +51,49 @@ From there, what happens depends on `currentchoice` and after, [UpdateText](../V
|
||||
### `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` or `Inked` [condition](../../Actors%20states/Conditions.md), PlayBuzzer is called
|
||||
- Otherwise:
|
||||
- `currentaction` 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):
|
||||
- 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
|
||||
- [listtype](../../ItemList/listtype.md): -`currentturn` - 1 which is the [skills list type](../../ItemList/List%20Types%20Group%20Details/Skills%20List%20Type.md) of the corresponding player party member
|
||||
- [listtype](../../../ItemList/listtype.md): -`currentturn` - 1 which is the [skills list type](../../../ItemList/List%20Types%20Group%20Details/Skills%20List%20Type.md) of the corresponding player party member
|
||||
- `listammount`: 5
|
||||
- `listdesc`: true
|
||||
- `listsell`: false
|
||||
- [ShowItemList](../../ItemList/ShowItemList.md) is called with -`currentturn` - 1 as the list type, MainManager.`defaultlistpos` as the position with showdescription and without sell
|
||||
- [ShowItemList](../../../ItemList/ShowItemList.md) is called with -`currentturn` - 1 as the list type, MainManager.`defaultlistpos` as the position with showdescription and without sell
|
||||
|
||||
### `Item`
|
||||
|
||||
- `excludeself` is set to false
|
||||
- [GetAvaliableTargets](../Actors%20states/GetAvaliableTargets.md) is called with onlyground without onlyfront using -1 as the acttackid
|
||||
- [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
|
||||
- Otherwise:
|
||||
- `currentaction` is set to `ItemList`
|
||||
- A couple of [ItemList](../../ItemList/ItemList.md) field are initialised (with an instance.`inputcooldown` of 5.0):
|
||||
- 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)
|
||||
- [listtype](../../../ItemList/listtype.md): 0 which is the [standard items list type](../../../ItemList/List%20Types%20Group%20Details/Items%20List%20Type.md)
|
||||
- `listammount`: 5
|
||||
- `listdesc`: true
|
||||
- `listsell`: false
|
||||
- [ShowItemList](../../ItemList/ShowItemList.md) is called with 0 as the list type, MainManager.`defaultlistpos` as the position with showdescription and without sell
|
||||
- [UpdateText](../Visual%20rendering/UpdateText.md) is called
|
||||
- [ShowItemList](../../../ItemList/ShowItemList.md) is called with 0 as the list type, MainManager.`defaultlistpos` as the position with showdescription and without sell
|
||||
- [UpdateText](../../Visual%20rendering/UpdateText.md) is called
|
||||
|
||||
### `Strategy`
|
||||
|
||||
- `currentaction` is set to `StrategyList`
|
||||
- A couple of [ItemList](../../ItemList/ItemList.md) field are initialised (with an instance.`inputcooldown` of 5.0):
|
||||
- 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)
|
||||
- [listtype](../../../ItemList/listtype.md): 9 which is the [battle strategy list type](../../../ItemList/List%20Types%20Group%20Details/Battle%20Strategy%20List%20Type.md)
|
||||
- `listammount`: 6
|
||||
- `listdesc`: true
|
||||
- `listsell`: false
|
||||
- [ShowItemList](../../ItemList/ShowItemList.md) is called with 9 as the list type, MainManager.`defaultlistpos` as the position with showdescription and without sell
|
||||
- [UpdateText](../Visual%20rendering/UpdateText.md) is called
|
||||
- [ShowItemList](../../../ItemList/ShowItemList.md) is called with 9 as the list type, MainManager.`defaultlistpos` as the position with showdescription and without sell
|
||||
- [UpdateText](../../Visual%20rendering/UpdateText.md) is called
|
||||
|
||||
### `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` or `haspassed` is true or it has the `Taunted` [condition](../../Actors%20states/Conditions.md), PlayBuzzer is called
|
||||
- Otherwise:
|
||||
- `excludeself` is set to true
|
||||
- `option` is set to 0
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# `SelectEnemy` ChoiceInput logic
|
||||
This page details the logic of [GetChoiceInput](../GetChoiceInput.md) when `currentaction` is `SelectEnemy`.
|
||||
|
||||
[CreateHelpBox](../Visual%20rendering/CreateHelpBox.md) is called followed by `excludeself` being set to false.
|
||||
[CreateHelpBox](../../Visual%20rendering/CreateHelpBox.md) is called followed by `excludeself` being set to false.
|
||||
|
||||
The rest is input handling logic.
|
||||
|
||||
@@ -10,7 +10,7 @@ These 2 inputs are only processed if `itemarea` isn't `AllParty`, `AllEnemies` o
|
||||
|
||||
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](../Visual%20rendering/UpdateText.md) is called after changing it.
|
||||
Additionally, a `Scroll` sound played on `sounds[10]` before changing the `option` and [UpdateText](../../Visual%20rendering/UpdateText.md) is called after changing it.
|
||||
|
||||
## Input 5 (cancel)
|
||||
ReturnToMainSelect is called which does the following:
|
||||
@@ -20,8 +20,8 @@ ReturnToMainSelect is called which does the following:
|
||||
- `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
|
||||
- [SetMaxOptions](../SetMaxOptions.md) is called
|
||||
- [UpdateText](../../Visual%20rendering/UpdateText.md) is called
|
||||
|
||||
## Input 4 (confirm)
|
||||
A `Confirm` sound is played on `sounds[10]` followed by `target` being set to `option`.
|
||||
@@ -29,18 +29,18 @@ A `Confirm` sound is played on `sounds[10]` followed by `target` being set to `o
|
||||
What happens after depends on the `currentchoice` (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.md#uncontrolled-flow) 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.md#uncontrolled-flow) on `playerdata[currentturn].battleentity` using -1 as the action 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.md#uncontrolled-flow).
|
||||
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.md#uncontrolled-flow).
|
||||
|
||||
### `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.md#uncontrolled-flow) 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.md#uncontrolled-flow) on `playerdata[currentturn].battleentity` using `selecteditem` as the action id.
|
||||
|
||||
### `Strategy`
|
||||
|
||||
- [ItemList](../../ItemList/ItemList.md)'s `listredirect` is set to -1 (this workarounds a potential [inlist issue](../../ItemList/inlist%20issue.md))
|
||||
- [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`
|
||||
- A [Tattle](../Battle%20flow/Action%20coroutines/Tattle.md) action coroutine is started changing to an [uncontrolled flow](../Battle%20flow/Update.md#uncontrolled-flow) if `disablespy` is false.
|
||||
- A [Tattle](../../Battle%20flow/Action%20coroutines/Tattle.md) action coroutine is started changing to an [uncontrolled flow](../../Battle%20flow/Update.md#uncontrolled-flow) if `disablespy` is false.
|
||||
|
||||
@@ -13,7 +13,7 @@ These inputs changes the `option` by one depending on the direction (decrement i
|
||||
|
||||
TODO: something is suspicious here: it feels like depending on things, it could be possible to break player selection combined with swaps...
|
||||
|
||||
Additionally, a `Scroll` sound played on `sounds[10]` before changing the `option` and [UpdateText](../Visual%20rendering/UpdateText.md) is called after changing it.
|
||||
Additionally, a `Scroll` sound played on `sounds[10]` before changing the `option` and [UpdateText](../../Visual%20rendering/UpdateText.md) is called after changing it.
|
||||
|
||||
## Input 5 (cancel)
|
||||
ReturnToMainSelect is called which does the following:
|
||||
@@ -23,8 +23,8 @@ ReturnToMainSelect is called which does the following:
|
||||
- `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
|
||||
- [SetMaxOptions](../SetMaxOptions.md) is called
|
||||
- [UpdateText](../../Visual%20rendering/UpdateText.md) is called
|
||||
|
||||
## Input 4 (confirm)
|
||||
If `itemarea` is `AllParty`, `option` is set to `currentturn`.
|
||||
@@ -32,33 +32,33 @@ If `itemarea` is `AllParty`, `option` is set to `currentturn`.
|
||||
What happens after depends on the `currentchoice` (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.md#uncontrolled-flow).
|
||||
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.md#uncontrolled-flow).
|
||||
|
||||
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`. 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.md#uncontrolled-flow) otherwise, PlayBuzzer is called.
|
||||
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.md#uncontrolled-flow) otherwise, PlayBuzzer is called.
|
||||
|
||||
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)
|
||||
- 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)
|
||||
- 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.md#uncontrolled-flow) to swap `currentturn` as the called with `option` as the target.
|
||||
A [SwitchPos](../../Battle%20flow/Action%20coroutines/SwitchPos.md) action coroutine is started changing to an [uncontrolled flow](../../Battle%20flow/Update.md#uncontrolled-flow) 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 `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.
|
||||
|
||||
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.md#uncontrolled-flow) on `playerdata[currentturn].battleentity` using `tempskill` as the action id.
|
||||
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.md#uncontrolled-flow) on `playerdata[currentturn].battleentity` using `tempskill` as the action id.
|
||||
|
||||
Otherwise, PlayBuzzer is called
|
||||
@@ -18,47 +18,47 @@ 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 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` 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
|
||||
- [EndPlayerTurn](../../Battle%20flow/EndPlayerTurn.md) is called
|
||||
- [CancelList](../CancelList.md) is called
|
||||
|
||||
## 0 (Switch)
|
||||
The `Switch` sound is played followed by a [SwitchParty](../Battle%20flow/Action%20coroutines/SwitchParty.md#switchparty) action coroutine starting switching to an [uncontrolled flow](../Battle%20flow/Update.md#uncontrolled-flow).
|
||||
The `Switch` sound is played followed by a [SwitchParty](../../Battle%20flow/Action%20coroutines/SwitchParty.md#switchparty) action coroutine starting switching to an [uncontrolled flow](../../Battle%20flow/Update.md#uncontrolled-flow).
|
||||
|
||||
## 1 (Spy)
|
||||
|
||||
- [ItemList](../../ItemList/ItemList.md)'s `listredirect` is set to -1 (this is to workaround a potential [inlist issue](../../ItemList/inlist%20issue.md))
|
||||
- [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`
|
||||
- `helpboxid` is set to -1
|
||||
- A couple of [ItemList](../../ItemList/ItemList.md) field are initialised (with an instance.`inputcooldown` of 5.0):
|
||||
- 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)
|
||||
- [listtype](../../../ItemList/listtype.md): 9 which is the [battle strategy list type](../../../ItemList/List%20Types%20Group%20Details/Battle%20Strategy%20List%20Type.md)
|
||||
- `listammount`: 6
|
||||
- `listdesc`: true
|
||||
- `listsell`: false
|
||||
- [ShowItemList](../../ItemList/ShowItemList.md) is called with 9 as the list type, MainManager.`defaultlistpos` as the position with showdescription and without sell
|
||||
- [UpdateText](../Visual%20rendering/UpdateText.md) is called
|
||||
- [ShowItemList](../../../ItemList/ShowItemList.md) is called with 9 as the list type, MainManager.`defaultlistpos` as the position with showdescription and without sell
|
||||
- [UpdateText](../../Visual%20rendering/UpdateText.md) is called
|
||||
- Otherwise:
|
||||
- [CreateHelpBox](../Visual%20rendering/CreateHelpBox.md) with id 0 is called
|
||||
- [CreateHelpBox](../../Visual%20rendering/CreateHelpBox.md) with id 0 is called
|
||||
- `itemarea` is set to `SingleEnemy`
|
||||
- `maxoptions` is set to the length of `availabletargets`
|
||||
- `currentaction` 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.md#uncontrolled-flow). This ends the handler.
|
||||
If `canflee` is true, a [TryFlee](../../Battle%20flow/Action%20coroutines/TryFlee.md) action coroutine is started changing to an [uncontrolled flow](../../Battle%20flow/Update.md#uncontrolled-flow). This ends the handler.
|
||||
|
||||
If it's false however:
|
||||
|
||||
- [CancelList](CancelList.md) is called
|
||||
- [ItemList](../../ItemList/ItemList.md)'s `listredirect` is set to -1 (this is to workaround a potential [inlist issue](../../ItemList/inlist%20issue.md))
|
||||
- [SetText](../../SetText/SetText.md) is called in [dialogue mode](../../SetText/Dialogue%20mode.md) using `|`[boxstyle](../../SetText/Individual%20commands/Boxstyle.md)`,4||`[spd](../../SetText/Individual%20commands/Spd.md)`,0|` followed by `menutext[73]` (a message informing the player they cannot flee) as the text and the following:
|
||||
- [fonttype](../../SetText/Notable%20states.md#fonttype) of 0 (`BubblegumSans`)
|
||||
- [CancelList](../CancelList.md) is called
|
||||
- [ItemList](../../../ItemList/ItemList.md)'s `listredirect` is set to -1 (this is to workaround a potential [inlist issue](../../../ItemList/inlist%20issue.md))
|
||||
- [SetText](../../../SetText/SetText.md) is called in [dialogue mode](../../../SetText/Dialogue%20mode.md) using `|`[boxstyle](../../../SetText/Individual%20commands/Boxstyle.md)`,4||`[spd](../../../SetText/Individual%20commands/Spd.md)`,0|` followed by `menutext[73]` (a message informing the player they cannot flee) as the text and the following:
|
||||
- [fonttype](../../../SetText/Notable%20states.md#fonttype) of 0 (`BubblegumSans`)
|
||||
- linebreak of MainManager.`messagebreak`
|
||||
- No tridimensional
|
||||
- position of Vector3.zero
|
||||
@@ -66,5 +66,5 @@ If it's false however:
|
||||
- size of Vector2.one
|
||||
- No parent
|
||||
- No caller
|
||||
- A `WaitForMessage` coroutine is started which yields as long as the [message](../../SetText/Notable%20states.md#message) lock is grabbed followed by calling [UpdateText](../Visual%20rendering/UpdateText.md) followed by a frame yield
|
||||
- [UpdateText](../Visual%20rendering/UpdateText.md) is called
|
||||
- A `WaitForMessage` coroutine is started which yields as long as the [message](../../../SetText/Notable%20states.md#message) lock is grabbed followed by calling [UpdateText](../../Visual%20rendering/UpdateText.md) followed by a frame yield
|
||||
- [UpdateText](../../Visual%20rendering/UpdateText.md) is called
|
||||
|
||||
@@ -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/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
|
||||
- `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)
|
||||
- `tempskill` is set to the sent `listvar` option which is the chosen [skill](../../../Enums%20and%20IDs/Skills.md) id
|
||||
- `currentchoice` 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):
|
||||
- `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.md#uncontrolled-flow)
|
||||
- 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.md#uncontrolled-flow)
|
||||
- Otherwise, [GotoSelect](../GotoSelect.md) is called with overridemax
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
This page describes the logic [SetItem](../SetItem.md) has when handling a [listtype](../../../ItemList/listtype.md) of [standard items](../../../ItemList/List%20Types%20Group%20Details/Items%20List%20Type.md).
|
||||
|
||||
- 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/GetAvaliableTargets.md) for attackid -1 without onlyground or onlyground, but with excludeunderground causes `availabletargets` to become empty
|
||||
- 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
|
||||
- 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`
|
||||
- `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
|
||||
- [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`
|
||||
|
||||
@@ -4,7 +4,7 @@ This method sets `maxoptions`, `availabletargets` and the `vineicons` meterials
|
||||
- `maxoption` is set to 3 (gives access to attack, skills and items options)
|
||||
- If [flag](../../Flags%20arrays/flags.md) 15 is true (after combat tutorial), `maxoption` is incremented (gives access to the stategies option)
|
||||
- If [flag](../../Flags%20arrays/flags.md) 16 is true (Leif is able to fight in battle), `maxoption` is incremented (gives access to the turn relay option)
|
||||
- [SetTargets](../Actors%20states/SetTargets.md) is called
|
||||
- [SetTargets](../Actors%20states/Targetting/SetTargets.md) is called
|
||||
- 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):
|
||||
|
||||
Reference in New Issue
Block a user