Board index Programs with AI or Rules Enforcement Magic: The Gathering - Duels of the Planeswalkers Programming Talk
Some card issues I'm having
Moderator: CCGHQ Admins
Some card issues I'm having
by volrathxp » 29 Jul 2014, 00:40
Alright... in an effort to kind of condense my question posts, these are the cards I'm struggling to wrap my head around right now. For reference, I'm just putting the code in for what I'm working on, not the whole card.
- Siege Dragon: I've got his ETB trigger down, but his attack trigger is getting me something fierce. Here is where I'm at with it. It triggers, but doesn't do any damage.
- Athreos, God of Passage (Paying life.)
- Avacyn, Guardian Angel (BLERG color choices)
- Battlefield Thaumaturge (I have a sneaking suspicion this card is impossible under DoTP 2014, just based on other cost reduction cards I've looked at)
- Generator Servant
- Genesis Hydra
- Hushwing Gryff (Obvious.)
- Keranos, God of Storms (First card drawn each turn? I looked at a few Miracle cards and couldn't piece this together)
- Kruphix, God of Horizons (Again, having looked at Sakiko and the mess that code is, I'm not sure how feasible Kruphy is)
- Ob Nixilis, Unshackled (Triggering off player searching their library)
- Scuttling Doom Engine (The can't be blocked by power 2 or less thing...)
- Sliver Hive (specifying mana to only be available for Sliver spells...)
- Siege Dragon: I've got his ETB trigger down, but his attack trigger is getting me something fierce. Here is where I'm at with it. It triggers, but doesn't do any damage.
- Code: Select all
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever Siege Dragon attacks, if defending player controls no Walls, it deals 2 damage to each creature without flying that player controls.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[À chaque fois que le Dragon de siège attaque, si le joueur défenseur ne contrôle pas de mur, il inflige 2 blessures à chaque créature sans le vol que ce joueur contrôle.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Siempre que el Dragón de asedio ataque, si el jugador defensor no controla ningún Muro, le hace 2 puntos de daño a cada criatura sin la habilidad de volar que controla ese jugador.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Immer wenn der Belagerungsdrache angreift und falls der verteidigende Spieler keine Mauer kontrolliert, fügt er jeder nichtfliegenden Kreatur, die dieser Spieler kontrolliert, 2 Schadenspunkte zu.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogniqualvolta il Drago da Assedio attacca, se il giocatore in difesa non controlla alcun Muro, il Drago da Assedio infligge 2 danni a ogni creatura senza volare controllata da quel giocatore.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[包囲ドラゴンが攻撃するたび、防御プレイヤーが壁をコントロールしていない場合、これはそのプレイヤーがコントロールする飛行を持たない各クリーチャーに、それぞれ2点のダメージを与える。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[공성 용이 공격할 때마다, 수비플레이어가 조종하는 벽이 없다면, 공성 용은 그 플레이어가 조종하는 생물 중 비행이 없는 각 생물에게 피해 2점을 입힌다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Каждый раз, когда Осадный Дракон атакует, если под контролем защищающегося игрока нет Стен, он наносит 2 повреждения каждому существу без Полета под контролем того игрока.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Toda vez que Dragão de Cerco atacar, se o jogador defensor não controlar nenhuma Barreira, ele causará 2 pontos de dano a cada criatura sem voar que aquele jogador controla.]]></LOCALISED_TEXT>
<TRIGGER value="ATTACKING" simple_qualifier="self" />
<FILTER filter_id="1">
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
filter:Add( FE_SUBTYPE, OP_IS, CREATURE_TYPE_WALL )
filter:Add( FE_CONTROLLER, OP_NOT, EffectController() )
</FILTER>
<RESOLUTION_TIME_ACTION filter_id="1">
if FilteredCard() ~= nil then
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
filter:Add( FE_CONTROLLER, OP_NOT, EffectController() )
if FilteredCard() ~= nil then
EffectSourceLKI():DealDamageTo( 2, FilteredCard() )
end
else
return false
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
- Code: Select all
<ACTIVATED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Remove all +1/+1 counters from Sage of Hours: For each five counters removed this way, take an extra turn after this one.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Retirez tous les marqueurs +1/+1 du Sage des heures : Pour chaque cinq marqueurs retirés de cette manière, jouez un tour supplémentaire après celui-ci.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Remover todos los contadores +1/+1 del Sabio de las horas: Por cada 5 contadores removidos de esta manera, juega un turno adicional después de este.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Entferne alle +1/+1-Marken vom Weisen der Zeit: Für je fünf auf diese Weise entfernte Marken erhältst du nach diesem Zug einen zusätzlichen Zug.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Rimuovi tutti i segnalini +1/+1 dal Saggio delle Ore: Per ogni cinque segnalini rimossi in questo modo, gioca un turno extra dopo questo.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[時の賢者の上からすべての+1/+1カウンターを取り除く:これにより取り除かれたカウンター5個につき、このターンの直後に追加の1ターンを得る。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[시간의 현자에서 모든 +1/+1 카운터를 제거한다: 이렇게 제거한 카운터 5개마다, 이번 턴 이후에 추가로 한 턴을 얻는다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Удалите все жетоны +1/+1 с Мудреца Времени: за каждые пять жетонов, удаленных таким образом, сделайте дополнительный ход вслед за этим.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Remova todos os marcadores +1/+1 de Sábio das Horas: para cada cinco marcadores removidos desta forma, jogue um turno extra após este.]]></LOCALISED_TEXT>
<COST mana_cost="{0}" type="Mana" />
<PLAY_TIME_ACTION>
local count = EffectSource():CountCounters( MTG():PlusOnePlusOneCounters() )
EffectDC():Set_Int(1, -count)
EffectSource():RemoveCounters( MTG():PlusOnePlusOneCounters(), count )
</PLAY_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local total = EffectDC():GetInt(1)
local player = EffectController()
if player ~= nil then
local team = player:GetTeam()
local turns = math.floor(total/5)
for i=0, (turns) do
team:TakeExtraTurn()
end
end
</RESOLUTION_TIME_ACTION>
</ACTIVATED_ABILITY>
- Code: Select all
<ACTIVATED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{1}{R}: Forgestoker Dragon deals 1 damage to target creature. That creature can’t block this combat. Activate this ability only if Forgestoker Dragon is attacking.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{1}{R} : Le Dragon souffleforge inflige 1 blessure à la créature ciblée. Cette créature ne peut pas bloquer pendant ce combat. N’activez cette capacité que si le Dragon souffleforge attaque.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{1}{R}: El Dragón atizalumbre hace 1 punto de daño a la criatura objetivo. Esa criatura no puede bloquear este combate. Activa esta habilidad solo si el Dragón atizalumbre está atacando.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{1}{R}: Der Flammenschürer-Drache fügt einer Kreatur deiner Wahl 1 Schadenspunkt zu. Diese Kreatur kann in diesem Kampf nicht blocken. Aktiviere diese Fähigkeit nur, während der Flammenschürer-Drache angreift.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{1}{R}: Il Drago Attizzaforgia infligge 1 danno a una creatura bersaglio. Quella creatura non può bloccare in questo combattimento. Attiva questa abilità solo se il Drago Attizzaforgia sta attaccando.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{1}{R}:クリーチャー1体を対象とする。炉焚きのドラゴンはそれに1点のダメージを与える。この戦闘で、そのクリーチャーではブロックできない。この能力は、炉焚きのドラゴンが攻撃しているときにのみ起動できる。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{1}{R}: 생물 하나를 목표로 정한다. 불바다 용은 그 생물에 피해 1점 입힌다. 그 생물은 이 전투에 방어할 수 없다. 불바다 용이 공격할 때에만 이 능력을 활성화할 수 있다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{1}{R}: Дракон Пылающего Горнила наносит 1 повреждение целевому существу. То существо не может блокировать в этом бою. Активируйте эту способность, только если Дракон Пылающего Горнила атакует.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{1}{R}: Dragão Atiça-forja causa 1 ponto de dano à criatura alvo. Aquela criatura não pode bloquear neste combate. Ative esta habilidade apenas se Dragão Atiça-forja estiver atacando.]]></LOCALISED_TEXT>
<COST mana_cost="{1}{R}" type="Mana" />
<AVAILABILITY combat="1">
local filter = ClearFilter()
filter:Add(FE_IS_ATTACKING, true)
filter:Add(FE_CONTROLLER, OP_IS, EffectController() )
</AVAILABILITY>
<TARGET tag="CARD_QUERY_CHOOSE_CREATURE_DEAL_1_DAMAGE" definition="0" compartment="0" count="1" />
<TARGET_DEFINITION id="0">
local filter = ClearFilter()
filter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
</TARGET_DEFINITION>
<RESOLUTION_TIME_ACTION>
local target_creature = EffectDC():Get_Targets(0):Get_CardPtr(0)
if target_creature ~= nil then
EffectSourceLKI():DealDamageTo(1, target_creature)
end
</RESOLUTION_TIME_ACTION>
<CONTINUOUS_ACTION layer="8">
local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
if target ~= nil then
local characteristics = target:GetCurrentCharacteristics()
characteristics:Bool_Set( CHARACTERISTIC_CANT_BLOCK, 1 )
characteristics:Badge_Set( BADGE_CANT_BLOCK )
end
</CONTINUOUS_ACTION>
<DURATION simple_duration="UntilEOT" />
</ACTIVATED_ABILITY>
- Athreos, God of Passage (Paying life.)
- Avacyn, Guardian Angel (BLERG color choices)
- Battlefield Thaumaturge (I have a sneaking suspicion this card is impossible under DoTP 2014, just based on other cost reduction cards I've looked at)
- Generator Servant
- Genesis Hydra
- Hushwing Gryff (Obvious.)
- Keranos, God of Storms (First card drawn each turn? I looked at a few Miracle cards and couldn't piece this together)
- Kruphix, God of Horizons (Again, having looked at Sakiko and the mess that code is, I'm not sure how feasible Kruphy is)
- Ob Nixilis, Unshackled (Triggering off player searching their library)
- Scuttling Doom Engine (The can't be blocked by power 2 or less thing...)
- Sliver Hive (specifying mana to only be available for Sliver spells...)
volrathxp
Re: Some card issues I'm having
by sweetLu » 29 Jul 2014, 01:17
I'll handle some of the easy ones first then when I find some time I'll try out the others if someone doesn't beat me to it.
- Athreos, God of Passage -- Paying life is easy. Just look at one of the shock lands. For instance, here are the relevant parts from sumomole's Stomping Ground:
- | Open
- Code: Select all
<TRIGGERED_ABILITY replacement_query="1" linked_ability_group="1" active_zone="ZONE_TRANSITION">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[As Stomping Ground enters the battlefield, you may pay 2 life. If you don’t, Stomping Ground enters the battlefield tapped.]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_TRANSITION" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" from_zone="ZONE_ANY" pre_trigger="1" />
<RESOLUTION_TIME_ACTION>
if TriggerObject() ~= nil and EffectController():CanPayResourceCost(2) then
EffectController():BeginNewMultipleChoice()
EffectController():AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_PAY_2_LIFE" )
EffectController():AddMultipleChoiceAnswer( "CARD_QUERY_DO_NOTHING" )
EffectController():AskMultipleChoiceQuestion( "CARDS_QUERY_NEW_DUAL_LAND_ENTER" )
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
if TriggerObject() ~= nil then
if EffectController():CanPayResourceCost(2) then
local result = EffectController():GetMultipleChoiceResult()
if result ~= 1 then
EffectController():PayResourceCost(2)
else
TriggerObject():Tap()
end
else
TriggerObject():Tap()
end
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<UTILITY_ABILITY resource_id="2">
<COST type="Life" amount="2" />
</UTILITY_ABILITY>
- Battlefield Thaumaturge -- I don't think this card is possible either.
- Hushwing Gryff -- Not possible.
- Keranos, God of Storms -- For the trigger, try this:
- | Open
- Code: Select all
<TRIGGERED_ABILITY>
<TRIGGER value="DREW_CARD" simple_qualifier="controller">
local interrogation = MTG():ClearInterrogationQuery()
interrogation:SetPlayer( EffectController() )
local num_drawn_this_turn = interrogation:Count( INTERROGATE_CARDS_DRAWN, INTERROGATE_THIS_TURN, 2 )
if num_drawn_this_turn == 1 then
return true
else
return false
end
</TRIGGER>
- Kruphix, God of Horizons -- At a minimum this will need Riiak's manual mana functions. At one point I believe he was attempting to add in functionality for "mana doesn't empty from your mana pool" but I'm not sure if it was ever fully implemented.
- Ob Nixilis, Unshackled -- For an opponent searching their library try this trigger:
- | Open
- Code: Select all
local num_starting_players= MTG():GetNumberOfStartingPlayers()
for i=0,(num_starting_players-1) do
local player = MTG():GetNthStartingPlayer( i )
if (player ~= nil and player:GetTeam() ~= EffectController():GetTeam()) then
local interrogation = MTG():ClearInterrogationQuery()
interrogation:SetPlayer( player )
interrogation:SetSecondaryPlayer( player )
if interrogation:Test( INTERROGATE_SEARCHED_LIBRARY, INTERROGATE_THIS_TURN ) then
return true
end
end
end
return false
- Scuttling Doom Engine -- If you have the expansion, you could look at Champion of the Lambholt:
- Champion of the Lambholt Evasion | Open
- Code: Select all
<TRIGGERED_ABILITY replacement_effect="1">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Creatures with power less than Champion of Lambholt’s power can’t block creatures you control.]]></LOCALISED_TEXT>
<TRIGGER value="EVASION_TEST" pre_trigger="1">
return TriggerObject():GetController() == EffectController() and SecondaryObject():GetCurrentCharacteristics():Power_Get() < EffectSource():GetCurrentCharacteristics():Power_Get()
</TRIGGER>
</TRIGGERED_ABILITY>
- Sliver Hive -- Riiak tried for some time to get specialized mana that could only be used to cast creatures, spent on artifacts, etc. I do not think it is possible.
- Generator Servant -- You may be able to rig something together to make this work in some cases but it won't be ideal. After you generate mana with it count how many cards you have named "COLORLESS MANA" (I think that's the name Riiak uses for colorless mana). Then after you cast a card, count the colorless mana again. If the card was a creature and there is less colorless mana from the previous time you cast a card, then give the creature haste. One problem with this card in general is how the game handles colorless mana. For example, if you have 4 x Mountain (untapped), used the Generator Servant to get 2 colorless mana, then tried to play 2 x Bloodrock Cyclops, the first cyclops you cast will use the 2 colorless mana. There is no way around that in duels.
- Forgestoker Dragon -- In an availability you need to return true or false for it to work correctly. So add:
- Code: Select all
if filter:CountStopAt(1) == 1 then
return true
end
return false
Re: Some card issues I'm having
by RiiakShiNal » 29 Jul 2014, 01:39
Well, let's see:volrathxp wrote:Alright... in an effort to kind of condense my question posts, these are the cards I'm struggling to wrap my head around right now. For reference, I'm just putting the code in for what I'm working on, not the whole card.
- Siege Dragon: I've got his ETB trigger down, but his attack trigger is getting me something fierce. Here is where I'm at with it. It triggers, but doesn't do any damage.- Sage of Hours: Heroic is no big deal here, that works just fine. It's the counter thing I'm dealing with. I followed along with how Vish Kal transfers counters over using SetInt and GetInt, but it tells me it's trying to get a nil value in GetInt.
- Siege Dragon | Open
- Code: Select all
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever Siege Dragon attacks, if defending player controls no Walls, it deals 2 damage to each creature without flying that player controls.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[À chaque fois que le Dragon de siège attaque, si le joueur défenseur ne contrôle pas de mur, il inflige 2 blessures à chaque créature sans le vol que ce joueur contrôle.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Siempre que el Dragón de asedio ataque, si el jugador defensor no controla ningún Muro, le hace 2 puntos de daño a cada criatura sin la habilidad de volar que controla ese jugador.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Immer wenn der Belagerungsdrache angreift und falls der verteidigende Spieler keine Mauer kontrolliert, fügt er jeder nichtfliegenden Kreatur, die dieser Spieler kontrolliert, 2 Schadenspunkte zu.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogniqualvolta il Drago da Assedio attacca, se il giocatore in difesa non controlla alcun Muro, il Drago da Assedio infligge 2 danni a ogni creatura senza volare controllata da quel giocatore.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[包囲ドラゴンが攻撃するたび、防御プレイヤーが壁をコントロールしていない場合、これはそのプレイヤーがコントロールする飛行を持たない各クリーチャーに、それぞれ2点のダメージを与える。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[공성 용이 공격할 때마다, 수비플레이어가 조종하는 벽이 없다면, 공성 용은 그 플레이어가 조종하는 생물 중 비행이 없는 각 생물에게 피해 2점을 입힌다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Каждый раз, когда Осадный Дракон атакует, если под контролем защищающегося игрока нет Стен, он наносит 2 повреждения каждому существу без Полета под контролем того игрока.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Toda vez que Dragão de Cerco atacar, se o jogador defensor não controlar nenhuma Barreira, ele causará 2 pontos de dano a cada criatura sem voar que aquele jogador controla.]]></LOCALISED_TEXT>
<TRIGGER value="ATTACKING" simple_qualifier="self" />
<FILTER filter_id="1">
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
filter:Add( FE_SUBTYPE, OP_IS, CREATURE_TYPE_WALL )
filter:Add( FE_CONTROLLER, OP_NOT, EffectController() )
</FILTER>
<RESOLUTION_TIME_ACTION filter_id="1">
if FilteredCard() ~= nil then
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
filter:Add( FE_CONTROLLER, OP_NOT, EffectController() )
if FilteredCard() ~= nil then
EffectSourceLKI():DealDamageTo( 2, FilteredCard() )
end
else
return false
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>- Forgestoker Dragon: I literally could not find a good enough reference for this to see if I'm using the <AVAILABILITY> tag correctly. When I tested it, it didn't give me the option to use the ability after I declared him as an attacker.
- Sage of Hours | Open
- Code: Select all
<ACTIVATED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Remove all +1/+1 counters from Sage of Hours: For each five counters removed this way, take an extra turn after this one.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Retirez tous les marqueurs +1/+1 du Sage des heures : Pour chaque cinq marqueurs retirés de cette manière, jouez un tour supplémentaire après celui-ci.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Remover todos los contadores +1/+1 del Sabio de las horas: Por cada 5 contadores removidos de esta manera, juega un turno adicional después de este.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Entferne alle +1/+1-Marken vom Weisen der Zeit: Für je fünf auf diese Weise entfernte Marken erhältst du nach diesem Zug einen zusätzlichen Zug.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Rimuovi tutti i segnalini +1/+1 dal Saggio delle Ore: Per ogni cinque segnalini rimossi in questo modo, gioca un turno extra dopo questo.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[時の賢者の上からすべての+1/+1カウンターを取り除く:これにより取り除かれたカウンター5個につき、このターンの直後に追加の1ターンを得る。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[시간의 현자에서 모든 +1/+1 카운터를 제거한다: 이렇게 제거한 카운터 5개마다, 이번 턴 이후에 추가로 한 턴을 얻는다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Удалите все жетоны +1/+1 с Мудреца Времени: за каждые пять жетонов, удаленных таким образом, сделайте дополнительный ход вслед за этим.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Remova todos os marcadores +1/+1 de Sábio das Horas: para cada cinco marcadores removidos desta forma, jogue um turno extra após este.]]></LOCALISED_TEXT>
<COST mana_cost="{0}" type="Mana" />
<PLAY_TIME_ACTION>
local count = EffectSource():CountCounters( MTG():PlusOnePlusOneCounters() )
EffectDC():Set_Int(1, -count)
EffectSource():RemoveCounters( MTG():PlusOnePlusOneCounters(), count )
</PLAY_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local total = EffectDC():GetInt(1)
local player = EffectController()
if player ~= nil then
local team = player:GetTeam()
local turns = math.floor(total/5)
for i=0, (turns) do
team:TakeExtraTurn()
end
end
</RESOLUTION_TIME_ACTION>
</ACTIVATED_ABILITY>Beyond that, the stuff I would like to code, but am having a heck of a time wrapping my head around them. I don't have code for any of these yet, because I'm honestly not sure where to start.
- Forgestoker Dragon | Open
- Code: Select all
<ACTIVATED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{1}{R}: Forgestoker Dragon deals 1 damage to target creature. That creature can’t block this combat. Activate this ability only if Forgestoker Dragon is attacking.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{1}{R} : Le Dragon souffleforge inflige 1 blessure à la créature ciblée. Cette créature ne peut pas bloquer pendant ce combat. N’activez cette capacité que si le Dragon souffleforge attaque.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{1}{R}: El Dragón atizalumbre hace 1 punto de daño a la criatura objetivo. Esa criatura no puede bloquear este combate. Activa esta habilidad solo si el Dragón atizalumbre está atacando.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{1}{R}: Der Flammenschürer-Drache fügt einer Kreatur deiner Wahl 1 Schadenspunkt zu. Diese Kreatur kann in diesem Kampf nicht blocken. Aktiviere diese Fähigkeit nur, während der Flammenschürer-Drache angreift.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{1}{R}: Il Drago Attizzaforgia infligge 1 danno a una creatura bersaglio. Quella creatura non può bloccare in questo combattimento. Attiva questa abilità solo se il Drago Attizzaforgia sta attaccando.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{1}{R}:クリーチャー1体を対象とする。炉焚きのドラゴンはそれに1点のダメージを与える。この戦闘で、そのクリーチャーではブロックできない。この能力は、炉焚きのドラゴンが攻撃しているときにのみ起動できる。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{1}{R}: 생물 하나를 목표로 정한다. 불바다 용은 그 생물에 피해 1점 입힌다. 그 생물은 이 전투에 방어할 수 없다. 불바다 용이 공격할 때에만 이 능력을 활성화할 수 있다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{1}{R}: Дракон Пылающего Горнила наносит 1 повреждение целевому существу. То существо не может блокировать в этом бою. Активируйте эту способность, только если Дракон Пылающего Горнила атакует.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{1}{R}: Dragão Atiça-forja causa 1 ponto de dano à criatura alvo. Aquela criatura não pode bloquear neste combate. Ative esta habilidade apenas se Dragão Atiça-forja estiver atacando.]]></LOCALISED_TEXT>
<COST mana_cost="{1}{R}" type="Mana" />
<AVAILABILITY combat="1">
local filter = ClearFilter()
filter:Add(FE_IS_ATTACKING, true)
filter:Add(FE_CONTROLLER, OP_IS, EffectController() )
</AVAILABILITY>
<TARGET tag="CARD_QUERY_CHOOSE_CREATURE_DEAL_1_DAMAGE" definition="0" compartment="0" count="1" />
<TARGET_DEFINITION id="0">
local filter = ClearFilter()
filter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
</TARGET_DEFINITION>
<RESOLUTION_TIME_ACTION>
local target_creature = EffectDC():Get_Targets(0):Get_CardPtr(0)
if target_creature ~= nil then
EffectSourceLKI():DealDamageTo(1, target_creature)
end
</RESOLUTION_TIME_ACTION>
<CONTINUOUS_ACTION layer="8">
local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
if target ~= nil then
local characteristics = target:GetCurrentCharacteristics()
characteristics:Bool_Set( CHARACTERISTIC_CANT_BLOCK, 1 )
characteristics:Badge_Set( BADGE_CANT_BLOCK )
end
</CONTINUOUS_ACTION>
<DURATION simple_duration="UntilEOT" />
</ACTIVATED_ABILITY>
- Athreos, God of Passage (Paying life.)
- Avacyn, Guardian Angel (BLERG color choices)
- Battlefield Thaumaturge (I have a sneaking suspicion this card is impossible under DoTP 2014, just based on other cost reduction cards I've looked at)
- Generator Servant
- Genesis Hydra
- Hushwing Gryff (Obvious.)
- Keranos, God of Storms (First card drawn each turn? I looked at a few Miracle cards and couldn't piece this together)
- Kruphix, God of Horizons (Again, having looked at Sakiko and the mess that code is, I'm not sure how feasible Kruphy is)
- Ob Nixilis, Unshackled (Triggering off player searching their library)
- Scuttling Doom Engine (The can't be blocked by power 2 or less thing...)
- Sliver Hive (specifying mana to only be available for Sliver spells...)
Sage of Hours - I've already coded that ability here for someone else.
Siege Dragon - This one is a bit tricky because there are also issues with choosing the Defending player in Two-Headed Giant. Due to this issue you want to trigger every time he attacks (which you have already done), then choose the defending player, then check for walls, then if there are no walls do damage to the creatures. Due to needing to get the defending player you may not be able to use the FILTER block and may have to iterate through the non-flying creatures. Normally though you would use an INTERVENING_IF block for this type of check.
- Siege Dragon | Open
- Code: Select all
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever Siege Dragon attacks, if defending player controls no Walls, it deals 2 damage to each creature without flying that player controls.]]></LOCALISED_TEXT>
<TRIGGER value="ATTACKING" simple_qualifier="self" />
<PLAY_TIME_ACTION>
RSN_ChooseDefendingPlayer( EffectSourceLKI(), SecondaryPlayer() )
</PLAY_TIME_ACTION>
<PLAY_TIME_ACTION>
local oPlayer = RSN_GetDefendingPlayer( EffectSourceLKI() )
if (oPlayer ~= nil) then
-- Check to see how many walls defending player has.
EffectDC():Set_PlayerPtr( 0, oPlayer )
local oFilter = ClearFilter()
oFilter:Add( FE_SUBTYPE, OP_IS, CREATURE_TYPE_WALL )
oFilter:Add( FE_CONTROLLER, OP_IS, oPlayer )
local bHasWall = oFilter:CountStopAt(1)
-- I do the +1 here so we aren't checking for 0 as all registers are initially 0. If they had a wall then I would be setting 2 so this still works.
EffectDC():Int_Set( 1, bHasWall + 1 )
end
</PLAY_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
if (EffectDC():Int_Get( 1 ) == 1) then
local oPlayer = EffectDC():Get_PlayerPtr( 0 )
-- Defending player had no walls, but since this is an INTERVENING_IF sequence we need to check again.
local oFilter = ClearFilter()
oFilter:Add( FE_SUBTYPE, OP_IS, CREATURE_TYPE_WALL )
oFilter:Add( FE_CONTROLLER, OP_IS, oPlayer )
local bHasWall = oFilter:CountStopAt(1)
if (bHasWall == 0) then
-- Still no walls so do damage.
oFilter = ClearFilter()
oFilter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
oFilter:Add( FE_CONTROLLER, OP_IS, oPlayer )
oFilter:Add( FE_CHARACTERISTIC, OP_NOT, CHARACTERISTIC_FLYING )
local nCount = oFilter:EvaluateObjects()
if (nCount > 0) then
for i = 0, nCount-1 do
local oCard = oFilter:GetNthEvaluatedObject(i)
if (oCard ~= nil) then
EffectSourceLKI():DealDamageTo( 2, oCard )
end
end
end
end
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
- Code: Select all
<AVAILABILITY>
return Object():IsAttacking()
</AVAILABILITY>
Sliver Hive - Can't be made properly as mana can't be restricted (I tried).
Battlefield Thaumaturge - Yep, impossible as you can't reduce cost once cast (because you have to count targets) and you can't target until you cast.
Just getting started: Xander9009's DotP 2014 Community Wad
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
- RiiakShiNal
- Programmer
- Posts: 2185
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 496 times
Re: Some card issues I'm having
by volrathxp » 29 Jul 2014, 02:00
Thanks. I kind of had the suspicions over both Thaumaturge and Gryff, but the confirmation kind of makes me feel better. I will look at the rest of the suggestions here, and good suggestion on the Scuttler.
volrathxp
Re: Some card issues I'm having
by volrathxp » 29 Jul 2014, 03:14
So I tried the Siege Dragon code... and it errors out on the RSN_GetDefendingPlayer function. I'm assuming that's one of your functions I don't have somehow? I've got your Manual Mana functions and Core fixes.RiiakShiNal wrote:Well, let's see:volrathxp wrote:Alright... in an effort to kind of condense my question posts, these are the cards I'm struggling to wrap my head around right now. For reference, I'm just putting the code in for what I'm working on, not the whole card.
- Siege Dragon: I've got his ETB trigger down, but his attack trigger is getting me something fierce. Here is where I'm at with it. It triggers, but doesn't do any damage.- Sage of Hours: Heroic is no big deal here, that works just fine. It's the counter thing I'm dealing with. I followed along with how Vish Kal transfers counters over using SetInt and GetInt, but it tells me it's trying to get a nil value in GetInt.
- Siege Dragon | Open
- Code: Select all
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever Siege Dragon attacks, if defending player controls no Walls, it deals 2 damage to each creature without flying that player controls.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[À chaque fois que le Dragon de siège attaque, si le joueur défenseur ne contrôle pas de mur, il inflige 2 blessures à chaque créature sans le vol que ce joueur contrôle.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Siempre que el Dragón de asedio ataque, si el jugador defensor no controla ningún Muro, le hace 2 puntos de daño a cada criatura sin la habilidad de volar que controla ese jugador.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Immer wenn der Belagerungsdrache angreift und falls der verteidigende Spieler keine Mauer kontrolliert, fügt er jeder nichtfliegenden Kreatur, die dieser Spieler kontrolliert, 2 Schadenspunkte zu.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogniqualvolta il Drago da Assedio attacca, se il giocatore in difesa non controlla alcun Muro, il Drago da Assedio infligge 2 danni a ogni creatura senza volare controllata da quel giocatore.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[包囲ドラゴンが攻撃するたび、防御プレイヤーが壁をコントロールしていない場合、これはそのプレイヤーがコントロールする飛行を持たない各クリーチャーに、それぞれ2点のダメージを与える。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[공성 용이 공격할 때마다, 수비플레이어가 조종하는 벽이 없다면, 공성 용은 그 플레이어가 조종하는 생물 중 비행이 없는 각 생물에게 피해 2점을 입힌다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Каждый раз, когда Осадный Дракон атакует, если под контролем защищающегося игрока нет Стен, он наносит 2 повреждения каждому существу без Полета под контролем того игрока.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Toda vez que Dragão de Cerco atacar, se o jogador defensor não controlar nenhuma Barreira, ele causará 2 pontos de dano a cada criatura sem voar que aquele jogador controla.]]></LOCALISED_TEXT>
<TRIGGER value="ATTACKING" simple_qualifier="self" />
<FILTER filter_id="1">
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
filter:Add( FE_SUBTYPE, OP_IS, CREATURE_TYPE_WALL )
filter:Add( FE_CONTROLLER, OP_NOT, EffectController() )
</FILTER>
<RESOLUTION_TIME_ACTION filter_id="1">
if FilteredCard() ~= nil then
local filter = ClearFilter()
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
filter:Add( FE_CONTROLLER, OP_NOT, EffectController() )
if FilteredCard() ~= nil then
EffectSourceLKI():DealDamageTo( 2, FilteredCard() )
end
else
return false
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>- Forgestoker Dragon: I literally could not find a good enough reference for this to see if I'm using the <AVAILABILITY> tag correctly. When I tested it, it didn't give me the option to use the ability after I declared him as an attacker.
- Sage of Hours | Open
- Code: Select all
<ACTIVATED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Remove all +1/+1 counters from Sage of Hours: For each five counters removed this way, take an extra turn after this one.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Retirez tous les marqueurs +1/+1 du Sage des heures : Pour chaque cinq marqueurs retirés de cette manière, jouez un tour supplémentaire après celui-ci.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Remover todos los contadores +1/+1 del Sabio de las horas: Por cada 5 contadores removidos de esta manera, juega un turno adicional después de este.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Entferne alle +1/+1-Marken vom Weisen der Zeit: Für je fünf auf diese Weise entfernte Marken erhältst du nach diesem Zug einen zusätzlichen Zug.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Rimuovi tutti i segnalini +1/+1 dal Saggio delle Ore: Per ogni cinque segnalini rimossi in questo modo, gioca un turno extra dopo questo.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[時の賢者の上からすべての+1/+1カウンターを取り除く:これにより取り除かれたカウンター5個につき、このターンの直後に追加の1ターンを得る。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[시간의 현자에서 모든 +1/+1 카운터를 제거한다: 이렇게 제거한 카운터 5개마다, 이번 턴 이후에 추가로 한 턴을 얻는다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Удалите все жетоны +1/+1 с Мудреца Времени: за каждые пять жетонов, удаленных таким образом, сделайте дополнительный ход вслед за этим.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Remova todos os marcadores +1/+1 de Sábio das Horas: para cada cinco marcadores removidos desta forma, jogue um turno extra após este.]]></LOCALISED_TEXT>
<COST mana_cost="{0}" type="Mana" />
<PLAY_TIME_ACTION>
local count = EffectSource():CountCounters( MTG():PlusOnePlusOneCounters() )
EffectDC():Set_Int(1, -count)
EffectSource():RemoveCounters( MTG():PlusOnePlusOneCounters(), count )
</PLAY_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local total = EffectDC():GetInt(1)
local player = EffectController()
if player ~= nil then
local team = player:GetTeam()
local turns = math.floor(total/5)
for i=0, (turns) do
team:TakeExtraTurn()
end
end
</RESOLUTION_TIME_ACTION>
</ACTIVATED_ABILITY>Beyond that, the stuff I would like to code, but am having a heck of a time wrapping my head around them. I don't have code for any of these yet, because I'm honestly not sure where to start.
- Forgestoker Dragon | Open
- Code: Select all
<ACTIVATED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{1}{R}: Forgestoker Dragon deals 1 damage to target creature. That creature can’t block this combat. Activate this ability only if Forgestoker Dragon is attacking.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{1}{R} : Le Dragon souffleforge inflige 1 blessure à la créature ciblée. Cette créature ne peut pas bloquer pendant ce combat. N’activez cette capacité que si le Dragon souffleforge attaque.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{1}{R}: El Dragón atizalumbre hace 1 punto de daño a la criatura objetivo. Esa criatura no puede bloquear este combate. Activa esta habilidad solo si el Dragón atizalumbre está atacando.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[{1}{R}: Der Flammenschürer-Drache fügt einer Kreatur deiner Wahl 1 Schadenspunkt zu. Diese Kreatur kann in diesem Kampf nicht blocken. Aktiviere diese Fähigkeit nur, während der Flammenschürer-Drache angreift.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{1}{R}: Il Drago Attizzaforgia infligge 1 danno a una creatura bersaglio. Quella creatura non può bloccare in questo combattimento. Attiva questa abilità solo se il Drago Attizzaforgia sta attaccando.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{1}{R}:クリーチャー1体を対象とする。炉焚きのドラゴンはそれに1点のダメージを与える。この戦闘で、そのクリーチャーではブロックできない。この能力は、炉焚きのドラゴンが攻撃しているときにのみ起動できる。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{1}{R}: 생물 하나를 목표로 정한다. 불바다 용은 그 생물에 피해 1점 입힌다. 그 생물은 이 전투에 방어할 수 없다. 불바다 용이 공격할 때에만 이 능력을 활성화할 수 있다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{1}{R}: Дракон Пылающего Горнила наносит 1 повреждение целевому существу. То существо не может блокировать в этом бою. Активируйте эту способность, только если Дракон Пылающего Горнила атакует.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{1}{R}: Dragão Atiça-forja causa 1 ponto de dano à criatura alvo. Aquela criatura não pode bloquear neste combate. Ative esta habilidade apenas se Dragão Atiça-forja estiver atacando.]]></LOCALISED_TEXT>
<COST mana_cost="{1}{R}" type="Mana" />
<AVAILABILITY combat="1">
local filter = ClearFilter()
filter:Add(FE_IS_ATTACKING, true)
filter:Add(FE_CONTROLLER, OP_IS, EffectController() )
</AVAILABILITY>
<TARGET tag="CARD_QUERY_CHOOSE_CREATURE_DEAL_1_DAMAGE" definition="0" compartment="0" count="1" />
<TARGET_DEFINITION id="0">
local filter = ClearFilter()
filter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
</TARGET_DEFINITION>
<RESOLUTION_TIME_ACTION>
local target_creature = EffectDC():Get_Targets(0):Get_CardPtr(0)
if target_creature ~= nil then
EffectSourceLKI():DealDamageTo(1, target_creature)
end
</RESOLUTION_TIME_ACTION>
<CONTINUOUS_ACTION layer="8">
local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
if target ~= nil then
local characteristics = target:GetCurrentCharacteristics()
characteristics:Bool_Set( CHARACTERISTIC_CANT_BLOCK, 1 )
characteristics:Badge_Set( BADGE_CANT_BLOCK )
end
</CONTINUOUS_ACTION>
<DURATION simple_duration="UntilEOT" />
</ACTIVATED_ABILITY>
- Athreos, God of Passage (Paying life.)
- Avacyn, Guardian Angel (BLERG color choices)
- Battlefield Thaumaturge (I have a sneaking suspicion this card is impossible under DoTP 2014, just based on other cost reduction cards I've looked at)
- Generator Servant
- Genesis Hydra
- Hushwing Gryff (Obvious.)
- Keranos, God of Storms (First card drawn each turn? I looked at a few Miracle cards and couldn't piece this together)
- Kruphix, God of Horizons (Again, having looked at Sakiko and the mess that code is, I'm not sure how feasible Kruphy is)
- Ob Nixilis, Unshackled (Triggering off player searching their library)
- Scuttling Doom Engine (The can't be blocked by power 2 or less thing...)
- Sliver Hive (specifying mana to only be available for Sliver spells...)
Sage of Hours - I've already coded that ability here for someone else.
Siege Dragon - This one is a bit tricky because there are also issues with choosing the Defending player in Two-Headed Giant. Due to this issue you want to trigger every time he attacks (which you have already done), then choose the defending player, then check for walls, then if there are no walls do damage to the creatures. Due to needing to get the defending player you may not be able to use the FILTER block and may have to iterate through the non-flying creatures. Normally though you would use an INTERVENING_IF block for this type of check.Forgestoker Dragon - For the AVAILABILITY all you need is a simple check:
- Siege Dragon | Open
- Code: Select all
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever Siege Dragon attacks, if defending player controls no Walls, it deals 2 damage to each creature without flying that player controls.]]></LOCALISED_TEXT>
<TRIGGER value="ATTACKING" simple_qualifier="self" />
<PLAY_TIME_ACTION>
RSN_ChooseDefendingPlayer( EffectSourceLKI(), SecondaryPlayer() )
</PLAY_TIME_ACTION>
<PLAY_TIME_ACTION>
local oPlayer = RSN_GetDefendingPlayer( EffectSourceLKI() )
if (oPlayer ~= nil) then
-- Check to see how many walls defending player has.
EffectDC():Set_PlayerPtr( 0, oPlayer )
local oFilter = ClearFilter()
oFilter:Add( FE_SUBTYPE, OP_IS, CREATURE_TYPE_WALL )
oFilter:Add( FE_CONTROLLER, OP_IS, oPlayer )
local bHasWall = oFilter:CountStopAt(1)
-- I do the +1 here so we aren't checking for 0 as all registers are initially 0. If they had a wall then I would be setting 2 so this still works.
EffectDC():Int_Set( 1, bHasWall + 1 )
end
</PLAY_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
if (EffectDC():Int_Get( 1 ) == 1) then
local oPlayer = EffectDC():Get_PlayerPtr( 0 )
-- Defending player had no walls, but since this is an INTERVENING_IF sequence we need to check again.
local oFilter = ClearFilter()
oFilter:Add( FE_SUBTYPE, OP_IS, CREATURE_TYPE_WALL )
oFilter:Add( FE_CONTROLLER, OP_IS, oPlayer )
local bHasWall = oFilter:CountStopAt(1)
if (bHasWall == 0) then
-- Still no walls so do damage.
oFilter = ClearFilter()
oFilter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
oFilter:Add( FE_CONTROLLER, OP_IS, oPlayer )
oFilter:Add( FE_CHARACTERISTIC, OP_NOT, CHARACTERISTIC_FLYING )
local nCount = oFilter:EvaluateObjects()
if (nCount > 0) then
for i = 0, nCount-1 do
local oCard = oFilter:GetNthEvaluatedObject(i)
if (oCard ~= nil) then
EffectSourceLKI():DealDamageTo( 2, oCard )
end
end
end
end
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>Generator Servant - You can use RSN_CountColourManaInPlayerPool( COLOUR_COLOURLESS, EffectController() ) to count the amount of colourless mana in your mana pool, but for Generator Servant it would probably be better to use RSN_GetProducedTokenChest() to get the actual mana tokens then when a creature spell is cast check to see if any of those tokens was used to see if the creature gets haste until end of turn (you would have to make sure to clear the chest once used to prevent unwanted haste assigns).
- Code: Select all
<AVAILABILITY>
return Object():IsAttacking()
</AVAILABILITY>
Sliver Hive - Can't be made properly as mana can't be restricted (I tried).
Battlefield Thaumaturge - Yep, impossible as you can't reduce cost once cast (because you have to count targets) and you can't target until you cast.
Forgestoker, even with the check that Object():IsAttacking() still fails to give me the option to activate the ability after declaring him as an attacker.
volrathxp
Re: Some card issues I'm having
by RiiakShiNal » 29 Jul 2014, 10:17
RSN_GetDefendingPlayer() is part of the Core Fixes v2 (or higher) and it shouldn't be throwing an error if RSN_ChooseDefendingPlayer() isn't throwing an error.volrathxp wrote:So I tried the Siege Dragon code... and it errors out on the RSN_GetDefendingPlayer function. I'm assuming that's one of your functions I don't have somehow? I've got your Manual Mana functions and Core fixes.
I'll play around with it after I get home from work and see if I can figure out what's wrong.volrathxp wrote:Forgestoker, even with the check that Object():IsAttacking() still fails to give me the option to activate the ability after declaring him as an attacker.
Just getting started: Xander9009's DotP 2014 Community Wad
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
- RiiakShiNal
- Programmer
- Posts: 2185
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 496 times
Re: Some card issues I'm having
by volrathxp » 29 Jul 2014, 17:45
I managed to get both working actually. XdRiiakShiNal wrote:RSN_GetDefendingPlayer() is part of the Core Fixes v2 (or higher) and it shouldn't be throwing an error if RSN_ChooseDefendingPlayer() isn't throwing an error.volrathxp wrote:So I tried the Siege Dragon code... and it errors out on the RSN_GetDefendingPlayer function. I'm assuming that's one of your functions I don't have somehow? I've got your Manual Mana functions and Core fixes.I'll play around with it after I get home from work and see if I can figure out what's wrong.volrathxp wrote:Forgestoker, even with the check that Object():IsAttacking() still fails to give me the option to activate the ability after declaring him as an attacker.
volrathxp
Re: Some card issues I'm having
by RiiakShiNal » 29 Jul 2014, 22:44
Well, as long as they are working, then no problem.
Just getting started: Xander9009's DotP 2014 Community Wad
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
- RiiakShiNal
- Programmer
- Posts: 2185
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 496 times
Re: Some card issues I'm having
by volrathxp » 30 Jul 2014, 20:14
So I have managed to get Athreos working, which is cool.
My issue now is trying to get Marchesa working. The Dethrone trigger is throwing me for a bit of a loop. I am trying to understand GetNumberOfPlayers() and comparing the attacked player's life total but it is not working. I'm on mobile currently so I don't have any code off hand. Does anyone have any thoughts?
My issue now is trying to get Marchesa working. The Dethrone trigger is throwing me for a bit of a loop. I am trying to understand GetNumberOfPlayers() and comparing the attacked player's life total but it is not working. I'm on mobile currently so I don't have any code off hand. Does anyone have any thoughts?
volrathxp
Re: Some card issues I'm having
by sweetLu » 30 Jul 2014, 21:10
Sure. TFM posted a code for dethrone in 2014s Formal Request Thread.
Here is the code he posted for dethrone:
Here is the code he posted for dethrone:
- Dethrone | Open
- Code: Select all
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Dethrone]]></LOCALISED_TEXT>
<TRIGGER value="ATTACKING" simple_qualifier="self">
local defender_life = EffectSource():GetPlayerAttacked():GetLifeTotal()
for i=0,MTG():GetNumberOfPlayers()-1 do
if MTG():GetNthPlayer(i):GetLifeTotal() > defender_life then
return false
end
end
return true
</TRIGGER>
<RESOLUTION_TIME_ACTION>
if EffectSource() ~= nil then
EffectSource():AddCounters( MTG():PlusOnePlusOneCounters(), 1 )
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
Re: Some card issues I'm having
by volrathxp » 31 Jul 2014, 02:10
Sweet! That's exactly what I was looking for! Thanks so much. I was close to it, I think.sweetLu wrote:Sure. TFM posted a code for dethrone in 2014s Formal Request Thread.
Here is the code he posted for dethrone:He gets the defending player's life total then cycles through the other players in the game. If another player has a life total greater than the defending player, the trigger returns false.
- Dethrone | Open
- Code: Select all
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Dethrone]]></LOCALISED_TEXT>
<TRIGGER value="ATTACKING" simple_qualifier="self">
local defender_life = EffectSource():GetPlayerAttacked():GetLifeTotal()
for i=0,MTG():GetNumberOfPlayers()-1 do
if MTG():GetNthPlayer(i):GetLifeTotal() > defender_life then
return false
end
end
return true
</TRIGGER>
<RESOLUTION_TIME_ACTION>
if EffectSource() ~= nil then
EffectSource():AddCounters( MTG():PlusOnePlusOneCounters(), 1 )
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
volrathxp
Re: Some card issues I'm having
by volrathxp » 02 Aug 2014, 02:19
So here's where I'm at with what I'm trying to get done and fully working and the things I'm having trouble with. Hopefully, once I get this stuff cleaned up, I'll be able to actually put this out and let people mess with it (probably make some decks that work with the cards in it too).
Dictate of Karametra / Mirari's Wake - I am all sorts of confused about these two. I copied some code from Mana Flare that used RSN's Manual Mana Functions, but it seems like they aren't actually doubling mana or adding additional.
The rest of the cards I'd like to get done and could use some pointers on:
Boonweaver Giant (searching doesn't bother me here, it's the stipulation of the library being in play)
Brago, King Eternal (I'm pretty sure I know what to do here, just a nudge in the right direction is all I need)
Genesis Hydra (At first glance, I thought this looked easy and then I started looking at the Genesis Wave code, I figured out how to make it reveal the cards, but to get it to only let you pick one that matches the X cost...)
Kurkesh, Onakke Ancient (I'm sure there's something for this, I'm just not sure what it is.)
Ob Nixilis, Unshackled (Even with the offered code on this guy, it still kind of eludes me... I'm not sure how he actually triggers. I'm pretty sure there isn't some form of generic trigger, and I'm sure there isn't a TRIGGER value that actually lets you trigger on library search)
Soul of Ravnica (This guy... I thought maybe counting up all the creatures and doing an Evaluate on them and running through with a for loop and counting all the colors would work but now I'm not so sure...)
Wakestone Gargoyle (This kind of bugs me, I'm not sure there's a characteristic that lets a creature with Defender attack as though it didn't have Defender, the only solution I see hear would be to make the creature temporarily lose Defender but then the interaction with stuff like Vent Sentinel etc is kind of broken (and I did code Vent Sentinel for that reason), so I'm not sure this guy is really possible)
The only last guy I have to build is Goblin Kaboomist, and custom tokens are fairly easy to me, so I should be able to get him done pretty easily.
Dictate of Karametra / Mirari's Wake - I am all sorts of confused about these two. I copied some code from Mana Flare that used RSN's Manual Mana Functions, but it seems like they aren't actually doubling mana or adding additional.
- Dictate of Karametra | Open
- Code: Select all
<?xml version='1.0' encoding='UTF-8'?>
<CARD_V2 ExportVersion="1">
<FILENAME text="DICTATE_OF_KARAMETRA_1000380401" />
<CARDNAME text="DICTATE_OF_KARAMETRA" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Dictate of Karametra]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Précepte de Karametra]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Mandato de Karametra]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Gebot der Karametra]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Dettami di Karametra]]></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[Decreto de Carametra]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="1000380401" />
<ARTID value="1000380401" />
<ARTIST name="Noah Bradley" />
<CASTING_COST cost="{3}{G}{G}" />
<FLAVOURTEXT>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[“I refuse to let the folly of mortals endanger the home I made for them.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[« Je refuse de laisser la folie des mortels mettre en danger le foyer que je leur ai créé. »]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[“Me niego a que la locura de los mortales ponga en peligro el hogar que creé para ellos”.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[„Ich weigere mich zuzulassen, dass die Torheit der Sterblichen die Heimat zerstört, die ich für sie erschaffen habe.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[“Mi rifiuto di permettere che la follia dei mortali metta a repentaglio la dimora che ho creato per loro.”]]></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[“Eu me recuso a permitir que esta tolice dos mortais coloque em risco o lar que construí para eles.”]]></LOCALISED_TEXT>
</FLAVOURTEXT>
<TYPE metaname="Enchantment" />
<EXPANSION value="JOU" />
<RARITY metaname="R" />
<STATIC_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Flash]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Flash]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Destello.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Aufblitzen]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Lampo]]></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[Lampejo]]></LOCALISED_TEXT>
<INTRINSIC characteristic="CHARACTERISTIC_FLASH" />
</STATIC_ABILITY>
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever a player taps a land for mana, that player adds one mana to his or her mana pool of any type that land produced.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[À chaque fois qu’un joueur engage un terrain pour du mana, ce joueur ajoute à sa réserve un mana de n’importe quel type que ce terrain produisait.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Siempre que un jugador gire una tierra para obtener maná, ese jugador agrega un maná de un tipo que produjo esa tierra a su reserva de maná.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Immer wenn ein Spieler ein Land für Mana tappt, erhöht dieser Spieler seinen Manavorrat um ein zusätzliches Mana eines beliebigen Typs, den dieses Land erzeugt hat.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ogniqualvolta un giocatore TAPpa una terra per attingere mana, quel giocatore aggiunge alla sua riserva di mana un mana di qualsiasi tipo quella terra abbia prodotto.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[プレイヤー1人がマナを引き出す目的で土地を1つタップするたび、そのプレイヤーはその土地が生み出したいずれかのタイプのマナ1点を自分のマナ・プールに加える。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[플레이어가 마나를 얻기 위해 대지를 탭할 때마다, 그 플레이어는 그 대지가 생성한 마나 유형 중 하나를 골라 자신의 마나풀에 추가로 한 개 담는다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Каждый раз, когда игрок поворачивает землю для получения маны, тот игрок добавляет в свое хранилище маны одну ману любого типа, произведенного той землей.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Toda vez que um jogador virar um terreno para gerar mana, ele adicionará um mana à própria reserva de mana de qualquer tipo que aquele terreno gerar.]]></LOCALISED_TEXT>
<TRIGGER value="BECAME_TAPPED_FOR_MANA">
local oCard = TriggerObject()
if (oCard ~= nil) then
if (oCard:GetCardType():Test( CARD_TYPE_LAND )) then
if (RSN_UsedManaAbility( oCard )) then
return true
end
end
end
-- If we don't have the TriggerObject then we don't know if it was a mana ability or not.
return false
</TRIGGER>
<RESOLUTION_TIME_ACTION>
EffectDC():Int_Set( 1, -1 )
local oCard = TriggerObjectLKI()
if (oCard ~= nil) then
local nCount = RSN_CountProducedColours( oCard )
if (nCount == 0) then
-- Do nothing because no mana was produced.
elseif (nCount == 1) then
EffectDC():Int_Set( 1, RSN_GetProducedColourByIndex( oCard, 0 ) )
else
local oPlayer = oCard:GetPlayer()
if (oPlayer ~= nil) then
oPlayer:BeginNewMultipleChoice()
oPlayer:AddMultipleChoiceAnswer( "RSN_MODE_PRODUCE_C", (RSN_CheckProducedColour( oCard, COLOUR_COLOURLESS ) > 0) )
oPlayer:AddMultipleChoiceAnswer( "RSN_MODE_PRODUCE_W", (RSN_CheckProducedColour( oCard, COLOUR_WHITE ) > 0) )
oPlayer:AddMultipleChoiceAnswer( "RSN_MODE_PRODUCE_U", (RSN_CheckProducedColour( oCard, COLOUR_BLUE ) > 0) )
oPlayer:AddMultipleChoiceAnswer( "RSN_MODE_PRODUCE_B", (RSN_CheckProducedColour( oCard, COLOUR_BLACK ) > 0) )
oPlayer:AddMultipleChoiceAnswer( "RSN_MODE_PRODUCE_R", (RSN_CheckProducedColour( oCard, COLOUR_RED ) > 0) )
oPlayer:AddMultipleChoiceAnswer( "RSN_MODE_PRODUCE_G", (RSN_CheckProducedColour( oCard, COLOUR_GREEN ) > 0) )
oPlayer:AskMultipleChoiceQuestion( "MODE_CHOOSE_ONE", oCard )
end
end
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local oCard = TriggerObjectLKI()
if (oCard ~= nil) then
local oPlayer = oCard:GetPlayer()
if (oPlayer ~= nil) then
local nCount = RSN_CountProducedColours( oCard )
if (nCount > 1) then
EffectDC():Int_Set( 1, oPlayer:GetMultipleChoiceResult() )
end
if (nCount > 0) then
local nColour = EffectDC():Int_Get( 1 )
if (nColour == COLOUR_COLOURLESS) then
RSN_ProduceForPlayerNoTrigger( "{1}", 1, oPlayer )
elseif (nColour == COLOUR_BLACK) then
RSN_ProduceForPlayerNoTrigger( "{B}", 1, oPlayer )
elseif (nColour == COLOUR_BLUE) then
RSN_ProduceForPlayerNoTrigger( "{U}", 1, oPlayer )
elseif (nColour == COLOUR_GREEN) then
RSN_ProduceForPlayerNoTrigger( "{G}", 1, oPlayer )
elseif (nColour == COLOUR_RED) then
RSN_ProduceForPlayerNoTrigger( "{R}", 1, oPlayer )
elseif (nColour == COLOUR_WHITE) then
RSN_ProduceForPlayerNoTrigger( "{W}", 1, oPlayer )
end
end
end
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
RSN_EliminateExtraManaTokens()
</RESOLUTION_TIME_ACTION>
<AUTO_SKIP always="1" />
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY forced_skip="1" replacement_effect="1">
<TRIGGER value="BEGINNING_OF_STEP" pre_trigger="1" />
<RESOLUTION_TIME_ACTION>
RSN_ClearProducedMana()
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_B" />
<TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_C" />
<TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_G" />
<TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_R" />
<TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_U" />
<TOKEN_REGISTRATION reservation="1" type="RSN_TOKEN_MANA_W" />
<HELP title="MORE_INFO_BADGE_TITLE_12" body="MORE_INFO_BADGE_BODY_12" zone="ZONE_ANY" />
</CARD_V2>
The rest of the cards I'd like to get done and could use some pointers on:
Boonweaver Giant (searching doesn't bother me here, it's the stipulation of the library being in play)
Brago, King Eternal (I'm pretty sure I know what to do here, just a nudge in the right direction is all I need)
Genesis Hydra (At first glance, I thought this looked easy and then I started looking at the Genesis Wave code, I figured out how to make it reveal the cards, but to get it to only let you pick one that matches the X cost...)
Kurkesh, Onakke Ancient (I'm sure there's something for this, I'm just not sure what it is.)
Ob Nixilis, Unshackled (Even with the offered code on this guy, it still kind of eludes me... I'm not sure how he actually triggers. I'm pretty sure there isn't some form of generic trigger, and I'm sure there isn't a TRIGGER value that actually lets you trigger on library search)
Soul of Ravnica (This guy... I thought maybe counting up all the creatures and doing an Evaluate on them and running through with a for loop and counting all the colors would work but now I'm not so sure...)
Wakestone Gargoyle (This kind of bugs me, I'm not sure there's a characteristic that lets a creature with Defender attack as though it didn't have Defender, the only solution I see hear would be to make the creature temporarily lose Defender but then the interaction with stuff like Vent Sentinel etc is kind of broken (and I did code Vent Sentinel for that reason), so I'm not sure this guy is really possible)
The only last guy I have to build is Goblin Kaboomist, and custom tokens are fairly easy to me, so I should be able to get him done pretty easily.
volrathxp
Re: Some card issues I'm having
by RiiakShiNal » 02 Aug 2014, 03:11
Note that with Mana Flare (and your cards) that the player will only get the extra mana if they manually tapped for mana. This is because auto-tapped lands don't trigger the BECAME_TAPPED_FOR_MANA event it only gets triggered by my functions which means you have to manually tap for the event to trigger.
For Boonweaver Giant I'm unsure what you mean about the library being in play because I don't see anything like that in the card. You just need to search for the a card that CanAttachTo() and then use PutOntoBattlefieldAttachedTo() to attach it to Boonweaver Giant.
For Brago, King Eternal it's just using the SOURCE_DEALS_DAMAGE_TO_PLAYER trigger and a TARGET with item_count_any_number_of="1".
Kurkesh, Onakke Ancient, I don't remember anything in DotP 2014 for copying abilities, you can copy spells (and assign new targets), but I don't think you can for abilities.
For Soul of Ravnica to count colours among permanents you control you loop through the colours and do a filter CountStopAt(1) == 1 to see if you have a permanent of that colour if so increase your colour count.
Wakestone Gargoyle, nope, there is no such characteristic in DotP 2014, but there is in DotP 2015. That is the only workaround and it does break interactions that check for defender.
For Boonweaver Giant I'm unsure what you mean about the library being in play because I don't see anything like that in the card. You just need to search for the a card that CanAttachTo() and then use PutOntoBattlefieldAttachedTo() to attach it to Boonweaver Giant.
For Brago, King Eternal it's just using the SOURCE_DEALS_DAMAGE_TO_PLAYER trigger and a TARGET with item_count_any_number_of="1".
Kurkesh, Onakke Ancient, I don't remember anything in DotP 2014 for copying abilities, you can copy spells (and assign new targets), but I don't think you can for abilities.
For Soul of Ravnica to count colours among permanents you control you loop through the colours and do a filter CountStopAt(1) == 1 to see if you have a permanent of that colour if so increase your colour count.
Wakestone Gargoyle, nope, there is no such characteristic in DotP 2014, but there is in DotP 2015. That is the only workaround and it does break interactions that check for defender.
Just getting started: Xander9009's DotP 2014 Community Wad
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
Need a deck builder: DotP 2014 Deck Builder
Problems Modding: DotP 2014 Frequent Modding Mistakes
- RiiakShiNal
- Programmer
- Posts: 2185
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 496 times
Re: Some card issues I'm having
by sweetLu » 02 Aug 2014, 03:14
Not sure of what you mean about "library being in play" but I believe in DotP you cannot search multiple zones with a single query. Well you could put all possible cards into a single data chest and let them choose from that but I wouldn't suggest that. For this I'd suggest a multiple choice question asking the user to select which zone they want to search and then if they searched the library you can shuffle it. I'm not sure if that is what you were getting at or not.volrathxp wrote:Boonweaver Giant (searching doesn't bother me here, it's the stipulation of the library being in play)
The trigger is easy. For the target portion you can try using the "any_number_of" attribute like:volrathxp wrote:Brago, King Eternal (I'm pretty sure I know what to do here, just a nudge in the right direction is all I need)
- Code: Select all
<TARGET tag="CARD_QUERY_CHOOSE_CREATURE_FLICKER" definition="0" compartment="0" any_number_of="1" />
- | Open
- Code: Select all
<RESOLUTION_TIME_ACTION>
local targetDC = EffectDC():Get_Targets(0)
if targetDC ~= nil then
local count = targetDC:Count()
for i = 0, (count - 1) do
local target = targetDC:Get_CardPtr(i)
if target ~= nil then
targetDC:Protect_CardPtr(i)
target:Exile()
end
end
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local targetDC = EffectDC():Get_Targets(0)
if targetDC ~= nil then
local count = targetDC:Count()
for i = 0, (count - 1) do
local target = targetDC:Get_CardPtr(i)
if target ~= nil then
target:PutOntoBattlefield( target:GetOwner() )
end
end
end
</RESOLUTION_TIME_ACTION>
In the first RTA of Genesis Wave, the "select cards" part is:volrathxp wrote:Genesis Hydra (At first glance, I thought this looked easy and then I started looking at the Genesis Wave code, I figured out how to make it reveal the cards, but to get it to only let you pick one that matches the X cost...)
- Code: Select all
for i=0,(cardsSelectable-1) do
effectController:SetItemPrompt( i, "CARD_QUERY_CHOOSE_CARD_TO_PUT_ONTO_BATTLEFIELD" )
end
No copying abilities in 2014 however with the introduction of Illusionist's Bracers in 2015 this should be possible.volrathxp wrote:Kurkesh, Onakke Ancient (I'm sure there's something for this, I'm just not sure what it is.)
Yea I didn't post something for this. For the trigger values try adding ABILITY_RESOLVED and SPELL_RESOLVED. You can add them both to the same triggered ability. Now that I think of it, that won't work because the interrogation I gave you is for the whole turn which is incorrect. I'll have to think about this one some more...volrathxp wrote:Ob Nixilis, Unshackled (Even with the offered code on this guy, it still kind of eludes me... I'm not sure how he actually triggers. I'm pretty sure there isn't some form of generic trigger, and I'm sure there isn't a TRIGGER value that actually lets you trigger on library search)
You might want to try starting with the colors and looping through the creatures. See if this works:volrathxp wrote:Soul of Ravnica (This guy... I thought maybe counting up all the creatures and doing an Evaluate on them and running through with a for loop and counting all the colors would work but now I'm not so sure...)
- Code: Select all
local count = 0
for i = 1, 5 do
local filter = ClearFilter()
filter:Add( FE_COLOUR, OP_IS, i )
filter:Add( FE_CONTROLLER, OP_IS, EffectController())
if filter:CountStopAt(1) == 1 then
count = count + 1
end
end
No, in 2014 he is not. There is no characteristic in 2014 for that but they added that possibility in 2015. The best you can do is make the creature lose defender during the combat phase and regain it in the 2nd main.volrathxp wrote:Wakestone Gargoyle (This kind of bugs me, I'm not sure there's a characteristic that lets a creature with Defender attack as though it didn't have Defender, the only solution I see hear would be to make the creature temporarily lose Defender but then the interaction with stuff like Vent Sentinel etc is kind of broken (and I did code Vent Sentinel for that reason), so I'm not sure this guy is really possible)
Okay then have fun .volrathxp wrote:The only last guy I have to build is Goblin Kaboomist, and custom tokens are fairly easy to me, so I should be able to get him done pretty easily.
I haven't coded in awhile so it is possible that everything I just told you is incorrect .
Edit - Aww too slow. But I already typed it out so I'm posting it anyway
Last edited by sweetLu on 07 Aug 2014, 04:05, edited 1 time in total.
Re: Some card issues I'm having
by volrathxp » 02 Aug 2014, 21:53
Thanks guys, I am working my way through that stuff now. Sorry about the confusion on Boonweaver Giant, I cannot words.
volrathxp
39 posts
• Page 1 of 3 • 1, 2, 3
Who is online
Users browsing this forum: No registered users and 58 guests