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)



Promise of Bunrei
User-made mods in DLC (Downloadable Content) form.
Get MTG cards here for your DotP that aren't available anywhere else!
Get MTG cards here for your DotP that aren't available anywhere else!
Moderator: CCGHQ Admins
Promise of Bunrei
by Takhen » 18 Mar 2013, 17:40
Today, after a certain time of suspension, I tried again to make a card
There must be some other utility or information or way, because I failed again (after some hours of changing text)...
Anyway, this is my current code (the piece will change), if someone can take a look ...
There must be some other utility or information or way, because I failed again (after some hours of changing text)...
Anyway, this is my current code (the piece will change), if someone can take a look ...
- Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2>
<FILENAME text="PROMISE_OF_BUNREI_84376" />
<CARDNAME text="PROMISE_OF_BUNREI" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Promise of Bunrei]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Promesse du bunrei]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Promesa de bunrei]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Bunreis Versprechungen]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Promessa di Bunrei]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[分霊の確約]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Promise of Bunrei]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Promise of Bunrei]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Promessa de Bunrei]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="84376" />
<ARTID value="PROMISE_OF_BUNREI_84376" />
<ARTIST name="Stephen Tappin" />
<CASTING_COST cost="{2}{W}" />
<FLAVOURTEXT>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[“I am not afraid to die today nor afraid of what death will bring.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[« Je ne crains pas la mort, ni ce que la mort apporte. »]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[“No tengo miedo de morir hoy, ni de lo que la muerte traerá.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[„Ich habe keine Angst davor, heute zu sterben, und auch keine Angst vor dem, was der Tod bringen wird.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[“Non ho paura di morire oggi, né temo ciò che la morte porterà.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[今日死すことも恐れず、死が何をもたらすかも恐れぬ。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[“I am not afraid to die today nor afraid of what death will bring.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[“I am not afraid to die today nor afraid of what death will bring.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[“Não tenho medo de morrer hoje nem do que a morte vai trazer.”]]></LOCALISED_TEXT>
</FLAVOURTEXT>
<TYPE metaname="Enchantment" />
<EXPANSION value="SOK" />
<RARITY metaname="R" />
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[When a creature you control dies, sacrifice Promise of Bunrei. If you do, put four 1/1 colorless Spirit creature tokens onto the battlefield.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[À chaque fois qu’une créature que vous contrôlez est mise dans un cimetière depuis le jeu, sacrifiez la Promesse du bunrei. Si vous faites ainsi, mettez en jeu quatre jetons de créature 1/1 incolore Esprit.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Siempre que una criatura que controles vaya a un cementerio desde el juego, sacrifica la Promesa de bunrei. Si lo haces, pon en juego cuatro fichas de criatura Espíritu incolora 1/1.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Immer wenn eine Kreatur, die du kontrollierst, aus dem Spiel auf einen Friedhof gelegt wird, opfere Bunreis Versprechungen. Falls du dies tust, bringe vier 1/1 farblose Geist-Spielsteine ins Spiel.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Quando una creatura che controlli viene messa in un cimitero dal campo di battaglia, sacrifica la Promessa di Bunrei. Se lo fai, metti sul campo di battaglia quattro pedine creatura Spirito 1/1 incolori.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[あなたがコントロールするいずれかのクリーチャーが場からいずれかの墓地に置かれたとき、分霊の確約を生け贄に捧げる。 そうした場合、無色の1/1のスピリット・クリーチャー・トークンを4体場に出す。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[When a creature you control dies, sacrifice Promise of Bunrei. If you do, put four 1/1 colorless Spirit creature tokens onto the battlefield.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[When a creature you control dies, sacrifice Promise of Bunrei. If you do, put four 1/1 colorless Spirit creature tokens onto the battlefield.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Toda vez que uma criatura que você controla for colocada num cemitério vinda de jogo, sacrifique Promessa de Bunrei. Se o fizer, coloque em jogo quatros fichas de criatura incolor 1/1 do tipo Espírito.]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_BEGIN" to_zone="ZONE_GRAVEYARD" from_zone="ZONE_IN_PLAY" simple_qualifier="objectyoucontrol">
if Object():GetParent() ~= nil then
return TriggerObject():GetCardType():Test( CARD_TYPE_CREATURE ) ~= 0
end
</TRIGGER>
<RESOLUTION_TIME_ACTION>
<COST type="SacrificeSelf" />
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local token_count = 4
if token_count > 0 then
MTG():PutTokensIntoPlay( "TOKEN_SPIRIT_1_1_F_277469", token_count, EffectController() )
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TOKEN_REGISTRATION reservation="1" type="TOKEN_SPIRIT_1_1_F_277469" />
</CARD_V2>
-
Takhen - Posts: 235
- Joined: 04 Feb 2013, 19:35
- Has thanked: 0 time
- Been thanked: 0 time
Re: Promise of Bunrei
by thefiremind » 18 Mar 2013, 19:13
Triggered abilities can't have a COST block unless it is a conditional cost. And COST blocks shouldn't be inside RESOLUTION_TIME_ACTION (where in the world have you seen that?
).
There's a check for Object():GetParent() in the trigger condition, but who's the parent here? This isn't an Aura nor an Equipment.
EDIT: Removed my code because I read the card wrong.

There's a check for Object():GetParent() in the trigger condition, but who's the parent here? This isn't an Aura nor an Equipment.
EDIT: Removed my code because I read the card wrong.
Last edited by thefiremind on 18 Mar 2013, 19:33, edited 1 time 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: Promise of Bunrei
by Takhen » 18 Mar 2013, 19:22
I tried Triggered, Activated, Triggered+Activated...
And used and Equipment trying to keep only the sence "Whenever a creature dies" and add that the creature must be mine
Thank you for the code
Maybe you have some advices after seen how I work? Since now I successully made only very simple cards as Lignify...
And used and Equipment trying to keep only the sence "Whenever a creature dies" and add that the creature must be mine
Thank you for the code
Maybe you have some advices after seen how I work? Since now I successully made only very simple cards as Lignify...
Last edited by Takhen on 18 Mar 2013, 19:25, edited 1 time in total.
-
Takhen - Posts: 235
- Joined: 04 Feb 2013, 19:35
- Has thanked: 0 time
- Been thanked: 0 time
Re: Promise of Bunrei
by RiiakShiNal » 18 Mar 2013, 19:25
There are a few problems:
Other than that the rest of the card looks to be done correctly, putting tokens into play looks fine, the check to see if the TriggerObject is a creature looks right, the token reservation looks right, tags look like they are all matched.
Cleaned up code:
Edit: It should also be noted that for Promise of Bunrei sacrificing the card is not optional it MUST be done.
- In the TRIGGER you have "if Object():GetParent() ~= nil then", but since this card is not an aura it will never have a parent so GetParent() will always equal nil.
- In the TRIGGER you should always return something, in yours you only return something if a condition is met, but even if the condition isn't met you should still have a return (even if it is just "return false").
- In the first RESOLUTION_TIME_ACTION, you declare a cost which you can't do. Inside of *_ACTION tags must be LUA code.
Other than that the rest of the card looks to be done correctly, putting tokens into play looks fine, the check to see if the TriggerObject is a creature looks right, the token reservation looks right, tags look like they are all matched.
Cleaned up code:
- Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2>
<FILENAME text="PROMISE_OF_BUNREI_84376" />
<CARDNAME text="PROMISE_OF_BUNREI" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Promise of Bunrei]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Promesse du bunrei]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Promesa de bunrei]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Bunreis Versprechungen]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Promessa di Bunrei]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[分霊の確約]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Promise of Bunrei]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Promise of Bunrei]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Promessa de Bunrei]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="84376" />
<ARTID value="PROMISE_OF_BUNREI_84376" />
<ARTIST name="Stephen Tappin" />
<CASTING_COST cost="{2}{W}" />
<FLAVOURTEXT>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[“I am not afraid to die today nor afraid of what death will bring.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[« Je ne crains pas la mort, ni ce que la mort apporte. »]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[“No tengo miedo de morir hoy, ni de lo que la muerte traerá.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[„Ich habe keine Angst davor, heute zu sterben, und auch keine Angst vor dem, was der Tod bringen wird.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[“Non ho paura di morire oggi, né temo ciò che la morte porterà.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[今日死すことも恐れず、死が何をもたらすかも恐れぬ。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[“I am not afraid to die today nor afraid of what death will bring.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[“I am not afraid to die today nor afraid of what death will bring.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[“Não tenho medo de morrer hoje nem do que a morte vai trazer.”]]></LOCALISED_TEXT>
</FLAVOURTEXT>
<TYPE metaname="Enchantment" />
<EXPANSION value="SOK" />
<RARITY metaname="R" />
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[When a creature you control dies, sacrifice Promise of Bunrei. If you do, put four 1/1 colorless Spirit creature tokens onto the battlefield.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[À chaque fois qu’une créature que vous contrôlez est mise dans un cimetière depuis le jeu, sacrifiez la Promesse du bunrei. Si vous faites ainsi, mettez en jeu quatre jetons de créature 1/1 incolore Esprit.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Siempre que una criatura que controles vaya a un cementerio desde el juego, sacrifica la Promesa de bunrei. Si lo haces, pon en juego cuatro fichas de criatura Espíritu incolora 1/1.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Immer wenn eine Kreatur, die du kontrollierst, aus dem Spiel auf einen Friedhof gelegt wird, opfere Bunreis Versprechungen. Falls du dies tust, bringe vier 1/1 farblose Geist-Spielsteine ins Spiel.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Quando una creatura che controlli viene messa in un cimitero dal campo di battaglia, sacrifica la Promessa di Bunrei. Se lo fai, metti sul campo di battaglia quattro pedine creatura Spirito 1/1 incolori.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[あなたがコントロールするいずれかのクリーチャーが場からいずれかの墓地に置かれたとき、分霊の確約を生け贄に捧げる。 そうした場合、無色の1/1のスピリット・クリーチャー・トークンを4体場に出す。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[When a creature you control dies, sacrifice Promise of Bunrei. If you do, put four 1/1 colorless Spirit creature tokens onto the battlefield.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[When a creature you control dies, sacrifice Promise of Bunrei. If you do, put four 1/1 colorless Spirit creature tokens onto the battlefield.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Toda vez que uma criatura que você controla for colocada num cemitério vinda de jogo, sacrifique Promessa de Bunrei. Se o fizer, coloque em jogo quatros fichas de criatura incolor 1/1 do tipo Espírito.]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_BEGIN" to_zone="ZONE_GRAVEYARD" from_zone="ZONE_IN_PLAY" simple_qualifier="objectyoucontrol">
return TriggerObject() ~= nil and TriggerObject():GetCardType():Test( CARD_TYPE_CREATURE ) ~= 0
</TRIGGER>
<RESOLUTION_TIME_ACTION>
if (EffectSource() ~= nil) then
EffectSource():Sacrifice(EffectController())
local token_count = 4
if token_count > 0 then
MTG():PutTokensIntoPlay( "TOKEN_SPIRIT_1_1_F_277469", token_count, EffectController() )
end
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TOKEN_REGISTRATION reservation="1" type="TOKEN_SPIRIT_1_1_F_277469" />
</CARD_V2>
Edit: It should also be noted that for Promise of Bunrei sacrificing the card is not optional it MUST be done.
Just getting started: Xander9009's DotP 2014 Community Wad
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
- RiiakShiNal
- Programmer
- Posts: 2188
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 497 times
Re: Promise of Bunrei
by thefiremind » 18 Mar 2013, 19:32
I read the card wrong...RiiakShiNal wrote:Edit: It should also be noted that for Promise of Bunrei sacrificing the card is not optional it MUST be done.

< 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: Promise of Bunrei
by Takhen » 18 Mar 2013, 20:01
Thank you too for the code
For example the Parent, it seems easy to understand: now I could think that you said "It isn't Aura or Equipment" because the Parent could be the creature enchanted or equipped
But before you said reading "Parent" meant nothing to me, maybe if I was english it was more intuitive, but I read Parent as "link" so I could think everything, also a link with some function or else...
And I'm forced to ignore some functions in the game, or I should have your programming knowledge before to try and it is too far
Maybe some other information like those, more about the game that the lua language, could be studied by me in some way?
These are things that do an excellent example of that kind of knowledge I miss...RiiakShiNal wrote:
- In the TRIGGER you have "if Object():GetParent() ~= nil then", but since this card is not an aura it will never have a parent so GetParent() will always equal nil.
- In the TRIGGER you should always return something, in yours you only return something if a condition is met, but even if the condition isn't met you should still have a return (even if it is just "return false").
- In the first RESOLUTION_TIME_ACTION, you declare a cost which you can't do. Inside of *_ACTION tags must be LUA code.
For example the Parent, it seems easy to understand: now I could think that you said "It isn't Aura or Equipment" because the Parent could be the creature enchanted or equipped
But before you said reading "Parent" meant nothing to me, maybe if I was english it was more intuitive, but I read Parent as "link" so I could think everything, also a link with some function or else...
And I'm forced to ignore some functions in the game, or I should have your programming knowledge before to try and it is too far
Maybe some other information like those, more about the game that the lua language, could be studied by me in some way?
I also thought that the "If you do" meant that it was optional...thefiremind wrote:I read the card wrong...RiiakShiNal wrote:Edit: It should also be noted that for Promise of Bunrei sacrificing the card is not optional it MUST be done.forget about my code.
-
Takhen - Posts: 235
- Joined: 04 Feb 2013, 19:35
- Has thanked: 0 time
- Been thanked: 0 time
Re: Promise of Bunrei
by RiiakShiNal » 18 Mar 2013, 21:22
It is easy to misread, but:Takhen wrote:I also thought that the "If you do" meant that it was optional...
This sentence says that you must sacrifice it any time a creature you control dies. It has no words in it that allow for you to choose not to.Whenever a creature you control is put into a graveyard from play, sacrifice Promise of Bunrei.
The "If you do" here is to prevent you from getting tokens if you have something out that prevents you from sacrificing cards. So you can't do something like get infinite tokens by having something that prevents you from sacrificing enchantments then say every time you get a spirit you sacrifice it to something to pump a creature (Bloodflow Connoisseur, Vampire Aristocrat) or as an upkeep (Lord of the Pit, Ebon Praetor). So you can't sacrifice 1 and get 4 infinitely. This is of course the check that is missing from my code because it would need to be tested to make sure it actually works.If you do, put four 1/1 colorless Spirit creature tokens into play.
Just getting started: Xander9009's DotP 2014 Community Wad
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
- RiiakShiNal
- Programmer
- Posts: 2188
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 497 times
7 posts
• Page 1 of 1
Return to New MTG Cards and Decks (2010, 2012, 2013, 2014, 2015, Magic Duels)
Who is online
Users browsing this forum: No registered users and 1 guest