Incorrect Scripts
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Incorrect Scripts
by timmermac » 07 Feb 2012, 04:47


"I just woke up, haven't had coffee, let alone a pee in 7 days, and I find out you stole my ass and made a ...mini-me! Carter, I should be irked currently, yes?" - Jack O'Neill
Re: Incorrect Scripts
by jeffwadsworth » 07 Feb 2012, 05:06
That is obvious. My concern was choice. As scripted, you have none.timmermac wrote:#-o What I mean is that there's no way to get the Dragon out without having to sacrifice the mountains. Who wouldn't want a 5/5 flier for 2RR with the only drawback being having to sac a couple of Mountains?
- jeffwadsworth
- Super Tester Elite
- Posts: 1172
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 70 times
Re: Incorrect Scripts
by Sloth » 07 Feb 2012, 06:34
We could add an "Optional" parameter to AF Sacrifice. I don't think it will be hard to code.jeffwadsworth wrote:.Rathi Dragon. What if you do not wish to sacrifice the mountains?
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Incorrect Scripts
by timmermac » 07 Feb 2012, 07:10
I just tested the script as of r13864. I made a deck with 20 mountains, 4 of each Mox and 4x Rathi Dragon. If you try to play a Rathi Dragon with only one mountain in play, the mountain gets sacrificed, and since I didn't have another mountain, the dragon didn't come out. There's no option to cancel once you're at the stage where you sacrifice the mountains. Is that the part that's causing concern? If it is, I'm not sure that it's that big of a problem. I'm going to take the script and add it to the cardsfolder in the non-Eclipsed version on my computer, since I've been wanting to see this card in Forge for a long time.
"I just woke up, haven't had coffee, let alone a pee in 7 days, and I find out you stole my ass and made a ...mini-me! Carter, I should be irked currently, yes?" - Jack O'Neill
Re: Incorrect Scripts
by Chris H. » 07 Feb 2012, 11:54
timmermac wrote:I just tested the script as of r13864.
`timmermac wrote:I'm going to take the script and add it to the cardsfolder in the non-Eclipsed version on my computer
There is a Maven command that Eclipse can use to create an archive of the Forge project and this archive will be located on you /ForgeSVN/target/ folder.
There should be instructions on the getting started wiki to help explain how to set this up. I can give additional help if you need it.
I like to keep an up-to-date copy of Forge outside of my Eclipse project for playing Forge.

-
Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: Incorrect Scripts
by friarsol » 07 Feb 2012, 13:01
I'm not sure why Unless Costs are trying to be pushed through with the current structure, Sloth and I have both stated that they couldn't be done at this time.
I don't really like the idea of adding an Optional parameter either. That would mean each "Cost" would need to have an optional parameter instead of just waiting for the Unless Cost work to be finished.
I don't really like the idea of adding an Optional parameter either. That would mean each "Cost" would need to have an optional parameter instead of just waiting for the Unless Cost work to be finished.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Incorrect Scripts
by Sloth » 07 Feb 2012, 14:13
The current implementation of the unless cost is very complicated and i don't think i will implement it for non-mana costs any time soon. Adding the optional parameter on the other hand was really easy and the scripts work fine.friarsol wrote:I'm not sure why Unless Costs are trying to be pushed through with the current structure, Sloth and I have both stated that they couldn't be done at this time.
I don't really like the idea of adding an Optional parameter either. That would mean each "Cost" would need to have an optional parameter instead of just waiting for the Unless Cost work to be finished.
Example:
- | Open
- Code: Select all
Name:Rogue Elephant
ManaCost:G
Types:Creature Elephant
Text:no text
PT:3/3
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigSac | TriggerDescription$ When CARDNAME enters the battlefield, sacrifice it unless you sacrifice a Forest.
SVar:TrigSac:AB$ Sacrifice | Cost$ 0 | Amount$ 1 | SacValid$ Forest | RememberSacrificed$ True | Optional$ True | SubAbility$ DBSacSelf
SVar:DBSacSelf:DB$ Sacrifice | Cost$ 0 | Defined$ Self | SubAbility$ DBCleanup | ConditionCheckSVar$ X | ConditionSVarCompare$ LT1
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:Remembered$Amount
SVar:NeedsToPlay:Forest.YouCtrl
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/rogue_elephant.jpg
SetInfo:WTH|Common|http://magiccards.info/scans/en/wl/81.jpg
Oracle:When Rogue Elephant enters the battlefield, sacrifice it unless you sacrifice a Forest.
End
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Incorrect Scripts
by friarsol » 07 Feb 2012, 14:58
I guess nothing that the Cost wasn't already doing incorrectly (not unpaying Sacrifices). Can we at least mark all of these scripts going in like this so it'll be easier to find the scripts that will be simplified when eventually that work finishes?
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Incorrect Scripts
by Sloth » 14 Feb 2012, 06:37
Jeff, Toshiro Umezawa is wrong. The Instant has to be cast immediately not during the rest of the turn.
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Incorrect Scripts
by jeffwadsworth » 14 Feb 2012, 12:59
I will revert it. Thanks.Sloth wrote:Jeff, Toshiro Umezawa is wrong. The Instant has to be cast immediately not during the rest of the turn.
- jeffwadsworth
- Super Tester Elite
- Posts: 1172
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 70 times
Re: Incorrect Scripts
by Sloth » 14 Feb 2012, 17:14
Jeff, the script of Bronze Horse prevents damage from all spells, not only from spells that target it.
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Incorrect Scripts
by jeffwadsworth » 14 Feb 2012, 17:52
Ahh. I thought the Target$ would be specific. Reverting.Sloth wrote:Jeff, the script of Bronze Horse prevents damage from all spells, not only from spells that target it.
- jeffwadsworth
- Super Tester Elite
- Posts: 1172
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 70 times
Re: Incorrect Scripts
by Sloth » 17 Feb 2012, 10:48
I've just added Wrexial, the Risen Deep. Toshiro Umezawa is possible now.jeffwadsworth wrote:I will revert it. Thanks.Sloth wrote:Jeff, Toshiro Umezawa is wrong. The Instant has to be cast immediately not during the rest of the turn.
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Incorrect Scripts
by jeffwadsworth » 17 Feb 2012, 12:25
I noticed that. Sweet!Sloth wrote:I've just added Wrexial, the Risen Deep. Toshiro Umezawa is possible now.jeffwadsworth wrote:I will revert it. Thanks.Sloth wrote:Jeff, Toshiro Umezawa is wrong. The Instant has to be cast immediately not during the rest of the turn.
- jeffwadsworth
- Super Tester Elite
- Posts: 1172
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 70 times
Re: Incorrect Scripts
by Sloth » 22 Feb 2012, 07:59
Jeff, Omen Machine has to wait. The script is correct, but there is currently no way to force the player to cast a targeted spell (canceling is always enabled). Until this is fixed, i will remove Omen Machine.
EDIT: And Ib Halfheart, Goblin Tactician should not give the triggers to other goblins. The triggered ability is only on Ib.
EDIT2: Omen Machine works now.
EDIT: And Ib Halfheart, Goblin Tactician should not give the triggers to other goblins. The triggered ability is only on Ib.
EDIT2: Omen Machine works now.
Last edited by Sloth on 22 Feb 2012, 09:22, edited 1 time in total.
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Who is online
Users browsing this forum: No registered users and 42 guests