It is currently 12 Sep 2025, 08:00
   
Text Size

Cost Reorganization

Post MTG Forge Related Programming Questions Here

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

Cost Reorganization

Postby friarsol » 20 Aug 2011, 16:52

Hey guys,

I'm almost done with my Restructuring of Costs. This will allow for cards like Viscerid Drone or Urborg Panther that have more than one type of the same cost. It also streamlines the use of X as a choice (not predefined) in non-Mana costs. In my current codebase, only Sacrifice is using this format, but once the baseline gets checked in, I can go through and add it in everywhere that makes sense. The next one on my list will be for Remove Counter, since I believe that's the most common use of this Cost.

Does anyone know any existing cards that use Cost in a weird way such as Copper-Leaf Angel, Firecat Blitz, Devastating Summons, or Kaervek's Spite? (I've already tested these 4). I wanted to do some expanded testing on anything funky we have that actually uses the Cost system to make sure nothing falls through the cracks. The inputs that do the payment were hardly altered, but a good smoke test never hurt nobody.

Even if it's not as weird as the 4 I mentioned above, I'll go through any cards that people suggest, so feel free to shout out any candidates.

On a related note, after all of this is done I'm considering changing when payment of cost actually happens. So instead of Sacrificing a card immediately when I click on it, instead the Card will be recorded, removed from the possible choices, and marked on the UI somehow (some type of "Using as Payment" icon from Moomarc would be great). This will make "refunding" canceled Abilities more realistic, since currently Forge doesn't support "un-sacrificing" cards.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Cost Reorganization

Postby moomarc » 20 Aug 2011, 23:48

I'll draw up an icon on Monday if I get a chance. Do you want something in a style similar to the attack, block and summoning sickness icons, or something more splashy?
-Marc
User avatar
moomarc
Pixel Commander
 
Posts: 2091
Joined: 04 Jun 2010, 15:22
Location: Johannesburg, South Africa
Has thanked: 371 times
Been thanked: 372 times

Re: Cost Reorganization

Postby jeffwadsworth » 21 Aug 2011, 01:07

As for cards, how about something like Foil, Waxmane Baku.
jeffwadsworth
Super Tester Elite
 
Posts: 1172
Joined: 20 Oct 2010, 04:47
Location: USA
Has thanked: 287 times
Been thanked: 70 times

Re: Cost Reorganization

Postby ArsenalNut » 21 Aug 2011, 01:48

Is the cost refactoring going to effect the way cost is handled for the keywords that have a cost? At least two cards, Deepcavern Imp and Skizzik Surger, had non-mana Echo costs that didn't work previously.

Here's the script for Skizzik Surger
| Open
Name:Skizzik Surger
ManaCost:4 R R
Types:Creature Elemental
Text:no text
PT:6/4
K:Haste
K:Echo:Sac<2/Land>
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/skizzik_surger.jpg
SetInfo:FUT|Uncommon|http://magiccards.info/scans/en/fut/120.jpg
End


Another oddball cost I ran across was Sage of Fables which removes +1/+1 counters from any creature. I posted a script in
viewtopic.php?f=52&t=3877&start=567 that tried to get around using cost for the counter removal.
So many cards, so little time
User avatar
ArsenalNut
 
Posts: 512
Joined: 08 Jul 2011, 03:49
Has thanked: 27 times
Been thanked: 121 times

Cards with time counters

Postby Braids » 21 Aug 2011, 02:12

hmm, maybe your changes would allow us to add Aeon Chronicler and Rift Elemental. (i was going to suggest them for testing, but we don't currently have them.)
"That is the dumbest thing I've ever seen." --Rob Cashwalker, regarding Innistrad double-sided cards. One of the first times he and I have ever agreed on something. ;)
User avatar
Braids
Programmer
 
Posts: 556
Joined: 22 Jun 2011, 00:39
Location: Unknown. Hobby: Driving myself and others to constructive madness.
Has thanked: 1 time
Been thanked: 1 time

Re: Cost Reorganization

Postby friarsol » 21 Aug 2011, 02:33

Foil I should be able to do. Waxmane Baku will come after I add x choice to remove counter.

This is just for the base cost object. Echo would need to be updated still to use cost.

Sage of Fables will need some extra coding to be supported since the counter removal doesn't occur to the activating card.

I don't mind scripting new cards as tests. It's a good way to make sure the code is doing what it should
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Cost Reorganization

Postby ArsenalNut » 21 Aug 2011, 05:33

These are probably things to look at after the cost refactor is complete but I thought I'd go ahead and mention them.

1) Support for "reveal a card" as cost for things like Nightshade Assassin. If you could use it as an UnlessCost, it would also make a bunch of hard coded cards scriptable.
2) Creature cards with two alternative costs such as Goldmeadow Stalwart
So many cards, so little time
User avatar
ArsenalNut
 
