Page 67 of 102

Re: Card Creation Request Thread

PostPosted: 27 May 2013, 14:42
by sumomole
RiiakShiNal wrote:
sumomole wrote:Has all creature types doesn't mean has the changeling keyword ability. The following code is used to Mutavault, the official card has 221 creature types, and I add Germ to 222, if you add new creature types, should change 1222 to the amount of your creature types.
If you don't mind including my choose creature type LOLs then you can use the constants to get all of the creature types (all 228, including Germ, Hippogriff, Siren, Surrakar, Townsfolk, Hyena, and Noggle, which were not included in the base game, but cards use them with current Oracle text):
_CREATURE_TYPE_FIRST
_CREATURE_TYPE_LAST

Also most people added Germ as 1221 (the 222nd type) because it is 0 based not 1 based.
Oh, I am missing so many types, please upload your LOL and I will add these types to my LOL, thank you. But I think the official card has Surrakar type, it's 1221, Shoreline Salvager is in Dimir deck of DLC3.

Re: Card Creation Request Thread

PostPosted: 27 May 2013, 14:44
by sumomole
thefiremind wrote:
sumomole wrote:Has all creature types doesn't mean has the changeling keyword ability. The following code is used to Mutavault, the official card has 221 creature types, and I add Germ to 222, if you add new creature types, should change 1222 to the amount of your creature types.
Adding changeling is still an acceptable approximation in my opinion, since changeling itself probably suffers some approximations as I wrote here. Adding all creature types manually could potentially bring more problems than it solves, because in DotP2012 it led to strange effects (I can't remember exactly what happened, I think some other cards stopped working while the card with all creature types was in play, even if they were apparently unrelated).
I have used changeling on Mutavault first, but when I played Mistbind Clique, it could champion the "land" Mutavault, so I had to use SubType_GetWritable. #-o

thefiremind wrote:
sumomole wrote:And there is Screeching Bat firemind has coded.
My version was able to transform only once. BlindWillow found a workaround but I have never been able to understand it completely, that's why I abandoned transform cards in DotP2013.
I have fixed and it can transform any times. :lol:

Re: Card Creation Request Thread

PostPosted: 27 May 2013, 14:46
by j6m6w6
can anyone code sigil captain?

Re: Card Creation Request Thread

PostPosted: 27 May 2013, 15:03
by sumomole
j6m6w6 wrote:can anyone code sigil captain?
If GetCurrentPower() and GetCurrentToughness() have bug, change it to GetCurrentCharacteristics():Power_Get() and GetCurrentCharacteristics():Toughness_Get()
Code: Select all
  <TRIGGERED_ABILITY>
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever a creature enters the battlefield under your control, if that creature is 1/1, put two +1/+1 counters on it.]]></LOCALISED_TEXT>
    <TRIGGER value="ZONECHANGE_END" to_zone="ZONE_IN_PLAY" simple_qualifier="objectyoucontrol">
    if TriggerObject():GetCurrentPower() == 1 and TriggerObject():GetCurrentToughness() == 1 then
      return TriggerObject():GetCardType():Test( CARD_TYPE_CREATURE ) ~= 0
    end 
    return false
    </TRIGGER>
    <RESOLUTION_TIME_ACTION>
    if TriggerObject() ~= nil then
      if TriggerObject():GetCurrentPower() == 1 and TriggerObject():GetCurrentToughness() == 1 then
         TriggerObject():AddCounters( MTG():PlusOnePlusOneCounters(), 2 )
      end
    end
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>

Re: Card Creation Request Thread

PostPosted: 27 May 2013, 15:04
by Master Necro
sumomole wrote:
Master Necro wrote:I need help with this one, it doesn't pick up the trigger at the start of the upkeep:
Ah~ I see a lot of errors, I suggest you do some simply card first, When you are familiar with the rules and code, You can create complex card without error, of course, this is just my suggestion, I hope you don't mind.. :)
And there is Screeching Bat firemind has coded.
cards.zip


NEMESiS wrote:Anybody has Tooth and Nail?
You my friend are awesome! :D

Re: Card Creation Request Thread

