It is currently 16 Apr 2024, 20:00
   
Text Size

Puzzle Mode

Post MTG Forge Related Programming Questions Here

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

Re: Puzzle Mode

Postby Xitax » 27 Jul 2017, 22:32

I just ran across this other site with Perplexing Chimera MTG puzzles https://perplexingchimera.com/category/puzzles/ which is not the same as Sean Uy's blog http://www.gatheringmagic.com/category/puzzles/.
UPDATE: Apparently the puzzles started on the first site but continued on GatheringMagic. Which presents a bit of a problem with numbering as they started over with #1 after moving.

As for library cards on PC_07, the point of the puzzle is to guarantee a win on turn 3 in the current turn. So I'd give the AI a Shadow Rift (which allows AI to attack and win with Sea Monster if drawn on turn 2) and anything else such as Repentance (so AI can draw off the cantrip and not die). I'd give the human an Island to guarantee the next draw is not helpful. That should do it.
Xitax
 
Posts: 918
Joined: 16 May 2010, 17:19
Has thanked: 183 times
Been thanked: 133 times

Re: Puzzle Mode

Postby Agetian » 28 Jul 2017, 03:17

Ah, thanks for the info! I'll update PC_07 and also think of something regarding the naming scheme to differentiate Sean Uy's efforts from the newer PC puzzles :)

- Agetian
Agetian
Programmer
 
Posts: 3471
Joined: 14 Mar 2011, 05:58
Has thanked: 676 times
Been thanked: 561 times

Re: Puzzle Mode

Postby Xitax » 29 Jul 2017, 16:50

Perplexing Chimera #8 - Weapon of Choice: Works
Perplexing Chimera #9 - Devil's Due: Needs a way to put damage on a card
Perplexing Chimera #10 - Burning Bright: Needs a way to choose "red" for Iona. In testing AI chose "red" but we'd need a way to guarantee it.
Last edited by Xitax on 29 Jul 2017, 18:46, edited 2 times in total.
Xitax
 
Posts: 918
Joined: 16 May 2010, 17:19
Has thanked: 183 times
Been thanked: 133 times

Re: Puzzle Mode

Postby Agetian » 29 Jul 2017, 16:57

@ Xitax: I'll see if I can implement damage on card :) Do you have a file for PC#8?

- Agetian
Agetian
Programmer
 
Posts: 3471
Joined: 14 Mar 2011, 05:58
Has thanked: 676 times
Been thanked: 561 times

Re: Puzzle Mode

Postby Agetian » 29 Jul 2017, 17:05

UPDATE: It is now possible to define marked damage on cards in puzzles (use the tag "|Damage:X", where X is the amount of damage marked on the card, e.g. Wild Elephant|Damage:1 ).

Dump state/setup state should now also use this possibility.

- Agetian
Agetian
Programmer
 
Posts: 3471
Joined: 14 Mar 2011, 05:58
Has thanked: 676 times
Been thanked: 561 times

Re: Puzzle Mode

Postby Xitax » 29 Jul 2017, 19:21

Perplexing Chimera #8 - Weapon of Choice: Works
Perplexing Chimera #9 - Devil's Due: Unable to test ATM. There's a problem - the damage needs to be applied last otherwise creatures will die before the puzzle setup is complete. Also, for some reason the second creature enchantment never wants to attach automatically. I've tried changing the order in the file but no joy.
Perplexing Chimera #10 - Burning Bright: Needs a way to choose "red" for Iona. In testing AI chose "red" but we'd need a way to guarantee it.
Perplexing Chimera #11 - Now You See It: Works
Perplexing Chimera #12 - The Third Strider: Human must account for multiple AI plays, but AI will only play one way. Didn't code it because it doesn't seem like an appropriate puzzle for Forge.
Perplexing Chimera #13 (062315) - Darker Than Black: Human's Illusory Gains doesn't want to attach to AI's Pitiless Horde.

