It is currently 18 Jul 2025, 20:22
   
Text Size

Kaladesh - Development

Moderator: CCGHQ Admins

Re: Kaladesh - Development

Postby Splinterverse » 28 Sep 2016, 19:54

Coded tested and uploaded:
Aetherstorm Roc
Cataclysmic Gearhulk (bug fixed)
Confiscation Coup
Deadlock Trap
Eddytrail Hawk
Janjeet Sentry
Lathnu Hellion
Riparian Tiger
Thriving Grubs
Thriving Ibex
Thriving Rats
Thriving Rhino
Voltaic Brawler

Problem Cards:

Consulate Surveillance http://pastebin.com/pETGddUZ still does not prevent damage.

Eliminate the Competition http://pastebin.com/yRkykhVZ The sacrifice happens, but the destruction does not.

Rashmi http://pastebin.com/E6P2sxvZ Sometimes gives a choice to view and play or discard. Other times it doesn't. Thought it might have to do with MC not resetting each turn, but the cleanup code didn't fix that.

Revolutionary Rebuff http://pastebin.com/fcmBXygY Everything seems to be working up until the targeted player is asked to pay 2 or not. The multiple choice question never pops up. A window does appear, but it just hangs and I have to exit.

Edit to add:

These are also cards I probably won't be coding any time soon:

Captured by the Consulate
Dubious Challenge
Fairgrounds Trumpeter
Ghirapur Guide
Gonti, Lord of Luxury
Spark of Creativity

Most of them seem possible, but there aren't a lot of examples out there. Like with Fairgrounds, I'm not sure how to apply evasion to a different creature than the effect source.
---------------------------------------------
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: Kaladesh - Development

Postby Splinterverse » 28 Sep 2016, 20:51

Coded, tested, and uploaded:
Consuls Shieldguard
Maulfist Doorbuster

Works in Progress (Awaiting Feedback -- see previous posts):
Consulate Surveillance
Eliminate the Competition
Rashmi, Eternities Crafter
Revolutionary Rebuff

Additional Problem Cards:
Fabrication Module and Territorial Gorger both have abilities triggered by energy. I used the trigger code from Xander, but it doesn't appear to be working or I implemented it incorrectly. Code attached below.

Not planning to code these at this time:
Aetherborn Marauder
Aetherflux Reservoir
Animation Module
Captured by the Consulate
Dubious Challenge
Eager Construct
Fairgrounds Trumpeter
Ghirapur Guide
Gonti, Lord of Luxury
Insidious Will
Panharmonicon
Spark of Creativity

Next:
Other than fixing the works in progress based on feedback, I will be moving on to coding missing cards.
Attachments
ENERGY_TRIGGER_CARDS.zip
(6.21 KiB) Downloaded 230 times
---------------------------------------------
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: Kaladesh - Development

Postby fallenangle » 29 Sep 2016, 13:36

Splinterverse, I've looked briefly at the code for the problem cards you were looking for feedback about, and I think I can spot the problems and suggest solutions. I won't be able to look at them in depth until tomorrow evening, so if anyone wants to help you before then, that will be great. Otherwise, I will look at them when I have time and make suggestions about what you might do to fix them.
fallenangle
 
Posts: 319
Joined: 20 Jul 2013, 02:31
Has thanked: 73 times
Been thanked: 41 times

Re: Kaladesh - Development

Postby Splinterverse2 » 29 Sep 2016, 13:38

fallenangle wrote:Splinterverse, I've looked briefly at the code for the problem cards you were looking for feedback about, and I think I can spot the problems and suggest solutions. I won't be able to look at them in depth until tomorrow evening, so if anyone wants to help you before then, that will be great. Otherwise, I will look at them when I have time and make suggestions about what you might do to fix them.
That works. I can't code again until tomorrow sometime anyway. Thanks for letting me know.
Splinterverse2
 
Posts: 52
Joined: 20 Sep 2016, 13:52
Has thanked: 13 times
Been thanked: 0 time

Re: Kaladesh - Development

Postby Xander9009 » 29 Sep 2016, 13:53

