Page 4 of 4

Re: 06/02/12 DOTP2012 Starting my custom pack

PostPosted: 20 Apr 2012, 12:05
by thefiremind
I gave Nomad Mythmaker another look and noticed 2 things:
1) This can't be the cause of the bug but while you are fixing the card... you should add a filter:NotTargetted() when you choose the creature, because the text says "attached to a creature", not "attached to target creature".
2) Everytime ChooseTargetDC is used in the core files, the filter is repeated inside the PLAY_TIME_ACTION, even if it's already in the TARGET_DETERMINATION. Try to do that: it can't do any harm, and if we are lucky, it could fix the bug. :wink:

Re: 06/02/12 DOTP2012 Starting my custom pack

PostPosted: 20 Apr 2012, 17:32
by sadlyblue
Thanks for the tip.
Your right about the NotTargetted, i will add it.
As for the ChooseTargetDC, i've looked at a lot of coded cards. Sundering Titan has a Resolution_Time for each choice, for example.
One thing i found so far, its the local crea = dc2:Get_NthCardPtr(0) that's returning a nil, but the MTG():EffectDataChest():Get_Targets(1) doesn't return a nil.
I've also tried the Get_CardPtr(0). Same result, and i think they do the same thing.

Re: 06/02/12 DOTP2012 Starting my custom pack

PostPosted: 20 Apr 2012, 18:33
by Aborash
Hey!!

May be I'm becoming blind, cause I totally miss your release.

I couldn't make a deep test yet, but I'm pretty sure, that your decks are the best for being abused.

The Elf Alarm, its pure awesomeness, old school combo deck... So much fun...

The Bane of Emrakul elf ball, its quite similar to the Elf combo I asked to Eglin:

viewtopic.php?p=86061#p86061

But It uses Skullclamp to cycle across the deck, and Grappeshot to finish. Nice.


Infectious is really nice cause its quite different from other beatdown decks.

Tempered Virtue, is really, really fun to play.

And the other auramancer, once you fix the bugs, will be awesome (to be honest its already awesome)

In the enchantress deck, I really miss Opalescence, but I guess, its really difficult to code.


Anyway, good job, hope you keep doing those awesome decks.

Re: 06/02/12 DOTP2012 Starting my custom pack

PostPosted: 20 Apr 2012, 18:36
by thefiremind
Aborash wrote:In the enchantress deck, I really miss Opalescence, but I guess, its really difficult to code.
If something is an Enchantment and some other card type at the same time, the game crashes. So it's impossible to code. :(

By the way, I didn't give up on Nomad Mythmaker. It's unbelievable that it seems all correct but it doesn't work. I'll try to code it by myself without looking at your code, I hope that doing this will make me avoid the error that we cannot see on your code.

Re: 06/02/12 DOTP2012 Starting my custom pack

