Implementing variants
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Implementing variants
by swordshine » 06 Sep 2013, 07:12
"AB$ PermanentCreature" is an ability, therefore those cost change effects affected spells don't work. I may implement Karador's cost change effect in a different way, but other existing cards with global cost change effects still don't work with all the commanders, e.g. Planar Gate.Hellfish wrote:I looked at the SpellAbilityCastTrigger this morning, without enough time to find a fix. :-\
It seems like AF_PermanentCreature spells and abilities take a different route onto the stack than normal spells, as a breakpoint in SpellAbilityCastTrigger.performTest, which is called from TriggerHandler.run, is never hit when I cast a PermanentCreature.
Also, I thinj Swordshine withdrew that other bug report
- swordshine
- Posts: 682
- Joined: 11 Jul 2010, 02:37
- Has thanked: 116 times
- Been thanked: 87 times
Re: Implementing variants
by Hellfish » 06 Sep 2013, 08:27
Oh, I misunderstood then, sorry about that.>_>
I'll change it to a spell, but the trigger problem remains.
I'll change it to a spell, but the trigger problem remains.
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
-
Hellfish - Programmer
- Posts: 1297
- Joined: 07 Jun 2009, 10:41
- Location: South of the Pumphouse
- Has thanked: 110 times
- Been thanked: 169 times
Re: Implementing variants
by moomarc » 06 Sep 2013, 09:15
Would it be possible to add a check when saving a deck, where if you enter via Edit Commander deck, it will warn you if your deck has no commander? (and maybe automatically switch deck section?)swordshine wrote:Commader deck editor->Change Section(Commander)->add your commanderjmartus wrote:I tried a snapshot build and tried a commander deck it said couldnt find commander card when I went to start a game or that I had to many cards which was at 100.
-Marc
-
moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Re: Implementing variants
by friarsol » 07 Sep 2013, 00:26
Oh right, Commander stuff here
"Additionally, cards I exile with partial Paris mulligan don't have their borders/icons reset, so it still has a pink hue and the selected icon."
Additionally, the AI doesn't seem to consider the General doing 21 damage as a lose condition when deciding if it needs to block.
Edit: Probably also related to PermanentCreature as an Ability, you are able to cast your Commander during your upkeep.
"Additionally, cards I exile with partial Paris mulligan don't have their borders/icons reset, so it still has a pink hue and the selected icon."
Additionally, the AI doesn't seem to consider the General doing 21 damage as a lose condition when deciding if it needs to block.
Edit: Probably also related to PermanentCreature as an Ability, you are able to cast your Commander during your upkeep.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Implementing variants
by friarsol » 07 Sep 2013, 02:49
Is the AI seeming to ignore the commander cost? Also, at one point my Commander cost extra even though I hadn't cast it yet, but now a few turns later, it costs the right amount again.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Implementing variants
by Hellfish » 07 Sep 2013, 08:26
So apparently there is some problem with RaiseCost static abilities vs commanders. I use a RaiseCost with AffectedZone$ Command to raise the cost. This worked fine when the casting was an ability, but now that it's a spell the Commander is already on the stack when the RaiseCost tries to apply.If AffectedZone is changed to Stack then the costraising would apply if you attempt to cast your Commander from your hand, which is incorrect.
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
-
Hellfish - Programmer
- Posts: 1297
- Joined: 07 Jun 2009, 10:41
- Location: South of the Pumphouse
- Has thanked: 110 times
- Been thanked: 169 times
Re: Implementing variants
by swordshine » 07 Sep 2013, 10:27
The parameter "ActivationZone$ Command" should be updated since it's a spell now. If the spell has this parameter, you cannot cast the commander from your hand.Hellfish wrote:So apparently there is some problem with RaiseCost static abilities vs commanders. I use a RaiseCost with AffectedZone$ Command to raise the cost. This worked fine when the casting was an ability, but now that it's a spell the Commander is already on the stack when the RaiseCost tries to apply.If AffectedZone is changed to Stack then the costraising would apply if you attempt to cast your Commander from your hand, which is incorrect.
I've not tested, but this might be a solution: "ValidCard$ Card.Self+wasCastFromCommand | EffectZone$ All"
Edit: Just tested. This suggestion works. This line should also be updated when you want to cast it from other zones.
- Code: Select all
### Eclipse Workspace Patch 1.0
#P trunk
Index: src/main/java/forge/card/ability/AbilityFactory.java
===================================================================
--- src/main/java/forge/card/ability/AbilityFactory.java (revision 23136)
+++ src/main/java/forge/card/ability/AbilityFactory.java (working copy)
@@ -138,7 +138,7 @@
else if (api == ApiType.PermanentCreature || api == ApiType.PermanentNoncreature) {
// If API is a permanent type, and creating AF Spell
// Clear out the auto created SpellPemanent spell
- if (type == AbilityRecordType.Spell) {
+ if (type == AbilityRecordType.Spell && !hostCard.isCommander()) {
hostCard.clearFirstSpell();
}
}
- swordshine
- Posts: 682
- Joined: 11 Jul 2010, 02:37
- Has thanked: 116 times
- Been thanked: 87 times
Re: Implementing variants
by Hellfish » 07 Sep 2013, 13:05
Thanks, swordshine! That did the trick
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
-
Hellfish - Programmer
- Posts: 1297
- Joined: 07 Jun 2009, 10:41
- Location: South of the Pumphouse
- Has thanked: 110 times
- Been thanked: 169 times
Re: Implementing variants
by friarsol » 07 Sep 2013, 15:11
r23140
I have Melek, Izzet Paragon as my commander and in play. I've cast it once. On top of my library is a Brainstorm that I can cast from Melek. I try to cast it from my library, but it's telling me it costs 2U. (Actually, every spell I'm trying to cast this turn is 2 mana more expensive than it should). If it matters I'm on an extra turn from Time Stretch.
Additionally, a Time Warp I cast with my Cast Through Time in play, cost an additional 2 when it rebounded.
I have Melek, Izzet Paragon as my commander and in play. I've cast it once. On top of my library is a Brainstorm that I can cast from Melek. I try to cast it from my library, but it's telling me it costs 2U. (Actually, every spell I'm trying to cast this turn is 2 mana more expensive than it should). If it matters I'm on an extra turn from Time Stretch.
Additionally, a Time Warp I cast with my Cast Through Time in play, cost an additional 2 when it rebounded.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Implementing variants
by swordshine » 07 Sep 2013, 15:14
It should be "ValidCard$ Card.Self+wasCastFromCommand", not "Affected$ Card.Self+wasCastFromCommand"
- swordshine
- Posts: 682
- Joined: 11 Jul 2010, 02:37
- Has thanked: 116 times
- Been thanked: 87 times
Re: Implementing variants
by swordshine » 08 Sep 2013, 06:50
Commander Akroma, Angel of Fury cannot be cast face down for its morph cost.
- swordshine
- Posts: 682
- Joined: 11 Jul 2010, 02:37
- Has thanked: 116 times
- Been thanked: 87 times
Re: Implementing variants
by friarsol » 08 Sep 2013, 12:54
Maybe instead of animating a CreaturePermanent spell onto the Commander, we can have a second card in the Command zone, which would:
1) Visibly keep track of how many times the commander was cast
2) Statically pump a "May be played" keyword to the Commander if it's in the Command Zone (would this fix the Morph issue?)
3?) Keep the damage dealt by the Commander to players on this so it's visible even if your Commander isn't visible (put into Library)
1) Visibly keep track of how many times the commander was cast
2) Statically pump a "May be played" keyword to the Commander if it's in the Command Zone (would this fix the Morph issue?)
3?) Keep the damage dealt by the Commander to players on this so it's visible even if your Commander isn't visible (put into Library)
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Implementing variants
by Hellfish » 09 Sep 2013, 05:03
Sounds feasible. I just never liked liked the extraneous rule cards in things like the modded manalink,but I'll give it a go.
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
-
Hellfish - Programmer
- Posts: 1297
- Joined: 07 Jun 2009, 10:41
- Location: South of the Pumphouse
- Has thanked: 110 times
- Been thanked: 169 times
Re: Implementing variants
by Diogenes » 09 Sep 2013, 06:56
Commander's looking really good. Thank you guys for all the work!
As a user I can say that the commander-relevant info (times commander has been played, damage received from different commanders, even location of commander if it's been shuffled into a library, etc.) feels like it should be available on the "Players" panel. I think players will more commonly want to check how close they or a given opponent are to being eliminated by commander damage than checking individual commanders to see how much damage they've dealt to all players (both scenarios could easily happen, though, so duplicating this info in the "Players" panel and on the commanders themselves would make sense.)
As it is, with the flashback shortcut for viewing and casting commanders it's possible (and I think optimal) to play with the command zone completely hidden from view (and even access, without changing the "hidden tabs option") during play. I personally wouldn't think to look in that zone for this info without instruction.
As a user I can say that the commander-relevant info (times commander has been played, damage received from different commanders, even location of commander if it's been shuffled into a library, etc.) feels like it should be available on the "Players" panel. I think players will more commonly want to check how close they or a given opponent are to being eliminated by commander damage than checking individual commanders to see how much damage they've dealt to all players (both scenarios could easily happen, though, so duplicating this info in the "Players" panel and on the commanders themselves would make sense.)
As it is, with the flashback shortcut for viewing and casting commanders it's possible (and I think optimal) to play with the command zone completely hidden from view (and even access, without changing the "hidden tabs option") during play. I personally wouldn't think to look in that zone for this info without instruction.
Re: Implementing variants
by friarsol » 09 Sep 2013, 12:12
Yea i never really liked it either. We really shouldn't 'need' it, but we also shouldn't need granting an additional Spell to the Commander either.Hellfish wrote:Sounds feasible. I just never liked liked the extraneous rule cards in things like the modded manalink,but I'll give it a go.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Who is online
Users browsing this forum: No registered users and 24 guests