Page 56 of 253

Re: Community Wad

PostPosted: 19 Jun 2015, 12:07
by cenarius
sweetLu wrote:A complete rule compliant Static Orb will be a little complicated. For starters you cannot have the filter for selecting which two permanents to untap set to all permanents. For instance, you cannot untap a creature affected by Frost Breath 's ability. So you would need to filter out any permanent that otherwise would not untap.


Secondly, it would take some work to make it rule compliant with other orb-like cards. For instance if Winter Orb and Static Orb are in play you have to apply both of their restrictions. So possible combinations include up to either 1 land and 1 non-land or 2 non-land permanents. Or more simply if you have 2x Static Orb in play you could only untap 2 permanents. With the quick look of what you have you would be able to untap 4 permanents. The best way to handle multiple orb effects, IMO, would be to use a token manager and have the individual orbs set some values in a game chest depending on the applicable restrictions.



Thirdly, you shouldn't let me talk because I made Winter Orb and didn't account for either of these things besides accounting for multiple copies of Winter Orb :D . I have a semi-compliant version floating around somewhere if you would like an example.


Edit: to actually answer your question you should be able to add something like this to the return part of the triggered ability:

"and EffectSource():IsTapped() == false"

You could probably get the exact syntax off Trinisphere
Yup i know, i have to admit i go with one problem at a time, and for me making the "basic" card was the priority, but it seems it was much complicated to code than expected. I guess i will wait for Xander9009's response to see if his way is better and more effective than mine (which i think it will, and by far).

Thanks for the reply ;)

Re: Community Wad

PostPosted: 19 Jun 2015, 13:14
by Kithkin
The Community Wad Art folder on GD contains a RETURN_TO_RAVNIVA txt file dated 17.06.2015, but no wad file with that date.

Re: Community Wad

PostPosted: 19 Jun 2015, 13:54
by Kithkin
Dominate -- only gains control of creatures with CMC = 0

Re: Community Wad

PostPosted: 19 Jun 2015, 16:18
by Xander9009
cenarius wrote:
Xander9009 wrote:...
Of course i'm going to try it! i'm about to pull my hair off in here man.

But it doesn't work. That, and it seems to have a lot of errors, which i'm trying to fix, just syntaxis errors though. After those fixed, i tested the card and the "stasis" icon appears on the cards, which means the effect is "on" but then when it's my turn it doesn't asks me for untaping permanents, just allows me to target but does nothing, game gets stuck in there, not freeze, just like waiting for me to do somethign but i'm not able to do anything but selecting.

And after that, it throws me this error:
Code: Select all
(RESOLUTION_TIME_ACTION)~0x0000037a"]:7: attempt to call method 'GetStartingPlayer' (a nil value)
I looked into it but it seems that or you got mistaken with the method or forgot to declare it.

And also, about your pervious message, who is this "manager"? i want to speak with him about some seriour business please :p

