Cards with counters.
by mtgrares
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Cards with counters.
by 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?
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.
-
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.
by 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,
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.

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
62 posts
• Page 5 of 5 • 1, 2, 3, 4, 5
Who is online
Users browsing this forum: No registered users and 34 guests