Page 69 of 102

Re: Card Creation Request Thread

PostPosted: 28 May 2013, 15:55
by Scion of Darkness
Just one last question i made some more ogres with this filter code here:
Code: Select all
  <TRIGGER value="BEGINNING_OF_STEP" simple_qualifier="controller">
    return (  EffectDC():Get_PlayerPtr(0):MyTurn() ~= 0 ) and ( MTG():GetStep() == STEP_UPKEEP )
    </TRIGGER>
   <FILTER>
     return (FilteredCard():GetSubType():Test(CREATURE_TYPE_OGRE) == 0 and
    FilteredCard():GetZone() == ZONE_IN_PLAY and
     FilteredCard():GetPlayer() == Object():GetPlayer())
    </FILTER>
   <RESOLUTION_TIME_ACTION>
   if FilteredCard() == nil then
   local player = EffectController()
    local filter = Object():GetFilter()
    filter:Clear()
    filter:NotTargetted()
    filter:SetController( player )
    filter:SetZone( ZONE_IN_PLAY )
    filter:AddCardType( CARD_TYPE_CREATURE )
    filter:SetHint( HINT_ENEMY, player )
    player:ChooseTarget( NO_VALIDATION, "CARD_QUERY_CHOOSE_CREATURE_TO_SACRIFICE", EffectDC():Make_Targets(0) )
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
    if target ~= nil then
       target:Sacrifice(EffectController())
    end
    </RESOLUTION_TIME_ACTION>
and
Code: Select all
<TRIGGER value="BEGINNING_OF_STEP" simple_qualifier="controller">
    return (  EffectDC():Get_PlayerPtr(0):MyTurn() ~= 0 ) and ( MTG():GetStep() == STEP_UPKEEP )
    </TRIGGER>
   <FILTER>
     return (FilteredCard():GetSubType():Test(CREATURE_TYPE_OGRE) == 0 and
    FilteredCard():GetZone() == ZONE_IN_PLAY and
     FilteredCard():GetPlayer() == Object():GetPlayer())
    </FILTER>
   <RESOLUTION_TIME_ACTION>
   if FilteredCard() == nil then
   MillCards( EffectController, 1 )
    end
   </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
and this don't crash the game but returns the folowing error (TRIGGER) [2643]"]:2: attempt to index a nil value why?

Re: Card Creation Request Thread

PostPosted: 28 May 2013, 15:58
by thefiremind
Scion of Darkness wrote:and this don't crash the game but returns the folowing error (TRIGGER) [2643]"]:2: attempt to index a nil value why?
Because you didn't set that PlayerPtr(0) anywhere before using it.
You also forgot () after EffectController in the RESOLUTION_TIME_ACTION of the second trigger.

EDIT: now that I look at your code better, I think it doesn't have much sense... you are doing something if FilteredCard() == nil... to be honest I really don't know how many times that code will be executed. Which abilities are you trying to make?

---------------------------------

Here's Lim-Dûl's Vault for libertyfighter. It also includes a TEXT_PERMANENT XML because understanding the query is crucial in my implementation. The problem is, it seems that the AI doesn't understand the purpose of the card, so it never uses it. Here you can find sumomole's attempt, but it suffers the same problem. If someone finds a better implementation, please share it.

Re: Card Creation Request Thread

PostPosted: 28 May 2013, 16:06
by Scion of Darkness
i'll upload the cards its better =S

Re: Card Creation Request Thread

PostPosted: 28 May 2013, 16:11
by thefiremind
The "At the beginning of your upkeep" trigger is always the same, you don't need to use any pointers... copy the trigger condition from Ajani's Mantra or from another similar card. Then if you need to check whether you control an Ogre or not, do this:
Code: Select all
    <RESOLUTION_TIME_ACTION>
    local filter = Object():GetFilter()
    filter:Clear()
    filter:SetZone( ZONE_IN_PLAY )
    filter:SetController( EffectController() )
    filter:AddSubType( CREATURE_TYPE_OGRE )
    if filter:CountStopAt(1) == 0 then
       -- You don't control an Ogre, do your thing here.
    end
    </RESOLUTION_TIME_ACTION>
No need to use <FILTER> blocks, those are useful only if you need to do the same thing on a lot of cards (i.e. Pyroclasm, Damnation, etc.), but they aren't suited for counting.

P.S.: I used filter:CountStopAt(1) because you don't need to know exactly how many Ogres you control, just one is enough to invalidate the condition. If you ever need to count them all, you'll have to use filter:Count() which won't stop until all of them have been counted.

Re: Card Creation Request Thread

PostPosted: 28 May 2013, 16:26
by Master Necro
Master Necro wrote:Thanks! :)

And I still need Soul Seizer , Loyal Cathar and Cloistered Youth . :)
I have made a working Cloistered Youth , now I only need Soul Seizer and Loyal Cathar. :)

Re: Card Creation Request Thread

PostPosted: 29 May 2013, 00:28
by gorem2k
I would like Stranglehold and Boldwyr Heavyweights, please! and I also need a decent artwork for Thundercloud Shaman; mine is crap 320 x 200 px or something... thanks a lot.

Re: Card Creation Request Thread

PostPosted: 29 May 2013, 01:10
by sumomole
gorem2k wrote:I would like Stranglehold and Boldwyr Heavyweights, please! and I also need a decent artwork for Thundercloud Shaman; mine is crap 320 x 200 px or something... thanks a lot.
Stranglehold is impossible.

Re: Card Creation Request Thread

