Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ProjectIgnis/scrapiyard#31] Add missing entries #32

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
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
7 changes: 4 additions & 3 deletions api/constants/EffectCode/EFFECT_EQUIP_LIMIT.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
name: EFFECT_EQUIP_LIMIT
enum: EffectCode
value: 76
description: |-
Equipment object restrictions
description: |
This effect code restricts which monsters an equip card can remain equipped to. If the equip card is equipped to a monster that not meets the restriction, the equip card will be destroyed.
summary: Restricts which monsters an equip card can remain equipped to.
status:
index: stable
tags: [ under-construction ]
tags: [ equip-limit, equip-related ]
50 changes: 30 additions & 20 deletions api/functions/Auxiliary/EquipFilter.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,37 @@
---!function
name: EquipFilter
namespace: Auxiliary
description: |-
no description yet
description: &desc A function to filter monsters for an equip effect.
summary: *desc
status:
index: stable
parameters:
- name: c
type: [ any ]
description: (To be added)
- name: p
type: [ any ]
description: (To be added)
- name: f
type: [ any ]
description: (To be added)
- name: e
type: [ any ]
description: (To be added)
- name: tp
type: [ any ]
description: (To be added)
- &c
name: c
type: [ Card ]
description: The monster to check.
- &p
name: p
type: [ int ]
description: The player who controls the monster.
returns:
- type: [ bool ]
description: (To be added)
tags: [ under-construction ]
- &ret
type: [ bool ]
description: If the monster passed the filter.
overloads:
- description: A function to filter monsters for an equip effect with additional checks.
parameters:
- *c
- *p
- name: f
type: [ CardFilter ]
description: A CardFilter function to fulfill additional checks for the monster.
- name: e
type: [ Effect ]
description: The effect to be passed to the CardFilter function.
- name: tp
type: [ int ]
description: The player to be passed to the CardFilter function.
returns:
- *ret
tags: [ equip-related ]
15 changes: 9 additions & 6 deletions api/functions/Auxiliary/EquipLimit.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
---!function
name: EquipLimit
namespace: Auxiliary
description: |-
no description yet
description: |
Creates a function for [Effect.SetValue](/api/functions/Effect/SetValue) of an equip limit effect, restricting which monsters an equip card can remain equipped to.
summary: Creates a function for Effect.SetValue of an equip limit effect.
status:
index: stable
parameters:
- name: f
type: [ any ]
description: (To be added)
type: [ function ]
description: A function to restrict which monsters can remain equipped with the equip card.
required: false
defaultValue: nil
returns:
- type: [ function ]
description: (To be added)
tags: [ under-construction ]
description: The function that is used by the equip limit effect.
tags: [ equip-limit, equip-related ]
18 changes: 18 additions & 0 deletions api/functions/Auxiliary/EquipOperation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---!function
name: EquipOperation
namespace: Auxiliary
description: |
Creates an [EffectOperation](/api/types/EffectOperation) function for an equip effect, handling the process of equipping the equip card to a target monster.
summary: Creates an EffectOperation function for an equip effect
status:
index: stable
parameters:
- name: op
type: [ EffectOperation ]
description: A function to perform additional operations after equipping.
required: false
defaultValue: nil
returns:
- type: [ EffectOperation ]
description: The function that is used by the equip effect.
tags: [ equip-related ]
29 changes: 18 additions & 11 deletions api/functions/Auxiliary/EquipTarget.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
---!function
name: EquipTarget
namespace: Auxiliary
description: |-
no description yet
description: |
Creates an [EffectTarget](/api/types/EffectTarget) function for an equip effect, allowing the player to select a monster that can be equipped with the equip card.
summary: Creates an EffectTarget function for an equip effect.
status:
index: stable
parameters:
- name: tg
type: [ any ]
description: (To be added)
type: [ EffectTarget ]
description: A function to do something after a monster is targeted for equipping.
required: false
defaultValue: nil
- name: p
type: [ any ]
description: (To be added)
type: [ int ]
description: A number to indicates which player is performing the selection, where 0 is the controller, 1 is the opponent.
required: false
defaultValue: PLAYER_ALL
- name: f
type: [ any ]
description: (To be added)
type: [ CardFilter ]
description: A filter to specify which monsters can be targeted.
required: false
defaultValue: nil
returns:
- type: [ function ]
description: (To be added)
tags: [ under-construction ]
- type: [ EffectTarget ]
description: The function that is used by the equip effect.
tags: [ equip-related ]
37 changes: 30 additions & 7 deletions api/functions/Auxiliary/FunctionWithNamedArgs.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,41 @@
---!function
name: FunctionWithNamedArgs
namespace: Auxiliary
description: |-
no description yet
description: Creates a new function that can handle both named arguments (as a table) and regular arguments.
summary: Wraps a function to support optional named arguments.
status:
index: stable
parameters:
- name: f
type: [ function ]
description: (To be added)
required: true
description: The original function to be wrapped.
- name: ...
type: [ any ]
description: (To be added)
type: [ string, table ]
required: false
description: Names of the parameters expected by the function, or a table of parameter specifications.
returns:
- type: [ function ]
description: (To be added)
tags: [ under-construction ]
description: A new function that can handle both named and regular arguments.
guide: |
Example usage:
```lua
SearchCardFromDeck = aux.FunctionWithNamedArgs(function(tp,filter,count)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,filter,tp,LOCATION_DECK,0,count,count,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end,"tp","filter","count")

function s.thfilter(c)
return c:IsLevel(4) and c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_DARK)
end

function s.operation(e,tp,eg,ep,ev,re,r,rp)
SearchCardFromDeck({tp=tp,filter=s.thfilter,count=1})
-- Or
SearchCardFromDeck(tp,s.thfilter,1)
end
```
17 changes: 12 additions & 5 deletions api/functions/Auxiliary/GrouptoCardid.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
---!function
name: GrouptoCardid
namespace: Auxiliary
description: |-
no description yet
description: &desc |-
Converts a Group of cards into a table of card IDs.
summary: *desc
status:
index: stable
parameters:
- name: g
type: [ Group ]
description: The group of cards to be converted into a table of card IDs.
returns:
- type: [ int ]
description: (To be added)
tags: [ under-construction ]
- type: [ table ]
description: A table where the card IDs are the keys, and `true` is the value for each key.
suggestedLinks:
- name: GetCardID
link: /api/functions/Card/GetCardID
70 changes: 48 additions & 22 deletions api/functions/Auxiliary/bfgcost.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,65 @@
---!function
name: bfgcost
namespace: Auxiliary
description: |-
Default SetCost for "You can banish this card from your Graveyard"
description: Checks if the card can be banished as a cost for effects with the text "You can banish this card; ..".
summary: Checks if the card can be banished as a cost.
status:
index: stable
aliases:
- name: Auxiliary.selfbanishcost
status:
index: stable
parameters:
- name: e
- &e
name: e
type: [ Effect ]
description: (To be added)
- name: tp
description: The effect object representing the card effect being activated.
- &tp
name: tp
type: [ int ]
description: (To be added)
- name: eg
type: [ Group, nil ]
description: (To be added)
- name: ep
description: The player performing the check.
- &eg
name: eg
type: [ Group ]
description: A group of cards involved in the event that triggered this effect.
- &ep
name: ep
type: [ int ]
description: (To be added)
- name: ev
description: The event player.
- &ev
name: ev
type: [ int ]
description: (To be added)
- name: re
description: The event value, which varies depending on the type of event
- &re
name: re
type: [ Effect ]
description: (To be added)
- name: r
description: The reason effect, if this effect was triggered by another effect.
- &r
name: r
type: [ int ]
description: (To be added)
- name: rp
description: The reason code.
- &rp
name: rp
type: [ int ]
description: (To be added)
description: The reason player who made the event happen.
- name: chk
type: [ int ]
description: (To be added)
description: Must be 0 when checking if the cost can be paid.
returns:
- type: [ bool ]
description: (To be added)
tags: [ under-construction ]
description: If the card can be banished as a cost.
overloads:
- description: Banishes the card as a cost for effects with the text "You can banish this card; ..".
summary: Banishes the card as a cost.
parameters:
- *e
- *tp
- *eg
- *ep
- *ev
- *re
- *r
- *rp
- name: chk
type: [ int ]
description: Must be 1 when performing the cost.
11 changes: 6 additions & 5 deletions api/functions/Duel/GetCardAliasFromCode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
name: GetCardAliasFromCode
namespace: Duel
description: |-
Gets a card's alias from its card id (the value returned is the same as the one returned with Card.Alias on a card object corresponding to a card with such id)
Retrieves the card alias for the given card passcode/ID.
summary: Get the alias of a card using its code.
status:
index: stable
parameters:
- name: code
- name: id
type: [ int ]
description: (To be added)
description: The unique id representing the card.
returns:
- type: [ int ]
description: (To be added)
tags: [ under-construction ]
description: The alias of the card.
tags: [ passcode-related ]
12 changes: 6 additions & 6 deletions api/functions/Duel/GetCardAttackFromCode.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---!function
name: GetCardAttackFromCode
namespace: Duel
description: |-
Gets a card's attack from its card id (the value returned is the same as the one returned with Card.Attack on a card object corresponding to a card with such id)
description: Retrieves the attack points for the given card passcode/ID.
summary: Get the attack points of a card using its code.
status:
index: stable
parameters:
- name: code
- name: id
type: [ int ]
description: (To be added)
description: The unique id representing the card.
returns:
- type: [ int ]
description: (To be added)
tags: [ under-construction ]
description: The attack points of the card.
tags: [ passcode-related ]
12 changes: 6 additions & 6 deletions api/functions/Duel/GetCardAttributeFromCode.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---!function
name: GetCardAttributeFromCode
namespace: Duel
description: |-
Gets a card's attribute from its card id (the value returned is the same as the one returned with Card.Attribute on a card object corresponding to a card with such id)
description: Retrieves the card attribute for the given card passcode/ID.
summary: Get the attribute of a card using its code.
status:
index: stable
parameters:
- name: code
- name: id
type: [ int ]
description: (To be added)
description: The unique id representing the card.
returns:
- type: [ int ]
description: (To be added)
tags: [ under-construction ]
description: The attribute of the card.
tags: [ passcode-related ]
Loading