It is currently 10 Nov 2025, 08:20
   
Text Size

Formal Request Thread

Moderator: CCGHQ Admins

Re: Formal Request Thread

Postby thefiremind » 06 Jul 2013, 21:44

gorem2k wrote:is </TARGET_DEFINITION> supposed to be in this code? must be </FILTER>, right?
Whoops! #-o Yeah, it must be </FILTER>. I corrected the original post.

infernalsham wrote:Edit: The code works perfectly for dealing damage. :D
Good, I'll see if I can complete the card.
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 722 times

Re: Formal Request Thread

Postby infernalsham » 06 Jul 2013, 21:53

Battalion:

Example (Boros Elite):
Code: Select all
<TRIGGERED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Battalion — Whenever Boros Elite and at least two other creatures attack, Boros Elite gets +2/+2 until end of turn.]]></LOCALISED_TEXT>
   <TRIGGER value="ATTACKING" simple_qualifier="self" />
   <FILTER filter_id="0">
    local filter = ClearFilter()
    filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
    filter:Add( FE_IS_ATTACKING, OP_IS, true )
   filter:Add(FE_CONTROLLER, OP_IS, EffectController() )
   local number = filter:CountStopAt(3)
   </FILTER>
   <CONTINUOUS_ACTION layer="7C">
    if EffectSource() ~= nil then
       EffectSource():GetCurrentCharacteristics():Power_Add( 2 )
       EffectSource():GetCurrentCharacteristics():Toughness_Add( 2 )
    end
   </CONTINUOUS_ACTION>
   <DURATION simple_duration="untilEOT" />
   </TRIGGERED_ABILITY>
thefiremind wrote:
infernalsham wrote:Edit: The code works perfectly for dealing damage. :D
Good, I'll see if I can complete the card.
Awesome. Thanks. :D
Last edited by infernalsham on 06 Jul 2013, 22:11, edited 5 times in total.
Want to speed up the loading of DotP Magic 2014 when you start it?
Go to: "C:\*\Magic 2014\Movies" and delete Alienware, Stainless and WotC .bik files.
infernalsham
 
Posts: 17
Joined: 27 Jun 2013, 15:54
Has thanked: 3 times
Been thanked: 1 time

Re: Formal Request Thread

Postby RiiakShiNal » 06 Jul 2013, 21:54

thefiremind wrote:
Master Necro wrote:" {T} : Add {G} or {B} to your mana pool."
I'll leave the mana problems to other modders. :mrgreen:
I'm actually working on the mana problem and I have a working solution (using mana tokens) that even works for cards like Burning-Tree Shaman, Mana Flare, Exotic Orchard, and Reflecting Pool. The AI seems to have a rudimentary understanding on how to use the manual tapping, but it still prefers the automatic tapping from basic lands and mana abilities.

Unfortunately, due to how the game handles basic lands, I've had to modify all the basic lands to use my code, though they still have the automatic tapping since I can't remove the Basic super-type (the game crashes if the super-type is removed).

I've currently coded (mainly for testing purposes):
  • Burning-Tree Shaman (to make sure I can get the required Activated Ability working with Burning-Tree Shaman's ability (don't want to kill players for manually tapping for mana).
  • Darkslick Shores
  • Dimir Aqueduct
  • Dimir Guildgate
  • Drowned Catacomb
  • Exotic Orchard
  • Mana Flare (Only works for manual tapping due to the game not triggering BECAME_TAPPED_FOR_MANA for basic lands.)
  • Reflecting Pool
  • Tokens for all 5 colours and colourless mana.
  • Modified all 104 basic lands in the base game.
RiiakShiNal
Programmer
 
Posts: 2189
Joined: 16 May 2011, 21:37
Has thanked: 75 times
Been thanked: 497 times

Re: Formal Request Thread

Postby thefiremind » 06 Jul 2013, 22:03

infernalsham wrote:I figured out how to get Battalion working.

When importing a card through thefiremind's generator it has its ability within <STATIC_ABILITY>
and </STATIC_ABILITY>. However, if you change them into <TRIGGERED_ABILITY> and </TRIGGERED_ABILITY> it will work.

Example (Boros Elite):
[...]
My generator has a very rudimental way to understand the ability types, it will fail very often. You should understand by yourself if it's triggered or what else. :wink:
Note that you have a RESOLUTION_TIME_ACTION block start that shouldn't be there.

And here's the big thing: this should be the complete code for Aurelia's Fury.
Aurelia's Fury (untested) | Open
Code: Select all
  <SPELL_ABILITY>
    -- Localised text omitted
    <TARGET tag="CARD_QUERY_CHOOSE_DEAL_1_DAMAGE" definition="0" compartment="0" damage_assignment="1">
    MTG():SetTargetCount( GetEffectX() )
    </TARGET>
    <TARGET_DEFINITION id="0">
    local filter = ClearFilter()
    filter:SetFilterType(FILTER_TYPE_CARDS + FILTER_TYPE_PLAYERS)
    filter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
    </TARGET_DEFINITION>
    <RESOLUTION_TIME_ACTION>
    local source = EffectSourceLKI()
    local targetDC = EffectDC():Get_Targets(0)
    for i=0,GetEffectX()-1 do
       local target_creature = targetDC:Get_CardPtr(i)
       local target_player = targetDC:Get_PlayerPtr(i)
       local damage = targetDC:Get_Assignment(i)
       if target_creature ~= nil then
          source:DealDamageTo(damage, target_creature)
       elseif target_player ~= nil then
          source:DealDamageTo(damage, target_player)
       end
    end
    </RESOLUTION_TIME_ACTION>
  </SPELL_ABILITY>
  <TRIGGERED_ABILITY replacement_effect="1" active_zone="ZONE_STACK">
    <TRIGGER value="SOURCE_DEALS_DAMAGE_TO_OBJECT" simple_qualifier="self" />
    <RESOLUTION_TIME_ACTION>
    if SecondaryObject() ~= nil then
       SecondaryObject():Tap()
    end
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
  <TRIGGERED_ABILITY replacement_effect="1" active_zone="ZONE_STACK">
    <TRIGGER value="SOURCE_DEALS_DAMAGE_TO_PLAYER" simple_qualifier="self" />
    <RESOLUTION_TIME_ACTION>
    if SecondaryPlayer() ~= nil then
       local delayDC = EffectDC():Make_Chest(1)
       delayDC:Set_PlayerPtr( 0, SecondaryPlayer() )
       MTG():CreateDelayedTrigger(1, delayDC)
    end
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
  <TRIGGERED_ABILITY replacement_effect="1" resource_id="1">
    <CLEANUP simple_cleanup="EndOfTurn" />
    <TRIGGER value="CONSIDERED_FOR_CAST" pre_trigger="1">
    if TriggerPlayer() == EffectDC():Get_PlayerPtr(0) and TriggerObject():GetCardType():Test(CARD_TYPE_CREATURE) == false then
       MTG():OverrideEvent()
       return true
    end
    return false
    </TRIGGER>
  </TRIGGERED_ABILITY>
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 722 times

