It is currently 18 Jul 2025, 12:52
   
Text Size

Community Wad

Moderator: CCGHQ Admins

Re: Community Wad

Postby Xander9009 » 22 Nov 2016, 12:54

Splinterverse wrote:
Xander9009 wrote:Normally, I'd just toss it in a spoiler, but it's actually too long for the forum... http://pastebin.com/NeDHuY8W
Sounds and looks good. Always fine if you add your name. I too like to keep track of who contributed so it definitely fits.

Would you mind adding it to the .wad (if you haven't already)?

Will be back coding tomorrow. :)
Already did once I'd tested that it worked.
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
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

Postby Splinterverse » 23 Nov 2016, 07:27

Xander, for Frankenstein's Monster, I'm not seeing the new counters in CW_COUNTERS.lol. What names should I use to call them?
---------------------------------------------
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

Postby Xander9009 » 23 Nov 2016, 13:38

Splinterverse wrote:Xander, for Frankenstein's Monster, I'm not seeing the new counters in CW_COUNTERS.lol. What names should I use to call them?
Corrected. +2/+0, +0/+2, -2/-0, -0/-2
_______________________________
Community Wad - Community Wad Website - How to Help and Report Bugs
Discord: discord.gg/4AXvHzW
User avatar
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

Postby Splinterverse » 23 Nov 2016, 20:07

Finished coding for today; all cards referenced are from the missing cards list.

Coded, tested, and uploaded:
Animal Magnetism
Anya, Merciless Angel
Apocalypse Chime
Arachnogenesis
Arrow Volley Trap
Ashling's Prerogative
Awaken the Sky Tyrant
Balduvian Hydra
Baleful Stare
Balshan Beguiler
Bamboozle
Brain Pry
Builder's Bane
Carrion Rats
Carrion Wurm
Celestial Convergence
City in a Bottle
Confusion in the Ranks
Curse of Chaos
Foreshadow
Lammastide Weave
Nebuchadnezzar
Planeswalker's Scorn
Predict
Tunnel Vision
Wand of Ith

Bugs fixed:
Blessed Reversal -- was not filtering for "attacking you"; was filtering for any attacker
Carrion Wurm -- was using controller instead of player in one spot
Dementia Sliver -- streamlined my previous code
Ethereal Champion -- had EffectSource(0) instead of EffectSource()

Open Items:

-- CW_CARD_QUERY_SPLINTERVERSE has been updated and uploaded.

-- Alpha Brawl http://pastebin.com/tWMWJjXg Everything is working except for when a creature dies, it doesn't end up doing its damage to the target. The rulings say that the creatures that take lethal still get to do their damage to the target (including infect and other similar effects), so I can't just total the damage that needs to be applied. I've tried LKIShield and Protect, but the dead creatures don't get to do their damage.

-- Barbed Wire http://pastebin.com/r3gwqVGZ It is successfully dealing damage each upkeep, but the prevention piece isn't working. Maybe I have the wrong triggers, but this one is a bit different since IT is the source as opposed to being the SecondaryObject.

-- Bösium Strip http://pastebin.com/ekjumeiB Top card in graveyard is not able to be cast.

-- Bronze Horse http://pastebin.com/teXecV0t Damage is not being prevented.

-- Chained Throatseeker http://pastebin.com/VVRBtWMU It's able to attack when the defending player isn't poisoned. I thought the TFM_ReadPoisonCount was being used here in a similar way to other instances, but perhaps I've mis-used it. It doesn't matter how many poison counters the opponent has, just that he/she is poisoned.

-- Elemental Appeal http://pastebin.com/RheuqGGb This is the one that is having issues with an invisible token. I thought I would post the code in case it helps with the troubleshooting (or perhaps something is wrong in my code). To "see" the invisible token, you'll need to test it with a card that procs when a creature enters the battlefield.

Next:

Back tomorrow to continue coding 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
Splinterverse
 
Posts: 918
Joined: 04 Sep 2016, 13:32
Has thanked: 150 times
Been thanked: 76 times

Re: Community Wad

Postby thefiremind » 23 Nov 2016, 21:22

You need to do it all in a single action.

Save EffectSource in the delayDC and use that pointer in the delayed trigger.

Try to grant the ability on layer 6 rather than 8.
What you were trying to do inside the UTILITY_ABILITY won't work. To be honest I don't know what would be the best way to exile the spell after it has been cast. Any ideas from the other modders?