Translation: I have no idea.
I fixed that error (because I noticed it) but apparently only corrected my local copy and not the copy in my post. Should be MTG():GetNthStartingPlayer().
Untested Static Orb code | Open
Code: Select all
   <STATIC_ABILITY linked_ability_group="1">
      <FILTER filter_id="0">
         local NumPlayers = MTG():GetNumberOfStartingPlayers()
         local PlayerID = -1
         for i=0,NumPlayers-1 do
            if MTG():GetNthStartingPlayer(i) ~= nil and MTG():GetNthStartingPlayer(i):MyTurn() then
               PlayerID = i
            end
         end
         if PlayerID &gt;= 0 then
         local filter = ClearFilter()
         filter:Add(FE_TEAM, OP_IS, MTG():GetNthStartingPlayer(PlayerID):GetTeam())
         local subfilter = filter:AddSubFilter_Or()
         subfilter:Add(FE_TYPE, OP_IS, CARD_TYPE_ARTIFACT)
         subfilter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
         subfilter:Add(FE_TYPE, OP_IS, CARD_TYPE_ENCHANTMENT)
         subfilter:Add(FE_TYPE, OP_IS, CARD_TYPE_LAND)
         subfilter:Add(FE_TYPE, OP_IS, CARD_TYPE_PLANESWALKER)
      </FILTER>
      <CONTINUOUS_ACTION layer="8" filter_id="0">
         local Card = FilteredCard()
         if Card ~= nil and EffectSource() ~= nil and EffectSource():IsTapped == false then
            local Found = false
            local IgnoreChest = LinkedDC()
            for i=0,3 do
               local IgnoredPlayerChest = IgnoreChest:Get_Chest(i)
               if IgnoredPlayerChest ~= nil then
                  local IgnoredCardZero = IgnoredPlayerChest:Get_CardPtr(0)
                  local IgnoredCardOne = IgnoredPlayerChest:Get_CardPtr(1)
                  if ( (IgnoredCardZero ~= nil and IgnoredCardZero == Card) or (IgnoredCardOne ~= nil and IgnoredCardOne == Card) )
                     Found = true
                  end
               end
            end
            if Found == false then
               Card:GetCurrentCharacteristics():Bool_Set( CHARACTERISTIC_DOESNT_UNTAP, 1 )
            end
         end
      </CONTINUOUS_ACTION>
   </STATIC_ABILITY>
   <TRIGGERED_ABILITY linked_ability_group="1" replacement_effect="1" priority="-10">
      <TRIGGER value="BEGINNING_OF_PLAYERS_STEP" >
         return TriggerPlayer() ~= nil and MTG():GetStep() == STEP_UNTAP and EffectSource() ~= nil and EffectSource():IsTapped == false
      </TRIGGER>
      <RESOLUTION_TIME_ACTION>
         local player = TriggerPlayer()
         local filter = ClearFilter()
         filter:Add(FE_CONTROLLER, OP_IS, player)
         local subfilter = filter:AddSubFilter_Or()
         subfilter:Add(FE_TYPE, OP_IS, CARD_TYPE_ARTIFACT)
         subfilter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
         subfilter:Add(FE_TYPE, OP_IS, CARD_TYPE_ENCHANTMENT)
         subfilter:Add(FE_TYPE, OP_IS, CARD_TYPE_LAND)
         subfilter:Add(FE_TYPE, OP_IS, CARD_TYPE_PLANESWALKER)
         local Count = filter:Count()
         if Count &gt; 0 then
            player:SetItemCount(2)
            player:SetItemPrompt( 0, "CARD_QUERY_CHOOSE_PERMANENT_TO_UNTAP" )
            player:SetItemPrompt( 1, "CARD_QUERY_CHOOSE_PERMANENT_TO_UNTAP" )
            player:ChooseItems( EffectDC():Make_Targets(0), QUERY_FLAG_UP_TO )
         end
      </RESOLUTION_TIME_ACTION>
      <RESOLUTION_TIME_ACTION>
         local TargetChest = EffectDC():Get_Targets(0)
         if TriggerPlayer() ~= nil and TargetChest ~= nil then
            local NumPlayers = MTG():GetNumberOfStartingPlayers()
            local PlayerID = -1
            for i=0,NumPlayers-1 do
               if MTG():GetNthStartingPlayer(i) ~= nil and MTG():GetNthStartingPlayer(i) == TriggerPlayer() then
                  PlayerID = i
               end
            end
            if PlayerID &gt;= 0 then
               local IgnoreChest = LinkedDC():Make_Chest(PlayerID)
               local TargetZero = TargetChest:Get_CardPtr(0)
               if TargetZero ~= nil then
                  IgnoreChest:Set_CardPtr(0, TargetZero)
               end
               local TargetOne = TargetChest:Get_CardPtr(1)
               if TargetOne ~= nil then
                  IgnoreChest:Set_CardPtr(1, TargetOne)
               end
            end
         end
      </RESOLUTION_TIME_ACTION>
   </TRIGGERED_ABILITY>
Corrected:
They would only trigger their megamorph ability if their other 'turns face up' ability's target was valid.

Kithkin wrote:The Community Wad Art folder on GD contains a RETURN_TO_RAVNIVA txt file dated 17.06.2015, but no wad file with that date.
Yes it does. That's not an error. I changed the version number in that file when testing my Check Version tool I just made. I didn't want to actually update large art wads, but just changed the version file to see if it would properly catch it. I changed it back when I was done.

Kithkin wrote:Dominate -- only gains control of creatures with CMC = 0
Strange. I looked again, but looks right. I'll test it and see what's going on.

Re: Community Wad

PostPosted: 19 Jun 2015, 18:48
by fallenangle
I think Hive Mind is crashing the game whenever I win, lose, or exit / restart. I can't tell what the problem with the card might be, but it's happened three times already, and each time it gave me the "successfully created Duels of the Planeswalkers dump" message after it crashed.

Re: Community Wad

PostPosted: 19 Jun 2015, 18:51
by cenarius
Hi again. I hope someone can guide me in the right direction here, because i'm sure i'm missing a detail here.

