Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions api/functions/Card/AddCannotBeFlipSummoned.yml
Original file line number Diff line number Diff line change
@@ -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 ]
17 changes: 17 additions & 0 deletions api/functions/Card/AddCannotBeNormalSummoned.yml
Original file line number Diff line number Diff line change
@@ -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 ]
2 changes: 1 addition & 1 deletion api/functions/Card/IsDifferentRace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: IsDifferentRace
namespace: Card
description: >-
Returns if (Card c) does not have Race (int race)
Deprecated function. Use Card.IsRaceExcept
status:
index: stable
parameters:
Expand Down
17 changes: 17 additions & 0 deletions api/functions/Card/IsEffectMonster.yml
Original file line number Diff line number Diff line change
@@ -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 ]
17 changes: 17 additions & 0 deletions api/functions/Card/IsFusionMonster.yml
Original file line number Diff line number Diff line change
@@ -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 ]
17 changes: 17 additions & 0 deletions api/functions/Card/IsPendulumMonster.yml
Original file line number Diff line number Diff line change
@@ -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 ]
30 changes: 30 additions & 0 deletions api/functions/Card/IsRaceExcept.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---!function
name: IsRaceExcept
namespace: Card
description: >-
Checks if (Card c) has any race other than (int race). If the optional parameters are passed, does the checks by calling the equivalent behavior with such parameters with Card.GetRace
status:
index: stable
parameters:
- name: c
type: [ Card ]
description: (To be added)
- name: race
type: [ int ]
description: (To be added)
- name: scard
type: [ Card ]
description: (To be added)
required: false
- name: sumtype
type: [ int ]
description: (To be added)
required: false
- name: playerid
type: [ int ]
description: (To be added)
required: false
returns:
- type: [ bool ]
description: (To be added)
tags: [ under-construction ]
17 changes: 17 additions & 0 deletions api/functions/Card/IsSynchroMonster.yml
Original file line number Diff line number Diff line change
@@ -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 ]
17 changes: 17 additions & 0 deletions api/functions/Card/IsXyzMonster.yml
Original file line number Diff line number Diff line change
@@ -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 ]
6 changes: 5 additions & 1 deletion api/functions/Card/UpdateAttack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: UpdateAttack
namespace: Card
description: >-
Applies an ATK change to card c, equal to int amount. If the reset values (int reset) are not provided, the default is RESET_EVENT (+RESETS_STANDARD_DISABLE , if rc == c, or just +RESETS_STANDARD). If the reason card rc is not provided, uses as default card c. Returns the amount of ATK successfully changed.
Applies an ATK change to card c, equal to int amount. If the reset values (int reset) are not provided, the default is RESET_EVENT (+RESETS_STANDARD_DISABLE , if rc == c, or just +RESETS_STANDARD). If the reason card rc is not provided, uses as default card c. If reset_count is not provided it defaults to 1. Returns the amount of ATK successfully changed.
status:
index: stable
parameters:
Expand All @@ -20,6 +20,10 @@ parameters:
type: [ Card ]
description: (To be added)
required: false
- name: reset_count
type: [ int ]
description: (To be added)
required: false
returns:
- type: [ int ]
description: (To be added)
Expand Down
6 changes: 5 additions & 1 deletion api/functions/Card/UpdateDefense.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: UpdateDefense
namespace: Card
description: >-
Applies a DEF change to card c, equal to int amount. If the reset values (int reset) are not provided, the default is RESET_EVENT (+RESETS_STANDARD_DISABLE , if rc == c, or just +RESETS_STANDARD). If the reason card rc is not provided, uses as default card c. Returns the amount of DEF successfully changed.
Applies a DEF change to card c, equal to int amount. If the reset values (int reset) are not provided, the default is RESET_EVENT (+RESETS_STANDARD_DISABLE , if rc == c, or just +RESETS_STANDARD). If the reason card rc is not provided, uses as default card c. If reset_count is not provided it defaults to 1. Returns the amount of DEF successfully changed.
status:
index: stable
parameters:
Expand All @@ -20,6 +20,10 @@ parameters:
type: [ Card ]
description: (To be added)
required: false
- name: reset_count
type: [ int ]
description: (To be added)
required: false
returns:
- type: [ int ]
description: (To be added)
Expand Down
15 changes: 15 additions & 0 deletions api/functions/Cost/Choice.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---!function
name: Choice
namespace: Cost
description: Creates a baseline [cost function](/api/types/EffectCost) that gives the player a choice between different baseline cost functions for the same effect (e.g. "Starliege Lord Galaxion"). The ellipsis (...) allows tables in the form {base cost function, effect description, additional check function} (e.g. "{Cost.DetachFromSelf(1),aux.Stringid(id,0),s.extracheck}"). [`Duel.SelectEffect`](/api/functions/Duel/SelectEffect) is used to have the player choose, and their choice is then set as the effect's label.
summary: Creates a cost function that gives the player a choice between different costs.
status:
index: stable
parameters:
- name: ...
type: [ any ]
description: (To be added)
returns:
- type: [ EffectCost ]
description: The cost function generated based on the given parameters.
guaranteed: true
18 changes: 18 additions & 0 deletions api/functions/Cost/HardOncePerBattle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---!function
name: HardOncePerBattle
namespace: Cost
description: Creates a baseline [cost function](/api/types/EffectCost) used for effects that can only be activated once per battle by a player.
summary: Creates a cost function for "hard once per battle" effects.
status:
index: stable
parameters:
- name: flag
type: [ int ]
description: The value of the flag to register to the duel.
returns:
- type: [ EffectCost ]
description: The generated cost function.
guaranteed: true
suggestedLinks:
- name: Cost.SoftOncePerBattle
link: /api/functions/Cost/SoftOncePerBattle
39 changes: 39 additions & 0 deletions api/functions/Cost/HintSelectedEffect.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---!function
name: HintSelectedEffect
namespace: Cost
description: A baseline [cost function](/api/types/EffectCost) used for effects that need to display which effect was activated (e.g. "Exosister Gibrine").
summary: Cost function for effects that need to display which effect was activated.
status:
index: stable
parameters:
- name: e
type: [ Effect ]
description: The effect being activated.
- name: tp
type: [ int ]
description: The player activating the effect.
- name: eg
type: [ Group ]
description: A group of cards associated to the event that prompted the effect activation. The specifics of this group vary depending on the [event code](/api/enums/Event).
- name: ep
type: [ int ]
description: The player associated to the event that prompted the effect activation.
- name: ev
type: [ Group ]
description: A value associated to the event that prompted the effect activation. The specifics of this value vary depending on the event code.
- name: re
type: [ Effect ]
description: The effect that caused the event that prompted the effect activation.
- name: r
type: [ int ]
description: Composite [Reason](/api/enums/Reason) value of the event that prompted the effect activation.
- name: rp
type: [ int ]
description: The player that caused the event that prompted the effect activation.
- name: chk
type: [ int ]
description: Must be `0` when checking if the cost can be paid, and `1` when performing the cost.
returns:
- type: [ bool ]
description: If `chk` is `0`, returns `true` if the cost can be paid.
guaranteed: false
18 changes: 18 additions & 0 deletions api/functions/Cost/RemoveCounterFromField.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---!function
name: RemoveCounterFromField
namespace: Cost
description: Creates a baseline [cost function](/api/types/EffectCost) used for effects that remove a counter(s) from the activating player's field as cost, such as `You can remove 1 Spell Counter from your field... ; ...` (e.g. "Arcanite Magician").
summary: Creates a cost function for effects that remove a counter from the field.
status:
index: stable
parameters:
- name: counter_type
type: [ int ]
description: The type of counter to remove.
- name: count
type: [ int ]
description: The amount of counters to remove.
returns:
- type: [ EffectCost ]
description: The cost function generated based on the given parameters.
guaranteed: true
18 changes: 18 additions & 0 deletions api/functions/Cost/RemoveCounterFromSelf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---!function
name: RemoveCounterFromSelf
namespace: Cost
description: Creates a baseline [cost function](/api/types/EffectCost) used for effects that remove a counter(s) from the activating card itself as cost, such as `You can remove 1 Spell Counter from this card... ; ...` (e.g. "Breaker the Magical Warrior").
summary: Creates a cost function for effects that remove a counter from the card itself.
status:
index: stable
parameters:
- name: counter_type
type: [ int ]
description: The type of counter to remove.
- name: count
type: [ int ]
description: The amount of counters to remove.
returns:
- type: [ EffectCost ]
description: The cost function generated based on the given parameters.
guaranteed: true
15 changes: 15 additions & 0 deletions api/functions/Cost/SelfChangePosition.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---!function
name: SelfChangePosition
namespace: Cost
description: Creates a baseline [cost function](/api/types/EffectCost) used for effects that change the battle position of the activating card itself as cost, such as `You can change this face-down card to face-up Defense Position; ...` (e.g. "Enneacraft - Atori.MAR").
summary: Creates a cost function for effects that change the card's own position as cost.
status:
index: stable
parameters:
- name: position
type: [ int ]
description: The position to change the card to.
returns:
- type: [ EffectCost ]
description: The cost function generated based on the given parameters.
guaranteed: true
18 changes: 18 additions & 0 deletions api/functions/Cost/SoftOncePerBattle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---!function
name: SoftOncePerBattle
namespace: Cost
description: Creates a baseline [cost function](/api/types/EffectCost) used for effects that can only be activated once per battle *per card*, e.g. "Lavalval Ignis".
summary: Creates a cost function for "soft once per battle" effects.
status:
index: stable
parameters:
- name: flag
type: [ int ]
description: The value of the flag to register to the card.
returns:
- type: [ EffectCost ]
description: The generated cost function.
guaranteed: true
suggestedLinks:
- name: Cost.HardOncePerBattle
link: /api/functions/Cost/HardOncePerBattle
10 changes: 10 additions & 0 deletions api/functions/Duel/GetReasonEffect.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---!function
name: GetReasonEffect
namespace: Duel
description: >-
Returns the [effect](/api/types/Effect) that the core considers as the "current effect" (`core.reason_effect`)
status:
index: stable
returns:
- type: [ Effect ]
description: (To be added)
10 changes: 10 additions & 0 deletions api/functions/Duel/GetReasonPlayer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---!function
name: GetReasonPlayer
namespace: Duel
description: >-
Returns the player that the core considers as the "current player" (`core.reason_player`)
status:
index: stable
returns:
- type: [ int ]
description: (To be added)
Loading