X (costs)
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: X (costs)
by mtgrares » 15 Jul 2009, 19:52
In ComputerAI_General.java and ComputerUtil.java. ComputerAI_General is the "input wrapper" that calls ComputerUtil. By "input wrapper" I mean usually the Input class handles mouse input but it is also used when a phase changes, so when the phase changes and it is the computer's turn, input ComputerAI_General is used. (The other ComputerAI classes like ComputerAI_Rats, ComputerAI_Burn, ComputerAI_Burn2, ComputerAI_StackNotEmpty, and ComputerAI_Race are old classes and are not used anywhere in the program.)where is the AI mana paying code anyways?
The "heart" of the AI is ComputerUtil.playCards() which plays cards for the computer, this includes paying mana cost, tapping the card, removing it from the computer's hand and putting it on the stack. Most of the stuff in ComputerUtil hasn't been updated and has been the same since the beginning (for better or worse). ComputerUtil is all static methods and it could be put into ComputerAI_General.
The comments in ComputerUtil are a little funny like "I hope this fixes 'the problem' that I can't re-create". lol The AI could be updated for the 10th Edition painlands like Adarkar Wastes since the AI doesn't receive any damage from them.
- mtgrares
- DEVELOPER
- Posts: 1352
- Joined: 08 Sep 2008, 22:10
- Has thanked: 3 times
- Been thanked: 12 times
16 posts
• Page 2 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 26 guests