Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Hi there!

I wanted to make an effect happen, or tick up a variable when players run out of cards and have to draw. Can you tell me how I might do this? I don't want it to trigger when they draw a full hand or when their turn ends, but specifically when they run out of cards and have to redraw their hand. 

Hey SolidusPrime, if you are building your project on MV, this should be possible using YEP Buffs & States Core and YEP Passive States plugins along with Card Game Combat. Create a Passive State that has a <Custom Action End Effect> Notetag. Within the Notetag create an if statement which is looking for the following condition to be met:

<Custom Action End Effect>
if($gameParty.leader()._cardHand.length < 1)
{
  //Make your effect happen here via script calls
}
</Custom Action End Effect>

This condition will check if your Hand is emptied at the end of each Action (in this case, after you have played any card). Set the Passive state to your Actor so that you can see the effects of this happen. Currently it will also check when you End your Turn so you may want your End Turn Skill to set a switch to OFF and prevent this if statement from executing. You will want this switch turned ON at the start of your next Turn so that this effect can trigger again when your hand is emptied. This can be done in the Turn Start Actions parameter of the Card Game Combat plugin.

Hope some of this helps. Let us know if you want to troubleshoot this further :)