On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Are there script calls we can use to check if a card is the library equipped or not?  I'd also like to know if we can check how many of a card we have in the library. 

I've looked through this thread and all the plugins I have from the suite and came up empty. 

Hey spiderbob,

To check if an individual card in the library is equipped or not, you will want to use:

[Game_Card].origin()

This is will access the origin value of a Game_Card object which will return "learned" if obtained will Initialization or Skill Learn, "equip" if it was added through Equipment and "state" if it was added through a State on the Actor. You can find a Game_Card by accessing any collection of Cards such as:

$gameParty.members()[0]._cardDeck._data[0]

This gives you the top Card of the Deck as a Game_Card object which you can access the origin of using the above function.

To check how many of a card you have in the library, the script call you are looking for is:

[Game_Cards].amountOf(skillId)

This will return the amount of cards matching the Skill ID you pass in of the Game_Cards object you are calling it from (which is just any collection of Cards). A couple that might be useful to you:

[Game_Actor]._skillCards

This will give you all the cards an individual Actor has including ones they have in their Library which are not in their Deck.

$gameParty._allCards

This will give you all the cards in a Party's shared library if you have that plugin parameter enabled.

Hope that helped. Let us know if you have any further questions. We would be happy to assist :)

Cheers,

MythAtelier Team

(+1)

Awesome! Thank you so much for the swift reply.