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) 2012
06/02/12 DOTP2012 Starting my custom pack
Moderator: CCGHQ Admins
Re: 06/02/12 DOTP2012 Starting my custom pack
by thefiremind » 20 Apr 2012, 12:05
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.
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.
< 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: 06/02/12 DOTP2012 Starting my custom pack
by sadlyblue » 20 Apr 2012, 17:32
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.
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
by Aborash » 20 Apr 2012, 18:33
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.
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
by thefiremind » 20 Apr 2012, 18:36
If something is an Enchantment and some other card type at the same time, the game crashes. So it's impossible to code.Aborash wrote:In the enchantress deck, I really miss Opalescence, but I guess, its really difficult 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.
< 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: 06/02/12 DOTP2012 Starting my custom pack
by thefiremind » 20 Apr 2012, 20:45
I made it!
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.
- 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 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.
< 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: 06/02/12 DOTP2012 Starting my custom pack
by Aborash » 21 Apr 2012, 05:57
thefiremind wrote:I made it!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.
- 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 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
by sadlyblue » 21 Apr 2012, 08:32
Thanks thefiremind.
I almost gave up...
I almost gave up...
Re: 06/02/12 DOTP2012 Starting my custom pack
by sadlyblue » 21 Apr 2012, 09:26
Evershrike is flawed, also, in the release.
I already have a working version and will update asap.
I already have a working version and will update asap.
Re: 06/02/12 DOTP2012 Starting my custom pack
by ivecchie » 22 Apr 2012, 11:07
Why when i click on a dual land the game crashes?
And why some cards haven't the text?
Please help me
And why some cards haven't the text?
Please help me
- ivecchie
- Posts: 7
- Joined: 25 Sep 2011, 08:38
- Has thanked: 0 time
- Been thanked: 0 time
Re: 06/02/12 DOTP2012 Starting my custom pack
by daenon611 » 22 Apr 2012, 11:19
@ivecchie
Play the game in english, then it should work ...
Copy this in a batch-file (.bat) and execute
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
-
daenon611 - Posts: 68
- Joined: 04 Sep 2011, 15:19
- Location: Germany
- Has thanked: 45 times
- Been thanked: 4 times
Re: 06/02/12 DOTP2012 Starting my custom pack
by SimoSama » 07 May 2012, 20:48
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
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
- SimoSama
- Posts: 2
- Joined: 07 May 2012, 20:42
- Has thanked: 0 time
- Been thanked: 0 time
Re: 06/02/12 DOTP2012 Starting my custom pack
by Lumitosh » 09 Sep 2012, 18:42
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.
Somebody can help me please ?
Thank's.
- Lumitosh
- Posts: 3
- Joined: 09 Sep 2012, 13:30
- Has thanked: 0 time
- Been thanked: 0 time
Re: 06/02/12 DOTP2012 Starting my custom pack
by Lumitosh » 10 Sep 2012, 13:44
Thank's a lot, it work greate !
- Lumitosh
- Posts: 3
- Joined: 09 Sep 2012, 13:30
- Has thanked: 0 time
- Been thanked: 0 time
Re: 06/02/12 DOTP2012 Starting my custom pack
by JimbonicTutor » 21 Jul 2018, 01:25
Anyone have a working link for this?
- JimbonicTutor
- Posts: 1
- Joined: 15 Jul 2018, 22:44
- Has thanked: 0 time
- Been thanked: 0 time
60 posts
• Page 4 of 4 • 1, 2, 3, 4
Who is online
Users browsing this forum: No registered users and 1 guest