Page 53 of 102

Re: Card Creation Request Thread

PostPosted: 11 May 2013, 15:11
by NEMESiS
Does any have Rhystic Study?

Re: Card Creation Request Thread

PostPosted: 11 May 2013, 15:12
by Master Necro
sumomole wrote:
thefiremind wrote:
sumomole wrote:I do not quite understand what you mean
Try my code and you'll see that protecting the card pointer doesn't have any effect. In fact, if you substitute the ZONECHANGE_BEGIN trigger with a ZONECHANGE_END trigger and protect the card pointer before setting the delayed trigger, you'll be able to do one more action (exiling the spell), but it won't be attached to the creature.

sumomole wrote:if a card with haunt is removed from the graveyard in response to its haunt ability triggering, the haunt ability will resolve.
MTG Salvation wrote:If a card with haunt is removed from the graveyard in response to its haunt ability triggering, the haunt ability will resolve. But since the card can't be removed from the game, it won't haunt the target creature.
If you address the card with Object(), the pointer will never be lost and in this case the haunt ability will resolve AND haunt the target creature.
I know what you said now :mrgreen:

EDIT: Test this?

Benediction of Moons | Open
Code: Select all
  <TRIGGERED_ABILITY resource_id="1">
    <CLEANUP fire_once="1" />
    <CLEANUP simple_cleanup="EndOfTurn" />
    <TRIGGER value="ZONECHANGE_BEGIN" to_zone="ZONE_GRAVEYARD" from_zone="ZONE_STACK">
    EffectDC():Protect_CardPtr(COMPARTMENT_ID_EFFECT_SOURCE)
    return TriggerObject() ~= nil and TriggerObject() == EffectDC():Get_CardPtr(1)
    </TRIGGER>
    <TARGET_DEFINITION id="0">
    local filter = Object():GetFilter()
    filter:Clear()
    filter:AddCardType( CARD_TYPE_CREATURE )
    filter:SetZone( ZONE_IN_PLAY )
    filter:SetHint( HINT_NEUTRAL, EffectController() )
    </TARGET_DEFINITION>
    <TARGET_DETERMINATION>
    return AtLeastOneTargetFromDefinition(0)
    </TARGET_DETERMINATION>
    <PLAY_TIME_ACTION target_choosing="1">
    EffectController():ChooseTarget( 0, "CARD_QUERY_CHOOSE_CREATURE_TO_HAUNT", EffectDC():Make_Targets(0) )
    </PLAY_TIME_ACTION>
    <PLAY_TIME_ACTION>
    if EffectSource() ~= nil and EffectSource():GetZone() == ZONE_GRAVEYARD then
      EffectDC():Protect_CardPtr(COMPARTMENT_ID_EFFECT_SOURCE)
    end
    </PLAY_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
    ObjectDC():Free_Compartment(0)
    if target ~= nil and EffectSource() ~= nil then
      if EffectSource():GetZone() == ZONE_GRAVEYARD then
        EffectSource():RemoveFromGame()
      end
      if EffectSource():GetZone() == ZONE_REMOVED_FROM_GAME then
         EffectSource():NailOnto( target )
        ObjectDC():Set_CardPtr(0, target)
      end
    end
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
Works like a charm so far. :)

Btw anyone have the code for the Derge skill? :)

And I really, really need the Golgari Cluestone.

Re: Card Creation Request Thread

PostPosted: 11 May 2013, 15:57
by Kieran
I wasn't aware of that pertaining to Cavern of Souls. And my fingers are crossed.

Re: Card Creation Request Thread

PostPosted: 11 May 2013, 16:04
by thefiremind
This was much harder than Ink-Treader Nephilim... I won't be doing any card that has something to do with copies for a looooong time. :lol:

I'm not sure if the AI can understand how to use it: I made my tests with weenies to be quicker, so the choice about which creature to enchant wasn't a big deal. With a big creature on the battlefield, who knows...

Re: Card Creation Request Thread

