Board index
Programs with AI or Rules Enforcement
Magic: The Gathering - Duels of the Planeswalkers
New MTG Cards and Decks
2013
Programs with AI or Rules Enforcement
Magic: The Gathering - Duels of the Planeswalkers
New MTG Cards and Decks
2013
Help with coding Footsteps of the Goryo and a question
Moderators: Xander9009, CCGHQ Admins
Help with coding Footsteps of the Goryo and a question
by spakattack » 06 May 2013, 18:24
I been trying to code Footsteps of the Goryo and have run into some problems. The flavor text seems to be too long and will not show up in the game with the 2 effects. Secondly, the "Sacrifice that creature at the beginning of the next end step." doesn't work at all. I used code from Zombify and Ball Lightning. I assume it's not working because ball lightning's effect is a creature effect. Are there any cards that I can copy paste the "Sacrifice that creature at the beginning of the next end step." effect, and is there a limit on how many characters can be used in a flavor text/whole card itself?
The other problem I'm having is I would like to have multiple alternate art for a Legendary creature I'm making. I have been able to do this, however the legendary clause is not working because the <MULTIVERSEID value=, <FILENAME text=, and actual file name, are all different on each xml. Which have to be the same in order to have multiple art for the same card, and still have the legendary rule work.
The other problem I'm having is I would like to have multiple alternate art for a Legendary creature I'm making. I have been able to do this, however the legendary clause is not working because the <MULTIVERSEID value=, <FILENAME text=, and actual file name, are all different on each xml. Which have to be the same in order to have multiple art for the same card, and still have the legendary rule work.
- spakattack
- Posts: 32
- Joined: 30 Apr 2013, 21:45
- Has thanked: 9 times
- Been thanked: 2 times
Re: Help with coding Footsteps of the Goryo and a question
by sumomole » 06 May 2013, 19:59
You can request any card in here.spakattack wrote:I been trying to code Footsteps of the Goryo and have run into some problems.
- Code: Select all
<SPELL_ABILITY filter_zone="ZONE_IN_PLAY">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Return target creature card from your graveyard to the battlefield. Sacrifice that creature at the beginning of the next end step.]]></LOCALISED_TEXT>
<TARGET_DEFINITION id="0">
local filter = Object():GetFilter()
filter:Clear()
filter:AddCardType( CARD_TYPE_CREATURE )
filter:SetPlayer( EffectController() )
filter:SetZone( ZONE_GRAVEYARD )
filter:SetHint( HINT_ALLIED, EffectController() )
</TARGET_DEFINITION>
<TARGET_DETERMINATION>
return AtLeastOneTargetFromDefinition(0)
</TARGET_DETERMINATION>
<PLAY_TIME_ACTION target_choosing="1">
EffectController():ChooseTarget( 0, "CARD_QUERY_CHOOSE_CREATURE_TO_PUT_ONTO_BATTLEFIELD", EffectDC():Make_Targets(0) )
</PLAY_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
if target ~= nil then
local delayDC = EffectDC():Make_Chest(1)
delayDC:Set_CardPtr(1, target)
MTG():CreateDelayedTrigger(1, delayDC)
target:PutIntoPlay( EffectController() )
end
</RESOLUTION_TIME_ACTION>
</SPELL_ABILITY>
<TRIGGERED_ABILITY resource_id="1">
<TRIGGER value="BEGINNING_OF_STEP" simple_qualifier="controller">
return ( MTG():GetStep() == STEP_END_OF_TURN )
</TRIGGER>
<CLEANUP fire_once="1" />
<RESOLUTION_TIME_ACTION>
local creature = EffectDC():Get_CardPtr(1)
if creature ~= nil then
creature:Sacrifice(EffectController())
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
-

sumomole - Programmer
- Posts: 611
- Joined: 07 Jun 2011, 08:34
- Has thanked: 51 times
- Been thanked: 233 times
Re: Help with coding Footsteps of the Goryo and a question
by spakattack » 06 May 2013, 20:38
Thanks for the code. Well I really didn't want to bother anyone with it, I wanted to try to do it myself, even though i really have no idea what I'm doing. I felt that I asked for too many cards to be coded lately, even though only 2 or 3, I just don't want to give the impression that I'm using anyone.You can request any card in here.
Do you know anything about using more than one ARTID with separate xmls with a legendary creature(or any card), but still counts as the same card?
- spakattack
- Posts: 32
- Joined: 30 Apr 2013, 21:45
- Has thanked: 9 times
- Been thanked: 2 times
Re: Help with coding Footsteps of the Goryo and a question
by thefiremind » 06 May 2013, 22:37
Shouldn't the Footsteps of the Goryo code also need a
If I didn't make any mistake in the code, putting this ability on just one of the versions of the legendary card should be enough (STATE_BASED_EFFECTS triggers should be used as less as possible because they basically trigger after anything that happens during the duel).
Too bad we can't exploit this engine bug to code Brothers Yamazaki... it would work as long as the 2 different versions are in play, but if only 1 is in play and it gets cloned, it would fail.
- Code: Select all
delayDC:Protect_CardPtr(1)
sumomole was exactly the one who discovered this problem for first: the DotP engine applies the legendary rule on the IDs rather than on the card names. You could add a special trigger that applies the legendary rule correctly:spakattack wrote:Do you know anything about using more than one ARTID with separate xmls with a legendary creature(or any card), but still counts as the same card?
- Code: Select all
<TRIGGERED_ABILITY internal="1">
<TRIGGER value="STATE_BASED_EFFECTS" />
<RESOLUTION_TIME_ACTION>
local filter = Object():GetFilter()
filter:Clear()
filter:SetZone( ZONE_IN_PLAY )
filter:AddCardName( Object():GetCardName() )
filter:AddSupertype( SUPERTYPE_LEGENDARY )
local filter_count = filter:EvaluateObjects()
if filter_count > 1 then
for i=0,filter_count-1 do
local legend = filter:GetNthEvaluatedObject(i)
if legend ~= nil then
legend:PutInGraveyard()
end
end
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
If I didn't make any mistake in the code, putting this ability on just one of the versions of the legendary card should be enough (STATE_BASED_EFFECTS triggers should be used as less as possible because they basically trigger after anything that happens during the duel).
Too bad we can't exploit this engine bug to code Brothers Yamazaki... it would work as long as the 2 different versions are in play, but if only 1 is in play and it gets cloned, it would fail.
< 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: 719 times
Re: Help with coding Footsteps of the Goryo and a question
by spakattack » 06 May 2013, 23:38
Thank you so much Firemind and Sumomole, i haven't tested this out yet, but o man it's gonna be awesome if it works. You guys are gonna love this deck I'm making. It's gonna be pretty sick, I can't wait to finish testing for bugs, that's all I can say for right now. Thanks for your help.thefiremind wrote: sumomole was exactly the one who discovered this problem for first: the DotP engine applies the legendary rule on the IDs rather than on the card names. You could add a special trigger that applies the legendary rule correctly:
EDIT: I can't get the legendary code to work in game (when the same named alternate art Legendary Creature with different <MULTIVERSEID, <ARTID, <FILENAME text=(not the name of the card was changed just the number), and the xmls file number (not the name of the card just the number). enters the battlefield nothing happens), am I opposed to put it at the beginning right after the toughness line, or should I put it at the end before SFX text? I have tried putting it as the end before SFX text on just 1 card, then on all 4 cards and it won't work. I'm going to try putting it at the beginning now on one card, then on all 4 and see if it works.
- spakattack
- Posts: 32
- Joined: 30 Apr 2013, 21:45
- Has thanked: 9 times
- Been thanked: 2 times
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 3 guests
