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/22] 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/22] 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/22] 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/22] 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/22] 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/22] 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/22] 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/22] 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/22] 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/22] 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/22] 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/22] 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/22] 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/22] 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/22] 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/22] 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/22] 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/22] 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/22] 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/22] 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 From 33a61595928e3b463248ef4ab28685d27dc1288b Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Fri, 27 Feb 2026 15:13:45 +0200 Subject: [PATCH 21/22] Update RemoveCounter.yml --- api/functions/Card/RemoveCounter.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/functions/Card/RemoveCounter.yml b/api/functions/Card/RemoveCounter.yml index ee8d718..a2d1605 100644 --- a/api/functions/Card/RemoveCounter.yml +++ b/api/functions/Card/RemoveCounter.yml @@ -21,4 +21,7 @@ parameters: - name: reason type: [ int ] description: (To be added) +returns: + - type: [ bool ] + description: (To be added) tags: [ under-construction ] From 7abfe966fc0e7bad3409267983434c300cc8aefe Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Wed, 11 Mar 2026 01:04:05 +0800 Subject: [PATCH 22/22] some updates --- api/functions/Card/IsAttributeExcept.yml | 60 ++++++++++++------- api/functions/Card/IsDifferentAttribute.yml | 18 ------ api/functions/Card/IsDifferentRace.yml | 18 ------ api/functions/Card/IsRaceExcept.yml | 60 ++++++++++++------- api/functions/Card/RemoveCounter.yml | 19 +++--- api/functions/Card/UpdateAttack.yml | 22 ++++--- api/functions/Card/UpdateDefense.yml | 22 ++++--- api/functions/Cost/Choice.yml | 9 +-- api/functions/Cost/HardOncePerBattle.yml | 5 +- api/functions/Cost/HintSelectedEffect.yml | 2 +- api/functions/Cost/RemoveCounterFromField.yml | 3 +- api/functions/Cost/RemoveCounterFromSelf.yml | 3 +- api/functions/Cost/SelfChangePosition.yml | 5 +- api/functions/Cost/SoftOncePerBattle.yml | 5 +- api/functions/Duel/GetReasonEffect.yml | 6 +- api/functions/Duel/GetReasonPlayer.yml | 6 +- api/functions/Duel/GetTargetGroup.yml | 23 +++---- api/functions/Effect/HasDetachCost.yml | 13 ++-- api/functions/Effect/HasSelfDiscardCost.yml | 10 ++-- api/functions/Effect/HasSelfToGraveCost.yml | 10 ++-- 20 files changed, 163 insertions(+), 156 deletions(-) delete mode 100644 api/functions/Card/IsDifferentAttribute.yml delete mode 100644 api/functions/Card/IsDifferentRace.yml diff --git a/api/functions/Card/IsAttributeExcept.yml b/api/functions/Card/IsAttributeExcept.yml index a22c9ea..cde9276 100644 --- a/api/functions/Card/IsAttributeExcept.yml +++ b/api/functions/Card/IsAttributeExcept.yml @@ -1,30 +1,50 @@ ---!function name: IsAttributeExcept namespace: Card -description: >- - Checks if (Card c) has any attribute other than (int att). If the optional parameters are passed, does the checks by calling the equivalent behavior with such parameters with Card.GetAttribute +description: Checks if a card currently has any attribute other than a specified attribute(s). +summary: Checks if a card currently has any attribute other than a specified attribute(s) status: index: stable +aliases: + - name: Card.IsDifferentAttribute + status: + index: deleted parameters: - - name: c + - &c + name: c type: [ Card ] - description: (To be added) - - name: att + description: The monster to check the attribute(s) of. + - &attr + name: attr 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 + description: >- + Composite [MonsterAttribute](/api/enums/MonsterAttribute) value to check. + `c` needs to have any attribute other than this value. returns: - type: [ bool ] - description: (To be added) -tags: [ under-construction ] + description: >- + `true` if `c` has any attribute other than `attr`, `false` otherwise. +overloads: + - description: Checks if a card would be treated as any attribute other than a specified attribute(s) if it would be used as material to Summon a monster. + parameters: + - *c + - *attr + - name: scard + type: [ Card ] + description: The monster that would be Summoned using `c` as material. + - name: sumtype + type: [ int ] + description: The [type of Summon](/api/enums/SummonType). + - name: playerid + type: [ int ] + description: The player that would perform the Summon. + returns: + - type: [ bool ] + description: >- + `true` if `c` would be treated as any attribute other than `attr` when used as material for the Summon of `scard`, `false` otherwise. +suggestedLinks: + - name: Card.IsAttribute + link: /api/functions/Card/IsAttribute + - name: Card.GetAttribute + link: /api/functions/Card/GetAttribute +tags: [ card-check, attribute-related ] diff --git a/api/functions/Card/IsDifferentAttribute.yml b/api/functions/Card/IsDifferentAttribute.yml deleted file mode 100644 index 26d366b..0000000 --- a/api/functions/Card/IsDifferentAttribute.yml +++ /dev/null @@ -1,18 +0,0 @@ ----!function -name: IsDifferentAttribute -namespace: Card -description: >- - Deprecated function. Use Card.IsAttributeExcept -status: - index: stable -parameters: - - name: c - type: [ Card ] - description: (To be added) - - name: att - type: [ int ] - description: (To be added) -returns: - - type: [ bool ] - description: (To be added) -tags: [ under-construction ] diff --git a/api/functions/Card/IsDifferentRace.yml b/api/functions/Card/IsDifferentRace.yml deleted file mode 100644 index d9c6960..0000000 --- a/api/functions/Card/IsDifferentRace.yml +++ /dev/null @@ -1,18 +0,0 @@ ----!function -name: IsDifferentRace -namespace: Card -description: >- - Deprecated function. Use Card.IsRaceExcept -status: - index: stable -parameters: - - name: c - type: [ Card ] - description: (To be added) - - name: race - type: [ int ] - description: (To be added) -returns: - - type: [ bool ] - description: (To be added) -tags: [ under-construction ] diff --git a/api/functions/Card/IsRaceExcept.yml b/api/functions/Card/IsRaceExcept.yml index 1969c22..f4a6cb1 100644 --- a/api/functions/Card/IsRaceExcept.yml +++ b/api/functions/Card/IsRaceExcept.yml @@ -1,30 +1,50 @@ ---!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 +description: &desc Checks if a card currently has any race other than a specified race(s). +summary: *desc status: index: stable +aliases: + - name: Card.IsDifferentRace + status: + index: deleted parameters: - - name: c + - &c + name: c type: [ Card ] - description: (To be added) - - name: race + description: The monster to check the race(s) of. + - &race + 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 + description: >- + Composite [MonsterRace](/api/enums/MonsterRace) value to check. + `c` needs to have any race other than this value. returns: - type: [ bool ] - description: (To be added) -tags: [ under-construction ] + description: >- + `true` if `c` has any race other than the specified `race`, `false` otherwise. +overloads: + - description: Checks if a card would be treated as any race other than a specified race(s) if it would be used as material to Summon a monster. + parameters: + - *c + - *race + - name: scard + type: [ Card ] + description: The monster that would be Summoned using `c` as material. + - name: sumtype + type: [ int ] + description: The [type of Summon](/api/enums/SummonType). + - name: playerid + type: [ int ] + description: The player that would perform the Summon. + returns: + - type: [ bool ] + description: >- + `true` if `c` would be treated as any race other than the specified `race` when used as material for the Summon of `scard`, `false` otherwise. +suggestedLinks: + - name: Card.IsRace + link: /api/functions/Card/IsRace + - name: Card.GetRace + link: /api/functions/Card/GetRace +tags: [ card-check, race-related ] diff --git a/api/functions/Card/RemoveCounter.yml b/api/functions/Card/RemoveCounter.yml index a2d1605..4fad8f0 100644 --- a/api/functions/Card/RemoveCounter.yml +++ b/api/functions/Card/RemoveCounter.yml @@ -1,27 +1,28 @@ ---!function name: RemoveCounter namespace: Card -description: >- - Removes a number (int count) of the specified counter (int countertype) from a card (Card c), with reason described by (int reason) +description: &desc Removes any amount of a specified counter from a card. +summary: *desc status: index: stable parameters: - name: c type: [ Card ] - description: (To be added) + description: The card to remove counters from. - name: player type: [ int ] - description: (To be added) + description: The player removing the counters. - name: countertype type: [ int ] - description: (To be added) + description: The type of counter to remove. - name: count type: [ int ] - description: (To be added) + description: The amount of counters to remove. - name: reason type: [ int ] - description: (To be added) + description: Composite [Reason](/api/enums/Reason) value describing why the counters are being removed. returns: - type: [ bool ] - description: (To be added) -tags: [ under-construction ] + description: >- + `true` if at least 1 counter was successfully removed, `false` otherwise. +tags: [ counters-related ] diff --git a/api/functions/Card/UpdateAttack.yml b/api/functions/Card/UpdateAttack.yml index dd5dbc4..523b25c 100644 --- a/api/functions/Card/UpdateAttack.yml +++ b/api/functions/Card/UpdateAttack.yml @@ -1,30 +1,34 @@ ---!function 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. If reset_count is not provided it defaults to 1. Returns the amount of ATK successfully changed. +description: Increases the ATK of a card by a specified value (or decreases it if the value is negative). +summary: Increases (or decreases) the ATK of a card. status: index: stable parameters: - name: c type: [ Card ] - description: (To be added) + description: The card to update the ATK of. - name: amount type: [ int ] - description: (To be added) + description: >- + The value to add to the card's current ATK. + Can be negative to decrease the card's ATK. - name: reset type: [ int ] - description: (To be added) + description: Composite [Reset](/api/enums/Reset) value describing when the ATK change stops applying. required: false - name: rc type: [ Card ] - description: (To be added) + description: The card causing the ATK change. required: false + defaultValue: c - name: reset_count type: [ int ] - description: (To be added) + description: How many times `reset` must happen for the ATK change to stop applying. required: false + defaultValue: 1 returns: - type: [ int ] - description: (To be added) -tags: [ under-construction ] + description: The amount of ATK successfully changed (the difference between the card's new ATK and its previous ATK). +tags: [ atk-related, registers-effect ] diff --git a/api/functions/Card/UpdateDefense.yml b/api/functions/Card/UpdateDefense.yml index 890d174..be6e224 100644 --- a/api/functions/Card/UpdateDefense.yml +++ b/api/functions/Card/UpdateDefense.yml @@ -1,30 +1,34 @@ ---!function 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. If reset_count is not provided it defaults to 1. Returns the amount of DEF successfully changed. +description: Increases the DEF of a card by a specified value (or decreases it if the value is negative). +summary: Increases (or decreases) the DEF of a card. status: index: stable parameters: - name: c type: [ Card ] - description: (To be added) + description: The card to update the DEF of. - name: amount type: [ int ] - description: (To be added) + description: >- + The value to add to the card's current DEF. + Can be negative to decrease the card's DEF. - name: reset type: [ int ] - description: (To be added) + description: Composite [Reset](/api/enums/Reset) value describing when the DEF change stops applying. required: false - name: rc type: [ Card ] - description: (To be added) + description: The card causing the DEF change. required: false + defaultValue: c - name: reset_count type: [ int ] - description: (To be added) + description: How many times `reset` must happen for the DEF change to stop applying. required: false + defaultValue: 1 returns: - type: [ int ] - description: (To be added) -tags: [ under-construction ] + description: The amount of DEF successfully changed (the difference between the card's new DEF and its previous DEF). +tags: [ def-related, registers-effect ] diff --git a/api/functions/Cost/Choice.yml b/api/functions/Cost/Choice.yml index abb77e3..7690da5 100644 --- a/api/functions/Cost/Choice.yml +++ b/api/functions/Cost/Choice.yml @@ -1,15 +1,16 @@ ---!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. +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"](https://yugipedia.com/wiki/Starliege_Lord_Galaxion)). summary: Creates a cost function that gives the player a choice between different costs. status: index: stable parameters: - name: ... - type: [ any ] - description: (To be added) + type: [ table ] + description: >- + Any amount of choices represented by tables in the form {base [cost function](/api/types/EffectCost), effect description, additional check function} (e.g. `{Cost.DetachFromSelf(1),aux.Stringid(id,0),s.extracheck}`). + The index of the player's choice will be set as the effect's [label](/api/functions/Effect/SetLabel). 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 index c9f3a60..de2e857 100644 --- a/api/functions/Cost/HardOncePerBattle.yml +++ b/api/functions/Cost/HardOncePerBattle.yml @@ -8,11 +8,10 @@ status: parameters: - name: flag type: [ int ] - description: The value of the flag to register to the duel. + description: The value of the flag to register to the Duel. returns: - type: [ EffectCost ] - description: The generated cost function. - guaranteed: true + description: The cost function generated based on the given parameters. suggestedLinks: - name: Cost.SoftOncePerBattle link: /api/functions/Cost/SoftOncePerBattle diff --git a/api/functions/Cost/HintSelectedEffect.yml b/api/functions/Cost/HintSelectedEffect.yml index 21b5112..726549d 100644 --- a/api/functions/Cost/HintSelectedEffect.yml +++ b/api/functions/Cost/HintSelectedEffect.yml @@ -1,7 +1,7 @@ ---!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"). +description: A baseline [cost function](/api/types/EffectCost) used for effects that need to display which effect was activated (e.g. ["Exosister Gibrine"](https://yugipedia.com/wiki/Exosister_Gibrine)). summary: Cost function for effects that need to display which effect was activated. status: index: stable diff --git a/api/functions/Cost/RemoveCounterFromField.yml b/api/functions/Cost/RemoveCounterFromField.yml index 49d4acf..a190343 100644 --- a/api/functions/Cost/RemoveCounterFromField.yml +++ b/api/functions/Cost/RemoveCounterFromField.yml @@ -1,7 +1,7 @@ ---!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"). +description: Creates a baseline [cost function](/api/types/EffectCost) 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"](https://yugipedia.com/wiki/Arcanite_Magician)). summary: Creates a cost function for effects that remove a counter from the field. status: index: stable @@ -15,4 +15,3 @@ parameters: 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 index a4377e4..d441334 100644 --- a/api/functions/Cost/RemoveCounterFromSelf.yml +++ b/api/functions/Cost/RemoveCounterFromSelf.yml @@ -1,7 +1,7 @@ ---!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"). +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"](https://yugipedia.com/wiki/Breaker_the_Magical_Warrior)). summary: Creates a cost function for effects that remove a counter from the card itself. status: index: stable @@ -15,4 +15,3 @@ parameters: 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 index 6a0b01a..2f6890f 100644 --- a/api/functions/Cost/SelfChangePosition.yml +++ b/api/functions/Cost/SelfChangePosition.yml @@ -1,7 +1,7 @@ ---!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"). +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"](https://yugipedia.com/wiki/Enneacraft_-_Atori.MAR)). summary: Creates a cost function for effects that change the card's own position as cost. status: index: stable @@ -11,5 +11,4 @@ parameters: description: The position to change the card to. returns: - type: [ EffectCost ] - description: The cost function generated based on the given parameters. - guaranteed: true + description: The cost function generated based on the given parameters. \ No newline at end of file diff --git a/api/functions/Cost/SoftOncePerBattle.yml b/api/functions/Cost/SoftOncePerBattle.yml index 37b6265..8e11b90 100644 --- a/api/functions/Cost/SoftOncePerBattle.yml +++ b/api/functions/Cost/SoftOncePerBattle.yml @@ -1,7 +1,7 @@ ---!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". +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"](https://yugipedia.com/wiki/Lavalval_Ignis). summary: Creates a cost function for "soft once per battle" effects. status: index: stable @@ -11,8 +11,7 @@ parameters: description: The value of the flag to register to the card. returns: - type: [ EffectCost ] - description: The generated cost function. - guaranteed: true + description: The cost function generated based on the given parameters. suggestedLinks: - name: Cost.HardOncePerBattle link: /api/functions/Cost/HardOncePerBattle diff --git a/api/functions/Duel/GetReasonEffect.yml b/api/functions/Duel/GetReasonEffect.yml index bfdcd09..9d4f54b 100644 --- a/api/functions/Duel/GetReasonEffect.yml +++ b/api/functions/Duel/GetReasonEffect.yml @@ -1,10 +1,10 @@ ---!function name: GetReasonEffect namespace: Duel -description: >- - Returns the [effect](/api/types/Effect) that the core considers as the "current effect" (`core.reason_effect`) +description: Returns the [effect](/api/types/Effect) that the simulator considers as the "current effect", typically the effect being currently checked, activated, resolved, or applied. +summary: Returns the "current effect". status: index: stable returns: - type: [ Effect ] - description: (To be added) + description: The current effect. diff --git a/api/functions/Duel/GetReasonPlayer.yml b/api/functions/Duel/GetReasonPlayer.yml index 8e9724b..b78d351 100644 --- a/api/functions/Duel/GetReasonPlayer.yml +++ b/api/functions/Duel/GetReasonPlayer.yml @@ -1,10 +1,10 @@ ---!function name: GetReasonPlayer namespace: Duel -description: >- - Returns the player that the core considers as the "current player" (`core.reason_player`) +description: Returns the [effect](/api/types/Effect) that the simulator considers as the "current player", typically the player currently performing an action. +summary: Returns the "current player". status: index: stable returns: - type: [ int ] - description: (To be added) + description: The "current player". diff --git a/api/functions/Duel/GetTargetGroup.yml b/api/functions/Duel/GetTargetGroup.yml index f53f738..1fabd11 100644 --- a/api/functions/Duel/GetTargetGroup.yml +++ b/api/functions/Duel/GetTargetGroup.yml @@ -2,29 +2,30 @@ 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) + Returns cards from given locations that match a filter and can be targeted by the ["current effect"](/api/functions/Duel/GetReasonEffect). + Essentially [`Duel.GetMatchingGroup`](/api/functions/Duel/GetMatchingGroup), but implicitly checks for targetable cards. +summary: Returns targetable cards from given locations that match a filter. status: index: stable parameters: - - name: f - type: [ function ] - description: (To be added) + - name: filter + type: [ FilterFunction ] + description: A function that must return `true` for a card to be included. - name: player type: [ int ] - description: (To be added) + description: The player from whose perspective the `s` and `o` locations will be based on. - name: s type: [ int ] - description: (To be added) + description: Composite [Location](/api/enums/Location) value representing locations on `player`'s side of the Duel. - name: o type: [ int ] - description: (To be added) + description: Composite [Location](/api/enums/Location) value representing locations on `player`'s opponent's side of the Duel. - name: ex type: [ Group, Card, nil ] - description: (To be added) + description: Cards to exclude from the returned group even if they match the filter. - name: ... type: [ any ] - description: (To be added) + description: Additional arguments to be passed as additional arguments to `filter`. returns: - type: [ Group ] - description: (To be added) -tags: [ under-construction ] + description: The group of cards from the given locations that fulfill `filter` and can be targeted by the "current effect". \ No newline at end of file diff --git a/api/functions/Effect/HasDetachCost.yml b/api/functions/Effect/HasDetachCost.yml index 7738631..f6f0785 100644 --- a/api/functions/Effect/HasDetachCost.yml +++ b/api/functions/Effect/HasDetachCost.yml @@ -1,18 +1,15 @@ ---!function name: HasDetachCost namespace: Effect -description: >- - Returns true if the effect (Effect e) has a cost that detaches Xyz Material(s) +description: Checks if an [Effect](/api/types/Effect) has a cost that detaches an Xyz Material(s) from the activating card itself. +summary: Checks if an effect has a cost that detaches Xyz Materials from itself. status: index: stable parameters: - name: e type: [ Effect ] - description: (To be added) - - name: type - type: [ int ] - description: (To be added) + description: The effect to check the cost of. returns: - type: [ bool ] - description: (To be added) -tags: [ under-construction ] + description: >- + `true` if `e` has a cost that detaches Xyz Materials from the activating card, `false` otherwise. diff --git a/api/functions/Effect/HasSelfDiscardCost.yml b/api/functions/Effect/HasSelfDiscardCost.yml index cd965e3..a1d03ac 100644 --- a/api/functions/Effect/HasSelfDiscardCost.yml +++ b/api/functions/Effect/HasSelfDiscardCost.yml @@ -1,15 +1,15 @@ ---!function name: HasSelfDiscardCost namespace: Effect -description: >- - Returns true if the effect (Effect e) has a cost that discards the card itself +description: Checks if an [Effect](/api/types/Effect) has a cost that discards the activating card itself. +summary: Checks if an effect has a cost that discards the activating card itself. status: index: stable parameters: - name: e type: [ Effect ] - description: (To be added) + description: The effect to check the cost of. returns: - type: [ bool ] - description: (To be added) -tags: [ under-construction ] + description: >- + `true` if `e` has a cost that discards the activating card, `false` otherwise. diff --git a/api/functions/Effect/HasSelfToGraveCost.yml b/api/functions/Effect/HasSelfToGraveCost.yml index cbe3743..d7cce4c 100644 --- a/api/functions/Effect/HasSelfToGraveCost.yml +++ b/api/functions/Effect/HasSelfToGraveCost.yml @@ -1,15 +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 +description: Checks if an [Effect](/api/types/Effect) has a cost that discards the activating card itself to the GY. +summary: Checks if an effect has a cost that sends the activating card itself to the GY. status: index: stable parameters: - name: e type: [ Effect ] - description: (To be added) + description: The effect to check the cost of. returns: - type: [ bool ] - description: (To be added) -tags: [ under-construction ] + description: >- + `true` if `e` has a cost that sends the activating card to the GY, `false` otherwise.