From bf9f90a0c963cb9b02fa3991686a210d42b2a756 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sat, 4 Apr 2026 22:37:21 +0300 Subject: [PATCH 1/8] Card.IsCoLinked --- api/functions/Card/IsCoLinked.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 api/functions/Card/IsCoLinked.yml diff --git a/api/functions/Card/IsCoLinked.yml b/api/functions/Card/IsCoLinked.yml new file mode 100644 index 0000000..d9e9dfb --- /dev/null +++ b/api/functions/Card/IsCoLinked.yml @@ -0,0 +1,17 @@ +---!function +name: IsCoLinked +namespace: Card +description: >- + Checks if a card is currently [co-linked](https://yugipedia.com/wiki/Co-linked). +summary: Checks if a card is currently co-linked. +parameters: + - name: c + type: [ Card ] + description: The card to check. +returns: + - type: [ bool ] + description: >- + `true` if the card is currently co-linked, `false` otherwise. +status: + index: stable +tags: [ card-check, card-type-related ] From f00a8629d9f11bdef36a453d0da1ba0fb192484a Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sat, 4 Apr 2026 22:40:15 +0300 Subject: [PATCH 2/8] Cost.Discard update same min/max/op features as 'Cost.DetachFromSelf' --- api/functions/Cost/Discard.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/api/functions/Cost/Discard.yml b/api/functions/Cost/Discard.yml index d4d749d..35048b9 100644 --- a/api/functions/Cost/Discard.yml +++ b/api/functions/Cost/Discard.yml @@ -20,11 +20,21 @@ parameters: description: If set to `true`, the activating card itself will be excluded from the discard check and the discarding itself. Used for effects such as `You can discard 1 other card; ...` as well as Spell/Trap activations (e.g. "Twin Twisters"). required: false defaultValue: false - - name: count - type: [ int ] - description: The number of cards to be discarded. + - name: min + # TODO: document type of function + type: [ int, function ] + description: The minimum number of materials to detach. + - name: max + # TODO: document type of function + type: [ int, function ] + description: The maximum number of materials to detach. + required: false + defaultValue: min + - name: op + # TODO: document type of function + type: [ function ] + description: Additional handling to apply to the materials after detaching them. required: false - defaultValue: 1 returns: - type: [ EffectCost ] description: The cost function generated based on the given parameters. From b7f3fc8a6163692080e0fddf1064feccf33d313f Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sat, 4 Apr 2026 22:43:32 +0300 Subject: [PATCH 3/8] min default value 1 + descriptions --- api/functions/Cost/Discard.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/api/functions/Cost/Discard.yml b/api/functions/Cost/Discard.yml index 35048b9..c05a0c8 100644 --- a/api/functions/Cost/Discard.yml +++ b/api/functions/Cost/Discard.yml @@ -23,17 +23,18 @@ parameters: - name: min # TODO: document type of function type: [ int, function ] - description: The minimum number of materials to detach. + description: The minimum number of cards to discard. + defaultValue: 1 - name: max # TODO: document type of function type: [ int, function ] - description: The maximum number of materials to detach. + description: The maximum number of cards to discard. required: false defaultValue: min - name: op # TODO: document type of function type: [ function ] - description: Additional handling to apply to the materials after detaching them. + description: Additional handling to apply to the cards after discarding them. required: false returns: - type: [ EffectCost ] From 759ada9529455adc328a89d6ee33a16d50bc5bd6 Mon Sep 17 00:00:00 2001 From: Hatter <47074795+that-hatter@users.noreply.github.com> Date: Sun, 5 Apr 2026 06:08:21 +0800 Subject: [PATCH 4/8] update Discard.yml --- api/functions/Cost/Discard.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/api/functions/Cost/Discard.yml b/api/functions/Cost/Discard.yml index c05a0c8..017257d 100644 --- a/api/functions/Cost/Discard.yml +++ b/api/functions/Cost/Discard.yml @@ -24,6 +24,7 @@ parameters: # TODO: document type of function type: [ int, function ] description: The minimum number of cards to discard. + required: false defaultValue: 1 - name: max # TODO: document type of function From 725cd2c100c973284409b5c20d579143d82b10e7 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sun, 5 Apr 2026 01:50:09 +0300 Subject: [PATCH 5/8] Cost.Reveal --- api/functions/Cost/Reveal.yml | 44 +++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 api/functions/Cost/Reveal.yml diff --git a/api/functions/Cost/Reveal.yml b/api/functions/Cost/Reveal.yml new file mode 100644 index 0000000..b717571 --- /dev/null +++ b/api/functions/Cost/Reveal.yml @@ -0,0 +1,44 @@ +---!function +name: Reveal +namespace: Cost +description: Creates a baseline [cost function](/api/types/EffectCost) used for effects that reveal a card(s) as cost, such as `Reveal 1... in your hand; ...` (e.g. "Amazoness Spy"). +summary: Creates a cost function for effects that reveal a card(s) as cost. +status: + index: stable +parameters: + - name: filter + type: [ CardFilter ] + description: Additional filter to be used for the card(s) that are to be revealed (e.g. `"Amazoness" monster` for "Amazoness Spy"). + required: false + defaultValue: not Card.IsPublic + - name: other + type: [ bool ] + description: If set to `true`, the activating card itself will be excluded from the reveal check and the revealing itself. Used for effects such as `You can reveal 1 other... in your hand; ...` (e.g. "Amazoness Spy"). + required: false + defaultValue: false + - name: min + # TODO: document type of function + type: [ int, function ] + description: The minimum number of cards to reveal. + required: false + defaultValue: 1 + - name: max + # TODO: document type of function + type: [ int, function ] + description: The maximum number of cards to reveal. + required: false + defaultValue: min + - name: op + # TODO: document type of function + type: [ function ] + description: Additional handling to apply to the cards after revealing them. + required: false + - name: location + type: [ int ] + description: The location to reveal cards from. + required: false + defaultValue: LOCATION_HAND +returns: + - type: [ EffectCost ] + description: The cost function generated based on the given parameters. + guaranteed: true From eaa24e86111bba9d506474ce573fe7a15a906bd7 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sun, 5 Apr 2026 02:03:14 +0300 Subject: [PATCH 6/8] Update Reveal.yml --- api/functions/Cost/Reveal.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/functions/Cost/Reveal.yml b/api/functions/Cost/Reveal.yml index b717571..53e680e 100644 --- a/api/functions/Cost/Reveal.yml +++ b/api/functions/Cost/Reveal.yml @@ -10,7 +10,7 @@ parameters: type: [ CardFilter ] description: Additional filter to be used for the card(s) that are to be revealed (e.g. `"Amazoness" monster` for "Amazoness Spy"). required: false - defaultValue: not Card.IsPublic + defaultValue: function(c) return not c:IsPublic() end - name: other type: [ bool ] description: If set to `true`, the activating card itself will be excluded from the reveal check and the revealing itself. Used for effects such as `You can reveal 1 other... in your hand; ...` (e.g. "Amazoness Spy"). From e3fd08b02eda22356f4798872060cc9cf9bba024 Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Sun, 5 Apr 2026 12:14:44 +0300 Subject: [PATCH 7/8] remove default value for the filter as discussed --- api/functions/Cost/Discard.yml | 1 - api/functions/Cost/Reveal.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/api/functions/Cost/Discard.yml b/api/functions/Cost/Discard.yml index 017257d..68ca7eb 100644 --- a/api/functions/Cost/Discard.yml +++ b/api/functions/Cost/Discard.yml @@ -14,7 +14,6 @@ parameters: type: [ CardFilter ] description: Additional filter to be used for the card(s) that are to be discarded (e.g. `Pendulum Monster` for "Dragonpit Magician"). required: false - defaultValue: Card.IsDiscardable - name: other type: [ bool ] description: If set to `true`, the activating card itself will be excluded from the discard check and the discarding itself. Used for effects such as `You can discard 1 other card; ...` as well as Spell/Trap activations (e.g. "Twin Twisters"). diff --git a/api/functions/Cost/Reveal.yml b/api/functions/Cost/Reveal.yml index 53e680e..22f009c 100644 --- a/api/functions/Cost/Reveal.yml +++ b/api/functions/Cost/Reveal.yml @@ -10,7 +10,6 @@ parameters: type: [ CardFilter ] description: Additional filter to be used for the card(s) that are to be revealed (e.g. `"Amazoness" monster` for "Amazoness Spy"). required: false - defaultValue: function(c) return not c:IsPublic() end - name: other type: [ bool ] description: If set to `true`, the activating card itself will be excluded from the reveal check and the revealing itself. Used for effects such as `You can reveal 1 other... in your hand; ...` (e.g. "Amazoness Spy"). From 7cd3787f34b4df7390c68d79c38ecf09b54a8ddc Mon Sep 17 00:00:00 2001 From: pyrQ <30827955+pyrQ@users.noreply.github.com> Date: Mon, 6 Apr 2026 13:10:34 +0300 Subject: [PATCH 8/8] added extra param to Card.IsCoLinked --- api/functions/Card/IsCoLinked.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/api/functions/Card/IsCoLinked.yml b/api/functions/Card/IsCoLinked.yml index d9e9dfb..7e96ca8 100644 --- a/api/functions/Card/IsCoLinked.yml +++ b/api/functions/Card/IsCoLinked.yml @@ -8,6 +8,11 @@ parameters: - name: c type: [ Card ] description: The card to check. + - name: count + type: [ int ] + description: The number of co-links to check for. + required: false + defaultValue: 1 returns: - type: [ bool ] description: >-