Skip to content

Commit

Permalink
Merge pull request #17 from ProjectIgnis/brnch2
Browse files Browse the repository at this point in the history
New entries in the Card namespace
  • Loading branch information
that-hatter authored Oct 26, 2024
2 parents 56ef051 + 437f550 commit 6b3871d
Show file tree
Hide file tree
Showing 21 changed files with 264 additions and 146 deletions.
24 changes: 14 additions & 10 deletions api/functions/Card/AddMonsterAttribute.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,39 @@
---!function
name: AddMonsterAttribute
namespace: Card
description: |-
Transforms a card (Card c) to a monster. The CardType will become TYPE_MONSTER + extra_type. Uses the values if provided, otherwise uses the card's own values in Database. Be aware that the values added using this (except for CardType) will be reset when the card is flipped face-down.
description: Transforms the provided card into a monster. Must be completed by calling [`Card.AddMonsterAttributeComplete`](/api/functions/Card/AddMonsterAttributeComplete) after the card has been moved to the Monster Zone. The card's properties reset to their original values when it is flipped face-down, becomes attached as Xyz material, or sent to the hand, Deck, GY, or banishment.
summary: Transforms the provided card into a monster.
status:
index: stable
parameters:
- name: c
type: [ Card ]
description: (To be added)
description: The card that will be turned into a monster.
- name: extra_type
type: [ int ]
description: (To be added)
description: Composite [CardType](/api/enums/CardType) value to add to the card's current type, in addition to [`TYPE_MONSTER`](/api/constants/CardType/TYPE_MONSTER).
- name: attribute
type: [ int ]
description: (To be added)
description: Composite [MonsterAttribute](/api/enums/MonsterAttribute) value to add to the card's attribute value in the database.
required: false
default: 0
- name: race
type: [ int ]
description: (To be added)
description: Composite [MonsterRace](/api/enums/MonsterRace) to add to the card's race value in the database.
required: false
default: 0
- name: level
type: [ int ]
description: (To be added)
description: A value to set as the monster's level instead of the card's level value in the database.
required: false
default: 0
- name: atk
type: [ int ]
description: (To be added)
description: A value to set as the monster's original ATK instead of the card's ATK value in the database.
required: false
default: 0
- name: def
type: [ int ]
description: (To be added)
description: A value to set as the monster's original DEF instead of the card's DEF value in the database.
required: false
tags: [ under-construction ]
default: 0
7 changes: 3 additions & 4 deletions api/functions/Card/AddMonsterAttributeComplete.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
---!function
name: AddMonsterAttributeComplete
namespace: Card
description: |-
Used in conjunction with Card.AddMonsterAttribute, completes a card's (Card c) transformation to a monster. It is best to call this after the card has arrived in Monster Zone (i.e. after Duel.SpecialSummonStep). Does nothing with cards without EFFECT_PRE_MONSTER (added automatically by Card.AddMonsterAttribute).
description: Used in conjunction with [`Card.AddMonsterAttribute`](/api/functions/Card/AddMonsterAttribute) after the card has been moved to the Monster Zone to complete the transformation of the provided card into a monster.
summary: Completes the transformation of a card into a monster.
status:
index: stable
parameters:
- name: c
type: [ Card ]
description: (To be added)
tags: [ under-construction ]
description: The card that has its transformation completed.
20 changes: 10 additions & 10 deletions api/functions/Card/AddSetcodesRule.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
---!function
name: AddSetcodesRule
namespace: Card
description: |-
to be added. Available in utility.lua
description: Creates and registers [`EFFECT_ADD_SETCODE`](/api/constants/EffectCode/EFFECT_ADD_SETCODE) effects to add any number of archetypes to a card.
summary: Adds any number of archetypes (setcodes) to a card.
status:
index: stable
parameters:
- name: c
type: [ Card ]
description: (To be added)
description: The card that will receive the archetypes.
- name: code
type: [ int ]
description: (To be added)
description: A passcode/ID the card should have for the additional archetypes to apply.
- name: copyable
type: [ bool ]
description: (To be added)
type: [ any ]
description: If provided as a non-nil value, the registered effects can be copied.
- name: ...
type: [ int ]
description: (To be added)
description: Any number of archetypes that the card will receive.
returns:
- type: [ table ]
description: (To be added)
tags: [ under-construction ]
- type: [ EffectArray ]
description: A table containing all the `EFFECT_ADD_SETCODE` effects registered.
tags: [ registers-effect ]
23 changes: 15 additions & 8 deletions api/functions/Card/Alias.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
---!function
name: Alias
namespace: Card
description: |-
Changes (Card c)'s alias if (int code) is inputted, else returns the current card's alias.
description: &desc Returns a card's alias.
summary: *desc
status:
index: stable
parameters:
- name: c
type: [ Card ]
description: (To be added)
- name: code
type: [ int ]
description: (To be added)
required: false
tags: [ under-construction ]
description: The card to get the alias of.
returns:
- type: [ int ]
description: The card's alias.
overloads:
- description: Changes a card's alias.
parameters:
- name: c
type: [ Card ]
description: The card to change the alias of.
- name: id
type: [ int ]
description: The new alias.
24 changes: 16 additions & 8 deletions api/functions/Card/Attack.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
---!function
name: Attack
namespace: Card
description: |-
Changes (Card c)'s original ATK if (int val) is inputted, else returns the current card's original ATK.
description: &desc Returns a card's original ATK.
summary: *desc
status:
index: stable
parameters:
- name: c
type: [ Card ]
description: (To be added)
- name: val
type: [ int ]
description: (To be added)
required: false
tags: [ under-construction ]
description: The card to get the original ATK of.
returns:
- type: [ int ]
description: The card's original ATK.
overloads:
- description: Changes a card's ATK.
parameters:
- name: c
type: [ Card ]
description: The card to change the ATK of.
- name: id
type: [ int ]
description: The new ATK value.
tags: [ atk-related ]
24 changes: 16 additions & 8 deletions api/functions/Card/Attribute.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
---!function
name: Attribute
namespace: Card
description: |-
Changes (Card c)'s original attribute(s) if (int att) is inputted, else returns the current card's original attribute(s).
description: &desc Returns the card's original attribute(s).
summary: *desc
status:
index: stable
parameters:
- name: c
type: [ Card ]
description: (To be added)
- name: att
type: [ int ]
description: (To be added)
required: false
tags: [ under-construction ]
description: The card to get the attribute(s) of.
returns:
- type: [ int ]
description: Composite [MonsterAttribute](/api/enums/MonsterAttribute) value of the card's original attribute(s).
overloads:
- description: Changes a card's attribute.
parameters:
- name: c
type: [ Card ]
description: The card to change the attribute of.
- name: att
type: [ int ]
description: Composite [MonsterAttribute](/api/enums/MonsterAttribute) value to set as the card's new attribute(s).
tags: [ attribute-related ]
12 changes: 6 additions & 6 deletions api/functions/Card/CanAttack.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---!function
name: CanAttack
namespace: Card
description: |-
to be added. Available in libcard.cpp
description: &desc Checks if a card can declare an attack.
summary: *desc
status:
index: stable
parameters:
- name: c
type: [ any ]
description: (To be added)
type: [ Card ]
description: The card to check.
returns:
- type: [ bool ]
description: (To be added)
tags: [ under-construction ]
description: If `c` can declare an attack.
tags: [ card-check, battle-related ]
20 changes: 11 additions & 9 deletions api/functions/Card/CanChainAttack.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
---!function
name: CanChainAttack
namespace: Card
description: |-
Checks if a card (Card c) can make a follow-up attack. Specifying the integer ac checks whether it can attack that number of times. Setting monsteronly to true checks only the possibility of follow-up attack to monster
description: &desc Checks if a card can make a number of attacks in a row.
summary: *desc
status:
index: stable
parameters:
- name: c
type: [ Card ]
description: (To be added)
- name: ac
description: The card to check.
- name: attackcount
type: [ int ]
description: (To be added)
description: The minimum amount of attacks `c` should be able to declare.
required: false
- name: monsteronly
defaultValue: 2
- name: on_monsters_only
type: [ bool ]
description: (To be added)
description: If `true`, checks only the possibility of follow-up attacks on monsters.
required: false
defaultValue: false
returns:
- type: [ bool ]
description: (To be added)
tags: [ under-construction ]
description: If `c` can declare a minimum of `attackcount` attacks in a row.
tags: [ card-check, battle-related ]
13 changes: 6 additions & 7 deletions api/functions/Card/CancelCardTarget.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
---!function
name: CancelCardTarget
namespace: Card
description: |-
Removes the second card (Card c2) from the list of the first card (Card c1)'s target
description: &desc Makes a card stop targeting another card.
summary: *desc
status:
index: stable
parameters:
- name: c1
- name: c
type: [ Card ]
description: (To be added)
- name: c2
description: The card that will stop targeting `tc`.
- name: tc
type: [ Card ]
description: (To be added)
tags: [ under-construction ]
description: The card that will stop being a target.
9 changes: 4 additions & 5 deletions api/functions/Card/CancelToGrave.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
---!function
name: CancelToGrave
namespace: Card
description: |-
if cancel is true, cancels the to-grave rule and movement of a card (Card c). If false, enforce the rule that it must go from the field to Graveyard instead.
description: Changes the behavior of the default rule in which certain types of cards are sent to the GY when they resolve (e.g. Normal Spells, Quick-Play Spells, Ritual Spells, Normal Traps, and Counter Traps) and others stay on the field (e.g. Field Spells, Pendulum Spells, Continuous Spells, and Continuous Traps).
summary: Changes the behavior of the rule that sends certain card types to the GY.
status:
index: stable
parameters:
- name: c
type: [ Card ]
description: (To be added)
description: The card that will have its behavior modified.
- name: cancel
type: [ bool ]
description: (To be added)
description: If set to `true`, disables the default rule. If set to `false`, enforces it even for types that would otherwise stay on the field.
required: false
defaultValue: true
tags: [ under-construction ]
23 changes: 15 additions & 8 deletions api/functions/Card/Code.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
---!function
name: Code
namespace: Card
description: |-
Changes (Card c)'s original card name if (int code) is inputted, else returns the current original card name.
description: &desc Returns a card's current passcode/ID.
summary: *desc
status:
index: stable
parameters:
- name: c
type: [ Card ]
description: (To be added)
- name: code
type: [ int ]
description: (To be added)
required: false
tags: [ under-construction ]
description: The card to get the passcode of.
returns:
- type: [ int ]
description: The card's current passcode.
overloads:
- description: Changes a card's passcode/ID.
parameters:
- name: c
type: [ Card ]
description: The card to change the passcode of.
- name: code
type: [ int ]
description: The new code.
24 changes: 16 additions & 8 deletions api/functions/Card/Defense.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
---!function
name: Defense
namespace: Card
description: |-
Changes (Card c)'s original DEF if (int val) is inputted, else returns the current card's original DEF.
description: &desc Returns a card's original DEF.
summary: *desc
status:
index: stable
parameters:
- name: c
type: [ Card ]
description: (To be added)
- name: val
type: [ int ]
description: (To be added)
required: false
tags: [ under-construction ]
description: The card to get the original DEF of.
returns:
- type: [ int ]
description: The card's original DEF.
overloads:
- description: Changes a card's DEF.
parameters:
- name: c
type: [ Card ]
description: The card to change the DEF of.
- name: id
type: [ int ]
description: The new DEF value.
tags: [ def-related ]
24 changes: 16 additions & 8 deletions api/functions/Card/Level.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
---!function
name: Level
namespace: Card
description: |-
Changes (Card c)'s original level/rank/link rating if (int level) is inputted, else returns the current card's original level/rank/link rating
description: &desc Returns a card's original level, rank, or link-rating.
summary: *desc
status:
index: stable
parameters:
- name: c
type: [ Card ]
description: (To be added)
- name: level
type: [ int ]
description: (To be added)
required: false
tags: [ under-construction ]
description: The card to get the original level, rank, or link-rating of.
returns:
- type: [ int ]
description: The card's original level, rank, or link-rating.
overloads:
- description: Changes a card's level, rank, or link-rating.
parameters:
- name: c
type: [ Card ]
description: The card to change the level, rank, or link-rating of.
- name: id
type: [ int ]
description: The new level, rank, or link-rating value.
tags: [ level-related, rank-related, link-related ]
Loading

0 comments on commit 6b3871d

Please sign in to comment.