For the energy triggers, right off the bat, I see there's a missing "and" on line 51 of Fabrication Module. I'll likely be busy for several days, so I won't be able to look any more in depth than that for now, though.

----

Unrelated, Ghirapur Guide is currently missing art. No other art is missing, though, because Kaladesh was finally released on Magic Duels. I used this last hour to get all of that ported over.
_______________________________
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: Kaladesh - Development

Postby Splinterverse » 30 Sep 2016, 12:04

Xander9009 wrote:For the energy triggers, right off the bat, I see there's a missing "and" on line 51 of Fabrication Module. I'll likely be busy for several days, so I won't be able to look any more in depth than that for now, though.

----

Unrelated, Ghirapur Guide is currently missing art. No other art is missing, though, because Kaladesh was finally released on Magic Duels. I used this last hour to get all of that ported over.
I will upload LQ art for Ghirapur Guide today when I do my next upload. I will try the fix for Fabrication Module as well and test. 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: Kaladesh - Development

Postby Splinterverse » 30 Sep 2016, 21:54

---------------------------------------------
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: Kaladesh - Development

Postby fallenangle » 01 Oct 2016, 16:05

Splinterverse, here are my suggestions for fixing the cards on which you were looking for feedback. I apologize for making you wait until this morning!

Consulate Surveillance: I think that your problem is that a "player" can't technically also be an "object." Try using this code to get it to work:

