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
Community Wad
Moderator: CCGHQ Admins
Re: Community Wad
by fallenangle » 08 Jul 2018, 10:44
Ipnu Rivulet is not like the other deserts. It doesn't specify sorcery speed on the card. It's fine the way it is.
- fallenangle
- Posts: 319
- Joined: 20 Jul 2013, 02:31
- Has thanked: 73 times
- Been thanked: 41 times
Re: Community Wad
by NEMESiS » 08 Jul 2018, 12:48
To specify, Ipnu Rivulet has:fallenangle wrote:Ipnu Rivulet is not like the other deserts. It doesn't specify sorcery speed on the card. It's fine the way it is.
- Code: Select all
<AVAILABILITY sorcery_time="1" />
-
NEMESiS - Posts: 460
- Joined: 03 Jan 2013, 04:02
- Location: Pools of Becoming
- Has thanked: 70 times
- Been thanked: 21 times
Re: Community Wad
by Xander9009 » 08 Jul 2018, 15:14
Wildfire Eternal - Fixed. Now, just don't choose a card when it asks. Also made sure it's not considered targeting.
Ancestral Knowledge - The code you posted is actually identical to what's already in there, so if it's not working, that won't fix it. (Paste both into Notepad++, removed the whitespace from the card's copy, and then compared with a plugin.)
Ipnu Rivulet - Removed sorcery speed availability.
Multani, Yavimaya's Avatar - Added controller check.
Ancestral Knowledge - The code you posted is actually identical to what's already in there, so if it's not working, that won't fix it. (Paste both into Notepad++, removed the whitespace from the card's copy, and then compared with a plugin.)
Ipnu Rivulet - Removed sorcery speed availability.
Multani, Yavimaya's Avatar - Added controller check.
_______________________________
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: Community Wad
by NEMESiS » 08 Jul 2018, 16:15
You're right I copied the code from the broken card...
Vicious Offering's kicker doesn't do anything. Also cleanup text says -4/-4
- | Open
- Code: Select all
<TRIGGERED_ABILITY priority="-20">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Cumulative upkeep {1}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Entretien cumulatif {1}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Mantenimiento acumulativo {1}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Kumulative Versorgung {1}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Mantenimento cumulativo {1}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[累加アップキープ {1}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Cumulative upkeep {1}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Накопительная поддержка {1}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Manutenção cumulativa {1}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[累积维持{1}]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[Cumulative upkeep {1}]]></LOCALISED_TEXT>
<COUNTER_REGISTRATION name="Age" proliferate="00" />
<TRIGGER value="BEGINNING_OF_PLAYERS_STEP" simple_qualifier="controller">
return MTG():GetStep() == STEP_UPKEEP
</TRIGGER>
<RESOLUTION_TIME_ACTION>
if EffectSource() ~= nil then
EffectSource():AddCounters( MTG():GetCountersType("Age"), 1)
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local player = EffectController()
if player ~= nil and EffectSource() ~= nil then
local numCounters = EffectSource():CountCounters( MTG():GetCountersType( "Age") )
if player:GetTotalMana() >= numCounters then
player:BeginNewMultipleChoice()
player:AddMultipleChoiceAnswer( "SPL_CARD_QUERY_PAY_CUMULATIVE_UPKEEP_COST" )
player:AddMultipleChoiceAnswer( "SPL_CARD_QUERY_DO_NOT_PAY_CUMULATIVE_UPKEEP_COST" )
player:AskMultipleChoiceQuestion( "SPL_CARD_QUERY_ANCESTRAL_KNOWLEDGE", EffectSource() )
end
end
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
local player = EffectController()
if player ~= nil and EffectSource() ~= nil then
local numCounters = EffectSource():CountCounters( MTG():GetCountersType( "Age") )
if player:GetTotalMana() >= numCounters*2 then
local result = player:GetMultipleChoiceResult()
if result == 0 then
for i = 0,(numCounters-1) do
player:PayResourceCost(1)
end
else
player:Sacrifice( EffectSource() )
end
else
player:Sacrifice( EffectSource() )
end
end
</RESOLUTION_TIME_ACTION>
<AUTO_SKIP no_effect_source="1" />
</TRIGGERED_ABILITY>
<UTILITY_ABILITY resource_id="1">
<COST mana_cost="{1}" type="Mana" />
</UTILITY_ABILITY>
<TRIGGERED_ABILITY>
Vicious Offering's kicker doesn't do anything. Also cleanup text says -4/-4
-
NEMESiS - Posts: 460
- Joined: 03 Jan 2013, 04:02
- Location: Pools of Becoming
- Has thanked: 70 times
- Been thanked: 21 times
Re: Community Wad
by addict insane » 08 Jul 2018, 23:50
- addict insane
- Posts: 184
- Joined: 02 Mar 2015, 22:20
- Has thanked: 23 times
- Been thanked: 11 times
Re: Community Wad
by Xander9009 » 09 Jul 2018, 05:15
Ancestral Knowledge now has the code you posted.
The First Eruption - I don't see any reason it would be treated as optional, but I rearranged it a little so it ensures the mountain is valid at first and then invalid by the time it deals damage. If it's still valid (which should only happen if it remains on the battlefield), then it'll skip the damage.
Vicious Offering - My only guess here is that the compartment for the kicker was set to compartment 1 which overlapped with the target compartment. I fixed that, so hopefully that takes care of it. I also reworked the logic just a little to require one fewer RTA, but that shouldn't matter.
----
Sorry, I don't have the energy for doing any major coding right now. (That's also why I haven't addressed menace yet, but I *am* aware of it.) Work was busy through the week of the 4th, and this week won't be any better due to a coworker having a family emergency and being off all week, so we're covering for her and we've only got a small handful of workers. Once she's back next week, or maybe just on my next day off (Tuesday), then I'll give those a go. Remind me because I might forget. I don't mind being reminded.
The First Eruption - I don't see any reason it would be treated as optional, but I rearranged it a little so it ensures the mountain is valid at first and then invalid by the time it deals damage. If it's still valid (which should only happen if it remains on the battlefield), then it'll skip the damage.
Vicious Offering - My only guess here is that the compartment for the kicker was set to compartment 1 which overlapped with the target compartment. I fixed that, so hopefully that takes care of it. I also reworked the logic just a little to require one fewer RTA, but that shouldn't matter.
----
Sorry, I don't have the energy for doing any major coding right now. (That's also why I haven't addressed menace yet, but I *am* aware of it.) Work was busy through the week of the 4th, and this week won't be any better due to a coworker having a family emergency and being off all week, so we're covering for her and we've only got a small handful of workers. Once she's back next week, or maybe just on my next day off (Tuesday), then I'll give those a go. Remind me because I might forget. I don't mind being reminded.
_______________________________
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: Community Wad
by addict insane » 09 Jul 2018, 15:24
Ok, thanks a lot, Xander .Xander9009 wrote:Ancestral Knowledge now has the code you posted.
The First Eruption - I don't see any reason it would be treated as optional, but I rearranged it a little so it ensures the mountain is valid at first and then invalid by the time it deals damage. If it's still valid (which should only happen if it remains on the battlefield), then it'll skip the damage.
Vicious Offering - My only guess here is that the compartment for the kicker was set to compartment 1 which overlapped with the target compartment. I fixed that, so hopefully that takes care of it. I also reworked the logic just a little to require one fewer RTA, but that shouldn't matter.
----
Sorry, I don't have the energy for doing any major coding right now. (That's also why I haven't addressed menace yet, but I *am* aware of it.) Work was busy through the week of the 4th, and this week won't be any better due to a coworker having a family emergency and being off all week, so we're covering for her and we've only got a small handful of workers. Once she's back next week, or maybe just on my next day off (Tuesday), then I'll give those a go. Remind me because I might forget. I don't mind being reminded.
Also, I was just playing the Food Chain, Misthollow Griffin combo, and it does two things: First, while it should give you one extra mana every time you recast from exile the targeted creature (Misthollow Griffin or Eternal Scourge), it actually gives you absurdly high amounts of mana. By the third repetition last time I tested it, I had 13 mana instead of 6 (3 to cast Eternal Scourge again, and 3 extra for having done it 3 times). The other thing it does is crashing my game. The number of times I have to repeat the Food Chain combo does not appear to be constant, but it does crash my game every single time I started comboing off. What happens is I get performance issues as I start to combo, and then the crash after a few repetitions.
This phenomenon of having absurd amounts of mana also happens to me with Eldrazi Temple. It seems to interact poorly with other fast mana lands, like Ancient Tomb. I didn't want to mention it because I yet have to find the cards that cause it to 'break', but, whenever you get the chance to test these, you should do it with a combination of moxen, fast mana lands, dual lands, and whatever you can find. I don't think I have ever had Mishra's Workshop act strangely on me though, this is just happening with Eldrazi Temple and the Food Griffin Combo.
I'll remind you next week of all these little things I've found, if it's ok.
- addict insane
- Posts: 184
- Joined: 02 Mar 2015, 22:20
- Has thanked: 23 times
- Been thanked: 11 times
Re: Community Wad
by NEMESiS » 09 Jul 2018, 15:42
Thanks!
I want to mention a weird interaction that I don’t think it’s supposed to work this way and I am not sure it can be fixed. If you have a Wall of Shards out and your opponent has a Kavu Predator, the predator gets counters from its controller gaining life through the Wall of Shards.
I want to mention a weird interaction that I don’t think it’s supposed to work this way and I am not sure it can be fixed. If you have a Wall of Shards out and your opponent has a Kavu Predator, the predator gets counters from its controller gaining life through the Wall of Shards.
-
NEMESiS - Posts: 460
- Joined: 03 Jan 2013, 04:02
- Location: Pools of Becoming
- Has thanked: 70 times
- Been thanked: 21 times
Re: Community Wad
by Xander9009 » 09 Jul 2018, 22:14
Kavu Predator says to trigger if "EffectController() ~= TriggerPlayer():GetTeam()". It should GetTeam() on EffectController as well.
But I'm currently at work so I can't fix it right now.
But I'm currently at work so I can't fix it right now.
_______________________________
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: Community Wad
by addict insane » 14 Jul 2018, 23:10
Rhonas the Indomitable can attack if you control a creature with innately 4 or more power, but if you increase one of your creature's power with Rhonas' activatable ability beyond 4 (and it was previously below 4), Rhonas apparently won't detect it and will not be able to attack.
- addict insane
- Posts: 184
- Joined: 02 Mar 2015, 22:20
- Has thanked: 23 times
- Been thanked: 11 times
Re: Community Wad
by NEMESiS » 15 Jul 2018, 01:19
Grand Architect adds 2 that can be spent on anything, Eternal of Harsh Truths has is a 1/3 not 2/2. Vicious Offering doesn't work. When Nicol Bolas, The Ravager transforms it keeps the same art (it does this weird thing everything sort of blinks when it transforms).
-
NEMESiS - Posts: 460
- Joined: 03 Jan 2013, 04:02
- Location: Pools of Becoming
- Has thanked: 70 times
- Been thanked: 21 times
Re: Community Wad
by loookaz » 16 Jul 2018, 17:00
ditto, I think it was available before...
what happened?
Najlepsze lekcje angielskiego w Warszawie:
http://www.englishwithlucas.com/
https://www.facebook.com/angielski.z.Lucasem
http://www.englishwithlucas.com/
https://www.facebook.com/angielski.z.Lucasem
- loookaz
- Posts: 131
- Joined: 01 Dec 2012, 10:56
- Location: Warsaw, Poland
- Has thanked: 22 times
- Been thanked: 2 times
Re: Community Wad
by loookaz » 16 Jul 2018, 21:28
also the Orzhov Pontiff haunt ability is an endless loop. you need to end the game, because there is no way to end it.
Najlepsze lekcje angielskiego w Warszawie:
http://www.englishwithlucas.com/
https://www.facebook.com/angielski.z.Lucasem
http://www.englishwithlucas.com/
https://www.facebook.com/angielski.z.Lucasem
- loookaz
- Posts: 131
- Joined: 01 Dec 2012, 10:56
- Location: Warsaw, Poland
- Has thanked: 22 times
- Been thanked: 2 times
Re: Community Wad
by Xander9009 » 17 Jul 2018, 01:16
I got Leovold, Emissary of Trest mostly coded, but hit a snag. I discovered that BECAME_TARGET_OF_SPELL doesn't actually fire for players. It only fires for cards. So, I had to do a workaround that checks for when a spell is played, scans its targets, and checks if you're among them. This works fine. However, it doesn't work for abilities. I've been fiddling with it for hours at this point, so I'm giving up for the moment. If someone wants to give it a shot, here's the code:
I fixed Rhonas the Indomitable, Eternal of Harsh Truths, and Vicious Offering.
- Leovold, Emissary of Trest | Open
- Code: Select all
<?xml version="1.0"?>
<CARD_V2 ExportVersion="1">
<FILENAME text="LEOVOLD_EMISSARY_OF_TREST_CW" />
<CARDNAME text="LEOVOLD_EMISSARY_OF_TREST" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Leovold, Emissary of Trest]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Leovold, Emissary of Trest]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Leovold, Emissary of Trest]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Leovold, Emissary of Trest]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Leovold, Emissary of Trest]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[トレストの使者、レオヴォルド]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Leovold, Emissary of Trest]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Leovold, Emissary of Trest]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Leovold, Emissary of Trest]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[崔斯特密使列沃德]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[Leovold, Emissary of Trest]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="416834" />
<ARTID value="LEOVOLD_EMISSARY_OF_TREST" />
<ARTIST name="Magali Villeneuve" />
<CASTING_COST cost="{B}{G}{U}" />
<FLAVOURTEXT>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[“I’m sure we can come to an arrangement.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[“I’m sure we can come to an arrangement.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[“I’m sure we can come to an arrangement.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[“I’m sure we can come to an arrangement.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[“I’m sure we can come to an arrangement.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[「合意していただけると思っていますよ。」]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[“I’m sure we can come to an arrangement.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[“I’m sure we can come to an arrangement.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[“I’m sure we can come to an arrangement.”]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[「我们一定能把事情谈妥。」]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[“I’m sure we can come to an arrangement.”]]></LOCALISED_TEXT>
</FLAVOURTEXT>
<SUPERTYPE metaname="Legendary" />
<TYPE metaname="Creature" />
<SUB_TYPE metaname="Elf" />
<SUB_TYPE metaname="Advisor" />
<EXPANSION value="CN2" />
<RARITY metaname="M" />
<POWER value="3" />
<TOUGHNESS value="3" />
<TRIGGERED_ABILITY replacement_effect="1">
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Each opponent can’t draw more than one card each turn.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Each opponent can’t draw more than one card each turn.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Each opponent can’t draw more than one card each turn.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Each opponent can’t draw more than one card each turn.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Each opponent can’t draw more than one card each turn.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[各ターン、各対戦相手はそれぞれ、カードを2枚以上引くことができない。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Each opponent can’t draw more than one card each turn.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Each opponent can’t draw more than one card each turn.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Each opponent can’t draw more than one card each turn.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[每位对手每回合所抓的牌不能多于一张。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[Each opponent can’t draw more than one card each turn.]]></LOCALISED_TEXT>
<TRIGGER value="DREW_CARD" pre_trigger="1">
if TriggerPlayer() ~= nil and EffectController() ~= nil and TriggerPlayer():GetTeam() ~= EffectController():GetTeam() then
local interrogation = MTG():ClearInterrogationQuery()
interrogation:SetPlayer(TriggerPlayer())
local num_drawn_this_step = interrogation:Count( INTERROGATE_CARDS_DRAWN, INTERROGATE_THIS_TURN, 1 )
if num_drawn_this_step == 0 then
return false
end
end
MTG():OverrideEvent()
return true
</TRIGGER>
</TRIGGERED_ABILITY>
<TRIGGERED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Whenever you or a permanent you control becomes the target of a spell or ability an opponent controls, you may draw a card.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Whenever you or a permanent you control becomes the target of a spell or ability an opponent controls, you may draw a card.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Whenever you or a permanent you control becomes the target of a spell or ability an opponent controls, you may draw a card.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Whenever you or a permanent you control becomes the target of a spell or ability an opponent controls, you may draw a card.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Whenever you or a permanent you control becomes the target of a spell or ability an opponent controls, you may draw a card.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[あなたかあなたがコントロールするパーマネントが、対戦相手がコントロールする呪文か能力の対象になるたび、あなたはカードを1枚引いてもよい。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Whenever you or a permanent you control becomes the target of a spell or ability an opponent controls, you may draw a card.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Whenever you or a permanent you control becomes the target of a spell or ability an opponent controls, you may draw a card.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Whenever you or a permanent you control becomes the target of a spell or ability an opponent controls, you may draw a card.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[每当你或一个由你操控的永久物成为由对手操控之咒语或异能的目标时,你可以抓一张牌。]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[Whenever you or a permanent you control becomes the target of a spell or ability an opponent controls, you may draw a card.]]></LOCALISED_TEXT>
<TRIGGER value="SPELL_PLAYED">
if TriggerObject() ~= nil and TriggerObject():GetPlayer() ~= nil and EffectController() ~= nil then
if TriggerObject():GetPlayer():GetTeam() ~= EffectController():GetTeam() then
local oSpellDC = TriggerObject():GetDataChest()
if oSpellDC ~= nil then
local iMainIndex = 0
local oTargetDC = oSpellDC:Get_NthTargets(iMainIndex)
while oTargetDC ~= nil do
local iPlayerPtrIndex = 0
local oTarget = oTargetDC:Get_NthPlayerPtr(iPlayerPtrIndex)
while oTarget ~= nil do
if oTarget == EffectController() then
return true
end
iPlayerPtrIndex = iPlayerPtrIndex + 1
oTarget = oTargetDC:Get_NthPlayerPtr(iPlayerPtrIndex)
end
iMainIndex = iMainIndex + 1
oTargetDC = oSpellDC:Get_NthTargets(iMainIndex)
end
end
end
return false
end
</TRIGGER>
<TRIGGER value="ABILITY_PLAYED">
if TriggerObject() ~= nil and TriggerObject():GetPlayer() ~= nil and EffectController() ~= nil then
if TriggerObject():GetPlayer():GetTeam() ~= EffectController():GetTeam() then
local oSpellDC = TriggerObject():GetDataChest()
if oSpellDC ~= nil then
local iMainIndex = 0
local oTargetDC = oSpellDC:Get_NthTargets(iMainIndex)
while oTargetDC ~= nil do
local iPlayerPtrIndex = 0
local oTarget = oTargetDC:Get_NthPlayerPtr(iPlayerPtrIndex)
while oTarget ~= nil do
if oTarget == EffectController() then
return true
end
iPlayerPtrIndex = iPlayerPtrIndex + 1
oTarget = oTargetDC:Get_NthPlayerPtr(iPlayerPtrIndex)
end
iMainIndex = iMainIndex + 1
oTargetDC = oSpellDC:Get_NthTargets(iMainIndex)
end
end
end
return false
end
</TRIGGER>
<TRIGGER value="BECAME_TARGET_OF_SPELL" simple_qualifier="objectyoucontrol">
return SecondaryObject() ~= nil and SecondaryObject():GetPlayer():GetTeam() ~= EffectController():GetTeam() and TriggerObject():GetCardType():IsPermanent()
</TRIGGER>
<TRIGGER value="BECAME_TARGET_OF_ABILITY" simple_qualifier="objectyoucontrol">
return SecondaryObject() ~= nil and SecondaryObject():GetPlayer():GetTeam() ~= EffectController():GetTeam() and TriggerObject():GetCardType():IsPermanent()
</TRIGGER>
<MAY tag="CARD_QUERY_DRAW_A_CARD" always_prompt="1">
-- AI behaviour
return EffectController():Library_Count() >= 10
</MAY>
<RESOLUTION_TIME_ACTION>
EffectController():DrawCards(1)
</RESOLUTION_TIME_ACTION>
</TRIGGERED_ABILITY>
<SFX text="COMBAT_BLUNT_LARGE_ATTACK" power_boundary_min="4" power_boundary_max="-1" />
<SFX text="COMBAT_BLUNT_SMALL_ATTACK" power_boundary_min="1" power_boundary_max="3" />
<AUTHOR><![CDATA[Xander9009]]></AUTHOR>
<EDITORS><![CDATA[Xander9009]]></EDITORS>
<DATE><![CDATA[16-07-18]]></DATE>
</CARD_V2>
I fixed Rhonas the Indomitable, Eternal of Harsh Truths, and Vicious Offering.
_______________________________
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: Community Wad
by fallenangle » 17 Jul 2018, 15:57
Based on my tests in attempting to copy abilities, I can tell you that the TriggerObject on an ability that's played is actually the card that has the ability. Can you do anything with SecondaryObject() or COMPARTMENT_ID_STACK_OBJECT here?
- fallenangle
- Posts: 319
- Joined: 20 Jul 2013, 02:31
- Has thanked: 73 times
- Been thanked: 41 times
Who is online
Users browsing this forum: No registered users and 28 guests