diff --git a/api/functions/Card/IsCoLinked.yml b/api/functions/Card/IsCoLinked.yml new file mode 100644 index 0000000..7e96ca8 --- /dev/null +++ b/api/functions/Card/IsCoLinked.yml @@ -0,0 +1,22 @@ +---!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. + - name: count + type: [ int ] + description: The number of co-links to check for. + required: false + defaultValue: 1 +returns: + - type: [ bool ] + description: >- + `true` if the card is currently co-linked, `false` otherwise. +status: + index: stable +tags: [ card-check, card-type-related ] diff --git a/api/functions/Cost/Discard.yml b/api/functions/Cost/Discard.yml index d4d749d..68ca7eb 100644 --- a/api/functions/Cost/Discard.yml +++ b/api/functions/Cost/Discard.yml @@ -14,17 +14,28 @@ 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"). 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 cards to discard. required: false defaultValue: 1 + - name: max + # TODO: document type of function + type: [ int, function ] + 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 cards after discarding them. + required: false returns: - type: [ EffectCost ] description: The cost function generated based on the given parameters. diff --git a/api/functions/Cost/Reveal.yml b/api/functions/Cost/Reveal.yml new file mode 100644 index 0000000..22f009c --- /dev/null +++ b/api/functions/Cost/Reveal.yml @@ -0,0 +1,43 @@ +---!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 + - 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