Note: Damage needs to be applied last after the field is set up and without triggering anything else that cares.
Puzzle mode should override phase stop settings and activate all while in this mode to avoid issues with skipped phases.
Setup has issues with card border colors of older sets.
Helpful - error report missing card (misspelling, etc.) instead of crash to help with troubleshooting?
Question: Naming the new Perplexing Chimera puzzles - after about #10, Sean named them "Perplexing Chimera 062315" and the like. The other PC puzzles included were from the older blog. Should the newer puzzles follow this convention?
Last edited by Xitax on 30 Jul 2017, 14:29, edited 1 time in total.
Xitax
 
Posts: 918
Joined: 16 May 2010, 17:19
Has thanked: 183 times
Been thanked: 133 times

Re: Puzzle Mode

Postby PikWik » 29 Jul 2017, 22:38

cannot thank you guys enough for these puzzles!

this has revitalized my urge to play MtG in a new way and is great fun to tinker with and try to solve.
im also glad you guys are working on implementing the gatheringmagic, chimera, and possibility storm puzzles, as those seem to be the best i could find.

where in the past i would be playing whatever AI compatible T2 and vintage/legacy decks i could find, this is like playing with a new deck everytime.
so, all i have to do is figure out how to solve the puzzle. brilliant!

seriously, you guys are beasts and i am forever grateful =D>
PikWik
 
Posts: 17
Joined: 07 Oct 2015, 19:02
Has thanked: 16 times
Been thanked: 1 time

Re: Puzzle Mode

Postby Agetian » 30 Jul 2017, 04:01

@ Xitax: Thanks a lot for these submissions! I'll take a look at how to improve the application of damage and also will see if I can improve the attachment of stuff. I'll keep you posted ;) (and yes, that kind of naming convention might be good to follow since it was used by the author).

- Agetian
Agetian
Programmer
 
Posts: 3471
Joined: 14 Mar 2011, 05:58
Has thanked: 676 times
Been thanked: 561 times

Re: Puzzle Mode

Postby Agetian » 30 Jul 2017, 08:31

UPDATE: Improved the robustness of card attachments. Should hopefully work better now, especially when enchanting cards belonging to a different player. Also, card damage is now applied in the very end and does not cause DamageDone triggers to happen.

I updated the code for PC_09 a little bit - the card IDs were a bit off (there were two pairs of cards with the same ID). Also, set "turns" to 2 since you need to win on your next turn and not on the AI's turn (which is the first turn). Damage seems to be applied correctly now, but please test this to see if it actually works ;) Here's my updated code for the puzzle:

Code: Select all
[metadata]
Name:Perplexing Chimera (GatheringMagic.com) #09 - Devil's Due
URL:http://www.gatheringmagic.com/seanuy-052615-perplexing-chimera-devils-due/
Goal:Win
Turns:2
Difficulty:Hard
Description:Win on your next turn.  AI has Evincar's Justice in hand.
[state]
ActivePlayer=AI
ActivePhase=Main2
HumanLife=1
AILife=5
humanhand=Burst of Energy; Last Breath; Victimize; Spinning Darkness
humanbattlefield=Plains|Set:ZEN; Plains|Set:ZEN; Plains|Set:ZEN; Plains|Set:ZEN|Tapped; Swamp|Set:ZEN; Swamp|Set:ZEN|Tapped; Sengir Bats|Id:421|Damage:2; Necromancer's Magemark|Attaching:421; Mosquito Guard|Id:422|Damage:2; Krovikan Fetish|Attaching:422; Kithkin Spellduster|Damage:2; Archdemon of Greed|Tapped|Transformed|Damage:2; Soul Net; Aeolipile
humangraveyard=Venerable Monk; Flickering Spirit
humanlibrary=Soul Net
aihand=Evincar's Justice
aibattlefield=Swamp|Set:ZEN|Tapped; Swamp|Set:ZEN|Tapped; Swamp|Set:ZEN|Tapped; Swamp|Set:ZEN|Tapped; Forest|Set:ZEN|Tapped; Forest|Set:ZEN|Tapped; Forest|Set:ZEN|Tapped; Tainted Wood|Tapped; Raking Canopy
aigraveyard=
ailibrary=
UPDATE 2: It is now possible to define the chosen color and chosen type for cards (with the syntax "|ChosenColor:color" and "|ChosenType:type"), would be useful for something like Iona in that puzzle where the choice has to be red (so, "|ChosenColor:red" would be viable there). This currently has a caveat that the message box with the AI choice will still appear, and may show something else if the AI chooses something else, but the final chosen value will be set to whatever it is defined in the game state. Removing the AI choice would require a way to temporarily suppress ETB triggers or something like that, I think; will need to think about it. Note that it's not critical for that puzzle with Iona, because the current AI will always pick red for it anyway since red permanents are the most prevalent on the battlefield.

