It is currently 16 Apr 2024, 22:14
   
Text Size

Puzzle Mode

Post MTG Forge Related Programming Questions Here

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

Re: Puzzle Mode

Postby Agetian » 08 Aug 2017, 03:40

Ok, I updated the combat code such that the "attackers declared" and "attacks" triggers will properly run when the attackers are declared (the +1/+1 buff triggers should now go on stack). Also, added support for Renown (via the "|Renowned" tag). Not sure if anything else is now missing for the puzzle. Seeing its code would help in testing the initial setup. Btw, not sure if this is necessary, but I may actually make the attack triggers auto-resolve (which may or may not be desired, not sure :/ ).

Btw, can you please upload 072815 too (which I think you meant to upload yesterday but didn't - you uploaded another puzzle twice instead)? ;)

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

Re: Puzzle Mode

Postby Xitax » 10 Aug 2017, 01:55

Perplexing Chimera (GatheringMagic.com) 072815 - Come Undone
Perplexing Chimera (GatheringMagic.com) 072115 - Stand Against the Waves: With new attacking code, works!
Perplexing Chimera (GatheringMagic.com) 081815 - Broken Dreams: Works.
Last edited by Xitax on 16 Aug 2017, 00:56, 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 » 10 Aug 2017, 04:07

Nice, thanks a lot! :) Added upstream.

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

Re: Puzzle Mode

Postby friarsol » 10 Aug 2017, 04:15

Anyone interested in transcribing the Inquest Do X before you lose puzzles?

https://www.reddit.com/r/magicTCG/comme ... d_puzzles/
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Puzzle Mode

Postby Xitax » 10 Aug 2017, 04:22

Oops, had to fix some cosmetic things on PC_072115. :/
Xitax
 
Posts: 918
Joined: 16 May 2010, 17:19
Has thanked: 183 times
Been thanked: 133 times

Re: Puzzle Mode

Postby Agetian » 10 Aug 2017, 05:48

PC_072115 improvements are now upstream :)

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

Re: Puzzle Mode

Postby Agetian » 10 Aug 2017, 05:50

friarsol wrote:Anyone interested in transcribing the Inquest Do X before you lose puzzles?

https://www.reddit.com/r/magicTCG/comme ... d_puzzles/
Hehe these are interesting! The conditions like "bring X into play before the end of turn" should be doable with some goal card logic extensions :)

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

Re: Puzzle Mode

Postby Xitax » 14 Aug 2017, 22:12

Perplexing Chimera (GatheringMagic.com) 082515 - Righteous Indignation: Works.
Perplexing Chimera (GatheringMagic.com) 090115 - The Writing on the Wall: Doesn't work due to a Forge bug. When a creature enchanted with Grasp of the Hieromancer is stolen via Willbreaker, the tap trigger fails. AI also doesn't block optimally to avoid Kothophed triggers, so the puzzle is a little easier than intended. Meh.
Last edited by Xitax on 16 Aug 2017, 00:57, 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 » 15 Aug 2017, 04:14

Xitax wrote:Perplexing Chimera (GatheringMagic.com) 082515 - Righteous Indignation: Works.
Perplexing Chimera (GatheringMagic.com) 090115 - The Writing on the Wall: Doesn't work due to a Forge bug. When a creature enchanted with Grasp of the Hieromancer is stolen via Willbreaker, the tap trigger fails. AI also doesn't block optimally to avoid Kothophed triggers, so the puzzle is a little easier than intended. Meh.
Thanks for your effort, as always! :)
I think I fixed Grasp of the Hieromancer upstream, can you please check if the puzzle works correctly now? If it was a different issue, please explain in detail which part doesn't work and how it should work, and I'll try to fix it ;)
EDIT: Retested it myself, looks like it works now (at least as much as the current Forge AI allows it to).

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

Re: Puzzle Mode

Postby Xitax » 16 Aug 2017, 00:19

Yup, it works now. :)

Perplexing Chimera (GatheringMagic.com) 090815 - Blood Will Run: Works
Perplexing Chimera (GatheringMagic.com) 091515 - The Bigger They Are: Works
Perplexing Chimera (GatheringMagic.com) 092215 - Queen's Gambit: Bug prevents testing. When Firemaw Kavu equipped with Silverskin Armor is sacrificed to Krark-Clan Stoker, Dross Scorpion trigger fails to trigger.
Xitax
 
Posts: 918
Joined: 16 May 2010, 17:19
Has thanked: 183 times
Been thanked: 133 times

Re: Puzzle Mode

Postby Agetian » 16 Aug 2017, 04:54

Thanks! :) Added PC_090815 and PC_091515.
I tried to fix the bug for PC_092215 upstream - can you please retest it?

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

Re: Puzzle Mode

Postby Xitax » 17 Aug 2017, 01:24

Perplexing Chimera (GatheringMagic.com) 092215 - Queen's Gambit: Works now! :) With an important small change...
Perplexing Chimera (GatheringMagic.com) 092915 - Push It: Works. AI only chooses to block the same creature each time, though. Oh well.
Perplexing Chimera (GatheringMagic.com) 100615 - Lost in the Crowd: Might work. Dump game state doesn't dump Eldrazi Scion ability so not sure how to template it.
Xitax
 
Posts: 918
Joined: 16 May 2010, 17:19
Has thanked: 183 times
Been thanked: 133 times

Re: Puzzle Mode

Postby Agetian » 17 Aug 2017, 03:45

Nice, thanks! :) I'll take a look at the Eldrazi Scion thing soon ;) Maybe it'll work via some script/precast trickery, I'll let you know.

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

Re: Puzzle Mode

Postby Agetian » 17 Aug 2017, 06:10

UPDATE: It's now possible to specify particular script lines to call when precasting spells. This allows to, for example, generate tokens from abilities of specific cards such that they're preconfigured correctly. To specify a particular SVar to call, use the "card_name:SVar_name" syntax. For instance, to generate two Eldrazi Scion tokens, it's possible to use:

Code: Select all
AIPrecast=Brood Monitor:TrigToken;Brood Monitor:TrigToken
(this will call the TrigToken script line in Brood Monitor twice with the AI as the spell ability controller, thus spawning two Eldrazi Scion tokens).

To generate 5 Eldrazi Spawn tokens for human, it's possible to use:
Code: Select all
HumanPrecast=Skittering Invasion
Note that no script line is specified via ":", because it's the main spell ability of the card, which is automatically precast.

Also, for cards with multiple spell abilities, it's possible to reference them by their ordinal number and precast them that way (if they're not on a SVar). For example, it's possible to precast planeswalker abilities that way. To do that, specify the ordinal number of the spell ability instead of the SVar name. The following code will make the AI precast Gideon of The Trials's ultimate (3rd) ability, and then the 1st ability (damage prevention) targeting a card with ID 100:

Code: Select all
AIPrecast=Gideon of the Trials:3;Gideon of the Trials:1->100
No triggers will be run during this operation, and no additional cards will be placed anywhere (in the graveyard, exile, or elsewhere).

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

Re: Puzzle Mode

Postby Xitax » 20 Aug 2017, 17:50

Perplexing Chimera (GatheringMagic.com) 100615 - Lost in the Crowd: This file doesn't want to generate the right number of tokens. There should be 1 on human side and 5 on AI.
Perplexing Chimera (GatheringMagic.com) 101315 - Inherit the Earth: If it's possible to precast Ondu Rising targeting a Mountain I didn't figure it out.
Xitax
 
Posts: 918
Joined: 16 May 2010, 17:19
Has thanked: 183 times
Been thanked: 133 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 42 guests


Who is online

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

Login Form