Re: Formal Request Thread

Postby infernalsham » 06 Jul 2013, 22:10

thefiremind wrote:Note that you have a RESOLUTION_TIME_ACTION block start that shouldn't be there.
Thanks for point it out, removed it. Had it in there when trying some things to get it to work.
Want to speed up the loading of DotP Magic 2014 when you start it?
Go to: "C:\*\Magic 2014\Movies" and delete Alienware, Stainless and WotC .bik files.
infernalsham
 
Posts: 17
Joined: 27 Jun 2013, 15:54
Has thanked: 3 times
Been thanked: 1 time

Re: Formal Request Thread

Postby Xander9009 » 07 Jul 2013, 03:27

thefiremind wrote:The problem with Mystic Genesis coded like that is that if you make a copy of the token it will probably end up being a 0/1, while it should retain the values of the original token. DotP2014 has a function PutPTTokensOntoBattlefield which I guess it produces tokens with a set P/T, but there are no examples of it, so it would need some tests in order to find the correct parameters.

In your Triumph of Ferocity, the <FILTER>...</FILTER> blocks are useless. They don't do any harm if you leave them, but you can shorten the code by removing them.

I tried to code the cost "Remove a +1/+1 counter from a creature you control" for Ghave, Guru of Spores and ended up with this:
Code: Select all
    <COST type="generic">
      <PREREQUISITE>
      local filter = ClearFilter()
      filter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
      filter:Add( FE_CONTROLLER, OP_IS, EffectController() )
      local filter_count = filter:EvaluateObjects()
      if filter_count &gt; 0 then
         for i=0,filter_count-1 do
            local candidate = filter:GetNthEvaluatedObject(i)
            if candidate ~= nil and candidate:CountCounters( MTG():PlusOnePlusOneCounters() ) &gt; 0 then
               return true
            end
         end
      end
      return false
      </PREREQUISITE>
      <RESOLUTION_TIME_ACTION>
      MTG():ClearFilterMark()
      local filter = ClearFilter()
      filter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
      filter:Add( FE_CONTROLLER, OP_IS, EffectController() )
      local filter_count = filter:EvaluateObjects()
      if filter_count &gt; 0 then
         for i=0,filter_count-1 do
            local candidate = filter:GetNthEvaluatedObject(i)
            if candidate ~= nil and candidate:CountCounters( MTG():PlusOnePlusOneCounters() ) &gt; 0 then
               candidate:MarkForFilter()
            end
         end
         filter:SetMarkedObjectsOnly()
         EffectController():ChooseItem( "CARD_QUERY_CHOOSE_CREATURE_YOU_CONTROL", EffectDC():Make_Targets(6) )
      end
      </RESOLUTION_TIME_ACTION>
      <RESOLUTION_TIME_ACTION>
      local creature = EffectDC():Get_Targets(6) and EffectDC():Get_Targets(6):Get_CardPtr(0)
      if creature ~= nil then
         creature:RemoveCounters( MTG():PlusOnePlusOneCounters(), 1 )
      end
      </RESOLUTION_TIME_ACTION>
    </COST>
It's quite long, but it seems to work OK.

The first ability of your Zameck Guildmage is wrong: why should you use a SPELL_PLAYED trigger? A creature that enters the battlefield from the graveyard should benefit from the ability, too. Remove that delayed trigger and create the ZONECHANGE_TRANSITION delayed trigger directly:
Code: Select all
  <ACTIVATED_ABILITY>
    <COST mana_cost="{G}{U}" type="Mana" />
    <RESOLUTION_TIME_ACTION>
    MTG():CreateDelayedTrigger(2, nil)
    </RESOLUTION_TIME_ACTION>
  </ACTIVATED_ABILITY>
  <TRIGGERED_ABILITY replacement_effect="1" resource_id="2">
    <TRIGGER value="ZONECHANGE_TRANSITION" simple_qualifier="objectyoucontrol" to_zone="ZONE_BATTLEFIELD" from_zone="ZONE_ANY" pre_trigger="1" />
    <CLEANUP simple_cleanup="EndOfTurn" />
    <RESOLUTION_TIME_ACTION>
    if TriggerObject() ~= nil then
       TriggerObject():AddCounters( MTG():PlusOnePlusOneCounters(), 1 )
    end
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
I also simplified the code: simple_qualifier="objectyoucontrol" should be enough to make the ability affect only your creatures. If it's not, let me know.

About Sphinx of Uthuun, the problem is always the same: there's no such thing as "pile" in DotP, and I can't see a good way to approximate it, especially concerning user interaction (how do you let the players see the piles and choose one?).
I somehow managed to overlook this entire post. Now I feel bad for asking for help and then not seeing the help. I'm sorry. But what you wrote about Zameck Guildmage is still helpful and I'll try that tomorrow. And at least now I know that Sphinx of Uthuun is even more difficult than I thought haha. The other two are working, though. I'll have to fix Zameck Guildmage (and also more thoroughly look at you post) tomorrow when I can think again. So, thank you for helping, and I'm sorry I didn't notice it.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
Xander9009
Programmer
 
Posts: 2905
Joined: 29 Jun 2013, 07:44
Location: Indiana, United States
Has thanked: 121 times
Been thanked: 445 times

Re: Formal Request Thread

Postby stovepipe » 07 Jul 2013, 05:40

thefiremind wrote:
Master Necro wrote:Goblin Bomb
Jarad, Golgari Lich Lord
Jarad's Orders
I made the 2 Jarad cards for a deck that will be in my mod, but since I don't want to have copies of my cards with the same Multiverse ID around, I'll share unprefixed versions.
Thanks for posting the Jarad, Golgari Lich Lord code. I was trying to update Fling for 2014 and having issues. I was trying to use the built-in Sacrifice cost mechanic, but couldn't get the last known power off the creature. The generic cost seems to work fine but isn't quite as pretty. My one suggestion would be to use LKIShield_CrdPtr() instead of setting a generic integer. It really doesn't make much difference but I feel it's more consistent with the way the devs coded other cards.

The new code becomes:
Code: Select all
    <COST type="generic">
      <PREREQUISITE>
      local filter = ClearFilter()
      filter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
      filter:Add( FE_CARD_INSTANCE, OP_NOT, EffectSource() )
      return filter:CountStopAt(1) == 1
      </PREREQUISITE>
      <RESOLUTION_TIME_ACTION>
      local filter = ClearFilter()
      filter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
      filter:Add( FE_CARD_INSTANCE, OP_NOT, EffectSource() )
      EffectController():ChooseItem( "CARD_QUERY_CHOOSE_CREATURE_TO_SACRIFICE", EffectDC():Make_Targets(6) )
      </RESOLUTION_TIME_ACTION>
      <RESOLUTION_TIME_ACTION>
      local creature = EffectDC():Get_Targets(6):Get_CardPtr(0)
      if creature ~= nil then
         EffectDC():Get_Targets(6):LKIShield_CardPtr(0)
         EffectController():Sacrifice(creature)
      end
      </RESOLUTION_TIME_ACTION>
    </COST>
    <RESOLUTION_TIME_ACTION>
    local sacrificed_creature = EffectDC():Get_Targets(6):Get_CardPtr(0)
    local life_loss = sacrificed_creature:GetCurrentCharacteristics():Power_Get()
    if life_loss &gt; 0 then
       local myTeam = EffectController():GetTeam()
       for i=0,MTG():GetNumberOfPlayers()-1 do
          local nthPlayer = MTG():GetNthPlayer(i)
          if nthPlayer ~= nil and nthPlayer:GetTeam() ~= myTeam then
             nthPlayer:LoseLife(life_loss)
         end
       end
    end
    </RESOLUTION_TIME_ACTION>