PostPosted: 11 May 2013, 16:12
by sumomole
NEMESiS wrote:Does any have Rhystic Study?
Code: Select all
  <TRIGGERED_ABILITY auto_skip="1">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever an opponent casts a spell, you may draw a card unless that player pays {1}.]]></LOCALISED_TEXT>
    <TRIGGER value="SPELL_PLAYED">
    return TriggerPlayer():GetTeam() ~= EffectController():GetTeam()
    </TRIGGER>
    <RESOLUTION_TIME_ACTION>
    local opponent = TriggerPlayer()
    if opponent ~= nil and opponent:CanAfford("{1}") == 1 then
       opponent:BeginNewMultipleChoice()   
       opponent:AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_PAY_1" )   
       opponent:AddMultipleChoiceAnswer( "CARD_QUERY_DO_NOTHING" )   
       opponent:AskMultipleChoiceQuestion( "CARD_QUERY_MC_CHOOSE_MODE" )
    end
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local opponent = TriggerPlayer()
    local decision = Object():GetMultipleChoiceResult()
    if opponent ~= nil and opponent:CanAfford("{1}") == 1 then
      if decision ~= 1 then
        opponent:TapLand("{1}")
      else        
         EffectDC():Set_Int(0, 1)
      end     
    else        
      EffectDC():Set_Int(0, 1)
    end
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local player = EffectController()
    if player:IsAI() == 0 and EffectDC():Get_Int(0) == 1 then
       player:BeginNewMultipleChoice()   
       player:AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_YES" )   
       player:AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_NO" )   
       player:AskMultipleChoiceQuestion( "CARD_QUERY_DRAW_A_CARD")
    end
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local player = EffectController()
    if player:IsAI() == 0 and EffectDC():Get_Int(0) == 1 then
       local decision = Object():GetMultipleChoiceResult()
       if decision == 0 then
          player:DrawCard()
       end
    elseif CountCardsInLibrary(player) &gt; 5 and EffectDC():Get_Int(0) == 1 then
       player:DrawCard()
    end
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>

Re: Card Creation Request Thread

PostPosted: 11 May 2013, 16:14
by Scion of Darkness
Fire i need some more help the code you sent removes the top card as expected but fails to return them to hand can you take a look please?

Re: Card Creation Request Thread

PostPosted: 11 May 2013, 16:30
by thefiremind
Scion of Darkness wrote:Fire i need some more help the code you sent removes the top card as expected but fails to return them to hand can you take a look please?
I didn't notice that you wrote PutIntoHand rather than PutInHand... #-o If you search for SCRIPT_LOG.TXT in your game directory and open it, I'm sure that you can find a clue about that.

By the way, everyone here should get used with posting SCRIPT_LOG.TXT contents when reporting a card that doesn't work: it would make fixing much quicker.

Re: Card Creation Request Thread

PostPosted: 11 May 2013, 16:59
by becauseafrica
is it possible to code Proclamation of Rebirth ? I will be happy if somebody make it
(maybe without forecast)

Re: Card Creation Request Thread

PostPosted: 11 May 2013, 18:26
by thefiremind
becauseafrica wrote:is it possible to code Proclamation of Rebirth ? I will be happy if somebody make it
(maybe without forecast)
Forecast isn't a problem... well, not a big one. The annoying thing is that DotP can't notice if there's something that can be done only during the upkeep, so you aren't given the time to do that unless you are responding to something else. That's why I added a "dummy" trigger that does nothing but giving you time to activate the forecast (if you can afford {5} {W}). The only downside is that if you have multiple cards with forecast in your hand, each one will give you that time and you'll have to wait for too long. In short, if someone wants to make a forecast deck, we'll need a better idea. :lol:

Re: Card Creation Request Thread

PostPosted: 11 May 2013, 18:45
by sumomole
thefiremind wrote:
becauseafrica wrote:is it possible to code Proclamation of Rebirth ? I will be happy if somebody make it
(maybe without forecast)
Forecast isn't a problem... well, not a big one. The annoying thing is that DotP can't notice if there's something that can be done only during the upkeep, so you aren't given the time to do that unless you are responding to something else. That's why I added a "dummy" trigger that does nothing but giving you time to activate the forecast (if you can afford {5} {W}). The only downside is that if you have multiple cards with forecast in your hand, each one will give you that time and you'll have to wait for too long. In short, if someone wants to make a forecast deck, we'll need a better idea. :lol:
The "dummy" trigger: :mrgreen:
Code: Select all
  <TRIGGERED_ABILITY priority="-10" active_zone="ZONE_HAND">
     <TRIGGER value="BEGINNING_OF_STEP" simple_qualifier="controller">
    local filter = Object():GetFilter()
    filter:Clear()
    filter:NotTargetted()
    filter:SetZone( ZONE_HAND )
    filter:SetController( EffectController() )
    filter:AddCardName( Object():GetCardName() )
    local total = filter:EvaluateObjects()
    if total &gt; 0 then
      if Object() == filter:GetNthEvaluatedObject(0) then   
        filter:Clear()
        filter:AddCardType( CARD_TYPE_CREATURE )
        filter:SetPlayer( EffectController() )
        filter:SetZone( ZONE_GRAVEYARD )
        filter:SetConvertedCostMax(1)
        if filter:CountStopAt( 1 ) == 1 then
          return ( EffectController():MyTurn() ~= 0 ) and ( MTG():GetStep() == STEP_UPKEEP ) and ( EffectController():CanAfford("{5}{W}") == 1 )
        end
      end
    end
      return false
    </TRIGGER>
    <RESOLUTION_TIME_ACTION />
  </TRIGGERED_ABILITY>

