Board index
Programs with AI or Rules Enforcement
Magic: The Gathering - Duels of the Planeswalkers
New MTG Cards and Decks (2010, 2012, 2013, 2014, 2015, Magic Duels)
2013




Duble Land problem.
Moderator: CCGHQ Admins
10 posts
• Page 1 of 1
Duble Land problem.
by libertyfighter » 17 May 2013, 10:28
Actually i'm coding double lands.
I get a strange kind of error and i don't know why. Anyone can help me?
The problem is:
I coded Taiga as both Forest and Mountain and this is OK. I added to this card TWO mana abilities. First one is to give green mana when tapped and second one to give red mana when tapped.
Code of each mana ability is the same, except of course for the kind of mana produced.
Trying this card with a DebugDeck (i have software to easily make decks starting from the cards already existing in DOTP_13 AND my custom cards), i get this problem:
When i use Taiga for having Red Mana the behaviour is correct.
When i use Taiga for having Green Mana (the FIRST of the TWO MANA ABILITIES in the card) it give me green mana, but land doesn't tap. So i get the wrong behaviour that i can summon infinite green creatures that cost
and finally 1 kird ape (red).
I think is strange because software correctly use the card as a source of Green or Red mana, so it understand the TWO abilities, but for strange reasons, it don't want to tap card for the first of the two..
I get a strange kind of error and i don't know why. Anyone can help me?
The problem is:
I coded Taiga as both Forest and Mountain and this is OK. I added to this card TWO mana abilities. First one is to give green mana when tapped and second one to give red mana when tapped.
Code of each mana ability is the same, except of course for the kind of mana produced.
Trying this card with a DebugDeck (i have software to easily make decks starting from the cards already existing in DOTP_13 AND my custom cards), i get this problem:
When i use Taiga for having Red Mana the behaviour is correct.
When i use Taiga for having Green Mana (the FIRST of the TWO MANA ABILITIES in the card) it give me green mana, but land doesn't tap. So i get the wrong behaviour that i can summon infinite green creatures that cost