Code: Select all
<ACTIVATED_ABILITY>
        <LOCALISED_TEXT LanguageCode="en-US"><![CDATA[Pay two energy counters: Prevent all damage that would be dealt to you this turn by a source of your choice.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="fr-FR"><![CDATA[Payez two energy counters : Prévenez toutes les blessures qui devraient vous être infligées ce tour-ci par une source de votre choix.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="es-ES"><![CDATA[Pagar two energy counters: Prevén todo el daño que la fuente de tu elección fuera a hacerte este turno.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="de-DE"><![CDATA[Bezahle two energy counters: Verhindere allen Schaden, der dir in diesem Zug von einer Quelle, die du bestimmst, zugefügt würde.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="it-IT"><![CDATA[Paga two energy counters: Previeni tutto il danno che ti verrebbe inflitto in questo turno da una fonte a tua scelta.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="jp-JA"><![CDATA[two energy countersを支払う:このターン、あなたが選んだ発生源1つからあなたに与えられるすべてのダメージを軽減する。]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="ko-KR"><![CDATA[two energy counters를 지불한다: 당신이 선택한 원천이 이 턴에 당신에게 입히려는 모든 피해를 방지한다.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="ru-RU"><![CDATA[Заплатите two energy counters: предотвратите все повреждения, которые должны быть нанесены вам в этом ходу источником по вашему выбору.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="pt-BR"><![CDATA[Pague two energy counters: Previna todo o dano que seria causado a você neste turno por uma fonte a sua escolha.]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="zh-CN"><![CDATA[支付two energy counters:选择一个来源。于本回合中,防止该来源将对你造成的所有伤害。]]></LOCALISED_TEXT>
        <LOCALISED_TEXT LanguageCode="zh-HK"><![CDATA[支付two energy counters:選擇一個來源。於本回合中,防止該來源將對你造成的所有傷害。]]></LOCALISED_TEXT>
        <COST type="Generic"><!-- ENERGY COST -->
            <PREREQUISITE>
                return CW_Cost_CanPayEnergy(2)
            </PREREQUISITE>
            <RESOLUTION_TIME_ACTION>
                CW_Cost_PayEnergy(2)
            </RESOLUTION_TIME_ACTION>
        </COST>
<TARGET tag="CARD_QUERY_CHOOSE_SOURCE_PREVENT_DAMAGE" definition="0" compartment="0" count="1" />
      <TARGET_DEFINITION id="0">
         local filter = ClearFilter()
         filter:SetFilterType( FILTER_TYPE_CARDS )
         local subfilter = filter:AddSubFilter_Or()
         subfilter:Add( FE_ZONE, OP_IS, ZONE_STACK )
         subfilter:Add( FE_ZONE, OP_IS, ZONE_GRAVEYARD )
         subfilter:Add( FE_ZONE, OP_IS, ZONE_BATTLEFIELD )
         subfilter:Add( FE_ZONE, OP_IS, ZONE_EXILE )
      </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)
            delayDC:Protect_CardPtr(0)
            MTG():CreateDelayedTrigger(1, delayDC)
         end
      </RESOLUTION_TIME_ACTION>
      <AI_SIMPLIFIED_TARGETING compartment="0" hint="HINT_ENEMY_ONLY" />
      <SFX text="TARGET_SUN_PLAY" />
      <AI_AVAILABILITY window_step="upkeep" type="window" />
      <AI_AVAILABILITY window_step="main_1" window_turn="my_turn" type="window" />
      <AI_AVAILABILITY window_step="begin_combat" window_turn="their_turn" type="window" />
      <AI_AVAILABILITY window_step="declare_attackers" window_turn="their_turn" type="window" />
      <AI_AVAILABILITY window_step="declare_blockers" type="window" />
      <AI_AVAILABILITY window_step="main_2" window_turn="my_turn" type="window" />
      <AI_AVAILABILITY window_step="end_of_turn" type="window" />
      <AI_AVAILABILITY window_step="end_of_turn" window_turn="their_turn" type="window" />
      <AI_AVAILABILITY type="in_response" response_source="1" response_target="1" />
      <AI_AVAILABILITY type="in_response" response_source="1" />
      <AI_AVAILABILITY type="in_response" response_target="1" />
      </ACTIVATED_ABILITY>
      
      <TRIGGERED_ABILITY resource_id="1" replacement_effect="1">
      <TRIGGER value="SOURCE_DEALS_DAMAGE_TO_PLAYER" pre_trigger="1" damage_type="all">
         return SecondaryPlayer() == EffectController()  and TriggerObject() == EffectDC():Get_CardPtr(0)
      </TRIGGER>
      <CLEANUP simple_cleanup="EndOfTurn" />
      <RESOLUTION_TIME_ACTION>
         Damage():PreventAll()
      </RESOLUTION_TIME_ACTION>
   </TRIGGERED_ABILITY>
Eliminate the Competition: I base my suggestions for this one largely on Neo's Champion of Stray Souls. Try this and see if it works:

Code: Select all
<COST type="Generic">
         <PREREQUISITE>
            local filter = ClearFilter()
            filter:Add(FE_CARD_INSTANCE, OP_NOT, EffectSource())
            filter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
            filter:Add(FE_CONTROLLER, OP_IS, EffectController())
            return filter:CountStopAt(1) == 1
         </PREREQUISITE>
         <RESOLUTION_TIME_ACTION>
            local Controller = EffectController()
            local filter = ClearFilter()
            filter:Add(FE_CONTROLLER, OP_IS, Controller)
            filter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
            filter:Add(FE_CARD_INSTANCE, OP_NOT, EffectSource())
            local Count = EffectDC():Get_Targets(1):Count()
            if Count &gt; 0 then
               Controller:SetItemCount(Count)
               for i=0,Count-1 do
                  Controller:SetItemPrompt(i, "CARD_QUERY_CHOOSE_CREATURE_TO_SACRIFICE")
               end
               Controller:ChooseItems(EffectDC():Make_Targets(0))
            end
         </RESOLUTION_TIME_ACTION>
         <RESOLUTION_TIME_ACTION>
            local Creatures = EffectDC():Get_Targets(0)
            if Creatures ~= nil then
               local Count = Creatures:Count()
               for i=0,Count-1 do
                  local Creature = Creatures:Get_CardPtr(i)
                  if Creature ~= nil then
                     EffectController():Sacrifice(Creature)
                  end
               end
            end
         </RESOLUTION_TIME_ACTION>
      </COST>
      
      
      <TARGET tag="CARD_QUERY_CHOOSE_CREATURE_DESTROY" definition="1" compartment="1" up_to="1" dependancy="1">
      local filter = ClearFilter()
         filter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
         filter:Add(FE_CONTROLLER, OP_IS, EffectController())
         MTG():SetTargetCount(filter:Count())
      </TARGET>
      <TARGET_DEFINITION id="1">
         local filter = ClearFilter()
         filter:Add(FE_TYPE, OP_IS, CARD_TYPE_CREATURE)
      </TARGET_DEFINITION>
      <RESOLUTION_TIME_ACTION>
            local Targets = EffectDC():Get_Targets(1):Count()
         for i = 0, (Targets-1) do
            local creature = EffectDC():Get_Targets(1) and EffectDC():Get_Targets(1):Get_CardPtr(i)
            if creature ~= nil then
            creature:Destroy()
         end
            end
      </RESOLUTION_TIME_ACTION>
Rashmi, EC: You have to specify the number of factors for which you are interrogating in the interrogation query (so "NUM SPELLS CAST, THIS TURN, 2" [see code for real example, but you can get the idea]). You also want to put the card directly into your hand if you don't cast it rather than drawing the card so that you don't trigger any "draw card" triggers. Try this, based on Xander's Mind's Dilation, and see if it works:

Code: Select all
      <TRIGGER value="SPELL_PLAYED" simple_qualifier="controller">
         local oTriggerObject = TriggerObject()
         local oController = EffectController()
         if oTriggerObject ~= nil and oController ~= nil then
               local oInterrogation = MTG():ClearInterrogationQuery()
               oInterrogation:SetPlayer(oController)
               return oInterrogation:Count(INTERROGATE_SPELLS_CAST, INTERROGATE_THIS_TURN, 2) == 1
         end
         return false
      </TRIGGER>
      <RESOLUTION_TIME_ACTION>
         local oTriggerObject = TriggerObject()
         local oController = EffectController()
         if oTriggerObject ~= nil and oController ~= nil then
               local oCard = oController:Library_GetTop()
               if oCard ~= nil then
                  EffectDC():Set_CardPtr(0, oCard)
                  EffectDC():Protect_CardPtr(0)
                  oCard:Exile()
               end
            end
         end
      </RESOLUTION_TIME_ACTION>
      <RESOLUTION_TIME_ACTION>
         local oController = EffectController()
         local oCard = EffectDC():Get_CardPtr(0)
         if oController ~= nil and oCard ~= nil and oController:CanCastSpellForFree(oCard) then
            oController:BeginNewMultipleChoice()
               oController:AddMultipleChoiceAnswer("CARD_QUERY_BRING_TO_LIGHT_CAST_CARD")
               oController:AddMultipleChoiceAnswer("CARD_QUERY_DO_NOTHING")
            oController:AskMultipleChoiceQuestion("CARD_QUERY_BRING_TO_LIGHT", oCard)
         end
      </RESOLUTION_TIME_ACTION>
      <RESOLUTION_TIME_ACTION>
         local oController = EffectController()
         local oCard = EffectDC():Get_CardPtr(0)
         if oController ~= nil and oCard ~= nil and oController:GetMultipleChoiceResult() == 0 and oController:CanCastSpellForFree(oCard) then
            oController:CastSpellForFree(oCard)
            else ocard:PutInHand(oController)
         end
      </RESOLUTION_TIME_ACTION>
   </TRIGGERED_ABILITY>
For Revolutionary Rebuff, I base my suggestions on Spiketail Drakeling, modified so that the affected spell is nonartifact. I think that it just needed a few more lines of code than you gave it. I'm not a proficient enough coder to explain why my suggestion might work when your version doesn't, however. Try this and see if it works:

Code: Select all
<TARGET tag="CARD_QUERY_CHOOSE_SPELL_TO_COUNTER" definition="0" compartment="0" count="1" />
      <TARGET_DEFINITION id="0">
         local filter = ClearFilter()
         filter:SetZone( ZONE_STACK )
         filter:Add( FE_TYPE, OP_NOT, CARD_TYPE_ARTIFACT )
      </TARGET_DEFINITION>
      <RESOLUTION_TIME_ACTION>
         local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
         if target ~= nil then
            local controller = target:GetPlayer()
            if controller ~= nil and controller:CanPayManaCost("{2}") then
               controller:BeginNewMultipleChoice()
                  controller:AddMultipleChoiceAnswer( "TFM_CARD_QUERY_OPTION_PAY_COST" )
                  controller:AddMultipleChoiceAnswer( "CARD_QUERY_OPTION_IS_COUNTERED" )
               controller:AskMultipleChoiceQuestion( "CARD_QUERY_MC_PAY_2_OR_COUNTERED", target )
            end
         end
      </RESOLUTION_TIME_ACTION>
      <RESOLUTION_TIME_ACTION>
         local target = EffectDC():Get_Targets(0):Get_CardPtr(0)
         if target ~= nil then
            local controller = target:GetPlayer()
            if controller ~= nil and controller:CanPayManaCost("{2}") then
               local result = controller:GetMultipleChoiceResult()
               if result == 0 then
                  controller:PayManaCost("{2}")
               else
                  target:CounterSpell()
               end
            else
               target:CounterSpell()
            end
         end
      </RESOLUTION_TIME_ACTION>
      <AI_SIMPLIFIED_TARGETING compartment="0" hint="HINT_ENEMY_ONLY" />
This should get you closer to where you want to be, at least. If you have any more questions or concerns, just let me know.
fallenangle
 
Posts: 319
Joined: 20 Jul 2013, 02:31
Has thanked: 73 times
Been thanked: 41 times

Re: Kaladesh - Development

Postby Xander9009 » 01 Oct 2016, 16:23

Two things.

1: fallenangle's approach (using SOURCE_DEALS_DAMAGE_TO_PLAYER) is better than the one used before (SOURCE_DEALS_DAMAGE). However, I think the core of the issue originally might have actually been that on line 76, the target is stored in register 0. But register 1 is referenced both on the next line (where its pointer is protected) and in the trigger on line 87.

2: Line 62 of Revolutionary Rebuff references the undefined variable 'amount_string'.
_______________________________
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: Kaladesh - Development

Postby Splinterverse » 01 Oct 2016, 23:24

Thanks for the feedback fallen and Xander. I will try these suggestions in the morning.
---------------------------------------------
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: Kaladesh - Development

Postby Splinterverse » 02 Oct 2016, 17:52

Coded, uploaded, and tested:
Consulate Surveillance
Eliminate the Competition
Rashmi, Eternities Crafter
Revolutionary Rebuff

Thanks to Xander and fallenangle for advice on these.

FYI -- the main issue with Revolutionary Rebuff was PayManaCost() and CanPayManaCost() couldn't take a regular integer, they needed to be like this: ("{2}").
---------------------------------------------
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: Kaladesh - Development

Postby tmxk2012917 » 04 Oct 2016, 18:03

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
tmxk2012917
 
Posts: 164
Joined: 15 Mar 2015, 09:52
Has thanked: 20 times
Been thanked: 12 times

Re: Kaladesh - Development

Postby Splinterverse2 » 04 Oct 2016, 18:28

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
This was fixed this morning but won't be reflected until the wad updates, which will most likely be tomorrow sometime.
Splinterverse2
 
Posts: 52
Joined: 20 Sep 2016, 13:52
Has thanked: 13 times
Been thanked: 0 time

Re: Kaladesh - Development

Postby tmxk2012917 » 06 Oct 2016, 03:42

Chandra Torch of Defiance:
When I chose not to cast the top card of my library, it did not give damage to the opponent. Also, the image of it is missing.
tmxk2012917
 
Posts: 164
Joined: 15 Mar 2015, 09:52
Has thanked: 20 times
Been thanked: 12 times

Re: Kaladesh - Development

Postby Splinterverse » 08 Oct 2016, 22:18

Chandra's Pyrohelix has been uploaded. I thought I had uploaded it previously, but I don't believe I did because I couldn't find my copy. I re-coded it. It has been tested as well.
---------------------------------------------
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 9 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 9 users online :: 0 registered, 0 hidden and 9 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 9 guests

Login Form