The card i'm currently working on is "Withdraw". I'm sure my code is right, unless like i said, there is something i'm missing.

The code:
Code: Select all
 <SPELL_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Return target creature to its owner’s hand. Then return another target creature to its owner’s hand unless its controller pays {1}.]]></LOCALISED_TEXT>
   
<TARGET tag="CARD_QUERY_CHOOSE_CREATURE_TO_PUT_INTO_HAND" definition="0" compartment="0" count="2" />
      <TARGET_DEFINITION id="0">
         local filter = ClearFilter()
         filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
      </TARGET_DEFINITION>
      <RESOLUTION_TIME_ACTION>
      count= 0
         for i = 0,(2-1) do
            local target = EffectDC():Get_Targets(0):Get_CardPtr(i)
               if   count== 0 then
                  if target ~= nil  then
                     target:PutInHand()
                  end
               else
                  if target ~= nil then
                     local controller = target:GetPlayer()
                     if controller ~= nil and controller:CanPayManaCost("{1}") then
                        controller:BeginNewMultipleChoice()
                        controller:AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_PAY_1" )
                        controller:AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_IS_PUT_INTO_HAND" )
                        controller:AskMultipleChoiceQuestion( "CARD_QUERY_MC_WITHDRAW", target )
                           if controller:GetMultipleChoiceResult() == 0 then
                              controller:PayManaCost("{1}")
                           else
                              target:PutInHand()
                           end
                        
                     else
                        target:PutInHand()
                     end
                  end
               end   
               count=count+1
         end
      </RESOLUTION_TIME_ACTION>
</SPELL_ABILITY>
Note that i created a "count" variable so the "unless its controller pays 1" ability triggers only on the second target creature.

The results:

- If any player (me or the opponent) can't pay for 1, the creature is returned to his/her hand.
- If any player can pay but choose to keep the creature in play, the mana is paid and the creature remains.
- If any player can pay but choose to return to his/her hand, it doesn't, instead the creature remains and the cost for it is done, that is, it's exactly as if he/she decided to keep the creature and pay for the mana cost (1).

Conclusion: No matter what, it doesn't return the value when choosing "controller:AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_IS_PUT_INTO_HAND" )" which is returning the creature to hand without paying the mana cost.

There must be something related with the multiple option, maybe it isn¿t possible to do all the job in one "resolution action" block?

I don't know.

Please help a new fellow here :p

Re: Community Wad

PostPosted: 19 Jun 2015, 19:25
by Xander9009
Three things I see immediately: you didn't declare count, you just started using it. To declare it so the program knows what it is, you need to put "local" before it the first time you use it; and you can't access a player's choice until the next resolution time action. Move the section that checks the choice and puts the thing in its owner's hand to a new resolution time action. To make this a bit simpler, I'd change it so you have
Code: Select all
<TARGET tag="CARD_QUERY_CHOOSE_CREATURE_TO_PUT_INTO_HAND" definition="0" compartment="0" count="2" />
<TARGET_DEFINITION id="0">
  local filter = ClearFilter()
  filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
</TARGET_DEFINITION>
<RESOLUTION_TIME_ACTION>
  local TargetOne = EffectDC():Get_Targets(0):Get_CardPtr(0)
  local TargetTwo = EffectDC():Get_Targets(0):Get_CardPtr(1)
  if TargetOne ~= nil then
    TargetOne:PutInHand()
  end
  if TargetTwo ~= nil then
    local player = TargetTwo:GetPlayer()
    EffectDC():Set_PlayerPtr(1, player)
    player:BeginNewMultipleChoice()
    player:AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_PAY_1" )
    player:AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_IS_PUT_INTO_HAND" )
    player:AskMultipleChoiceQuestion( "CARD_QUERY_MC_WITHDRAW", TargetTwo)
  end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
  local TargetTwo = EffectDC():Get_Targets(0):Get_CardPtr(1)
  local player = EffectDC():Get_PlayerPtr(1)
  if player ~= nil and TargetTwo ~= nil then
    if player:GetMultipleChoiceResult() == 0 and player:CanPayManaCost("{1}") then
      player:PayManaCost("{1}")
    else
      TargetTwo:PutInHand()
    end
  end
</RESOLUTION_TIME_ACTION>
The fact that they were in the same RTA is probably why it's not working.

Re: Community Wad