PostPosted: 29 May 2013, 01:23
by gorem2k
Stranglehold is impossible.
:(

I was just looking the list of PLAYER_CHARACTERISTIC_CANT_ and you're right there are things for lifegain or abilities but no search library.

alright then, I'll try another way to make this 8/8 playable.

Re: Card Creation Request Thread

PostPosted: 29 May 2013, 02:54
by AriesKiki
May I request Kazuul, Tyrant of the Cliffs? Thanks!

Re: Card Creation Request Thread

PostPosted: 29 May 2013, 03:55
by NEMESiS
sumomole wrote:Transguild Promenade=Avatar of Discord(main), the format of conditional cost as same as ohter cost, e.g.Kicker.

This is what I have:

Code: Select all
    <TRIGGER value="ZONECHANGE_END" simple_qualifier="self" to_zone="ZONE_IN_PLAY" />
    <TARGET_DEFINITION id="6">
    local filter = Object():GetFilter()
    filter:Clear()
    filter:SetPlayer( EffectController() )
    filter:NotTargetted()
    </TARGET_DEFINITION>
    <RESOLUTION_TIME_ACTION>
    local controller = EffectController()
    if controller ~= nil and AtLeastNTargetsFromDefinition( 6 ) == 1 then
       controller:BeginNewMultipleChoice()
       controller:AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_YES" )
       controller:AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_NO" )
        controller:AskMultipleChoiceQuestion( "CONDITIONAL_QUESTION_BODY" )
    end
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local controller = EffectController()
    if controller ~= nil then
       if controller:CanAfford("{1}") == 1 and Object():GetMultipleChoiceResult() == 0 then
          ObjectDC():Set_Int( 6 )
          controller:TapLand("{1}")
       elseif EffectSource() ~= nil then
          EffectSource():Sacrifice(controller)
       end
    end
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>
Now it sacrifices itself if there are no lands but I don't get to answer anything when there is one. What am I doing wrong?

Re: Card Creation Request Thread

PostPosted: 29 May 2013, 05:30
by Master Necro
Master Necro wrote:
I have made a working Cloistered Youth , now I only need Soul Seizer and Loyal Cathar. :)
Believe it or not I have managed to make Soul Seizer all by my self and it works. :)

But the Loyal Cathar is obviously beyond what I can do, I did try but I get crashes, could anyone take a look please:

Re: Card Creation Request Thread

PostPosted: 29 May 2013, 05:51
by sumomole
AriesKiki wrote:May I request Kazuul, Tyrant of the Cliffs? Thanks!
Kazuul, Tyrant of the Cliffs.zip
(193.6 KiB) Downloaded 161 times


NEMESiS wrote:Now it sacrifices itself if there are no lands but I don't get to answer anything when there is one. What am I doing wrong?
I hope you look the code of Avatar of Discord, it has the answer you need, when you use conditional cost, if you pay, the action with conditional="if" will resolves, if not, the action with conditional="else" will resolves.
condition cost | Open
Code: Select all
  <TRIGGERED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[When Transguild Promenade enters the battlefield, sacrifice it unless you pay {1}.]]></LOCALISED_TEXT>
    <TRIGGER value="ZONECHANGE_END" simple_qualifier="self" to_zone="ZONE_IN_PLAY" />
     <COST type="Mana" cost="{1}" qualifier="conditional" />
    <RESOLUTION_TIME_ACTION conditional="else">
    if EffectSource() ~= nil then
       EffectSource():Sacrifice(EffectController()) 
    end
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>

Re: Card Creation Request Thread

PostPosted: 29 May 2013, 06:11
by BloodReyvyn
AriesKiki wrote:May I request Kazuul, Tyrant of the Cliffs? Thanks!
https://www.dropbox.com/s/tceslyabsi5xe ... ip?v=0rc-s

edit: damn you sumo :P

lol

Anyways, this card was really easy to do since thefiremind already made Slumbering Dragon, just use the same trigger (since there are no planeswalkers) and use the createtoken command.

Re: Card Creation Request Thread

PostPosted: 29 May 2013, 06:26
by sumomole
Master Necro wrote:
Master Necro wrote:
I have made a working Cloistered Youth , now I only need Soul Seizer and Loyal Cathar. :)
Believe it or not I have managed to make Soul Seizer all by my self and it works. :)

But the Loyal Cathar is obviously beyond what I can do, I did try but I get crashes, could anyone take a look please:
Firstly, you need a delayed trigger ability, because it has "at the beginning of the next end step".
Secondly, you need to transform it before it comes into play, I'm not sure whether firemind's transform function can do this.
Thirdly, the second ability of Loyal Cathar will affect other double-faced cards, if another double-faced card that becomes a copy of Loyal Cathar and then dies will return to the battlefield with its back face up.
Good luck! 8)

Re: Card Creation Request Thread

PostPosted: 29 May 2013, 07:14
by Master Necro
sumomole wrote:
Master Necro wrote:
Master Necro wrote:
I have made a working Cloistered Youth , now I only need Soul Seizer and Loyal Cathar. :)
Believe it or not I have managed to make Soul Seizer all by my self and it works. :)

But the Loyal Cathar is obviously beyond what I can do, I did try but I get crashes, could anyone take a look please:
Firstly, you need a delayed trigger ability, because it has "at the beginning of the next end step".
Secondly, you need to transform it before it comes into play, I'm not sure whether firemind's transform function can do this.
Thirdly, the second ability of Loyal Cathar will affect other double-faced cards, if another double-faced card that becomes a copy of Loyal Cathar and then dies will return to the battlefield with its back face up.
Good luck! 8)
Phew that's lot of stuff. :shock: #-o

But to no surprise whatsoever, I have an issue with another card, the Deranged Assistant .

It produces mana as soon as it goes on the battlefield and doesn't let me pay the cost first, I have looked up cards such as Avacyn's Pilgrim , Llanowar Elves and Silver Myr and they all have the same code so why won't Deranged Assistant work properly?

Help would be greatly appreciated.