PostPosted: 20 Apr 2012, 20:45
by thefiremind
I made it!
Code: Select all
  <ACTIVATED_ABILITY zone="any" suppress_fizzle="1">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{W}, {T}: Put target Aura card from a graveyard onto the battlefield under your control attached to a creature you control.]]></LOCALISED_TEXT>
    <COST type="TapSelf" />
    <COST type="mana" cost="{W}" />
    <TARGET_DETERMINATION>
    local filter = Object():GetFilter()
    filter:Clear()
    filter:AddCardType( CARD_TYPE_ENCHANTMENT )
    filter:AddSubType( ENCHANTMENT_TYPE_AURA )
    filter:SetZone( ZONE_GRAVEYARD )
    return TargetNeutralF()
    </TARGET_DETERMINATION>
    <PLAY_TIME_ACTION target_choosing="1">
    local filter = Object():GetFilter()
    filter:Clear()
    filter:AddCardType( CARD_TYPE_ENCHANTMENT )
    filter:AddSubType( ENCHANTMENT_TYPE_AURA )
    filter:SetZone( ZONE_GRAVEYARD )
    filter:SetNeutral()
    Object():GetPlayer():ChooseTargetDC( "CARD_QUERY_CHOOSE_AURA", MTG():EffectDataChest():Make_Targets( 0 ) )
    </PLAY_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    if (MTG():EffectDataChest():Get_Targets( 0 ) ~= nil and MTG():EffectDataChest():Get_Targets( 0 ):Get_CardPtr( 0 ) ~= nil) then
      local filter = Object():GetFilter()
      local player = Object():GetPlayer()
      filter:Clear()
      filter:SetController( player )
      filter:AddCardType( CARD_TYPE_CREATURE )
      filter:SetZone( ZONE_IN_PLAY )
      filter:PlayerHint( player )
      filter:NotTargetted()
      player:ChooseTargetDC( "CARD_QUERY_CHOOSE_CREATURE_TO_ENCHANT", MTG():EffectDataChest():Make_Targets( 1 ) )
    end
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local dc1 = MTG():EffectDataChest():Get_Targets( 0 )
    local dc2 = MTG():EffectDataChest():Get_Targets( 1 )
    if (dc1 ~= nil and dc2 ~= nil) then
      local aura = dc1:Get_CardPtr( 0 )
      local creature = dc2:Get_CardPtr( 0 )
      if (aura ~= nil and creature ~= nil) then
        if (aura:GetZone() == ZONE_GRAVEYARD and creature:GetZone() == ZONE_IN_PLAY) then
          aura:PutIntoPlayAttachedTo( Object():GetController(), creature )
        end
      end
    end
    </RESOLUTION_TIME_ACTION>
    <AI_AVAILABILITY behaviour="InResponseOrDuringCombatOrBeforeMyUntap" />
    <AI_BASE_SCORE score="300" zone="in_play" />
  </ACTIVATED_ABILITY>
I added zone="any" and suppress_fizzle="1", and it started to work. With only zone="any" it didn't work, so suppress_fizzle="1" could be enough.
I also made a couple of improvements to your code:
1) return TargetNeutralF() is better because the AI is free to choose auras in any graveyard.
2) Gatherer says: "You don't choose which creature the Aura will enter the battlefield attached to until the ability resolves", so I put the creature choice in a RESOLUTION_TIME_ACTION.

Re: 06/02/12 DOTP2012 Starting my custom pack

PostPosted: 21 Apr 2012, 05:57
by Aborash
thefiremind wrote:I made it!
Code: Select all
  <ACTIVATED_ABILITY zone="any" suppress_fizzle="1">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{W}, {T}: Put target Aura card from a graveyard onto the battlefield under your control attached to a creature you control.]]></LOCALISED_TEXT>
    <COST type="TapSelf" />
    <COST type="mana" cost="{W}" />
    <TARGET_DETERMINATION>
    local filter = Object():GetFilter()
    filter:Clear()
    filter:AddCardType( CARD_TYPE_ENCHANTMENT )
    filter:AddSubType( ENCHANTMENT_TYPE_AURA )
    filter:SetZone( ZONE_GRAVEYARD )
    return TargetNeutralF()
    </TARGET_DETERMINATION>
    <PLAY_TIME_ACTION target_choosing="1">
    local filter = Object():GetFilter()
    filter:Clear()
    filter:AddCardType( CARD_TYPE_ENCHANTMENT )
    filter:AddSubType( ENCHANTMENT_TYPE_AURA )
    filter:SetZone( ZONE_GRAVEYARD )
    filter:SetNeutral()
    Object():GetPlayer():ChooseTargetDC( "CARD_QUERY_CHOOSE_AURA", MTG():EffectDataChest():Make_Targets( 0 ) )
    </PLAY_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    if (MTG():EffectDataChest():Get_Targets( 0 ) ~= nil and MTG():EffectDataChest():Get_Targets( 0 ):Get_CardPtr( 0 ) ~= nil) then
      local filter = Object():GetFilter()
      local player = Object():GetPlayer()
      filter:Clear()
      filter:SetController( player )
      filter:AddCardType( CARD_TYPE_CREATURE )
      filter:SetZone( ZONE_IN_PLAY )
      filter:PlayerHint( player )
      filter:NotTargetted()
      player:ChooseTargetDC( "CARD_QUERY_CHOOSE_CREATURE_TO_ENCHANT", MTG():EffectDataChest():Make_Targets( 1 ) )
    end
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local dc1 = MTG():EffectDataChest():Get_Targets( 0 )
    local dc2 = MTG():EffectDataChest():Get_Targets( 1 )
    if (dc1 ~= nil and dc2 ~= nil) then
      local aura = dc1:Get_CardPtr( 0 )
      local creature = dc2:Get_CardPtr( 0 )
      if (aura ~= nil and creature ~= nil) then
        if (aura:GetZone() == ZONE_GRAVEYARD and creature:GetZone() == ZONE_IN_PLAY) then
          aura:PutIntoPlayAttachedTo( Object():GetController(), creature )
        end
      end
    end
    </RESOLUTION_TIME_ACTION>
    <AI_AVAILABILITY behaviour="InResponseOrDuringCombatOrBeforeMyUntap" />
    <AI_BASE_SCORE score="300" zone="in_play" />
  </ACTIVATED_ABILITY>