UPDATE 3: The game will no longer hard-crash if there's a misspelled card in the puzzle. It will report the illegal card name in the console instead.

Can you give an example demonstrating the issue with the old cards and border color? I can try to see if that's easy enough to fix.

- Agetian
Agetian
Programmer
 
Posts: 3471
Joined: 14 Mar 2011, 05:58
Has thanked: 676 times
Been thanked: 561 times

Re: Puzzle Mode

Postby Xitax » 30 Jul 2017, 13:06

Yes, thanks very much for the development lately! They still do dailys? If not I can wait until next beta release to test puzzles that require new features.

The bug with card borders is different than what I thought. Computer chose the sets for this puzzle. The Force of Nature is supposed to be 9ED, but it's using a LEB photo.
Attachments
example.jpg
Last edited by Xitax on 30 Jul 2017, 14:42, edited 2 times in total.
Xitax
 
Posts: 918
Joined: 16 May 2010, 17:19
Has thanked: 183 times
Been thanked: 133 times

Re: Puzzle Mode

Postby Xitax » 30 Jul 2017, 14:34

I went back through the puzzles and made updates and renamed.

In theory they should all work - the only exception Perplexing Chimera (GatheringMagic.com) 041415 - Plans Within Plans needs a way to mark Suspension Field remembering Mistfire Adept.
Last edited by Xitax on 02 Aug 2017, 02:02, edited 1 time in total.
Xitax
 
Posts: 918
Joined: 16 May 2010, 17:19
Has thanked: 183 times
Been thanked: 133 times

Re: Puzzle Mode

Postby Agetian » 30 Jul 2017, 14:57

Thanks!

Yep, Suspension Field is currently a bit tricky since it creates an effect with custom script code and remembers the card on that effect, not even on the field itself :/ I'll try to think of something eventually though. :) Maybe I'll be able to force the SA to activate with a specific target, thus going through the entire routine...

And about the snapshots - yep, you can grab a nightly from here:
https://snapshots.cardforge.org/

(also, the command "b!latest" on our Discord server will provide you with a direct link to the latest snapshot :))

- Agetian
Agetian
Programmer
 
Posts: 3471
Joined: 14 Mar 2011, 05:58
Has thanked: 676 times
Been thanked: 561 times

Re: Puzzle Mode

Postby Xitax » 30 Jul 2017, 17:44

Hey I noticed that the effect is also in the dump, so I copied it to the puzzle file. If the effect imports correctly, then can I put something in the effect?
Xitax
 
Posts: 918
Joined: 16 May 2010, 17:19
Has thanked: 183 times
Been thanked: 133 times

Re: Puzzle Mode

Postby Agetian » 30 Jul 2017, 19:41

Ah, that's the issue (and the difficulty) - it'll end up being an empty effect, without the appropriate script code that is placed on it when the card ETBs :/

- Agetian
Agetian
Programmer
 
Posts: 3471
Joined: 14 Mar 2011, 05:58
Has thanked: 676 times
Been thanked: 561 times

Re: Puzzle Mode

Postby drdev » 30 Jul 2017, 20:09

Keep up the great work guys. Just tried this mode out for the first time. Really fun.
drdev
Programmer
 
Posts: 1958
Joined: 27 Jul 2013, 02:07
Has thanked: 189 times
Been thanked: 565 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 31 guests


Who is online

In total there are 31 users online :: 0 registered, 0 hidden and 31 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 31 guests

Login Form