PostPosted: 19 Jun 2015, 20:25
by cenarius
Xander9009 wrote:Three things I see immediately: you didn't declare count, you just started using it. To declare it so the program knows what it is, you need to put "local" before it the first time you use it; and you can't access a player's choice until the next resolution time action. Move the section that checks the choice and puts the thing in its owner's hand to a new resolution time action. To make this a bit simpler, I'd change it so you have
Code: Select all
<TARGET tag="CARD_QUERY_CHOOSE_CREATURE_TO_PUT_INTO_HAND" definition="0" compartment="0" count="2" />
<TARGET_DEFINITION id="0">
  local filter = ClearFilter()
  filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
</TARGET_DEFINITION>
<RESOLUTION_TIME_ACTION>
  local TargetOne = EffectDC():Get_Targets(0):Get_CardPtr(0)
  local TargetTwo = EffectDC():Get_Targets(0):Get_CardPtr(1)
  if TargetOne ~= nil then
    TargetOne:PutInHand()
  end
  if TargetTwo ~= nil then
    local player = TargetTwo:GetPlayer()
    EffectDC():Set_PlayerPtr(1, player)
    player:BeginNewMultipleChoice()
    player:AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_PAY_1" )
    player:AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_IS_PUT_INTO_HAND" )
    player:AskMultipleChoiceQuestion( "CARD_QUERY_MC_WITHDRAW", TargetTwo)
  end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
  local TargetTwo = EffectDC():Get_Targets(0):Get_CardPtr(1)
  local player = EffectDC():Get_PlayerPtr(1)
  if player ~= nil and TargetTwo ~= nil then
    if player:GetMultipleChoiceResult() == 0 and player:CanPayManaCost("{1}") then
      player:PayManaCost("{1}")
    else
      TargetTwo:PutInHand()
    end
  end
</RESOLUTION_TIME_ACTION>
The fact that they were in the same RTA is probably why it's not working.
Jesus, you are totally right, i was so focused on the resolution action mess that never saw it, so embarrasing :(

But at least now i know i can't make everything on a resolution block, which i was suspecting but hey, somebody had to tell me.

Thanks man. A bit more of work and i'll be able to post my decks plus the cards i made :D

Re: Community Wad

PostPosted: 19 Jun 2015, 22:39
by RiiakShiNal
Kithkin wrote:Dominate -- only gains control of creatures with CMC = 0
The effect is probably using GetEffectX() instead of EffectSource():GetManaX().

Re: Community Wad

PostPosted: 19 Jun 2015, 23:08
by Xander9009
RiiakShiNal wrote:
Kithkin wrote:Dominate -- only gains control of creatures with CMC = 0
The effect is probably using GetEffectX() instead of EffectSource():GetManaX().
I don't see GetManaX() as a function. I see GetEffectX() and GetPaidX(). It's using GetPaidX().

| Open
Code: Select all
   <CASTING_COST cost="{X}{1}{U}{U}" />
   ...
   <SPELL_ABILITY>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Gain control of target creature with converted mana cost X or less.]]></LOCALISED_TEXT>
      ...
      <TARGET tag="CARD_QUERY_CHOOSE_CREATURE_TO_GAIN_CONTROL" definition="0" compartment="0" count="1" />
      <TARGET_DEFINITION id="0">
         local filter = ClearFilter()
         filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
         filter:Add( FE_CMC, OP_LESS_THAN_OR_EQUAL_TO, EffectSource():GetPaidX() )
      </TARGET_DEFINITION>
      <CONTINUOUS_ACTION layer="2">
         local card = EffectDC():Get_Targets(0):Get_CardPtr(0)
         if card ~= nil then
            card:SetController(EffectController())
         end
      </CONTINUOUS_ACTION>
      <DURATION>
         return (EffectDC():Get_Targets(0):Get_CardPtr(0) == nil)
      </DURATION>
   </SPELL_ABILITY>

Re: Community Wad

PostPosted: 19 Jun 2015, 23:51
by RiiakShiNal
Xander9009 wrote:I don't see GetManaX() as a function. I see GetEffectX() and GetPaidX(). It's using GetPaidX().