I added zone="any" and suppress_fizzle="1", and it started to work. With only zone="any" it didn't work, so suppress_fizzle="1" could be enough.
I also made a couple of improvements to your code:
1) return TargetNeutralF() is better because the AI is free to choose auras in any graveyard.
2) Gatherer says: "You don't choose which creature the Aura will enter the battlefield attached to until the ability resolves", so I put the creature choice in a RESOLUTION_TIME_ACTION.
ImageImageImageImageImage

Re: 06/02/12 DOTP2012 Starting my custom pack

PostPosted: 21 Apr 2012, 08:32
by sadlyblue
Thanks thefiremind.
I almost gave up...

Re: 06/02/12 DOTP2012 Starting my custom pack

PostPosted: 21 Apr 2012, 09:26
by sadlyblue
Evershrike is flawed, also, in the release.
I already have a working version and will update asap.

Re: 06/02/12 DOTP2012 Starting my custom pack

PostPosted: 22 Apr 2012, 11:07
by ivecchie
Why when i click on a dual land the game crashes?
And why some cards haven't the text?
Please help me

Re: 06/02/12 DOTP2012 Starting my custom pack

PostPosted: 22 Apr 2012, 11:19
by daenon611
@ivecchie

Play the game in english, then it should work ...

Copy this in a batch-file (.bat) and execute

Code: Select all
reg query "HKLM\SOFTWARE\Wow6432Node" /ve
if errorlevel 1 goto x86
reg add "HKLM\SOFTWARE\Wow6432Node\Wizards of the Coast\Magic The Gathering Duels of the Planeswalkers 2012" /f /t REG_DWORD /v Language /d 0
goto end
:x86
reg add "HKLM\SOFTWARE\Wizards of the Coast\Magic The Gathering Duels of the Planeswalkers 2012" /f /t REG_DWORD /v Language /d 0
exit

Re: 06/02/12 DOTP2012 Starting my custom pack

PostPosted: 07 May 2012, 20:48
by SimoSama
first of all thx for this cards and clever decks :)

1- solemn offering from ur prime knight deck is nowhere to be found

2- Pestermite causes the ai to be stuck on "the ai is making choices" thing

thx again,i'll be reporting any bugs i find later

Re: 06/02/12 DOTP2012 Starting my custom pack

PostPosted: 09 Sep 2012, 18:42
by Lumitosh
Hi evry body, I have the same problem than ivecchie but I don't know how to change the language of MTG DOTP 2012.
Somebody can help me please ?

Thank's.

Re: 06/02/12 DOTP2012 Starting my custom pack

PostPosted: 10 Sep 2012, 04:39
by daenon611
Use this ...

Re: 06/02/12 DOTP2012 Starting my custom pack

PostPosted: 10 Sep 2012, 13:44
by Lumitosh
Thank's a lot, it work greate ! :D

Re: 06/02/12 DOTP2012 Starting my custom pack

PostPosted: 21 Jul 2018, 01:25
by JimbonicTutor
Anyone have a working link for this?