It is currently 14 Sep 2025, 16:26
   
Text Size

Restricted use mana

Post MTG Forge Related Programming Questions Here

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

Re: Restricted use mana

Postby ArsenalNut » 13 Jul 2012, 00:43

Sloth wrote:I post it here even though i'm not sure it is related:

It seems the human player can no longer pay colorless hybrid mana (2/W) with off-color or colorless mana. I couldn't find any code that could possibly handle this. Does anyone know more about it?
Did you ever get this figured out? I didn't see anything in the commit logs but wanted to check before I dug into it.
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: Restricted use mana

Postby Sloth » 13 Jul 2012, 06:12

ArsenalNut wrote:Did you ever get this figured out? I didn't see anything in the commit logs but wanted to check before I dug into it.
I didn't find any clue about how this was or should be handled, so i left it. Please go ahead.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Restricted use mana

Postby ArsenalNut » 14 Jul 2012, 05:49

Sloth wrote:
ArsenalNut wrote:Did you ever get this figured out? I didn't see anything in the commit logs but wanted to check before I dug into it.
I didn't find any clue about how this was or should be handled, so i left it. Please go ahead.
I found the basic issue and fixed it so monocolored hybrid costs can be paid. It was due to the ManaCostShard conversion as I suspected. I believe there will be issues with effects that reduce mana costs interacting properly with monocolored hybrid costs. Any pointers to where in the code this is handled?
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: Restricted use mana

Postby friarsol » 14 Jul 2012, 14:23

ArsenalNut wrote:I found the basic issue and fixed it so monocolored hybrid costs can be paid. It was due to the ManaCostShard conversion as I suspected. I believe there will be issues with effects that reduce mana costs interacting properly with monocolored hybrid costs. Any pointers to where in the code this is handled?
Mana cost reduction was being looked at by someone who was new to Forge, and I'm not sure anything ever got committed by them (Sloth do you remember if he ever finished?) ManaCost increase/reduction really needs to be rewritten. I think there was going to be two static abilities, one for increasing and one for decreasing.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Restricted use mana

Postby ArsenalNut » 14 Jul 2012, 16:36

117.7c If a cost is reduced by an amount of mana represented by a hybrid mana symbol, the player paying that cost chooses one half of that symbol at the time the cost reduction is applied (see rule 601.2e). If a colored half is chosen, the cost is reduced by one mana of that color. If a colorless half is chosen, the cost is reduced by an amount of generic mana equal to that half’s number.
Does the current system handle this?

Is Reaper King the only card that uses multiple color of monocolored hybrid mana symbols? I looked visually through the Shadowmoor cards. I am not sure how you would handle cost reductions with this card. For the ones that use only one color, you can convert the monocolored hybrid shards to colorless shards, e.g. a {2/R}{2/R}{2/R} cost with cost reduction of {1} becomes {1}{2/R}{2/R} and with a cost reduction of {2} becomes just {2/R}{2/R}, etc. I guess technically the player paying these cost can still pay the full colored mana cost if they want.
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: Restricted use mana

Postby moomarc » 14 Jul 2012, 18:19

ArsenalNut, do you know offhand whether these recent mana changes enabled the tracking of hybrid mana used? I'm just wondering whether cards like Invert the Skies can be done yet (with earlier attempts the ConditionManaSpent couldn't check which part of the hybrid cost was paid).

Nevermind, just tested with an old script I had for Dawnglow Infusion and it still doesn't work. Any idea what needs to change to get these working? Here's a script just to play around with if you have the urge (easiest test with this card is pay hybrid cost with W or G then pay X with colorless mana:
Dawnglow Infusion | Open
Name:Dawnglow Infusion
ManaCost:X GW
Types:Sorcery
Text:no text
A:SP$ GainLife | Cost$ X GW | LifeAmount$ X | ConditionManaSpent$ G | SubAbility$ WPaid | SpellDescription$ You gain X life if G was spent to cast CARDNAME and X life if W was spent to cast it. (Do both if G W was spent.)
SVar:WPaid:DB$GainLife | Cost$ 0 | LifeAmount$ X | ConditionManaSpent$ W
SVar:X:Count$xPaid
SVar:RemAIDeck:True
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/dawnglow_infusion.jpg
SetInfo:SHM|Uncommon|http://magiccards.info/scans/en/shm/225.jpg
Oracle:You gain X life if {G} was spent to cast Dawnglow Infusion and X life if {W} was spent to cast it. (Do both if {G}{W} was spent.)
End
-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: Restricted use mana

Postby Sloth » 14 Jul 2012, 19:24

friarsol wrote:Mana cost reduction was being looked at by someone who was new to Forge, and I'm not sure anything ever got committed by them (Sloth do you remember if he ever finished?) ManaCost increase/reduction really needs to be rewritten. I think there was going to be two static abilities, one for increasing and one for decreasing.
Fabio never commited anything, so I will do this myself. I will see wether cost change affecting mono hybrids can be fixed along the way.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Previous

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 34 guests

cron

Main Menu

User Menu

Our Partners


Who is online

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

Login Form