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/IsAttributeExcept.yml b/api/functions/Card/IsAttributeExcept.yml index a22c9ea5..cde92760 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 26d366bb..00000000 --- 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 0da857e6..00000000 --- a/api/functions/Card/IsDifferentRace.yml +++ /dev/null @@ -1,18 +0,0 @@ ----!function -name: IsDifferentRace -namespace: Card -description: >- - Returns if (Card c) does not have Race (int race) -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/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..f4a6cb12 --- /dev/null +++ b/api/functions/Card/IsRaceExcept.yml @@ -0,0 +1,50 @@ +---!function +name: IsRaceExcept +namespace: Card +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: + - &c + name: c + type: [ Card ] + description: The monster to check the race(s) of. + - &race + name: race + type: [ int ] + description: >- + Composite [MonsterRace](/api/enums/MonsterRace) value to check. + `c` needs to have any race other than this value. +returns: + - type: [ bool ] + 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/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/RemoveCounter.yml b/api/functions/Card/RemoveCounter.yml index ee8d7181..4fad8f01 100644 --- a/api/functions/Card/RemoveCounter.yml +++ b/api/functions/Card/RemoveCounter.yml @@ -1,24 +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) -tags: [ under-construction ] + description: Composite [Reason](/api/enums/Reason) value describing why the counters are being removed. +returns: + - type: [ bool ] + 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 1168e8fb..523b25ca 100644 --- a/api/functions/Card/UpdateAttack.yml +++ b/api/functions/Card/UpdateAttack.yml @@ -1,26 +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. 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: 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 1c67adf4..be6e224a 100644 --- a/api/functions/Card/UpdateDefense.yml +++ b/api/functions/Card/UpdateDefense.yml @@ -1,26 +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. 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: 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 new file mode 100644 index 00000000..7690da56 --- /dev/null +++ b/api/functions/Cost/Choice.yml @@ -0,0 +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"](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: [ 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. diff --git a/api/functions/Cost/HardOncePerBattle.yml b/api/functions/Cost/HardOncePerBattle.yml new file mode 100644 index 00000000..de2e8572 --- /dev/null +++ b/api/functions/Cost/HardOncePerBattle.yml @@ -0,0 +1,17 @@ +---!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 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 new file mode 100644 index 00000000..726549da --- /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"](https://yugipedia.com/wiki/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..a1903431 --- /dev/null +++ b/api/functions/Cost/RemoveCounterFromField.yml @@ -0,0 +1,17 @@ +---!function +name: RemoveCounterFromField +namespace: Cost +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 +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. diff --git a/api/functions/Cost/RemoveCounterFromSelf.yml b/api/functions/Cost/RemoveCounterFromSelf.yml new file mode 100644 index 00000000..d4413340 --- /dev/null +++ b/api/functions/Cost/RemoveCounterFromSelf.yml @@ -0,0 +1,17 @@ +---!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"](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 +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. diff --git a/api/functions/Cost/SelfChangePosition.yml b/api/functions/Cost/SelfChangePosition.yml new file mode 100644 index 00000000..2f6890f2 --- /dev/null +++ b/api/functions/Cost/SelfChangePosition.yml @@ -0,0 +1,14 @@ +---!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"](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 +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. \ No newline at end of file diff --git a/api/functions/Cost/SoftOncePerBattle.yml b/api/functions/Cost/SoftOncePerBattle.yml new file mode 100644 index 00000000..8e11b901 --- /dev/null +++ b/api/functions/Cost/SoftOncePerBattle.yml @@ -0,0 +1,17 @@ +---!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"](https://yugipedia.com/wiki/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 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 new file mode 100644 index 00000000..9d4f54b1 --- /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 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: The current effect. diff --git a/api/functions/Duel/GetReasonPlayer.yml b/api/functions/Duel/GetReasonPlayer.yml new file mode 100644 index 00000000..b78d351d --- /dev/null +++ b/api/functions/Duel/GetReasonPlayer.yml @@ -0,0 +1,10 @@ +---!function +name: GetReasonPlayer +namespace: Duel +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: The "current player". diff --git a/api/functions/Duel/GetTargetGroup.yml b/api/functions/Duel/GetTargetGroup.yml new file mode 100644 index 00000000..1fabd114 --- /dev/null +++ b/api/functions/Duel/GetTargetGroup.yml @@ -0,0 +1,31 @@ +---!function +name: GetTargetGroup +namespace: Duel +description: >- + 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: filter + type: [ FilterFunction ] + description: A function that must return `true` for a card to be included. + - name: player + type: [ int ] + description: The player from whose perspective the `s` and `o` locations will be based on. + - name: s + type: [ int ] + description: Composite [Location](/api/enums/Location) value representing locations on `player`'s side of the Duel. + - name: o + type: [ int ] + 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: Cards to exclude from the returned group even if they match the filter. + - name: ... + type: [ any ] + description: Additional arguments to be passed as additional arguments to `filter`. +returns: + - type: [ Group ] + 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 new file mode 100644 index 00000000..f6f07858 --- /dev/null +++ b/api/functions/Effect/HasDetachCost.yml @@ -0,0 +1,15 @@ +---!function +name: HasDetachCost +namespace: Effect +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: The effect to check the cost of. +returns: + - type: [ bool ] + 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 new file mode 100644 index 00000000..a1d03ac6 --- /dev/null +++ b/api/functions/Effect/HasSelfDiscardCost.yml @@ -0,0 +1,15 @@ +---!function +name: HasSelfDiscardCost +namespace: Effect +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: The effect to check the cost of. +returns: + - type: [ bool ] + 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 new file mode 100644 index 00000000..d7cce4ce --- /dev/null +++ b/api/functions/Effect/HasSelfToGraveCost.yml @@ -0,0 +1,15 @@ +---!function +name: HasSelfToGraveCost +namespace: Effect +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: The effect to check the cost of. +returns: + - type: [ bool ] + description: >- + `true` if `e` has a cost that sends the activating card to the GY, `false` otherwise. 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