Page 1 of 1

Possible Upgrade to MM?

PostPosted: 05 Sep 2015, 19:07
by Xander9009
I was considering a way to upgrade the MM function so it can be used on cards without crippling the AI. The AI basically never activates the MM abilities, so we're stuck largely with either using autotap mana sources so we can play against those decks using the AI, or using MM sources so we can properly use those sources but being unable to really play against them.

My current idea is to change the way the cards are coded so that if they're controlled by an AI player, then they gain the auto-tap ability.

However, I wasn't sure if that would cause problems. My guess is no since basic lands are given both abilities. The way they work, I wouldn't expect it to be a problem.

But then I considered that some lands such as Mishra's Workshop restrict how the mana can be used. And I had an idea for how to handle that mana ONLY if they're controlled by an AI. At the beginning of each phase, if the land is untapped, then produce the mana. When any of that mana is used, tap the land that made it. So, at the beginning of the main phase, Mishra's Workshop automatically creates {3}, and that mana is restricted to only artifacts. At the end of the phase, that mana will disappear, and at the beginning of the next phase, 3 new mana tokens will be made. If at any point any of the mana is used, then Mishra's Workshop is tapped so it won't produce any more mana tokens until it becomes untapped again, leaving the (possibly) remaining 2 mana tokens to be used that phase until the mana is cleaned up.

I'm only really worried about mana sources that produce multiple mana such as Sol Ring. Sources that only produce 1 mana aren't too bad. They can be set up to be auto-tap without typically causing major problems.

However, I was also considering how autotap sources work when they can produce different kinds of mana, such as Veinfire Borderpost. As it stands, that enters the battlefield producing {B}, and the AI isn't allowed to change that because it could lead to the AI doing that infinitely. But I was considering it, and it may be better to either give it the option at the beginning of each turn, or maybe just make it a once-per-turn ability if it's controlled by the AI.

I'm asking anyone who sees this for their thoughts on the subject, but mainly you, Riiak, since you're obviously the most knowledgeable of us when it comes to mana.

Re: Possible Upgrade to MM?

PostPosted: 05 Sep 2015, 21:34
by Xander9009
I went ahead and tried these and they seemed to work fine. I just made it grant the backup like normal OR if its controller is AI. There were only about 10 cards or so affected, so it'll be easy to undo if I need to. The most complicated ones are Urza's Workshop and the two related lands. And of course Dreamstone Hedron had to have an availability block put in checking if it's AI controlled. But by and large, very simple and it worked well. When I played against my Metallic Menagerie deck, it did a LOT better.

Unfortunately, when I tried modifying Mishra's Workshop the way I wanted to, it started crashing the game. I'll wait for any advice on that before putting a lot of effort into making it work. I'd rather know before I put in the effort if there's something wrong with my suggested method that I'm missing.

Re: Possible Upgrade to MM?

PostPosted: 06 Sep 2015, 17:11
by RiiakShiNal
For those cards which can safely have backup mana abilities allowing the backup to be active if the controller is an AI should be safe (though it will lose interactions with cards that require Manual Mana like Mana Flare as well as all Manual Mana benefits). Though any card for which backup mana abilities are not safe to use will not be able to use this method.

However, your workaround for cards like Mishra's Workshop will not work properly with cards like Ley Druid or if a card like Mana Flare comes out during that step (has to be step and not phase as mana is emptied at the end of each step). Additionally, this could cause problems with cards like Upwelling (as the AI would get lots of additional mana that they shouldn't have).

For best determination of what colour mana a land should produce you can either look at the mana symbols on cards in a player's hand then guess based on what basic lands that player has in play (and untapped) as to what would likely help most. Though this can be a fairly complex process as you try to take into account about how much mana they can produce versus the cost of cards in hand and approximate which would be the best colour to use. thefiremind has come up with at least 2 different ways of doing this and his input on this particular piece would probably be better than mine.

Re: Possible Upgrade to MM?

PostPosted: 06 Sep 2015, 17:34
by Xander9009
Thanks for the advice. I did realize it would lose the benefits from cards like Mana Flare, but the AI is still able to activate the manual ability. It's just that it rarely does (mostly once there are more than a handful of MM sources, like it's not allocating enough time, and thus just stops running). It works better, at least. It'll always do better with a person playing the deck, but at least the AI doesn't just sit with a hand full of affordable cards without ever playing any of them.

About the restricted mana, I'm glad I asked before trying it much, then. I guess it'll just have to stay as it is, then, because I don't have any other ideas for it.

About choosing the color mana most appropriate, what about having a mana manager which sets the color of all multi-color mana sources when a card is considered for cast if it's controlled by AI? This way, it would at least only have to consider one card at a time and it could stop when it found some combination that could cast the card. It would not find the best sources to use (unless they all produce the same combinations, in which case it wouldn't matter), but it would certainly be better than how it is now with the AI simply unable to use the other producible colors. My fear here is that I don't know how many times the AI would run through the cards in hand, and thus I don't know if it would cause a large hit to performance. Worth a shot, maybe? It also obviously wouldn't help much with abilities, but there is a CONSIDERED_FOR_ACTIVATION trigger or something like that. Unfortunately, I remember Neo saying he'd had a lot of trouble with it when trying to deactivate restricted mana. I don't recall seeing TFM's mana choosing functions. I'll look into them and see if I can find them and figure them out. It'll be frustrating and tedious to go through the massive number of cards that would need corrected, but for the most part, they'll be copy/paste correction, anyway.

Re: Possible Upgrade to MM?

PostPosted: 13 Feb 2016, 06:43
by Xander9009
Just an update on this: I haven't done much about choosing which mana to produce, however, I have realized that the land the player uses could also have a bit of an update.

Two abilities: one to manually produce mana and one to set which color of mana is currently set to be auto-tapped for. The second ability allows you to set any land to tap for a given color, but would also allow a land to currently NOT auto-tap, so it behaves as an entirely manual mana only land. With this (and some code to allow the AI to have colors available other than the default) would give the player complete control over which lands are used to cast a spell (by making all lands manual mana, though this doesn't prevent basics from auto-tapping, of course) and to produce any color a land can at any given moment, but also allows the freedom to set a land to produce {G} and not have to worry about it unless it needs changed.

For the AI, temporarily until I can put in the time to produce the functions I really want for it, someone (sorry, I don't remember off the top of my head who) mentioned they tried using randomized colors each step and it seemed to give the AI enough opportunity to use the mana. I may try that.