What's the AI's priority for discarding cards?
Basically, it goes through all the cards in its hand and assigns them a score based on this formula:
Score = (cost of card)/10 + suspiciousIn general, suspicious is 1 if that creature was Nightmared last turn.
However, if the card is Ghost of the Past:
Score = 0For each card, if its score > (random number between 0 and 1), it will discard it.
If once it has run through all its cards it has not found one to discard, it discards a random card.
Are the order of the cards in the deck predetermined at the beginning of the match, or decided randomly based on which cards are left at the time it is drawn?
Predetermined.
Slightly off topic, but I didn't want to create a new topic for this.
I was about to go to sleep, and suddenly became curious about the [deck] code. I've recently studied all these different types of codes, but haven't really done much application with it, in places like forums.
It seems pretty obvious that they were made by you people, but how? (if you don't mind, and if its not too long..) Can it be used in other forums if wished? Is it a long process of saving each card in the database, giving it a code name, and making sure that they come out as they would in-game?
Nope. Basically, the images are stored as (card code).png in the same directory. A program written by
Planplan accesses them and creates an image when the [deck] tag is used. The image is then stored on the server. The tag itself is merely a simple combination of the [img] and [code] tags.
Also, this is for game coding questions, not forum coding questions.
How does it send information when you play PvP?
Through a server. I'll try to find some more information later.