It is currently 17 Dec 2017, 04:00
   
Text Size

Puzzle Mode

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins

Re: Puzzle Mode

Postby donKixot1 » 21 Aug 2017, 03:33

I can't solve any puzzle :( help me, for example, first Demo puzzle, please!
donKixot1
 
Posts: 2
Joined: 21 Aug 2017, 03:23
Has thanked: 1 time
Been thanked: 0 time

Re: Puzzle Mode

Postby kevlahnota » 21 Aug 2017, 03:53

donKixot1 wrote:I can't solve any puzzle :( help me, for example, first Demo puzzle, please!
for the demo puzzle, target opponent Gurmag Angler with Tendrils of Corruption using 3 blue mana and 1 black mana, let it resolve (it gets 4 damage), then use 2 black mana for X on Crypt Rats ability, while the ability is on stack, Use 1 black mana for X on Crypt Rats again, last in first out ruling, the 1 damage will resolve killing Crypt Rats, Young Wolf, and opponent Gurmag Angler, Undying triggers returning it to battlefield with a +1/+1 counter, then 2 damage on stack resolve leaving your Gurmag Angler alive killing opponent Young Wolf, then go to declare attack phase and attack opponent with your Gurmag Angler, since he has 5 life and you have 2 life, you win...
User avatar
kevlahnota
Programmer
 
Posts: 524
Joined: 19 Jul 2010, 17:45
Location: Philippines
Has thanked: 12 times
Been thanked: 147 times

Re: Puzzle Mode

Postby donKixot1 » 21 Aug 2017, 04:34

Thanks a lot!
donKixot1
 
Posts: 2
Joined: 21 Aug 2017, 03:23
Has thanked: 1 time
Been thanked: 0 time

Re: Puzzle Mode

Postby Agetian » 21 Aug 2017, 04:56

@ Xitax: here are the updated puzzles, can you please check out if they work? You'll also need to update to the current build to make the one with Awaken work, I included a special syntax KW#Awaken->target to precast the spell with this keyworded ability.

As for the token generation, btw, the reason it didn't work is because you were asking the game to look for the variable "TrigToken" in the card Abstruse Interference, while it was called "DBToken" in the card script (see abstruse_interference.txt, compared to brood_monitor.txt) - the code precasts the ability from its variable in the card script, and will look it up by name. I changed the puzzle to use this particular ability for all the cases (without calling Brood Monitor on top of that) - more explicit and also less prone to be breaking in case someone starts massively changing card script code ;)

- Agetian
Attachments
PC_10xx.tar.gz
(1.23 KiB) Downloaded 15 times
Agetian
Programmer
 
Posts: 3179
Joined: 14 Mar 2011, 05:58
Has thanked: 610 times
Been thanked: 416 times

Re: Puzzle Mode

Postby Agetian » 21 Aug 2017, 15:21

UPDATE: I added a simple Create Puzzle mode in desktop Forge, which basically presents you with a clean battlefield and allows you to use Dev Mode tools to add cards to zones. Then you can use Dump Game State to dump the resulting game state with a simple puzzle metadata template, such that you can then manually tweak/edit the puzzle objectives, description, name, etc. Also, Dev Mode feature set has been extended to include Add Card to Library, Add Card to Graveyard and Add Card to Exile for this purpose (as well as potentially other dev purposes, such as debugging). The new command Remove Card from Game can be used to completely remove a card from the game in case it was added by mistake or was created due to some trigger firing (but was not desired).

- Agetian
Agetian
Programmer
 
Posts: 3179
Joined: 14 Mar 2011, 05:58
Has thanked: 610 times
Been thanked: 416 times

Re: Puzzle Mode

Postby Xitax » 26 Aug 2017, 18:27

Perplexing Chimera (GatheringMagic.com) 100615 - Lost in the Crowd: works
Perplexing Chimera (GatheringMagic.com) 101315 - Inherit the Earth: works - but the game acts like Ondu Rising was cast if you attack.
Perplexing Chimera (GatheringMagic.com) 102015 - Tightrope: works
Last edited by Xitax on 26 Aug 2017, 19:02, edited 2 times in total.
Xitax
 
Posts: 805
Joined: 16 May 2010, 17:19
Has thanked: 129 times
Been thanked: 104 times

Re: Puzzle Mode

Postby Agetian » 26 Aug 2017, 18:38

Thanks! :) Ah, I thought it'd actually be the intended effect to have Ondu Rising precast. I'll try to make it such that only the Awaken part is resolved then :)
EDIT: Fixed :)

- Agetian
Agetian
Programmer
 
Posts: 3179
Joined: 14 Mar 2011, 05:58
Has thanked: 610 times
Been thanked: 416 times

Re: Puzzle Mode

Postby Xitax » 26 Aug 2017, 19:03

Woohoo :)