In the ability resolution the value for "sacrificed_creature" is not nil because you protected the last known instance from being removed from the data chest.
stovepipe
 
Posts: 7
Joined: 06 Jul 2013, 23:55
Has thanked: 0 time
Been thanked: 0 time

Re: Formal Request Thread

Postby Master Necro » 07 Jul 2013, 05:41

thefiremind wrote:
Master Necro wrote:I'm confused do these cards work or are they still WIP? If they work I'll add them to the first post. :)
The "Remove a +1/+1 counter from a creature you control" cost is stand-alone and working, if you consider it as a sort of mechanic you can add it to the first post. The other cards need a merging between the cards themselves and my fixes.

Master Necro wrote:"Regenerate each creature you control."
Easy, pick the filter from Decree of Savagery and the regeneration from any creature that regenerates:
Code: Select all
    <FILTER filter_id="0">
    local filter = ClearFilter()
    filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
    filter:Add( FE_CONTROLLER, OP_IS, EffectController())
    </FILTER>
    <RESOLUTION_TIME_ACTION filter_id="0">
    if FilteredCard() ~= nil then
       FilteredCard():GiveRegeneration()
    end
    </RESOLUTION_TIME_ACTION>
Master Necro wrote:" {T} : Add {G} or {B} to your mana pool."
I'll leave the mana problems to other modders. :mrgreen:

Master Necro wrote:"Whenever another Goblin you control becomes blocked, sacrifice it. If you do, it deals 4 damage to each creature blocking it."
I made Ib Halfheart, Goblin Tactician for DotP2012 but now that I look at his code with more knowledge, I see that it was partially wrong. #-o It's not easy, I need to think about it. I guess it will need something along the lines of sumomole's code for Guardian of the Gateless. If someone has an idea, please share it, I'm not sure if I can sort something out.

Master Necro wrote:Goblin Bomb
Jarad, Golgari Lich Lord
Jarad's Orders
I made the 2 Jarad cards for a deck that will be in my mod, but since I don't want to have copies of my cards with the same Multiverse ID around, I'll share unprefixed versions.
I'm quite satisfied with the new "Sacrifice a Swamp and a Forest" cost that I coded: my version lets you choose any Swamp or Forest as first choice, then it restricts to what's missing during the second choice.
Thank you! :D I think I figured out how to make the Goblin Bomb will post it if I succeed.

thefiremind wrote:
infernalsham wrote:I figured out how to get Battalion working.

When importing a card through thefiremind's generator it has its ability within <STATIC_ABILITY>
and </STATIC_ABILITY>. However, if you change them into <TRIGGERED_ABILITY> and </TRIGGERED_ABILITY> it will work.

Example (Boros Elite):
[...]
My generator has a very rudimental way to understand the ability types, it will fail very often. You should understand by yourself if it's triggered or what else. :wink:
Note that you have a RESOLUTION_TIME_ACTION block start that shouldn't be there.

And here's the big thing: this should be the complete code for Aurelia's Fury.
Aurelia's Fury (untested) | Open
Code: Select all
  <SPELL_ABILITY>
    -- Localised text omitted
    <TARGET tag="CARD_QUERY_CHOOSE_DEAL_1_DAMAGE" definition="0" compartment="0" damage_assignment="1">
    MTG():SetTargetCount( GetEffectX() )
    </TARGET>
    <TARGET_DEFINITION id="0">
    local filter = ClearFilter()
    filter:SetFilterType(FILTER_TYPE_CARDS + FILTER_TYPE_PLAYERS)
    filter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
    </TARGET_DEFINITION>
    <RESOLUTION_TIME_ACTION>
    local source = EffectSourceLKI()
    local targetDC = EffectDC():Get_Targets(0)
    for i=0,GetEffectX()-1 do
       local target_creature = targetDC:Get_CardPtr(i)
       local target_player = targetDC:Get_PlayerPtr(i)
       local damage = targetDC:Get_Assignment(i)
       if target_creature ~= nil then
          source:DealDamageTo(damage, target_creature)
       elseif target_player ~= nil then
          source:DealDamageTo(damage, target_player)
       end
    end
    </RESOLUTION_TIME_ACTION>
  </SPELL_ABILITY>
  <TRIGGERED_ABILITY replacement_effect="1" active_zone="ZONE_STACK">
    <TRIGGER value="SOURCE_DEALS_DAMAGE_TO_OBJECT" simple_qualifier="self" />
    <RESOLUTION_TIME_ACTION>
    if SecondaryObject() ~= nil then
       SecondaryObject():Tap()
    end
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
  <TRIGGERED_ABILITY replacement_effect="1" active_zone="ZONE_STACK">
    <TRIGGER value="SOURCE_DEALS_DAMAGE_TO_PLAYER" simple_qualifier="self" />
    <RESOLUTION_TIME_ACTION>
    if SecondaryPlayer() ~= nil then
       local delayDC = EffectDC():Make_Chest(1)
       delayDC:Set_PlayerPtr( 0, SecondaryPlayer() )
       MTG():CreateDelayedTrigger(1, delayDC)
    end
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
  <TRIGGERED_ABILITY replacement_effect="1" resource_id="1">
    <CLEANUP simple_cleanup="EndOfTurn" />
    <TRIGGER value="CONSIDERED_FOR_CAST" pre_trigger="1">
    if TriggerPlayer() == EffectDC():Get_PlayerPtr(0) and TriggerObject():GetCardType():Test(CARD_TYPE_CREATURE) == false then
       MTG():OverrideEvent()
       return true
    end
    return false
    </TRIGGER>
  </TRIGGERED_ABILITY>
infernalsham wrote:Battalion:

Example (Boros Elite):
Code: Select all
<TRIGGERED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Battalion — Whenever Boros Elite and at least two other creatures attack, Boros Elite gets +2/+2 until end of turn.]]></LOCALISED_TEXT>
   <TRIGGER value="ATTACKING" simple_qualifier="self" />
   <FILTER filter_id="0">
    local filter = ClearFilter()
    filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
    filter:Add( FE_IS_ATTACKING, OP_IS, true )
   filter:Add(FE_CONTROLLER, OP_IS, EffectController() )
   local number = filter:CountStopAt(3)
   </FILTER>
   <CONTINUOUS_ACTION layer="7C">
    if EffectSource() ~= nil then
       EffectSource():GetCurrentCharacteristics():Power_Add( 2 )
       EffectSource():GetCurrentCharacteristics():Toughness_Add( 2 )
    end
   </CONTINUOUS_ACTION>
   <DURATION simple_duration="untilEOT" />
   </TRIGGERED_ABILITY>
