I recently started working on a collectable card game for iOS and feel like I have coders block (is that a thing). Before I get into where exactly I'm at, let me quickly explain the rules.
Games are 1v1 where you each have a deck of about 30 cards. 1 of those will be a hero card that you start with (don't have to draw it from the deck). The objective is to play your other cards to kill the opponents hero card. Your other cards will have special effects / abilities that could affect almost anything else about the game. (this is where I'm stuck).
I have a working version that cycles through the turns and you can play cards, attack the opponents cards / hero, but thats about it. I'm having trouble implementing the special abilities of the cards. Just to name a few here is what I'll need:
These would be on play abilities that occur while the card is on the board
- buff your other cards' health and damage
- replace lost health on cards (heal)
- prevent opponent from attacking certain cards
- grant you an extra card draw each turn
- immediately give you an extra card
- freeze an opponents card from attacking for a turn
Some are simpler than others. It would be easy to say when a 'buff' card is played, + 1 to all your cards health and damage, but what about when the buff card is killed? is it as simple as - 1, possibly. However, it can be much more complicated than that so I'm not sure that would be the cleanest solution.
I think it would help if someone could explain out what they would do with maybe some pseudo examples. Hopefully that isn't too much to ask?