Board index
Programs with AI or Rules Enforcement
Magic: The Gathering - Duels of the Planeswalkers
Programming Talk



Overload at 95%
Moderator: CCGHQ Admins
Re: Overload at 95%
by braquio » 30 Aug 2014, 23:29
Hi NEO! I'm back, im follow your work but honestly, all these questions about the object, pointers and others are beyond my comprehension.
So I put myself in your hands. If you said that this last versions is the best we can do, its ok to me.
So I put myself in your hands. If you said that this last versions is the best we can do, its ok to me.
____________________________________________________________________________________________________________________________
Braquio Dotp2014 DLC
Alternative Sealed Campaigns for DotP 2014
Braquio Dotp2014 DLC
Alternative Sealed Campaigns for DotP 2014
Re: Overload at 95%
by braquio » 30 Aug 2014, 23:30
I can do some tests if you want.
____________________________________________________________________________________________________________________________
Braquio Dotp2014 DLC
Alternative Sealed Campaigns for DotP 2014
Braquio Dotp2014 DLC
Alternative Sealed Campaigns for DotP 2014
Re: Overload at 95%
by NeoAnderson » 30 Aug 2014, 23:37
Hi my friend welcomeback!!!braquio wrote:Hi NEO! I'm back, im follow your work but honestly, all these questions about the object, pointers and others are beyond my comprehension.
So I put myself in your hands. If you said that this last versions is the best we can do, its ok to me. I can do tests if you want

I said "i think is the best we can do", but I am not a CodeMaster, i just like to have fun to code something new.
Anyway i am just finishing to code all the "overload cards" i am almost done, i have just to prepare the artworks then if you want you can help me to test them before i post them into a wad. I can send them to you through P.M.
Let me know.
- NeoAnderson
- Posts: 914
- Joined: 10 Sep 2013, 07:49
- Has thanked: 18 times
- Been thanked: 139 times
Re: Overload at 95%
by braquio » 30 Aug 2014, 23:41
Ok, send me the cards you want, and the interactions you think we have test.
____________________________________________________________________________________________________________________________
Braquio Dotp2014 DLC
Alternative Sealed Campaigns for DotP 2014
Braquio Dotp2014 DLC
Alternative Sealed Campaigns for DotP 2014
Re: Overload at 95%
by NeoAnderson » 31 Aug 2014, 00:18
Look your P.M. BOX.braquio wrote:Ok, send me the cards you want, and the interactions you think we have test.