I'll just repeat what I wrote for your previous attempt:
thefiremind wrote: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).
You are missing the code that writes the poison count where you are trying to read it. Look at Glistener Elf for an example.

I would guess that something goes wrong inside the CW_Tokens function. Try to use the original MTG():PutTokensOntoBattlefield function instead, as a test (remember that you'll need to supply the full name of the token for that).
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 722 times


Re: Community Wad

Postby Splinterverse » 24 Nov 2016, 22:38

Finished coding for today; all cards referenced are from the missing cards list.

Coded, tested, and uploaded:
Archery Training
Chancellor of the Tangle
Menagerie Liberator
Planeswalker's Favor
Planeswalker's Fury
Planeswalker's Mirth
Restless Dreams
Sphinx Ambassador
Tatterkite
Telepathy
Thran Tome
Urza's Bauble
Vexing Arcanix
Vizkopa Confessor
Wild Evocation
Wings of the Guard

Bugs fixed:
Deepglow Skate -- tweaks; tested
Foreshadow -- added announce for named card
Nebuchadnezzar -- removed leftover debug message and added announce for named card
Parting Thoughts -- tweaks; tested
Spirit Shackle -- updated based on new counters (but see open items below)
Predict -- added announce for named card

HQ art uploaded (all were missing):
Menagerie Liberator
Wings of the Guard

Open Items:

-- CW_CARD_QUERY_SPLINTERVERSE has been updated and uploaded.

-- Xander, the new counters don't appear to be working. I have uploaded Spirit Shackle with a reference to the new counters, so you can use that to test if you want. I think they are causing this error:
[lua] [string "_MANAGER_CHARACTERISTICS_TITLE (CONTINUOUS_ACTION)~0x0000038f"]:5: attempt to call method 'AddPower' (a nil value)
[lua] [string "_MANAGER_CHARACTERISTICS_TITLE (CONTINUOUS_ACTION)~0x0000038c"]:5: attempt to call method 'AddToughness' (a nil value)[/code]

-- Alpha Brawl http://pastebin.com/kzqe6AzE It's all in one block now, but the creatures do not do damage back to the target.

-- Barbed Wire http://pastebin.com/cgkmEP4N Passed the EffectSource pointer to the delayDC but it is still not preventing damage from the source.

-- Bösium Strip http://pastebin.com/XNxiqV1L Tried layer 6, but no luck.

-- Bronze Horse http://pastebin.com/ZGqSCPHK Switched trigger and pointers, but still no prevention.

-- Chained Throatseeker http://pastebin.com/U9JXJfhs Added what I think is correct poison write code, but it's able to attack when the defending player isn't poisoned. I've got an attempt at Viridian Betrayers that isn't working either and is similar to this. I'm guessing once we've got Chained Throatseeker sorted, I'll be able to get Viridian working as well.

-- Elemental Appeal http://pastebin.com/vzF3YEHT Didn't work with original token function, so I think we can rule out CW_Tokens as the problem. Most likely an issue with the token itself.

Next:

Back tomorrow to continue coding missing cards.

Special message:

Today is Thanksgiving in the U.S., and as cheesy as it sounds, I want you all to now I am very thankful for your continued support, patience, and work on DOTP 2014 modding. I'm so glad I found this place and am grateful for all of the work that has gone into this game. Many thanks!
---------------------------------------------
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

Postby Splinterverse » 24 Nov 2016, 22:44

Oh, I forgot, a question . . .

Is there any way to limit the upper and lower bounds of a numerical choice question? I tried including 2 answers and only one was available (the lowest).
---------------------------------------------
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

Postby thefiremind » 24 Nov 2016, 23:15

Try to do that in a single loop: the target deals the damage and the other creature answers back. Also, I suggest to avoid using GetCurrentPower(), because sometimes it gives unexpected results. Substitute it with GetCurrentCharacteristics():Power_Get().
| Open
Code: Select all
local target = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
if target ~= nil then
   local opponent = target:GetController()
   local tpower = target:GetCurrentCharacteristics():Power_Get()
   local filter = ClearFilter()
   filter:Add( FE_CONTROLLER, OP_IS, opponent )
   filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
   filter:Add( FE_CARD_INSTANCE, OP_NOT, target )
   local count = filter:EvaluateObjects()
   for i=0, count-1 do
      local creature = filter:GetNthEvaluatedObject(i)
      if creature ~= nil then
         local cpower = creature:GetCurrentCharacteristics():Power_Get()
         target:DealDamageTo(tpower, creature)
         creature:DealDamageTo(cpower, target)
      end
   end
end
The code is shorter and doesn't even need additional chests.

I don't know what's wrong here: both seem OK to me now. (The triggered ability on Bronze Horse should be a replacement_effect, but it should work anyway.)

Splinterverse wrote:-- Bösium Strip http://pastebin.com/XNxiqV1L Tried layer 6, but no luck.
I have looked at other cards and saw that layer 8 was the correct one for abilities like this one, so you can revert back to 8. The problem (which escaped me yesterday #-o) probably is that you forgot the DURATION block for the continuous action.

Chained Throatseeker's own ability was correct the last time (revert it), what I wanted you to add was this additional ability that you can find on Glistener Elf:
Code: Select all
   <TRIGGERED_ABILITY replacement_effect="1" active_zone="ZONE_ANY">
      <TRIGGER value="PLAYER_POISON_CHANGED">
         TFM_WritePoisonCount( TriggerPlayer(), GetAmount() )
         return false
      </TRIGGER>
   </TRIGGERED_ABILITY>
   <AI_CUSTOM_SCORE zone="ZONE_BATTLEFIELD">
      TFM_AddInfectCustomScore(0)
   </AI_CUSTOM_SCORE>
This writes the poison count in the register when a player's poison count changes. In this trigger, GetAmount() returns the current poison count rather than the variation, so multiple triggers don't cause incompatibilities (even if 10 cards write the count, it will be the same value as if only 1 did).
About the custom score, it's more of a trial and error process, I added it because the AI wasn't evaluating infect creatures properly, and it basically gives the opponents' infect creatures a higher score the higher the player's poison counter is (the closer you are to death by poison, the more you should pay attention). It made things slightly better. You could put -150 instead of 0 since Chained Throatseeker's ability is actually a drawback, but that's not really important.

I found the problem! You are using Power_Set and Toughness_Set instead of Power_Add and Toughness_Add, so the token dies as soon as it enters the battlefield because you set its toughness to 0. :)

Splinterverse wrote:Is there any way to limit the upper and lower bounds of a numerical choice question?
In Magic Duels they use 2 arguments for AddNumericalChoice: first for lower bound, second for upper bound. Unfortunately, in DotP2014 the only argument just sets the upper bound, while the lower bound is always 0.
A way to enforce a lower bound could be to specify it in the question string, and repeat the query if the player enters an illegal value. Since this would probably confuse the AI, I'd suggest to do it only in cases where you can set a predefined answer for the AI and make it skip the query altogether.
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 722 times

Re: Community Wad

Postby migookman » 25 Nov 2016, 01:52

I tried coding Sands of Time but the last triggered ability isn't doing anything:
Code: Select all
<?xml version="1.0"?>
<CARD_V2 ExportVersion="1">
   <FILENAME text="SANDS_OF_TIME_CW_3601" />
   <CARDNAME text="SANDS_OF_TIME" />
   <TITLE>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Sands of Time]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Sables du temps]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Arenas del tiempo]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Sand der Zeit]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Sabbie del Tempo]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Sands of Time]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Sands of Time]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Sands of Time]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Areias do Tempo]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[Sands of Time]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[Sands of Time]]></LOCALISED_TEXT>
   </TITLE>
   <MULTIVERSEID value="3601" />
   <ARTID value="SANDS_OF_TIME" />
   <ARTIST name="Paul Lee" />
   <CASTING_COST cost="{4}" />
   <FLAVOURTEXT>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[“But once, with a magician’s help, Time was stopped and Day stood still.“<br>—“Love Song of Night and Day”]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[“But once, with a magician’s help, Time was stopped and Day stood still.“<br>—“Love Song of Night and Day”]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[“But once, with a magician’s help, Time was stopped and Day stood still.“<br>—“Love Song of Night and Day”]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[“Aber einst, mit der Hilfe eines Magiers, wurde die Zeit gestoppt, und der Tag stand still.“ -“Das Liebeslied von Tag und Nacht“]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[“But once, with a magician’s help, Time was stopped and Day stood still.“<br>—“Love Song of Night and Day”]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[“But once, with a magician’s help, Time was stopped and Day stood still.“<br>—“Love Song of Night and Day”]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[“But once, with a magician’s help, Time was stopped and Day stood still.“<br>—“Love Song of Night and Day”]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[“But once, with a magician’s help, Time was stopped and Day stood still.“<br>—“Love Song of Night and Day”]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[“But once, with a magician’s help, Time was stopped and Day stood still.“<br>—“Love Song of Night and Day”]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[“But once, with a magician’s help, Time was stopped and Day stood still.“<br>—“Love Song of Night and Day”]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[“But once, with a magician’s help, Time was stopped and Day stood still.“<br>—“Love Song of Night and Day”]]></LOCALISED_TEXT>
   </FLAVOURTEXT>
   <TYPE metaname="Artifact" />
   <EXPANSION value="VI" />
   <RARITY metaname="R" />
    <TRIGGERED_ABILITY replacement_effect="1">
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Each player skips his or her untap step.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[<span class=“missing”>(Missing!)</span>]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[<span class=“missing”>(Missing!)</span>]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Jeder Spieler übergeht seine Enttap-Phase. Enttappe zu Beginn des Zuges eines Spielers alle getappten Artefakte, Kreaturen und Länder, die dieser Spieler kontrolliert, und tappe alle ungetappten Artefakte, Kreaturen und Länder, die dieser Spieler kontrolliert.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[<span class=“missing”>(Missing!)</span>]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Each player skips his or her untap step.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Each player skips his or her untap step.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Each player skips his or her untap step.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[<span class=“missing”>(Missing!)</span>]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[Each player skips his or her untap step.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[Each player skips his or her untap step.]]></LOCALISED_TEXT>
           <TRIGGER value="BEGINNING_OF_PLAYERS_STEP" pre_trigger="1">
         return MTG():GetStep() == STEP_UNTAP
      </TRIGGER>
      <RESOLUTION_TIME_ACTION>
         MTG():SkipStep()
      </RESOLUTION_TIME_ACTION>
   </TRIGGERED_ABILITY>
    <TRIGGERED_ABILITY>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[At the beginning of each player’s upkeep, that player simultaneously untaps each tapped artifact, creature, and land he or she controls and taps each untapped artifact, creature, and land he or she controls.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[At the beginning of each player’s upkeep, that player simultaneously untaps each tapped artifact, creature, and land he or she controls and taps each untapped artifact, creature, and land he or she controls.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[At the beginning of each player’s upkeep, that player simultaneously untaps each tapped artifact, creature, and land he or she controls and taps each untapped artifact, creature, and land he or she controls.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[At the beginning of each player’s upkeep, that player simultaneously untaps each tapped artifact, creature, and land he or she controls and taps each untapped artifact, creature, and land he or she controls.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[At the beginning of each player’s upkeep, that player simultaneously untaps each tapped artifact, creature, and land he or she controls and taps each untapped artifact, creature, and land he or she controls.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[At the beginning of each player’s upkeep, that player simultaneously untaps each tapped artifact, creature, and land he or she controls and taps each untapped artifact, creature, and land he or she controls.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[At the beginning of each player’s upkeep, that player simultaneously untaps each tapped artifact, creature, and land he or she controls and taps each untapped artifact, creature, and land he or she controls.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[At the beginning of each player’s upkeep, that player simultaneously untaps each tapped artifact, creature, and land he or she controls and taps each untapped artifact, creature, and land he or she controls.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[At the beginning of each player’s upkeep, that player simultaneously untaps each tapped artifact, creature, and land he or she controls and taps each untapped artifact, creature, and land he or she controls.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[At the beginning of each player’s upkeep, that player simultaneously untaps each tapped artifact, creature, and land he or she controls and taps each untapped artifact, creature, and land he or she controls.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[At the beginning of each player’s upkeep, that player simultaneously untaps each tapped artifact, creature, and land he or she controls and taps each untapped artifact, creature, and land he or she controls.]]></LOCALISED_TEXT>
      <TRIGGER value="BEGINNING_OF_STEP">
         return MTG():GetStep() == STEP_UPKEEP
      </TRIGGER>
                <FILTER filter_id="0">
         local filter = ClearFilter()
                        local subfilter = filter:AddSubFilter_Or()
         subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_ARTIFACT )
         subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
                        subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_LAND  )
         filter:Add( FE_CONTROLLER, OP_IS, TriggerPlayer())
      </FILTER>
                <RESOLUTION_TIME_ACTION filter_id="0">
      if FilteredCard() ~= nil then
         if FilteredCard():IsTapped() then
            FilteredCard():Untap()
         else
            FilteredCard():Tap()
         end
      end
   </RESOLUTION_TIME_ACTION>
   </TRIGGERED_ABILITY>
</CARD_V2>
User avatar
migookman
 
Posts: 135
Joined: 05 Aug 2014, 06:37
Has thanked: 22 times
Been thanked: 28 times

Re: Community Wad

Postby nivmizzet1 » 25 Nov 2016, 04:12

Xander9009 wrote:
nivmizzet1 wrote:Cavern of Souls doesn't let you spend the mana created until all other mana options are depleted. This kind of screws it up, especially if you want to leave mana open to play instants in the opponents turn.
Unfortunately, that's not something we have much control over.
I guess the only way to have it be useful would be to only use manual mana lands in the decks that you want to use it in. That would no doubt be a pain though.
nivmizzet1
 
Posts: 617
Joined: 21 Mar 2013, 10:10
Has thanked: 100 times
Been thanked: 25 times

Re: Community Wad

Postby Splinterverse » 25 Nov 2016, 10:56

migookman wrote:I tried coding Sands of Time but the last triggered ability isn't doing anything:
Code: Select all
<?xml version="1.0"?>
<CARD_V2 ExportVersion="1">
   <FILENAME text="SANDS_OF_TIME_CW_3601" />
   <CARDNAME text="SANDS_OF_TIME" />
   <TITLE>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Sands of Time]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Sables du temps]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Arenas del tiempo]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Sand der Zeit]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Sabbie del Tempo]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Sands of Time]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Sands of Time]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Sands of Time]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Areias do Tempo]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[Sands of Time]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[Sands of Time]]></LOCALISED_TEXT>
   </TITLE>
   <MULTIVERSEID value="3601" />
   <ARTID value="SANDS_OF_TIME" />
   <ARTIST name="Paul Lee" />
   <CASTING_COST cost="{4}" />
   <FLAVOURTEXT>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[“But once, with a magician’s help, Time was stopped and Day stood still.“<br>—“Love Song of Night and Day”]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[“But once, with a magician’s help, Time was stopped and Day stood still.“<br>—“Love Song of Night and Day”]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[“But once, with a magician’s help, Time was stopped and Day stood still.“<br>—“Love Song of Night and Day”]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[“Aber einst, mit der Hilfe eines Magiers, wurde die Zeit gestoppt, und der Tag stand still.“ -“Das Liebeslied von Tag und Nacht“]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[“But once, with a magician’s help, Time was stopped and Day stood still.“<br>—“Love Song of Night and Day”]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[“But once, with a magician’s help, Time was stopped and Day stood still.“<br>—“Love Song of Night and Day”]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[“But once, with a magician’s help, Time was stopped and Day stood still.“<br>—“Love Song of Night and Day”]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[“But once, with a magician’s help, Time was stopped and Day stood still.“<br>—“Love Song of Night and Day”]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[“But once, with a magician’s help, Time was stopped and Day stood still.“<br>—“Love Song of Night and Day”]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[“But once, with a magician’s help, Time was stopped and Day stood still.“<br>—“Love Song of Night and Day”]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[“But once, with a magician’s help, Time was stopped and Day stood still.“<br>—“Love Song of Night and Day”]]></LOCALISED_TEXT>
   </FLAVOURTEXT>
   <TYPE metaname="Artifact" />
   <EXPANSION value="VI" />
   <RARITY metaname="R" />
    <TRIGGERED_ABILITY replacement_effect="1">
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Each player skips his or her untap step.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[<span class=“missing”>(Missing!)</span>]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[<span class=“missing”>(Missing!)</span>]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Jeder Spieler übergeht seine Enttap-Phase. Enttappe zu Beginn des Zuges eines Spielers alle getappten Artefakte, Kreaturen und Länder, die dieser Spieler kontrolliert, und tappe alle ungetappten Artefakte, Kreaturen und Länder, die dieser Spieler kontrolliert.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[<span class=“missing”>(Missing!)</span>]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[Each player skips his or her untap step.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[Each player skips his or her untap step.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Each player skips his or her untap step.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[<span class=“missing”>(Missing!)</span>]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[Each player skips his or her untap step.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[Each player skips his or her untap step.]]></LOCALISED_TEXT>
           <TRIGGER value="BEGINNING_OF_PLAYERS_STEP" pre_trigger="1">
         return MTG():GetStep() == STEP_UNTAP
      </TRIGGER>
      <RESOLUTION_TIME_ACTION>
         MTG():SkipStep()
      </RESOLUTION_TIME_ACTION>
   </TRIGGERED_ABILITY>
    <TRIGGERED_ABILITY>
      <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[At the beginning of each player’s upkeep, that player simultaneously untaps each tapped artifact, creature, and land he or she controls and taps each untapped artifact, creature, and land he or she controls.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[At the beginning of each player’s upkeep, that player simultaneously untaps each tapped artifact, creature, and land he or she controls and taps each untapped artifact, creature, and land he or she controls.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[At the beginning of each player’s upkeep, that player simultaneously untaps each tapped artifact, creature, and land he or she controls and taps each untapped artifact, creature, and land he or she controls.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[At the beginning of each player’s upkeep, that player simultaneously untaps each tapped artifact, creature, and land he or she controls and taps each untapped artifact, creature, and land he or she controls.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[At the beginning of each player’s upkeep, that player simultaneously untaps each tapped artifact, creature, and land he or she controls and taps each untapped artifact, creature, and land he or she controls.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[At the beginning of each player’s upkeep, that player simultaneously untaps each tapped artifact, creature, and land he or she controls and taps each untapped artifact, creature, and land he or she controls.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[At the beginning of each player’s upkeep, that player simultaneously untaps each tapped artifact, creature, and land he or she controls and taps each untapped artifact, creature, and land he or she controls.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[At the beginning of each player’s upkeep, that player simultaneously untaps each tapped artifact, creature, and land he or she controls and taps each untapped artifact, creature, and land he or she controls.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[At the beginning of each player’s upkeep, that player simultaneously untaps each tapped artifact, creature, and land he or she controls and taps each untapped artifact, creature, and land he or she controls.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[At the beginning of each player’s upkeep, that player simultaneously untaps each tapped artifact, creature, and land he or she controls and taps each untapped artifact, creature, and land he or she controls.]]></LOCALISED_TEXT>
      <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[At the beginning of each player’s upkeep, that player simultaneously untaps each tapped artifact, creature, and land he or she controls and taps each untapped artifact, creature, and land he or she controls.]]></LOCALISED_TEXT>
      <TRIGGER value="BEGINNING_OF_STEP">
         return MTG():GetStep() == STEP_UPKEEP
      </TRIGGER>
                <FILTER filter_id="0">
         local filter = ClearFilter()
                        local subfilter = filter:AddSubFilter_Or()
         subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_ARTIFACT )
         subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE  )
                        subfilter:Add( FE_TYPE, OP_IS, CARD_TYPE_LAND  )
         filter:Add( FE_CONTROLLER, OP_IS, TriggerPlayer())
      </FILTER>
                <RESOLUTION_TIME_ACTION filter_id="0">
      if FilteredCard() ~= nil then
         if FilteredCard():IsTapped() then
            FilteredCard():Untap()
         else
            FilteredCard():Tap()
         end
      end
   </RESOLUTION_TIME_ACTION>
   </TRIGGERED_ABILITY>
</CARD_V2>
I think the issue is that you need "BEGINNING_OF_PLAYERS_STEP" instead of "BEGINNING_OF_STEP" in that Triggered Ability.
---------------------------------------------
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

Postby Splinterverse » 25 Nov 2016, 11:08

thefiremind. Thanks for the help. Can't wait to try this stuff, especially with Elemental Appeal. Glad you spotted that!

thefiremind wrote:
Try to do that in a single loop: the target deals the damage and the other creature answers back. Also, I suggest to avoid using GetCurrentPower(), because sometimes it gives unexpected results. Substitute it with GetCurrentCharacteristics():Power_Get().
| Open
Code: Select all
local target = EffectDC():Get_Targets(0) and EffectDC():Get_Targets(0):Get_CardPtr(0)
if target ~= nil then
   local opponent = target:GetController()
   local tpower = target:GetCurrentCharacteristics():Power_Get()
   local filter = ClearFilter()
   filter:Add( FE_CONTROLLER, OP_IS, opponent )
   filter:Add( FE_TYPE, OP_IS, CARD_TYPE_CREATURE )
   filter:Add( FE_CARD_INSTANCE, OP_NOT, target )
   local count = filter:EvaluateObjects()
   for i=0, count-1 do
      local creature = filter:GetNthEvaluatedObject(i)
      if creature ~= nil then
         local cpower = creature:GetCurrentCharacteristics():Power_Get()
         target:DealDamageTo(tpower, creature)
         creature:DealDamageTo(cpower, target)
      end
   end
end
The code is shorter and doesn't even need additional chests.


This is good code and I originally thought of doing it this way, but I've started reading the rulings before I code each card and this one says, "The two parts of Alpha Brawl’s effect happen sequentially: first the targeted creature deals damage, then the other creatures deal damage." I thought about storing up the combined power and then doing damage at the end, but then if the creatures had any kind of trigger based on doing damage, it wouldn't fire. So I'm not sure what the options are here. Maybe it's a game engine limitation and your code is the only way to make an approximation.

thefiremind wrote:
Splinterverse wrote:Is there any way to limit the upper and lower bounds of a numerical choice question?
In Magic Duels they use 2 arguments for AddNumericalChoice: first for lower bound, second for upper bound. Unfortunately, in DotP2014 the only argument just sets the upper bound, while the lower bound is always 0.
A way to enforce a lower bound could be to specify it in the question string, and repeat the query if the player enters an illegal value. Since this would probably confuse the AI, I'd suggest to do it only in cases where you can set a predefined answer for the AI and make it skip the query altogether.
How do you repeat the query if they input an illegal value? Is it just checking the result and asking the question again or is there a way to specify illegal values? In the item I'm working on, the player will be presented with two numerical choice prompts and he/she has to pick a value > 0 in one of the two prompts. I thought about storing up the values for each response and if both = 0, then having the computer do a random choice between the two. I could then put a msg in the query text saying something like "You must pick one or a random result will be chosen."
---------------------------------------------
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

Postby thefiremind » 25 Nov 2016, 12:02

Splinterverse wrote:This is good code and I originally thought of doing it this way, but I've started reading the rulings before I code each card and this one says, "The two parts of Alpha Brawl’s effect happen sequentially: first the targeted creature deals damage, then the other creatures deal damage."
Theoretically, anything that happens in a single action (iterations with repeating="1" don't count as a single action) happens simultaneously because state-based effects aren't checked in between, so there shouldn't be any functional difference between my code and yours. In fact, I would expect my code to have the same problem as yours, but trying won't hurt. It's possible that the only problem is GetCurrentPower() not working properly, and your code would be fine just by using GetCurrentCharacteristics():Power_Get().

EDIT: Something I forgot yesterday: assuming that the pointers in your code need some kind of protection (they shouldn't because as I wrote, the whole action should act as simultaneous), using Protect_CardPtr is wrong. Let's say your opponent controls a Gaea's Anthem and you cast Alpha Brawl: if you protect the pointers, and the creatures actually die before dealing damage, you'll read the power values they have in the graveyard, where Gaea's Anthem doesn't affect them. The correct way to protect those pointers would be with LKIShield_CardPtr.

Splinterverse wrote:How do you repeat the query if they input an illegal value? Is it just checking the result and asking the question again or is there a way to specify illegal values?
Just check the result in a repeating action with parity check: when parity==0 you ask the query and always return true; when parity==1 you return true only if the value was illegal. In the end it depends on what you need to do: for example, for some applications I think it could be acceptable to always add 1 to the result, so that a choice between 0 and N becomes a choice between 1 and N+1.
< Former DotP 2012/2013/2014 modder >
Currently busy with life...
User avatar
thefiremind
Programmer
 
Posts: 3515
Joined: 07 Nov 2011, 10:55
Has thanked: 118 times
Been thanked: 722 times

Re: Community Wad

Postby Splinterverse » 25 Nov 2016, 12:33

thefiremind. Cool. I will give your code a try if the power change doesn't work. I've had issues with Power_Get in the past on cards that had power granted via counters (it only returned base power), so I usually use GetCurrentPower, but I will try it here and see if it makes a difference.

What do you think about the Goading mechanic, which reads "Until your next turn, [goaded] creature attacks each combat if able and attacks a player other than you if able." It's on cards like Besmirch and Jeering Homunculus. Is it doable in DOTP2014? I think the first part is. I'm just not sure about the second part.
---------------------------------------------
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

PreviousNext

Return to 2014

Who is online

Users browsing this forum: No registered users and 10 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 10 users online :: 0 registered, 0 hidden and 10 guests (based on users active over the past 10 minutes)
Most users ever online was 7303 on 15 Jul 2025, 20:46

Users browsing this forum: No registered users and 10 guests

Login Form