I think is strange because software correctly use the card as a source of Green or Red mana, so it understand the TWO abilities, but for strange reasons, it don't want to tap card for the first of the two..
- libertyfighter
- Posts: 16
- Joined: 17 May 2013, 10:12
- Has thanked: 0 time
- Been thanked: 0 time
Re: Duble Land problem.
by NEMESiS » 17 May 2013, 11:00
Posting the code would help.
Here is copy from the one I have in game by another modder. It uses mana token, if it doesn't work I will make you one myself later.
Here is copy from the one I have in game by another modder. It uses mana token, if it doesn't work I will make you one myself later.
- Attachments
-
Taiga.zip
- (91.21 KiB) Downloaded 271 times
-
NEMESiS - Posts: 460
- Joined: 03 Jan 2013, 04:02
- Location: Pools of Becoming
- Has thanked: 70 times
- Been thanked: 21 times
Re: Duble Land problem.
by thefiremind » 17 May 2013, 11:09
If you have 2 different mana abilities active at the same time on a single card, it leads to strange effects, like the one you reported. This is the main problem of DotP games: very poor support for multi-color mana sources. If you look at the various mods around here (not mine because I always avoid "mana tricks" when I can) you'll find that there are 2 ways to get around the problem, both not optimal but that's the best you can get:
But if you really need dual lands, the choice is yours.
- Mana tokens: you give the card 2 activated abilities, each one spawning an invisible token that can be tapped for mana. You get a behavior that is very close to a manual land tapping.
- Color choice: you give the card all the mana abilities it needs, but you make them so that they can be granted, instead of being always active (see the official Cloudpost card for an example of this). Then you give the card an activated ability that lets you choose the mana ability that you want to grant at the moment (EDIT: the activated ability isn't on Cloudpost, of course: just the granted mana abilities are there). The land will be automatically tapped when needed, but you'll get to choose the color you need before using it.

Last edited by thefiremind on 17 May 2013, 12:23, edited 2 times in total.
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
Currently busy with life...
-
thefiremind - Programmer
- Posts: 3515
- Joined: 07 Nov 2011, 10:55
- Has thanked: 118 times
- Been thanked: 722 times
Re: Duble Land problem.
by libertyfighter » 17 May 2013, 11:47
Thank for both reply. I knew already mana tokens, because it used by Black Lotus and Dark Ritual, that i already have..
I thought it was not necessary to use again tokens because double land produces mana every turn instead of once. So i tought it was better if the engine could automatically tap it for mana...
But as you told me, they have very poor support on multiple mana.
I like double land because i have a lot of them in my phisical decks.
Thanks again
I will see Cloudpost and i will choice.
I thought it was not necessary to use again tokens because double land produces mana every turn instead of once. So i tought it was better if the engine could automatically tap it for mana...
But as you told me, they have very poor support on multiple mana.
I like double land because i have a lot of them in my phisical decks.
Thanks again
I will see Cloudpost and i will choice.
- libertyfighter
- Posts: 16
- Joined: 17 May 2013, 10:12
- Has thanked: 0 time
- Been thanked: 0 time
Re: Duble Land problem.
by libertyfighter » 18 May 2013, 18:18
Finally i chose to add 1 mana ability and 1 activated ability with token.
in that way, half times i don't have to manually tap the land for mana.
It seems that AI uses it correctly..
in that way, half times i don't have to manually tap the land for mana.
It seems that AI uses it correctly..
- Attachments
-
TAIGA_400003.zip
- (1.18 KiB) Downloaded 281 times
- libertyfighter
- Posts: 16
- Joined: 17 May 2013, 10:12
- Has thanked: 0 time
- Been thanked: 0 time
Re: Duble Land problem.
by thefiremind » 18 May 2013, 18:29
That's not a bad idea. You might want to add forced_skip="1" to the activated ability since players can't respond to mana abilities.
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
Currently busy with life...
-
thefiremind - Programmer
- Posts: 3515
- Joined: 07 Nov 2011, 10:55
- Has thanked: 118 times
- Been thanked: 722 times
Re: Duble Land problem.
by libertyfighter » 18 May 2013, 18:50
I'll do immediately. I don't know all the meanings of the attributes of Xml, nor the LUA functions and how they works. I don't know how find that kind of informations so i simply read the other XML cards and try. If exist some manual or something like this, please give me the URL.
- libertyfighter
- Posts: 16
- Joined: 17 May 2013, 10:12
- Has thanked: 0 time
- Been thanked: 0 time
Re: Duble Land problem.
by thefiremind » 18 May 2013, 19:15
You can start from the Wiki page:libertyfighter wrote:If exist some manual or something like this, please give me the URL.
http://www.slightlymagic.net/wiki/Duels ... lkers_2013
there's no manual, but at least you'll find some more information and 2 topics with the lists of functions and constants.
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
Currently busy with life...
-
thefiremind - Programmer
- Posts: 3515
- Joined: 07 Nov 2011, 10:55
- Has thanked: 118 times
- Been thanked: 722 times
Re: Duble Land problem.
by sumomole » 18 May 2013, 23:46
I don't think it's good enough, the two colors aren't symmetrical, because the game will give priority to tap the land that last to enter the battlefield. When you need green mana, if the dual-land is the last to enter the battlefield, it will be auto tapped, you can't keep it untapped until your opponent's turn.libertyfighter wrote:Finally i chose to add 1 mana ability and 1 activated ability with token.
in that way, half times i don't have to manually tap the land for mana.
It seems that AI uses it correctly..

There is no difference between forced_skip and auto_skip if you have turned on the Auto Resolution in the game settings, they only can skip the manual respond just like instant or activated ability, but can't skip triggered ability, so if you want it to look more like mana ability, you also need to use play_time_action instead of resolution_time_action.

-
sumomole - Programmer
- Posts: 611
- Joined: 07 Jun 2011, 08:34
- Has thanked: 51 times
- Been thanked: 234 times
10 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 271 guests