| Open
Code: Select all
   <CASTING_COST cost="{X}{1}{U}{U}" />
   ...
   <SPELL_ABILITY>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Gain control of target creature with converted mana cost X or less.]]></LOCALISED_TEXT>
      ...
      <TARGET tag="CARD_QUERY_CHOOSE_CREATURE_TO_GAIN_CONTROL" definition="0" compartment="0" count="1" />
      <TARGET_DEFINITION id="0">
         local filter = ClearFilter()
         filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
         filter:Add( FE_CMC, OP_LESS_THAN_OR_EQUAL_TO, EffectSource():GetPaidX() )
      </TARGET_DEFINITION>
      <CONTINUOUS_ACTION layer="2">
         local card = EffectDC():Get_Targets(0):Get_CardPtr(0)
         if card ~= nil then
            card:SetController(EffectController())
         end
      </CONTINUOUS_ACTION>
      <DURATION>
         return (EffectDC():Get_Targets(0):Get_CardPtr(0) == nil)
      </DURATION>
   </SPELL_ABILITY>
Here after CounterSpell and before GetBestOrWorstCounterType.

Re: Community Wad

PostPosted: 20 Jun 2015, 04:09
by Xander9009
RiiakShiNal wrote:Here after CounterSpell and before GetBestOrWorstCounterType.
Could have sworn I used ctrl-f on that page... Oh well. Thanks.

Re: Community Wad

PostPosted: 20 Jun 2015, 08:16
by cenarius
Xander9009 wrote:I fixed that error (because I noticed it) but apparently only corrected my local copy and not the copy in my post. Should be MTG():GetNthStartingPlayer().
I'm sorry, i was so focused on "Withdraw" that i forgot to test your code for "Static Orb".

It's tested now, but it doesn't work, it still remains asking for me to do something, but now i don't know because i can't do anything now, before i was able to select things, now nothing.

Here's the code, with some syntaxis errors fixed, tough i don't know if my corrections are ok (for example, on the "filter" block there was an "end" missing for the "if" you used so i just putted it on the lowest part). That, and the log system of the game doesn't give me any messages so i can "dig". Please take a look at this:

Code: Select all
<STATIC_ABILITY linked_ability_group="1">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[As long as Static Orb is untapped, players can’t untap more than two permanents during their untap steps.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Si l’Orbe statique est dégagée, les joueurs ne peuvent pas dégager plus de deux permanents pendant leur étape de dégagement.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Mientras la Esfera estática esté enderezada, los jugadores no pueden enderezar más de dos permanentes durante su fase de enderezar.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Wenn die Statische Sphäre nicht getappt ist, können Spieler nicht mehr als zwei bleibende Karten während ihres Enttappsegments enttappen.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Se il Globo della Staticità è STAPpato, i giocatori non possono STAPpare più di due permanenti durante il proprio STAP.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[As long as Static Orb is untapped, players can’t untap more than two permanents during their untap steps.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[As long as Static Orb is untapped, players can’t untap more than two permanents during their untap steps.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[As long as Static Orb is untapped, players can’t untap more than two permanents during their untap steps.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[As long as Static Orb is untapped, players can’t untap more than two permanents during their untap steps.]]></LOCALISED_TEXT>
        <FILTER filter_id="0">
             local NumPlayers = MTG():GetNumberOfStartingPlayers()
             local PlayerID = -1
             for i=0,NumPlayers-1 do
                if MTG():GetNthStartingPlayer(i) ~= nil and MTG():GetNthStartingPlayer(i):MyTurn() then
                   PlayerID = i
                end
             end
             if PlayerID &gt;= 0 then
            local filter = ClearFilter()
            filter:Add(FE_TEAM, OP_IS, MTG():GetNthStartingPlayer(PlayerID):GetTeam())
            local subfilter = filter:AddSubFilter_Or()
             subfilter:Add(FE_TYPE, OP_IS, CARD_TYPE_ARTIFACT)
             subfilter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
             subfilter:Add(FE_TYPE, OP_IS, CARD_TYPE_ENCHANTMENT)
             subfilter:Add(FE_TYPE, OP_IS, CARD_TYPE_LAND)
             subfilter:Add(FE_TYPE, OP_IS, CARD_TYPE_PLANESWALKER)
          end
          </FILTER>
          <CONTINUOUS_ACTION layer="8" filter_id="0">
             local Card = FilteredCard()
             if Card ~= nil and EffectSource() ~= nil and EffectSource():IsTapped() == false then
                local Found = false
                local IgnoreChest = LinkedDC()
                for i=0,3 do
                   local IgnoredPlayerChest = IgnoreChest:Get_Chest(i)
                   if IgnoredPlayerChest ~= nil then
                      local IgnoredCardZero = IgnoredPlayerChest:Get_CardPtr(0)
                      local IgnoredCardOne = IgnoredPlayerChest:Get_CardPtr(1)
                      if ( (IgnoredCardZero ~= nil and IgnoredCardZero == Card) or (IgnoredCardOne ~= nil and IgnoredCardOne == Card) ) then
                         Found = true
                      end
                   end
                end
                if Found == false then
                   Card:GetCurrentCharacteristics():Bool_Set( CHARACTERISTIC_DOESNT_UNTAP, 1 )
                end
             end
          </CONTINUOUS_ACTION>
</STATIC_ABILITY>
<TRIGGERED_ABILITY linked_ability_group="1" replacement_effect="1" priority="-10">
          <TRIGGER value="BEGINNING_OF_PLAYERS_STEP" >
             return TriggerPlayer() ~= nil and MTG():GetStep() == STEP_UNTAP and EffectSource() ~= nil and EffectSource():IsTapped() == false
          </TRIGGER>
          <RESOLUTION_TIME_ACTION>
             local player = TriggerPlayer()
             local filter = ClearFilter()
             filter:Add(FE_CONTROLLER, OP_IS, player)
             local subfilter = filter:AddSubFilter_Or()
             subfilter:Add(FE_TYPE, OP_IS, CARD_TYPE_ARTIFACT)
             subfilter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
             subfilter:Add(FE_TYPE, OP_IS, CARD_TYPE_ENCHANTMENT)
             subfilter:Add(FE_TYPE, OP_IS, CARD_TYPE_LAND)
             subfilter:Add(FE_TYPE, OP_IS, CARD_TYPE_PLANESWALKER)
             local Count = filter:Count()
             if Count &gt; 0 then
                player:SetItemCount(2)
                player:SetItemPrompt( 0, "CARD_QUERY_CHOOSE_PERMANENT_TO_UNTAP" )
                player:SetItemPrompt( 1, "CARD_QUERY_CHOOSE_PERMANENT_TO_UNTAP" )
                player:ChooseItems( EffectDC():Make_Targets(0), QUERY_FLAG_UP_TO )
             end
          </RESOLUTION_TIME_ACTION>
          <RESOLUTION_TIME_ACTION>
             local TargetChest = EffectDC():Get_Targets(0)
             if TriggerPlayer() ~= nil and TargetChest ~= nil then
                local NumPlayers = MTG():GetNumberOfStartingPlayers()
                local PlayerID = -1
                for i=0,NumPlayers-1 do
                   if MTG():GetNthStartingPlayer(i) ~= nil and MTG():GetNthStartingPlayer(i) == TriggerPlayer() then
                      PlayerID = i
                   end
                end
                if PlayerID &gt;= 0 then
                   local IgnoreChest = LinkedDC():Make_Chest(PlayerID)
                   local TargetZero = TargetChest:Get_CardPtr(0)
                   if TargetZero ~= nil then
                      IgnoreChest:Set_CardPtr(0, TargetZero)
                   end
                   local TargetOne = TargetChest:Get_CardPtr(1)
                   if TargetOne ~= nil then
                      IgnoreChest:Set_CardPtr(1, TargetOne)
                   end
                end
             end
          </RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
There is no rush just take your time. I would have given a fight but you use the "chest" method and i really don't know how to hadle them.

Re: Community Wad

PostPosted: 20 Jun 2015, 21:11
by Kithkin
Dominate -- not fixed :(

Re: Community Wad

PostPosted: 21 Jun 2015, 02:43
by Xander9009
RiiakShiNal wrote:
Xander9009 wrote:I don't see GetManaX() as a function. I see GetEffectX() and GetPaidX(). It's using GetPaidX().
...
Here after CounterSpell and before GetBestOrWorstCounterType.
Alright, I've used the advanced filtering in your Deck Builder, but I don't see any cards with GetManaX. I see 30+ cards that use GetPaidX, and all but one of those has X in its casting cost. I see 160+ that use GetEffectX, which are a mixture of cards with X in their mana cost, cards with X in the cost of an ability, or both. When exactly should I be using each of these functions?

Either way, I tested it with a message, and GetManaX and GetPaidX both show correctly how much was paid. However, if the filter for the target has the variable converted mana cost, it can't be cast because it always says there aren't enough targets...

There's only one other card with that sort of effect (that's coded), and that's Disembowel. However, it has the same problem. I wonder if they simply have to be done by choose the targets on resolution? Or maybe a play time action is late enough? And if during the PTA, if the target is nil, then assume there wasn't a valid target and counter it and put it in hand? But that would probably still count as being cast, allowing for exploits... I'm unsure how to proceed. Thoughts? It might simply not be doable properly.