Perplexing Chimera (GatheringMagic.com) 102715 - This Is My Broomstick: works
Perplexing Chimera (GatheringMagic.com) 110315 - Challenge the Pack: works
Xitax
 
Posts: 805
Joined: 16 May 2010, 17:19
Has thanked: 129 times
Been thanked: 104 times

Re: Puzzle Mode

Postby Xitax » 26 Aug 2017, 20:13

Perplexing Chimera (GatheringMagic.com) 111015 - Indigestion: works
Perplexing Chimera (GatheringMagic.com) 111715 - Closing the Gap: works
Perplexing Chimera (GatheringMagic.com) 112415 - The Art of the Lie: works. Very tricky. Hopefully I added enough cards to libraries to prevent win/loss unintentionally
Xitax
 
Posts: 805
Joined: 16 May 2010, 17:19
Has thanked: 129 times
Been thanked: 104 times

Re: Puzzle Mode

Postby Agetian » 27 Aug 2017, 03:37

Thanks! :) All the puzzles you made so far have been integrated.

- Agetian
Agetian
Programmer
 
Posts: 3179
Joined: 14 Mar 2011, 05:58
Has thanked: 610 times
Been thanked: 416 times

Re: Puzzle Mode

Postby Xitax » 03 Sep 2017, 20:48

Perplexing Chimera (GatheringMagic.com) 120115 - But For Me, It Was Tuesday: Archenemy involving two protagonists, not appropriate for Forge.
Perplexing Chimera (GatheringMagic.com) 120815 - Mirror Images: Doesn't set up correctly. Urza's Incubator should choose type shapeshifter. Also tried to get Lazav to copy the Sanctum Gargoyle via "Lazav, Dimir Mastermind|ExecuteScript:LazavCopy->420".
Perplexing Chimera (GatheringMagic.com) 121515 - Lava's Labors Lost: Works, if substitute Fireball for Lava Burst (not in Forge)
Xitax
 
Posts: 805
Joined: 16 May 2010, 17:19
Has thanked: 129 times
Been thanked: 104 times

Re: Puzzle Mode

Postby Agetian » 04 Sep 2017, 04:36

Mirror Images: should now set up correctly (although Urza's Incubator has already been force-set to Shapeshifter, no matter what the player chooses; I added a descriptive comment about it - there's currently no way for me to override the choice box, sadly). Lazav will now correctly copy the Gargoyle using the standard targeting syntax.

Lava's Labors Lost: changed Fireball to Blaze since it seems closer to Lava Burst in function, is that OK?

Here are the scripts, please test to see that they still work:

PC_121515:
Code: Select all
# Once Lava Burst is implemented, Blaze can be replaced with Lava Burst
[metadata]
Name:Perplexing Chimera (GatheringMagic.com) 121515 - Lava's Labors Lost
URL:http://www.gatheringmagic.com/seanuy-121515-lavas-labors-lost/
Goal:Win
Turns:2
Difficulty:Hard
Description: Survive and win on your next turn.
[state]
ActivePlayer=AI
ActivePhase=COMBAT_DECLARE_ATTACKERS
HumanLife=4
AILife=6
humanhand=Vertigo; Sacred Boon; Blaze|Set:6ED
humangraveyard=
humanlibrary=Hematatite Talisman
humanbattlefield=Mountain|Set:IA; Mountain|Set:IA|Tapped; Mountain|Set:IA|Tapped; Plains|Set:IA; Plains|Set:IA; Plains|Set:IA|Tapped; Snow-Covered Mountain|Set:IA; Snow-Covered Forest|Set:IA; Phyrexian War Beast; Bestial Fury|Attaching:420; Phyrexian War Beast|Tapped|Id:420; Orcish Bloodpainter; Armor of Faith|Attaching:422; Blinking Spirit|Id:422; Darien, King of Kjeldor; Hematite Talisman
aibattlefield=Swamp|Set:IA; Swamp|Set:IA|Tapped; Swamp|Set:IA|Tapped; Forest|Set:IA; Forest|Set:IA; Forest|Set:IA|Tapped; Forest|Set:IA|Tapped; Snow-Covered Island|Set:IA; Fyndhorn Elves; Lim-Dul's Cohort; Phobian Phantasm|Attacking|Tapped; Surging Might|Attaching:424; Zombie Musher|Tapped|Attacking|Id:424; Deadly Insect|Tapped|Attacking; Surging Might|Attaching:426; Gorilla Berserkers|Tapped|Attacking|Id:426
aihand=
aigraveyard=
ailibrary=
aiexile=
PC_120815:
Code: Select all
[metadata]
Name:Perplexing Chimera (GatheringMagic.com) 120815 - Mirror Images
URL:http://www.gatheringmagic.com/seanuy-120815-mirror-images/
Goal:Win
Turns:1
Difficulty:Hard
Description:Win this turn. Urza's Incubator will be set to Shapeshifter type, no matter what you choose.
[state]
ActivePlayer=human
ActivePhase=main1
HumanLife=3
AILife=8
humanhand=Nameless Inversion; Gigantoplasm
humangraveyard=Riptide Shapeshifter; Dimir Doppelganger; Chimeric Staff
humanlibrary=
humanbattlefield=Island|Set:USG; Island|Set:USG; Island|Set:USG; Island|Set:USG; Island|Set:USG; Island|Set:USG; Swamp|Set:USG; Swamp|Set:USG; Swamp|Set:USG; Temple of Deceit; Reflecting Pool; Mothdust Changeling; Lazav, Dimir Mastermind|ExecuteScript:LazavCopy->420; Cairn Wanderer; Sol Ring; Urza's Incubator|ChosenType:Shapeshifter
aibattlefield=Plains|Set:USG|Tapped; Island|Set:USG|Tapped; Island|Set:USG|Tapped; Swamp|Set:USG|Tapped; Arcane Sanctum; Arcane Sanctum|Tapped; Urza's Tower|Set:8ED|Tapped; Urza's Power Plant|Set:8ED|Tapped; Urza's Power Plant|Set:8ED|Tapped; Urza's Mine|Set:8ED|Tapped; Sydri, Gavanic Genius; Sanctum Gargoyle; Shield of the Righteous|Attaching:420; Sanctum Gargoyle|Id:420; Solemn Simulacrum|Tapped; Salvage Titan|Tapped; Goblin Boom Keg; Sword of Kaldra; Spine of Ish Sah
aihand=
aigraveyard=
ailibrary=
aiexile=
- Agetian
Agetian
Programmer
 
