Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(3 edits)

Hello, thank you very much for the kind words! I came up with the rules entirely during the jam and they suffered some changes during the short play-testing sessions. 

After the player presses the trade button, the AI calculates a "trade weight" depending on its own "needs". So the code looks in the non-player deck to determine what it needs, first of all. The selected cards on the player side are then evaluated based on that need, obtaining a sum. Afterwards, the AI begins selecting SOME cards  (not the ones it actually needs) from its deck, subtracting from the "trade weight" sum in the process until it reaches equilibrium, taking into account, in certain cases, what the player needs as well. I was inspired by how trade is done in Stellaris and other similar games.

For the card effects, because of the time constraints, the code is thoroughly straightforward. I have a big clump of code which treats every option, from 9 to 1, individually. It asks if a deck has a certain card id, starting from the cards with the highest priority, going down. Resolving them is a matter of just erasing or appending elements to a certain deck.

The code is very inelegant, due to the aforementioned time constraint so I'd be very reticent to post it in its current form but I'm honoured. If you need help making a card game, I'd be happy to help.