I'm looking into this function in TMCard
i think this interprets as when the deck has no cards equip return false, so the duel will not proceed..
I managed to make this in the card list , so when the switch is on for the card type, it wont be listed useable.
I need to put this conditions in the deck valid.. when the switch is ON the deck containing the card type will not be valid and the duel will not proceed.
Thank you
JavaScript:
// is deck valid
Game_Party.prototype.isDeckValid = function(index) {
var deck = this.deck(index);
if (TMPlugin.Card.FixCardNum) {
return !deck.contains(0);
} else {
return deck.some(function(cardId) {
return cardId > 0;
});
}
};
i think this interprets as when the deck has no cards equip return false, so the duel will not proceed..
I managed to make this in the card list , so when the switch is on for the card type, it wont be listed useable.
JavaScript:
// if type is true and switch is on
if (item.meta.cardType == 0 && $gameSwitches.value(41)) { return +item.meta.cardType < 4;}
if (item.meta.cardType == 1 && $gameSwitches.value(42)) { return +item.meta.cardType < 4;}
if (item.meta.cardType == 2 && $gameSwitches.value(43)) { return +item.meta.cardType < 4;}
if (item.meta.cardType == 3 && $gameSwitches.value(44)) { return +item.meta.cardType < 4;}
I need to put this conditions in the deck valid.. when the switch is ON the deck containing the card type will not be valid and the duel will not proceed.
Thank you