Page 30 of 102

Re: Card Creation Request Thread

PostPosted: 26 Mar 2013, 15:18
by nivmizzet1
RiiakShiNal wrote:
Vasht wrote:is it possible to create Sphere of the Suns ?
It is possible, but only with mana tokens and it will suffer from triggering abilities that trigger on a player activating an activated ability (like Burning-Tree Shaman).
couldn't you do something like what's been done for birds of paradise? I don't think that uses mana tokens. It would just have an additional cost that a counter is removed.

or am I missing something important?

Re: Card Creation Request Thread

PostPosted: 26 Mar 2013, 15:51
by RiiakShiNal
nivmizzet1 wrote:couldn't you do something like what's been done for birds of paradise? I don't think that uses mana tokens. It would just have an additional cost that a counter is removed.

or am I missing something important?
That is the problem, MANA_ABILITY only supports TapSelf as a cost. You would need to remove a counter ONLY when Sphere of the Suns is tapped for mana. Also if you have no counters on it then it would not have an active MANA_ABILITY even though MANA_ABILITYs are present in the coding of the card which will force the game to crash.

As for Fastbond try changing this line:
Code: Select all
MTG():Interrogate_CardsOfTypeOntoBattlefieldThisTurn( player, CARD_TYPE_LAND, 1 ) > 1 then
to this:
Code: Select all
MTG():Interrogate_CardsOfTypeOntoBattlefieldThisTurn( player, CARD_TYPE_LAND, 2 ) > 1 then
and see if that fixes it.

Though you should probably remove as it should not even call this function if it does not intend to do damage.
Code: Select all
Player:DealDamage( 0, Object() )

Re: Card Creation Request Thread

PostPosted: 26 Mar 2013, 15:52
by thefiremind
nivmizzet1 wrote:can someone get fastbond working? I have everything working except the damage effect that should trigger for each land you play after the first in a single turn.
It doesn't work mainly for 2 reasons:
  • Who are player and Player (which are different variables because Lua is case-sensitive) inside the RESOLUTION_TIME_ACTION? You didn't declare them anywhere... :roll:
  • As RiiakShiNal already wrote, in MTG():Interrogate_CardsOfTypeOntoBattlefieldThisTurn( player, CARD_TYPE_LAND, 1 ) the last argument is something like CountStopAt for filters: the count won't go over 1. Write 2 instead of 1 and it should work.
Anyway you should notice that your idea isn't totally correct because you are counting the lands that enter the battlefield for any reason, not just the ones you play: you would be damaged even from a Rampant Growth. The correct trigger to use should be LAND_PLAYED, but there isn't an internal count for played lands so you would need to use ObjectDC to store that count (for each player, in case another player takes control of Fastbond). It's not that easy, I need to think about how to implement the count and make some tests.

On an unrelated note, the static ability says "on each of your turns" so it should be active only during your turn. This usually has no consequences, but there are effects that let you play a card for free and it could be a land during another turn.
Code: Select all
    <CONTINUOUS_ACTION layer="8">
    local player = EffectController()
    if player:MyTurn() ~= 0 then
        player:GetCurrentCharacteristics():Int_Set( PLAYER_INTCHARACTERISTIC_EXTRA_LAND_DROPS, 60 )
    end
    </CONTINUOUS_ACTION>
This would be more correct and also shorter. :D

Re: Card Creation Request Thread

PostPosted: 26 Mar 2013, 16:12
by nivmizzet1
thanks for your help guys. If it's not clear by now, I have absolutely no idea what I'm doing -- I just try to do as much as I can on my own, but every now and then I come across something too difficult. It's good that you guys are here to help!

Re: Card Creation Request Thread

PostPosted: 26 Mar 2013, 16:13
by nivmizzet1
thefiremind wrote:On an unrelated note, the static ability says "on each of your turns" so it should be active only during your turn. This usually has no consequences, but there are effects that let you play a card for free and it could be a land during another turn.
yeah, like with fetch lands. I could have two on the battlefield and trigger them in my opponents turn.