- NeoAnderson
- Posts: 914
- Joined: 10 Sep 2013, 07:49
- Has thanked: 18 times
- Been thanked: 139 times
Re: Overload at 95%
by RiiakShiNal » 31 Aug 2014, 00:37
Actually, there is a way, but it's not very elegant.NeoAnderson wrote:But the main problem is in this way you have to modify the copy spell to do what you want ( i already tested copyspell function return a temporary card, so also a cardpointer, and it expire at end of the ABILITY (SPELL, ACTIVATED, TRIGGER)you cannot store longer also if you protect it). So if you don't cast the copy during the ability you cannot keep it anymore.
Anyway there i no way from an external card to understand if a copy is cast (or better to understand the copy who has copied).
You modify the copy cards/effects to set a temporary variable in say the DuelDataChest() to simply indicate a spell is being copied immediately before copying the spell (you would probably want to make this a counter that never resets so cards only consider the next spell cast then mark the current value so it doesn't affect anything else). Then the card(s) that care about copied spells could trigger on SPELL_PLAYED pretrigger check the current value of the DuelDataChest value, if it is higher than last check do whatever with the TriggerObject() (compare to see what spell it is, store the pointer, set an ObjectDC on it, etc...) then update check value to match the current global value and finally return something (true if you want to do more in another action).
This method should only fail if creating more than one spell copy at a time, though to address that instead of simply storing the current global value, just increment the local value by one that way if the copy spell/effect created 2 it would update the global by 2 and each subsequent SPELL_PLAYED would increment the local value by 1 so you should capture both.
As I said not a very elegant method, but when doing approximations sometimes you have to do things crudely.
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: Overload at 95%
by NeoAnderson » 31 Aug 2014, 01:25
But if I have understand you suggest to modify the spell who is going to copy the card.RiiakShiNal wrote:Actually, there is a way, but it's not very elegant.
You modify the copy cards/effects to set a temporary variable in say the DuelDataChest() to simply indicate a spell is being copied immediately before copying the spell (you would probably want to make this a counter that never resets so cards only consider the next spell cast then mark the current value so it doesn't affect anything else). Then the card(s) that care about copied spells could trigger on SPELL_PLAYED pretrigger check the current value of the DuelDataChest value, if it is higher than last check do whatever with the TriggerObject() (compare to see what spell it is, store the pointer, set an ObjectDC on it, etc...) then update check value to match the current global value and finally return something (true if you want to do more in another action).
This method should only fail if creating more than one spell copy at a time, though to address that instead of simply storing the current global value, just increment the local value by one that way if the copy spell/effect created 2 it would update the global by 2 and each subsequent SPELL_PLAYED would increment the local value by 1 so you should capture both.
As I said not a very elegant method, but when doing approximations sometimes you have to do things crudely.
For example : Increasing Vengeance, Reverberate, Twincast should be adapted to store the card they are copying just before they make the copy...
If you mean this i already know but it means to modify a lot of standard cards and i want to stay far from do it.).
Also because there also many possible interaction who can cause weird behaviours (Counterspell, instant effects who replace others...)
- NeoAnderson
- Posts: 914
- Joined: 10 Sep 2013, 07:49
- Has thanked: 18 times
- Been thanked: 139 times
------------ Return to Ravnica - OVERLOAD PACK ------------
by NeoAnderson » 31 Aug 2014, 01:31
------------ Return to Ravnica - OVERLOAD PACK ------------
All 12 overload cards included into this set + 2 bonus overload cards from Dragon'Maze Set

Please be informed that OverLoad cards were not coded until now,this is a good approximation made by braquio and me.
I just made some basic tests if you find something wrong please report into this topic and I will try to fix it.
Complete cards list.
Until now the only limitation about playing overload cards is when you use spell who grants the ability
"To play the card from other zone paying the normal casting cost", in this case you will be able to play the card
only in normal mode. Here you can find a list of cards with this kind of interaction :
This implementation is completely working with spells who duplicate cards, with Cascade, and also with Flashback.
DOWNLOAD WAD FILE : UPLOADED Stay tuned following this topic : ------------ Return to Ravnica - OVERLOAD PACK ------------
All 12 overload cards included into this set + 2 bonus overload cards from Dragon'Maze Set

Please be informed that OverLoad cards were not coded until now,this is a good approximation made by braquio and me.
I just made some basic tests if you find something wrong please report into this topic and I will try to fix it.

Complete cards list.
- 14 CARDS INCLUDED | Open
- Blustersquall
Chemister's Trick
Counterflux
Cyclonic Rift
Downsize
Dynacharge
Electrickery
Mizzium Mortars
Mizzium Skin
Street Spasm
Teleportal
Vandalblast
Dragonshift
Weapon Surge
Until now the only limitation about playing overload cards is when you use spell who grants the ability
"To play the card from other zone paying the normal casting cost", in this case you will be able to play the card
only in normal mode. Here you can find a list of cards with this kind of interaction :
- Partial interactions cards List UPDATE ver 1.1 | Open
- Act on impulse - PARTIAL ONLY NORMAL PLAY
Aerial Caravan - PARTIAL ONLY NORMAL PLAY
Bösium Strip PARTIAL ONLY NORMAL PLAY
Colfenor's Plans - PARTIAL ONLY NORMAL PLAY
Elkin Bottle - PARTIAL ONLY NORMAL PLAY
Melek, Izzet Paragon PARTIAL ONLY NORMAL PLAY
Muse Vessel - PARTIAL ONLY NORMAL PLAY
Nivix, Aerie of the Firemind - PARTIAL ONLY NORMAL PLAY
Prophetic Flamespeaker - PARTIAL ONLY NORMAL PLAY
Psychic Theft - PARTIAL ONLY NORMAL PLAY
Three Wishes - PARTIAL ONLY NORMAL PLAY
Chandra, Pyromaster - PARTIAL ONLY NORMAL PLAY ABILITY 0 AND FULL WORKING ABILITY -7
Ice Cauldron - UNKNOWN
Psychic Intrusion - UNKNOWN
This implementation is completely working with spells who duplicate cards, with Cascade, and also with Flashback.
- Cards interacting with overload and should work 100% - List UPDATE ver 1.1 | Open
- Bituminous Blast - FULL WORKING
Bloodbraid Elf - FULL WORKING
Brilliant Ultimatum - FULL WORKING
Captured Sunlight - FULL WORKING
Demonic Dread - FULL WORKING
Deny Reality - FULL WORKING
Elite Arcanist - FULL WORKING
Enigma Sphinx - FULL WORKING
Enlisted Wurm - FULL WORKING
Epic Experiment - FULL WORKING
Ertai's Meddling - FULL WORKING
Etherium-Horn Sorcerer - FULL WORKING
Eye of the Storm - FULL WORKING
Galvanoth FULL WORKING
Hellcarver Demon - FULL WORKING
Howltooth Hollow - FULL WORKING
Intet, the Dreamer - FULL WORKING
Isochron Scepter - FULL WORKING
Jace, Architect of Thought - FULL WORKING
Jace's Mindseeker FULL WORKING
Jeleva, Nephalia's Scourge - FULL WORKING
Kaho, Minamo Historian - FULL WORKING
Kathari Remnant - FULL WORKING
Knowledge Exploitation FULL WORKING
Maelstrom Nexus - FULL WORKING
Maelstrom Wanderer - FULL WORKING
Mindclaw Shaman FULL WORKING
Mind's Desire - FULL WORKING
Mosswort Bridge - FULL WORKING
Oracle of Bones FULL WORKING
Panoptic Mirror - FULL WORKING
Planeswalker's Mischief - FULL WORKING
Reversal of Fortune FULL WORKING
Shardless Agent - FULL WORKING
Shell of the Last Kappa - FULL WORKING
Shelldock Isle - FULL WORKING
Spellbinder - FULL WORKING
Spellshift FULL WORKING
Spellweaver Helix - FULL WORKING
Spinerock Knoll - FULL WORKING
Stormcaller's Boon - FULL WORKING
Violent Outburst - FULL WORKING
Windbrisk Heights - FULL WORKING
DOWNLOAD WAD FILE : UPLOADED Stay tuned following this topic : ------------ Return to Ravnica - OVERLOAD PACK ------------
- NeoAnderson
- Posts: 914
- Joined: 10 Sep 2013, 07:49
- Has thanked: 18 times
- Been thanked: 139 times
Re: Overload at 95%
by braquio » 31 Aug 2014, 13:50
May be we can solve this problem in some cases, including a block that enable the activate ability if the card was exiled by that exactly card.Until now the only limitation about playing overload cards is when you use spell who grants the ability
"To play the card from other zone paying the normal casting cost", in this case you will be able to play the card
only in normal mode. Here you can find a list of cards with this kind of interaction :
____________________________________________________________________________________________________________________________
Braquio Dotp2014 DLC
Alternative Sealed Campaigns for DotP 2014
Braquio Dotp2014 DLC
Alternative Sealed Campaigns for DotP 2014
Re: Overload at 95%
by NeoAnderson » 31 Aug 2014, 15:20
This was also my first thought, but i found too many issues :braquio wrote:May be we can solve this problem in some cases, including a block that enable the activate ability if the card was exiled by that exactly card.Until now the only limitation about playing overload cards is when you use spell who grants the ability
"To play the card from other zone paying the normal casting cost", in this case you will be able to play the card
only in normal mode. Here you can find a list of cards with this kind of interaction :
1. First of all you should have the ACTIVATED ABILITY set to ZONE_ANY ( I tested and it will not works ), if you set to ZONE_ANY, also when you have the card into your hand the ability cannot be activated.
2. I made a test with this card Melek, Izzet Paragon because this one was easy to fix, it sets the flag "PLAYER_CHARACTERISTIC_CAN_PLAY_TOP_CARD_OF_LIBRARY" so it was easy to check if the overload card is on top of library and that flag is true you should can activate overload.
So i tried to grant a copy of the activated ability for the ZONE_LIBRARY, obviously i also duplicated the static ability(with ZONE_LIBRARY) that sets the flag for the PREREQUISITE block.
I found that granted ability don't work.
On the other side if i add (permanently, not granted so it always visible on the text) the static ability with ZONE_LIBRARY and an ACTIVATED ABILITY with ZONE_LIBRARY, it works. You can understand is not really nice to have a card that permanently show many time OVERLOAD ABILITY inside the text.
The fix above works only with Melek, Izzet Paragon because is the only card that uses the "PLAYER_CHARACTERISTIC_CAN_PLAY_TOP_CARD_OF_LIBRARY" flag, other card simply grant an Utility ability with "Normal Cast", so it will be really complicated to understand if a card is exiled by another one without make some modify also that cards.
- NeoAnderson
- Posts: 914
- Joined: 10 Sep 2013, 07:49
- Has thanked: 18 times
- Been thanked: 139 times
Re: Overload at 95%
by braquio » 31 Aug 2014, 15:34
I see,
well antoher thing, there is a bug in all overload cards, if you active the ability to play it with overload,
and in response(before the activated ability is resolved) you play that card at normal cost,
the game crash.
well antoher thing, there is a bug in all overload cards, if you active the ability to play it with overload,
and in response(before the activated ability is resolved) you play that card at normal cost,
the game crash.
____________________________________________________________________________________________________________________________
Braquio Dotp2014 DLC
Alternative Sealed Campaigns for DotP 2014
Braquio Dotp2014 DLC
Alternative Sealed Campaigns for DotP 2014
Re: Overload at 95%
by NeoAnderson » 31 Aug 2014, 15:57
I don't think to have understand exactly this game scenario.braquio wrote:I see,
well antoher thing, there is a bug in all overload cards, if you active the ability to play it with overload,
and in response(before the activated ability is resolved) you play that card at normal cost,
the game crash.
1. The activated abilty cannot be countered, and it doesn't wait any answer to resolve because we set it with forced_skip="1" so it resolves immediately.
2. I played Weapon Surge with overload then before it resolve i cast another istance of Weapon Surge with normal cast and both resolve as expected.
So i think i don't have understand exactly what you mean can you make a detailed example step by step???
- NeoAnderson
- Posts: 914
- Joined: 10 Sep 2013, 07:49
- Has thanked: 18 times
- Been thanked: 139 times
Re: Overload at 95%
by braquio » 31 Aug 2014, 16:22
The problem is that if you dont have selected the "Automatic Resolution" option in configuration options, forced_skip="1" dont have effect so you can respond.NeoAnderson wrote:I don't think to have understand exactly this game scenario.
1. The activated abilty cannot be countered, and it doesn't wait any answer to resolve because we set it with forced_skip="1" so it resolves immediately.
2. I played Weapon Surge with overload then before it resolve i cast another istance of Weapon Surge with normal cast and both resolve as expected.
So i think i don't have understand exactly what you mean can you make a detailed example step by step???
[/b]
Then if you active the activated ability and in response you play the same card at normal cost (not other instance of the same card) the game crash.
I know that is a very rare issue but it happens
____________________________________________________________________________________________________________________________
Braquio Dotp2014 DLC
Alternative Sealed Campaigns for DotP 2014
Braquio Dotp2014 DLC
Alternative Sealed Campaigns for DotP 2014
Re: Overload at 95%
by NeoAnderson » 31 Aug 2014, 17:33
I see, i always have the "Automatic Resolution" turned on, anyway i think this is a an issue caused by a silly behaviour of a player, because if you play a spell for its overload cost is no sense to replay it immediately for is normal cost.braquio wrote:The problem is that if you dont have selected the "Automatic Resolution" option in configuration options, forced_skip="1" dont have effect so you can respond.NeoAnderson wrote:I don't think to have understand exactly this game scenario.
1. The activated abilty cannot be countered, and it doesn't wait any answer to resolve because we set it with forced_skip="1" so it resolves immediately.
2. I played Weapon Surge with overload then before it resolve i cast another istance of Weapon Surge with normal cast and both resolve as expected.
So i think i don't have understand exactly what you mean can you make a detailed example step by step???
[/b]
Then if you active the activated ability and in response you play the same card at normal cost (not other instance of the same card) the game crash.
I know that is a very rare issue but it happens
Anyway a solution could be to change all the block into the activated ability to PLAY_TIME_ACTION, in this way the spell is immediately put on the stack, but i made a quick test and it seems could create some issue if you cast more than one spell, as like one instance overloaded and one normal..
If you want to try Just replace this code inside the activated ability :
- Code: Select all
<RESOLUTION_TIME_ACTION>
local spellToCast = EffectSource()
EffectController():CastSpellUsingResourceCost( spellToCast, 3 )
</RESOLUTION_TIME_ACTION>
<RESOLUTION_TIME_ACTION>
RSN_MarkManaAbilityEnd()
</RESOLUTION_TIME_ACTION>
- Code: Select all
<PLAY_TIME_ACTION>
local spellToCast = EffectSource()
EffectController():CastSpellUsingResourceCost( spellToCast, 3 )
</PLAY_TIME_ACTION>
<PLAY_TIME_ACTION>
RSN_MarkManaAbilityEnd()
</PLAY_TIME_ACTION>
- NeoAnderson
- Posts: 914
- Joined: 10 Sep 2013, 07:49
- Has thanked: 18 times
- Been thanked: 139 times
Re: Overload at 95%
by braquio » 31 Aug 2014, 18:36
I teste it, dont work and causes other issues.
The first overload spell you play dont works, next ones yes.
If u play at normal cast and in response you play an overload one, then you spend twice the alternative cost.
And i didnt test too much more.
I think its better dont change nothing and only advise people about this bug in the post, really is very strange that could be happen if you play the spell correctly and i doubt the engine will do it by itself.
The first overload spell you play dont works, next ones yes.
If u play at normal cast and in response you play an overload one, then you spend twice the alternative cost.
And i didnt test too much more.
I think its better dont change nothing and only advise people about this bug in the post, really is very strange that could be happen if you play the spell correctly and i doubt the engine will do it by itself.
Last edited by braquio on 31 Aug 2014, 18:43, edited 1 time in total.
____________________________________________________________________________________________________________________________
Braquio Dotp2014 DLC
Alternative Sealed Campaigns for DotP 2014
Braquio Dotp2014 DLC
Alternative Sealed Campaigns for DotP 2014
Who is online
Users browsing this forum: No registered users and 15 guests