Puzzle Mode
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Puzzle Mode
by Agetian » 05 Sep 2017, 03:40
Ok, here's a new feature for Puzzle Mode:
It's now possible to precast a custom script line. For example, the following definition will make the game reveal the 2 top cards of the library to you without moving them:
ANY_VALID_CARD_NAME:CustomScript:SCRIPT_LINE
Where ANY_VALID_CARD_NAME is a legal name of a card supported in Forge, and SCRIPT_LINE is a custom script line in the Forge card script language.
Not sure if it'll be useful for anything outside of this "reveal cards" thing, but maybe there might be some other use for it, who knows.
- Agetian
It's now possible to precast a custom script line. For example, the following definition will make the game reveal the 2 top cards of the library to you without moving them:
- Code: Select all
humanprecast=Preordain:CustomScript:DB$ Dig | DigNum$ 2 | DestinationZone$ Library | LibraryPosition$ 0 | LibraryPosition2$ 0 | NoMove$ True
- Code: Select all
humanprecast=Fireball:CustomScript:DB$ Dig | DigNum$ 2 | DestinationZone$ Library | LibraryPosition$ 0 | LibraryPosition2$ 0 | NoMove$ True
ANY_VALID_CARD_NAME:CustomScript:SCRIPT_LINE
Where ANY_VALID_CARD_NAME is a legal name of a card supported in Forge, and SCRIPT_LINE is a custom script line in the Forge card script language.
Not sure if it'll be useful for anything outside of this "reveal cards" thing, but maybe there might be some other use for it, who knows.
- Agetian
- Agetian
- Programmer
- Posts: 3472
- Joined: 14 Mar 2011, 05:58
- Has thanked: 677 times
- Been thanked: 561 times
Re: Puzzle Mode
by Xitax » 06 Sep 2017, 18:55
Perplexing Chimera (GatheringMagic.com) 120815 - Mirror Images: File bug fixed. However Lazav dies for some reason after copying Sydri who died to Nameless Inversion.
Perplexing Chimera (GatheringMagic.com) 121515 - Lava's Labors Lost: OK!
Perplexing Chimera (GatheringMagic.com) 121515 - Lava's Labors Lost: OK!
Re: Puzzle Mode
by Agetian » 06 Sep 2017, 19:10
Thanks! I'll take a look at what's happening to Lazav tomorrow.
EDIT: Ah, actually, I see what's wrong, but I'm not sure if that was done intentionally for some purpose or by mistake... basically, Lazav is set to copy the card based on its LKI (last known information). So, if you cast Nameless Inversion on a card and it dies to it, Lazav will copy it with the modified P/T (essentially, 5/-1 for that creature you mentioned or whatever). It's easily fixed by replacing this part of the copy trigger:
Defined$ TriggeredCardLKICopy
With this:
Defined$ TriggeredCard
Which essentially copies the card in its pristine form without any changes in the LKI. However, I have no idea how to figure out whether that LKI is actually useful for anything or not... :/ Any opinions on that?
- Agetian
EDIT: Ah, actually, I see what's wrong, but I'm not sure if that was done intentionally for some purpose or by mistake... basically, Lazav is set to copy the card based on its LKI (last known information). So, if you cast Nameless Inversion on a card and it dies to it, Lazav will copy it with the modified P/T (essentially, 5/-1 for that creature you mentioned or whatever). It's easily fixed by replacing this part of the copy trigger:
Defined$ TriggeredCardLKICopy
With this:
Defined$ TriggeredCard
Which essentially copies the card in its pristine form without any changes in the LKI. However, I have no idea how to figure out whether that LKI is actually useful for anything or not... :/ Any opinions on that?
- Agetian
- Agetian
- Programmer
- Posts: 3472
- Joined: 14 Mar 2011, 05:58
- Has thanked: 677 times
- Been thanked: 561 times
Re: Puzzle Mode
by Xitax » 07 Sep 2017, 00:58
What's in the LKI info? It should never copy current P/T. If something were copying an activated Chimeric Staff, for example, it would come into play as just an artifact, not an X/X creature.
Re: Puzzle Mode
by Agetian » 07 Sep 2017, 03:17
Basically, LKI contains a copy of the card as it was when it left the battlefield, including any P/T modifications, type/subtype changes, etc. If a card was modified in any way as it left the battlefield, then those modifications should be reflected in the LKI, as far as I know. Thus, cards that care about those modifications generally use the LKI (e.g. cards with triggers that say "whenever <a creature> dies, it deals X damage, where X is equal to its power" can use LKI to identify the exact power of the creature when it died - e.g., Nameless Inversion would have given the creature +3 power bonus right at the same time as it died to the toughness debuff, and you're interested in that modified power, not in the pristine power as written on the card).
This is kind of difficult for me to apply to Lazav - it *seems* that it only cares about the pristine state of the card as it copies it, but there might be some tricky interactions that I'm unaware of (e.g. what should happen if something dies that is only temporarily a creature, e.g. until end of turn or something)?
- Agetian
This is kind of difficult for me to apply to Lazav - it *seems* that it only cares about the pristine state of the card as it copies it, but there might be some tricky interactions that I'm unaware of (e.g. what should happen if something dies that is only temporarily a creature, e.g. until end of turn or something)?
- Agetian
- Agetian
- Programmer
- Posts: 3472
- Joined: 14 Mar 2011, 05:58
- Has thanked: 677 times
- Been thanked: 561 times
Re: Puzzle Mode
by brujon » 08 Sep 2017, 03:26
Hi! First i just wanted to say, i'm really enjoying Forge. Puzzle Mode is really helping me get back into the game and making me think my moves properly, getting rust off of old gears and bringing me up to speed in rules-knowledge.
That said, i thought i'd register primarily to make a contribution:
On Pauper Puzzle #3 (Gnarly Plays) there's an unintended solution.
Again, TY to all the people that make this awesome piece of software!
That said, i thought i'd register primarily to make a contribution:
On Pauper Puzzle #3 (Gnarly Plays) there's an unintended solution.
- Pauper Puzzle #3 Solution Spoilers | Open
- So, the intended solution is to play Aura Mancer, getting Abundant Growth from Graveyard, playing it on a forest, dredge, cast Sign in Blood on yourself, getting Lunarch Mantle which you cast on Aura Gnarlid, sac Auramancer to give Gnarly flying, cast Hunger of the Howlpack making him a 9/9 and swing.
However, the Opponent has no library, meaning you can skip everything after getting Abundant Growth since you can just tap a swamp and whatever land you enchanted with Abundant Growth for 2B and target your opponent with Sign in Blood, forcing him to draw on an empty library and nabbing the win.
Giving the opponent 2 cards in his library will fix this unintended solution, and make it so you have to think a little bit more to get the win.
Again, TY to all the people that make this awesome piece of software!
Re: Puzzle Mode
by Xitax » 09 Sep 2017, 15:13
706.2. When copying an object, the copy acquires the copiable values of the original objects characteristics and, for an object on the stack, choices made when casting or activating it (mode, targets, the value of X, whether it was kicked, how it will affect multiple targets, and so on). The copiable values are the values derived from the text printed on the object (that text being name, mana cost, color indicator, card type, subtype, supertype, rules text, power, toughness, and/or loyalty), as modified by other copy effects, by as . . . enters the battlefield and as . . . is turned face up abilities that set characteristics, and by abilities that caused the object to be face down. Other effects (including type-changing and text-changing effects), status, and counters are not copied. Example: Chimeric Staff is an artifact that reads X: Chimeric Staff becomes an X/X artifact creature until end of turn. Clone is a creature that reads, You may have Clone enter the battlefield as a copy of any creature on the battlefield. After a Staff has become a 5/5 artifact creature, a Clone enters the battlefield as a copy of it. The Clone is an artifact, not a 5/5 artifact creature. (The copy has the Staffs ability, however, and will become a creature if that ability is activated.) Example: Clone enters the battlefield as a copy of a face-down Grinning Demon (a creature with morph 2BB). The Clone is a colorless 2/2 creature with no name, no types, no abilities, and no mana cost. It will still be face up. Its controller cant pay 2BB to turn it face up.
Yes there could be issues. Such as with morphed creatures. Mostly the case is it should copy the original card and it's self-gained abilities. But what is the purpose of LKI knowing the P/T and temporary effects? What card would ever copy them?
Yes there could be issues. Such as with morphed creatures. Mostly the case is it should copy the original card and it's self-gained abilities. But what is the purpose of LKI knowing the P/T and temporary effects? What card would ever copy them?
Re: Puzzle Mode
by Agetian » 09 Sep 2017, 15:43
Well, for Lazav, Morphs shouldn't matter since the card already goes to graveyard by then and is flipped face up; thus, the original state will be copied and not the face-down state.
As for other cards such as Clone, I don't think they would use LKI for the purpose of copying the object (just checked the script for Clone and, indeed, it doesn't use LKI).
LKI is just that - last known information - thus, it needs to contain absolutely everything about the card as it was last known when, for instance, it left the battlefield (including P/T and temporary effects). Thus, the question is not whether LKI should contain that kind of information (it should), the question is - should a particular card use LKI in order to achieve whatever it's trying to achieve or not.
For example, a card that would deal damage equal to the power of the card that dies would need to use LKI in order to obtain information about possible power modifiers. However, a card such as Clone would not need to use it since it copies the original card, without any modifications.
(And indeed, I just tested the interaction of Clone and Chimeric Staff and it works exactly as described in the rule).
I'm assuming then that Lazav would be the same and, thus, would not need to use LKI for whatever it's trying to do?
- Agetian
As for other cards such as Clone, I don't think they would use LKI for the purpose of copying the object (just checked the script for Clone and, indeed, it doesn't use LKI).
LKI is just that - last known information - thus, it needs to contain absolutely everything about the card as it was last known when, for instance, it left the battlefield (including P/T and temporary effects). Thus, the question is not whether LKI should contain that kind of information (it should), the question is - should a particular card use LKI in order to achieve whatever it's trying to achieve or not.
![Smile :)](./images/smilies/icon_smile.gif)
(And indeed, I just tested the interaction of Clone and Chimeric Staff and it works exactly as described in the rule).
I'm assuming then that Lazav would be the same and, thus, would not need to use LKI for whatever it's trying to do?
- Agetian
- Agetian
- Programmer
- Posts: 3472
- Joined: 14 Mar 2011, 05:58
- Has thanked: 677 times
- Been thanked: 561 times
Re: Puzzle Mode
by Nigol » 10 Sep 2017, 00:19
Attached is the latest Possibility Storm - Hour of Devastation #08
- Attachments
-
PS_HOU8.zip
- (599 Bytes) Downloaded 555 times
Re: Puzzle Mode
by Xitax » 10 Sep 2017, 01:09
Perplexing Chimera (GatheringMagic.com) 120815 - Mirror Images: Works now!
Tricky!
![Smile :)](./images/smilies/icon_smile.gif)
- Agetian
- Programmer
- Posts: 3472
- Joined: 14 Mar 2011, 05:58
- Has thanked: 677 times
- Been thanked: 561 times
Re: Puzzle Mode
by Xitax » 11 Sep 2017, 00:08
Perplexing Chimera (GatheringMagic.com) 122215 - Stocking Stuffer: Works. Sub'd a vanilla 3/3 artifact for Stocking Tiger since it isn't needed for the solution.
- Attachments
-
PC_122215.zip
- (859 Bytes) Downloaded 568 times
Re: Puzzle Mode
by Agetian » 11 Sep 2017, 04:33
Thanks, Xitax!
We're now officially at 100 puzzles![Smile :)](./images/smilies/icon_smile.gif)
- Agetian
We're now officially at 100 puzzles
![Smile :)](./images/smilies/icon_smile.gif)
- Agetian
- Agetian
- Programmer
- Posts: 3472
- Joined: 14 Mar 2011, 05:58
- Has thanked: 677 times
- Been thanked: 561 times
Re: Puzzle Mode
by Agetian » 29 Sep 2017, 05:25
- Agetian
- Programmer
- Posts: 3472
- Joined: 14 Mar 2011, 05:58
- Has thanked: 677 times
- Been thanked: 561 times
Who is online
Users browsing this forum: No registered users and 92 guests