Package moe.maika.ygofm.gamedata
Class Card
java.lang.Object
moe.maika.ygofm.gamedata.Card
A representation of a card in Forbidden Memories. Use
FMDB.getCard(int)
and
related methods to obtain card instances. The card instances are immutable and
thread-safe.-
Method Summary
Modifier and TypeMethodDescriptionboolean
canBeEquippedWith
(Card equip) Returns whether this card can be equipped with the given equip card.boolean
Returns whether this equip card can be successfully equipped to the given monster.fuseOrNull
(Card other) Returns the result of fusing this card with another card, or null if no fusion is possible.Returns the result of fusing this card with another card.int
Returns the ordinal value of this card in the full list of cards when sorted alphabetically.int
Returns the ordinal value of this card in the full list of cards when sorted by its AI sort value.int
Returns the ordinal value of this card in the full list of cards when sorted by its attack points.int
Returns the attack points of the card.Returns the attribute of the card.int
Returns the defense points of the card.int
Returns the ordinal value of this card in the full list of cards when sorted by its defense points.Returns the in-game description of the card, with line-breaks preserved.Returns the primary Guardian Star of the card.int
getId()
Returns the ID of the card.int
Returns the ordinal value of this card in the full list of cards when sorted lexicographically in Japanese.int
Returns the ordinal value of this card in the full list of cards when sorted by its attack points in Japanese release.int
Returns the ordinal value of this card in the full list of cards when sorted by its defense points in Japanese release.int
Returns the ordinal value of this card in the full list of cards when sorted by its max sort value in Japanese release.int
Returns the ordinal value of this card in the full list of cards when sorted by its type in Japanese release.int
getLevel()
Returns the level of the card.int
Returns the ordinal value of this card in the full list of cards when sorted by its max sort value.getName()
Returns the name of the card.Returns the password of the card.Returns the secondary Guardian Star of the card.int
Returns the starchip cost of the card.getType()
Returns the type of the card.int
Returns the ordinal value of this card in the full list of cards when sorted by its type.toString()
Returns the name of the card
-
Method Details
-
getId
public int getId()Returns the ID of the card.- Returns:
- the ID of the card
-
getName
Returns the name of the card.- Returns:
- the name of the card
-
getStarchips
public int getStarchips()Returns the starchip cost of the card.- Returns:
- the starchip cost of the card
-
getLevel
public int getLevel()Returns the level of the card.- Returns:
- the level of the card
-
getAttack
public int getAttack()Returns the attack points of the card.- Returns:
- the attack of the card
-
getDefense
public int getDefense()Returns the defense points of the card.- Returns:
- the defense of the card
-
getFirstGuardianStar
Returns the primary Guardian Star of the card.- Returns:
- the pirst Guardian Star of the card
-
getSecondGuardianStar
Returns the secondary Guardian Star of the card.- Returns:
- the secondary Guardian Star of the card
-
getDescription
Returns the in-game description of the card, with line-breaks preserved.- Returns:
- the description of the card
-
getType
Returns the type of the card. See fields inFMDB
for possible values.- Returns:
- the type of the card
-
getAttribute
Returns the attribute of the card.- Returns:
- the attribute of the card
-
getPassword
Returns the password of the card.- Returns:
- the password of the card
-
getAbcSort
public int getAbcSort()Returns the ordinal value of this card in the full list of cards when sorted alphabetically.- Returns:
- the ABC sort value of the card
-
getMaxSort
public int getMaxSort()Returns the ordinal value of this card in the full list of cards when sorted by its max sort value.- Returns:
- the max sort value of the card
-
getAtkSort
public int getAtkSort()Returns the ordinal value of this card in the full list of cards when sorted by its attack points.- Returns:
- the attack sort value of the card
-
getDefSort
public int getDefSort()Returns the ordinal value of this card in the full list of cards when sorted by its defense points.- Returns:
- the defense sort value of the card
-
getTypeSort
public int getTypeSort()Returns the ordinal value of this card in the full list of cards when sorted by its type.- Returns:
- the type sort value of the card
-
getAiSort
public int getAiSort()Returns the ordinal value of this card in the full list of cards when sorted by its AI sort value.- Returns:
- the AI sort value of the card
-
getJpAbcSort
public int getJpAbcSort()Returns the ordinal value of this card in the full list of cards when sorted lexicographically in Japanese.- Returns:
- the Japanese ABC sort value of the card
-
getJpMaxSort
public int getJpMaxSort()Returns the ordinal value of this card in the full list of cards when sorted by its max sort value in Japanese release.- Returns:
- the Japanese max sort value of the card
-
getJpAtkSort
public int getJpAtkSort()Returns the ordinal value of this card in the full list of cards when sorted by its attack points in Japanese release.- Returns:
- the Japanese attack sort value of the card
-
getJpDefSort
public int getJpDefSort()Returns the ordinal value of this card in the full list of cards when sorted by its defense points in Japanese release.- Returns:
- the Japanese defense sort value of the card
-
getJpTypeSort
public int getJpTypeSort()Returns the ordinal value of this card in the full list of cards when sorted by its type in Japanese release.- Returns:
- the Japanese type sort value of the card
-
canBeEquippedWith
Returns whether this card can be equipped with the given equip card. Useequips(Card)
for the inverse.- Parameters:
equip
- the equip card- Returns:
- true if this card can be equipped with the given equip card
- Throws:
IllegalArgumentException
- if this card is not a monster, the given card is not an equip card, or either card is null
-
equips
Returns whether this equip card can be successfully equipped to the given monster. UsecanBeEquippedWith(Card)
for the inverse.- Parameters:
monster
- the monster to check whether it takes this equip card- Returns:
- true if the monster can take this equip card
- Throws:
IllegalArgumentException
- if this card is not an equip or the given card is not a monster
-
fuseWith
Returns the result of fusing this card with another card. If no fusion is possible, the given card is returned, not this card. This behavior mirrors the in-game mechanic when selecting two cards to fuse.- Parameters:
other
- the other card to fuse with- Returns:
- the result of fusing the two cards, or the other card if no fusion is possible
- Throws:
IllegalArgumentException
- if the other card is null
-
fuseOrNull
Returns the result of fusing this card with another card, or null if no fusion is possible.- Parameters:
other
- the other card to fuse with- Returns:
- the result of fusing the two cards, or null if no fusion is possible
- Throws:
IllegalArgumentException
- if either card is null
-
toString
Returns the name of the card
-