It is currently 06 Sep 2025, 21:24
   
Text Size

Platinum Emperion + Swords to Plowshares

Post MTG Forge Related Programming Questions Here

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

Platinum Emperion + Swords to Plowshares

Postby Max mtg » 17 May 2013, 19:00

Problem:
Keywords are not updated right after the Platinum Emperion has been exiled. Swords to Plowshares keeps resolving and cannot add life to former creature controller.

Solution:
Call forge.game.GameAction.checkStaticAbilities() more frequently... somewhere inside forge.card.ability.AbilityUtils.resolveApiAbility(SpellAbility, boolean, GameState) before proceeding to subabilities.

Won't it ruin anything important?
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: Platinum Emperion + Swords to Plowshares

Postby Sloth » 17 May 2013, 21:15

Max mtg wrote:Won't it ruin anything important?
I think it's a necessary step that has to be done sooner or later. Let's see how many bugs pop up.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Platinum Emperion + Swords to Plowshares

Postby friarsol » 17 May 2013, 21:22

I think certain things should only be run in the current timeframes. Like SA granting abilities and triggers (are they called from there right now?)
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Platinum Emperion + Swords to Plowshares

Postby Sloth » 17 May 2013, 21:43

friarsol wrote:I think certain things should only be run in the current timeframes. Like SA granting abilities and triggers (are they called from there right now?)
Max wants to run checkStaticAbilities which only updates continuous static abilities. checkStateEffects is the beast that should not be called carelessly.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Platinum Emperion + Swords to Plowshares

Postby friarsol » 17 May 2013, 21:46

Sloth wrote:
friarsol wrote:I think certain things should only be run in the current timeframes. Like SA granting abilities and triggers (are they called from there right now?)
Max wants to run checkStaticAbilities which only updates continuous static abilities. checkStateEffects is the beast that should not be called carelessly.
Ah good. Ok, I was worried for a few minutes there.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Platinum Emperion + Swords to Plowshares

Postby Max mtg » 18 May 2013, 05:41

Commited: r21511
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: Platinum Emperion + Swords to Plowshares

Postby Max mtg » 05 Jul 2013, 23:17

Same starting conditions, but with Elesh Norn, Grand Cenobite on table
Should I get 10 lives? (Actually forge gives 8 - it did so even in 1.4.2 beta)
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: Platinum Emperion + Swords to Plowshares

Postby friarsol » 06 Jul 2013, 02:57

Max mtg wrote:Same starting conditions, but with Elesh Norn, Grand Cenobite on table
Should I get 10 lives? (Actually forge gives 8 - it did so even in 1.4.2 beta)
It should be taking LKI of the Emperion, which is 10. "10/1/2008: The amount of life that's gained is equal to the power of the targeted creature as it last existed on the battlefield."
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Platinum Emperion + Swords to Plowshares

Postby Sloth » 06 Jul 2013, 20:49

friarsol wrote:
Max mtg wrote:Same starting conditions, but with Elesh Norn, Grand Cenobite on table
Should I get 10 lives? (Actually forge gives 8 - it did so even in 1.4.2 beta)
It should be taking LKI of the Emperion, which is 10. "10/1/2008: The amount of life that's gained is equal to the power of the targeted creature as it last existed on the battlefield."
Fixed with r22456.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 58 guests

Main Menu

User Menu

Our Partners


Who is online

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

Login Form