Posts: 512
Joined: 08 Jul 2011, 03:49
Has thanked: 27 times
Been thanked: 121 times

Re: Cost Reorganization

Postby friarsol » 22 Aug 2011, 01:43

Each Cost is much more self-contained than my last iteration of Cost. So Reveal should be able to be coded up. It's basically the same as Discard, except the cards don't go anywhere.

I had been considering the best way to handle an "Or" Cost, but haven't quite come up with the right way to do this yet. Once that's in place, it would handle Rift Elemental. (Although this would also need the remove counters from others Cost too) Goldmeadow Stalwart is a bit trickier since we don't have any structure in place for Additional Costs for Permanent Spells (except for Auras). We could o the basic Permanent route, which would be similar to how Attach works now, to allow for Permanents with Additional Costs.

I'm going to run a few more tests tonight, and then get this checked in. If you notice anything funky, just post on this topic, and I'll get to it when I have some time.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Cost Reorganization

Postby friarsol » 22 Aug 2011, 12:01

moomarc wrote:I'll draw up an icon on Monday if I get a chance. Do you want something in a style similar to the attack, block and summoning sickness icons, or something more splashy?
It doesn't need to be more splashy, just something that makes it obvious that a card is being used for a current cost.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Cost Reorganization

Postby moomarc » 23 Aug 2011, 17:43

Finally had some time this evening for personal work, so here's the icon to indicate cards being used for payment. I thought it would be nice to have some sort of link to the mana symbols but obviously didn't want to infringe on copyrights seeing as we'd distribute this with the download package. All feedback is welcome as always!
Reserved-Creature.jpg
Sample creature marked as reserved
Attachments
Reserved_Card.png
128x128 px Icon
Reserved_Card.png (36.19 KiB) Viewed 4090 times
-Marc
User avatar
moomarc
Pixel Commander
 
Posts: 2091
Joined: 04 Jun 2010, 15:22
Location: Johannesburg, South Africa
Has thanked: 371 times
Been thanked: 372 times

Re: Cost Reorganization

Postby friarsol » 23 Aug 2011, 19:00

Thats pretty awesome Marc. I was primarily planning on using it for things like Discard, Sacrifice (etc), and moving when a card is sacrificed until after the spell is successfully paid for (instead of during payment). That symbol should clearly mark something is going on with that card for the user.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Cost Reorganization

Postby Sloth » 23 Aug 2011, 20:01

Some more odd costs:
Abandon Hope / Æther Tide / Bond of Agony : Paying {X} and doing stuff times X.

Caller of the Hunt
Kaervek's Spite
Liquid Fire
Night Soil
Weight of Conscience
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Cost Reorganization

Postby friarsol » 23 Aug 2011, 21:27

Good thing Sloth is back from Vacation, now I have some good cards to test.

Kaervek's Spite was already tested per my original post.
The others are quite oddballs. The first three I will definitely test and actually had considered those scenarios, there's another similar scenario that I need to test as well.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Cost Reorganization

Postby moomarc » 24 Aug 2011, 07:37

friarsol wrote:Thats pretty awesome Marc. I was primarily planning on using it for things like Discard, Sacrifice (etc), and moving when a card is sacrificed until after the spell is successfully paid for (instead of during payment). That symbol should clearly mark something is going on with that card for the user.
Thanks for the positive feedback on the icon. :mrgreen:

Will this refactoring also affect those situations where an object is sacrificed to add mana to your mana pool beforehand (eg you sacrifice a Black Lotus then realise that it's your draw step) or will that only happen when we can save the game state?
-Marc
User avatar
moomarc
Pixel Commander
 
Posts: 2091
Joined: 04 Jun 2010, 15:22
Location: Johannesburg, South Africa
Has thanked: 371 times
Been thanked: 372 times

Re: Cost Reorganization

Postby silly freak » 24 Aug 2011, 09:01

as I understand it, this will only influence aborting to pay partially paid costs, i.e. sacrifice something, then realize you can't pay the rest of the cost. reverting the successfully played ability of Black Lotus will only be possible with a revertible game state representation
___

where's the "trust me, that will work!" switch for the compiler?
Laterna Magica - blog, forum, project, 2010/09/06 release!
silly freak
DEVELOPER
 
Posts: 598
Joined: 26 Mar 2009, 07:18
Location: Vienna, Austria
Has thanked: 93 times
Been thanked: 25 times

Next

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 28 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 28 users online :: 0 registered, 0 hidden and 28 guests (based on users active over the past 10 minutes)
Most users ever online was 7967 on 09 Sep 2025, 23:08

Users browsing this forum: No registered users and 28 guests

Login Form