Board index
Programs with AI or Rules Enforcement
Magic: The Gathering - Duels of the Planeswalkers
New MTG Cards and Decks (2010, 2012, 2013, 2014, 2015, Magic Duels)
2014




Formal Request Thread
Moderator: CCGHQ Admins
Re: Formal Request Thread
by Xander9009 » 07 Mar 2015, 19:25
Fair enough. I wasn't sure what the exact result of the function was, so it was just a guess. (They're used everywhere, but rarely have their exact results explained.)
Anyway, in that case, GetOwner() should have worked. Either way, the check for nil should at least prevent the crashing, allowing you to test it out. (If you don't already have an easy way to test it out, I'd suggest dropping Favor of the Gods into your deck from the CW. It'll let you control most of the game. It's a little unintuitive, and a couple bits still don't work, but it certainly makes testing a lot easier.)
Anyway, in that case, GetOwner() should have worked. Either way, the check for nil should at least prevent the crashing, allowing you to test it out. (If you don't already have an easy way to test it out, I'd suggest dropping Favor of the Gods into your deck from the CW. It'll let you control most of the game. It's a little unintuitive, and a couple bits still don't work, but it certainly makes testing a lot easier.)
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
-
Xander9009 - Programmer
- Posts: 2905
- Joined: 29 Jun 2013, 07:44
- Location: Indiana, United States
- Has thanked: 121 times
- Been thanked: 445 times
Re: Formal Request Thread
by Xander9009 » 07 Mar 2015, 22:11
Two cards I can't seem to get working properly and I'm stumped. I've been messing with them for too long to be able to know if I'm missing something simple.
Wild Slash: The trigger is created but the message indicating it is considering the trigger never shows. It originally didn't have the priority attribute, but when it didn't work, I added it at -20, and finally changed it to 20 in an attempt to get it to happen before the damage prevention effects. However, I finally checked it without any prevention abilities (where it should still trigger), and it still didn't appear.
Wild Slash: The trigger is created but the message indicating it is considering the trigger never shows. It originally didn't have the priority attribute, but when it didn't work, I added it at -20, and finally changed it to 20 in an attempt to get it to happen before the damage prevention effects. However, I finally checked it without any prevention abilities (where it should still trigger), and it still didn't appear.
- Wild Slash | Open
- Code: Select all
<?xml version="1.0"?>
<CARD_V2 ExportVersion="1">
<FILENAME text="TEJAHN_FRF_WILD_SLASH_100391959" />
<CARDNAME text="WILD_SLASH" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Wild Slash]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Balafre sauvage]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Zarpazo salvaje]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Wilder Hieb]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Squarcio Selvaggio]]></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[Talho Selvagem]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[猛烈飞斩]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[猛烈飛斬]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="100391959" />
<ARTID value="100391959" />
<ARTIST name="Raymond Swanland" />
<CASTING_COST cost="{R}" />
<FLAVOURTEXT>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Never mistake deception for cleverness.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Il ne faut jamais confondre tromperie et ruse.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Nunca confundas el engaño con la astucia.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Verwechsele nie Täuschung mit Schläue.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Non scambiare mai l’inganno per astuzia.]]></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[Nunca confunda enganação com esperteza.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[千万别误把欺瞒当机灵。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[千萬別誤把欺瞞當機靈。]]></LOCALISED_TEXT>
</FLAVOURTEXT>
<TYPE metaname="Instant" />
<EXPANSION value="FRF" />
<RARITY metaname="U" />
<SPELL_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Ferocious — If you control a creature with power 4 or greater, damage can’t be prevented this turn.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Férocité — Si vous contrôlez une créature de force supérieure ou égale à 4, les blessures ne peuvent pas être prévenues ce tour-ci.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Ferocidad — Si controlas una criatura con fuerza de 4 o más, el daño no puede ser prevenido este turno.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Wildheit — Falls du eine Kreatur mit Stärke 4 oder mehr kontrollierst, kann in diesem Zug kein Schaden verhindert werden.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ferocia — Se controlli una creatura con forza pari o superiore a 4, il danno non può essere prevenuto in questo turno.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[獰猛 ― あなたがパワーが4以上のクリーチャーをコントロールしているなら、このターン、ダメージは軽減できない。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[흉포 — 당신이 공격력이 4 이상인 생물을 조종한다면, 이 턴에 피해는 방지되지 않는다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Свирепость — Если вы контролируете существо с силой не менее 4, повреждения не могут быть предотвращены в этом ходу.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Feroz — Se você controla uma criatura com poder igual ou superior a 4, não é possível prevenir dano neste turno.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[威猛~如果你操控力量等于或大于4的生物,则本回合伤害不能被防止。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[威猛~如果你操控力量等於或大於4的生物,則本回合傷害不能被防止。]]></LOCALISED_TEXT>
<RESOLUTION_TIME_ACTION>
if CheckFerociousCondition(EffectController()) then
EffectController():DisplayMessage("Creating trigger")
MTG():CreateDelayedTrigger(1, nil)
end
</RESOLUTION_TIME_ACTION>
</SPELL_ABILITY>
<TRIGGERED_ABILITY resource_id="1" priority="20">
<CLEANUP simple_cleanup="EndOfTurn" />
<TRIGGER value="SOURCE_DEALS_DAMAGE_TO_PLAYER" pre_trigger="1" damage_type="all">
EffectController():DisplayMessage("Triggering: Player")
return true
</TRIGGER>
<TRIGGER value="SOURCE_DEALS_DAMAGE_TO_OBJECT" pre_trigger="1" damage_type="all">
EffectController():DisplayMessage("Triggering: Object")
return true
</TRIGGER>
<RESOLUTION_TIME_ACTION>
EffectController():DisplayMessage("Resolving")
local amount = Damage():GetAmount()
Damage():Multiply(0)
local player_victim = SecondaryPlayer()
local object_victim = SecondaryObject()
if player_victim ~= nil then
EffectController():DisplayMessage("Player")
TriggerObject():DealUnpreventableDamageTo( amount, player_victim )
end
if object_victim ~= nil then
EffectController():DisplayMessage("Object")
TriggerObject():DealUnpreventableDamageTo( amount, object_victim )
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<SPELL_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Wild Slash deals 2 damage to target creature or player.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[La Balafre sauvage inflige 2 blessures à une cible, créature ou joueur.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[El Zarpazo salvaje hace 2 puntos de daño a la criatura o jugador objetivo.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Der Wilde Hieb fügt einer Kreatur oder einem Spieler deiner Wahl 2 Schadenspunkte zu.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Lo Squarcio Selvaggio infligge 2 danni a una creatura o a un giocatore bersaglio.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[クリーチャー1体かプレイヤー1人を対象とする。乱撃斬はそれに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[Talho Selvagem causa 2 pontos de dano à criatura ou ao jogador alvo.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[猛烈飞斩对目标生物或牌手造成2点伤害。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[猛烈飛斬對目標生物或玩家造成2點傷害。]]></LOCALISED_TEXT>
<SFX text="TARGET_LIGHTNING_PLAY" />
<SFX text="TARGET_FIREBALL_PLAY" />
<TARGET_DEFINITION id="0">
local filter = ClearFilter()
filter:SetFilterType( FILTER_TYPE_CARDS + FILTER_TYPE_PLAYERS )
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
</TARGET_DEFINITION>
<TARGET tag="CARD_QUERY_CHOOSE_DEAL_2_DAMAGE" definition="0" compartment="0" count="1" />
<RESOLUTION_TIME_ACTION>
local target_creature = EffectDC():Get_Targets(0):Get_CardPtr(0)
local target_player = EffectDC():Get_Targets(0):Get_PlayerPtr(0)
if ( target_creature ~= nil ) then
EffectSourceLKI():DealDamageTo( 2, target_creature )
elseif ( target_player ~= nil ) then
EffectSourceLKI():DealDamageTo( 2, target_player )
end
</RESOLUTION_TIME_ACTION>
<AI_SIMPLIFIED_TARGETING compartment="0" hint="HINT_ENEMY_ONLY" />
</SPELL_ABILITY>
</CARD_V2>
- Rageform | Open
- Code: Select all
<?xml version="1.0"?>
<CARD_V2 ExportVersion="1">
<FILENAME text="TEJAHN_FRF_RAGEFORM_100391899" />
<CARDNAME text="RAGEFORM" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Rageform]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Forme rageuse]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Forma de ira]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Wutform]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Forma d’Ira]]></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[Raiviforme]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[怒火赋形]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[怒火賦形]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="100391899" />
<ARTID value="100391899" />
<ARTIST name="Richard Wright" />
<CASTING_COST cost="{2}{R}{R}" />
<TYPE metaname="Enchantment" />
<EXPANSION value="FRF" />
<RARITY metaname="U" />
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[When Rageform enters the battlefield, it becomes an Aura with enchant creature. Manifest the top card of your library and attach Rageform to it.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Quand la Forme rageuse arrive sur le champ de bataille, elle devient une aura avec enchanter : créature. Manifestez la carte du dessus de votre bibliothèque et attachez-lui la Forme rageuse.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Cuando la Forma de ira entre al campo de batalla, se convierte en un aura con encantar criatura. Manifiesta la primera carta de tu biblioteca y anexa la Forma de ira a ella.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Wenn die Wutform ins Spiel kommt, wird sie zu einer Aura und verzaubert eine Kreatur. Manifestiere die oberste Karte deiner Bibliothek und lege die Wutform daran an.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Quando la Forma d’Ira entra nel campo di battaglia, diventa un’Aura con incanta creatura. Manifesta la prima carta del tuo grimorio e assegnale la Forma d’Ira.]]></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[Quando Raiviforme entra no campo de batalha, ele se torna uma Aura com encantar criatura. Manifeste o card do topo do seu grimório e anexe Raiviforme a ele.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[当怒火赋形进战场时,它成为具「结附于生物」的灵气。显化你的牌库顶牌,并将怒火赋形结附于其上。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[當怒火賦形進戰場時,它成為具「結附於生物」的靈氣。顯化你的牌庫頂牌,並將怒火賦形結附於其上。]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_END" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" />
<CONTINUOUS_ACTION layer="4">
if EffectSource() ~= nil then
if EffectDC():Get_Int(0) ~= 1 then
EffectDC():Set_Int(0, 1)
local filter = ClearFilter()
filter:SetZone(ZONE_LIBRARY, EffectController())
filter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
local Count = filter:EvaluateObjects()
local Creature = filter:GetNthEvaluatedObject(0)
if ( Creature ~= nil ) then
EffectDC():Set_CardPtr(1, Creature)
EffectDC():Protect_CardPtr(1)
EffectDC():Get_CardPtr(1):PutOntoBattlefield(EffectController())
EffectSource():GetCurrentCharacteristics():SubType_GetWritable():Add(ENCHANTMENT_TYPE_AURA)
EffectSource():Attach(EffectDC():Get_CardPtr(1))
end
else
EffectSource():GetCurrentCharacteristics():SubType_GetWritable():Add(ENCHANTMENT_TYPE_AURA)
end
end
</CONTINUOUS_ACTION>
<DURATION>
return EffectSource() == nil
</DURATION>
</TRIGGERED_ABILITY>
<STATIC_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Enchanted creature has double strike.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[La créature enchantée a la double initiative.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[La criatura encantada tiene la habilidad de dañar dos veces.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Die verzauberte Kreatur hat Doppelschlag.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[La creatura incantata ha doppio attacco.]]></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[A criatura encantada tem golpe duplo.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[所结附的生物具有连击异能。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[所結附的生物具有連擊異能。]]></LOCALISED_TEXT>
<CONTINUOUS_ACTION layer="6">
local parent = EffectSource():GetParent()
if parent ~= nil then
parent:GetCurrentCharacteristics():Bool_Set( CHARACTERISTIC_DOUBLE_STRIKE, 1 )
end
</CONTINUOUS_ACTION>
</STATIC_ABILITY>
</CARD_V2>
Last edited by Xander9009 on 07 Mar 2015, 22:50, edited 1 time in total.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
-
Xander9009 - Programmer
- Posts: 2905
- Joined: 29 Jun 2013, 07:44
- Location: Indiana, United States
- Has thanked: 121 times
- Been thanked: 445 times
Re: Formal Request Thread
by Tejahn » 07 Mar 2015, 22:37
The work you're doing to bring Fate Reforged to fruition is both incredible and appreciated. Thanks Xander9009!
Re: Formal Request Thread
by Zambooo » 07 Mar 2015, 23:39
If you remember I was trying to work with Leyline of Punishment, guess what? I made itXander9009 wrote:Two cards I can't seem to get working properly and I'm stumped. I've been messing with them for too long to be able to know if I'm missing something simple.
Wild Slash: The trigger is created but the message indicating it is considering the trigger never shows. It originally didn't have the priority attribute, but when it didn't work, I added it at -20, and finally changed it to 20 in an attempt to get it to happen before the damage prevention effects. However, I finally checked it without any prevention abilities (where it should still trigger), and it still didn't appear.Any help with these two would be greatly appreciated. I managed to squash all of the other bugs I found in teh red FRF cards, but these two have be stumped.
- Wild Slash | Open
- Code: Select all
<?xml version="1.0"?>
<CARD_V2 ExportVersion="1">
<FILENAME text="TEJAHN_FRF_WILD_SLASH_100391959" />
<CARDNAME text="WILD_SLASH" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Wild Slash]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Balafre sauvage]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Zarpazo salvaje]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Wilder Hieb]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Squarcio Selvaggio]]></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[Talho Selvagem]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[猛烈飞斩]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[猛烈飛斬]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="100391959" />
<ARTID value="100391959" />
<ARTIST name="Raymond Swanland" />
<CASTING_COST cost="{R}" />
<FLAVOURTEXT>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Never mistake deception for cleverness.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Il ne faut jamais confondre tromperie et ruse.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Nunca confundas el engaño con la astucia.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Verwechsele nie Täuschung mit Schläue.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Non scambiare mai l’inganno per astuzia.]]></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[Nunca confunda enganação com esperteza.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[千万别误把欺瞒当机灵。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[千萬別誤把欺瞞當機靈。]]></LOCALISED_TEXT>
</FLAVOURTEXT>
<TYPE metaname="Instant" />
<EXPANSION value="FRF" />
<RARITY metaname="U" />
<SPELL_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Ferocious — If you control a creature with power 4 or greater, damage can’t be prevented this turn.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Férocité — Si vous contrôlez une créature de force supérieure ou égale à 4, les blessures ne peuvent pas être prévenues ce tour-ci.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Ferocidad — Si controlas una criatura con fuerza de 4 o más, el daño no puede ser prevenido este turno.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Wildheit — Falls du eine Kreatur mit Stärke 4 oder mehr kontrollierst, kann in diesem Zug kein Schaden verhindert werden.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Ferocia — Se controlli una creatura con forza pari o superiore a 4, il danno non può essere prevenuto in questo turno.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[獰猛 ― あなたがパワーが4以上のクリーチャーをコントロールしているなら、このターン、ダメージは軽減できない。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[흉포 — 당신이 공격력이 4 이상인 생물을 조종한다면, 이 턴에 피해는 방지되지 않는다.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Свирепость — Если вы контролируете существо с силой не менее 4, повреждения не могут быть предотвращены в этом ходу.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Feroz — Se você controla uma criatura com poder igual ou superior a 4, não é possível prevenir dano neste turno.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[威猛~如果你操控力量等于或大于4的生物,则本回合伤害不能被防止。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[威猛~如果你操控力量等於或大於4的生物,則本回合傷害不能被防止。]]></LOCALISED_TEXT>
<RESOLUTION_TIME_ACTION>
if CheckFerociousCondition(EffectController()) then
EffectController():DisplayMessage("Creating trigger")
MTG():CreateDelayedTrigger(1, nil)
end
</RESOLUTION_TIME_ACTION>
</SPELL_ABILITY>
<TRIGGERED_ABILITY resource_id="1" priority="20">
<CLEANUP simple_cleanup="EndOfTurn" />
<TRIGGER value="SOURCE_DEALS_DAMAGE_TO_PLAYER" pre_trigger="1" damage_type="all">
EffectController():DisplayMessage("Triggering: Player")
return true
</TRIGGER>
<TRIGGER value="SOURCE_DEALS_DAMAGE_TO_OBJECT" pre_trigger="1" damage_type="all">
EffectController():DisplayMessage("Triggering: Object")
return true
</TRIGGER>
<RESOLUTION_TIME_ACTION>
EffectController():DisplayMessage("Resolving")
local amount = Damage():GetAmount()
Damage():Multiply(0)
local player_victim = SecondaryPlayer()
local object_victim = SecondaryObject()
if player_victim ~= nil then
EffectController():DisplayMessage("Player")
TriggerObject():DealUnpreventableDamageTo( amount, player_victim )
end
if object_victim ~= nil then
EffectController():DisplayMessage("Object")
TriggerObject():DealUnpreventableDamageTo( amount, object_victim )
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<SPELL_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Wild Slash deals 2 damage to target creature or player.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[La Balafre sauvage inflige 2 blessures à une cible, créature ou joueur.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[El Zarpazo salvaje hace 2 puntos de daño a la criatura o jugador objetivo.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Der Wilde Hieb fügt einer Kreatur oder einem Spieler deiner Wahl 2 Schadenspunkte zu.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Lo Squarcio Selvaggio infligge 2 danni a una creatura o a un giocatore bersaglio.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[クリーチャー1体かプレイヤー1人を対象とする。乱撃斬はそれに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[Talho Selvagem causa 2 pontos de dano à criatura ou ao jogador alvo.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[猛烈飞斩对目标生物或牌手造成2点伤害。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[猛烈飛斬對目標生物或玩家造成2點傷害。]]></LOCALISED_TEXT>
<SFX text="TARGET_LIGHTNING_PLAY" />
<SFX text="TARGET_FIREBALL_PLAY" />
<TARGET_DEFINITION id="0">
local filter = ClearFilter()
filter:SetFilterType( FILTER_TYPE_CARDS + FILTER_TYPE_PLAYERS )
filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
</TARGET_DEFINITION>
<TARGET tag="CARD_QUERY_CHOOSE_DEAL_2_DAMAGE" definition="0" compartment="0" count="1" />
<RESOLUTION_TIME_ACTION>
local target_creature = EffectDC():Get_Targets(0):Get_CardPtr(0)
local target_player = EffectDC():Get_Targets(0):Get_PlayerPtr(0)
if ( target_creature ~= nil ) then
EffectSourceLKI():DealDamageTo( 2, target_creature )
elseif ( target_player ~= nil ) then
EffectSourceLKI():DealDamageTo( 2, target_player )
end
</RESOLUTION_TIME_ACTION>
<AI_SIMPLIFIED_TARGETING compartment="0" hint="HINT_ENEMY_ONLY" />
</SPELL_ABILITY>
</CARD_V2>

- Code: Select all
<TRIGGERED_ABILITY replacement_effect="1" priority="-90">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Damage can’t be prevented.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Les blessures ne peuvent pas être prévenues.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[El daño no puede ser prevenido.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Schaden kann nicht verhindert werden.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Il danno non può essere prevenuto.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[ダメージは軽減できない。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Damage can’t be prevented.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Повреждения не могуть быть предотвращены.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[O dano não pode ser prevenido.]]></LOCALISED_TEXT>
<TRIGGER value="SOURCE_DEALS_DAMAGE_TO_PLAYER" pre_trigger="1" damage_type="all" />
<TRIGGER value="SOURCE_DEALS_DAMAGE_TO_OBJECT" pre_trigger="1" damage_type="all" />
<RESOLUTION_TIME_ACTION>
local damage = Damage():GetAmount()
EffectController():DisplayMessage("Damage variable is currently: " .. damage)
local source = Damage():GetSource()
if source == nil then
EffectController():DisplayMessage("source is nil")
else
EffectController():DisplayMessage("Source variable is currently: " .. source:GetCardName())
end
local target_object = SecondaryObject()
if target_object == nil then
EffectController():DisplayMessage("target_object is nil")
else
EffectController():DisplayMessage("Receiving Object is: " .. target_object:GetCardName())
end
local target_player = SecondaryPlayer()
if (target_player == nil) then
EffectController():DisplayMessage("target_player is nil")
end
local damage = Damage():PreventAll()
EffectDC():Set_Int(1, damage)
if (damage > 0) then
EffectController():DisplayMessage("Prevented Damage is: " .. damage)
if source ~= nil then
EffectController():DisplayMessage("Source variable is now: " .. source:GetCardName())
if ( target_object ~= nil ) then
EffectController():DisplayMessage("Receiving Object is now: " .. target_object:GetCardName())
source:DealUnpreventableDamageTo( damage, target_object )
end
if ( target_player ~= nil ) then
source:DealUnpreventableDamageTo( damage, target_player )
end
end
else
EffectController():DisplayMessage("No Damage to be prevented")
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>

Last edited by Zambooo on 07 Mar 2015, 23:42, edited 1 time in total.
Re: Formal Request Thread
by Xander9009 » 07 Mar 2015, 23:42
So apparently it needs to be a replacement effect in addition to pretrigger and a very low priority? I'll try that out, thanks. As for those characteristics, you could throw in a continuous action until end of turn that reevaluates (I'm not 100% sure how reevaluates="1" works, though) which removes that from all permanents and players.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
-
Xander9009 - Programmer
- Posts: 2905
- Joined: 29 Jun 2013, 07:44
- Location: Indiana, United States
- Has thanked: 121 times
- Been thanked: 445 times
Re: Formal Request Thread
by Zambooo » 07 Mar 2015, 23:44
actually I added the "priority part" when I was trying to compensate against the prevent-abilities. If I recall correctly it should work even without that tag.
Also I think that the "Multiply" function works on unpreventable damage too, so assigning to a variable Damage():PreventAll() (that does not work on UnpreventableDamage, tested XD) and then check for the variable > 0 would be safer and should avoid you loops
Edit: now I notice we have the same issue we used to have with Deflecting Palm. But this time split the effect in two triggers won't fix it.. :/
Something is wrong with the 'PreventAll()' function, but without it the effect goes into an infinite damage loop infinite >_> (DealUnpreventableDamageTo triggers SOURCE_DEALS_DAMAGE_TO_PLAYER/SOURCE_DEALS_DAMAGE_TO_OBJECT but since PreventAll() gives 0 in that case, the cycle will stop just here..)
Also I think that the "Multiply" function works on unpreventable damage too, so assigning to a variable Damage():PreventAll() (that does not work on UnpreventableDamage, tested XD) and then check for the variable > 0 would be safer and should avoid you loops
Edit: now I notice we have the same issue we used to have with Deflecting Palm. But this time split the effect in two triggers won't fix it.. :/
- Code: Select all
<TRIGGERED_ABILITY replacement_effect="1" priority="-90">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Damage can’t be prevented.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Les blessures ne peuvent pas être prévenues.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[El daño no puede ser prevenido.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Schaden kann nicht verhindert werden.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Il danno non può essere prevenuto.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[ダメージは軽減できない。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Damage can’t be prevented.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Повреждения не могуть быть предотвращены.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[O dano não pode ser prevenido.]]></LOCALISED_TEXT>
<TRIGGER value="SOURCE_DEALS_DAMAGE_TO_PLAYER" pre_trigger="1" damage_type="all" />
<TRIGGER value="SOURCE_DEALS_DAMAGE_TO_OBJECT" pre_trigger="1" damage_type="all" />
<RESOLUTION_TIME_ACTION>
local delayDC = EffectDC():Make_Chest(5)
local damage = Damage():GetAmount()
EffectController():DisplayMessage("Damage variable is currently: " .. damage)
delayDC:Set_Int(0, damage)
local source = Damage():GetSource()
if source == nil then
EffectController():DisplayMessage("source is nil")
else
EffectController():DisplayMessage("Source variable is currently: " .. source:GetCardName())
end
delayDC:Set_CardPtr(1, source)
local target_object = SecondaryObject()
if target_object == nil then
EffectController():DisplayMessage("target_object is nil")
else
EffectController():DisplayMessage("Receiving Object is: " .. target_object:GetCardName())
end
delayDC:Set_CardPtr(2, target_object)
local target_player = SecondaryPlayer()
if (target_player == nil) then
EffectController():DisplayMessage("target_player is nil")
end
delayDC:Set_PlayerPtr(3, target_player)
local prevented_damage = Damage():PreventAll()
delayDC:Set_Int(4, prevented_damage)
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
delayDC = EffectDC():Get_Chest(5)
MTG():CreateDelayedTrigger(6, delayDC)
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY resource_id="6" replacement_effect="1" priority="-90">
<TRIGGER value="STATE_BASED_EFFECTS" pre_trigger="1" />
<CLEANUP fire_once="1" />
<RESOLUTION_TIME_ACTION>
local damage = EffectDC():Get_Int(0)
local source = EffectDC():Get_CardPtr(1)
local target_object = EffectDC():Get_CardPtr(2)
local target_player = EffectDC():Get_PlayerPtr(3)
local prevented_damage = EffectDC():Get_Int(4)
if (prevented_damage > 0) then
EffectController():DisplayMessage("Prevented Damage is: " .. prevented_damage)
if source ~= nil then
EffectController():DisplayMessage("Source variable is now: " .. source:GetCardName())
if ( target_object ~= nil ) then
EffectController():DisplayMessage("Receiving Object is now: " .. target_object:GetCardName())
source:DealUnpreventableDamageTo( prevented_damage, target_object )
end
if ( target_player ~= nil ) then
source:DealUnpreventableDamageTo( prevented_damage, target_player )
end
end
else
EffectController():DisplayMessage("No Damage to be prevented")
end
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
Something is wrong with the 'PreventAll()' function, but without it the effect goes into an infinite damage loop infinite >_> (DealUnpreventableDamageTo triggers SOURCE_DEALS_DAMAGE_TO_PLAYER/SOURCE_DEALS_DAMAGE_TO_OBJECT but since PreventAll() gives 0 in that case, the cycle will stop just here..)
Re: Formal Request Thread
by Xander9009 » 08 Mar 2015, 07:03
In that case, use a dual data chest or something similar and a toggle integer. When it triggers, set an int to 1. When damage is actually dealt, set it back to 0. This is a very raw idea that will definitely need fleshed out if it has any chance of working. (By that I mean that just what I said will definitely not work as phrased.)
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
-
Xander9009 - Programmer
- Posts: 2905
- Joined: 29 Jun 2013, 07:44
- Location: Indiana, United States
- Has thanked: 121 times
- Been thanked: 445 times
Re: Formal Request Thread
by Zambooo » 08 Mar 2015, 12:04
I have to admit I did not fully understand your plan ehehXander9009 wrote:In that case, use a dual data chest or something similar and a toggle integer. When it triggers, set an int to 1. When damage is actually dealt, set it back to 0. This is a very raw idea that will definitely need fleshed out if it has any chance of working. (By that I mean that just what I said will definitely not work as phrased.)
Also I just noticed that doing this "trick" (transform every damage into UnpreventableDamage) will never return combat damage..

Re: Formal Request Thread
by RiiakShiNal » 08 Mar 2015, 13:21
With Rageform the CONTINUOUS_ACTION will start taking effect before the RESOLUTION_TIME_ACTION this is by DotP's design and to get around it for Rageform you will need to use a flag to tell the CONTINUOUS_ACTION that it is time to start actually applying the effect.
For example:
You may have to play around with where you store the flag since it is possible that the EffectDC() may not update for the continuous effect after it starts running so you might have to use LinkedDC() or RSN_ObjectDC() (even though you are just using it in a single ability).
For dealing damage, there may be an undocumented (because all DotP functions are undocumented) optional parameter to tell the function to deal combat damage instead of non-combat damage. So try passing an additional parameter of 1 to the DealUnpreventableDamageTo() function and see if that works.
For example:
- Continuous - Starts running - flag is still 0, does not apply.
- Resolution 1 - put card into play.
- Resolution 2 - set flag to 1.
- Continuous - flag is now set to 1, actually starts applying now.
You may have to play around with where you store the flag since it is possible that the EffectDC() may not update for the continuous effect after it starts running so you might have to use LinkedDC() or RSN_ObjectDC() (even though you are just using it in a single ability).
For dealing damage, there may be an undocumented (because all DotP functions are undocumented) optional parameter to tell the function to deal combat damage instead of non-combat damage. So try passing an additional parameter of 1 to the DealUnpreventableDamageTo() function and see if that works.
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: 2188
- Joined: 16 May 2011, 21:37
- Has thanked: 75 times
- Been thanked: 497 times
Re: Formal Request Thread
by Zambooo » 08 Mar 2015, 14:23
thanks for the suggestion but I got thisRiiakShiNal wrote:For dealing damage, there may be an undocumented (because all DotP functions are undocumented) optional parameter to tell the function to deal combat damage instead of non-combat damage. So try passing an additional parameter of 1 to the DealUnpreventableDamageTo() function and see if that works.
- Code: Select all
[lua] attempt to index a number value

with this
- Code: Select all
DealUnpreventableDamageTo( 1, target_player, 1 )
Re: Formal Request Thread
by Xander9009 » 08 Mar 2015, 19:22
I'll give that a shot. But it seems to me that shouldn't be the issue with the version of the code I posted, because it uses a single continuous action. The first time the action iterates, it summons the creature, attaches the card, and then makes it an aura (I've switched those last two to see if that's the problem but it didn't work); each subsequent time it runs, it just keeps it being an aura. But I'll definitely give that a shot and see how it works outRiiakShiNal wrote:With Rageform the CONTINUOUS_ACTION will start taking effect before the RESOLUTION_TIME_ACTION this is by DotP's design and to get around it for Rageform you will need to use a flag to tell the CONTINUOUS_ACTION that it is time to start actually applying the effect.
For example:
- Continuous - Starts running - flag is still 0, does not apply.
- Resolution 1 - put card into play.
- Resolution 2 - set flag to 1.
- Continuous - flag is now set to 1, actually starts applying now.
You may have to play around with where you store the flag since it is possible that the EffectDC() may not update for the continuous effect after it starts running so you might have to use LinkedDC() or RSN_ObjectDC() (even though you are just using it in a single ability).

_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
-
Xander9009 - Programmer
- Posts: 2905
- Joined: 29 Jun 2013, 07:44
- Location: Indiana, United States
- Has thanked: 121 times
- Been thanked: 445 times
Re: Formal Request Thread
by Zambooo » 08 Mar 2015, 19:26
I can't believe I just find a fix to the "combat damage" problem.
This
in order:
-Trigger
-source
-type of damage (1 combat, 0 noncombat)
-secondary player/object
This
- Code: Select all
MTG():FireTrigger( TRIGGER_SOURCE_DEALS_DAMAGE_TO_OBJECT, EffectSourceLKI(), 1, target_creature )
MTG():FireTrigger( TRIGGER_SOURCE_DEALS_DAMAGE_TO_PLAYER, EffectSourceLKI(), 1, target_player )

-Trigger
-source
-type of damage (1 combat, 0 noncombat)
-secondary player/object
Re: Formal Request Thread
by Xander9009 » 08 Mar 2015, 19:35
That should definitely fire the trigger. Have you confirmed that it solves the problems you were having? Also, shouldn't EffectSourceLKI() be TriggerObjectLKI()? This card just makes it unpreventable. The original damage dealer is still the one dealing the damage. But either way, if that works, that's awesome 

_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
-
Xander9009 - Programmer
- Posts: 2905
- Joined: 29 Jun 2013, 07:44
- Location: Indiana, United States
- Has thanked: 121 times
- Been thanked: 445 times
Re: Formal Request Thread
by Zambooo » 08 Mar 2015, 19:39
I changed a comma and now it's giving me parameter mismatch, but the first time it triggered me this ability
]
the variables are not what we should have cause I was testing the trigger and I let the Enchantment itsealf deal damage once tapped
Edit: okay things are a bit more complicate than it seemed
At least we're getting closer XD
- Code: Select all
<TRIGGERED_ABILITY>
<TRIGGER value="SOURCE_DEALS_DAMAGE_TO_PLAYER" simple_qualifier="self" damage_type="combat" />
<RESOLUTION_TIME_ACTION>
EffectController():DrawCards(1)
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>

the variables are not what we should have cause I was testing the trigger and I let the Enchantment itsealf deal damage once tapped
Edit: okay things are a bit more complicate than it seemed
- Code: Select all
MTG():FireTrigger( TRIGGER_SOURCE_DEALS_DAMAGE_TO_PLAYER, EffectSource(), 1, target_player )
- Code: Select all
[lua] [string "LEYLINE_OF_PUNISHMENT_283205018_TITLE (RESOLUTION_TIME_ACTION)~0x0000049e"]:4: attempt to index a nil value
[lua] [string "LEYLINE_OF_PUNISHMENT_283205018_TITLE (RESOLUTION_TIME_ACTION)~0x000004a2"]:9:
call parameter mismatch - too many or too few a parameter count declared, method FireTrigger in class __ScriptSystem
At least we're getting closer XD
Re: Formal Request Thread
by Xander9009 » 08 Mar 2015, 20:34
Alright, so, here's the code now for Rageform. I had to over-complicate it A LOT!!! before getting it to work. But once it was finally working, I whittled it down backwards to get it to both work and be sensible. It works now. I'm not sure exactly what the issue was, yet.
- Rageform - Mostly working (no manifest) | Open
- Code: Select all
<?xml version="1.0"?>
<CARD_V2 ExportVersion="1">
<FILENAME text="TEJAHN_FRF_RAGEFORM_100391899" />
<CARDNAME text="RAGEFORM" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Rageform]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Forme rageuse]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Forma de ira]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Wutform]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Forma d’Ira]]></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[Raiviforme]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[怒火赋形]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[怒火賦形]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="100391899" />
<ARTID value="100391899" />
<ARTIST name="Richard Wright" />
<CASTING_COST cost="{2}{R}{R}" />
<TYPE metaname="Enchantment" />
<EXPANSION value="FRF" />
<RARITY metaname="U" />
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[When Rageform enters the battlefield, it becomes an Aura with enchant creature. Manifest the top card of your library and attach Rageform to it.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Quand la Forme rageuse arrive sur le champ de bataille, elle devient une aura avec enchanter : créature. Manifestez la carte du dessus de votre bibliothèque et attachez-lui la Forme rageuse.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Cuando la Forma de ira entre al campo de batalla, se convierte en un aura con encantar criatura. Manifiesta la primera carta de tu biblioteca y anexa la Forma de ira a ella.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Wenn die Wutform ins Spiel kommt, wird sie zu einer Aura und verzaubert eine Kreatur. Manifestiere die oberste Karte deiner Bibliothek und lege die Wutform daran an.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Quando la Forma d’Ira entra nel campo di battaglia, diventa un’Aura con incanta creatura. Manifesta la prima carta del tuo grimorio e assegnale la Forma d’Ira.]]></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[Quando Raiviforme entra no campo de batalha, ele se torna uma Aura com encantar criatura. Manifeste o card do topo do seu grimório e anexe Raiviforme a ele.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[当怒火赋形进战场时,它成为具「结附于生物」的灵气。显化你的牌库顶牌,并将怒火赋形结附于其上。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[當怒火賦形進戰場時,它成為具「結附於生物」的靈氣。顯化你的牌庫頂牌,並將怒火賦形結附於其上。]]></LOCALISED_TEXT>
<TRIGGER value="ZONECHANGE_END" simple_qualifier="self" to_zone="ZONE_BATTLEFIELD" from_zone="ZONE_ANY" />
<RESOLUTION_TIME_ACTION>
local filter = ClearFilter()
filter:SetZone(ZONE_LIBRARY, EffectController())
filter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
local Count = filter:EvaluateObjects()
local Creature = filter:GetNthEvaluatedObject(0)
if ( Creature ~= nil ) then
EffectDC():Set_CardPtr(1, Creature)
EffectDC():Protect_CardPtr(1)
EffectDC():Get_CardPtr(1):PutOntoBattlefield(EffectController())
end
EffectDC():Set_Int(0, 1)
</RESOLUTION_TIME_ACTION>
<CONTINUOUS_ACTION layer="4">
if EffectSource() ~= nil and EffectDC():Get_Int(0) > 0 then
EffectSource():GetCurrentCharacteristics():SubType_GetWritable():Add(ENCHANTMENT_TYPE_AURA)
if EffectDC():Get_Int(0) == 1 then
EffectSource():Attach(EffectDC():Get_CardPtr(1))
EffectDC():Set_Int(0, 2)
end
end
</CONTINUOUS_ACTION>
<CONTINUOUS_ACTION layer="6">
if EffectSource() ~= nil and EffectDC():Get_Int(0) > 0 then
EffectSource():GetCurrentCharacteristics():GrantAbility(1)
end
</CONTINUOUS_ACTION>
<DURATION>
return EffectSource() == nil
</DURATION>
</TRIGGERED_ABILITY>
<SPELL_ABILITY resource_id="1" attach_definition="0">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Enchant creature]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Enchanter : créature]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Encantar criatura.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Verzaubert eine Kreatur]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Incanta creatura]]></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[Encantar criatura]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[结附于生物]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[結附於生物]]></LOCALISED_TEXT>
<TARGET tag="CARD_QUERY_CHOOSE_CREATURE_TO_ENCHANT" 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 = EffectDC():Get_Targets(0):Get_CardPtr(0)
if target ~= nil and EffectSource() ~= nil then
EffectSource():Attach( target )
end
</RESOLUTION_TIME_ACTION>
<AI_SIMPLIFIED_TARGETING compartment="0" hint="HINT_NEUTRAL" />
</SPELL_ABILITY>
<STATIC_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Enchanted creature has double strike.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[La créature enchantée a la double initiative.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[La criatura encantada tiene la habilidad de dañar dos veces.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Die verzauberte Kreatur hat Doppelschlag.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[La creatura incantata ha doppio attacco.]]></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[A criatura encantada tem golpe duplo.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[所结附的生物具有连击异能。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[所結附的生物具有連擊異能。]]></LOCALISED_TEXT>
<CONTINUOUS_ACTION layer="6">
local parent = EffectSource():GetParent()
if parent ~= nil then
parent:GetCurrentCharacteristics():Bool_Set( CHARACTERISTIC_DOUBLE_STRIKE, 1 )
end
</CONTINUOUS_ACTION>
</STATIC_ABILITY>
</CARD_V2>
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
-
Xander9009 - Programmer
- Posts: 2905
- Joined: 29 Jun 2013, 07:44
- Location: Indiana, United States
- Has thanked: 121 times
- Been thanked: 445 times
Who is online
Users browsing this forum: No registered users and 21 guests