From 021a8195f0c854034d93f00a3c11bfca53d358cf Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Mon, 18 Aug 2025 01:24:09 +0300 Subject: [PATCH 1/3] New and updated phase and step functions --- api/functions/Duel/IsBattlePhase.yml | 10 ++++++++-- api/functions/Duel/IsBattleStep.yml | 17 +++++++++++++++++ api/functions/Duel/IsDamageCalculation.yml | 17 +++++++++++++++++ api/functions/Duel/IsDamageStep.yml | 17 +++++++++++++++++ api/functions/Duel/IsDrawPhase.yml | 17 +++++++++++++++++ api/functions/Duel/IsEndOfBattlePhase.yml | 21 +++++++++++++++++++++ api/functions/Duel/IsEndPhase.yml | 17 +++++++++++++++++ api/functions/Duel/IsMainPhase.yml | 10 ++++++++-- api/functions/Duel/IsMainPhase1.yml | 17 +++++++++++++++++ api/functions/Duel/IsMainPhase2.yml | 17 +++++++++++++++++ api/functions/Duel/IsStandbyPhase.yml | 17 +++++++++++++++++ api/functions/Duel/IsStartOfBattlePhase.yml | 21 +++++++++++++++++++++ 12 files changed, 194 insertions(+), 4 deletions(-) create mode 100644 api/functions/Duel/IsBattleStep.yml create mode 100644 api/functions/Duel/IsDamageCalculation.yml create mode 100644 api/functions/Duel/IsDamageStep.yml create mode 100644 api/functions/Duel/IsDrawPhase.yml create mode 100644 api/functions/Duel/IsEndOfBattlePhase.yml create mode 100644 api/functions/Duel/IsEndPhase.yml create mode 100644 api/functions/Duel/IsMainPhase1.yml create mode 100644 api/functions/Duel/IsMainPhase2.yml create mode 100644 api/functions/Duel/IsStandbyPhase.yml create mode 100644 api/functions/Duel/IsStartOfBattlePhase.yml diff --git a/api/functions/Duel/IsBattlePhase.yml b/api/functions/Duel/IsBattlePhase.yml index c4eb446c..70de6eed 100644 --- a/api/functions/Duel/IsBattlePhase.yml +++ b/api/functions/Duel/IsBattlePhase.yml @@ -2,10 +2,16 @@ name: IsBattlePhase namespace: Duel description: >- - Returns if the current phase is the Battle Phase (between PHASE_BATTLE_START and PHASE_BATTLE) + Checks if it is currently the Battle Phase. If `player` is provided it will also check that it is currently that player's turn. status: index: stable +parameters: + - name: player + type: [ int ] + description: (To be added) + required: false returns: - type: [ bool ] - description: (To be added) + description: >- + `true` if it is currently the Battle Phase, `false` otherwise. tags: [ under-construction ] diff --git a/api/functions/Duel/IsBattleStep.yml b/api/functions/Duel/IsBattleStep.yml new file mode 100644 index 00000000..a2b5c917 --- /dev/null +++ b/api/functions/Duel/IsBattleStep.yml @@ -0,0 +1,17 @@ +---!function +name: IsBattleStep +namespace: Duel +description: >- + Checks if it is currently the Battle Step. If `player` is provided it will also check that it is currently that player's turn. +status: + index: stable +parameters: + - name: player + type: [ int ] + description: (To be added) + required: false +returns: + - type: [ bool ] + description: >- + `true` if it is currently the Battle Step, `false` otherwise. +tags: [ under-construction ] diff --git a/api/functions/Duel/IsDamageCalculation.yml b/api/functions/Duel/IsDamageCalculation.yml new file mode 100644 index 00000000..ace11be5 --- /dev/null +++ b/api/functions/Duel/IsDamageCalculation.yml @@ -0,0 +1,17 @@ +---!function +name: IsDamageCalculation +namespace: Duel +description: >- + Checks if it is currently during Damage Calculation. If `player` is provided it will also check that it is currently that player's turn. +status: + index: stable +parameters: + - name: player + type: [ int ] + description: (To be added) + required: false +returns: + - type: [ bool ] + description: >- + `true` if it is currently during Damage Calculation, `false` otherwise. +tags: [ under-construction ] diff --git a/api/functions/Duel/IsDamageStep.yml b/api/functions/Duel/IsDamageStep.yml new file mode 100644 index 00000000..7beb499d --- /dev/null +++ b/api/functions/Duel/IsDamageStep.yml @@ -0,0 +1,17 @@ +---!function +name: IsDamageStep +namespace: Duel +description: >- + Checks if it is currently the Damage Step. If `player` is provided it will also check that it is currently that player's turn. +status: + index: stable +parameters: + - name: player + type: [ int ] + description: (To be added) + required: false +returns: + - type: [ bool ] + description: >- + `true` if it is currently the Damage Step, `false` otherwise. +tags: [ under-construction ] diff --git a/api/functions/Duel/IsDrawPhase.yml b/api/functions/Duel/IsDrawPhase.yml new file mode 100644 index 00000000..e347c14c --- /dev/null +++ b/api/functions/Duel/IsDrawPhase.yml @@ -0,0 +1,17 @@ +---!function +name: IsDrawPhase +namespace: Duel +description: >- + Checks if it is currently the Draw Phase. If `player` is provided it will also check that it is currently that player's turn. +status: + index: stable +parameters: + - name: player + type: [ int ] + description: (To be added) + required: false +returns: + - type: [ bool ] + description: >- + `true` if it is currently the Draw Phase, `false` otherwise. +tags: [ under-construction ] diff --git a/api/functions/Duel/IsEndOfBattlePhase.yml b/api/functions/Duel/IsEndOfBattlePhase.yml new file mode 100644 index 00000000..1fe28da1 --- /dev/null +++ b/api/functions/Duel/IsEndOfBattlePhase.yml @@ -0,0 +1,21 @@ +---!function +name: IsEndOfBattlePhase +namespace: Duel +description: >- + Checks if it is currently the end of the Battle Phase (End Step). If `player` is provided it will also check that it is currently that player's turn. +status: + index: stable +aliases: + - name: Duel.IsEndStep + status: + index: stable +parameters: + - name: player + type: [ int ] + description: (To be added) + required: false +returns: + - type: [ bool ] + description: >- + `true` if it is currently the end of the Battle Phase (End Step), `false` otherwise. +tags: [ under-construction ] diff --git a/api/functions/Duel/IsEndPhase.yml b/api/functions/Duel/IsEndPhase.yml new file mode 100644 index 00000000..bc97432e --- /dev/null +++ b/api/functions/Duel/IsEndPhase.yml @@ -0,0 +1,17 @@ +---!function +name: IsEndPhase +namespace: Duel +description: >- + Checks if it is currently the End Phase. If `player` is provided it will also check that it is currently that player's turn. +status: + index: stable +parameters: + - name: player + type: [ int ] + description: (To be added) + required: false +returns: + - type: [ bool ] + description: >- + `true` if it is currently the End Phase, `false` otherwise. +tags: [ under-construction ] diff --git a/api/functions/Duel/IsMainPhase.yml b/api/functions/Duel/IsMainPhase.yml index 4e7e59dc..964fc264 100644 --- a/api/functions/Duel/IsMainPhase.yml +++ b/api/functions/Duel/IsMainPhase.yml @@ -2,10 +2,16 @@ name: IsMainPhase namespace: Duel description: >- - Returns if the current phase is either Main Phase 1 or Main Phase 2. + Checks if it is currently the Main Phase. If `player` is provided it will also check that it is currently that player's turn. status: index: stable +parameters: + - name: player + type: [ int ] + description: (To be added) + required: false returns: - type: [ bool ] - description: (To be added) + description: >- + `true` if it is currently the Main Phase, `false` otherwise. tags: [ under-construction ] diff --git a/api/functions/Duel/IsMainPhase1.yml b/api/functions/Duel/IsMainPhase1.yml new file mode 100644 index 00000000..46a64e86 --- /dev/null +++ b/api/functions/Duel/IsMainPhase1.yml @@ -0,0 +1,17 @@ +---!function +name: IsMainPhase1 +namespace: Duel +description: >- + Checks if it is currently the Main Phase 1. If `player` is provided it will also check that it is currently that player's turn. +status: + index: stable +parameters: + - name: player + type: [ int ] + description: (To be added) + required: false +returns: + - type: [ bool ] + description: >- + `true` if it is currently the Main Phase 1, `false` otherwise. +tags: [ under-construction ] diff --git a/api/functions/Duel/IsMainPhase2.yml b/api/functions/Duel/IsMainPhase2.yml new file mode 100644 index 00000000..5d7e8209 --- /dev/null +++ b/api/functions/Duel/IsMainPhase2.yml @@ -0,0 +1,17 @@ +---!function +name: IsMainPhase2 +namespace: Duel +description: >- + Checks if it is currently the Main Phase 2. If `player` is provided it will also check that it is currently that player's turn. +status: + index: stable +parameters: + - name: player + type: [ int ] + description: (To be added) + required: false +returns: + - type: [ bool ] + description: >- + `true` if it is currently the Main Phase 2, `false` otherwise. +tags: [ under-construction ] diff --git a/api/functions/Duel/IsStandbyPhase.yml b/api/functions/Duel/IsStandbyPhase.yml new file mode 100644 index 00000000..15659080 --- /dev/null +++ b/api/functions/Duel/IsStandbyPhase.yml @@ -0,0 +1,17 @@ +---!function +name: IsStandbyPhase +namespace: Duel +description: >- + Checks if it is currently the Standby Phase. If `player` is provided it will also check that it is currently that player's turn. +status: + index: stable +parameters: + - name: player + type: [ int ] + description: (To be added) + required: false +returns: + - type: [ bool ] + description: >- + `true` if it is currently the Standby Phase, `false` otherwise. +tags: [ under-construction ] diff --git a/api/functions/Duel/IsStartOfBattlePhase.yml b/api/functions/Duel/IsStartOfBattlePhase.yml new file mode 100644 index 00000000..1c1e7ef7 --- /dev/null +++ b/api/functions/Duel/IsStartOfBattlePhase.yml @@ -0,0 +1,21 @@ +---!function +name: IsStartOfBattlePhase +namespace: Duel +description: >- + Checks if it is currently the start of the Battle Phase (Start Step). If `player` is provided it will also check that it is currently that player's turn. +status: + index: stable +aliases: + - name: Duel.IsStartStep + status: + index: stable +parameters: + - name: player + type: [ int ] + description: (To be added) + required: false +returns: + - type: [ bool ] + description: >- + `true` if it is currently the start of the Battle Phase (Start Step), `false` otherwise. +tags: [ under-construction ] From fee5e50b8d51aafcac8b4f28053f0504d3e086b7 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Mon, 18 Aug 2025 01:30:35 +0300 Subject: [PATCH 2/3] fixed wrong param order --- api/functions/Duel/ProcedureSummon.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/functions/Duel/ProcedureSummon.yml b/api/functions/Duel/ProcedureSummon.yml index 6b926b4a..ea720a3c 100644 --- a/api/functions/Duel/ProcedureSummon.yml +++ b/api/functions/Duel/ProcedureSummon.yml @@ -9,12 +9,12 @@ parameters: - name: player type: [ int ] description: (To be added) - - name: sumtype - type: [ int ] - description: (To be added) - name: c type: [ Card ] description: (To be added) + - name: sumtype + type: [ int ] + description: (To be added) - name: must_use type: [ Group, Card, nil ] description: (To be added) From 805f063275ec171d5f40f7ab6f7f53f375eb95e0 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Wed, 20 Aug 2025 00:03:39 +0800 Subject: [PATCH 3/3] edits --- api/functions/Duel/IsBattlePhase.yml | 8 ++++---- api/functions/Duel/IsBattleStep.yml | 7 +++---- api/functions/Duel/IsDamageCalculation.yml | 8 ++++---- api/functions/Duel/IsDamageStep.yml | 8 ++++---- api/functions/Duel/IsDrawPhase.yml | 8 ++++---- api/functions/Duel/IsEndOfBattlePhase.yml | 8 ++++---- api/functions/Duel/IsEndPhase.yml | 8 ++++---- api/functions/Duel/IsMainPhase.yml | 8 ++++---- api/functions/Duel/IsMainPhase1.yml | 8 ++++---- api/functions/Duel/IsMainPhase2.yml | 8 ++++---- api/functions/Duel/IsStandbyPhase.yml | 8 ++++---- api/functions/Duel/IsStartOfBattlePhase.yml | 8 ++++---- api/functions/Duel/ProcedureSummon.yml | 20 ++++++++++---------- 13 files changed, 57 insertions(+), 58 deletions(-) diff --git a/api/functions/Duel/IsBattlePhase.yml b/api/functions/Duel/IsBattlePhase.yml index 70de6eed..3d5ba78b 100644 --- a/api/functions/Duel/IsBattlePhase.yml +++ b/api/functions/Duel/IsBattlePhase.yml @@ -1,17 +1,17 @@ ---!function name: IsBattlePhase namespace: Duel -description: >- - Checks if it is currently the Battle Phase. If `player` is provided it will also check that it is currently that player's turn. +description: &desc >- + Checks if it is currently the Battle Phase. +summary: *desc status: index: stable parameters: - name: player type: [ int ] - description: (To be added) + description: If provided, the function will also check if it is currently that player's turn. required: false returns: - type: [ bool ] description: >- `true` if it is currently the Battle Phase, `false` otherwise. -tags: [ under-construction ] diff --git a/api/functions/Duel/IsBattleStep.yml b/api/functions/Duel/IsBattleStep.yml index a2b5c917..aa6d7475 100644 --- a/api/functions/Duel/IsBattleStep.yml +++ b/api/functions/Duel/IsBattleStep.yml @@ -1,17 +1,16 @@ ---!function name: IsBattleStep namespace: Duel -description: >- - Checks if it is currently the Battle Step. If `player` is provided it will also check that it is currently that player's turn. +description: &desc Checks if it is currently the Battle Step. +summary: *desc status: index: stable parameters: - name: player type: [ int ] - description: (To be added) + description: If provided, the function will also check if it is currently that player's turn. required: false returns: - type: [ bool ] description: >- `true` if it is currently the Battle Step, `false` otherwise. -tags: [ under-construction ] diff --git a/api/functions/Duel/IsDamageCalculation.yml b/api/functions/Duel/IsDamageCalculation.yml index ace11be5..e46c4b90 100644 --- a/api/functions/Duel/IsDamageCalculation.yml +++ b/api/functions/Duel/IsDamageCalculation.yml @@ -1,17 +1,17 @@ ---!function name: IsDamageCalculation namespace: Duel -description: >- - Checks if it is currently during Damage Calculation. If `player` is provided it will also check that it is currently that player's turn. +description: &desc >- + Checks if it is currently during Damage Calculation. +summary: *desc status: index: stable parameters: - name: player type: [ int ] - description: (To be added) + description: If provided, the function will also check if it is currently that player's turn. required: false returns: - type: [ bool ] description: >- `true` if it is currently during Damage Calculation, `false` otherwise. -tags: [ under-construction ] diff --git a/api/functions/Duel/IsDamageStep.yml b/api/functions/Duel/IsDamageStep.yml index 7beb499d..484fa33e 100644 --- a/api/functions/Duel/IsDamageStep.yml +++ b/api/functions/Duel/IsDamageStep.yml @@ -1,17 +1,17 @@ ---!function name: IsDamageStep namespace: Duel -description: >- - Checks if it is currently the Damage Step. If `player` is provided it will also check that it is currently that player's turn. +description: &desc >- + Checks if it is currently the Damage Step. +summary: *desc status: index: stable parameters: - name: player type: [ int ] - description: (To be added) + description: If provided, the function will also check if it is currently that player's turn. required: false returns: - type: [ bool ] description: >- `true` if it is currently the Damage Step, `false` otherwise. -tags: [ under-construction ] diff --git a/api/functions/Duel/IsDrawPhase.yml b/api/functions/Duel/IsDrawPhase.yml index e347c14c..531b4091 100644 --- a/api/functions/Duel/IsDrawPhase.yml +++ b/api/functions/Duel/IsDrawPhase.yml @@ -1,17 +1,17 @@ ---!function name: IsDrawPhase namespace: Duel -description: >- - Checks if it is currently the Draw Phase. If `player` is provided it will also check that it is currently that player's turn. +description: &desc >- + Checks if it is currently the Draw Phase. +summary: *desc status: index: stable parameters: - name: player type: [ int ] - description: (To be added) + description: If provided, the function will also check if it is currently that player's turn. required: false returns: - type: [ bool ] description: >- `true` if it is currently the Draw Phase, `false` otherwise. -tags: [ under-construction ] diff --git a/api/functions/Duel/IsEndOfBattlePhase.yml b/api/functions/Duel/IsEndOfBattlePhase.yml index 1fe28da1..8a240d3d 100644 --- a/api/functions/Duel/IsEndOfBattlePhase.yml +++ b/api/functions/Duel/IsEndOfBattlePhase.yml @@ -1,8 +1,9 @@ ---!function name: IsEndOfBattlePhase namespace: Duel -description: >- - Checks if it is currently the end of the Battle Phase (End Step). If `player` is provided it will also check that it is currently that player's turn. +description: &desc >- + Checks if it is currently the end of the Battle Phase (End Step). +summary: *desc status: index: stable aliases: @@ -12,10 +13,9 @@ aliases: parameters: - name: player type: [ int ] - description: (To be added) + description: If provided, the function will also check if it is currently that player's turn. required: false returns: - type: [ bool ] description: >- `true` if it is currently the end of the Battle Phase (End Step), `false` otherwise. -tags: [ under-construction ] diff --git a/api/functions/Duel/IsEndPhase.yml b/api/functions/Duel/IsEndPhase.yml index bc97432e..13650a48 100644 --- a/api/functions/Duel/IsEndPhase.yml +++ b/api/functions/Duel/IsEndPhase.yml @@ -1,17 +1,17 @@ ---!function name: IsEndPhase namespace: Duel -description: >- - Checks if it is currently the End Phase. If `player` is provided it will also check that it is currently that player's turn. +description: &desc >- + Checks if it is currently the End Phase. +summary: *desc status: index: stable parameters: - name: player type: [ int ] - description: (To be added) + description: If `player` is provided it will also check that it is currently that player's turn. required: false returns: - type: [ bool ] description: >- `true` if it is currently the End Phase, `false` otherwise. -tags: [ under-construction ] diff --git a/api/functions/Duel/IsMainPhase.yml b/api/functions/Duel/IsMainPhase.yml index 964fc264..833c4d6b 100644 --- a/api/functions/Duel/IsMainPhase.yml +++ b/api/functions/Duel/IsMainPhase.yml @@ -1,17 +1,17 @@ ---!function name: IsMainPhase namespace: Duel -description: >- - Checks if it is currently the Main Phase. If `player` is provided it will also check that it is currently that player's turn. +description: &desc >- + Checks if it is currently the Main Phase. +summary: *desc status: index: stable parameters: - name: player type: [ int ] - description: (To be added) + description: If `player` is provided it will also check that it is currently that player's turn. required: false returns: - type: [ bool ] description: >- `true` if it is currently the Main Phase, `false` otherwise. -tags: [ under-construction ] diff --git a/api/functions/Duel/IsMainPhase1.yml b/api/functions/Duel/IsMainPhase1.yml index 46a64e86..0bad92bb 100644 --- a/api/functions/Duel/IsMainPhase1.yml +++ b/api/functions/Duel/IsMainPhase1.yml @@ -1,17 +1,17 @@ ---!function name: IsMainPhase1 namespace: Duel -description: >- - Checks if it is currently the Main Phase 1. If `player` is provided it will also check that it is currently that player's turn. +description: &desc >- + Checks if it is currently the Main Phase 1. +summary: *desc status: index: stable parameters: - name: player type: [ int ] - description: (To be added) + description: If `player` is provided it will also check that it is currently that player's turn. required: false returns: - type: [ bool ] description: >- `true` if it is currently the Main Phase 1, `false` otherwise. -tags: [ under-construction ] diff --git a/api/functions/Duel/IsMainPhase2.yml b/api/functions/Duel/IsMainPhase2.yml index 5d7e8209..6a198369 100644 --- a/api/functions/Duel/IsMainPhase2.yml +++ b/api/functions/Duel/IsMainPhase2.yml @@ -1,17 +1,17 @@ ---!function name: IsMainPhase2 namespace: Duel -description: >- - Checks if it is currently the Main Phase 2. If `player` is provided it will also check that it is currently that player's turn. +description: &desc >- + Checks if it is currently the Main Phase 2. +summary: *desc status: index: stable parameters: - name: player type: [ int ] - description: (To be added) + description: If `player` is provided it will also check that it is currently that player's turn. required: false returns: - type: [ bool ] description: >- `true` if it is currently the Main Phase 2, `false` otherwise. -tags: [ under-construction ] diff --git a/api/functions/Duel/IsStandbyPhase.yml b/api/functions/Duel/IsStandbyPhase.yml index 15659080..6f0a0f26 100644 --- a/api/functions/Duel/IsStandbyPhase.yml +++ b/api/functions/Duel/IsStandbyPhase.yml @@ -1,17 +1,17 @@ ---!function name: IsStandbyPhase namespace: Duel -description: >- - Checks if it is currently the Standby Phase. If `player` is provided it will also check that it is currently that player's turn. +description: &desc >- + Checks if it is currently the Standby Phase. +summary: *desc status: index: stable parameters: - name: player type: [ int ] - description: (To be added) + description: If `player` is provided it will also check that it is currently that player's turn. required: false returns: - type: [ bool ] description: >- `true` if it is currently the Standby Phase, `false` otherwise. -tags: [ under-construction ] diff --git a/api/functions/Duel/IsStartOfBattlePhase.yml b/api/functions/Duel/IsStartOfBattlePhase.yml index 1c1e7ef7..216aafbd 100644 --- a/api/functions/Duel/IsStartOfBattlePhase.yml +++ b/api/functions/Duel/IsStartOfBattlePhase.yml @@ -1,8 +1,9 @@ ---!function name: IsStartOfBattlePhase namespace: Duel -description: >- - Checks if it is currently the start of the Battle Phase (Start Step). If `player` is provided it will also check that it is currently that player's turn. +description: &desc >- + Checks if it is currently the start of the Battle Phase (Start Step). +summary: *desc status: index: stable aliases: @@ -12,10 +13,9 @@ aliases: parameters: - name: player type: [ int ] - description: (To be added) + description: If `player` is provided it will also check that it is currently that player's turn. required: false returns: - type: [ bool ] description: >- `true` if it is currently the start of the Battle Phase (Start Step), `false` otherwise. -tags: [ under-construction ] diff --git a/api/functions/Duel/ProcedureSummon.yml b/api/functions/Duel/ProcedureSummon.yml index ea720a3c..4c18da51 100644 --- a/api/functions/Duel/ProcedureSummon.yml +++ b/api/functions/Duel/ProcedureSummon.yml @@ -2,35 +2,35 @@ name: ProcedureSummon namespace: Duel description: >- - A player (int player) "Procedure Summons" (the SummonType performed is determined by the corresponding parameter) a card (Card c) using "must_use" as part of its materials, choosing among "mg", with "min" and "max" materials to be used for the Summon. + Summons a monster such that it is considered to have been [properly Summoned](https://yugipedia.com/wiki/Special_Summon_Monster#Properly_Special_Summoned). +summary: Summons a monster such that it is considered to have been properly Summoned. status: index: stable parameters: - name: player type: [ int ] - description: (To be added) + description: The player performing the Summon. - name: c type: [ Card ] - description: (To be added) + description: The monster to Summon. - name: sumtype type: [ int ] - description: (To be added) + description: The [type of the Summon](/api/enums/SummonType). - name: must_use type: [ Group, Card, nil ] - description: (To be added) + description: A card(s) that must be used as material for the Summon. required: false - name: mg type: [ Group, Card, nil ] - description: (To be added) + description: A card(s) that the player can choose to use as material for the Summon. required: false - name: minc type: [ int ] - description: (To be added) + description: The minimum amount of materials that can be used for the Summon. required: false defaultValue: 0 - name: maxc type: [ int ] - description: (To be added) + description: The maximum amount of materials that can be used for the Summon. required: false - defaultValue: 0 -tags: [ under-construction ] + defaultValue: 0 \ No newline at end of file