Board index Programs with AI or Rules Enforcement Magic: The Gathering - Duels of the Planeswalkers Programming Talk
Morph tests
Moderator: CCGHQ Admins
Morph tests
by gorem2k » 30 Aug 2014, 18:19
The subject says it all. It's about the possibility of implementing Morph.
I found a silly way of making a fake face down creature pass thru stack but it does strange (and not really recommended) things before it can happen.
I post the cards here in case someone want to help me make an approximation.
(see 3rd post below.)
I found a silly way of making a fake face down creature pass thru stack but it does strange (and not really recommended) things before it can happen.
(see 3rd post below.)
Last edited by gorem2k on 01 Sep 2014, 12:15, edited 2 times in total.
Re: Morph tests
by gorem2k » 30 Aug 2014, 18:30
i was thinking, maybe it's possible at turn 0 of game before it begins, at least asap, to convert all cards that has morph ability in all players library/hand to the token then exile the token so all these cards are facedown when they enter stack. but yeah we won't see the card faceup so each of them will look the same.. oh well
Re: Morph tests
by gorem2k » 31 Aug 2014, 14:46
text permanent:
- Code: Select all
<Row>
<Cell ss:StyleID="s62"><Data ss:Type="String">CARD_QUERY_MODE_CREATURE_GET_2_LOSE_2</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String"></Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">Target creature gets +2/-2 until end of turn.</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">Target creature gets +2/-2 until end of turn.</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">Target creature gets +2/-2 until end of turn.</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">Target creature gets +2/-2 until end of turn.</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">Target creature gets +2/-2 until end of turn.</Data></Cell>
<Cell ss:Index="9" ss:StyleID="s62"><Data ss:Type="String">Target creature gets +2/-2 until end of turn.</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">Target creature gets +2/-2 until end of turn.</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">Target creature gets +2/-2 until end of turn.</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">Target creature gets +2/-2 until end of turn.</Data></Cell>
</Row>
<Row>
<Cell ss:StyleID="s62"><Data ss:Type="String">CARD_QUERY_MODE_CREATURE_LOSE_2_GET_2</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String"></Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">Target creature gets -2/+2 until end of turn.</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">Target creature gets -2/+2 until end of turn.</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">Target creature gets -2/+2 until end of turn.</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">Target creature gets -2/+2 until end of turn.</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">Target creature gets -2/+2 until end of turn.</Data></Cell>
<Cell ss:Index="9" ss:StyleID="s62"><Data ss:Type="String">Target creature gets -2/+2 until end of turn.</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">Target creature gets -2/+2 until end of turn.</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">Target creature gets -2/+2 until end of turn.</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">Target creature gets -2/+2 until end of turn.</Data></Cell>
</Row>
<Row>
<Cell ss:StyleID="s62"><Data ss:Type="String">CARD_QUERY_CHOOSE_CREATURE_TO_GET_2_LOSE_2</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String"></Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">Choose a creature to get +2/-2.</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">Choisissez une créature pour lui faire gagner +2/-2.</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">Elige una criatura para que obtenga +2/-2.</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">Bestimme eine Kreatur, die +2/-2 erhalten soll.</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">Scegli una creatura che prende +2/-2.</Data></Cell>
<Cell ss:Index="9" ss:StyleID="s62"><Data ss:Type="String">+2/-2の修整を受けるクリーチャーを選択。</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">+2/-2을 받을 생물 한 개를 고르십시오.</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">Выберите существо, которое получит +2/-2.</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">Escolha uma criatura para receber +2/-2.</Data></Cell>
</Row>
<Row>
<Cell ss:StyleID="s62"><Data ss:Type="String">CARD_QUERY_CHOOSE_CREATURE_TO_LOSE_2_GET_2</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String"></Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">Choose a creature to get -2/+2.</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">Choisissez une créature pour lui faire gagner -2/+2.</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">Elige una criatura para que obtenga -2/+2.</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">Bestimme eine Kreatur, die -2/+2 erhalten soll.</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">Scegli una creatura che prende -2/+2.</Data></Cell>
<Cell ss:Index="9" ss:StyleID="s62"><Data ss:Type="String">-2/+2の修整を受けるクリーチャーを選択。</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">-2/+2을 받을 생물 한 개를 고르십시오.</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">Выберите существо, которое получит -2/+2.</Data></Cell>
<Cell ss:StyleID="s62"><Data ss:Type="String">Escolha uma criatura para receber -2/+2.</Data></Cell>
</Row>
- Attachments
-
- morph_test10.zip
- OUTDATED!
- (315.22 KiB) Downloaded 289 times
Last edited by gorem2k on 10 Sep 2014, 16:39, edited 1 time in total.
Re: Morph tests
by gorem2k » 01 Sep 2014, 01:51
Hey guys, i'm done for tests now. I'm looking for your feedback on this approximation. it's getting somewhere I think.. I can't see any good way to do morph but at least, it's a start. I flickered a facedown creature and it returned faceup, but i don't know if it should trigger when this happen.. it's an odd mechanic to work with.
Re: Morph tests
by NeoAnderson » 01 Sep 2014, 02:43
As i remember i made some test on morph long time ago, but i was crashing on the DOTP Engine who handles the TurnFaceDown(), TurnFaceUp() functions in a weird way. The card always turns face up into the stack, and other and other bugs...probably your approach is similar with the Firemind's approach to Transform.
- NeoAnderson
- Posts: 914
- Joined: 10 Sep 2013, 07:49
- Has thanked: 18 times
- Been thanked: 139 times
Re: Morph tests
by Kithkin » 01 Sep 2014, 09:10
Here is an article you might be interested in. Among other things, it deals with MORPH.
http://magic.wizards.com/en/articles/ar ... ans-tarkir
http://magic.wizards.com/en/articles/ar ... ans-tarkir
-
Kithkin - Posts: 456
- Joined: 21 Feb 2014, 07:12
- Location: Cologne, GERMANY
- Has thanked: 11 times
- Been thanked: 56 times
Re: Morph tests
by gorem2k » 01 Sep 2014, 12:13
Nice! I just don't really know if it's worth optimizing. At least it keeps me busy before I start my new daytime job.
Yes I read that article. I know some upcoming cards will use morph. Not that they look awesome for their cost but still, we might be surprised!
As for tfm transform, it's well-structured and I didn't completely analyze how it work so I don't know if it's similar in a way. there's a solid reason why he gave up on morph but I don't know exactly all the details (it's been a while). There may have some messages I didn't saw in forum which explain further, I just didn't catch all of them. It's growing fast.
Yes I read that article. I know some upcoming cards will use morph. Not that they look awesome for their cost but still, we might be surprised!
As for tfm transform, it's well-structured and I didn't completely analyze how it work so I don't know if it's similar in a way. there's a solid reason why he gave up on morph but I don't know exactly all the details (it's been a while). There may have some messages I didn't saw in forum which explain further, I just didn't catch all of them. It's growing fast.
Re: Morph tests
by NeoAnderson » 08 Sep 2014, 19:33
I am working on this project too, i have made my own version but i still have to resolve some issues, i will post here later an alpha version just to share for tests, it still need to be adjusted, so it can be more compliant to all the MTG rules.gorem2k wrote:Nice! I just don't really know if it's worth optimizing. At least it keeps me busy before I start my new daytime job.
Yes I read that article. I know some upcoming cards will use morph. Not that they look awesome for their cost but still, we might be surprised!
As for tfm transform, it's well-structured and I didn't completely analyze how it work so I don't know if it's similar in a way. there's a solid reason why he gave up on morph but I don't know exactly all the details (it's been a while). There may have some messages I didn't saw in forum which explain further, I just didn't catch all of them. It's growing fast.
- NeoAnderson
- Posts: 914
- Joined: 10 Sep 2013, 07:49
- Has thanked: 18 times
- Been thanked: 139 times
Re: Morph tests
by gorem2k » 08 Sep 2014, 20:07
Good luck! I gave up because
A: I couldn't figure out a granted ability. (0: view card face-up)
and
B: Not much people seemed interested into this.
I look forward to your take on it tho. Cheers
A: I couldn't figure out a granted ability. (0: view card face-up)
and
B: Not much people seemed interested into this.
I look forward to your take on it tho. Cheers
Re: Morph tests
by NeoAnderson » 08 Sep 2014, 20:21
I am sorry if it seemed if i was not interested, but i was focus onto other abilities overload and strive.gorem2k wrote:Good luck! I gave up because
A: I couldn't figure out a granted ability. (0: view card face-up)
and
B: Not much people seemed interested into this.
I look forward to your take on it tho. Cheers
We could cooperate to make an acceptable approximation.
My version now is still to modify but i have already a workaround, to view the infos about facedown card.
I am not at pc right now i will post here later.
- NeoAnderson
- Posts: 914
- Joined: 10 Sep 2013, 07:49
- Has thanked: 18 times
- Been thanked: 139 times
Re: Morph tests
by NeoAnderson » 09 Sep 2014, 01:41
Ok my friend i am comeback with an alpha version that still need to be improved.
As your version i also used an activated ability and also a token to make my 2/2 creature.
Some differences from your version are :
1. You are not casting the spell, just moving into stack so this not fire the Spell Played trigger.
2. You turn the card into 2/2 creature already onto stack, i made it in hand then i cast it complian to MTG rules.
3. My version has the Creature Type already embended into token.
4. I have included some checks when the spell is destroyed, exiled, returnet to hand, countered, because during all these situations it must be turned face up.
5. The Morph ability (HAND ABILITY) is dinamically granted when you can pay for it.
6. Added a box with card info to show to the player which card is turned face down (Useful also because uses the same language of the game settings, so each player will retrieve the info using his language).
7. I used the official token for facedown cards.
The card i have used for test is : Aphetto Alchemist
You can check my card downloading it here i embed :
1. WAD just to test the card (including all needed files)
2. Source files XML, TDX, TXT.
PICTURE 1. MORPH ABILITY
PICTURE 2. INFOBOX ABILITY TO VIEW HIDDEN CARD INFO
PICTURE 3. INFOBOX
As your version i also used an activated ability and also a token to make my 2/2 creature.
Some differences from your version are :
1. You are not casting the spell, just moving into stack so this not fire the Spell Played trigger.
2. You turn the card into 2/2 creature already onto stack, i made it in hand then i cast it complian to MTG rules.
3. My version has the Creature Type already embended into token.
4. I have included some checks when the spell is destroyed, exiled, returnet to hand, countered, because during all these situations it must be turned face up.
5. The Morph ability (HAND ABILITY) is dinamically granted when you can pay for it.
6. Added a box with card info to show to the player which card is turned face down (Useful also because uses the same language of the game settings, so each player will retrieve the info using his language).
7. I used the official token for facedown cards.
The card i have used for test is : Aphetto Alchemist
You can check my card downloading it here i embed :
1. WAD just to test the card (including all needed files)
2. Source files XML, TDX, TXT.
PICTURE 1. MORPH ABILITY
PICTURE 2. INFOBOX ABILITY TO VIEW HIDDEN CARD INFO
PICTURE 3. INFOBOX
- Attachments
-
- MORPH TEST.rar
- Morph Alpha test NEO_GOR ver 0.1
- (434.78 KiB) Downloaded 309 times
- NeoAnderson
- Posts: 914
- Joined: 10 Sep 2013, 07:49
- Has thanked: 18 times
- Been thanked: 139 times
Re: Morph tests
by Kithkin » 09 Sep 2014, 06:26
I will do some tests later today.
In KHANS OF TARKIR there is an interesting new card. Maybe you want to test your skills on it?
In KHANS OF TARKIR there is an interesting new card. Maybe you want to test your skills on it?
-
Kithkin - Posts: 456
- Joined: 21 Feb 2014, 07:12
- Location: Cologne, GERMANY
- Has thanked: 11 times
- Been thanked: 56 times
Re: Morph tests
by thefiremind » 09 Sep 2014, 08:42
A problem I can see from the screenshots is that anyone can see the morph cost, and that is a hint about what the card could be. I would suggest to write only "Metamorphosis" on the ability text, and put the cost inside the hidden info.
Also, according to this picture:
Also, according to this picture:
- Original morph overlay card | Open
< 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: 721 times
Re: Morph tests
by NeoAnderson » 09 Sep 2014, 10:33
This card is not so much complex, the problem right now is to have a good mechanic about morph, this phoenix has just a 2 triggered abilities that execute some effects. If we found the solutions for the mentioned issues it will be easy to implement. So now i am focused to find a good implementation of the Morph ability then we will code everything we want.Kithkin wrote:I will do some tests later today.
In KHANS OF TARKIR there is an interesting new card. Maybe you want to test your skills on it?
- | Open
Both suggestions are smart! As always, and surely i will modify the card according with them, but it's early to have a 100% compliant Morph, there are still some issues using this implementation, i still have to make hard tests to understand if could be improved, or if we have to change a little bit how it is realized.thefiremind wrote:A problem I can see from the screenshots is that anyone can see the morph cost, and that is a hint about what the card could be. I would suggest to write only "Metamorphosis" on the ability text, and put the cost inside the hidden info.
Also, according to this picture:the art on the overlay card is by Raymond Swanland, you can write that instead of PLACEHOLDER.
- Original morph overlay card | Open
I report some issues I already found so someone like you and gorem and Riiak can give suggestion to resolve.
Know issues until now :
- 1. I haven't found any function who really check if you can cast or not a spell, "CanCastSpellForFree" - "CanCastSpellUsingResourceCost" - "CanBePlayed", no-one really return the right condition. Example we have in play Ethersworn Canonist and we already cast a spell this turn, we are still able to cast the facedown card.
- 2. The cost reduction of morph( Hand Ability ), is reduced considering the status of the face-up card (in this case Blue-Spell creature), this is not right according to the rules the face-down spell cost should be reduced only for generic spell, facedown spell, and creature spell.
- 3. If a card give the ability to play a card from other zone (Normal play frome exile, graveyard, top of library, paying it's costs) we are not able to cast face-sown spell. This is the same issue i found with OverLoad cards, and could be a minor issue because there are really few cards who grant this ability, most of them grant the ability to cast without paying mana cost and in this case the face-up cast is the only possibility according with the MTG rules. Card to tests the mentioned issue are for example : Nightveil Specter
- 4. As i wrote the code i am not sure what happen when a card make a copy of the card when it is face-down onto stack, i have to make some tests, because i have the token to auto-eliminate itself before it comes onto battlefield if the source zone is not the hand, so if 2 + 2 = 4, i think if we make a copy of the face-down card it will be canceled while is onto stack(Still to verify).
UPDATE: I made some changes according with Firemind suggestions:
1. I combined the View info ability with morph to original card ability. I removed the cost from morph to original ability, now it is payed while you show the info, using EffectController():CanPayManaCost("{U}"). I think could be more clean doing in this way.
2. I also add the artist name to the morph facedown token.
3. I also removed the FireTrigger "Turned_Face_Up" when the card is countered, destroyed, exiled...according to MTG rules : Morph triggers occur when you use the Morph ability to turn the card face up, or when an effect turns it face up. It will not trigger on being revealed or on leaving play
Update token :
Update morph ability / info box :
- Attachments
-
- MORPH TEST.rar
- Morph Alpha test NEO_GOR ver 0.2
- (434.97 KiB) Downloaded 296 times
- NeoAnderson
- Posts: 914
- Joined: 10 Sep 2013, 07:49
- Has thanked: 18 times
- Been thanked: 139 times
Re: Morph tests
by NeoAnderson » 09 Sep 2014, 17:23
I am just working on a different version, i almost finished i still have to make some additional tests but until now i can say:
It is compliant and working with the follow cards (who doesn't work with the other version) :
It is compliant and working with the follow cards (who doesn't work with the other version) :
- MORPH Test VERSION Theta 1
(Cost modification)
Sphere of Resistance - OK
Sapphire Medallion - OK
Heartless Summoning - OK
Animar, Soul of Elements ok
(Can't cast spell)
Iona, Shield of Emeria - OK FORCED!!!
Ethersworn Canonist - OK
(Cast for free)
Omniscience - OK
(Can Play from other zone)
Nightveil Specter - ok
Garruk’s Horde - ok
(CASCADE compatibility)
Bloodbraid Elf - OK
(COPY SPELL EFFECTS)
Dual Nature - OK
Kiki-Jiki, Mirror Breaker - OK
Shapesharer - OK
- NeoAnderson
- Posts: 914
- Joined: 10 Sep 2013, 07:49
- Has thanked: 18 times
- Been thanked: 139 times
Who is online
Users browsing this forum: No registered users and 9 guests