Page 1 of 1

Help with "Omniscience" [play nonland card without paying]

PostPosted: 23 Jul 2012, 21:10
by Zambooo
Here I am with another deal :)
I have some problem with Omniscience: the rules for this card say
"- If the card has X in its mana cost, you must choose 0 as its value."
so I cannot just reduce indefinitely the cost of all my cards. I tried to reduce the cost separately for each card, but I've realized I can't do like I did :roll:

Code: Select all
<?xml version='1.0'?>
<CARD_V2>
  <FILENAME text="OMNISCIENCE_288937" />
  <CARDNAME text="OMNISCIENCE" />
  <TITLE>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Omniscience]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Onniscenza]]></LOCALISED_TEXT>
  </TITLE>
  <MULTIVERSEID value="288937" />
  <ARTID value="288937" />
  <ARTIST name="Jason Chan" />
  <CASTING_COST cost="{7}{U}{U}{U}" />
  <FLAVOURTEXT>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA["The things I once imagined would be my greatest achievements were only the first steps toward a future I can only begin to fathom."
Jace Beleren]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA["Le cose che sognavo un tempo sarebbero le mie conquiste più grandi, se non fossero solo i primi passi verso un futuro che riesco appena a intravedere."
Jace Beleren]]></LOCALISED_TEXT>
  </FLAVOURTEXT>
  <TYPE metaname="Enchantment" />
  <EXPANSION value="DPG" />
  <RARITY metaname="M" />
 
 <STATIC_ABILITY filter_zone="ZONE_HAND">
   <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[You may cast nonland cards from your hand without paying their mana costs.]]></LOCALISED_TEXT>
   <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Puoi lanciare carte non terra dalla tua mano senza pagare il loro costo di mana.]]></LOCALISED_TEXT>   
    <FILTER>
    local filteredCard = FilteredCard()
    local objectPlayer = Object():GetPlayer()
    return (FilteredCard():GetCardType():Test( CARD_TYPE_LAND ) == 0) and (FilteredCard():GetPlayer() == Object():GetPlayer()) and (FilteredCard() ~= nil and FilteredCard():GetZone() == ZONE_HAND)
    </FILTER>
    <CONTINUOUS_ACTION layer="6">
       if FilteredCard() ~= nil then
          FilteredCard():GetCurrentCharacteristics():GrantAbility(1)
       end
    </CONTINUOUS_ACTION>
 </STATIC_ABILITY>
 <UTILITY_ABILITY resource_id="1">
    <COST type="Mana" cost="{0}" qualifier="alternate" tag="ALTERNATE_COST_PAY_0" />
 </UTILITY_ABILITY>
 
  <HELP title="MORE_INFO_BADGE_TITLE_10" body="MORE_INFO_BADGE_BODY_10" zone="ZONE_ANY" />
  <AI_BASE_SCORE score="900" zone="ZONE_IN_PLAY" />
  <AI_BASE_SCORE score="1800" zone="ZONE_HAND" />
</CARD_V2>

Re: Help with "Omniscience" [play nonland card without payin

PostPosted: 23 Jul 2012, 21:42
by thefiremind
I'm not sure if "without paying their mana costs" is perfectly equal to "paying {0} rather than paying their mana costs", but if it is, I would take inspiration from Archive Trap:
Code: Select all
  <STATIC_ABILITY filter_zone="ZONE_HAND">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[You may cast nonland cards from your hand without paying their mana costs.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Puoi lanciare carte non terra dalla tua mano senza pagare il loro costo di mana.]]></LOCALISED_TEXT>
    <FILTER>
    return FilteredCard() ~= nil and
    FilteredCard():GetCardType():Test( CARD_TYPE_LAND ) == 0 and
    FilteredCard():GetPlayer() == Object():GetPlayer()
    </FILTER>
    <CONTINUOUS_ACTION layer="6">
    if FilteredCard() ~= nil then
      FilteredCard():GetCurrentCharacteristics():GrantAbility(1)
    end
    </CONTINUOUS_ACTION>
  </STATIC_ABILITY>
  <UTILITY_ABILITY resource_id="1">
    <COST type="Mana" cost="{0}" qualifier="alternate" tag="ALTERNATE_COST_PAY_0" />
  </UTILITY_ABILITY>
(EDIT: Removed some useless junk from the filter)

Re: Help with "Omniscience" [play nonland card without payin

PostPosted: 24 Jul 2012, 11:33
by Zambooo
Thanks for the suggestion, I'm gonna try it ;)
Well it actually worked but I got 3 option for the cost, its normal mana cost and two times "pay {0}". :?:
Okay maybe it's because I had two of it in play >.>

Re: Help with "Omniscience" [play nonland card without payin

PostPosted: 12 Aug 2012, 23:01
by thefiremind
About the usage of the alternative costs, I want to add that I just coded Fist of Suns, and while paying {0} doesn't have any problem, if the alternative cost requires to actually pay some mana, we have to check by ourselves if it can be paid: the alternative cost doesn't imply it.

If I code Fist of Suns like this:
Code: Select all
  <STATIC_ABILITY filter_zone="ZONE_HAND">
    <FILTER>
    return FilteredCard() ~= nil and
    FilteredCard():GetPlayer() == EffectController() and
    FilteredCard():GetCardType():Test( CARD_TYPE_LAND ) == 0
    </FILTER>
    <CONTINUOUS_ACTION layer="6">
    if FilteredCard() ~= nil then
       FilteredCard():GetCurrentCharacteristics():GrantAbility(1)
    end
    </CONTINUOUS_ACTION>
  </STATIC_ABILITY>
  <UTILITY_ABILITY resource_id="1">
    <COST type="Mana" cost="{W}{U}{B}{R}{G}" qualifier="alternate" tag="ALTERNATE_COST_PAY_WUBRG" />
  </UTILITY_ABILITY>
then I can choose the alternative cost even if I don't have enough mana, and if I make this choice, the spell will be cast for free.
With this little fix on the filter:
Code: Select all
    <FILTER>
    if EffectController():CanAfford("{W}{U}{B}{R}{G}") == 0 then
       return false
    else
       return FilteredCard() ~= nil and
       FilteredCard():GetPlayer() == EffectController() and
       FilteredCard():GetCardType():Test( CARD_TYPE_LAND ) == 0
    end
    </FILTER>
everything works OK.