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 Xander9009 » 20 Nov 2016, 13:14
Should work. Whenever it becomes the target of a spell, make a delayed trigger (cleanup at end of turn) that prevents all damage dealt to Bronze Horse by the stored spell.Splinterverse wrote:For Bronze Horse, can I use <TRIGGER value="BECAME_TARGET_OF_SPELL" simple_qualifier="self" /> to prevent the damage from the spell? I can't think of a way to check for whether the spell will do damage. It could be some other type of spell. I thought about using <TRIGGER value="OBJECT_TAKES_DAMAGE" simple_qualifier="self"> but that would not help if the spell was doing damage to all creatures (or target player's creatures etc.).
_______________________________
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 thefiremind » 20 Nov 2016, 14:51
Remember to check if you control another creature inside the delayed trigger (not outside, because it matters only when the damage is about to be dealt). Also, if you like, you can CLEANUP when SecondaryObject() == nil (which should be the spell itself) rather than at end of turn. Shouldn't make much difference anyway.
There is a scenario where you would obtain a wrong result: if Bronze Horse becomes targeted by a spell that deals damage, but before resolution it loses all abilities, you would still prevent the damage, but you shouldn't. Anyway I think it's such a rare scenario that it should be safely ignored. I can think of a way to include this scenario... I don't think it's worth the effort, but I'll explain it anyway: you should give Bronze Horse a dummy characteristic on layer 6 (I usually use CHARACTERISTIC_CANT_BE_COUNTERED because it has no effect on the battlefield, but in the CW you have custom characteristics so you can use those if you prefer) and then in the delayed trigger, prevent the damage only if Bronze Horse still has that characteristic.
EDIT: Now that I think about it... cards that make other cards lose all abilities are fewer than cards where you should be careful about still having abilities. Wouldn't it be better to do the contrary of what I just explained? I mean, code all the cards that make other cards lose all abilities so that they also grant a custom characteristic: this way you would be able to check for that characteristic in order to know if a card lost its own abilities.
There is a scenario where you would obtain a wrong result: if Bronze Horse becomes targeted by a spell that deals damage, but before resolution it loses all abilities, you would still prevent the damage, but you shouldn't. Anyway I think it's such a rare scenario that it should be safely ignored. I can think of a way to include this scenario... I don't think it's worth the effort, but I'll explain it anyway: you should give Bronze Horse a dummy characteristic on layer 6 (I usually use CHARACTERISTIC_CANT_BE_COUNTERED because it has no effect on the battlefield, but in the CW you have custom characteristics so you can use those if you prefer) and then in the delayed trigger, prevent the damage only if Bronze Horse still has that characteristic.
EDIT: Now that I think about it... cards that make other cards lose all abilities are fewer than cards where you should be careful about still having abilities. Wouldn't it be better to do the contrary of what I just explained? I mean, code all the cards that make other cards lose all abilities so that they also grant a custom characteristic: this way you would be able to check for that characteristic in order to know if a card lost its own abilities.
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
Currently busy with life...
-
thefiremind - Programmer
- Posts: 3515
- Joined: 07 Nov 2011, 10:55
- Has thanked: 118 times
- Been thanked: 722 times
Re: Community Wad
by Xander9009 » 20 Nov 2016, 15:34
There's already a way within the CW to check if a given card currently has its abilities. _MANAGER_ABILITIES_ACTIVE. If that manager token is created, then you can check if a given card has abilities active with "RSN_Characteristics_Get(oCard, NEO_ABILITIES_ACTIVE)". The manager token sets that characteristic to 0 on layer 6 from the manager itself, and then to 1 on layer 7A from the card using a granted ability. So, if it's 1, then its abilities must be active.
However, what if Bronze Horse becomes a copy of another creature? It still has abilities active, because it's never been the subject of LoseAllAbilities(), but its ability shouldn't have any effect. Best I can think of is to check that it has abilities and its name is still BRONZE_HORSE.
However, what if Bronze Horse becomes a copy of another creature? It still has abilities active, because it's never been the subject of LoseAllAbilities(), but its ability shouldn't have any effect. Best I can think of is to check that it has abilities and its name is still BRONZE_HORSE.
_______________________________
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 migookman » 20 Nov 2016, 20:11
Some cards coded today:
Shrine of Piercing Vision
Shyft
Sins of the Past
Skyfire Kirin
Skyship Weatherlight
Soul Foundry
Soul Reap
Spelljack
Spellshift
Spinerrock Knoll
Shrine of Piercing Vision
Shyft
Sins of the Past
Skyfire Kirin
Skyship Weatherlight
Soul Foundry
Soul Reap
Spelljack
Spellshift
Spinerrock Knoll
Re: Community Wad
by Splinterverse » 20 Nov 2016, 21:48
These are some good ones. Can't wait to try them when I get back to actually playing the game.migookman wrote:Some cards coded today:
Shrine of Piercing Vision
Shyft
Sins of the Past
Skyfire Kirin
Skyship Weatherlight
Soul Foundry
Soul Reap
Spelljack
Spellshift
Spinerrock Knoll
---------------------------------------------
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 » 20 Nov 2016, 22:01
Finished coding for today; all cards referenced are from the missing cards list.
Coded, tested, and uploaded:
Bargaining Table
Blazing Salvo
Blazing Torch
Blind Fury
Blood Lust
Bloodfire Infusion
Bogardan Phoenix
Bomb Squad
Boros Fury-Shield
Breath of Dreams
Broken Visage
Bronze Bombshell
Bulwark
Burning-Eye Zubera
Cabal Conditioning
Candles of Leng
Carrion Wurm
Catacomb Dragon
Celestial Kirin
Centaur Vinecrasher
Chain of Smog
Colfenor's Urn
Culling Scales
Dementia Sliver
Due Respect
Eye of Yawgmoth
Reward the Faithful
Rushing-Tide Zubera
Bugs fixed:
Argothian Wurm -- was trying to counter a spell instead of putting the Wurm on top of it's library; tested
Kor Haven -- target tag updated (was referencing tapping)
Open Items:
-- CW_CARD_QUERY_SPLINTERVERSE has been updated and uploaded.
-- Bludgeon Brawl http://pastebin.com/SCcbiQnP Ability appears on artifacts. When Equip is clicked, the mana is paid. But it doesn't attach. Could it be that the card type is not able to attach?
-- Bösium Strip http://pastebin.com/XL4Em2KE It is not granting the ability to the top card of the graveyard. Maybe I'm going about it the wrong way.
-- Bronze Horse http://pastebin.com/0xbXe0tK Not preventing damage from spells.
-- Builder's Bane http://pastebin.com/Ru3Uqtfb Not dealing damage. I'm guessing it's because I'm trying to make certain the card went to the graveyard first.
-- Coffin Queen http://pastebin.com/rgt9QVZx Everything works perfectly, except when Coffin Queen's controller changes, the creature she gained control of does not get exiled.
-- Confusion in the Ranks http://pastebin.com/9T4PipB6 This is the version of the code I meant to share yesterday. To be certain, I tested it again. Control is not swapped. I know there is a double trigger. I will remove it once I get it working if it is still not needed.
Next:
Back on Wednesday to continue coding the missing cards.
Coded, tested, and uploaded:
Bargaining Table
Blazing Salvo
Blazing Torch
Blind Fury
Blood Lust
Bloodfire Infusion
Bogardan Phoenix
Bomb Squad
Boros Fury-Shield
Breath of Dreams
Broken Visage
Bronze Bombshell
Bulwark
Burning-Eye Zubera
Cabal Conditioning
Candles of Leng
Carrion Wurm
Catacomb Dragon
Celestial Kirin
Centaur Vinecrasher
Chain of Smog
Colfenor's Urn
Culling Scales
Dementia Sliver
Due Respect
Eye of Yawgmoth
Reward the Faithful
Rushing-Tide Zubera
Bugs fixed:
Argothian Wurm -- was trying to counter a spell instead of putting the Wurm on top of it's library; tested
Kor Haven -- target tag updated (was referencing tapping)
Open Items:
-- CW_CARD_QUERY_SPLINTERVERSE has been updated and uploaded.
-- Bludgeon Brawl http://pastebin.com/SCcbiQnP Ability appears on artifacts. When Equip is clicked, the mana is paid. But it doesn't attach. Could it be that the card type is not able to attach?
-- Bösium Strip http://pastebin.com/XL4Em2KE It is not granting the ability to the top card of the graveyard. Maybe I'm going about it the wrong way.
-- Bronze Horse http://pastebin.com/0xbXe0tK Not preventing damage from spells.
-- Builder's Bane http://pastebin.com/Ru3Uqtfb Not dealing damage. I'm guessing it's because I'm trying to make certain the card went to the graveyard first.
-- Coffin Queen http://pastebin.com/rgt9QVZx Everything works perfectly, except when Coffin Queen's controller changes, the creature she gained control of does not get exiled.
-- Confusion in the Ranks http://pastebin.com/9T4PipB6 This is the version of the code I meant to share yesterday. To be certain, I tested it again. Control is not swapped. I know there is a double trigger. I will remove it once I get it working if it is still not needed.
Next:
Back on Wednesday to continue coding the missing cards.
---------------------------------------------
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 thefiremind » 20 Nov 2016, 23:26
You forgot to grant the Equipment sub-type. I would also grant the abilities on layer 6 rather than 8. To be honest, though, I wouldn't bet on these problems being the cause of the artifacts not attaching. Unfortunately I can't see anything else that could be the culprit.Splinterverse wrote:-- Bludgeon Brawl http://pastebin.com/SCcbiQnP
In the action where you grant the ability, you are using "target" rather than "gy_top". Classic copy-paste mistake, I'm a champion with those.Splinterverse wrote:-- Bösium Strip http://pastebin.com/XL4Em2KE