Re: Card Creation Request Thread

PostPosted: 26 Mar 2013, 16:30
by thefiremind
nivmizzet1 wrote:yeah, like with fetch lands. I could have two on the battlefield and trigger them in my opponents turn.
No, those wouldn't make you play the land, just put it on the battlefield. I'm talking about Djinn of Wishes, for example: if you activate it twice during another player's turn and you find a land both times, the second time you can't play it.

EDIT 2: I think I made it right this time!
Code: Select all
<?xml version='1.0'?>
<CARD_V2>
  <FILENAME text="FASTBOND_3848141" />
  <CARDNAME text="FASTBOND" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Fastbond]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Legame Rapido]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Schnellbund]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Enchaînements]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Fastbond]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Fastbond]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Fastbond]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Fastbond]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Fastbond]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="3848141" />
  <ARTID value="3848141" />
  <ARTIST name="Mark Poole" />
  <CASTING_COST cost="{G}" />
  <TYPE metaname="Enchantment" />
  <EXPANSION value="DPE" />
  <RARITY metaname="R" />
  <STATIC_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[You may play any number of additional lands on each of your turns.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Puoi giocare un qualsiasi numero di terre addizionali in ciascuno dei tuoi turni.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Jedesmal wenn Du an der Reihe bist, kannst Du so viele Länder ins Spiel bringen, wie Du willst.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[You may play any number of additional lands on each of your turns.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[You may play any number of additional lands on each of your turns.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[You may play any number of additional lands on each of your turns.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[You may play any number of additional lands on each of your turns.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[You may play any number of additional lands on each of your turns.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[You may play any number of additional lands on each of your turns.]]></LOCALISED_TEXT>
    <CONTINUOUS_ACTION layer="8">
    local player = EffectController()
    if player:MyTurn() ~= 0 then
        player:GetCurrentCharacteristics():Int_Set( PLAYER_INTCHARACTERISTIC_EXTRA_LAND_DROPS, 60 )
    end
    </CONTINUOUS_ACTION>
  </STATIC_ABILITY>
  <TRIGGERED_ABILITY LKI_shield_effect_source="1" dangerous="1">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever you play a land, if it wasn’t the first land you played this turn, Fastbond deals 1 damage to you.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogniqualvolta giochi una terra, se non era la prima terra giocata in questo turno, il Legame Rapido ti infligge 1 danno.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Schnellbund fügt Dir 1 Punkt Schaden für jedes weitere Land zu, das Du nach dem ersten Land im selben Zug ins Spiel bringst.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Whenever you play a land, if it wasn’t the first land you played this turn, Fastbond deals 1 damage to you.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Whenever you play a land, if it wasn’t the first land you played this turn, Fastbond deals 1 damage to you.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Whenever you play a land, if it wasn’t the first land you played this turn, Fastbond deals 1 damage to you.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Whenever you play a land, if it wasn’t the first land you played this turn, Fastbond deals 1 damage to you.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Whenever you play a land, if it wasn’t the first land you played this turn, Fastbond deals 1 damage to you.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Whenever you play a land, if it wasn’t the first land you played this turn, Fastbond deals 1 damage to you.]]></LOCALISED_TEXT>
    <TRIGGER value="LAND_PLAYED" simple_qualifier="objectyoucontrol">
    local player = EffectController()
    if player ~= nil then
       local chest = ObjectDC() and ObjectDC():Get_Chest(1)
       if chest ~= nil then
          for i=0,MTG():GetNumberOfStartingPlayers()-1 do
             if player == MTG():GetNthStartingPlayer(i) and chest:Get_Int(i) ~= 0 then
                return true
             end
          end
       end
    end
    return false
    </TRIGGER>
    <RESOLUTION_TIME_ACTION>
    local player = EffectController()
    if player ~= nil then
       local source = EffectSource()
       if source == nil then
          source = Object()
       end
       player:DealDamage(1, source)
    end
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
  <TRIGGERED_ABILITY internal="1" active_zone="ZONE_ANY">
    <TRIGGER value="LAND_PLAYED">
    local player = TriggerObject():GetPlayer()
    if player ~= nil then
       local chest = ObjectDC() and ObjectDC():Get_Chest(1)
       if chest ~= nil then
          for i=0,MTG():GetNumberOfStartingPlayers()-1 do
             if player == MTG():GetNthStartingPlayer(i) and chest:Get_Int(i) ~= 0 then
                return false
             end
          end
       end
    end
    return true
    </TRIGGER>
    <RESOLUTION_TIME_ACTION>
    local chest = ObjectDC() and ObjectDC():Get_Chest(1)
    if chest == nil then
       chest = ObjectDC():Make_Chest(1)
    end
    for i=0,MTG():GetNumberOfStartingPlayers()-1 do
       local player = MTG():GetNthStartingPlayer(i)
       if player == TriggerObject():GetPlayer() then
          chest:Set_Int(i, 1)
       end
    end
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
  <TRIGGERED_ABILITY internal="1" active_zone="ZONE_ANY">
    <TRIGGER value="BEGINNING_OF_STEP" simple_qualifier="controller">
    return MTG():GetStep() == STEP_END_OF_TURN
    </TRIGGER>
    <RESOLUTION_TIME_ACTION>
    ObjectDC():Free_Compartment(1)
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
  <TRIGGERED_ABILITY internal="1" active_zone="ZONE_ANY">
    <TRIGGER value="ZONECHANGE_BEGIN" simple_qualifier="self" to_zone="ZONE_ANY" from_zone="ZONE_ANY">
    if ( ObjectDC() and ObjectDC():Get_Chest(1) ) ~= nil then
       MTG():CreateDelayedTrigger( 1, ObjectDC():Get_Chest(1) )
    end
    return false
    </TRIGGER>
  </TRIGGERED_ABILITY>
  <TRIGGERED_ABILITY resource_id="1" internal="1" active_zone="ZONE_ANY">
    <TRIGGER value="ZONECHANGE_END" simple_qualifier="self" to_zone="ZONE_ANY" from_zone="ZONE_ANY" />
    <RESOLUTION_TIME_ACTION>
    local chest = ObjectDC() and ObjectDC():Get_Chest(1)
    if chest == nil then
       chest = ObjectDC():Make_Chest(1)
    end
    for i=0,MTG():GetNumberOfStartingPlayers()-1 do
       chest:Set_Int( i, EffectDC():Get_Int(i) )
    end
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
</CARD_V2>
I copied the trick from Mount Keralia which saves a pointer to the player when you need to remember that player for some reason. The trick is good anytime you have to remember a player or not, you can't keep a count... and in this case you don't need to keep a count for played lands: either a player has already played one land, or not. I made some changes to make it remember the saved data through zone changes. If a player isn't saved in the ObjectDC already, it means it's the first land, so the second LAND_PLAYED trigger starts, and saves the player (I'm just writing 1 in the register inside a chest). Otherwise, the first LAND_PLAYED trigger starts and deals 1 damage (of course only when Fastbond is in play, while the other triggers work in any zone).
The third trigger deletes the saved players at the end of each turn, while the fourth trigger should prevent the ObjectDC from being wiped during zone changes, because it will set a delayed trigger that will write the saved values again after the zone change has been completed.

EDIT 3: Attachment removed. New fix here:
viewtopic.php?f=64&t=4557&p=113807#p113807

Re: Card Creation Request Thread

PostPosted: 26 Mar 2013, 17:49
by nivmizzet1
thefiremind wrote:Test it and tell me if it works (especially if you play a land before playing Fastbond, then play Fastbond and finally another land).
unfortunately, your suspicions were well founded. If I play a land and THEN Fastbond, the next land I play does not trigger damage.

It's still streaks ahead of what I had though, and I'm happy playing with it as is :D

Re: Card Creation Request Thread

PostPosted: 26 Mar 2013, 19:26
by thefiremind
I edited the previous topic with a new version. I tested it this time, and it seems to work. I had the idea of saving the values in a delayed trigger before the zone change, then that delayed trigger will set the values again after the zone change.

Re: Card Creation Request Thread

PostPosted: 27 Mar 2013, 01:30
by nivmizzet1
It's working how it should now...mostly. I noticed that the third trigger(?) doesn't come into effect when you take an extra turn, a la Time Warp, so if you played a land in your first turn, then when you play your first land in your extra turn you are dealt damage by fastbond. Is this a problem with how they've coded the "extra turn" in Time Warp though?

Re: Card Creation Request Thread

PostPosted: 27 Mar 2013, 09:57
by thefiremind
nivmizzet1 wrote:It's working how it should now...mostly. I noticed that the third trigger(?) doesn't come into effect when you take an extra turn, a la Time Warp, so if you played a land in your first turn, then when you play your first land in your extra turn you are dealt damage by fastbond. Is this a problem with how they've coded the "extra turn" in Time Warp though?
That's strange... I used an "at the beginning of each end step" trigger, which should work anyway, otherwise there would be other cards not working before extra turns. I can investigate further, but it would be just trial and error, because I can't see any problem.

EDIT: I recoded it completely and it seems OK now. It took me about one hour to come to this result, I really hope it's finally done.

Re: Card Creation Request Thread

PostPosted: 27 Mar 2013, 16:03
by AriesKiki
Mates, is Necropotence possible? (Sorry if this was answered before...)

Re: Card Creation Request Thread

PostPosted: 27 Mar 2013, 16:26
by thefiremind
Skipping a step isn't possible. As long as you only draw one (or more) card(s) during the draw step, you can override the draws during the draw step, giving the illusion that you are skipping it... but if there's a card that wants you to do something else during the draw step, the trick won't work anymore.

Re: Card Creation Request Thread

PostPosted: 27 Mar 2013, 23:14
by nivmizzet1
thefiremind wrote:
nivmizzet1 wrote:It's working how it should now...mostly. I noticed that the third trigger(?) doesn't come into effect when you take an extra turn, a la Time Warp, so if you played a land in your first turn, then when you play your first land in your extra turn you are dealt damage by fastbond. Is this a problem with how they've coded the "extra turn" in Time Warp though?
That's strange... I used an "at the beginning of each end step" trigger, which should work anyway, otherwise there would be other cards not working before extra turns. I can investigate further, but it would be just trial and error, because I can't see any problem.

EDIT: I recoded it completely and it seems OK now. It took me about one hour to come to this result, I really hope it's finally done.
That is awesome. You're amazing! I totally wasn't expecting a fix for that. It seems to be working as expected now too, so a job very well done! :)

Re: Card Creation Request Thread

PostPosted: 28 Mar 2013, 07:16
by Atlas
Hey guys i was just wondering if anyone has a copy of the werewolf cards, im looking to make something tribal with them because i dnt think they get enough credit :)
thanks in advance

Re: Card Creation Request Thread

PostPosted: 29 Mar 2013, 06:01
by Kieran
I have a request. Is it possible for someone to make Deathpact Angel, Brilliant Ultimatum, Soul Ransom, and Clarion Ultimatum? I'm asking before I start looking for similiar coded cards because my time will be rather limited in the next few days. If someone could make them, assuming their possible, that would be great.

The only request I'll have after these are the 11 Cipher cards. Or @ least the code for the Cipher mechanic.

Call of the Nightwing
Hands of Binding
Last Thoughts
Mental Vapors
Midnight Recovery
Paranoid Delusions
Shadow Slice
Stolen Identity
Undercity Plague
Voidwalk
Whispering Madness