Re: Card Creation Request Thread

PostPosted: 11 May 2013, 18:47
by NEMESiS
sumomole wrote:
NEMESiS wrote:Does any have Rhystic Study?
Code: Select all
  <TRIGGERED_ABILITY auto_skip="1">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever an opponent casts a spell, you may draw a card unless that player pays {1}.]]></LOCALISED_TEXT>
    <TRIGGER value="SPELL_PLAYED">
    return TriggerPlayer():GetTeam() ~= EffectController():GetTeam()
    </TRIGGER>
    <RESOLUTION_TIME_ACTION>
    local opponent = TriggerPlayer()
    if opponent ~= nil and opponent:CanAfford("{1}") == 1 then
       opponent:BeginNewMultipleChoice()   
       opponent:AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_PAY_1" )   
       opponent:AddMultipleChoiceAnswer( "CARD_QUERY_DO_NOTHING" )   
       opponent:AskMultipleChoiceQuestion( "CARD_QUERY_MC_CHOOSE_MODE" )
    end
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local opponent = TriggerPlayer()
    local decision = Object():GetMultipleChoiceResult()
    if opponent ~= nil and opponent:CanAfford("{1}") == 1 then
      if decision ~= 1 then
        opponent:TapLand("{1}")
      else        
         EffectDC():Set_Int(0, 1)
      end     
    else        
      EffectDC():Set_Int(0, 1)
    end
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local player = EffectController()
    if player:IsAI() == 0 and EffectDC():Get_Int(0) == 1 then
       player:BeginNewMultipleChoice()   
       player:AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_YES" )   
       player:AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_NO" )   
       player:AskMultipleChoiceQuestion( "CARD_QUERY_DRAW_A_CARD")
    end
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local player = EffectController()
    if player:IsAI() == 0 and EffectDC():Get_Int(0) == 1 then
       local decision = Object():GetMultipleChoiceResult()
       if decision == 0 then
          player:DrawCard()
       end
    elseif CountCardsInLibrary(player) &gt; 5 and EffectDC():Get_Int(0) == 1 then
       player:DrawCard()
    end
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
Thank you. :D

Master Necro wrote:
And I really, really need the Golgari Cluestone.
Here you go:

Re: Card Creation Request Thread

PostPosted: 11 May 2013, 22:59
by Kieran
Perhaps now would be a good time to request all the Cluestones. Also, thanks for the Infinite Reflection. And thanks in general for everyone's effort.

Re: Card Creation Request Thread

PostPosted: 12 May 2013, 05:09
by MalevolentZero
I'm still really hoping someone can do the rest of my requests! I made a somewhat playable version of my Nephilim deck, but its so slow and unreliable without some good mana filtering T.T. I'd really appreciate it!

Reposting for convenience:
Phyrexian Unlife
Orochi Leafcaller
Chromatic Lantern
Soul's Grace (not necessarily necessary xP)

Also, does anyone know if Cabal Coffers has been done already? To me it seems like it would already have been a popular request due to its power.

Re: Card Creation Request Thread

PostPosted: 12 May 2013, 08:19
by thefiremind
MalevolentZero wrote:Phyrexian Unlife
Could you please take a good look at the previous page of this topic? :mrgreen: :wink:

Re: Card Creation Request Thread

PostPosted: 12 May 2013, 08:54
by Master Necro
NEMESiS wrote:
Here you go:
Thanks a million man! :)

So is the Dredge skill possible to code in the game?