Help with files/pointers/hex system for a game set-up

Posted by Dralnu on Sat 27 Aug 2005 06:07 PM — 4 posts, 17,982 views.

USA #0
Trying to work on a cardgame set-up for my codebase, and need some info (I'm still a newbie at coding, and this is something I havn't dealt with before).

Thinking of something along the lines of M: TG (for those who don't kno what it is, its pretty much the best CCG there is IMHO), and was going to set-up a system similar to this:

ch has a deck of cards (deck), and when ch exam deck, they get something like this:

04 - Priest of Elves | T: Add one G to mana pool | 1/1
02 - Morrow Elves    |                           | 1/2
15 - Forest          | T: Add one G to mana pool | Land

ect.

And use something similar to

(hexidecimal system number) - "Priest of Elves"
              "             - "Morrow Elves"


so that in their deck it just keeps the card number listed, sorts the cards into type (creature, land, spells), and then can read from a file the card name, abilities, and so forth.
Sadly, I have no clue about seting something like this up.

I also want it to be able to keep up with the players mana pool, and be able to tell the player whether or not the creature can be cast and all that so it seems like a real game.

I'd need fields for, and a way to keep up with, R,G,B,U,W mana, life total, what is on the field, effects in play, and alot of that kind of crap for the game.

Anyone know of a site or something that I could get some help with this on?
USA #1
Isn't there a code contest going on at MudMagic for a card system?
USA #2
I think there is, but I don't know if it is anything like this. I htink its for more like poker/blackjack, instead of something along the lines of a CCG. They get a snippet done for that will make this a bit easier, but I still owuld like some info on this kind of thing since I don't know much about it. Basics is what I'm looking for to do this kind of thing, and some help getting started
USA #3
Build a series of functions or classes that will allow users to reuse the code to create different card games in a text game codebase. Your code will be used as a library routine. It will contain a deck of cards, dealing routines, and player hand support.
Deadline: 2005-10-27


Thats what is on MUDMagic, and this wouldn't cover all of what I need.