It is currently 10 May 2025, 14:30
   
Text Size

Cards with counters.

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Re: Cards with counters.

Postby Rob Cashwalker » 16 Jan 2009, 05:16

I think we should split this mana pool discussion to a new thread....

I also think the answer to the "mana pool" is much simpler than y'all are making it out to be.... If I'm following the PayManaCost system correctly, it simply removes a mana character for each time you activate a card that has "tap: add _".

So a total cost of lets say "2 W U"

then you activate a "tap: add W". It takes that "W" and finds it in the mana cost and removes it. Then the remaining cost becomes "2 U".

Then you activate a "tap: add 1". It finds the numeric character, and subtracts "1" from it. The remaining cost becomes "1 U"

Then you activate a "tap: add G". It can't find "G" in the mana cost, so subtracts "1" instead. The remaining cost becomes "U"

And then you "tap: add U", and the mana cost is paid....

So, it might be logical to implement a mana pool, as a SIMPLE string... when the PayManaCost function executes, it checks the mana pool string, and pops off each character. Then any remaining mana must come from regular sources....

Then we need to create an activated ability parser, to add the relavent mana characters to the string.

And yes, how the hell would we write a canPlayAI that made sense?
The Force will be with you, Always.
User avatar
Rob Cashwalker
Programmer
 
Posts: 2167
Joined: 09 Sep 2008, 15:09
Location: New York
Has thanked: 5 times
Been thanked: 40 times

Re: Cards with counters.

Postby mtgrares » 20 Jan 2009, 21:54

Don't worry about the AI and paying mana. If you can get the human side of things working, the AI probably use the same code to pay for mana although it won't be optimal but nothing the AI does is optimal anyways, :D

I don't know if you guys played MTG Forge when it first came out, but the AI pretended that all of the costs were colorless just to make things easier. For example, if the cost was GG, the computer would see the cost as a "2" and might tap a Mountain and a Swamp.
mtgrares
DEVELOPER
 
Posts: 1352
Joined: 08 Sep 2008, 22:10
Has thanked: 3 times
Been thanked: 12 times

Previous

Return to Forge

Who is online

Users browsing this forum: No registered users and 34 guests


Who is online

In total there are 34 users online :: 0 registered, 0 hidden and 34 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 34 guests

Login Form