Skip to content

Card.UpdateDefense

Source Code | Usage Examples | Card Functions

Increases the DEF of a card by a specified value (or decreases it if the value is negative).

Signature

Card.UpdateDefense(Card c, int amount, [int reset, Card rc = c, int reset_count = 1]) → int

lua
c:UpdateDefense(amount,reset,rc,reset_count)

Parameters

  • Card c

    The card to update the DEF of.

  • int amount

    The value to add to the card's current DEF. Can be negative to decrease the card's DEF.

  • int reset

    Optional.

    Composite Reset value describing when the DEF change stops applying.

  • Card rc

    Optional. Defaults to c.

    The card causing the DEF change.

  • int reset_count

    Optional. Defaults to 1.

    How many times reset must happen for the DEF change to stop applying.

Returns

  • int

    The amount of DEF successfully changed (the difference between the card's new DEF and its previous DEF).


def-related, registers-effect