It is currently 11 Sep 2025, 19:59
   
Text Size

Expanding Cumulative Upkeep

Post MTG Forge Related Programming Questions Here

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

Re: Expanding Cumulative Upkeep

Postby moomarc » 26 Aug 2012, 20:10

I was hoping to add Sacrifice<amount/valid> upkeep costs, but it seems to be a bit beyond me. :( Sorry. I got as far as adding this bit for the AI in shouldPayCost:
Code: Select all
            } else if (part instanceof CostSacrifice) {
                CardList typeList = compy.getCardsIn(ZoneType.Battlefield);
                typeList = typeList.getValidCards(part.getType().split(";"), compy, hostCard);
                final int sacAmount = ((CostSacrifice) part).convertAmount();
                if ((typeList.size() - sacAmount) < 6) {
                    return false; //Don't pay sac cost if it would leave AI with fewer than 6 of the valid type
                }
            }
Maybe with a few extra pointers I can work it out the human bit in GameActionUtil.payCostDuringAbilityResolve(message, hostCard, manaCost, paid, unpaid), but it seems you have to have an Ability for a sacrifice cost.
-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: Expanding Cumulative Upkeep

Postby Sloth » 26 Aug 2012, 20:23

Ha, i was working on the very same thing. Bad coordination. #-o

The good news is, that i succeeded. I will also add Polar Kraken now.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Expanding Cumulative Upkeep

Postby moomarc » 26 Aug 2012, 20:49

Haha! :mrgreen: Nothing wasted. I need to practice so struggling through and trying to push my teeny ability then seeing the correct solution so soon afterwards is great for me. I'm just enjoying the experience and happy to be ticking off so many new cards. :)
-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: Expanding Cumulative Upkeep

Postby Sloth » 26 Aug 2012, 21:03

I've just enabled discard costs. What other cards do we need in payCostDuringAbilityResolve?
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Expanding Cumulative Upkeep

Postby moomarc » 26 Aug 2012, 21:26

Sloth wrote:I've just enabled discard costs. What other cards do we need in payCostDuringAbilityResolve?
I've just shut down and can't remember offhand, but I think the rest involve cost types we don't have yet like gain control (Herald of Leshrac), and we could convert Braid of Fire and Varchild's something-or-others (can't remember the name but is currently done with a triggered charm at upkeep).

Then I see you took my next idea already and grabbed the Echo ones as well. I'm also hoping to expand Kicker to take X costs at the very least, but first need to see how busy work is this week.
-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: Expanding Cumulative Upkeep

Postby friarsol » 26 Aug 2012, 21:35

There's also Rogue Skycaptain, which is basically. Cumulative Upkeep but if you don't want to pay, wipe the counters, and give it to your opponent. This isn't a new Cost type, just something that's similar to what you guys are looking at.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Expanding Cumulative Upkeep

Postby friarsol » 27 Aug 2012, 23:56

Oh Phantasmal Sphere is basically the same as Cumulative Upkeep too.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Previous

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 44 guests

Main Menu

User Menu

Our Partners


Who is online

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

Login Form