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
cThe card to update the DEF of.
int
amountThe value to add to the card's current DEF. Can be negative to decrease the card's DEF.
int
resetOptional.
Composite Reset value describing when the DEF change stops applying.
Card
rcOptional. Defaults to
c.The card causing the DEF change.
int
reset_countOptional. Defaults to
1.How many times
resetmust 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).