diff --git a/api/constants/Event/EVENT_BREAK_EFFECT.yml b/api/constants/Event/EVENT_BREAK_EFFECT.yml new file mode 100644 index 00000000..b5718e49 --- /dev/null +++ b/api/constants/Event/EVENT_BREAK_EFFECT.yml @@ -0,0 +1,9 @@ +---!constant +name: EVENT_BREAK_EFFECT +enum: Event +value: 1050 +description: >- + This event is raised when the [`Duel.BreakEffect`](/api/functions/Duel/BreakEffect) function is executed. +summary: An event raised when Duel.BreakEffect is executed. +status: + index: stable diff --git a/api/constants/Reset/RESETS_STANDARD_DISABLE_PHASE_END.yml b/api/constants/Reset/RESETS_STANDARD_DISABLE_PHASE_END.yml new file mode 100644 index 00000000..ed047db5 --- /dev/null +++ b/api/constants/Reset/RESETS_STANDARD_DISABLE_PHASE_END.yml @@ -0,0 +1,10 @@ +---!constant +name: RESETS_STANDARD_DISABLE_PHASE_END +enum: Reset +value: 0x41ff1200 +description: >- + Composite reset value. The sum of [`RESETS_STANDARD_PHASE_END`](/api/constants/Reset/RESETS_STANDARD_PHASE_END) and [`RESET_DISABLE`](/api/constants/Reset/RESET_DISABLE). +summary: The sum of RESETS_STANDARD_PHASE_END and RESET_DISABLE. +status: + index: stable +tags: [ composite-bits ] diff --git a/api/constants/Reset/RESETS_STANDARD_PHASE_END.yml b/api/constants/Reset/RESETS_STANDARD_PHASE_END.yml new file mode 100644 index 00000000..1ed9f0a0 --- /dev/null +++ b/api/constants/Reset/RESETS_STANDARD_PHASE_END.yml @@ -0,0 +1,10 @@ +---!constant +name: RESETS_STANDARD_PHASE_END +enum: Reset +value: 0x41fe1200 +description: >- + Composite reset value. The sum of [`RESET_EVENT`](/api/constants/Reset/RESET_EVENT), [`RESETS_STANDARD`](/api/constants/Reset/RESETS_STANDARD), [`RESET_PHASE`](api/constants/Reset/RESET_PHASE), and [`PHASE_END`](/api/constants/Reset/PHASE_END). +summary: The sum of RESET_EVENT, RESETS_STANDARD, RESET_PHASE, and RESET_DISABLE. +status: + index: stable +tags: [ under-construction ] diff --git a/api/functions/Auxiliary/RegisterClientHint.yml b/api/functions/Auxiliary/RegisterClientHint.yml index 5b721de3..53369489 100644 --- a/api/functions/Auxiliary/RegisterClientHint.yml +++ b/api/functions/Auxiliary/RegisterClientHint.yml @@ -2,32 +2,37 @@ name: RegisterClientHint namespace: aux description: >- - Auxiliary function to simplify registering EFFECT_FLAG_CLIENT_HINT to players. (Card c) is card that creates the HintMessage, (int property_code) are additional properties like EFFECT_FLAG_OATH (PLAYER_TARGET and CLIENT_HINT are the flags registered by default). (int reg. player) is the player that is registering the hint, to himself (int s) and/or the opponent (int o), with a description called from a string defined in (str). Additional resets, other than the default RESET_PHASE+PHASE_END, can be passed in (int reset_code) and its reset count (int ct). + Registers an effect that applies a hint on a player(s) which is visible when you hover over a player's info box at the top of the client. Typically used for effects that are scripted to affect monsters but will also apply to any appropriate monster that is placed in the relevant location at a later point (e.g. "Exosister Gibrine"). +summary: Registers an effect that displays a hint on players' info box. status: index: stable parameters: - name: c type: [ Card ] - description: (To be added) + description: The card that is registering the effect that applies the hint. - name: property_code + type: [ int, nil ] + description: Composite [EffectProperty](/api/enums/EffectProperty) to set to the effect in addition to `EFFECT_FLAG_PLAYER_TARGET|EFFECT_FLAG_CLIENT_HINT`. + - name: reg_player type: [ int ] - description: (To be added) - - name: reg.player - type: [ int ] - description: (To be added) + description: The player registering the effect. - name: s type: [ int ] - description: (To be added) + description: The first player to apply the effect to. Set it to `1` to apply the effect to the registering player, set it to `0` otherwise. - name: o type: [ int ] - description: (To be added) + description: The second player to apply the effect to. Set it to `1` to apply the effect to the opponent of the registering player, set it to `0` otherwise. - name: str - type: [ any ] - description: (To be added) + type: [ int ] + description: The id of the string to display on the hint. - name: reset_code type: [ int ] - description: (To be added) + description: Additional resets to set to the effect. + required: false + defaultValue: RESET_PHASE|PHASE_END - name: ct type: [ int ] - description: (To be added) -tags: [ under-construction ] + description: Different reset count to set to the effect. + required: false + defaultValue: 1 +tags: [ registers-effect ] diff --git a/api/functions/Auxiliary/SelfRevealCost.yml b/api/functions/Auxiliary/SelfRevealCost.yml new file mode 100644 index 00000000..574edffb --- /dev/null +++ b/api/functions/Auxiliary/SelfRevealCost.yml @@ -0,0 +1,39 @@ +---!function +name: SelfRevealCost +namespace: aux +description: A baseline [cost function](/api/types/EffectCost) used for effects that reveal the activating card itself as cost, such as `You can reveal this card in your hand; ...` (e.g. "Sakitama"). +summary: Cost function for effects that reveal the card itself as cost. +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/Auxiliary/StatChangeDamageStepCondition.yml b/api/functions/Auxiliary/StatChangeDamageStepCondition.yml new file mode 100644 index 00000000..8d872c32 --- /dev/null +++ b/api/functions/Auxiliary/StatChangeDamageStepCondition.yml @@ -0,0 +1,36 @@ +---!function +name: StatChangeDamageStepCondition +namespace: aux +description: A baseline [condition function](/api/types/EffectCondition) used for [fast effects](https://yugipedia.com/wiki/Fast_effect) that can be activated during the Damage Step because they change a monster's ATK/DEF, but only up until before damage calculation (e.g. "Rush Recklessly"). +summary: Condition function for fast effects that change a monster's ATK/DEF. +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. +returns: + - type: [ bool ] + description: >- + `true` if it is currently not both the Damage Step and damage calculation has already occurred, `false` otherwise. +status: + index: stable diff --git a/api/functions/Card/GetMainCardType.yml b/api/functions/Card/GetMainCardType.yml new file mode 100644 index 00000000..c8bbc755 --- /dev/null +++ b/api/functions/Card/GetMainCardType.yml @@ -0,0 +1,14 @@ +---!function +name: GetMainCardType +namespace: Card +description: >- + Returns the current main type of a card ([`TYPE_MONSTER`](api/constants/CardType/TYPE_MONSTER), [`TYPE_SPELL`]/api/constants/CardType/TYPE_SPELL), or [`TYPE_TRAP`](/api/constants/CardType/TYPE_TRAP)). +status: + index: stable +parameters: + - name: c + type: [ Card ] + description: The card to get the main current type of. +returns: + - type: [ int ] + description: The main current type of the card. diff --git a/api/functions/Card/IsReasonCard.yml b/api/functions/Card/IsReasonCard.yml index 89fb88be..83e358df 100644 --- a/api/functions/Card/IsReasonCard.yml +++ b/api/functions/Card/IsReasonCard.yml @@ -3,14 +3,14 @@ name: IsReasonCard namespace: Card description: >- Returns `true` if a given card caused the [Event](/api/enums/Event) that happened to another card. -summary: Checks if a card caused the event that happened to another card +summary: Checks if a card caused the event that happened to another card. parameters: + - name: rc + type: [ Card ] + description: The card being checked to determine if it caused the event. - name: c type: [ Card ] description: The card to check the reason of. - - name: rc - type: [ int ] - description: The card being checked to determine if it caused the event. returns: - type: [ bool ] description: If `rc` caused the event that happened to `c`. diff --git a/api/functions/Duel/HintSelection.yml b/api/functions/Duel/HintSelection.yml index 5e2834d2..7a87a82f 100644 --- a/api/functions/Duel/HintSelection.yml +++ b/api/functions/Duel/HintSelection.yml @@ -2,16 +2,15 @@ name: HintSelection namespace: Duel description: >- - If log_as_selection is true, that selection will be logged by the client as "card(s) selected" rather than "card(s) targeted" + Highlights a card(s) similar to targeting, that is typically on the field, in the GY, or that is banished. Also logs it in the in-client `Log` tab. Used for effects that select a card(s) without targeting it to indicate which card(s) was selected (e.g. "Fiendsmith Engraver", "Vision HERO Poisoner"). status: index: stable parameters: - - name: selection + - name: card_or_group type: [ Card, Group ] - description: (To be added) + description: The card(s) to highlight. - name: log_as_selection type: [ bool ] - description: (To be added) + description: If set to `false` the log in the client will say "targeted" (string 1610) instead of "selected" (string 1680). required: false - defaultValue: false -tags: [ under-construction ] + defaultValue: true diff --git a/api/functions/Duel/SpecialSummonComplete.yml b/api/functions/Duel/SpecialSummonComplete.yml index 449e5a4c..21f0fa99 100644 --- a/api/functions/Duel/SpecialSummonComplete.yml +++ b/api/functions/Duel/SpecialSummonComplete.yml @@ -2,7 +2,9 @@ name: SpecialSummonComplete namespace: Duel description: >- - Completes Special Summons conducted with Duel.SpecialSummonStep. This has to be called even if all the Duel.SpecialSummonStep fails. + Completes any Special Summons conducted with [Duel.SpecialSummonStep](/api/functions/Duel/SpecialSummonStep). Can be called after using `Duel.SpecialSummonStep` regardless of its success. +returns: + - type: [ int ] + description: The number of monsters that were successfully Special Summoned. status: index: stable -tags: [ under-construction ]