Platinum Emperion + Swords to Plowshares
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
9 posts
• Page 1 of 1
Platinum Emperion + Swords to Plowshares
by 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?
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
by Sloth » 17 May 2013, 21:15
I think it's a necessary step that has to be done sooner or later. Let's see how many bugs pop up.Max mtg wrote:Won't it ruin anything important?
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Platinum Emperion + Swords to Plowshares
by 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
by Sloth » 17 May 2013, 21:43
Max wants to run checkStaticAbilities which only updates continuous static abilities. checkStateEffects is the beast that should not be called carelessly.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?)
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Platinum Emperion + Swords to Plowshares
by friarsol » 17 May 2013, 21:46
Ah good. Ok, I was worried for a few minutes there.Sloth wrote:Max wants to run checkStaticAbilities which only updates continuous static abilities. checkStateEffects is the beast that should not be called carelessly.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?)
- 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
by 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
by 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)
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
by friarsol » 06 Jul 2013, 02:57
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."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)
- 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
by Sloth » 06 Jul 2013, 20:49
Fixed with r22456.friarsol wrote: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."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)
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
9 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 58 guests