playMaker

Author Topic: Card Logic questions for a card game  (Read 523 times)

paradiseprime

  • Full Member
  • ***
  • Posts: 105
Card Logic questions for a card game
« on: January 21, 2021, 11:37:39 PM »
So I am making a card game and I am struggling on the logic for the cards. I already have a database of cards to work from and there is specific wording for each but it can be changed if needed.

The route I am going currently is trying to find keywords in effects that be used to move the logic. Keywords like (Win)/Add/From your/From the/To your/To the/With an Attack Value of/ect The test effect I am using is this: (Win) Add 1 Magic Card, Heal Card, or Status Card from your Deck to your hand with an Attack Value of 3 or lower.

I tried using String Contain but there is no way for me to accurately get what spot I am trying to read. Effects can be way more complicated than what is shown above. There could be 2 or 3 effects that search the deck but have different amounts/cards/places to put them afterwards.

One of my ideas was to use Get String Right, add 1 to the character count and loop that till I have a string that fits one of the conditions. This is very slow since some effects can contain over 200 characters and starting from 0 and going forward would take forever but would be very precise since it will store parts of that string in a variable that I can use later.

Maybe I have been working at it too long and I am missing something that is very obvious. Any suggestions would be great.