thefiremind wrote:
infernalsham wrote:Edit: The code works perfectly for dealing damage. :D
Good, I'll see if I can complete the card.
Awesome. Thanks. :D

Thanks guys and I have put everything in the first post.

RiiakShiNal wrote:
thefiremind wrote:
Master Necro wrote:" {T} : Add {G} or {B} to your mana pool."
I'll leave the mana problems to other modders. :mrgreen:
I'm actually working on the mana problem and I have a working solution (using mana tokens) that even works for cards like Burning-Tree Shaman, Mana Flare, Exotic Orchard, and Reflecting Pool. The AI seems to have a rudimentary understanding on how to use the manual tapping, but it still prefers the automatic tapping from basic lands and mana abilities.

Unfortunately, due to how the game handles basic lands, I've had to modify all the basic lands to use my code, though they still have the automatic tapping since I can't remove the Basic super-type (the game crashes if the super-type is removed).

I've currently coded (mainly for testing purposes):
  • Burning-Tree Shaman (to make sure I can get the required Activated Ability working with Burning-Tree Shaman's ability (don't want to kill players for manually tapping for mana).
  • Darkslick Shores
  • Dimir Aqueduct
  • Dimir Guildgate
  • Drowned Catacomb
  • Exotic Orchard
  • Mana Flare (Only works for manual tapping due to the game not triggering BECAME_TAPPED_FOR_MANA for basic lands.)
  • Reflecting Pool
  • Tokens for all 5 colours and colourless mana.
  • Modified all 104 basic lands in the base game.
Could you perhaps share some of them? :)

P.S. A quick question, I'm trying to make goblin Bomb and I am using Khalni Heart Expedition as a base, more or less, the thing that I don't understand is Counter registration. Is there a file where I have to add my counter? or do I just change Quest to Fuse in <COUNTER_REGISTRATION name="Quest" proliferate="11" />?

P.P.S. Here is my code for the Goblin Bomb if anyone could look at it I'd much appreciate it. :)

