From 266902bceeaef9cbb855581c35cba2276d8ecb18 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Thu, 22 Jan 2026 15:36:53 +0200 Subject: [PATCH 01/20] Duel.GetTargetGroup --- api/functions/Duel/GetTargetGroup.yml | 30 +++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 api/functions/Duel/GetTargetGroup.yml diff --git a/api/functions/Duel/GetTargetGroup.yml b/api/functions/Duel/GetTargetGroup.yml new file mode 100644 index 0000000..f53f738 --- /dev/null +++ b/api/functions/Duel/GetTargetGroup.yml @@ -0,0 +1,30 @@ +---!function +name: GetTargetGroup +namespace: Duel +description: >- + [`Duel.GetMatchingGroup`](/api/functions/Duel/GetMatchingGroup) that also filters for [`Card.IsCanBeEffectTarget`](/api/functions/Card/IsCanBeEffectTarget) using [`Duel.GetReasonEffect`](/api/functions/Duel/GetReasonEffect) +status: + index: stable +parameters: + - name: f + type: [ function ] + description: (To be added) + - name: player + type: [ int ] + description: (To be added) + - name: s + type: [ int ] + description: (To be added) + - name: o + type: [ int ] + description: (To be added) + - name: ex + type: [ Group, Card, nil ] + description: (To be added) + - name: ... + type: [ any ] + description: (To be added) +returns: + - type: [ Group ] + description: (To be added) +tags: [ under-construction ] From 58e624fcea4bf595d794e4df56db1b1211721d72 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Thu, 22 Jan 2026 15:52:03 +0200 Subject: [PATCH 02/20] Duel.GetReasonEffect & Duel.GetReasonPlayer --- api/functions/Duel/GetReasonEffect.yml | 9 +++++++++ api/functions/Duel/GetReasonPlayer.yml | 9 +++++++++ 2 files changed, 18 insertions(+) create mode 100644 api/functions/Duel/GetReasonEffect.yml create mode 100644 api/functions/Duel/GetReasonPlayer.yml diff --git a/api/functions/Duel/GetReasonEffect.yml b/api/functions/Duel/GetReasonEffect.yml new file mode 100644 index 0000000..ca63ba6 --- /dev/null +++ b/api/functions/Duel/GetReasonEffect.yml @@ -0,0 +1,9 @@ +---!function +name: GetReasonEffect +namespace: Duel +description: >- + Returns the [effect](/api/types/Effect) that the core considers as the "current effect" (`core.reason_effect`) +status: + index: stable +returns: + - type: [ Effect ] \ No newline at end of file diff --git a/api/functions/Duel/GetReasonPlayer.yml b/api/functions/Duel/GetReasonPlayer.yml new file mode 100644 index 0000000..b868f03 --- /dev/null +++ b/api/functions/Duel/GetReasonPlayer.yml @@ -0,0 +1,9 @@ +---!function +name: GetReasonPlayer +namespace: Duel +description: >- + Returns the player that the core considers as the "current player" (`core.reason_player`) +status: + index: stable +returns: + - type: [ int ] \ No newline at end of file From 3d2bcf2185b9df8bcc093548abbc07bbf6476dec Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Thu, 22 Jan 2026 16:28:04 +0200 Subject: [PATCH 03/20] Card.IsRaceExcept --- api/functions/Card/IsRaceExcept.yml | 30 +++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 api/functions/Card/IsRaceExcept.yml diff --git a/api/functions/Card/IsRaceExcept.yml b/api/functions/Card/IsRaceExcept.yml new file mode 100644 index 0000000..1969c22 --- /dev/null +++ b/api/functions/Card/IsRaceExcept.yml @@ -0,0 +1,30 @@ +---!function +name: IsRaceExcept +namespace: Card +description: >- + Checks if (Card c) has any race other than (int race). If the optional parameters are passed, does the checks by calling the equivalent behavior with such parameters with Card.GetRace +status: + index: stable +parameters: + - name: c + type: [ Card ] + description: (To be added) + - name: race + type: [ int ] + description: (To be added) + - name: scard + type: [ Card ] + description: (To be added) + required: false + - name: sumtype + type: [ int ] + description: (To be added) + required: false + - name: playerid + type: [ int ] + description: (To be added) + required: false +returns: + - type: [ bool ] + description: (To be added) +tags: [ under-construction ] From 9c97acb78d8c6a8b5f59103b996b5622ea8ea358 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Thu, 22 Jan 2026 16:28:54 +0200 Subject: [PATCH 04/20] Update IsDifferentRace.yml --- api/functions/Card/IsDifferentRace.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/functions/Card/IsDifferentRace.yml b/api/functions/Card/IsDifferentRace.yml index 0da857e..d9c6960 100644 --- a/api/functions/Card/IsDifferentRace.yml +++ b/api/functions/Card/IsDifferentRace.yml @@ -2,7 +2,7 @@ name: IsDifferentRace namespace: Card description: >- - Returns if (Card c) does not have Race (int race) + Deprecated function. Use Card.IsRaceExcept status: index: stable parameters: From 73390ed038a6ba5c1c2c6bf7ede6fbed6cf7a5ca Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Thu, 22 Jan 2026 16:39:24 +0200 Subject: [PATCH 05/20] Update UpdateAttack.yml --- api/functions/Card/UpdateAttack.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/api/functions/Card/UpdateAttack.yml b/api/functions/Card/UpdateAttack.yml index 1168e8f..dd5dbc4 100644 --- a/api/functions/Card/UpdateAttack.yml +++ b/api/functions/Card/UpdateAttack.yml @@ -2,7 +2,7 @@ name: UpdateAttack namespace: Card description: >- - Applies an ATK change to card c, equal to int amount. If the reset values (int reset) are not provided, the default is RESET_EVENT (+RESETS_STANDARD_DISABLE , if rc == c, or just +RESETS_STANDARD). If the reason card rc is not provided, uses as default card c. Returns the amount of ATK successfully changed. + Applies an ATK change to card c, equal to int amount. If the reset values (int reset) are not provided, the default is RESET_EVENT (+RESETS_STANDARD_DISABLE , if rc == c, or just +RESETS_STANDARD). If the reason card rc is not provided, uses as default card c. If reset_count is not provided it defaults to 1. Returns the amount of ATK successfully changed. status: index: stable parameters: @@ -20,6 +20,10 @@ parameters: type: [ Card ] description: (To be added) required: false + - name: reset_count + type: [ int ] + description: (To be added) + required: false returns: - type: [ int ] description: (To be added) From d028bcf397e0a1e13408e4a5d5d49ebfbf398b2a Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Thu, 22 Jan 2026 16:41:23 +0200 Subject: [PATCH 06/20] Update UpdateDefense.yml --- api/functions/Card/UpdateDefense.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/api/functions/Card/UpdateDefense.yml b/api/functions/Card/UpdateDefense.yml index 1c67adf..890d174 100644 --- a/api/functions/Card/UpdateDefense.yml +++ b/api/functions/Card/UpdateDefense.yml @@ -2,7 +2,7 @@ name: UpdateDefense namespace: Card description: >- - Applies a DEF change to card c, equal to int amount. If the reset values (int reset) are not provided, the default is RESET_EVENT (+RESETS_STANDARD_DISABLE , if rc == c, or just +RESETS_STANDARD). If the reason card rc is not provided, uses as default card c. Returns the amount of DEF successfully changed. + Applies a DEF change to card c, equal to int amount. If the reset values (int reset) are not provided, the default is RESET_EVENT (+RESETS_STANDARD_DISABLE , if rc == c, or just +RESETS_STANDARD). If the reason card rc is not provided, uses as default card c. If reset_count is not provided it defaults to 1. Returns the amount of DEF successfully changed. status: index: stable parameters: @@ -20,6 +20,10 @@ parameters: type: [ Card ] description: (To be added) required: false + - name: reset_count + type: [ int ] + description: (To be added) + required: false returns: - type: [ int ] description: (To be added) From bd3c75451397d46efd91f33d7065e5125eafd3f7 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Thu, 22 Jan 2026 16:58:12 +0200 Subject: [PATCH 07/20] Card.IsFusionMonster/IsSynchroMonster/IsXyzMonster/IsPendulumMonster/IsEffectMonster --- api/functions/Card/IsEffectMonster.yml | 17 +++++++++++++++++ api/functions/Card/IsFusionMonster.yml | 17 +++++++++++++++++ api/functions/Card/IsPendulumMonster.yml | 17 +++++++++++++++++ api/functions/Card/IsSynchroMonster.yml | 17 +++++++++++++++++ api/functions/Card/IsXyzMonster.yml | 17 +++++++++++++++++ 5 files changed, 85 insertions(+) create mode 100644 api/functions/Card/IsEffectMonster.yml create mode 100644 api/functions/Card/IsFusionMonster.yml create mode 100644 api/functions/Card/IsPendulumMonster.yml create mode 100644 api/functions/Card/IsSynchroMonster.yml create mode 100644 api/functions/Card/IsXyzMonster.yml diff --git a/api/functions/Card/IsEffectMonster.yml b/api/functions/Card/IsEffectMonster.yml new file mode 100644 index 0000000..7ed792c --- /dev/null +++ b/api/functions/Card/IsEffectMonster.yml @@ -0,0 +1,17 @@ +---!function +name: IsEffectMonster +namespace: Card +description: >- + Checks if a card is currently an [Effect Monster](https://yugipedia.com/wiki/Effect_Monster). +summary: Checks if a card is currently a Effect Monster. +parameters: + - name: c + type: [ Card ] + description: The card to check. +returns: + - type: [ bool ] + description: >- + `true` if the card is currently a Effect Monster, `false` otherwise. +status: + index: stable +tags: [ card-check, card-type-related ] diff --git a/api/functions/Card/IsFusionMonster.yml b/api/functions/Card/IsFusionMonster.yml new file mode 100644 index 0000000..d0bb91a --- /dev/null +++ b/api/functions/Card/IsFusionMonster.yml @@ -0,0 +1,17 @@ +---!function +name: IsFusionMonster +namespace: Card +description: >- + Checks if a card is currently a [Fusion Monster](https://yugipedia.com/wiki/Fusion_Monster). +summary: Checks if a card is currently a Fusion Monster. +parameters: + - name: c + type: [ Card ] + description: The card to check. +returns: + - type: [ bool ] + description: >- + `true` if the card is currently a Fusion Monster, `false` otherwise. +status: + index: stable +tags: [ card-check, card-type-related ] diff --git a/api/functions/Card/IsPendulumMonster.yml b/api/functions/Card/IsPendulumMonster.yml new file mode 100644 index 0000000..ae73adb --- /dev/null +++ b/api/functions/Card/IsPendulumMonster.yml @@ -0,0 +1,17 @@ +---!function +name: IsPendulumMonster +namespace: Card +description: >- + Checks if a card is currently a [Pendulum Monster](https://yugipedia.com/wiki/Pendulum_Monster). +summary: Checks if a card is currently a Pendulum Monster. +parameters: + - name: c + type: [ Card ] + description: The card to check. +returns: + - type: [ bool ] + description: >- + `true` if the card is currently a Pendulum Monster, `false` otherwise. +status: + index: stable +tags: [ card-check, card-type-related ] diff --git a/api/functions/Card/IsSynchroMonster.yml b/api/functions/Card/IsSynchroMonster.yml new file mode 100644 index 0000000..fedee7e --- /dev/null +++ b/api/functions/Card/IsSynchroMonster.yml @@ -0,0 +1,17 @@ +---!function +name: IsSynchroMonster +namespace: Card +description: >- + Checks if a card is currently a [Synchro Monster](https://yugipedia.com/wiki/Synchro_Monster). +summary: Checks if a card is currently a Synchro Monster. +parameters: + - name: c + type: [ Card ] + description: The card to check. +returns: + - type: [ bool ] + description: >- + `true` if the card is currently a Synchro Monster, `false` otherwise. +status: + index: stable +tags: [ card-check, card-type-related ] diff --git a/api/functions/Card/IsXyzMonster.yml b/api/functions/Card/IsXyzMonster.yml new file mode 100644 index 0000000..02e2ef4 --- /dev/null +++ b/api/functions/Card/IsXyzMonster.yml @@ -0,0 +1,17 @@ +---!function +name: IsXyzMonster +namespace: Card +description: >- + Checks if a card is currently an [Xyz Monster](https://yugipedia.com/wiki/Xyz_Monster). +summary: Checks if a card is currently a Xyz Monster. +parameters: + - name: c + type: [ Card ] + description: The card to check. +returns: + - type: [ bool ] + description: >- + `true` if the card is currently a Xyz Monster, `false` otherwise. +status: + index: stable +tags: [ card-check, card-type-related ] From 325e970ff08d97f53f6ea48315950ffea603ece6 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Thu, 22 Jan 2026 17:01:06 +0200 Subject: [PATCH 08/20] an --- api/functions/Card/IsEffectMonster.yml | 4 ++-- api/functions/Card/IsXyzMonster.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/functions/Card/IsEffectMonster.yml b/api/functions/Card/IsEffectMonster.yml index 7ed792c..a622b94 100644 --- a/api/functions/Card/IsEffectMonster.yml +++ b/api/functions/Card/IsEffectMonster.yml @@ -3,7 +3,7 @@ name: IsEffectMonster namespace: Card description: >- Checks if a card is currently an [Effect Monster](https://yugipedia.com/wiki/Effect_Monster). -summary: Checks if a card is currently a Effect Monster. +summary: Checks if a card is currently an Effect Monster. parameters: - name: c type: [ Card ] @@ -11,7 +11,7 @@ parameters: returns: - type: [ bool ] description: >- - `true` if the card is currently a Effect Monster, `false` otherwise. + `true` if the card is currently an Effect Monster, `false` otherwise. status: index: stable tags: [ card-check, card-type-related ] diff --git a/api/functions/Card/IsXyzMonster.yml b/api/functions/Card/IsXyzMonster.yml index 02e2ef4..dec26e5 100644 --- a/api/functions/Card/IsXyzMonster.yml +++ b/api/functions/Card/IsXyzMonster.yml @@ -3,7 +3,7 @@ name: IsXyzMonster namespace: Card description: >- Checks if a card is currently an [Xyz Monster](https://yugipedia.com/wiki/Xyz_Monster). -summary: Checks if a card is currently a Xyz Monster. +summary: Checks if a card is currently an Xyz Monster. parameters: - name: c type: [ Card ] @@ -11,7 +11,7 @@ parameters: returns: - type: [ bool ] description: >- - `true` if the card is currently a Xyz Monster, `false` otherwise. + `true` if the card is currently an Xyz Monster, `false` otherwise. status: index: stable tags: [ card-check, card-type-related ] From 9ff5c0f05dfe327916f29546c2e1c2aee7e69903 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Thu, 22 Jan 2026 17:16:19 +0200 Subject: [PATCH 09/20] Card.AddCannotBeNormalSummoned/AddCannotBeFlipSummoned --- api/functions/Card/AddCannotBeFlipSummoned.yml | 17 +++++++++++++++++ .../Card/AddCannotBeNormalSummoned.yml | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 api/functions/Card/AddCannotBeFlipSummoned.yml create mode 100644 api/functions/Card/AddCannotBeNormalSummoned.yml diff --git a/api/functions/Card/AddCannotBeFlipSummoned.yml b/api/functions/Card/AddCannotBeFlipSummoned.yml new file mode 100644 index 0000000..c915099 --- /dev/null +++ b/api/functions/Card/AddCannotBeFlipSummoned.yml @@ -0,0 +1,17 @@ +---!function +name: AddCannotBeFlipSummoned +namespace: Card +description: >- + Creates and registers an [Effect](/api/types/Effect) to a monster card + that applies a "Cannot be Flip Summoned" Summoning condition to it +summary: Adds a "Cannot be Flip Summoned" Summoning condition to a monster +parameters: + - name: c + type: [ Card ] + description: The monster to register the effect to. +returns: + - type: [ Effect ] + description: The registered effect. +status: + index: stable +tags: [ registers-effect ] diff --git a/api/functions/Card/AddCannotBeNormalSummoned.yml b/api/functions/Card/AddCannotBeNormalSummoned.yml new file mode 100644 index 0000000..8bdedc8 --- /dev/null +++ b/api/functions/Card/AddCannotBeNormalSummoned.yml @@ -0,0 +1,17 @@ +---!function +name: AddCannotBeNormalSummoned +namespace: Card +description: >- + Creates and registers an [Effect](/api/types/Effect) to a monster card + that applies a "Cannot be Normal Summoned" Summoning condition to it +summary: Adds a "Cannot be Normal Summoned" Summoning condition to a monster +parameters: + - name: c + type: [ Card ] + description: The monster to register the effect to. +returns: + - type: [ Effect ] + description: The registered effect. +status: + index: stable +tags: [ registers-effect ] From 0981b0b35ebf94423e983d0eb73b9404895e15fa Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Thu, 22 Jan 2026 17:33:43 +0200 Subject: [PATCH 10/20] Cost.SelfChangePosition/RemoveCounterFromSelf/RemoveCounterFromField --- api/functions/Cost/RemoveCounterFromField.yml | 18 ++++++++++++++++++ api/functions/Cost/RemoveCounterFromSelf.yml | 18 ++++++++++++++++++ api/functions/Cost/SelfChangePosition.yml | 15 +++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 api/functions/Cost/RemoveCounterFromField.yml create mode 100644 api/functions/Cost/RemoveCounterFromSelf.yml create mode 100644 api/functions/Cost/SelfChangePosition.yml diff --git a/api/functions/Cost/RemoveCounterFromField.yml b/api/functions/Cost/RemoveCounterFromField.yml new file mode 100644 index 0000000..f498178 --- /dev/null +++ b/api/functions/Cost/RemoveCounterFromField.yml @@ -0,0 +1,18 @@ +---!function +name: RemoveCounterFromField +namespace: Cost +description: Creates a baseline [cost function](/api/types/EffectCost) used for effects that remove a counter(s) from the activating player's field as cost, such as `You can remove 1 Spell Counter from your field... ; ...` (e.g. "Arcanite Magician"). +summary: Creates a cost function for effects that remove a counter(s) from the activating player's field as cost. +status: + index: stable +parameters: + - name: counter_type + type: [ int ] + description: The type of counter to remove. + - name: count + type: [ int ] + description: The amount of counters to remove. +returns: + - type: [ EffectCost ] + description: The cost function generated based on the given parameters. + guaranteed: true diff --git a/api/functions/Cost/RemoveCounterFromSelf.yml b/api/functions/Cost/RemoveCounterFromSelf.yml new file mode 100644 index 0000000..8d4cb9b --- /dev/null +++ b/api/functions/Cost/RemoveCounterFromSelf.yml @@ -0,0 +1,18 @@ +---!function +name: RemoveCounterFromSelf +namespace: Cost +description: Creates a baseline [cost function](/api/types/EffectCost) used for effects that remove a counter(s) from the activating card itself as cost, such as `You can remove 1 Spell Counter from this card... ; ...` (e.g. "Breaker the Magical Warrior"). +summary: Creates a cost function for effects that remove a counter(s) from the card itself as cost. +status: + index: stable +parameters: + - name: counter_type + type: [ int ] + description: The type of counter to remove. + - name: count + type: [ int ] + description: The amount of counters to remove. +returns: + - type: [ EffectCost ] + description: The cost function generated based on the given parameters. + guaranteed: true diff --git a/api/functions/Cost/SelfChangePosition.yml b/api/functions/Cost/SelfChangePosition.yml new file mode 100644 index 0000000..de19e7a --- /dev/null +++ b/api/functions/Cost/SelfChangePosition.yml @@ -0,0 +1,15 @@ +---!function +name: SelfChangePosition +namespace: Cost +description: Creates a baseline [cost function](/api/types/EffectCost) used for effects that change the battle position of the activating card itself as cost, such as `You can change this face-down card to face-up Defense Position; ...` (e.g. "Enneacraft - Atori.MAR"). +summary: Creates a cost function for effects that change the battle position of the card itself as cost. +status: + index: stable +parameters: + - name: position + type: [ int ] + description: The position to change the card to. +returns: + - type: [ EffectCost ] + description: The cost function generated based on the given parameters. + guaranteed: true From 2301181dfb603042305079fa5493b0c3adef1925 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Thu, 22 Jan 2026 18:31:07 +0200 Subject: [PATCH 11/20] Effect.HasSelfToGraveCost/HasSelfDiscardCost/HasDetachCost --- api/functions/Effect/HasDetachCost.yml | 18 ++++++++++++++++++ api/functions/Effect/HasSelfDiscardCost.yml | 15 +++++++++++++++ api/functions/Effect/HasSelfToGraveCost.yml | 15 +++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 api/functions/Effect/HasDetachCost.yml create mode 100644 api/functions/Effect/HasSelfDiscardCost.yml create mode 100644 api/functions/Effect/HasSelfToGraveCost.yml diff --git a/api/functions/Effect/HasDetachCost.yml b/api/functions/Effect/HasDetachCost.yml new file mode 100644 index 0000000..7738631 --- /dev/null +++ b/api/functions/Effect/HasDetachCost.yml @@ -0,0 +1,18 @@ +---!function +name: HasDetachCost +namespace: Effect +description: >- + Returns true if the effect (Effect e) has a cost that detaches Xyz Material(s) +status: + index: stable +parameters: + - name: e + type: [ Effect ] + description: (To be added) + - name: type + type: [ int ] + description: (To be added) +returns: + - type: [ bool ] + description: (To be added) +tags: [ under-construction ] diff --git a/api/functions/Effect/HasSelfDiscardCost.yml b/api/functions/Effect/HasSelfDiscardCost.yml new file mode 100644 index 0000000..cd965e3 --- /dev/null +++ b/api/functions/Effect/HasSelfDiscardCost.yml @@ -0,0 +1,15 @@ +---!function +name: HasSelfDiscardCost +namespace: Effect +description: >- + Returns true if the effect (Effect e) has a cost that discards the card itself +status: + index: stable +parameters: + - name: e + type: [ Effect ] + description: (To be added) +returns: + - type: [ bool ] + description: (To be added) +tags: [ under-construction ] diff --git a/api/functions/Effect/HasSelfToGraveCost.yml b/api/functions/Effect/HasSelfToGraveCost.yml new file mode 100644 index 0000000..cbe3743 --- /dev/null +++ b/api/functions/Effect/HasSelfToGraveCost.yml @@ -0,0 +1,15 @@ +---!function +name: HasSelfToGraveCost +namespace: Effect +description: >- + Returns true if the effect (Effect e) has a cost that sends the card itself to the GY +status: + index: stable +parameters: + - name: e + type: [ Effect ] + description: (To be added) +returns: + - type: [ bool ] + description: (To be added) +tags: [ under-construction ] From c31879d4a45b7b42bcedc504b17ef0c4f949cb0a Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Thu, 22 Jan 2026 18:32:10 +0200 Subject: [PATCH 12/20] Cost.Choice/SoftOncePerBattle/HardOncePerBattle/HintSelectedEffect --- api/functions/Cost/Choice.yml | 15 +++++++++ api/functions/Cost/HardOncePerBattle.yml | 18 +++++++++++ api/functions/Cost/HintSelectedEffect.yml | 39 +++++++++++++++++++++++ api/functions/Cost/SoftOncePerBattle.yml | 18 +++++++++++ 4 files changed, 90 insertions(+) create mode 100644 api/functions/Cost/Choice.yml create mode 100644 api/functions/Cost/HardOncePerBattle.yml create mode 100644 api/functions/Cost/HintSelectedEffect.yml create mode 100644 api/functions/Cost/SoftOncePerBattle.yml diff --git a/api/functions/Cost/Choice.yml b/api/functions/Cost/Choice.yml new file mode 100644 index 0000000..04680fd --- /dev/null +++ b/api/functions/Cost/Choice.yml @@ -0,0 +1,15 @@ +---!function +name: Choice +namespace: Cost +description: Creates a baseline [cost function](/api/types/EffectCost) that gives the player a choice between different baseline cost functions for the same effect (e.g. "Starliege Lord Galaxion"). The ellipsis (...) allows tables in the form {base cost function, effect description, additional check function} (e.g. "{Cost.DetachFromSelf(1),aux.Stringid(id,0),s.extracheck}"). [`Duel.SelectEffect`](/api/functions/Duel/SelectEffect) is used to have the player choose, and their choice is then set as the effect's label. +summary: Creates a cost function that gives the player a choice between different baseline cost functions for the same effect. +status: + index: stable +parameters: + - name: ... + type: [ any ] + description: (To be added) +returns: + - type: [ EffectCost ] + description: The cost function generated based on the given parameters. + guaranteed: true diff --git a/api/functions/Cost/HardOncePerBattle.yml b/api/functions/Cost/HardOncePerBattle.yml new file mode 100644 index 0000000..c9f3a60 --- /dev/null +++ b/api/functions/Cost/HardOncePerBattle.yml @@ -0,0 +1,18 @@ +---!function +name: HardOncePerBattle +namespace: Cost +description: Creates a baseline [cost function](/api/types/EffectCost) used for effects that can only be activated once per battle by a player. +summary: Creates a cost function for "hard once per battle" effects. +status: + index: stable +parameters: + - name: flag + type: [ int ] + description: The value of the flag to register to the duel. +returns: + - type: [ EffectCost ] + description: The generated cost function. + guaranteed: true +suggestedLinks: + - name: Cost.SoftOncePerBattle + link: /api/functions/Cost/SoftOncePerBattle diff --git a/api/functions/Cost/HintSelectedEffect.yml b/api/functions/Cost/HintSelectedEffect.yml new file mode 100644 index 0000000..21b5112 --- /dev/null +++ b/api/functions/Cost/HintSelectedEffect.yml @@ -0,0 +1,39 @@ +---!function +name: HintSelectedEffect +namespace: Cost +description: A baseline [cost function](/api/types/EffectCost) used for effects that need to display which effect was activated (e.g. "Exosister Gibrine"). +summary: Cost function for effects that need to display which effect was activated. +status: + index: stable +parameters: + - name: e + type: [ Effect ] + description: The effect being activated. + - name: tp + type: [ int ] + description: The player activating the effect. + - name: eg + type: [ Group ] + description: A group of cards associated to the event that prompted the effect activation. The specifics of this group vary depending on the [event code](/api/enums/Event). + - name: ep + type: [ int ] + description: The player associated to the event that prompted the effect activation. + - name: ev + type: [ Group ] + description: A value associated to the event that prompted the effect activation. The specifics of this value vary depending on the event code. + - name: re + type: [ Effect ] + description: The effect that caused the event that prompted the effect activation. + - name: r + type: [ int ] + description: Composite [Reason](/api/enums/Reason) value of the event that prompted the effect activation. + - name: rp + type: [ int ] + description: The player that caused the event that prompted the effect activation. + - name: chk + type: [ int ] + description: Must be `0` when checking if the cost can be paid, and `1` when performing the cost. +returns: + - type: [ bool ] + description: If `chk` is `0`, returns `true` if the cost can be paid. + guaranteed: false diff --git a/api/functions/Cost/SoftOncePerBattle.yml b/api/functions/Cost/SoftOncePerBattle.yml new file mode 100644 index 0000000..37b6265 --- /dev/null +++ b/api/functions/Cost/SoftOncePerBattle.yml @@ -0,0 +1,18 @@ +---!function +name: SoftOncePerBattle +namespace: Cost +description: Creates a baseline [cost function](/api/types/EffectCost) used for effects that can only be activated once per battle *per card*, e.g. "Lavalval Ignis". +summary: Creates a cost function for "soft once per battle" effects. +status: + index: stable +parameters: + - name: flag + type: [ int ] + description: The value of the flag to register to the card. +returns: + - type: [ EffectCost ] + description: The generated cost function. + guaranteed: true +suggestedLinks: + - name: Cost.HardOncePerBattle + link: /api/functions/Cost/HardOncePerBattle From 482d8ff1e4719501d2d9da0d600b9a5fcc507841 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Thu, 22 Jan 2026 19:24:43 +0200 Subject: [PATCH 13/20] Update GetReasonPlayer.yml --- api/functions/Duel/GetReasonPlayer.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/functions/Duel/GetReasonPlayer.yml b/api/functions/Duel/GetReasonPlayer.yml index b868f03..8e9724b 100644 --- a/api/functions/Duel/GetReasonPlayer.yml +++ b/api/functions/Duel/GetReasonPlayer.yml @@ -6,4 +6,5 @@ description: >- status: index: stable returns: - - type: [ int ] \ No newline at end of file + - type: [ int ] + description: (To be added) From 4c29aa3551f58fcf95978aee43f1fef286d1d0a9 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Thu, 22 Jan 2026 19:24:48 +0200 Subject: [PATCH 14/20] Update GetReasonEffect.yml --- api/functions/Duel/GetReasonEffect.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/functions/Duel/GetReasonEffect.yml b/api/functions/Duel/GetReasonEffect.yml index ca63ba6..bfdcd09 100644 --- a/api/functions/Duel/GetReasonEffect.yml +++ b/api/functions/Duel/GetReasonEffect.yml @@ -6,4 +6,5 @@ description: >- status: index: stable returns: - - type: [ Effect ] \ No newline at end of file + - type: [ Effect ] + description: (To be added) From ec66a0797cb1fb153186265ef1271e54e8601648 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Thu, 22 Jan 2026 19:26:51 +0200 Subject: [PATCH 15/20] Update Choice.yml --- api/functions/Cost/Choice.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/functions/Cost/Choice.yml b/api/functions/Cost/Choice.yml index 04680fd..abb77e3 100644 --- a/api/functions/Cost/Choice.yml +++ b/api/functions/Cost/Choice.yml @@ -2,7 +2,7 @@ name: Choice namespace: Cost description: Creates a baseline [cost function](/api/types/EffectCost) that gives the player a choice between different baseline cost functions for the same effect (e.g. "Starliege Lord Galaxion"). The ellipsis (...) allows tables in the form {base cost function, effect description, additional check function} (e.g. "{Cost.DetachFromSelf(1),aux.Stringid(id,0),s.extracheck}"). [`Duel.SelectEffect`](/api/functions/Duel/SelectEffect) is used to have the player choose, and their choice is then set as the effect's label. -summary: Creates a cost function that gives the player a choice between different baseline cost functions for the same effect. +summary: Creates a cost function that gives the player a choice between different costs. status: index: stable parameters: From 6676863080ed8814d5864c9ae8982e2415ed7681 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Thu, 22 Jan 2026 19:27:56 +0200 Subject: [PATCH 16/20] Update RemoveCounterFromField.yml --- api/functions/Cost/RemoveCounterFromField.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/functions/Cost/RemoveCounterFromField.yml b/api/functions/Cost/RemoveCounterFromField.yml index f498178..a5f6c57 100644 --- a/api/functions/Cost/RemoveCounterFromField.yml +++ b/api/functions/Cost/RemoveCounterFromField.yml @@ -2,7 +2,7 @@ name: RemoveCounterFromField namespace: Cost description: Creates a baseline [cost function](/api/types/EffectCost) used for effects that remove a counter(s) from the activating player's field as cost, such as `You can remove 1 Spell Counter from your field... ; ...` (e.g. "Arcanite Magician"). -summary: Creates a cost function for effects that remove a counter(s) from the activating player's field as cost. +summary: Creates a cost function for effects that remove a counter(s) from the field. status: index: stable parameters: From c7b3faf0d585473e05d61c8b3ac5e8f707275ba4 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Thu, 22 Jan 2026 19:28:53 +0200 Subject: [PATCH 17/20] Update RemoveCounterFromSelf.yml --- api/functions/Cost/RemoveCounterFromSelf.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/functions/Cost/RemoveCounterFromSelf.yml b/api/functions/Cost/RemoveCounterFromSelf.yml index 8d4cb9b..a4377e4 100644 --- a/api/functions/Cost/RemoveCounterFromSelf.yml +++ b/api/functions/Cost/RemoveCounterFromSelf.yml @@ -2,7 +2,7 @@ name: RemoveCounterFromSelf namespace: Cost description: Creates a baseline [cost function](/api/types/EffectCost) used for effects that remove a counter(s) from the activating card itself as cost, such as `You can remove 1 Spell Counter from this card... ; ...` (e.g. "Breaker the Magical Warrior"). -summary: Creates a cost function for effects that remove a counter(s) from the card itself as cost. +summary: Creates a cost function for effects that remove a counter from the card itself. status: index: stable parameters: From 8f0a5e4f0d908a8e00718c67f61466d5b2f97a87 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Thu, 22 Jan 2026 19:29:33 +0200 Subject: [PATCH 18/20] Update RemoveCounterFromField.yml --- api/functions/Cost/RemoveCounterFromField.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/functions/Cost/RemoveCounterFromField.yml b/api/functions/Cost/RemoveCounterFromField.yml index a5f6c57..49d4acf 100644 --- a/api/functions/Cost/RemoveCounterFromField.yml +++ b/api/functions/Cost/RemoveCounterFromField.yml @@ -2,7 +2,7 @@ name: RemoveCounterFromField namespace: Cost description: Creates a baseline [cost function](/api/types/EffectCost) used for effects that remove a counter(s) from the activating player's field as cost, such as `You can remove 1 Spell Counter from your field... ; ...` (e.g. "Arcanite Magician"). -summary: Creates a cost function for effects that remove a counter(s) from the field. +summary: Creates a cost function for effects that remove a counter from the field. status: index: stable parameters: From ff0024026924c84886c914f47b1e450240214f95 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Thu, 22 Jan 2026 19:30:07 +0200 Subject: [PATCH 19/20] Update SelfChangePosition.yml --- api/functions/Cost/SelfChangePosition.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/functions/Cost/SelfChangePosition.yml b/api/functions/Cost/SelfChangePosition.yml index de19e7a..6a0b01a 100644 --- a/api/functions/Cost/SelfChangePosition.yml +++ b/api/functions/Cost/SelfChangePosition.yml @@ -2,7 +2,7 @@ name: SelfChangePosition namespace: Cost description: Creates a baseline [cost function](/api/types/EffectCost) used for effects that change the battle position of the activating card itself as cost, such as `You can change this face-down card to face-up Defense Position; ...` (e.g. "Enneacraft - Atori.MAR"). -summary: Creates a cost function for effects that change the battle position of the card itself as cost. +summary: Creates a cost function for effects that change the card's own position as cost. status: index: stable parameters: From 1e8f83a66ce43e457dbf56512424dd5ba22f4081 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Thu, 22 Jan 2026 19:44:02 +0200 Subject: [PATCH 20/20] Update AddProcedure.yml --- api/functions/Link/AddProcedure.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/api/functions/Link/AddProcedure.yml b/api/functions/Link/AddProcedure.yml index 255ca08..902f420 100644 --- a/api/functions/Link/AddProcedure.yml +++ b/api/functions/Link/AddProcedure.yml @@ -37,3 +37,10 @@ parameters: required: false defaultValue: |- The default string 1174: "Link Summon". + - name: spcon + type: [ function] + description: >- + An additional check equivalent to a Special Summon condition for the Link Monster (e.g. "Lib the World Key Blademaster"). + Its signature is `(e,se,sp,st)` like the value function of a typical `EFFECT_SPSUMMON_CONDITION` effect. + required: false + defaultValue: nil