It is currently 19 Jul 2018, 23:22
   
Text Size

Puzzle Mode

Post MTG Forge Related Programming Questions Here

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

Re: Puzzle Mode

Postby Agetian » 20 Dec 2017, 04:28

Thanks, Xitax!
Committed the puzzles reported as working. Still need to find time to look into that precast issue, will commit the other two once I get it sorted out. :)

- Agetian
Agetian
Programmer
 
Posts: 3253
Joined: 14 Mar 2011, 05:58
Has thanked: 624 times
Been thanked: 457 times

Re: Puzzle Mode

Postby Agetian » 21 Dec 2017, 06:15

Ok, I committed r36152 which fixes the Precast thing (the problem was with the absence of whitespace trimming, which only made it possible to add two or more precasts if there was no whitespace between them. Now it's possible to have the whitespace and it's correctly ignored).

Also, added a new parameter "NoETBTrigs" which allows to set up a card in such a way that its normal (automatic) ETB triggers and replacement effects are ignored (improves Clone in PC_122915, allows certain cards such as Sacred Foundry not to be obnoxious/confusing/potentially puzzle-breaking when entering the battlefield). This should actually *probably* be the default behavior for puzzles, although I was a bit scared of just changing the default behavior since I'm afraid it may break something, and my time is still quite scarce for more thorough debugging/testing...

Link to the commit:
http://svn.slightlymagic.net/websvn/rev ... &peg=36152

- Agetian
Agetian
Programmer
 
Posts: 3253
Joined: 14 Mar 2011, 05:58
Has thanked: 624 times
Been thanked: 457 times

Re: Puzzle Mode

Postby Xitax » 21 Dec 2017, 14:13

Thanks! That will be very useful for most cases. There is one case just recently when I wanted the ETB effect of Living Lore to exile the one card I put in the graveyard to set up the game state. That's the only example I can think of. I think making it default so you only need to tag cards as an exception would be fine, but it's ok either way around.

Could you please explain how this makes the Clone thing work right? I'm confused because Clone is an ETB effect. I put a target in the puzzle script, and w/o this tag the game would ask you for a target while setting up the puzzle. If you picked a different target, Clone would become that, but if you said "no" then it would work as intended.
Xitax
 
Posts: 828
Joined: 16 May 2010, 17:19
Has thanked: 141 times
Been thanked: 108 times

Re: Puzzle Mode

Postby Agetian » 21 Dec 2017, 20:04

Xitax wrote:Thanks! That will be very useful for most cases. There is one case just recently when I wanted the ETB effect of Living Lore to exile the one card I put in the graveyard to set up the game state. That's the only example I can think of. I think making it default so you only need to tag cards as an exception would be fine, but it's ok either way around.

Could you please explain how this makes the Clone thing work right? I'm confused because Clone is an ETB effect. I put a target in the puzzle script, and w/o this tag the game would ask you for a target while setting up the puzzle. If you picked a different target, Clone would become that, but if you said "no" then it would work as intended.
No problem!
And with this tag, Clone would skip the "ask the player for a target" part (basically, the auto-ETB part that normally fires), and will then run the scripted part only (which will basically perform the same function as the ETB effect, only in a user-controlled fashion). Hopefully this makes sense. :) And at least I hope that's how it'll function, I ran some simple tests and it looked fine, but let me know if something is wrong with it. :)

Or maybe it's easier to understand it this way: with the NoETBTrigs flag, the card doesn't actually try to ETB (and thus skips all the questions to the player and whatnot). Instead, the card is just placed on the battlefield as if it has already ETBed at some point in time earlier, and the only things that are set up for it are the things that you define in the puzzle file by yourself (so, if you call the clone script with a user-defined target, that will certainly run).

- Agetian
Agetian
Programmer
 
Posts: 3253
Joined: 14 Mar 2011, 05:58
Has thanked: 624 times
Been thanked: 457 times

Re: Puzzle Mode

Postby Ikeda » 27 Dec 2017, 02:26

Okay, here's the suite of three tutorial puzzles I've been working on. My apologies for the delay - it's been a busy few months!

This set of puzzles should cover the following three points:

1. Look for evasive abilities.
2. Count your available mana.
3. Ask why the cards are relevant.

Puzzles 1 and 2 are new, while the original tutorial puzzle I put together has been re-purposed as Puzzle 3. I'm fairly certain that I have the solutions right, but I'd gladly make some adjustments if someone points out any errors.
Attachments
forge_tutorials.zip
(2.62 KiB) Downloaded 31 times
Ikeda
 
Posts: 5
Joined: 11 Jun 2017, 05:58
Has thanked: 0 time
Been thanked: 4 times

Re: Puzzle Mode

Postby Agetian » 27 Dec 2017, 06:52

Thanks, Ikeda! Added them upstream.

- Agetian
Agetian
Programmer
 
Posts: 3253
Joined: 14 Mar 2011, 05:58
Has thanked: 624 times
Been thanked: 457 times

Re: Puzzle Mode

Postby Agetian » 02 Jan 2018, 06:50

Would anyone be willing to try their hand at coding the Possibility Storm puzzles for the Ixalan season, as well as Iconic Masters (there's one for IMA)?

http://www.possibilitystorm.com/ (check out post 041 and below)

- Agetian
Agetian
Programmer
 
Posts: 3253
Joined: 14 Mar 2011, 05:58
Has thanked: 624 times
Been thanked: 457 times

Re: Puzzle Mode

Postby Xitax » 07 Jan 2018, 20:08

Here you go. Solutions untested.
Attachments
PS_XLN_IMA.zip
(5.26 KiB) Downloaded 25 times
Xitax
 
Posts: 828
Joined: 16 May 2010, 17:19
Has thanked: 141 times
Been thanked: 108 times

Re: Puzzle Mode

Postby Agetian » 08 Jan 2018, 12:55

Xitax wrote:Here you go. Solutions untested.
Thanks a lot, Xitax! :) Will integrate upstream.
(btw, feel free to join in on our new Git-based development system which should allow you to submit merge requests for your contributions directly, too ;))

- Agetian
Agetian
Programmer
 
Posts: 3253
Joined: 14 Mar 2011, 05:58
Has thanked: 624 times
Been thanked: 457 times

Re: Puzzle Mode

Postby Agetian » 09 Apr 2018, 09:07

Rivals of Ixalan Possibility Storm puzzles are currently available on the Git (as a merge request), pending integration.

- Agetian
Agetian
Programmer
 
Posts: 3253
Joined: 14 Mar 2011, 05:58
Has thanked: 624 times
Been thanked: 457 times

Previous

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 5 guests


Who is online

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

Login Form