You are saving TriggerObject in delayDC register #1 but you should save SecondaryObject there.Splinterverse wrote:-- Bronze Horse http://pastebin.com/0xbXe0tK
If it still doesn't work, it might be because OBJECT_TAKES_DAMAGE doesn't carry a SecondaryObject (the name of the trigger doesn't mention the source of the damage), but I might be mistaken here. If that's the case, then use SOURCE_DEALS_DAMAGE_TO_OBJECT, inverting the pointers that you compare to TriggerObject and SecondaryObject (the source of the damage will be #1 and the victim will be #0).
The approach seems right to me, the problem is that you should check for the cards being in a graveyard in a different RESOLUTION_TIME_ACTION, otherwise you don't let the game perform the zone changes.Splinterverse wrote:-- Builder's Bane http://pastebin.com/Ru3Uqtfb
I'm afraid this is the same problem we encountered with Krovikan Vampire. If someone has any idea why the delayed trigger doesn't fire, please let us know.Splinterverse wrote:-- Coffin Queen http://pastebin.com/rgt9QVZx
Splinterverse wrote:-- Confusion in the Ranks http://pastebin.com/9T4PipB6
Can you see the problem here?local target_player = target:GetController()
local trigger_player = TriggerObject():GetController()
if target_controller ~= nil and trigger_controller ~= nil then

< Former DotP 2012/2013/2014 modder >
Currently busy with life...
Currently busy with life...
-
thefiremind - Programmer
- Posts: 3515
- Joined: 07 Nov 2011, 10:55
- Has thanked: 118 times
- Been thanked: 722 times
Re: Community Wad
by tmxk2012917 » 21 Nov 2016, 05:12
a bug of Titan's Presence:
I could target any permanent and was not asked to reveal a creature. As a result, It could not exile anything
I could target any permanent and was not asked to reveal a creature. As a result, It could not exile anything
- tmxk2012917
- Posts: 164
- Joined: 15 Mar 2015, 09:52
- Has thanked: 20 times
- Been thanked: 12 times
Re: Community Wad
by Xander9009 » 21 Nov 2016, 13:14
Fixed.tmxk2012917 wrote:a bug of Titan's Presence:
I could target any permanent and was not asked to reveal a creature. As a result, It could not exile anything
In addition to what thefiremind said, since CMCs are limited, it'd be a lot better visually if the ability were granted based on the CMC so the text shows properly. For instance, Time Vault would be given "EquipSplinterverse wrote:Finished coding for today; all cards referenced are from the missing cards list.
Bludgeon Brawl http://pastebin.com/SCcbiQnP Ability appears on artifacts. When Equip is clicked, the mana is paid. But it doesn't attach. Could it be that the card type is not able to attach?

However, there was a problem. The problem was that by granting the equipment subtype (which is done on layer 4), the filter no longer included those cards by the time the layer 6 ability granting came around. This means they were granted the equipment subtype but not the abilities. In order to fix it, I altered the code to use no filter blocks. I stored the cards being given the equipment subtype in a DC and had the layer 6 CA iterate that DC.
There were two other problems I encountered, as well. 1: EffectDC():Get_Chest(0) was always nil on layer 6 despite being successfully created and worked with on layer 4. I'm not sure what was going on here, but when I changed to LinkedDC() it stopped, so it was probably some subtlety of the engine I'm not aware of (or am just overlooking). 2: A card attached to another card uses the tap status of the parent for display. It functionally works fine, but visually appears incorrect. I've given it a very simple ability at the moment with nothing more than "{T}" as a granted ability if it's tapped. This means that when you zoom in and the abilities that require tapping as a cost don't highlight, you can see why. However, with nothing more than the symbol, it's not ideal. It should ideally say, in each language, "This card is currently tapped." or something to that effect. It was just a two minute workaround, though.
The card works, but because I altered so much of it to make it work, I added myself as an editor. I usually don't since the alterations here are simple and quick, but since the idea behind the editors section is to know who to talk to when it breaks, it seemed necessary.
Normally, I'd just toss it in a spoiler, but it's actually too long for the forum... http://pastebin.com/NeDHuY8W
_______________________________
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 thefiremind » 21 Nov 2016, 13:40
A minor overlook: for some reason, "Equip
" became "Equip {}" in your pastebin link.

< Former DotP 2012/2013/2014 modder >
Currently busy with life...
Currently busy with life...
-
thefiremind - Programmer
- Posts: 3515
- Joined: 07 Nov 2011, 10:55
- Has thanked: 118 times
- Been thanked: 722 times
Re: Community Wad
by Xander9009 » 21 Nov 2016, 13:47
Thanks. It's been corrected on the card (but not on Pastebin). I removed the numbers, copied it 17 times, and then used find/replace on "{}" to "{#}" within the selected area (obviously selecting one ability at a time). I missed 11. My bad.thefiremind wrote:A minor overlook: for some reason, "Equip" became "Equip {}" in your pastebin link.
_______________________________
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 » 21 Nov 2016, 19:03
A bug of Trollhide:
I could not attach it to a creature. When I cast it, it went to graveyard directly.
I could not attach it to a creature. When I cast it, it went to graveyard directly.
Last edited by tmxk2012917 on 21 Nov 2016, 19:37, edited 2 times in total.
- tmxk2012917
- Posts: 164
- Joined: 15 Mar 2015, 09:52
- Has thanked: 20 times
- Been thanked: 12 times
Re: Community Wad
by Xander9009 » 21 Nov 2016, 19:06
Fixed.tmxk2012917 wrote:A bug of Trollhide:
I could not attach it to a creature. When I cast it, it went to graveyard directly.
_______________________________
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 » 21 Nov 2016, 19:37
A bug of Nissa's Revelation:
After Scry 5, I put 2 creatures on the top of my library, but the top card of my library was not revealed and I did not draw cards or gain life.
[lua] [string "NISSAS_REVELATION_CW_398506_TITLE (RESOLUTION_TIME_ACTION)~0x00000d48"]:5: attempt to call method 'GetType' (a nil value)
Bug of Invocation of Saint Traft:
At the end of the combat, both the creature I attached Invocation of Saint Traft to and the token were exiled. As a result, Invocation of Saint Traft entered into my graveyard
After Scry 5, I put 2 creatures on the top of my library, but the top card of my library was not revealed and I did not draw cards or gain life.
[lua] [string "NISSAS_REVELATION_CW_398506_TITLE (RESOLUTION_TIME_ACTION)~0x00000d48"]:5: attempt to call method 'GetType' (a nil value)
Bug of Invocation of Saint Traft:
At the end of the combat, both the creature I attached Invocation of Saint Traft to and the token were exiled. As a result, Invocation of Saint Traft entered into my graveyard
- tmxk2012917
- Posts: 164
- Joined: 15 Mar 2015, 09:52
- Has thanked: 20 times
- Been thanked: 12 times
Re: Community Wad
by Splinterverse » 22 Nov 2016, 10:46
Sounds and looks good. Always fine if you add your name. I too like to keep track of who contributed so it definitely fits.Xander9009 wrote:Normally, I'd just toss it in a spoiler, but it's actually too long for the forum... http://pastebin.com/NeDHuY8W
Would you mind adding it to the .wad (if you haven't already)?
Will be back coding tomorrow.

---------------------------------------------
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
Who is online
Users browsing this forum: No registered users and 6 guests