From 23f03e361064f5dc6d331ea82e0b2911347a57a0 Mon Sep 17 00:00:00 2001 From: Naim Date: Wed, 14 Feb 2024 11:16:09 -0300 Subject: [PATCH 01/20] update Rush tag --- api/tags/rush.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/tags/rush.yml b/api/tags/rush.yml index ff89074d..9c2a2cd9 100644 --- a/api/tags/rush.yml +++ b/api/tags/rush.yml @@ -1,4 +1,4 @@ ---!tag name: rush description: |- - Related to Rush Duels. + Function or constant related to the implementation of the rules and cards from Rush Duel. Implementations can be found in proc_maximum.lua From a8a8aec7c49bb67fcad99787d2ae0edd0a2d088b Mon Sep 17 00:00:00 2001 From: Naim Date: Wed, 14 Feb 2024 11:16:37 -0300 Subject: [PATCH 02/20] update Xyz.AddProcedure --- api/functions/Xyz/AddProcedure.yml | 53 +++++++++++++++++++++--------- 1 file changed, 38 insertions(+), 15 deletions(-) diff --git a/api/functions/Xyz/AddProcedure.yml b/api/functions/Xyz/AddProcedure.yml index dff0ca11..a898fdb6 100644 --- a/api/functions/Xyz/AddProcedure.yml +++ b/api/functions/Xyz/AddProcedure.yml @@ -2,39 +2,62 @@ name: AddProcedure namespace: Xyz description: |- - Adds an Xyz Procedure where (function f) is the required Xyz Material, and (int lv) is the required level, but it can also be nil if there is no required Level. (int ct) is the required number of materials. (function alterf) is the alternate material, e.g. Number C39: Utopia Ray. (int desc) is the description shown when attempting to Xyz Summon using (function alterf). (int maxct) is the maximum number of materials, which defaults to (int ct). (function op) is used by some monsters do something else in addition to using an Xyz Material (e.g. Digital Bug Corebage (detach 2 materials) or Number 99: Utopic Dragon (discard 1 "Rank-Up-Magic")). (bool mustbemat) is used if you can only use the listed materials during the Xyz Summon, this disallows Anime effects such as Orichalcum Chain (minus 1 material) or Triangle Evolution (triple material). (function exchk) is an additional check at the end of selecting materials (e.g. Number F0: Utopic Future (checks if the materials have the same Rank) + Creates and registers to a card an effect that allows it to be Xyz Summoned. +summary: Adds an Xyz Summon procedure to a card status: index: stable parameters: - name: c type: [ Card ] - description: (To be added) + description: The card that will receive the procedure. - name: f - type: [ function, nil ] - description: (To be added) + type: [ CardFilter, nil ] + description: |- + A filter function for the cards that can be used as Xyz materials. + If no property other than level is required, `nil` is also valid. - name: lv type: [ int, nil ] - description: (To be added) + description: |- + The level the materials must have. + If no specific level is required, `nil` is also valid. - name: ct type: [ int ] - description: (To be added) + description: |- + The number of required materials. + If the card allows a variable number of materials, ct is used as the minimum. - name: alterf - type: [ f, nil ] - description: (To be added) + type: [ CardFilter, nil ] + description: Alternative material(s), if allowed by the card (e.g. Number C39: Utopia Ray). + required: false + defaultValue: nil - name: desc - type: [ int ] - description: (To be added) + type: [ string ] + description: |- + An integer pointing to a string for the description shown when attempting to Xyz Summon using the alternative materials. + Mandatory when `alterf` is used. + required: false + defaultValue: 0 - name: maxct type: [ int ] - description: (To be added) + description: The maximum number of materials. + required: false defaultValue: ct - name: op type: [ function ] - description: (To be added) + description: |- + A function to be used when an extra operation must be executed in addition to using Xyz Materials (e.g. Digital Bug Corebage, Number 99: Utopic Dragon) + required: false + defaultValue: nil - name: mustbemat type: [ bool ] - description: (To be added) + description: |- + A parameter that restricts the materials to specifically listed materials. + This disables the effects of cards such as Orichalcum Chain (minus 1 material) or Triangle Evolution (triple material). + required: false + defaultValue: false - name: exchk type: [ function ] - description: (To be added) -tags: [ under-construction ] + description: |- + Additional checks that are performed in the material group (e.g. Number F0: Utopic Future) + required: false + defaultValue: nil From 803face83e3b985220e3102fb99a017cbeebaa1b Mon Sep 17 00:00:00 2001 From: Naim Date: Wed, 14 Feb 2024 11:17:34 -0300 Subject: [PATCH 03/20] CenterToSideEffectHandler --- api/functions/Card/AddCenterToSideEffectHandler.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/api/functions/Card/AddCenterToSideEffectHandler.yml b/api/functions/Card/AddCenterToSideEffectHandler.yml index 7025871d..1bd9ba17 100644 --- a/api/functions/Card/AddCenterToSideEffectHandler.yml +++ b/api/functions/Card/AddCenterToSideEffectHandler.yml @@ -2,14 +2,15 @@ name: AddCenterToSideEffectHandler namespace: Card description: |- - Rush related function + Provides the effects of a Maximum monster center piece to the [L] and [R] pieces. It is mostly used to share the effects that prevent destruction. +summary: Shares the effects of a Maximum monster's center piece to the Left and Right pieces. status: index: stable parameters: - name: c - type: [ any ] - description: (To be added) + type: [ Card ] + description: The main (center) Maximum monster card - name: eff - type: [ any ] - description: (To be added) -tags: [ under-construction ] + type: [ Effect ] + description: The effect that is shared with the Left and Right monsters. +tags: [ rush ] From a497b4feb333cbbb2abd0c66c955ad33720c62d1 Mon Sep 17 00:00:00 2001 From: Naim Date: Wed, 14 Feb 2024 11:17:54 -0300 Subject: [PATCH 04/20] Rush functions related to additional attacks --- api/functions/Card/AddAdditionalAttack.yml | 40 ++++++++++------ .../Card/AddAdditionalAttackOnMonster.yml | 40 ++++++++++------ .../Card/AddAdditionalAttackOnMonsterAll.yml | 47 ++++++++++++------- 3 files changed, 81 insertions(+), 46 deletions(-) diff --git a/api/functions/Card/AddAdditionalAttack.yml b/api/functions/Card/AddAdditionalAttack.yml index 6218fd0f..dee37be4 100644 --- a/api/functions/Card/AddAdditionalAttack.yml +++ b/api/functions/Card/AddAdditionalAttack.yml @@ -1,27 +1,37 @@ ---!function name: AddAdditionalAttack namespace: Card -description: |- - Rush related function +description: &desc |- + Adds to a card an effect that gives it extra attacks. +summary: *desc status: index: stable parameters: - name: c - type: [ any ] - description: (To be added) + type: [ Card ] + description: The card that will receive the effect - name: atknum - type: [ any ] - description: (To be added) + type: [ int ] + description: The number of additional attacks the card gains. - name: reset - type: [ any ] - description: (To be added) + type: [ int ] + description: Reset values to be used with the effect. + required: false + defaultValue: 0 - name: rc - type: [ any ] - description: (To be added) + type: [ Card ] + description: The card that creates the effect (reason card). + required: false + defaultValue: c - name: condition - type: [ any ] - description: (To be added) + type: [ function ] + description: A condition that must be fulfilled before the card can declare an extra attack. + required: false + defaultValue: aux.TRUE - name: properties - type: [ any ] - description: (To be added) -tags: [ under-construction ] + type: [ int ] + description: |- + EFFECT_FLAG_ constants to be added to the effect via SetProperty, in addition to EFFECT_FLAG_CLIENT_HINT, added by default. + required: false + defaultValue: 0 +tags: [ rush ] diff --git a/api/functions/Card/AddAdditionalAttackOnMonster.yml b/api/functions/Card/AddAdditionalAttackOnMonster.yml index 2b9cfdd4..33cb8475 100644 --- a/api/functions/Card/AddAdditionalAttackOnMonster.yml +++ b/api/functions/Card/AddAdditionalAttackOnMonster.yml @@ -1,27 +1,37 @@ ---!function name: AddAdditionalAttackOnMonster namespace: Card -description: |- - Rush related function +description: &desc |- + Adds to a card an effect that allows extra attacks on monsters. +summary: *desc status: index: stable parameters: - name: c - type: [ any ] - description: (To be added) + type: [ Card ] + description: The card that will receive the effect - name: atknum - type: [ any ] - description: (To be added) + type: [ int ] + description: The number of additional attacks on monsters the card gains. - name: reset - type: [ any ] - description: (To be added) + type: [ int ] + description: Reset values to be used with the effect. + required: false + defaultValue: 0 - name: rc - type: [ any ] - description: (To be added) + type: [ Card ] + description: The card that creates the effect (reason card). + required: false + defaultValue: c - name: condition - type: [ any ] - description: (To be added) + type: [ function ] + description: A condition that must be fulfilled before the card can declare an extra attack. + required: false + defaultValue: aux.TRUE - name: properties - type: [ any ] - description: (To be added) -tags: [ under-construction ] + type: [ int ] + description: |- + EFFECT_FLAG_ constants to be added to the effect via SetProperty, in addition to EFFECT_FLAG_CLIENT_HINT, added by default. + required: false + defaultValue: 0 +tags: [ rush ] \ No newline at end of file diff --git a/api/functions/Card/AddAdditionalAttackOnMonsterAll.yml b/api/functions/Card/AddAdditionalAttackOnMonsterAll.yml index a1800003..30ad6e33 100644 --- a/api/functions/Card/AddAdditionalAttackOnMonsterAll.yml +++ b/api/functions/Card/AddAdditionalAttackOnMonsterAll.yml @@ -1,27 +1,42 @@ ---!function name: AddAdditionalAttackOnMonsterAll namespace: Card -description: |- - Rush related function +description: &desc |- + Adds to a card an effect that allows it to attack all monsters the opponent controls. +summary: *desc status: index: stable parameters: - name: c - type: [ any ] - description: (To be added) + type: [ Card ] + description: The card that will receive the effect. + - name: atknum + type: [ int ] + description: The number of additional attacks on monsters the card gains. - name: reset - type: [ any ] - description: (To be added) + type: [ int ] + description: Reset values to be used with the effect. + required: false + defaultValue: 0 - name: rc - type: [ any ] - description: (To be added) - - name: value - type: [ any ] - description: (To be added) + type: [ Card ] + description: The card that creates the effect (reason card). + required: false + defaultValue: c + - name: value + type: [ int ] + description: The number of attacks allowed on each monster. + required: false + defaultValue: 1 - name: condition - type: [ any ] - description: (To be added) + type: [ function ] + description: A condition that must be fulfilled before the card can declare an extra attack. + required: false + defaultValue: aux.TRUE - name: properties - type: [ any ] - description: (To be added) -tags: [ under-construction ] + type: [ int ] + description: |- + EFFECT_FLAG_ constants to be added to the effect via SetProperty, in addition to EFFECT_FLAG_CLIENT_HINT, added by default. + required: false + defaultValue: 0 +tags: [ rush ] \ No newline at end of file From 959aee429110690f7e9beef5bb032ef509312e32 Mon Sep 17 00:00:00 2001 From: Naim Date: Wed, 14 Feb 2024 11:18:43 -0300 Subject: [PATCH 05/20] AddCannotBeDestroyedBattle + AddCannotBeDestroyedEffect --- .../Card/AddCannotBeDestroyedBattle.yml | 44 ++++++++++++------- .../Card/AddCannotBeDestroyedEffect.yml | 43 +++++++++++------- 2 files changed, 55 insertions(+), 32 deletions(-) diff --git a/api/functions/Card/AddCannotBeDestroyedBattle.yml b/api/functions/Card/AddCannotBeDestroyedBattle.yml index 8cf4832b..6376d92c 100644 --- a/api/functions/Card/AddCannotBeDestroyedBattle.yml +++ b/api/functions/Card/AddCannotBeDestroyedBattle.yml @@ -1,27 +1,39 @@ ---!function name: AddCannotBeDestroyedBattle namespace: Card -description: |- - Rush related function +description: &desc |- + Adds to a card an effect that prevents it from being destroyed by battle. +summary: *desc status: index: stable parameters: - name: c - type: [ any ] - description: (To be added) + type: [ Card ] + description: The card that will receive the effect. - name: reset - type: [ any ] - description: (To be added) - - name: value - type: [ any ] - description: (To be added) + type: [ int ] + description: Reset values to be used with the effect. + required: false + defaultValue: 0 + - name: value + type: [ function, int ] + description: A function to be used via SetValue, to define when the monster is not destroyed. + required: false + defaultValue: 1 - name: rc - type: [ any ] - description: (To be added) + type: [ Card ] + description: The card that creates the effect (reason card). + required: false + defaultValue: c - name: condition - type: [ any ] - description: (To be added) + type: [ function ] + description: A condition that must be fulfilled for the effect to be applied. + required: false + defaultValue: aux.TRUE - name: properties - type: [ any ] - description: (To be added) -tags: [ under-construction ] + type: [ int ] + description: |- + EFFECT_FLAG_ constants to be added to the effect via SetProperty, in addition to EFFECT_FLAG_CLIENT_HINT, added by default. + required: false + defaultValue: 0 +tags: [ rush ] \ No newline at end of file diff --git a/api/functions/Card/AddCannotBeDestroyedEffect.yml b/api/functions/Card/AddCannotBeDestroyedEffect.yml index 2153d2ad..db347b4f 100644 --- a/api/functions/Card/AddCannotBeDestroyedEffect.yml +++ b/api/functions/Card/AddCannotBeDestroyedEffect.yml @@ -1,27 +1,38 @@ ---!function name: AddCannotBeDestroyedEffect namespace: Card -description: |- - Rush related function +description: &desc |- + Adds to a card an effect that prevents it from being destroyed by effects of the opponent's cards with the provided type. +summary: *desc status: index: stable parameters: - name: c - type: [ any ] - description: (To be added) + type: [ Card ] + description: The card that will receive the effect. + - name: ctype + type: [ int ] + description: |- + The major card type that the affected card cannot be destroyed by. - name: reset - type: [ any ] - description: (To be added) - - name: value - type: [ any ] - description: (To be added) + type: [ int ] + description: Reset values to be used with the effect. + required: false + defaultValue: 0 - name: rc - type: [ any ] - description: (To be added) + type: [ Card ] + description: The card that creates the effect (reason card). + required: false + defaultValue: c - name: condition - type: [ any ] - description: (To be added) + type: [ function ] + description: A condition that must be fulfilled for the effect to be applied. + required: false + defaultValue: aux.TRUE - name: properties - type: [ any ] - description: (To be added) -tags: [ under-construction ] + type: [ int ] + description: |- + EFFECT_FLAG_ constants to be added to the effect via SetProperty, in addition to EFFECT_FLAG_CLIENT_HINT, added by default. + required: false + defaultValue: 0 +tags: [ rush ] \ No newline at end of file From 93b4e877dbb45f609f395d99ea1e7e65eaa61085 Mon Sep 17 00:00:00 2001 From: Naim Date: Wed, 14 Feb 2024 11:28:03 -0300 Subject: [PATCH 06/20] fix --- api/functions/Card/AddAdditionalAttackOnMonsterAll.yml | 2 +- api/functions/Card/AddCannotBeDestroyedBattle.yml | 2 +- api/functions/Xyz/AddProcedure.yml | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api/functions/Card/AddAdditionalAttackOnMonsterAll.yml b/api/functions/Card/AddAdditionalAttackOnMonsterAll.yml index 30ad6e33..7516b0c4 100644 --- a/api/functions/Card/AddAdditionalAttackOnMonsterAll.yml +++ b/api/functions/Card/AddAdditionalAttackOnMonsterAll.yml @@ -23,7 +23,7 @@ parameters: description: The card that creates the effect (reason card). required: false defaultValue: c - - name: value + - name: value type: [ int ] description: The number of attacks allowed on each monster. required: false diff --git a/api/functions/Card/AddCannotBeDestroyedBattle.yml b/api/functions/Card/AddCannotBeDestroyedBattle.yml index 6376d92c..c5a793bd 100644 --- a/api/functions/Card/AddCannotBeDestroyedBattle.yml +++ b/api/functions/Card/AddCannotBeDestroyedBattle.yml @@ -15,7 +15,7 @@ parameters: description: Reset values to be used with the effect. required: false defaultValue: 0 - - name: value + - name: value type: [ function, int ] description: A function to be used via SetValue, to define when the monster is not destroyed. required: false diff --git a/api/functions/Xyz/AddProcedure.yml b/api/functions/Xyz/AddProcedure.yml index a898fdb6..067c3427 100644 --- a/api/functions/Xyz/AddProcedure.yml +++ b/api/functions/Xyz/AddProcedure.yml @@ -27,7 +27,7 @@ parameters: If the card allows a variable number of materials, ct is used as the minimum. - name: alterf type: [ CardFilter, nil ] - description: Alternative material(s), if allowed by the card (e.g. Number C39: Utopia Ray). + description: Alternative material(s), if allowed by the card (e.g. Number C39 Utopia Ray). required: false defaultValue: nil - name: desc @@ -45,7 +45,7 @@ parameters: - name: op type: [ function ] description: |- - A function to be used when an extra operation must be executed in addition to using Xyz Materials (e.g. Digital Bug Corebage, Number 99: Utopic Dragon) + A function to be used when an extra operation must be executed in addition to using Xyz Materials (e.g. Digital Bug Corebage, Number 99 Utopic Dragon) required: false defaultValue: nil - name: mustbemat @@ -58,6 +58,6 @@ parameters: - name: exchk type: [ function ] description: |- - Additional checks that are performed in the material group (e.g. Number F0: Utopic Future) + Additional checks that are performed in the material group (e.g. Number F0 Utopic Future) required: false defaultValue: nil From cc800832f4f337085f6f2b1b1dc06af940cb02c4 Mon Sep 17 00:00:00 2001 From: Naim Date: Wed, 14 Feb 2024 15:48:25 -0300 Subject: [PATCH 07/20] Card.AddCounter --- api/functions/Card/AddCounter.yml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/api/functions/Card/AddCounter.yml b/api/functions/Card/AddCounter.yml index a1f6b2c2..172ad5db 100644 --- a/api/functions/Card/AddCounter.yml +++ b/api/functions/Card/AddCounter.yml @@ -2,25 +2,27 @@ name: AddCounter namespace: Card description: |- - Adds a number (int count) of the specified counter (int countertype) to a card (Card c). If singly is set to a number, then it will be added by that number each time. When the number of added counter would exceed the limit for that card, it is not added. + Adds any number of counters of the specified type to a card. If the card has a limit on the number of counters it can have and the amount to be added would exceed said limit, no counters are added. +description: Adds an specific counter to a card. status: index: stable parameters: - name: c type: [ Card ] - description: (To be added) + description: The card that will receive the counter - name: countertype type: [ int ] - description: (To be added) + description: The value (or corresponding constant) for the count - name: count type: [ int ] - description: (To be added) - - name: singly - type: [ int ] - description: (To be added) + description: The number of counters to be placed. + - name: check_limits + type: [ bool ] + description: |- + If set to true, checks if the amount of counters that would be placed violates the value remaining in any EFFECT_COUNTER_LIMIT the card has for that type of counter. + If limit would be violated, places only counters up to the maximum. required: false defaultValue: false returns: - type: [ bool ] - description: (To be added) -tags: [ under-construction ] + description: Returns `true` if counters are placed. From 55e8231aef909e8e5ba58fdb14d32e3cb6051512 Mon Sep 17 00:00:00 2001 From: Naim Date: Wed, 14 Feb 2024 15:48:41 -0300 Subject: [PATCH 08/20] 3 Rush functions --- api/functions/Card/AddDirectAttack.yml | 36 +++++++++++++-------- api/functions/Card/AddDoubleTribute.yml | 30 +++++++++-------- api/functions/Card/AddMaximumAtkHandler.yml | 8 +++-- 3 files changed, 44 insertions(+), 30 deletions(-) diff --git a/api/functions/Card/AddDirectAttack.yml b/api/functions/Card/AddDirectAttack.yml index 22d1c2c2..b5edc031 100644 --- a/api/functions/Card/AddDirectAttack.yml +++ b/api/functions/Card/AddDirectAttack.yml @@ -1,24 +1,34 @@ ---!function name: AddDirectAttack namespace: Card -description: |- - Rush related function +description: &desc |- + Adds to a card an effect allows it to attack directly. +summary: *desc status: index: stable parameters: - name: c - type: [ any ] - description: (To be added) + type: [ Card ] + description: The card that will receive the effect. - name: reset - type: [ any ] - description: (To be added) + type: [ int ] + description: Reset values to be used with the effect. + required: false + defaultValue: 0 - name: rc - type: [ any ] - description: (To be added) + type: [ Card ] + description: The card that creates the effect (reason card). + required: false + defaultValue: c - name: condition - type: [ any ] - description: (To be added) + type: [ function ] + description: A condition that must be fulfilled before the card can attack directly. + required: false + defaultValue: aux.TRUE - name: properties - type: [ any ] - description: (To be added) -tags: [ under-construction ] + type: [ int ] + description: |- + EFFECT_FLAG_ constants to be added to the effect via SetProperty, in addition to EFFECT_FLAG_CLIENT_HINT, added by default. + required: false + defaultValue: 0 +tags: [ rush ] diff --git a/api/functions/Card/AddDoubleTribute.yml b/api/functions/Card/AddDoubleTribute.yml index 65ceeba2..a9c6d36e 100644 --- a/api/functions/Card/AddDoubleTribute.yml +++ b/api/functions/Card/AddDoubleTribute.yml @@ -2,26 +2,28 @@ name: AddDoubleTribute namespace: Card description: |- - Rush related function + Adds to a card an effect that allows it to be used as double tribute +summary: Implements a double tribute effect following Rush rulings. status: index: stable parameters: - name: c type: [ any ] - description: (To be added) + description: The card that will receive the effect. - name: id - type: [ any ] - description: (To be added) + type: [ int ] + description: |- + A card ID, from which the strings 0 and 1 are called when the tribute summon would happen, to identify which double tribute effect is being used. - name: otfilter - type: [ any ] - description: (To be added) + type: [ function ] + description: A filter with the monster that is going to be tributed for the Normal Summon and count as 2 tributes. - name: eftg - type: [ any ] - description: (To be added) - - name: reset - type: [ any ] - description: (To be added) + type: [ function ] + description: A filter with what can use the affected card as double tribute. + - name: resets + type: [ 0 ] + description: Reset values to be used with the effect. - name: ... - type: [ any ] - description: (To be added) -tags: [ under-construction ] + type: [ int ] + description: Any number of FLAG_DOUBLE_TRIB constants, that will be registered to the card as a flag effect, with the same reset values from `resets`. +tags: [ rush ] diff --git a/api/functions/Card/AddMaximumAtkHandler.yml b/api/functions/Card/AddMaximumAtkHandler.yml index dd0e6772..49b5f62b 100644 --- a/api/functions/Card/AddMaximumAtkHandler.yml +++ b/api/functions/Card/AddMaximumAtkHandler.yml @@ -2,11 +2,13 @@ name: AddMaximumAtkHandler namespace: Card description: |- - Rush related function + Applies to a Maximum monster, in Maximum mode, an effect that changes its original ATK to be its Maximum ATK. + The Maximum ATK is obtained from the card's metatable. +summary: Implements the Maximum ATK of a Maximum monster. status: index: stable parameters: - name: c type: [ any ] - description: (To be added) -tags: [ under-construction ] + description: The card that will receive the effect. +tags: [ rush ] \ No newline at end of file From cea4d42a10429a379fe63c5f2befdcfd01821907 Mon Sep 17 00:00:00 2001 From: Naim Date: Wed, 14 Feb 2024 15:51:26 -0300 Subject: [PATCH 09/20] Incorrect key --- api/functions/Card/AddCounter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/functions/Card/AddCounter.yml b/api/functions/Card/AddCounter.yml index 172ad5db..f0c8bddf 100644 --- a/api/functions/Card/AddCounter.yml +++ b/api/functions/Card/AddCounter.yml @@ -3,7 +3,7 @@ name: AddCounter namespace: Card description: |- Adds any number of counters of the specified type to a card. If the card has a limit on the number of counters it can have and the amount to be added would exceed said limit, no counters are added. -description: Adds an specific counter to a card. +summary: Adds an specific counter to a card. status: index: stable parameters: From dda641c326f2ebd09f4cd5908c8a0c031eba146a Mon Sep 17 00:00:00 2001 From: Naim Date: Wed, 14 Feb 2024 16:09:35 -0300 Subject: [PATCH 10/20] attempt to satisfy a very sensitive checker --- api/functions/Card/AddCannotBeDestroyedBattle.yml | 4 ++-- api/functions/Card/AddCannotBeDestroyedEffect.yml | 4 ++-- api/functions/Card/AddCenterToSideEffectHandler.yml | 2 +- api/functions/Card/AddCounter.yml | 4 ++-- api/functions/Card/AddDoubleTribute.yml | 5 +++-- 5 files changed, 10 insertions(+), 9 deletions(-) diff --git a/api/functions/Card/AddCannotBeDestroyedBattle.yml b/api/functions/Card/AddCannotBeDestroyedBattle.yml index c5a793bd..bde5a2f6 100644 --- a/api/functions/Card/AddCannotBeDestroyedBattle.yml +++ b/api/functions/Card/AddCannotBeDestroyedBattle.yml @@ -1,9 +1,9 @@ ---!function name: AddCannotBeDestroyedBattle namespace: Card -description: &desc |- +description: |- Adds to a card an effect that prevents it from being destroyed by battle. -summary: *desc +summary: Creates an effect that prevents a card from being destroyed by battle status: index: stable parameters: diff --git a/api/functions/Card/AddCannotBeDestroyedEffect.yml b/api/functions/Card/AddCannotBeDestroyedEffect.yml index db347b4f..909e04ef 100644 --- a/api/functions/Card/AddCannotBeDestroyedEffect.yml +++ b/api/functions/Card/AddCannotBeDestroyedEffect.yml @@ -1,9 +1,9 @@ ---!function name: AddCannotBeDestroyedEffect namespace: Card -description: &desc |- +description: |- Adds to a card an effect that prevents it from being destroyed by effects of the opponent's cards with the provided type. -summary: *desc +summary: Creates an effect that prevents a card from being destroyed by effects. status: index: stable parameters: diff --git a/api/functions/Card/AddCenterToSideEffectHandler.yml b/api/functions/Card/AddCenterToSideEffectHandler.yml index 1bd9ba17..645eb6a2 100644 --- a/api/functions/Card/AddCenterToSideEffectHandler.yml +++ b/api/functions/Card/AddCenterToSideEffectHandler.yml @@ -3,7 +3,7 @@ name: AddCenterToSideEffectHandler namespace: Card description: |- Provides the effects of a Maximum monster center piece to the [L] and [R] pieces. It is mostly used to share the effects that prevent destruction. -summary: Shares the effects of a Maximum monster's center piece to the Left and Right pieces. +summary: Shares the effects of a Maximum monster's center piece to the Left/Right pieces status: index: stable parameters: diff --git a/api/functions/Card/AddCounter.yml b/api/functions/Card/AddCounter.yml index f0c8bddf..f163423d 100644 --- a/api/functions/Card/AddCounter.yml +++ b/api/functions/Card/AddCounter.yml @@ -12,11 +12,11 @@ parameters: description: The card that will receive the counter - name: countertype type: [ int ] - description: The value (or corresponding constant) for the count + description: The value (or corresponding constant) for the type of the counter that will be placed. - name: count type: [ int ] description: The number of counters to be placed. - - name: check_limits + - name: checklimits type: [ bool ] description: |- If set to true, checks if the amount of counters that would be placed violates the value remaining in any EFFECT_COUNTER_LIMIT the card has for that type of counter. diff --git a/api/functions/Card/AddDoubleTribute.yml b/api/functions/Card/AddDoubleTribute.yml index a9c6d36e..161ac5d9 100644 --- a/api/functions/Card/AddDoubleTribute.yml +++ b/api/functions/Card/AddDoubleTribute.yml @@ -16,13 +16,14 @@ parameters: A card ID, from which the strings 0 and 1 are called when the tribute summon would happen, to identify which double tribute effect is being used. - name: otfilter type: [ function ] - description: A filter with the monster that is going to be tributed for the Normal Summon and count as 2 tributes. + description: A filter with the monsters on the field that can be tributed for this alternative summoning method. - name: eftg type: [ function ] description: A filter with what can use the affected card as double tribute. - name: resets - type: [ 0 ] + type: [ int ] description: Reset values to be used with the effect. + defaultValue: 0 - name: ... type: [ int ] description: Any number of FLAG_DOUBLE_TRIB constants, that will be registered to the card as a flag effect, with the same reset values from `resets`. From 03c43fa79ce545c7e70a590fbcc6c8954d632b9e Mon Sep 17 00:00:00 2001 From: Naim Date: Wed, 14 Feb 2024 16:20:18 -0300 Subject: [PATCH 11/20] . --- api/functions/Card/AddAdditionalAttackOnMonsterAll.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/functions/Card/AddAdditionalAttackOnMonsterAll.yml b/api/functions/Card/AddAdditionalAttackOnMonsterAll.yml index 7516b0c4..bcc3d092 100644 --- a/api/functions/Card/AddAdditionalAttackOnMonsterAll.yml +++ b/api/functions/Card/AddAdditionalAttackOnMonsterAll.yml @@ -1,9 +1,9 @@ ---!function name: AddAdditionalAttackOnMonsterAll namespace: Card -description: &desc |- +description:- Adds to a card an effect that allows it to attack all monsters the opponent controls. -summary: *desc +summary: Creates an effect to allow a card to attack all monsters the opponent controls status: index: stable parameters: From 398434fb2f753bf3e5c9e7d11b539b39ad7fb680 Mon Sep 17 00:00:00 2001 From: Naim Date: Wed, 14 Feb 2024 16:21:54 -0300 Subject: [PATCH 12/20] remove extra symbol --- api/functions/Card/AddAdditionalAttackOnMonsterAll.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/api/functions/Card/AddAdditionalAttackOnMonsterAll.yml b/api/functions/Card/AddAdditionalAttackOnMonsterAll.yml index bcc3d092..bc390685 100644 --- a/api/functions/Card/AddAdditionalAttackOnMonsterAll.yml +++ b/api/functions/Card/AddAdditionalAttackOnMonsterAll.yml @@ -1,8 +1,7 @@ ---!function name: AddAdditionalAttackOnMonsterAll namespace: Card -description:- - Adds to a card an effect that allows it to attack all monsters the opponent controls. +description: Adds to a card an effect that allows it to attack all monsters the opponent controls. summary: Creates an effect to allow a card to attack all monsters the opponent controls status: index: stable From 4ffd3f3e6ce436b92f80d97a75e3382bd47a55c6 Mon Sep 17 00:00:00 2001 From: Hatter Date: Sun, 31 Mar 2024 20:24:00 +0800 Subject: [PATCH 13/20] edit rush tag description --- api/tags/rush.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/api/tags/rush.yml b/api/tags/rush.yml index 9c2a2cd9..2ef44602 100644 --- a/api/tags/rush.yml +++ b/api/tags/rush.yml @@ -1,4 +1,5 @@ ---!tag name: rush description: |- - Function or constant related to the implementation of the rules and cards from Rush Duel. Implementations can be found in proc_maximum.lua + Functions and constants related to the implementation of [Rush Duel](https://yugipedia.com/wiki/Yu-Gi-Oh!_Rush_Duel) cards and rules. + Implementations can be found in [proc_maximum.lua](https://github.com/ProjectIgnis/CardScripts/blob/master/proc_maximum.lua) From f681a3c97747d66fd448013bbfb445c3aaea5d84 Mon Sep 17 00:00:00 2001 From: Hatter Date: Sun, 31 Mar 2024 20:30:23 +0800 Subject: [PATCH 14/20] remove unused proc_maximum.lua functions --- api/functions/Card/AddAdditionalAttack.yml | 37 ----------------- .../Card/AddAdditionalAttackOnMonster.yml | 37 ----------------- .../Card/AddAdditionalAttackOnMonsterAll.yml | 41 ------------------- .../Card/AddCannotBeDestroyedBattle.yml | 39 ------------------ .../Card/AddCannotBeDestroyedEffect.yml | 38 ----------------- api/functions/Card/AddDirectAttack.yml | 34 --------------- 6 files changed, 226 deletions(-) delete mode 100644 api/functions/Card/AddAdditionalAttack.yml delete mode 100644 api/functions/Card/AddAdditionalAttackOnMonster.yml delete mode 100644 api/functions/Card/AddAdditionalAttackOnMonsterAll.yml delete mode 100644 api/functions/Card/AddCannotBeDestroyedBattle.yml delete mode 100644 api/functions/Card/AddCannotBeDestroyedEffect.yml delete mode 100644 api/functions/Card/AddDirectAttack.yml diff --git a/api/functions/Card/AddAdditionalAttack.yml b/api/functions/Card/AddAdditionalAttack.yml deleted file mode 100644 index dee37be4..00000000 --- a/api/functions/Card/AddAdditionalAttack.yml +++ /dev/null @@ -1,37 +0,0 @@ ----!function -name: AddAdditionalAttack -namespace: Card -description: &desc |- - Adds to a card an effect that gives it extra attacks. -summary: *desc -status: - index: stable -parameters: - - name: c - type: [ Card ] - description: The card that will receive the effect - - name: atknum - type: [ int ] - description: The number of additional attacks the card gains. - - name: reset - type: [ int ] - description: Reset values to be used with the effect. - required: false - defaultValue: 0 - - name: rc - type: [ Card ] - description: The card that creates the effect (reason card). - required: false - defaultValue: c - - name: condition - type: [ function ] - description: A condition that must be fulfilled before the card can declare an extra attack. - required: false - defaultValue: aux.TRUE - - name: properties - type: [ int ] - description: |- - EFFECT_FLAG_ constants to be added to the effect via SetProperty, in addition to EFFECT_FLAG_CLIENT_HINT, added by default. - required: false - defaultValue: 0 -tags: [ rush ] diff --git a/api/functions/Card/AddAdditionalAttackOnMonster.yml b/api/functions/Card/AddAdditionalAttackOnMonster.yml deleted file mode 100644 index 33cb8475..00000000 --- a/api/functions/Card/AddAdditionalAttackOnMonster.yml +++ /dev/null @@ -1,37 +0,0 @@ ----!function -name: AddAdditionalAttackOnMonster -namespace: Card -description: &desc |- - Adds to a card an effect that allows extra attacks on monsters. -summary: *desc -status: - index: stable -parameters: - - name: c - type: [ Card ] - description: The card that will receive the effect - - name: atknum - type: [ int ] - description: The number of additional attacks on monsters the card gains. - - name: reset - type: [ int ] - description: Reset values to be used with the effect. - required: false - defaultValue: 0 - - name: rc - type: [ Card ] - description: The card that creates the effect (reason card). - required: false - defaultValue: c - - name: condition - type: [ function ] - description: A condition that must be fulfilled before the card can declare an extra attack. - required: false - defaultValue: aux.TRUE - - name: properties - type: [ int ] - description: |- - EFFECT_FLAG_ constants to be added to the effect via SetProperty, in addition to EFFECT_FLAG_CLIENT_HINT, added by default. - required: false - defaultValue: 0 -tags: [ rush ] \ No newline at end of file diff --git a/api/functions/Card/AddAdditionalAttackOnMonsterAll.yml b/api/functions/Card/AddAdditionalAttackOnMonsterAll.yml deleted file mode 100644 index bc390685..00000000 --- a/api/functions/Card/AddAdditionalAttackOnMonsterAll.yml +++ /dev/null @@ -1,41 +0,0 @@ ----!function -name: AddAdditionalAttackOnMonsterAll -namespace: Card -description: Adds to a card an effect that allows it to attack all monsters the opponent controls. -summary: Creates an effect to allow a card to attack all monsters the opponent controls -status: - index: stable -parameters: - - name: c - type: [ Card ] - description: The card that will receive the effect. - - name: atknum - type: [ int ] - description: The number of additional attacks on monsters the card gains. - - name: reset - type: [ int ] - description: Reset values to be used with the effect. - required: false - defaultValue: 0 - - name: rc - type: [ Card ] - description: The card that creates the effect (reason card). - required: false - defaultValue: c - - name: value - type: [ int ] - description: The number of attacks allowed on each monster. - required: false - defaultValue: 1 - - name: condition - type: [ function ] - description: A condition that must be fulfilled before the card can declare an extra attack. - required: false - defaultValue: aux.TRUE - - name: properties - type: [ int ] - description: |- - EFFECT_FLAG_ constants to be added to the effect via SetProperty, in addition to EFFECT_FLAG_CLIENT_HINT, added by default. - required: false - defaultValue: 0 -tags: [ rush ] \ No newline at end of file diff --git a/api/functions/Card/AddCannotBeDestroyedBattle.yml b/api/functions/Card/AddCannotBeDestroyedBattle.yml deleted file mode 100644 index bde5a2f6..00000000 --- a/api/functions/Card/AddCannotBeDestroyedBattle.yml +++ /dev/null @@ -1,39 +0,0 @@ ----!function -name: AddCannotBeDestroyedBattle -namespace: Card -description: |- - Adds to a card an effect that prevents it from being destroyed by battle. -summary: Creates an effect that prevents a card from being destroyed by battle -status: - index: stable -parameters: - - name: c - type: [ Card ] - description: The card that will receive the effect. - - name: reset - type: [ int ] - description: Reset values to be used with the effect. - required: false - defaultValue: 0 - - name: value - type: [ function, int ] - description: A function to be used via SetValue, to define when the monster is not destroyed. - required: false - defaultValue: 1 - - name: rc - type: [ Card ] - description: The card that creates the effect (reason card). - required: false - defaultValue: c - - name: condition - type: [ function ] - description: A condition that must be fulfilled for the effect to be applied. - required: false - defaultValue: aux.TRUE - - name: properties - type: [ int ] - description: |- - EFFECT_FLAG_ constants to be added to the effect via SetProperty, in addition to EFFECT_FLAG_CLIENT_HINT, added by default. - required: false - defaultValue: 0 -tags: [ rush ] \ No newline at end of file diff --git a/api/functions/Card/AddCannotBeDestroyedEffect.yml b/api/functions/Card/AddCannotBeDestroyedEffect.yml deleted file mode 100644 index 909e04ef..00000000 --- a/api/functions/Card/AddCannotBeDestroyedEffect.yml +++ /dev/null @@ -1,38 +0,0 @@ ----!function -name: AddCannotBeDestroyedEffect -namespace: Card -description: |- - Adds to a card an effect that prevents it from being destroyed by effects of the opponent's cards with the provided type. -summary: Creates an effect that prevents a card from being destroyed by effects. -status: - index: stable -parameters: - - name: c - type: [ Card ] - description: The card that will receive the effect. - - name: ctype - type: [ int ] - description: |- - The major card type that the affected card cannot be destroyed by. - - name: reset - type: [ int ] - description: Reset values to be used with the effect. - required: false - defaultValue: 0 - - name: rc - type: [ Card ] - description: The card that creates the effect (reason card). - required: false - defaultValue: c - - name: condition - type: [ function ] - description: A condition that must be fulfilled for the effect to be applied. - required: false - defaultValue: aux.TRUE - - name: properties - type: [ int ] - description: |- - EFFECT_FLAG_ constants to be added to the effect via SetProperty, in addition to EFFECT_FLAG_CLIENT_HINT, added by default. - required: false - defaultValue: 0 -tags: [ rush ] \ No newline at end of file diff --git a/api/functions/Card/AddDirectAttack.yml b/api/functions/Card/AddDirectAttack.yml deleted file mode 100644 index b5edc031..00000000 --- a/api/functions/Card/AddDirectAttack.yml +++ /dev/null @@ -1,34 +0,0 @@ ----!function -name: AddDirectAttack -namespace: Card -description: &desc |- - Adds to a card an effect allows it to attack directly. -summary: *desc -status: - index: stable -parameters: - - name: c - type: [ Card ] - description: The card that will receive the effect. - - name: reset - type: [ int ] - description: Reset values to be used with the effect. - required: false - defaultValue: 0 - - name: rc - type: [ Card ] - description: The card that creates the effect (reason card). - required: false - defaultValue: c - - name: condition - type: [ function ] - description: A condition that must be fulfilled before the card can attack directly. - required: false - defaultValue: aux.TRUE - - name: properties - type: [ int ] - description: |- - EFFECT_FLAG_ constants to be added to the effect via SetProperty, in addition to EFFECT_FLAG_CLIENT_HINT, added by default. - required: false - defaultValue: 0 -tags: [ rush ] From ade92b81e2c53f551d5716a808dce2ec3042ee14 Mon Sep 17 00:00:00 2001 From: Hatter Date: Mon, 1 Apr 2024 14:45:24 +0800 Subject: [PATCH 15/20] additional edits --- .../Card/AddCenterToSideEffectHandler.yml | 8 ++--- api/functions/Card/AddCounter.yml | 13 ++++---- api/functions/Card/AddDoubleTribute.yml | 24 +++++++------- api/functions/Card/AddMaximumAtkHandler.yml | 10 +++--- api/functions/Xyz/AddProcedure.yml | 32 +++++++++---------- 5 files changed, 45 insertions(+), 42 deletions(-) diff --git a/api/functions/Card/AddCenterToSideEffectHandler.yml b/api/functions/Card/AddCenterToSideEffectHandler.yml index 645eb6a2..f81c93fd 100644 --- a/api/functions/Card/AddCenterToSideEffectHandler.yml +++ b/api/functions/Card/AddCenterToSideEffectHandler.yml @@ -2,15 +2,15 @@ name: AddCenterToSideEffectHandler namespace: Card description: |- - Provides the effects of a Maximum monster center piece to the [L] and [R] pieces. It is mostly used to share the effects that prevent destruction. -summary: Shares the effects of a Maximum monster's center piece to the Left/Right pieces + Grants an Effect to a center Maximum Monster's [L] and [R] pieces. Primarily used to share protection effects. +summary: Grants an Effect to a Maximum Monster's [L] and [R] pieces. status: index: stable parameters: - name: c type: [ Card ] - description: The main (center) Maximum monster card + description: The main (center) Maximum Monster Card. - name: eff type: [ Effect ] - description: The effect that is shared with the Left and Right monsters. + description: The Effect to be granted to the Left and Right monsters. tags: [ rush ] diff --git a/api/functions/Card/AddCounter.yml b/api/functions/Card/AddCounter.yml index f163423d..0ee488ea 100644 --- a/api/functions/Card/AddCounter.yml +++ b/api/functions/Card/AddCounter.yml @@ -2,14 +2,14 @@ name: AddCounter namespace: Card description: |- - Adds any number of counters of the specified type to a card. If the card has a limit on the number of counters it can have and the amount to be added would exceed said limit, no counters are added. -summary: Adds an specific counter to a card. + Adds any number of counters of the specified type to a Card. +summary: Adds a specific counter to a Card. status: index: stable parameters: - name: c type: [ Card ] - description: The card that will receive the counter + description: The Card that will receive the counter - name: countertype type: [ int ] description: The value (or corresponding constant) for the type of the counter that will be placed. @@ -19,10 +19,11 @@ parameters: - name: checklimits type: [ bool ] description: |- - If set to true, checks if the amount of counters that would be placed violates the value remaining in any EFFECT_COUNTER_LIMIT the card has for that type of counter. - If limit would be violated, places only counters up to the maximum. + If set to `true`, only places counters up to the maximum value + set by an `EFFECT_COUNTER_LIMIT` Effect on the card for that counter. + If `false`, does not place any counter if the limit would be exceeded. required: false defaultValue: false returns: - type: [ bool ] - description: Returns `true` if counters are placed. + description: Returns `true` if counters were successfully placed. diff --git a/api/functions/Card/AddDoubleTribute.yml b/api/functions/Card/AddDoubleTribute.yml index 161ac5d9..b9f88b78 100644 --- a/api/functions/Card/AddDoubleTribute.yml +++ b/api/functions/Card/AddDoubleTribute.yml @@ -2,29 +2,31 @@ name: AddDoubleTribute namespace: Card description: |- - Adds to a card an effect that allows it to be used as double tribute -summary: Implements a double tribute effect following Rush rulings. + Adds an Effect to a Card that allows it to be used as a double tribute in Rush Duels. +summary: Allows a Card to be used as a double tribute in Rush Duels. status: index: stable parameters: - name: c - type: [ any ] - description: The card that will receive the effect. + type: [ Card ] + description: The Card that will receive the Effect. - name: id type: [ int ] description: |- - A card ID, from which the strings 0 and 1 are called when the tribute summon would happen, to identify which double tribute effect is being used. + A Card ID, from which the strings 0 and 1 are called when the tribute summon would happen, to identify which double tribute Effect is being used. - name: otfilter - type: [ function ] - description: A filter with the monsters on the field that can be tributed for this alternative summoning method. + type: [ CardFilter ] + # TODO: better description + description: Filters which monsters on the field can be tributed for this alternative summoning method. - name: eftg - type: [ function ] - description: A filter with what can use the affected card as double tribute. + # TODO: settle how to refer to overloads + type: [ EffectTarget ] + description: Filters which monsters can use the affected Card as double tribute. - name: resets type: [ int ] - description: Reset values to be used with the effect. + description: Reset values to be used with the Effect. defaultValue: 0 - name: ... type: [ int ] - description: Any number of FLAG_DOUBLE_TRIB constants, that will be registered to the card as a flag effect, with the same reset values from `resets`. + description: Any number of FLAG_DOUBLE_TRIB constants, that will be registered to the Card as a flag Effect, with the same reset values from `resets`. tags: [ rush ] diff --git a/api/functions/Card/AddMaximumAtkHandler.yml b/api/functions/Card/AddMaximumAtkHandler.yml index 49b5f62b..fd3363b6 100644 --- a/api/functions/Card/AddMaximumAtkHandler.yml +++ b/api/functions/Card/AddMaximumAtkHandler.yml @@ -2,13 +2,13 @@ name: AddMaximumAtkHandler namespace: Card description: |- - Applies to a Maximum monster, in Maximum mode, an effect that changes its original ATK to be its Maximum ATK. - The Maximum ATK is obtained from the card's metatable. + Adds an Effect to a Card that changes its original ATK to be its Maximum ATK when in Maximum Mode. + The Maximum ATK is obtained from the Card's metatable. summary: Implements the Maximum ATK of a Maximum monster. status: index: stable parameters: - name: c - type: [ any ] - description: The card that will receive the effect. -tags: [ rush ] \ No newline at end of file + type: [ Card ] + description: The Card that will receive the Effect. +tags: [ rush ] diff --git a/api/functions/Xyz/AddProcedure.yml b/api/functions/Xyz/AddProcedure.yml index 067c3427..2cb534c1 100644 --- a/api/functions/Xyz/AddProcedure.yml +++ b/api/functions/Xyz/AddProcedure.yml @@ -2,39 +2,39 @@ name: AddProcedure namespace: Xyz description: |- - Creates and registers to a card an effect that allows it to be Xyz Summoned. -summary: Adds an Xyz Summon procedure to a card + Registers an Effect to a Card an that allows it to be Xyz Summoned. +summary: Adds an Xyz Summon procedure to a Card status: index: stable parameters: - name: c type: [ Card ] - description: The card that will receive the procedure. + description: The Card that will receive the procedure. - name: f type: [ CardFilter, nil ] description: |- - A filter function for the cards that can be used as Xyz materials. - If no property other than level is required, `nil` is also valid. + A filter function for the Cards that can be used as Xyz materials. + Set to `nil` if no property other than level is required, `nil` is also valid. - name: lv type: [ int, nil ] description: |- - The level the materials must have. - If no specific level is required, `nil` is also valid. + The level the materials must have. + If no specific level is required, `nil` is also valid. - name: ct type: [ int ] description: |- - The number of required materials. - If the card allows a variable number of materials, ct is used as the minimum. + The number of required materials. + If the Card allows a variable number of materials, ct is used as the minimum. - name: alterf type: [ CardFilter, nil ] - description: Alternative material(s), if allowed by the card (e.g. Number C39 Utopia Ray). + description: Alternative material(s), if allowed by the Card (e.g. Number C39 Utopia Ray). required: false defaultValue: nil - name: desc type: [ string ] description: |- - An integer pointing to a string for the description shown when attempting to Xyz Summon using the alternative materials. - Mandatory when `alterf` is used. + An integer pointing to a string for the description shown when attempting to Xyz Summon using the alternative materials. + Mandatory when `alterf` is used. required: false defaultValue: 0 - name: maxct @@ -45,19 +45,19 @@ parameters: - name: op type: [ function ] description: |- - A function to be used when an extra operation must be executed in addition to using Xyz Materials (e.g. Digital Bug Corebage, Number 99 Utopic Dragon) + A function to be used when an extra operation must be executed in addition to using Xyz Materials (e.g. Digital Bug Corebage, Number 99 Utopic Dragon) required: false defaultValue: nil - name: mustbemat type: [ bool ] description: |- - A parameter that restricts the materials to specifically listed materials. - This disables the effects of cards such as Orichalcum Chain (minus 1 material) or Triangle Evolution (triple material). + A parameter that restricts the materials to specifically listed materials. + This disables the Effects of Cards such as Orichalcum Chain (minus 1 material) or Triangle Evolution (triple material). required: false defaultValue: false - name: exchk type: [ function ] description: |- - Additional checks that are performed in the material group (e.g. Number F0 Utopic Future) + Additional checks that are performed in the material group (e.g. Number F0 Utopic Future) required: false defaultValue: nil From 9eeb093a625e86df7c04821d86d10b89e7852383 Mon Sep 17 00:00:00 2001 From: Hatter Date: Sun, 27 Oct 2024 06:41:13 +0800 Subject: [PATCH 16/20] Xyz.AddProcedure updates --- api/functions/Xyz/AddProcedure.yml | 45 +++++++++++------------------- api/types/XyzExtraCheck.yml | 20 +++++++++++++ api/types/XyzExtraOperation.yml | 24 ++++++++++++++++ 3 files changed, 61 insertions(+), 28 deletions(-) create mode 100644 api/types/XyzExtraCheck.yml create mode 100644 api/types/XyzExtraOperation.yml diff --git a/api/functions/Xyz/AddProcedure.yml b/api/functions/Xyz/AddProcedure.yml index 2cb534c1..519152fc 100644 --- a/api/functions/Xyz/AddProcedure.yml +++ b/api/functions/Xyz/AddProcedure.yml @@ -1,40 +1,32 @@ ---!function name: AddProcedure namespace: Xyz -description: |- - Registers an Effect to a Card an that allows it to be Xyz Summoned. -summary: Adds an Xyz Summon procedure to a Card +description: Registers an effect to a card that allows it to be Xyz Summoned. +summary: Adds an Xyz Summon procedure to a card. status: index: stable parameters: - name: c type: [ Card ] - description: The Card that will receive the procedure. + description: The card that will receive the procedure. - name: f type: [ CardFilter, nil ] - description: |- - A filter function for the Cards that can be used as Xyz materials. - Set to `nil` if no property other than level is required, `nil` is also valid. + description: A filter for the cards that can be used as Xyz materials, in addition to the default matching level requirement. - name: lv type: [ int, nil ] - description: |- - The level the materials must have. - If no specific level is required, `nil` is also valid. + description: The level the materials must have. Set to `nil` if no specific level is required. - name: ct type: [ int ] - description: |- - The number of required materials. - If the Card allows a variable number of materials, ct is used as the minimum. + description: The number of required materials. If the card allows a variable number of materials, this parameter is used as the minimum. - name: alterf - type: [ CardFilter, nil ] - description: Alternative material(s), if allowed by the Card (e.g. Number C39 Utopia Ray). + type: [ CardFilter ] + description: |- + A filter for alternative material(s), if allowed by the card (e.g. [Number C39: Utopia Ray](https://yugipedia.com/wiki/9914)). required: false defaultValue: nil - name: desc - type: [ string ] - description: |- - An integer pointing to a string for the description shown when attempting to Xyz Summon using the alternative materials. - Mandatory when `alterf` is used. + type: [ int ] + description: The hint description shown when attempting to Xyz Summon using the alternative materials. Mandatory if `alterf` is not `nil`. required: false defaultValue: 0 - name: maxct @@ -43,21 +35,18 @@ parameters: required: false defaultValue: ct - name: op - type: [ function ] - description: |- - A function to be used when an extra operation must be executed in addition to using Xyz Materials (e.g. Digital Bug Corebage, Number 99 Utopic Dragon) + type: [ XyzExtraOperation ] + description: An additional function to execute when Xyz Summoning. required: false defaultValue: nil - name: mustbemat type: [ bool ] - description: |- - A parameter that restricts the materials to specifically listed materials. - This disables the Effects of Cards such as Orichalcum Chain (minus 1 material) or Triangle Evolution (triple material). + description: If `true`, restricts the materials to specifically listed materials. This disables the effects of cards such as [Orichalcum Chain](https://yugipedia.com/wiki/Orichalcum%20Chain) (minus 1 material) and [Triangle Evolution](https://yugipedia.com/wiki/Triangle_Evolution) (triple material). required: false defaultValue: false - name: exchk - type: [ function ] - description: |- - Additional checks that are performed in the material group (e.g. Number F0 Utopic Future) + type: [ XyzExtraCheck ] + description: An additional check to perform on material groups. required: false defaultValue: nil +tags: [ xyz-related ] diff --git a/api/types/XyzExtraCheck.yml b/api/types/XyzExtraCheck.yml new file mode 100644 index 00000000..bb9d2f70 --- /dev/null +++ b/api/types/XyzExtraCheck.yml @@ -0,0 +1,20 @@ +---!type +name: XyzExtraCheck +supertype: function +description: |- + An additional check to perform on groups of materials to be used for an Xyz Summon (e.g. [Number F0: Utopic Future](https://yugipedia.com/wiki/11413)). +summary: Additional check to perform on groups of Xyz materials +parameters: + - name: g + type: [ Group ] + description: The group of materials to be checked. + - name: tp + type: [ int ] + description: The player performing the Xyz Summon. + - name: xyz + type: [ Card ] + description: The Xyz Monster to summon. +returns: + - type: [ bool ] + description: If `g` fulfills the check. +tags: [ xyz-related ] diff --git a/api/types/XyzExtraOperation.yml b/api/types/XyzExtraOperation.yml new file mode 100644 index 00000000..3f1252f7 --- /dev/null +++ b/api/types/XyzExtraOperation.yml @@ -0,0 +1,24 @@ +---!type +name: XyzExtraOperation +supertype: function +description: |- + An additional function to be executed when performing an Xyz Summon, *before* using the Xyz Materials (e.g. [Digital Bug Corebage](https://yugipedia.com/wiki/12327), [Number 99: Utopic Dragon](https://yugipedia.com/wiki/11305)) +summary: Additional function to execute when Xyz Summoning. +parameters: + - name: e + type: [ Effect ] + description: The Xyz Summon procedure effect. + - name: tp + type: [ int ] + description: The player performing the Xyz Summon. + - name: chk + type: [ int ] + description: Must be `0` when checking if the operation can be performed, and `1` when executing the operation. + - name: mc + type: [ Card ] + description: The card being used as material. +returns: + - type: [ bool ] + description: If `chk` is 0, returns `true` if the operation can be performed. + guaranteed: false +tags: [ xyz-related ] From ad730c2359d3ace295ecda07d2ab310cf0d1bc85 Mon Sep 17 00:00:00 2001 From: Hatter Date: Sun, 27 Oct 2024 06:44:48 +0800 Subject: [PATCH 17/20] update AddCounter --- api/functions/Card/AddCounter.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/api/functions/Card/AddCounter.yml b/api/functions/Card/AddCounter.yml index 0ee488ea..d9af568f 100644 --- a/api/functions/Card/AddCounter.yml +++ b/api/functions/Card/AddCounter.yml @@ -1,29 +1,26 @@ ---!function name: AddCounter namespace: Card -description: |- - Adds any number of counters of the specified type to a Card. -summary: Adds a specific counter to a Card. +description: Places any number of counters of the specified type to a card. +summary: Places counters to a card. status: index: stable parameters: - name: c type: [ Card ] - description: The Card that will receive the counter + description: The card to place counters on. - name: countertype type: [ int ] - description: The value (or corresponding constant) for the type of the counter that will be placed. + description: The value for the type of counter to be placed. - name: count type: [ int ] description: The number of counters to be placed. - name: checklimits type: [ bool ] - description: |- - If set to `true`, only places counters up to the maximum value - set by an `EFFECT_COUNTER_LIMIT` Effect on the card for that counter. - If `false`, does not place any counter if the limit would be exceeded. + description: If set to `true`, only places counters up to the maximum value set by an `EFFECT_COUNTER_LIMIT` effect on the card for that counter. If `false`, does not place any counter if the limit would be exceeded. required: false defaultValue: false returns: - type: [ bool ] description: Returns `true` if counters were successfully placed. +tags: [ counter-related ] From 3750f3a35d0c8e7aa9735a2f057034887c1e18a8 Mon Sep 17 00:00:00 2001 From: Hatter Date: Sun, 27 Oct 2024 08:10:33 +0800 Subject: [PATCH 18/20] DoubleTributeFlag stub entry --- api/enums/DoubleTributeFlag.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 api/enums/DoubleTributeFlag.yml diff --git a/api/enums/DoubleTributeFlag.yml b/api/enums/DoubleTributeFlag.yml new file mode 100644 index 00000000..03e7a868 --- /dev/null +++ b/api/enums/DoubleTributeFlag.yml @@ -0,0 +1,4 @@ +---!enum +name: DoubleTributeFlag +description: (To be added) +tags: [ under-construction ] From b414e65d2d05798d67dd24e31326a234ef993fe5 Mon Sep 17 00:00:00 2001 From: Hatter Date: Sun, 27 Oct 2024 08:11:00 +0800 Subject: [PATCH 19/20] update Maximum functions --- api/functions/Card/AddCenterToSideEffectHandler.yml | 9 ++++----- api/functions/Card/AddMaximumAtkHandler.yml | 8 +++----- api/functions/Xyz/AddProcedure.yml | 2 +- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/api/functions/Card/AddCenterToSideEffectHandler.yml b/api/functions/Card/AddCenterToSideEffectHandler.yml index f81c93fd..66f7da7f 100644 --- a/api/functions/Card/AddCenterToSideEffectHandler.yml +++ b/api/functions/Card/AddCenterToSideEffectHandler.yml @@ -1,9 +1,8 @@ ---!function name: AddCenterToSideEffectHandler namespace: Card -description: |- - Grants an Effect to a center Maximum Monster's [L] and [R] pieces. Primarily used to share protection effects. -summary: Grants an Effect to a Maximum Monster's [L] and [R] pieces. +description: Grants an effect to a center Maximum Monster's [L] and [R] pieces. Primarily used to share protection effects. +summary: Grants an effect to a Maximum Monster's [L] and [R] pieces. status: index: stable parameters: @@ -12,5 +11,5 @@ parameters: description: The main (center) Maximum Monster Card. - name: eff type: [ Effect ] - description: The Effect to be granted to the Left and Right monsters. -tags: [ rush ] + description: The effect to be granted to the [L] and [R] monsters. +tags: [ rush, registers-effect ] diff --git a/api/functions/Card/AddMaximumAtkHandler.yml b/api/functions/Card/AddMaximumAtkHandler.yml index fd3363b6..0881f5f5 100644 --- a/api/functions/Card/AddMaximumAtkHandler.yml +++ b/api/functions/Card/AddMaximumAtkHandler.yml @@ -1,14 +1,12 @@ ---!function name: AddMaximumAtkHandler namespace: Card -description: |- - Adds an Effect to a Card that changes its original ATK to be its Maximum ATK when in Maximum Mode. - The Maximum ATK is obtained from the Card's metatable. +description: Adds an Effect to a Card that changes its original ATK to its Maximum ATK when in Maximum Mode. The Maximum ATK is obtained from the card's metatable. summary: Implements the Maximum ATK of a Maximum monster. status: index: stable parameters: - name: c type: [ Card ] - description: The Card that will receive the Effect. -tags: [ rush ] + description: The card that will receive the effect. +tags: [ rush, registers-effect ] diff --git a/api/functions/Xyz/AddProcedure.yml b/api/functions/Xyz/AddProcedure.yml index 519152fc..b692c32c 100644 --- a/api/functions/Xyz/AddProcedure.yml +++ b/api/functions/Xyz/AddProcedure.yml @@ -49,4 +49,4 @@ parameters: description: An additional check to perform on material groups. required: false defaultValue: nil -tags: [ xyz-related ] +tags: [ xyz-related, registers-effect ] From c5f4ba12fde8afdfe3e30c5a11b99697b2905008 Mon Sep 17 00:00:00 2001 From: Hatter Date: Sun, 27 Oct 2024 08:11:21 +0800 Subject: [PATCH 20/20] update AddDoubleTribute (tentative) --- api/functions/Card/AddDoubleTribute.yml | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/api/functions/Card/AddDoubleTribute.yml b/api/functions/Card/AddDoubleTribute.yml index b9f88b78..c2f641c1 100644 --- a/api/functions/Card/AddDoubleTribute.yml +++ b/api/functions/Card/AddDoubleTribute.yml @@ -1,32 +1,29 @@ ---!function name: AddDoubleTribute namespace: Card -description: |- - Adds an Effect to a Card that allows it to be used as a double tribute in Rush Duels. -summary: Allows a Card to be used as a double tribute in Rush Duels. +description: Adds an effect to a card that allows using cards as double (or triple) tributes in Rush Duels. +summary: Allows using cards as double (or triple) tributes in Rush Duels. status: index: stable parameters: - name: c type: [ Card ] - description: The Card that will receive the Effect. + description: The card that will receive the effect. - name: id type: [ int ] - description: |- - A Card ID, from which the strings 0 and 1 are called when the tribute summon would happen, to identify which double tribute Effect is being used. + description: A card passcode/ID, from which the strings `0` and `1` are read when the tribute summon would happen, to identify which double (or triple) tribute effect is being used. - name: otfilter type: [ CardFilter ] - # TODO: better description - description: Filters which monsters on the field can be tributed for this alternative summoning method. + description: Filters which monsters on the field can be tributed. - name: eftg - # TODO: settle how to refer to overloads - type: [ EffectTarget ] - description: Filters which monsters can use the affected Card as double tribute. + type: [ TargetFilterFunction ] + description: Filters which monsters can use the affected cards as double (or triple) tributes for their summon. - name: resets type: [ int ] - description: Reset values to be used with the Effect. + description: Composite [Reset](/api/enums/Reset) values to specify when the effect stops applying. defaultValue: 0 - name: ... type: [ int ] - description: Any number of FLAG_DOUBLE_TRIB constants, that will be registered to the Card as a flag Effect, with the same reset values from `resets`. + # TODO: clarify what the flag effects actually achieve + description: Any number of [DoubleTributeFlag](/api/enums/DoubleTributeFlag) constants, that will be registered to the card as a flag effects, with the same reset values as `resets`. tags: [ rush ]