It is currently 07 Sep 2025, 23:57
   
Text Size

About removing Global Ruin

Post MTG Forge Related Programming Questions Here

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

About removing Global Ruin

Postby Max mtg » 19 Mar 2013, 10:06

We have a harcoded spell Global Ruin that is the only user of a field:
forge.card.spellability.SpellAbility.beforePayMana

If we remove both the spell and that field, the code will become somewhat simplier.

What do you think?
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

Re: About removing Global Ruin

Postby friarsol » 19 Mar 2013, 12:17

As much as I'd love to just remove cards that were hardcoded poorly, it could break any number of decks and any number of quest modes. I'll put Global Ruin on the top of my convert to script list. (It was already near the top for other reasons)
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: About removing Global Ruin

Postby Max mtg » 19 Mar 2013, 17:33

That's a pity we can't throw away poorly coded cards.
I'll await your action on global ruin.

And thank you for dealing with championing ability, the code looks neater now.
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times

Re: About removing Global Ruin

Postby friarsol » 20 Mar 2013, 01:37

That converted a lot easier than I expected it to. I didn't do any cleanup with beforePayMana or other related things.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: About removing Global Ruin

Postby Max mtg » 20 Mar 2013, 04:40

Thank you, Sol! I have removed all reference to beforePayMana in r20489
Single class for single responsibility.
Max mtg
Programmer
 
Posts: 1997
Joined: 02 Jul 2011, 14:26
Has thanked: 173 times
Been thanked: 334 times


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 39 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 39 users online :: 0 registered, 0 hidden and 39 guests (based on users active over the past 10 minutes)
Most users ever online was 7303 on 15 Jul 2025, 20:46

Users browsing this forum: No registered users and 39 guests

Login Form