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 migookman » 04 Oct 2016, 03:12
I'm having a small problem with Lancers En-kor. 1 damage is done to the target creature but Lancers En-kor takes the full damage. The code is below:
- Code: Select all
<?xml version="1.0"?>
<CARD_V2 ExportVersion="1">
<FILENAME text="LANCERS_ENKOR_CW_5179" />
<CARDNAME text="LANCERS_ENKOR" />
<TITLE>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Lancers en-Kor]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Lanciers en-Kor]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Lanceros en-Kor]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Lanzenträger en-Kor]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Lancieri en-Kor]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Lancers en-Kor]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Lancers en-Kor]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Lancers en-Kor]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Lanceiros en-Kor]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[Lancers en-Kor]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[Lancers en-Kor]]></LOCALISED_TEXT>
</TITLE>
<MULTIVERSEID value="5179" />
<ARTID value="LANCERS_ENKOR" />
<ARTIST name="Pete Venters" />
<CASTING_COST cost="{3}{W}{W}" />
<FLAVOURTEXT>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Nearly all sets of Kor twins are trained as lancers.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Nearly all sets of Kor twins are trained as lancers.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Nearly all sets of Kor twins are trained as lancers.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Fast alle Zwillingspaare en-Kor werden an den Lanzen ausgebildet.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Nearly all sets of Kor twins are trained as lancers.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Nearly all sets of Kor twins are trained as lancers.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Nearly all sets of Kor twins are trained as lancers.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Nearly all sets of Kor twins are trained as lancers.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Nearly all sets of Kor twins are trained as lancers.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[Nearly all sets of Kor twins are trained as lancers.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[Nearly all sets of Kor twins are trained as lancers.]]></LOCALISED_TEXT>
</FLAVOURTEXT>
<TYPE metaname="Creature" />
<SUB_TYPE metaname="Kor" />
<SUB_TYPE metaname="Soldier" />
<EXPANSION value="SH" />
<RARITY metaname="U" />
<POWER value="3" />
<TOUGHNESS value="3" />
<STATIC_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Trample]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Piétinement]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Arrolla.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Verursacht Trampelschaden]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Travolgere]]></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[Atropelar]]></LOCALISED_TEXT>
<INTRINSIC characteristic="CHARACTERISTIC_TRAMPLE" />
</STATIC_ABILITY>
<ACTIVATED_ABILITY>
<LOCALISED_TEXT LanguageCode="en-US"><![CDATA[{0}: The next 1 damage that would be dealt to Lancers en-Kor this turn is dealt to target creature you control instead.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[{0}: The next 1 damage that would be dealt to Lancers en-Kor this turn is dealt to target creature you control instead.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[{0}: The next 1 damage that would be dealt to Lancers en-Kor this turn is dealt to target creature you control instead.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[0: Leite 1 Schadenspunkt von den Lanzenträgern en-Kor auf eine Kreatur, die Du kontrollierst, um.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[{0}: The next 1 damage that would be dealt to Lancers en-Kor this turn is dealt to target creature you control instead.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[{0}: The next 1 damage that would be dealt to Lancers en-Kor this turn is dealt to target creature you control instead.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[{0}: The next 1 damage that would be dealt to Lancers en-Kor this turn is dealt to target creature you control instead.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[{0}: The next 1 damage that would be dealt to Lancers en-Kor this turn is dealt to target creature you control instead.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[{0}: The next 1 damage that would be dealt to Lancers en-Kor this turn is dealt to target creature you control instead.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[{0}: The next 1 damage that would be dealt to Lancers en-Kor this turn is dealt to target creature you control instead.]]></LOCALISED_TEXT>
<LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[{0}: The next 1 damage that would be dealt to Lancers en-Kor this turn is dealt to target creature you control instead.]]></LOCALISED_TEXT>
<COST mana_cost="{0}" type="Mana" />
<TARGET tag="CARD_QUERY_CHOOSE_TARGET_TO_REDIRECT_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 = EffectDC():Get_Targets(0):Get_CardPtr(0)
if target ~= nil then
local delayDC = EffectDC():Make_Chest(1)
delayDC:Set_CardPtr(0, target)
MTG():CreateDelayedTrigger(25, delayDC)
end
</RESOLUTION_TIME_ACTION>
</ACTIVATED_ABILITY>
<TRIGGERED_ABILITY resource_id="25" replacement_effect="1">
<TRIGGER value="SOURCE_DEALS_DAMAGE_TO_OBJECT" pre_trigger="1" damage_type="all">
local TargetCard = EffectDC():Get_CardPtr(0)
if TargetCard ~= nil then
return TargetCard:GetCardType():Test(CARD_TYPE_CREATURE) and SecondaryObject() == EffectSource()
else
return false
end
</TRIGGER>
<CLEANUP simple_cleanup="EndOfTurn" />
<RESOLUTION_TIME_ACTION>
local TargetCard = EffectDC():Get_CardPtr(0)
if TargetCard ~= nil then
Damage():RedirectAmountTo(1, TargetCard )
end
</RESOLUTION_TIME_ACTION>
<SFX text="GLOBAL_PREVENT_PLAY" />
</TRIGGERED_ABILITY>
<HELP title="MORE_INFO_BADGE_TITLE_1" body="MORE_INFO_BADGE_BODY_1" zone="ZONE_ANY" />
<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[01-10-16]]></DATE>
</CARD_V2>
Re: Community Wad
by Splinterverse » 04 Oct 2016, 11:08
This has been fixed and should be reflected in the next Wad update. This was a tricky card to code, so please let us know if you have any more issues with it. And thanks for reporting bugs -- it is much appreciated!tmxk2012917 wrote:A bug with Rashmi. When the top card with less converted mana was revealed, I could not cast it or put it in my hand
---------------------------------------------
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
- Splinterverse
- Posts: 918
- Joined: 04 Sep 2016, 13:32
- Has thanked: 150 times
- Been thanked: 76 times
Re: Community Wad
by Splinterverse » 04 Oct 2016, 11:15
Snuck a little more time in.
Coded, tested, uploaded:
Mogg Jailer
Issues:
Veiled Crocodile http://pastebin.com/MjhxxsTA Tried Xander's code, but it didn't fire at all. Then I tried changing Get_Int(0) == 0 to Get_Int(0) == nil and that didn't work either. Also tried setting Get_Int(0) to zero on battlefield entry. I was thinking that maybe the Int wasn't set for it to continue through the loop, but maybe the default for all DC ints is 0. In any case, it doesn't fire at all. Tried emptying both my hand and the AI's.
Yawgmoth's Agenda http://pastebin.com/4FFg6p7n Still having issues with the middle ability. It may be that I implemented Xander's suggestion incorrectly.
I've attached both as files too in case anyone feels like messing with these and trying to get them to work. Thanks to everyone for the advice. I do appreciate it!
I'll be back tomorrow to code cards in the missing list.
Coded, tested, uploaded:
Mogg Jailer
Issues:
Veiled Crocodile http://pastebin.com/MjhxxsTA Tried Xander's code, but it didn't fire at all. Then I tried changing Get_Int(0) == 0 to Get_Int(0) == nil and that didn't work either. Also tried setting Get_Int(0) to zero on battlefield entry. I was thinking that maybe the Int wasn't set for it to continue through the loop, but maybe the default for all DC ints is 0. In any case, it doesn't fire at all. Tried emptying both my hand and the AI's.
Yawgmoth's Agenda http://pastebin.com/4FFg6p7n Still having issues with the middle ability. It may be that I implemented Xander's suggestion incorrectly.
I've attached both as files too in case anyone feels like messing with these and trying to get them to work. Thanks to everyone for the advice. I do appreciate it!
I'll be back tomorrow to code cards in the missing list.
- Attachments
-
ISSUE_CARDS_2016-10-04.zip
- (3.44 KiB) Downloaded 217 times
---------------------------------------------
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
- Splinterverse
- Posts: 918
- Joined: 04 Sep 2016, 13:32
- Has thanked: 150 times
- Been thanked: 76 times
Re: Community Wad
by fallenangle » 04 Oct 2016, 13:11
Splinterverse,
For the Crocodile, you can't call Get_Int (which stands for "Get Integer") to equal anything other than an integer. It can't be nil, and you can't set it to be anything. What it does is call the number you used when you called Set_Int on the same chest. You'll need to use Set_Int(0, [some number]) if you want to set the value stored at zero to some number.
For the Agenda, your problem may be that you're granting ability 0 and giving the granted ability a resource_id of 1. Try fixing that and see if it helps.
For the Crocodile, you can't call Get_Int (which stands for "Get Integer") to equal anything other than an integer. It can't be nil, and you can't set it to be anything. What it does is call the number you used when you called Set_Int on the same chest. You'll need to use Set_Int(0, [some number]) if you want to set the value stored at zero to some number.
For the Agenda, your problem may be that you're granting ability 0 and giving the granted ability a resource_id of 1. Try fixing that and see if it helps.
- fallenangle
- Posts: 319
- Joined: 20 Jul 2013, 02:31
- Has thanked: 73 times
- Been thanked: 41 times
Re: Community Wad
by Splinterverse2 » 04 Oct 2016, 13:22
I had the int at zero and it didn't work, so I tried nil. I will put at back at zero but I think it still needs something else tweaked to make it work.fallenangle wrote:Splinterverse,
For the Crocodile, you can't call Get_Int (which stands for "Get Integer") to equal anything other than an integer. It can't be nil, and you can't set it to be anything. What it does is call the number you used when you called Set_Int on the same chest. You'll need to use Set_Int(0, [some number]) if you want to set the value stored at zero to some number.
For the Agenda, your problem may be that you're granting ability 0 and giving the granted ability a resource_id of 1. Try fixing that and see if it helps.
- Splinterverse2
- Posts: 52
- Joined: 20 Sep 2016, 13:52
- Has thanked: 13 times
- Been thanked: 0 time
Re: Community Wad
by fallenangle » 04 Oct 2016, 13:51
Then try this:
if LinkedDC():Get_Int(0) ~= 1
Also, I just realized that for Rashmi, I forgot to include checks for nonland cards and CMC in the code I suggested to you, so you might need to go back and add those. The card type check needs to look like this:
card:GetCardType():Test(CARD_TYPE_LAND
You can't just call "types" without defining the variable, as you did in your original.
I hope this helps.
if LinkedDC():Get_Int(0) ~= 1
Also, I just realized that for Rashmi, I forgot to include checks for nonland cards and CMC in the code I suggested to you, so you might need to go back and add those. The card type check needs to look like this:
card:GetCardType():Test(CARD_TYPE_LAND
You can't just call "types" without defining the variable, as you did in your original.
I hope this helps.
- fallenangle
- Posts: 319
- Joined: 20 Jul 2013, 02:31
- Has thanked: 73 times
- Been thanked: 41 times
Re: Community Wad
by Xander9009 » 04 Oct 2016, 20:56
I'm back and the CW is updated and uploaded.
Some minor news. The CW tracker is now being tested for automation. While I was gone I got everything coded so it should properly update between midnight and 1 AM every night (probably my time; Google wasn't exactly clear on that). In order to manager this, the automated repacking tool (the backbone of the CW) has been slightly retooled. It used to run once every 24 hours, and it ran a specific timer every ten minutes to update the "Next Repack.txt" file. The entire thing runs once every ten minutes. The Next Repack file is updated each time it runs, but it will only automatically pack if it is between 11 PM and midnight (I needed it to run before Google Sheets updates the tracker), and if it's been at least 6 hours since it last repacked.
It's also slightly more intelligent. If I repack it soon before the time it would normally pack, it'll skip that next one. If I run it, but it's still got many hours before it would normally repack, then it'll go ahead and do that.
You can check the looking for the Next Repack.txt file in the working tools directory. I'd link directly to it, but the link would most likely break the first time it updates. The remaining time listed is just the time until the start of the repacking window. It should happen within ten minutes of that, but if my computer it under heavy load, it might be delayed.
When the script first runs (say, after I restart my computer), it'll also be a lot more intelligent about whether or not to repack right away. If it's going to be at least 6 hours hours until it repacks normally, and it's already been at least 20 since it last repacked, then it will repack immediately and then resume the normal schedule. This means it won't repack unnecessarily, but it should repack any time it's been long enough to warrant a new version.
Of course, it never repacks if the CW's contents haven't changed.
I want to test this for a few days (I've just forced a repack, and I want to make sure it repacks again tonight like it should), and if everything goes smoothly both here and on Google Sheets, then the OP will get a nice new link to an automated tracker for the CW's completion status/list.
Some minor news. The CW tracker is now being tested for automation. While I was gone I got everything coded so it should properly update between midnight and 1 AM every night (probably my time; Google wasn't exactly clear on that). In order to manager this, the automated repacking tool (the backbone of the CW) has been slightly retooled. It used to run once every 24 hours, and it ran a specific timer every ten minutes to update the "Next Repack.txt" file. The entire thing runs once every ten minutes. The Next Repack file is updated each time it runs, but it will only automatically pack if it is between 11 PM and midnight (I needed it to run before Google Sheets updates the tracker), and if it's been at least 6 hours since it last repacked.
It's also slightly more intelligent. If I repack it soon before the time it would normally pack, it'll skip that next one. If I run it, but it's still got many hours before it would normally repack, then it'll go ahead and do that.
You can check the looking for the Next Repack.txt file in the working tools directory. I'd link directly to it, but the link would most likely break the first time it updates. The remaining time listed is just the time until the start of the repacking window. It should happen within ten minutes of that, but if my computer it under heavy load, it might be delayed.
When the script first runs (say, after I restart my computer), it'll also be a lot more intelligent about whether or not to repack right away. If it's going to be at least 6 hours hours until it repacks normally, and it's already been at least 20 since it last repacked, then it will repack immediately and then resume the normal schedule. This means it won't repack unnecessarily, but it should repack any time it's been long enough to warrant a new version.
Of course, it never repacks if the CW's contents haven't changed.
I want to test this for a few days (I've just forced a repack, and I want to make sure it repacks again tonight like it should), and if everything goes smoothly both here and on Google Sheets, then the OP will get a nice new link to an automated tracker for the CW's completion status/list.
_______________________________
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 Splinterverse » 05 Oct 2016, 00:29
Yeah, I ended up making a hybrid of my code and yours, so no worries, the cmc checks were/are there.fallenangle wrote:Then try this:
if LinkedDC():Get_Int(0) ~= 1
Also, I just realized that for Rashmi, I forgot to include checks for nonland cards and CMC in the code I suggested to you, so you might need to go back and add those. The card type check needs to look like this:
card:GetCardType():Test(CARD_TYPE_LAND
You can't just call "types" without defining the variable, as you did in your original.
I hope this helps.
---------------------------------------------
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
- Splinterverse
- Posts: 918
- Joined: 04 Sep 2016, 13:32
- Has thanked: 150 times
- Been thanked: 76 times
Re: Community Wad
by Splinterverse » 05 Oct 2016, 00:31
This sounds awesome! Glad you are back. Hope you enjoyed your time away.Xander9009 wrote:I'm back and the CW is updated and uploaded.
Some minor news. The CW tracker is now being tested for automation. While I was gone I got everything coded so it should properly update between midnight and 1 AM every night (probably my time; Google wasn't exactly clear on that). In order to manager this, the automated repacking tool (the backbone of the CW) has been slightly retooled. It used to run once every 24 hours, and it ran a specific timer every ten minutes to update the "Next Repack.txt" file. The entire thing runs once every ten minutes. The Next Repack file is updated each time it runs, but it will only automatically pack if it is between 11 PM and midnight (I needed it to run before Google Sheets updates the tracker), and if it's been at least 6 hours since it last repacked.
It's also slightly more intelligent. If I repack it soon before the time it would normally pack, it'll skip that next one. If I run it, but it's still got many hours before it would normally repack, then it'll go ahead and do that.
You can check the looking for the Next Repack.txt file in the working tools directory. I'd link directly to it, but the link would most likely break the first time it updates. The remaining time listed is just the time until the start of the repacking window. It should happen within ten minutes of that, but if my computer it under heavy load, it might be delayed.
When the script first runs (say, after I restart my computer), it'll also be a lot more intelligent about whether or not to repack right away. If it's going to be at least 6 hours hours until it repacks normally, and it's already been at least 20 since it last repacked, then it will repack immediately and then resume the normal schedule. This means it won't repack unnecessarily, but it should repack any time it's been long enough to warrant a new version.
Of course, it never repacks if the CW's contents haven't changed.
I want to test this for a few days (I've just forced a repack, and I want to make sure it repacks again tonight like it should), and if everything goes smoothly both here and on Google Sheets, then the OP will get a nice new link to an automated tracker for the CW's completion status/list.
---------------------------------------------
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
- Splinterverse
- Posts: 918
- Joined: 04 Sep 2016, 13:32
- Has thanked: 150 times
- Been thanked: 76 times
Re: Community Wad
by Xander9009 » 05 Oct 2016, 00:47
Veiled Crocodile has a space in its trigger value.
A very minor note, you technically can compare an integer to nil. Nil is special in that in nearly any case, it can be compared to a variable, because it's not actually comparing it to the contents of the variable, but rather to the status of the variable's contents. If the contents exist, then it's not nil. (https://www.lua.org/pil/2.1.html)
But calling Get_Int(#) will always return a valid number except when the object it's being called on isn't a data chest, in which case it's still not nil, it just fails to run altogether.
They do in fact default to 0 (in my experience). Either "~= 1" or "== 0" should work fine.
However, there are actually two other issues I hadn't noticed before. The card's code is slightly messed up. It's missing its intervening if block. Any ability with something like "When {this}, if {this}, then {this}" needs an intervening if block. It should return true if the if clause is currently valid. This is because according to the rules, those if clauses are checked both when the ability triggers and when it resolves, and an intervening if block does this.
Basically, remove "CW_General_IsEnchantment(EffectSource())" from the trigger, and add
Finally, you've got continuous actions that aren't in a static ability and don't have a duration tag. Continuous actions will not run unless one of those is the case. They must either have a duration tag or be in a static ability.
A very minor note, you technically can compare an integer to nil. Nil is special in that in nearly any case, it can be compared to a variable, because it's not actually comparing it to the contents of the variable, but rather to the status of the variable's contents. If the contents exist, then it's not nil. (https://www.lua.org/pil/2.1.html)
But calling Get_Int(#) will always return a valid number except when the object it's being called on isn't a data chest, in which case it's still not nil, it just fails to run altogether.
They do in fact default to 0 (in my experience). Either "~= 1" or "== 0" should work fine.
However, there are actually two other issues I hadn't noticed before. The card's code is slightly messed up. It's missing its intervening if block. Any ability with something like "When {this}, if {this}, then {this}" needs an intervening if block. It should return true if the if clause is currently valid. This is because according to the rules, those if clauses are checked both when the ability triggers and when it resolves, and an intervening if block does this.
Basically, remove "CW_General_IsEnchantment(EffectSource())" from the trigger, and add
- Code: Select all
<INTERVENING_IF>
return CW_General_IsEnchantment(EffectSource())
</INTERVENING_IF>
Finally, you've got continuous actions that aren't in a static ability and don't have a duration tag. Continuous actions will not run unless one of those is the case. They must either have a duration tag or be in a static 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: Community Wad
by tmxk2012917 » 05 Oct 2016, 05:21
As for Elder deep-fiend, how should I active its ability about tapping permernants? I cast it and it directly entered the battleground with nothing happened.
- tmxk2012917
- Posts: 164
- Joined: 15 Mar 2015, 09:52
- Has thanked: 20 times
- Been thanked: 12 times
Re: Community Wad
by Xander9009 » 05 Oct 2016, 05:27
Should be fixed after the next repack. I goofed up. It was never asked about targets because it was looking for 4 target players. It also had a misspelled tag.tmxk2012917 wrote:As for Elder deep-fiend, how should I active its ability about tapping permernants? I cast it and it directly entered the battleground with nothing happened.
_______________________________
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 Splinterverse » 05 Oct 2016, 21:01
All cards referenced below are from the missing cards list.
Coded, tested, and uploaded:
Crevasse
Deadfall
Monsoon
Time Elemental
Toxic Stench
Training Drone
Traveler's Cloak
Treacherous Vampire
Treetop Bracers
Tribal Golem
Trigon of Thought
Tromp the Domains
Tropical Storm
Tsabo's Decree
Twist Allegiance
Typhoon
Unchecked Growth
Unforge
Unified Strike
Unifying Theory
Unnatural Hunger
Urborg
HQ Art Uploaded:
Treacherous Pit-Dweller (the coding of this card is in progress)
Bugs Fixed (and Tested):
Alms of the Vein -- was allowing for any player targeting, but should be opponent only
Gobhobbler Rats -- had an extra ability block that was always granting the regenerate
Open Items:
Treacherous Urge http://pastebin.com/0YwzyHhb First part works, but the creature stolen doesn't gain haste and doesn't die at the end of the turn.
Triassic Egg http://pastebin.com/TMGUi8jB Its activated ability is not being made available. I've tried many variations. Everything else works.
Turf Wound http://pastebin.com/GWeAULML I'm thinking this one isn't working because lands aren't technically cast, they're played. Maybe it's impossible or there's a way that I am unaware of to control playing of lands?
Twilight Drover http://pastebin.com/pE0Yafas Everything works except the activated ability won't show up as available. I've tried many variations.
Unnerving Assault http://pastebin.com/zCgxnrJL The paid for with Blue effect works, the paid for with Red does not. Doesn't matter what combination of mana I use, the Red one will not fire.
Veiled Crocodile http://pastebin.com/J0mUtBfV The last suggestion got it back to becoming a creature, but then it still hung up with the animation swirling above it indefinitely. Seems there's a loop getting stuck here still (and I'm stuck in it lol).
Viashino Bey http://pastebin.com/SfDDFTF0 This one seems to apply the "must attack" badge to all of the other creatures as attack phase begins, but it must not be fast enough to cause them to all tap. Maybe there's no way to force them to tap after already being in the attack phase?
Question -- anyone know of a sample card where each player answers a multiple choice question and then the Resolution Time Action goes through and responds based on each answer?
Next:
Will be back on Friday to continue working through the missing cards list. Will implement any recommended fixes at that time as well as continue with a few in progress and new ones moving up the list.
Coded, tested, and uploaded:
Crevasse
Deadfall
Monsoon
Time Elemental
Toxic Stench
Training Drone
Traveler's Cloak
Treacherous Vampire
Treetop Bracers
Tribal Golem
Trigon of Thought
Tromp the Domains
Tropical Storm
Tsabo's Decree
Twist Allegiance
Typhoon
Unchecked Growth
Unforge
Unified Strike
Unifying Theory
Unnatural Hunger
Urborg
HQ Art Uploaded:
Treacherous Pit-Dweller (the coding of this card is in progress)
Bugs Fixed (and Tested):
Alms of the Vein -- was allowing for any player targeting, but should be opponent only
Gobhobbler Rats -- had an extra ability block that was always granting the regenerate
Open Items:
Treacherous Urge http://pastebin.com/0YwzyHhb First part works, but the creature stolen doesn't gain haste and doesn't die at the end of the turn.
Triassic Egg http://pastebin.com/TMGUi8jB Its activated ability is not being made available. I've tried many variations. Everything else works.
Turf Wound http://pastebin.com/GWeAULML I'm thinking this one isn't working because lands aren't technically cast, they're played. Maybe it's impossible or there's a way that I am unaware of to control playing of lands?
Twilight Drover http://pastebin.com/pE0Yafas Everything works except the activated ability won't show up as available. I've tried many variations.
Unnerving Assault http://pastebin.com/zCgxnrJL The paid for with Blue effect works, the paid for with Red does not. Doesn't matter what combination of mana I use, the Red one will not fire.
Veiled Crocodile http://pastebin.com/J0mUtBfV The last suggestion got it back to becoming a creature, but then it still hung up with the animation swirling above it indefinitely. Seems there's a loop getting stuck here still (and I'm stuck in it lol).
Viashino Bey http://pastebin.com/SfDDFTF0 This one seems to apply the "must attack" badge to all of the other creatures as attack phase begins, but it must not be fast enough to cause them to all tap. Maybe there's no way to force them to tap after already being in the attack phase?
Question -- anyone know of a sample card where each player answers a multiple choice question and then the Resolution Time Action goes through and responds based on each answer?
Next:
Will be back on Friday to continue working through the missing cards list. Will implement any recommended fixes at that time as well as continue with a few in progress and new ones moving up the list.
---------------------------------------------
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
The DOTP2014 CW is updated nightly between 11 PM and 12 AM EST.
Known Issues/Bugs |
Impossible Cards List | Update Your Land Pools
- Splinterverse
- Posts: 918
- Joined: 04 Sep 2016, 13:32
- Has thanked: 150 times
- Been thanked: 76 times
Re: Community Wad
by Xander9009 » 05 Oct 2016, 21:55
Treacherous Urge - Try adding this between lines 63 and 64.
Turf Wound - You just need to set the land cards in each of their zones so they can't be played. This will technically cause issues if another player should be able to player them (Hedonist's Trove), but this interaction should be rare enough that it won't matter. To do this, cycle through their zones, and for each zone, make a filter in that zone for lands, and then apply Bool_Set(CHARACTERISTIC_CANT_BE_PLAYED, 1) to each FilteredObject().
You might be able to use oFilter:SetZone(ZONE_ANY) or oFilter:SetZone(ZONE_ANYWHERE). I don't know for sure, though. If it works, it would be a much better option. I suspect that if this is the case, though, you probably won't be able to add the player to that SetZone call like normal. You'll probably have to use FE_CONTROLLER in a oFilter:Add() call. Certainly try it out and see what works best. The simpler the code, the less likely it is to have bugs.
Also, I don't know for sure if CONSIDERED_FOR_CAST fires for lands, but you can test that very easily. Put this code on any card and start a game with it. It'll immediately tell you if it works.
For this and Triassic Egg, I don't see anything wrong (unless setting the active zone to the battlefield actually is the problem; it appears on both). So, if the above doesn't fix it, remove everything but the cost and add an empty RTA. If it's activable, add in the RTAs until it stops being activable. If it's still not, then find a different source from which to copy the cost tag.
Unnerving Assault - Line 75. You're telling the filter to only show objects for "team => me". You need objects for "controller => me".
Veiled Crocodile - It's supposed to become a creature. It's currently not following the rules for "becomes a creature". It's following the rules for "becomes a creature in addition to its other types". It needs to remove its other types. See Veil of Birds for an example. So, currently, the state based actions are firing properly one at a time, but they never stop firing one after another because it never stops being an enchantment.
Viashino Bey - This might simply not be possible to do correctly. If it's not working as-is, then I'd try just giving the attacking restriction (see "can't attack alone" type abilities) such that it can't attack unless all non-defenders you control are attacking. If this works, there might be some other interactions to look out for, but properly interacting with all of them would require recoding most of them to expose their current attacking restriction status. If the above works, I'll look into the possibility of doing so.
- Code: Select all
EffectDC():Get_Targets(1):Protect_CardPtr(0)
Turf Wound - You just need to set the land cards in each of their zones so they can't be played. This will technically cause issues if another player should be able to player them (Hedonist's Trove), but this interaction should be rare enough that it won't matter. To do this, cycle through their zones, and for each zone, make a filter in that zone for lands, and then apply Bool_Set(CHARACTERISTIC_CANT_BE_PLAYED, 1) to each FilteredObject().
You might be able to use oFilter:SetZone(ZONE_ANY) or oFilter:SetZone(ZONE_ANYWHERE). I don't know for sure, though. If it works, it would be a much better option. I suspect that if this is the case, though, you probably won't be able to add the player to that SetZone call like normal. You'll probably have to use FE_CONTROLLER in a oFilter:Add() call. Certainly try it out and see what works best. The simpler the code, the less likely it is to have bugs.
Also, I don't know for sure if CONSIDERED_FOR_CAST fires for lands, but you can test that very easily. Put this code on any card and start a game with it. It'll immediately tell you if it works.
- Code: Select all
<TRIGGERED_ABILITY active_zone="ZONE_ANY">
<TRIGGER value="CONSIDERED_FOR_CAST>
if TriggeredObject() ~= nil and TriggeredObject():GetCardType():Test(CARD_TYPE_LAND) then
Debug("Lands fire CONSIDERED_FOR_CAST trigger.")
end
</TRIGGER>
</TRIGGERED_ABILITY>
For this and Triassic Egg, I don't see anything wrong (unless setting the active zone to the battlefield actually is the problem; it appears on both). So, if the above doesn't fix it, remove everything but the cost and add an empty RTA. If it's activable, add in the RTAs until it stops being activable. If it's still not, then find a different source from which to copy the cost tag.
Unnerving Assault - Line 75. You're telling the filter to only show objects for "team => me". You need objects for "controller => me".
Veiled Crocodile - It's supposed to become a creature. It's currently not following the rules for "becomes a creature". It's following the rules for "becomes a creature in addition to its other types". It needs to remove its other types. See Veil of Birds for an example. So, currently, the state based actions are firing properly one at a time, but they never stop firing one after another because it never stops being an enchantment.
Viashino Bey - This might simply not be possible to do correctly. If it's not working as-is, then I'd try just giving the attacking restriction (see "can't attack alone" type abilities) such that it can't attack unless all non-defenders you control are attacking. If this works, there might be some other interactions to look out for, but properly interacting with all of them would require recoding most of them to expose their current attacking restriction status. If the above works, I'll look into the possibility of doing so.
_______________________________
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 » 05 Oct 2016, 23:10
I'm pretty sure that "CONSIDERED_FOR_CAST" works for lands, since Neo used that very trigger to code his version of Aggressive Mining.
- 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 5 guests