PostPosted: 27 May 2013, 15:44
by gorem2k
sumomole wrote:
thefiremind wrote:
sumomole wrote:Has all creature types doesn't mean has the changeling keyword ability. The following code is used to Mutavault, the official card has 221 creature types, and I add Germ to 222, if you add new creature types, should change 1222 to the amount of your creature types.
Adding changeling is still an acceptable approximation in my opinion, since changeling itself probably suffers some approximations as I wrote here. Adding all creature types manually could potentially bring more problems than it solves, because in DotP2012 it led to strange effects (I can't remember exactly what happened, I think some other cards stopped working while the card with all creature types was in play, even if they were apparently unrelated).
I have used changeling on Mutavault first, but when I played Mistbind Clique, it could champion the "land" Mutavault, so I had to use SubType_GetWritable. #-o
I've used Sumomole's code with some modifications for equipment card, the only thing strange is there's no creature types listed on creature (blank space) but when I point on it, it lists every types. I will test more eventually..

and thanks to firemind for the new & simplified Thundercloud Shaman.

Re: Card Creation Request Thread

PostPosted: 27 May 2013, 16:01
by RiiakShiNal
sumomole wrote:Oh, I am missing so many types, please upload your LOL and I will add these types to my LOL, thank you. But I think the official card has Surrakar type, it's 1221, Shoreline Salvager is in Dimir deck of DLC3.
Thanks for pointing that out I completely didn't realize they had added a type.

Updated: Functions for "Choose a Creature Type"

Re: Card Creation Request Thread

PostPosted: 27 May 2013, 16:10
by thefiremind
RiiakShiNal wrote:
sumomole wrote:Oh, I am missing so many types, please upload your LOL and I will add these types to my LOL, thank you. But I think the official card has Surrakar type, it's 1221, Shoreline Salvager is in Dimir deck of DLC3.
Thanks for pointing that out I completely didn't realize they had added a type.

Updated: Functions for "Choose a Creature Type"
I updated my core-fixing WAD as well, thanks to both. :)

Re: Card Creation Request Thread

PostPosted: 27 May 2013, 16:55
by NEMESiS
I am trying to make me Chant of Mul Daya and I need Fierce Empath. How do search for something with a X mana cost over six? I have no clue....

Re: Card Creation Request Thread

PostPosted: 27 May 2013, 17:17
by sumomole
NEMESiS wrote:I am trying to make me Chant of Mul Daya and I need Fierce Empath. How do search for something with a X mana cost over six? I have no clue....
Fierce Empath | Open
Code: Select all
  <TRIGGERED_ABILITY auto_skip="1">
    <TRIGGER value="ZONECHANGE_END" simple_qualifier="self" to_zone="ZONE_IN_PLAY" />
    <RESOLUTION_TIME_ACTION>
    local filter = Object():GetFilter()
    local player = EffectController()
    player:MarkSearchedLibrary()
    filter:Clear()
    filter:NotTargetted()
    filter:SetConvertedCostMin( 6 )
    filter:AddCardType( CARD_TYPE_CREATURE )
    filter:May()
    filter:SetZone( ZONE_LIBRARY )
    filter:SetPlayer( player )       
    if filter:CountStopAt( 1 ) == 1 then                         
      player:ChooseTarget( NO_VALIDATION, "CARD_QUERY_CHOOSE_CREATURE_TO_PUT_INTO_HAND", EffectDC():Make_Targets(0) )
    end
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local target = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
    if target ~= nil then
       target:GuidedReveal( ZONE_LIBRARY , ZONE_HAND )
       target:PutInHand()
    end
    </RESOLUTION_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    EffectController():ShuffleLibrary()
    </RESOLUTION_TIME_ACTION>
  </TRIGGERED_ABILITY>

Re: Card Creation Request Thread

PostPosted: 27 May 2013, 17:21
by BloodReyvyn
Code: Select all
    <TRIGGER value="ZONECHANGE_END" simple_qualifier="self" to_zone="ZONE_IN_PLAY" />
    <TARGET_DEFINITION id="0">
    local filter = Object():GetFilter()
    filter:Clear()
    filter:SetZone( ZONE_LIBRARY )
    filter:AddCardType( CARD_TYPE_CREATURE )
    filter:SetConvertedCostMin(6)
    filter:SetPlayer( EffectController() )
    filter:SetHint( HINT_ALLIED_ONLY, EffectController() )
    filter:May()
    </TARGET_DEFINITION>
    <TARGET_DETERMINATION>
    return AtLeastOneTargetFromDefinition(0)
    </TARGET_DETERMINATION>
    <PLAY_TIME_ACTION target_choosing="1">
    EffectController():ChooseTarget( 0, "CARD_QUERY_CHOOSE_PERMANENT_TO_PUT_INTO_HAND", EffectDC():Make_Targets(0) )
    </PLAY_TIME_ACTION>
    <RESOLUTION_TIME_ACTION>
    local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
    local player = EffectController()
    if target ~= nil then
   target:PutIntoHand( EffectController() )
    end
    </RESOLUTION_TIME_ACTION>