Code: Select all
<?xml version="1.0"?>
<CARD_V2 ExportVersion="20">
  <FILENAME text="GOBLIN_BOMB_4549" />
  <CARDNAME text="GOBLIN_BOMB" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Goblin Bomb]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Goblin Bomb]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Goblin Bomb]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Goblin Bomb]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Goblin Bomb]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Goblin Bomb]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Goblin Bomb]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Goblin Bomb]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Goblin Bomb]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="4549" />
  <ARTID value="A4549" />
  <ARTIST name="Ron Spencer" />
  <CASTING_COST cost="{1}{R}" />
  <TYPE metaname="Enchantment" />
  <EXPANSION value="DPI" />
  <RARITY metaname="R" />
  <TRIGGERED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[At the beginning of your upkeep, you may flip a coin. If you win the flip, put a fuse counter on Goblin Bomb. If you lose the flip, remove a fuse counter from Goblin Bomb.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[At the beginning of your upkeep, you may flip a coin. If you win the flip, put a fuse counter on Goblin Bomb. If you lose the flip, remove a fuse counter from Goblin Bomb.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[At the beginning of your upkeep, you may flip a coin. If you win the flip, put a fuse counter on Goblin Bomb. If you lose the flip, remove a fuse counter from Goblin Bomb.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[At the beginning of your upkeep, you may flip a coin. If you win the flip, put a fuse counter on Goblin Bomb. If you lose the flip, remove a fuse counter from Goblin Bomb.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[At the beginning of your upkeep, you may flip a coin. If you win the flip, put a fuse counter on Goblin Bomb. If you lose the flip, remove a fuse counter from Goblin Bomb.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[At the beginning of your upkeep, you may flip a coin. If you win the flip, put a fuse counter on Goblin Bomb. If you lose the flip, remove a fuse counter from Goblin Bomb.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[At the beginning of your upkeep, you may flip a coin. If you win the flip, put a fuse counter on Goblin Bomb. If you lose the flip, remove a fuse counter from Goblin Bomb.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[At the beginning of your upkeep, you may flip a coin. If you win the flip, put a fuse counter on Goblin Bomb. If you lose the flip, remove a fuse counter from Goblin Bomb.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[At the beginning of your upkeep, you may flip a coin. If you win the flip, put a fuse counter on Goblin Bomb. If you lose the flip, remove a fuse counter from Goblin Bomb.]]></LOCALISED_TEXT>
    <COUNTER_REGISTRATION name="Fuse" proliferate="11" />
    <TRIGGER value="BEGINNING_OF_PLAYERS_STEP" simple_qualifier="controller">
    return MTG():GetStep() == STEP_END_OF_TURN
    </TRIGGER>
   <RESOLUTION_TIME_ACTION>
    EffectController():FlipCoin()
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    if EffectController():GetFlipResult() == COIN_FLIP_WIN then
       EffectSource():AddCounters( MTG():GetCountersType("Quest"), 1)
    end
    </RESOLUTION_TIME_ACTION><RESOLUTION_TIME_ACTION>
    if EffectController():GetFlipResult() == COIN_FLIP_LOOSE then
       EffectSource():AddCounters( MTG():GetCountersType("Quest"), -1)
    end
    </RESOLUTION_TIME_ACTION>
    <MAY />
   <SFX text="GLOBAL_TIDE_PLAY" />
  </TRIGGERED_ABILITY>
  <ACTIVATED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Remove five fuse counters from Goblin Bomb, Sacrifice Goblin Bomb: Goblin Bomb deals 20 damage to target player.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Remove five fuse counters from Goblin Bomb, Sacrifice Goblin Bomb: Goblin Bomb deals 20 damage to target player.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Remove five fuse counters from Goblin Bomb, Sacrifice Goblin Bomb: Goblin Bomb deals 20 damage to target player.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Remove five fuse counters from Goblin Bomb, Sacrifice Goblin Bomb: Goblin Bomb deals 20 damage to target player.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Remove five fuse counters from Goblin Bomb, Sacrifice Goblin Bomb: Goblin Bomb deals 20 damage to target player.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Remove five fuse counters from Goblin Bomb, Sacrifice Goblin Bomb: Goblin Bomb deals 20 damage to target player.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Remove five fuse counters from Goblin Bomb, Sacrifice Goblin Bomb: Goblin Bomb deals 20 damage to target player.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Remove five fuse counters from Goblin Bomb, Sacrifice Goblin Bomb: Goblin Bomb deals 20 damage to target player.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Remove five fuse counters from Goblin Bomb, Sacrifice Goblin Bomb: Goblin Bomb deals 20 damage to target player.]]></LOCALISED_TEXT>
    <COUNTER_REGISTRATION name="Fuse" proliferate="11" />
   <SFX text="TARGET_FIREBALL_PLAY" />
    <COST type="RemoveCountersSelf" amount="5" counter_type="Quest" />
    <COST type="SacrificeSelf" />
   <TARGET tag="CARD_QUERY_CHOOSE_DEAL_20_DAMAGE" definition="0" compartment="0" count="1" />
   <MAY />
    <TARGET_DEFINITION id="0">
    local filter = ClearFilter()
    filter:SetFilterType( FILTER_TYPE_PLAYERS )
   </TARGET_DEFINITION>
    <RESOLUTION_TIME_ACTION>
    local target_player = EffectDC():Get_Targets(0):Get_PlayerPtr(0)
    if ( target_player ~= nil ) then
       EffectSourceLKI():DealDamageTo( 20, target_player )
    end
    </RESOLUTION_TIME_ACTION>
   <AI_SIMPLIFIED_TARGETING compartment="0" hint="HINT_ENEMY_ONLY" />
    <AI_AVAILABILITY window_step="end_of_turn" window_turn="their_turn" type="window" />
    <AI_AVAILABILITY type="in_response" />
    <AI_AVAILABILITY window_step="main_2" window_turn="my_turn" type="window" />
    <AI_AVAILABILITY window_step="main_1" window_turn="my_turn" type="window" />
  </ACTIVATED_ABILITY>
  <AI_COUNTER_SCORE type="Fuse" score="100" max_counters="3" />
  <AI_BASE_SCORE score="300" zone="ZONE_BATTLEFIELD" />
</CARD_V2>
User avatar
Master Necro
 
Posts: 259
Joined: 24 Apr 2013, 18:25
Has thanked: 83 times
Been thanked: 21 times

Re: Formal Request Thread

Postby gorem2k » 07 Jul 2013, 07:57

I tested Goblin Bomb. fun card!

and I also made a few adjustment. however, it still doesn't ask if you want to flip a coin or not.

Goblin Bomb | Open
Code: Select all
<?xml version="1.0"?>
<CARD_V2 ExportVersion="20">
  <FILENAME text="GOBLIN_BOMB_4549" />
  <CARDNAME text="GOBLIN_BOMB" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Goblin Bomb]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Goblin Bomb]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Goblin Bomb]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Goblin Bomb]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Goblin Bomb]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Goblin Bomb]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Goblin Bomb]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Goblin Bomb]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Goblin Bomb]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="4549" />
  <ARTID value="A4549" />
  <ARTIST name="Ron Spencer" />
  <CASTING_COST cost="{1}{R}" />
  <TYPE metaname="Enchantment" />
  <EXPANSION value="DPI" />
  <RARITY metaname="R" />
  <TRIGGERED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[At the beginning of your upkeep, you may flip a coin. If you win the flip, put a fuse counter on Goblin Bomb. If you lose the flip, remove a fuse counter from Goblin Bomb.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[At the beginning of your upkeep, you may flip a coin. If you win the flip, put a fuse counter on Goblin Bomb. If you lose the flip, remove a fuse counter from Goblin Bomb.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[At the beginning of your upkeep, you may flip a coin. If you win the flip, put a fuse counter on Goblin Bomb. If you lose the flip, remove a fuse counter from Goblin Bomb.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[At the beginning of your upkeep, you may flip a coin. If you win the flip, put a fuse counter on Goblin Bomb. If you lose the flip, remove a fuse counter from Goblin Bomb.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[At the beginning of your upkeep, you may flip a coin. If you win the flip, put a fuse counter on Goblin Bomb. If you lose the flip, remove a fuse counter from Goblin Bomb.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[At the beginning of your upkeep, you may flip a coin. If you win the flip, put a fuse counter on Goblin Bomb. If you lose the flip, remove a fuse counter from Goblin Bomb.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[At the beginning of your upkeep, you may flip a coin. If you win the flip, put a fuse counter on Goblin Bomb. If you lose the flip, remove a fuse counter from Goblin Bomb.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[At the beginning of your upkeep, you may flip a coin. If you win the flip, put a fuse counter on Goblin Bomb. If you lose the flip, remove a fuse counter from Goblin Bomb.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[At the beginning of your upkeep, you may flip a coin. If you win the flip, put a fuse counter on Goblin Bomb. If you lose the flip, remove a fuse counter from Goblin Bomb.]]></LOCALISED_TEXT>
    <COUNTER_REGISTRATION name="Fuse" proliferate="11" />
    <TRIGGER value="BEGINNING_OF_PLAYERS_STEP" simple_qualifier="controller">
    return MTG():GetStep() == STEP_UPKEEP
    </TRIGGER>
    <RESOLUTION_TIME_ACTION>
    EffectController():FlipCoin()
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    if EffectController():GetFlipResult() == COIN_FLIP_WIN then
       EffectSource():AddCounters( MTG():GetCountersType("Fuse"), 1)
    end
    </RESOLUTION_TIME_ACTION><RESOLUTION_TIME_ACTION>
    if EffectController():GetFlipResult() == COIN_FLIP_LOSE and EffectSource():CountCounters(MTG():GetCountersType("Fuse")) &gt; 0 then
       EffectSource():RemoveCounters( MTG():GetCountersType("Fuse"), 1)
    end
    </RESOLUTION_TIME_ACTION>
    <SFX text="GLOBAL_TIDE_PLAY" />
  </TRIGGERED_ABILITY>
  <ACTIVATED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Remove five fuse counters from Goblin Bomb, Sacrifice Goblin Bomb: Goblin Bomb deals 20 damage to target player.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Remove five fuse counters from Goblin Bomb, Sacrifice Goblin Bomb: Goblin Bomb deals 20 damage to target player.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Remove five fuse counters from Goblin Bomb, Sacrifice Goblin Bomb: Goblin Bomb deals 20 damage to target player.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Remove five fuse counters from Goblin Bomb, Sacrifice Goblin Bomb: Goblin Bomb deals 20 damage to target player.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Remove five fuse counters from Goblin Bomb, Sacrifice Goblin Bomb: Goblin Bomb deals 20 damage to target player.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Remove five fuse counters from Goblin Bomb, Sacrifice Goblin Bomb: Goblin Bomb deals 20 damage to target player.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Remove five fuse counters from Goblin Bomb, Sacrifice Goblin Bomb: Goblin Bomb deals 20 damage to target player.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Remove five fuse counters from Goblin Bomb, Sacrifice Goblin Bomb: Goblin Bomb deals 20 damage to target player.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Remove five fuse counters from Goblin Bomb, Sacrifice Goblin Bomb: Goblin Bomb deals 20 damage to target player.]]></LOCALISED_TEXT>
    <COUNTER_REGISTRATION name="Fuse" proliferate="11" />
    <SFX text="TARGET_FIREBALL_PLAY" />
    <COST type="RemoveCountersSelf" amount="5" counter_type="Fuse" />
    <COST type="SacrificeSelf" />
    <TARGET tag="CARD_QUERY_CHOOSE_DEAL_20_DAMAGE" definition="0" compartment="0" count="1" />
    <TARGET_DEFINITION id="0">
    local filter = ClearFilter()
    filter:SetFilterType( FILTER_TYPE_PLAYERS )
    </TARGET_DEFINITION>
    <RESOLUTION_TIME_ACTION>
    local target_player = EffectDC():Get_Targets(0):Get_PlayerPtr(0)
    if ( target_player ~= nil ) then
       EffectSourceLKI():DealDamageTo( 20, target_player )
    end
    </RESOLUTION_TIME_ACTION>
    <AI_SIMPLIFIED_TARGETING compartment="0" hint="HINT_ENEMY_ONLY" />
    <AI_AVAILABILITY window_step="end_of_turn" window_turn="their_turn" type="window" />
    <AI_AVAILABILITY type="in_response" />
    <AI_AVAILABILITY window_step="main_2" window_turn="my_turn" type="window" />
    <AI_AVAILABILITY window_step="main_1" window_turn="my_turn" type="window" />
  </ACTIVATED_ABILITY>
  <AI_COUNTER_SCORE type="Fuse" score="100" max_counters="3" />
  <AI_BASE_SCORE score="300" zone="ZONE_BATTLEFIELD" />
</CARD_V2>
and here's my weird and wrong code for Brine Hag:
use at your own risk | Open
Code: Select all
<?xml version='1.0'?>
<CARD_V2 ExportVersion="1">
  <FILENAME text="BRINE_HAG_444001475" />
  <CARDNAME text="BRINE_HAG" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Brine Hag]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Brine Hag]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Brine Hag]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Brine Hag]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Brine Hag]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Brine Hag]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Brine Hag]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Brine Hag]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Brine Hag]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="444001475" />
  <ARTID value="444001475" />
  <ARTIST name="Quinton Hoover" />
  <CASTING_COST cost="{R}" />
  <TYPE metaname="Creature" />
  <SUB_TYPE metaname="Hag" />
  <EXPANSION value="LE" />
  <RARITY metaname="U" />
  <POWER value="1" />
  <TOUGHNESS value="20" />
  <STATIC_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Flash]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Vol, linceul]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Vuela, velo.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Fliegend, Verhüllt]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Volare, velo]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[飛行、被覆]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Flying, shroud]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Полет, Пелена]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Voar, manto]]></LOCALISED_TEXT>
    <INTRINSIC characteristic="CHARACTERISTIC_FLASH" />
  </STATIC_ABILITY>
  <TRIGGERED_ABILITY replacement_effect="1">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[When Brine Hag dies, all creatures that dealt damage to it this turn become 0/2.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[When Brine Hag dies, all creatures that dealt damage to it this turn become 0/2.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[When Brine Hag dies, all creatures that dealt damage to it this turn become 0/2.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[When Brine Hag dies, all creatures that dealt damage to it this turn become 0/2.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Quando la Strega del Mare muore, tutte le creature che le hanno inflitto danno in questo turno diventano 0/2.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[When Brine Hag dies, all creatures that dealt damage to it this turn become 0/2.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[When Brine Hag dies, all creatures that dealt damage to it this turn become 0/2.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[When Brine Hag dies, all creatures that dealt damage to it this turn become 0/2.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[When Brine Hag dies, all creatures that dealt damage to it this turn become 0/2.]]></LOCALISED_TEXT>
    <TRIGGER value="SOURCE_DEALS_DAMAGE_TO_OBJECT" pre_trigger="1" damage_type="all">
    if TriggerObject() == EffectSource() then
       return false
    else
       return true
    end
    </TRIGGER>
    <CONTINUOUS_ACTION layer="7B">
    if TriggerObject() ~= nil then
       local characteristics = TriggerObject():GetCurrentCharacteristics()
       characteristics:Power_Set( 0 )
       characteristics:Toughness_Set( 2 )
    end
    </CONTINUOUS_ACTION>
    <DURATION>
    return EffectSource() == nil
    </DURATION>
  </TRIGGERED_ABILITY>
  <SFX text="COMBAT_BLUNT_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
  <SFX text="COMBAT_BLUNT_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
</CARD_V2>
gorem2k
 
Posts: 464
Joined: 01 Apr 2013, 04:21
Has thanked: 48 times
Been thanked: 33 times

Re: Formal Request Thread

Postby thefiremind » 07 Jul 2013, 08:06

For Goblin Bomb try to add a <MAY /> inside the triggered ability, it should be enough to make it ask.

Brine Hag would probably need to use interrogation in order to know which creatures dealt damage to it.

EDIT: Talking about interrogation, I'm about to make an Esper deck (not just for colors, but for flavor as well) and I successfully coded Ethersworn Canonist with a clever use of interrogation. If someone needs it, here's how I made her ability:
Ability for Ethersworn Canonist | Open
Code: Select all
  <TRIGGERED_ABILITY replacement_effect="1">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Each player who has cast a nonartifact spell this turn can’t cast additional nonartifact spells.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Chaque joueur qui, ce tour-ci, a lancé un sort non-artefact ne peut pas lancer de sort non-artefact supplémentaire.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Cada jugador que lanzó un hechizo que no sea de artefacto este turno no puede lanzar más hechizos que no sean de artefacto este turno.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Jeder Spieler, der in diesem Zug bereits einen Nichtartefakt-Zauberspruch gewirkt hat, kann in diesem Zug keine weiteren Nichtartefakt-Zaubersprüche wirken.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogni giocatore che ha lanciato una magia non artefatto in questo turno non può lanciare magie non artefatto addizionali.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[このターン、アーティファクトでない呪文をプレイした各プレイヤーは、アーティファクトでない呪文を追加でプレイできない。。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Each player who has cast a nonartifact spell this turn can’t cast additional nonartifact spells.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Каждый игрок, уже разыгравший в этом ходу неартефактное заклинание, не может разыгрывать дополнительные неартефактные заклинания.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Os jogadores que tenham conjurado uma mágica que não seja artefato neste turno não poderão conjurar mágicas que não sejam artefatos adicionais.]]></LOCALISED_TEXT>
    <TRIGGER value="CONSIDERED_FOR_CAST" pre_trigger="1">
    if TriggerObject():GetCardType():Test(CARD_TYPE_ARTIFACT) == false then
       local interrogation = MTG():ClearInterrogationQuery()
       interrogation:SetPlayer( TriggerPlayer() )
       local num_spells = interrogation:Count(INTERROGATE_SPELLS_CAST, INTERROGATE_THIS_TURN)
       interrogation = MTG():ClearInterrogationQuery()
       interrogation:SetType(CARD_TYPE_ARTIFACT)
       interrogation:SetPlayer( TriggerPlayer() )
       local num_artifact_spells = interrogation:Count(INTERROGATE_SPELLS_CAST, INTERROGATE_THIS_TURN)
       if num_spells &gt; num_artifact_spells then
          MTG():OverrideEvent()
          return true
       end
    end
    return false
    </TRIGGER>
  </TRIGGERED_ABILITY>
What I'm doing here is count the total spells a player has cast this turn, then count the artifact spells. If the total spells are higher than the artifact spells, it means that the player has cast a nonartifact spell, so the trigger returns true.
Last edited by thefiremind on 07 Jul 2013, 08:25, edited 1 time in total.
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 722 times

Re: Formal Request Thread

Postby Master Necro » 07 Jul 2013, 08:24

gorem2k wrote:I tested Goblin Bomb. fun card!

and I also made a few adjustment. however, it still doesn't ask if you want to flip a coin or not.

Goblin Bomb | Open
Code: Select all
<?xml version="1.0"?>
<CARD_V2 ExportVersion="20">
  <FILENAME text="GOBLIN_BOMB_4549" />
  <CARDNAME text="GOBLIN_BOMB" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Goblin Bomb]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Goblin Bomb]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Goblin Bomb]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Goblin Bomb]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Goblin Bomb]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Goblin Bomb]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Goblin Bomb]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Goblin Bomb]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Goblin Bomb]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="4549" />
  <ARTID value="A4549" />
  <ARTIST name="Ron Spencer" />
  <CASTING_COST cost="{1}{R}" />
  <TYPE metaname="Enchantment" />
  <EXPANSION value="DPI" />
  <RARITY metaname="R" />
  <TRIGGERED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[At the beginning of your upkeep, you may flip a coin. If you win the flip, put a fuse counter on Goblin Bomb. If you lose the flip, remove a fuse counter from Goblin Bomb.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[At the beginning of your upkeep, you may flip a coin. If you win the flip, put a fuse counter on Goblin Bomb. If you lose the flip, remove a fuse counter from Goblin Bomb.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[At the beginning of your upkeep, you may flip a coin. If you win the flip, put a fuse counter on Goblin Bomb. If you lose the flip, remove a fuse counter from Goblin Bomb.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[At the beginning of your upkeep, you may flip a coin. If you win the flip, put a fuse counter on Goblin Bomb. If you lose the flip, remove a fuse counter from Goblin Bomb.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[At the beginning of your upkeep, you may flip a coin. If you win the flip, put a fuse counter on Goblin Bomb. If you lose the flip, remove a fuse counter from Goblin Bomb.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[At the beginning of your upkeep, you may flip a coin. If you win the flip, put a fuse counter on Goblin Bomb. If you lose the flip, remove a fuse counter from Goblin Bomb.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[At the beginning of your upkeep, you may flip a coin. If you win the flip, put a fuse counter on Goblin Bomb. If you lose the flip, remove a fuse counter from Goblin Bomb.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[At the beginning of your upkeep, you may flip a coin. If you win the flip, put a fuse counter on Goblin Bomb. If you lose the flip, remove a fuse counter from Goblin Bomb.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[At the beginning of your upkeep, you may flip a coin. If you win the flip, put a fuse counter on Goblin Bomb. If you lose the flip, remove a fuse counter from Goblin Bomb.]]></LOCALISED_TEXT>
    <COUNTER_REGISTRATION name="Fuse" proliferate="11" />
    <TRIGGER value="BEGINNING_OF_PLAYERS_STEP" simple_qualifier="controller">
    return MTG():GetStep() == STEP_UPKEEP
    </TRIGGER>
    <RESOLUTION_TIME_ACTION>
    EffectController():FlipCoin()
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    if EffectController():GetFlipResult() == COIN_FLIP_WIN then
       EffectSource():AddCounters( MTG():GetCountersType("Fuse"), 1)
    end
    </RESOLUTION_TIME_ACTION><RESOLUTION_TIME_ACTION>
    if EffectController():GetFlipResult() == COIN_FLIP_LOSE and EffectSource():CountCounters(MTG():GetCountersType("Fuse")) &gt; 0 then
       EffectSource():RemoveCounters( MTG():GetCountersType("Fuse"), 1)
    end
    </RESOLUTION_TIME_ACTION>
    <SFX text="GLOBAL_TIDE_PLAY" />
  </TRIGGERED_ABILITY>
  <ACTIVATED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Remove five fuse counters from Goblin Bomb, Sacrifice Goblin Bomb: Goblin Bomb deals 20 damage to target player.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Remove five fuse counters from Goblin Bomb, Sacrifice Goblin Bomb: Goblin Bomb deals 20 damage to target player.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Remove five fuse counters from Goblin Bomb, Sacrifice Goblin Bomb: Goblin Bomb deals 20 damage to target player.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Remove five fuse counters from Goblin Bomb, Sacrifice Goblin Bomb: Goblin Bomb deals 20 damage to target player.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Remove five fuse counters from Goblin Bomb, Sacrifice Goblin Bomb: Goblin Bomb deals 20 damage to target player.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Remove five fuse counters from Goblin Bomb, Sacrifice Goblin Bomb: Goblin Bomb deals 20 damage to target player.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Remove five fuse counters from Goblin Bomb, Sacrifice Goblin Bomb: Goblin Bomb deals 20 damage to target player.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Remove five fuse counters from Goblin Bomb, Sacrifice Goblin Bomb: Goblin Bomb deals 20 damage to target player.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Remove five fuse counters from Goblin Bomb, Sacrifice Goblin Bomb: Goblin Bomb deals 20 damage to target player.]]></LOCALISED_TEXT>
    <COUNTER_REGISTRATION name="Fuse" proliferate="11" />
    <SFX text="TARGET_FIREBALL_PLAY" />
    <COST type="RemoveCountersSelf" amount="5" counter_type="Fuse" />
    <COST type="SacrificeSelf" />
    <TARGET tag="CARD_QUERY_CHOOSE_DEAL_20_DAMAGE" definition="0" compartment="0" count="1" />
    <TARGET_DEFINITION id="0">
    local filter = ClearFilter()
    filter:SetFilterType( FILTER_TYPE_PLAYERS )
    </TARGET_DEFINITION>
    <RESOLUTION_TIME_ACTION>
    local target_player = EffectDC():Get_Targets(0):Get_PlayerPtr(0)
    if ( target_player ~= nil ) then
       EffectSourceLKI():DealDamageTo( 20, target_player )
    end
    </RESOLUTION_TIME_ACTION>
    <AI_SIMPLIFIED_TARGETING compartment="0" hint="HINT_ENEMY_ONLY" />
    <AI_AVAILABILITY window_step="end_of_turn" window_turn="their_turn" type="window" />
    <AI_AVAILABILITY type="in_response" />
    <AI_AVAILABILITY window_step="main_2" window_turn="my_turn" type="window" />
    <AI_AVAILABILITY window_step="main_1" window_turn="my_turn" type="window" />
  </ACTIVATED_ABILITY>
  <AI_COUNTER_SCORE type="Fuse" score="100" max_counters="3" />
  <AI_BASE_SCORE score="300" zone="ZONE_BATTLEFIELD" />
</CARD_V2>
and here's my weird and wrong code for Brine Hag:
use at your own risk | Open
Code: Select all
<?xml version='1.0'?>
<CARD_V2 ExportVersion="1">
  <FILENAME text="BRINE_HAG_444001475" />
  <CARDNAME text="BRINE_HAG" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Brine Hag]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Brine Hag]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Brine Hag]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Brine Hag]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Brine Hag]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Brine Hag]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Brine Hag]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Brine Hag]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Brine Hag]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="444001475" />
  <ARTID value="444001475" />
  <ARTIST name="Quinton Hoover" />
  <CASTING_COST cost="{R}" />
  <TYPE metaname="Creature" />
  <SUB_TYPE metaname="Hag" />
  <EXPANSION value="LE" />
  <RARITY metaname="U" />
  <POWER value="1" />
  <TOUGHNESS value="20" />
  <STATIC_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Flash]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Vol, linceul]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Vuela, velo.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Fliegend, Verhüllt]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Volare, velo]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[飛行、被覆]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Flying, shroud]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Полет, Пелена]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Voar, manto]]></LOCALISED_TEXT>
    <INTRINSIC characteristic="CHARACTERISTIC_FLASH" />
  </STATIC_ABILITY>
  <TRIGGERED_ABILITY replacement_effect="1">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[When Brine Hag dies, all creatures that dealt damage to it this turn become 0/2.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[When Brine Hag dies, all creatures that dealt damage to it this turn become 0/2.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[When Brine Hag dies, all creatures that dealt damage to it this turn become 0/2.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[When Brine Hag dies, all creatures that dealt damage to it this turn become 0/2.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Quando la Strega del Mare muore, tutte le creature che le hanno inflitto danno in questo turno diventano 0/2.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[When Brine Hag dies, all creatures that dealt damage to it this turn become 0/2.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[When Brine Hag dies, all creatures that dealt damage to it this turn become 0/2.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[When Brine Hag dies, all creatures that dealt damage to it this turn become 0/2.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[When Brine Hag dies, all creatures that dealt damage to it this turn become 0/2.]]></LOCALISED_TEXT>
    <TRIGGER value="SOURCE_DEALS_DAMAGE_TO_OBJECT" pre_trigger="1" damage_type="all">
    if TriggerObject() == EffectSource() then
       return false
    else
       return true
    end
    </TRIGGER>
    <CONTINUOUS_ACTION layer="7B">
    if TriggerObject() ~= nil then
       local characteristics = TriggerObject():GetCurrentCharacteristics()
       characteristics:Power_Set( 0 )
       characteristics:Toughness_Set( 2 )
    end
    </CONTINUOUS_ACTION>
    <DURATION>
    return EffectSource() == nil
    </DURATION>
  </TRIGGERED_ABILITY>
  <SFX text="COMBAT_BLUNT_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
  <SFX text="COMBAT_BLUNT_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
</CARD_V2>
thefiremind wrote:For Goblin Bomb try to add a <MAY /> inside the triggered ability, it should be enough to make it ask.

Brine Hag would probably need to use interrogation in order to know which creatures dealt damage to it.
Weeeell, I see my stupidity better than you guys, it doesn't ask because there is no code in the triggered ability that makes it ask you if you want. :mrgreen: :oops:

I will add in the triggered ability and text.xml a query <TARGET tag="CARD_QUERY_FLIP_A_COIN" definition="0" compartment="0" count="1" />

and

<RESOLUTION_TIME_ACTION>
local controller = EffectController()
if controller ~= nil then
controller:BeginNewMultipleChoice()
controller:AddMultipleChoiceAnswer("UI_CONDITIONAL_QUESTION_YES")
controller:AddMultipleChoiceAnswer("UI_CONDITIONAL_QUESTION_NO")
end
</RESOLUTION_TIME_ACTION>

and modify it further so it works. :)

Is that right?
Last edited by Master Necro on 07 Jul 2013, 08:28, edited 1 time in total.
User avatar
Master Necro
 
Posts: 259
Joined: 24 Apr 2013, 18:25
Has thanked: 83 times
Been thanked: 21 times

Re: Formal Request Thread

Postby thefiremind » 07 Jul 2013, 08:26

Master Necro wrote:I will add in the triggered ability and text.xml a query <TARGET tag="CARD_QUERY_FLIP_A_COIN" definition="0" compartment="0" count="1" />
and modify it further so it works. :)
No, this would be wrong... follow my advice, just add a <MAY />.

Code: Select all
...
    </RESOLUTION_TIME_ACTION>
    <MAY />
    <SFX text="GLOBAL_TIDE_PLAY" />
  </TRIGGERED_ABILITY>
...
Well it doesn't matter where you put it as long as it's inside the ability and not inside an action, but I would put it there.
Last edited by thefiremind on 07 Jul 2013, 08:31, edited 2 times in total.
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 722 times

Re: Formal Request Thread

Postby Master Necro » 07 Jul 2013, 08:28

thefiremind wrote:
Master Necro wrote:I will add in the triggered ability and text.xml a query <TARGET tag="CARD_QUERY_FLIP_A_COIN" definition="0" compartment="0" count="1" />
and modify it further so it works. :)
No, this would be wrong... follow my advice, just add a <MAY />.

Code: Select all
...
    </RESOLUTION_TIME_ACTION>
    <MAY />
    <SFX text="GLOBAL_TIDE_PLAY" />
  </TRIGGERED_ABILITY>
...
Well it doesn't matter where you put it as long as it's inside the ability and not inside an action, but I would put it there.
Ok. :)
User avatar
Master Necro
 
Posts: 259
Joined: 24 Apr 2013, 18:25
Has thanked: 83 times
Been thanked: 21 times

Re: Formal Request Thread

Postby thefiremind » 07 Jul 2013, 08:31

You were missing the "Ask" part in your query, but actually I missed something as well: the <MAY /> alone lets the game decide whether it's something good or not, and if it's good, it might not ask. Instead of <MAY /> use this:
Code: Select all
<MAY tag="CARD_QUERY_FLIP_COIN_QUESTION" always_prompt="1" />
and declare the string in TEXT_PERMANENT as you would have done with your query. This is the cleanest and most correct way to do that.

And sorry for all the editing, but I'm learning DotP2014's new syntax as well, so I can miss something on first thought.
Last edited by thefiremind on 07 Jul 2013, 08:35, edited 1 time in total.
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 722 times

Re: Formal Request Thread

Postby Master Necro » 07 Jul 2013, 08:35

thefiremind wrote:You were missing the "Ask" part in your query, but actually I missed something as well: the <MAY /> alone lets the game decide whether it's something good or not, and if it's good, it might not ask. Instead of <MAY /> use this:
Code: Select all
<MAY tag="CARD_QUERY_FLIP_COIN_QUESTION" always_prompt="1" />
and declare the string in TEXT_PERMANENT as you would have done with your query. This is the cleanest and most correct way to do that.
No probs you are a great help as always! :)

I will add that in the text ofc I just have one question what is <COUNTER_REGISTRATION name="Fuse" proliferate="11" />, it said Quest and I changed it to Fuse do I have to add that somewhere like also?
User avatar
Master Necro
 
Posts: 259
Joined: 24 Apr 2013, 18:25
Has thanked: 83 times
Been thanked: 21 times

PreviousNext

Return to 2014

Who is online

Users browsing this forum: No registered users and 20 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 20 users online :: 0 registered, 0 hidden and 20 guests (based on users active over the past 10 minutes)
Most users ever online was 9824 on 10 Nov 2025, 04:33

Users browsing this forum: No registered users and 20 guests

Login Form