diff --git a/api/functions/Card/AddCannotBeFlipSummoned.yml b/api/functions/Card/AddCannotBeFlipSummoned.yml new file mode 100644 index 00000000..c915099e --- /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 00000000..8bdedc88 --- /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 ] diff --git a/api/functions/Card/IsDifferentRace.yml b/api/functions/Card/IsDifferentRace.yml index 0da857e6..d9c6960f 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: diff --git a/api/functions/Card/IsEffectMonster.yml b/api/functions/Card/IsEffectMonster.yml new file mode 100644 index 00000000..a622b948 --- /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 an Effect Monster. +parameters: + - name: c + type: [ Card ] + description: The card to check. +returns: + - type: [ bool ] + description: >- + `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/IsFusionMonster.yml b/api/functions/Card/IsFusionMonster.yml new file mode 100644 index 00000000..d0bb91a2 --- /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 00000000..ae73adb9 --- /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/IsRaceExcept.yml b/api/functions/Card/IsRaceExcept.yml new file mode 100644 index 00000000..1969c22b --- /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 ] diff --git a/api/functions/Card/IsSynchroMonster.yml b/api/functions/Card/IsSynchroMonster.yml new file mode 100644 index 00000000..fedee7ee --- /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 00000000..dec26e5a --- /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 an Xyz Monster. +parameters: + - name: c + type: [ Card ] + description: The card to check. +returns: + - type: [ bool ] + description: >- + `true` if the card is currently an Xyz Monster, `false` otherwise. +status: + index: stable +tags: [ card-check, card-type-related ] diff --git a/api/functions/Card/UpdateAttack.yml b/api/functions/Card/UpdateAttack.yml index 1168e8fb..dd5dbc48 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) diff --git a/api/functions/Card/UpdateDefense.yml b/api/functions/Card/UpdateDefense.yml index 1c67adf4..890d174e 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) diff --git a/api/functions/Cost/Choice.yml b/api/functions/Cost/Choice.yml new file mode 100644 index 00000000..abb77e3c --- /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 costs. +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 00000000..c9f3a60e --- /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 00000000..21b51124 --- /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/RemoveCounterFromField.yml b/api/functions/Cost/RemoveCounterFromField.yml new file mode 100644 index 00000000..49d4acf8 --- /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 from the field. +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 00000000..a4377e46 --- /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 from the card itself. +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 00000000..6a0b01ad --- /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 card's own position 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 diff --git a/api/functions/Cost/SoftOncePerBattle.yml b/api/functions/Cost/SoftOncePerBattle.yml new file mode 100644 index 00000000..37b6265c --- /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 diff --git a/api/functions/Duel/GetReasonEffect.yml b/api/functions/Duel/GetReasonEffect.yml new file mode 100644 index 00000000..bfdcd09e --- /dev/null +++ b/api/functions/Duel/GetReasonEffect.yml @@ -0,0 +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`) +status: + index: stable +returns: + - type: [ Effect ] + description: (To be added) diff --git a/api/functions/Duel/GetReasonPlayer.yml b/api/functions/Duel/GetReasonPlayer.yml new file mode 100644 index 00000000..8e9724be --- /dev/null +++ b/api/functions/Duel/GetReasonPlayer.yml @@ -0,0 +1,10 @@ +---!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 ] + description: (To be added) diff --git a/api/functions/Duel/GetTargetGroup.yml b/api/functions/Duel/GetTargetGroup.yml new file mode 100644 index 00000000..f53f7386 --- /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 ] diff --git a/api/functions/Effect/HasDetachCost.yml b/api/functions/Effect/HasDetachCost.yml new file mode 100644 index 00000000..77386311 --- /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 00000000..cd965e38 --- /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 00000000..cbe37431 --- /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 ] diff --git a/api/functions/Link/AddProcedure.yml b/api/functions/Link/AddProcedure.yml index 255ca080..902f4207 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