CCG Toolkit | Multiplayer Card Game Framework

Hey MFHad0uken,

Interesting solution, I can see a few things for why this wouldn’t be working for you. Ultimately, you would be wanting to get the opponents cards and search through these to find the first or one taunt card in the list. In your solution I cant seem to see any reference to getting the opponents cards, so lets see if we can get something working for you.

My suggestion in the latest version of the toolkit would be to add the following example to your “Deal Damage to Card” function.

This solution basicly follows the following logic:

  • Asks whether or not the receiving card is a taunt card. If it is, than the interaction will continue as normal.
  • If the card is NOT a taunt card, then it will get a reference to the opponents cards on the board and search for the FIRST taunt card it finds
  • If it finds a taunt card within the opponents cards on the board, then it will change the Receiving card to reference the taunt card instead.
  • And if there are no taunt cards, then the interaction will continue as normal

You shouldn’t have to add this anywhere else as both the AI and Players use this same function. This isn’t the most efficient way of doing this but you shouldn’t see any real impact to performance at all, and once you get this working you can refactor the code so it works better for your project.

Let me know if this works for you!