Posts: 3179
Joined: 14 Mar 2011, 05:58
Has thanked: 610 times
Been thanked: 416 times

Re: Puzzle Mode

Postby Nigol » 04 Sep 2017, 21:18

I really like this Puzzle Mode, so I implemented the missing Possibility Storm (except that Bonus Max Damage). I only tested the solution of the first one, because I don't want to spoil the solutions for me. They all seem to work fine, but there might be some weird quirk of the engine I am not aware of.

The only problem I couldn't really solve was Hour of Devastation #06, since you need to know the top 2 cards in your library. I tried adding an ExecuteScript, but it asks you if you want to put cards in the graveyard.

Code: Select all
Grim Flayer|ExecuteScript:TrigDig
I also tried to emulate the aiprecast effect from Perplexing Chimera 101315, but I really don't know what I am doing here, checking the card Grim Flayer I don't know how to only Dig without requesting cards be put in the graveyard.

Code: Select all
humanprecast=Grim Flayer:AB#Dig
So the best I could do was just add a Preordain to the precast, it gives the chance to see the cards, but also it gives you the possibility to reorder them, which we don't want really. I would have liked to have an effect like Vizier of the Menagerie that always shows you the top card. Again looking at the card code I don't really know if it's possible to use this card to show the top card. The card doesn't include an sVar and we want the top 2 cards, not just the top one. Maybe a new keyword would be needed like |Revealed directly inside the library declaration.

Also while checking the already existing puzzles, I found a spelling mistake on the counters keyword in Pauper Puzzles #18, countres, should be counters, so the +1/+1 counter isn't being applied.

Code: Select all
Falkenrath Noble|Countres:P1P1=1;
Attachments
Possibility Storm AKH9 to HOU7.zip
(5.29 KiB) Downloaded 16 times
Last edited by Nigol on 05 Sep 2017, 00:54, edited 1 time in total.
Nigol
 
Posts: 15
Joined: 11 Jan 2012, 19:04
Has thanked: 2 times
Been thanked: 7 times

Re: Puzzle Mode

Postby Xitax » 04 Sep 2017, 21:36

Nigol wrote:since you need to know the top 2 cards in your library.
The way I had done this in the past was put the cards in the description so the player can read them at start. Anything else seems over complex.
Xitax
 
Posts: 805
Joined: 16 May 2010, 17:19
Has thanked: 129 times
Been thanked: 104 times

Re: Puzzle Mode

Postby Nigol » 04 Sep 2017, 21:45

Xitax wrote:The way I had done this in the past was put the cards in the description so the player can read them at start. Anything else seems over complex.
That is what I did, but not everyone knows exactly what Blur of Blades does just by looking at the name (I don't), at least with the preordain you get the chance to look at the card text, which if this was a normal game you would have had the time to look at it when Grim Flayer triggered.
Nigol
 
Posts: 15
Joined: 11 Jan 2012, 19:04
Has thanked: 2 times
Been thanked: 7 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 4 guests


Who is online

In total there are 4 users online :: 0 registered, 0 hidden and 4 guests (based on users active over the past 10 minutes)
Most users ever online was 279 on 11 Jul 2013, 22:03

Users browsing this forum: No registered users and 4 guests

Login Form