Nevermind, sumo beat me to it :P except I forgot to shuffle the library :oops:

Re: Card Creation Request Thread

PostPosted: 27 May 2013, 19:06
by Master Necro
May I request these cool cards Soul Seizer , Loyal Cathar and Cloistered Youth .

Re: Card Creation Request Thread

PostPosted: 27 May 2013, 20:06
by NEMESiS
Ok one last question. I made tangle but its not setup correctly:

Code: Select all
 <SPELL_ABILITY filter_zone="ZONE_IN_PLAY_AND_PLAYERS">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Prevent all combat damage that would be dealt this turn.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Prévenez toutes les blessures de combat qui devraient être infligées ce tour-ci.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Prevén todo el daño de combate que se fuera a hacer este turno.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Verhindere allen Kampfschaden, der in diesem Zug zugefügt würde.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Previeni tutto il danno da combattimento che verrebbe inflitto in questo turno.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[このターンに与えられるすべての戦闘ダメージを軽減する。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[이 턴에 입혀지려 하는 모든 전투피해를 방지한다.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Предотвратите все боевые повреждения, которые должны быть нанесены в этом ходу.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Previna todo o dano de combate que seria causado neste turno.]]></LOCALISED_TEXT>
    <CONTINUOUS_ACTION>
    local num_players = MTG():GetNumberOfPlayers()
    for i=0,num_players-1 do
       local player = MTG():GetNthPlayer(i)
       if player ~= nil then
          player:GetCurrentCharacteristics():Bool_Set( PLAYER_CHARACTERISTIC_CREATURES_CANT_DEAL_COMBAT_DAMAGE, 1 )   
          player:AddBadge(PLAYER_BADGE_ICON_FOG, "PLAYER_FOG_ICON")
       end 
    end
    </CONTINUOUS_ACTION>
  </SPELL_ABILITY>
  <SPELL_ABILITY dangerous="1" filter_zone="ZONE_IN_PLAY">
    <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Marrow Shards deals 1 damage to each attacking creature.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Le Schegge di Midollo infliggono 1 danno a ogni creatura attaccante.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Die Scherben aus Mark fügen jeder angreifenden Kreatur 1 Schadenspunkt zu.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Les Échardes de moelle infligent 1 blessure à chaque créature attaquante.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Los Fragmentos de médula hacen 1 punto de daño a cada criatura atacante.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[骨髄の破片は攻撃している各クリーチャーにそれぞれ1点のダメージを与える。]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Marrow Shards deals 1 damage to each attacking creature.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Осколки Костного Мозга наносят 1 повреждение каждому атакующему существу.]]></LOCALISED_TEXT>
    <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Estilhas Medulares causa 1 ponto de dano a cada criatura atacante.]]></LOCALISED_TEXT>
    <FILTER>
    local fc = FilteredCard()
    return fc ~= nil and
    fc:GetZone() == ZONE_IN_PLAY and
    fc:GetCardType():Test( CARD_TYPE_CREATURE ) ~= 0 and
    fc:IsAttacking() ~= 0
    </FILTER>
    <RESOLUTION_TIME_ACTION>
    if FilteredCard() ~= nil then
         FilteredCard():TapAndHold()
    end
    </RESOLUTION_TIME_ACTION>
    <SFX text="GLOBAL_WIND_PLAY" />
  </SPELL_ABILITY>
  <SFX text="GLOBAL_PREVENT_PLAY" />
  <AI_BASE_SCORE score="900" zone="ZONE_HAND" />
</CARD_V2>
I used the code from sleep but that is not correct as a creature with Vigilance should not tap. How should i change this:

Code: Select all
    <RESOLUTION_TIME_ACTION>
    if FilteredCard() ~= nil then
         FilteredCard():TapAndHold()
    end
    </RESOLUTION_TIME_ACTION>

Re: Card Creation Request Thread

PostPosted: 27 May 2013, 23:33
by East Bay
NEMESiS wrote: How should i change this:

Code: Select all
    <RESOLUTION_TIME_ACTION>
    if FilteredCard() ~= nil then
         FilteredCard():TapAndHold()
    end
    </RESOLUTION_TIME_ACTION>
this
Code: Select all
    <RESOLUTION_TIME_ACTION>
    if FilteredCard() ~= nil then
         FilteredCard():Hold()
    end
    </RESOLUTION_TIME_ACTION>

Re: Card Creation Request Thread

PostPosted: 28 May 2013, 01:09
by gorem2k
Is it possible to query a player for a specific type ?
If so, I request Roar of the Crowd.

this would be a nice supplement to my current Giant/Changeling mono-red build.