Bug Reports (snapshot builds)
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Bug Reports (snapshot builds)
by Hanmac » 07 Jun 2016, 13:33
hm i will try to do it, it might work for the normal replicate, but because of that Djinn Illuminatus. it doesn't work.friarsol wrote:Probably the "correct" fix was making replicate a true trigger like Cascade.
same why Maelstrom Nexus has such long code for Cascade and not just (first spell gains Cascade)
Exalted and Bushido might be done as "true Trigger" too, but because of some cards that gain/give this Keywords it doesn't work ...
or is there a better way to do such things with "add Special Keyword"?
==
PS: Apropos i still think we need to find a way to connect the abilites so that we have this "exiled with" feature correct. See Rules 607 "Linked Abilities"
otherwise if a card gets multiple activated abilities from other cards, the Effects are not correct.
Re: Bug Reports (snapshot builds)
by friarsol » 07 Jun 2016, 20:38
Well, I was more thinking just creating a trigger object at the point of the code where Replicate is handled currently, attach the triggering SpellAbility to the run params. Then add it to the simultaneous stack entry. Not too large of a change, and it references the right ability. I guess Storm would be a better comparison than Cascade, since Cascade doesn't exactly care about the SA.Hanmac wrote:hm i will try to do it, it might work for the normal replicate, but because of that Djinn Illuminatus. it doesn't work.friarsol wrote:Probably the "correct" fix was making replicate a true trigger like Cascade.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Bug Reports (snapshot builds)
by Hanmac » 08 Jun 2016, 11:54
@friarsol: i tried to do it as Trigger object but i didnt found an example to do it right. Storm is also a pure Tigger like i want the other stuff also to be. (i like the Trigger done in CardFactoryUtil, but that does not work for triggers granted from given Keywords)
===
i found something wrong with The Great Aurora, but debugging shows it something wrong with card draw.
debug output:
so something might be broken for GameAction#changeZone.
i does try to investigate and fix it my self ... i will see if i can find any Clues what is wrong (i need to stop with that word puns ;P)
===
i found something wrong with The Great Aurora, but debugging shows it something wrong with card draw.
debug output:
- Code: Select all
Count:AuroraY(Valid Card.RememberedPlayerOwn)=44
Count:AuroraZ(ValidHand Card.RememberedPlayerOwn)=1
Draw(AuroraX):45
Drawn(45):1
[Clue (172)]
so something might be broken for GameAction#changeZone.
i does try to investigate and fix it my self ... i will see if i can find any Clues what is wrong (i need to stop with that word puns ;P)
Re: Bug Reports (snapshot builds)
by friarsol » 08 Jun 2016, 12:35
Sounds like its trying to draw 45 cards, attempts to draw a Clue token and fails (tokens can't change zones if they aren't on the battlefield). Then it tries to draw the next card, it's the same clue token (since it didn't move the first time). Since SBA aren't checked in the middle of resolving a spell, that clue lives there until it's removed from the game. Probably the right fix is in the card drawing function in Player, we filter the Library zone by nontoken cards, before checking if it's empty or grabbing the first element of the list.Hanmac wrote:debug output:means i should draw 45 cards, but i did only one, and it was a Clue token oO
- Code: Select all
Count:AuroraY(Valid Card.RememberedPlayerOwn)=44
Count:AuroraZ(ValidHand Card.RememberedPlayerOwn)=1
Draw(AuroraX):45
Drawn(45):1
[Clue (172)]
so something might be broken for GameAction#changeZone.
i does try to investigate and fix it my self ... i will see if i can find any Clues what is wrong (i need to stop with that word puns ;P)
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Bug Reports (snapshot builds)
by Hanmac » 08 Jun 2016, 13:08
hm ok i will see what can do. Ruling of The Great Aurora says:
for that i think a fix for Zone#add so tokens are not added to the cardlist.
PS: i did take a look at Rakshasa Vizier,
for that we might need a new Event because ChangesZone is only for one card, and we need a Event for n-Cards. like ChangesZoneAll or something like that.
might mean that we might prevent Tokens from even added to the library.6/22/2015: A token is owned by the player under whose control it entered the battlefield. Tokens shuffled into a library count toward the number of cards drawn, though they cease to exist upon becoming part of a library. Regardless of what you’re using to represent tokens, you won’t shuffle that physical object into your library.
for that i think a fix for Zone#add so tokens are not added to the cardlist.
PS: i did take a look at Rakshasa Vizier,
for that we might need a new Event because ChangesZone is only for one card, and we need a Event for n-Cards. like ChangesZoneAll or something like that.
Re: Bug Reports (snapshot builds)
by friarsol » 08 Jun 2016, 13:28
You can't prevent it from entering the library, because the token definitely gets into the library.
110.5f A token that’s phased out, or that’s in a zone other than the battlefield, ceases to exist. This is a state-based action; see rule 704. (Note that if a token changes zones, applicable triggered abilities will trigger before the token ceases to exist.)
110.5g A token that has left the battlefield can’t move to another zone or come back onto the battlefield. If such a token would change zones, it remains in its current zone instead. It ceases to exist the next time state-based actions are checked; see rule 704.
110.5f A token that’s phased out, or that’s in a zone other than the battlefield, ceases to exist. This is a state-based action; see rule 704. (Note that if a token changes zones, applicable triggered abilities will trigger before the token ceases to exist.)
110.5g A token that has left the battlefield can’t move to another zone or come back onto the battlefield. If such a token would change zones, it remains in its current zone instead. It ceases to exist the next time state-based actions are checked; see rule 704.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Bug Reports (snapshot builds)
by friarsol » 08 Jun 2016, 13:29
Yes, we know. All of the cards that aren't scripted have reasons -Hanmac wrote:PS: i did take a look at Rakshasa Vizier,
for that we might need a new Event because ChangesZone is only for one card, and we need a Event for n-Cards. like ChangesZoneAll or something like that.
https://docs.google.com/spreadsheets/d/ ... sp=sharing
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Bug Reports (snapshot builds)
by Hanmac » 08 Jun 2016, 17:26
@friarsol: thanks for the list, its very interesting
i will do look at them and maybe i get some ideas for them.
Flagbearers does look interesting ... i think the first part with adding that a Flagbearer does need to be targeted seems the easy part ...
PS: i did a fix for The Great Aurora ... i did it that Tokens are not added to the cardlist of non-Battlefield (but they still does cause the Trigger to happen)
i will do look at them and maybe i get some ideas for them.
Flagbearers does look interesting ... i think the first part with adding that a Flagbearer does need to be targeted seems the easy part ...
PS: i did a fix for The Great Aurora ... i did it that Tokens are not added to the cardlist of non-Battlefield (but they still does cause the Trigger to happen)
Re: Bug Reports (snapshot builds)
by stormcat » 08 Jun 2016, 20:42
In EMA Booster Draft, I rearized that protection gained by Shelter is not shown in card detail.
Re: Bug Reports (snapshot builds)
by Bog Wraith » 09 Jun 2016, 03:54
After casting a Magmatic Chasm, the AI creatures blocked my attack, which shouldn't happen due to the effects of Magmatic Chasm.
'Twas in the bogs of Cannelbrae
My mate did meet an early grave
'Twas nothing left for us to save
In the peat-filled bogs of Cannelbrae.
My mate did meet an early grave
'Twas nothing left for us to save
In the peat-filled bogs of Cannelbrae.
-
Bog Wraith - Global Mod 1 (Ret)
- Posts: 1108
- Joined: 28 May 2008, 22:40
- Location: Shandalar
- Has thanked: 425 times
- Been thanked: 153 times
Re: Bug Reports (snapshot builds)
by Marek14 » 09 Jun 2016, 05:36
Basically, for Warp World and similar effects, the rules note that tokens are not cards, and so even though they ARE, theoretically, in the library during this time, the effect only cares about CARDS.friarsol wrote:You can't prevent it from entering the library, because the token definitely gets into the library.
110.5f A token that’s phased out, or that’s in a zone other than the battlefield, ceases to exist. This is a state-based action; see rule 704. (Note that if a token changes zones, applicable triggered abilities will trigger before the token ceases to exist.)
110.5g A token that has left the battlefield can’t move to another zone or come back onto the battlefield. If such a token would change zones, it remains in its current zone instead. It ceases to exist the next time state-based actions are checked; see rule 704.
Re: Bug Reports (snapshot builds)
by friarsol » 09 Jun 2016, 12:49
Yea that's a great point. "then draws that many cards". The ruling on The Great Aurora, is really one for physical magic, since you shouldn't accidentally shuffle tokens into your deck, since it can cause issues down the road, and nothing a token can do from the library is actually relevant.Marek14 wrote:Basically, for Warp World and similar effects, the rules note that tokens are not cards, and so even though they ARE, theoretically, in the library during this time, the effect only cares about CARDS.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Bug Reports (snapshot builds)
by Hanmac » 09 Jun 2016, 13:01
about token shuffled into Library, the way i did currently works (the token is added, and it does trigger, but they are not "really" added)
===
because i didn't found the code of it i did this for Remorseless Punishment
===
because i didn't found the code of it i did this for Remorseless Punishment
- Code: Select all
Name:Remorseless Punishment
ManaCost:3 B B
Types:Sorcery
A:SP$ Repeat | Cost$ 3 B B | ValidTgts$ Opponent | RepeatSubAbility$ DBChoose | MaxRepeat$ 2 | StackDescription$ SpellDescription | SpellDescription$ Target opponent loses 5 life unless that player discards two cards or sacrifices a creature or planeswalker. Repeat this process once.
SVar:DBChoose:DB$ GenericChoice | Defined$ ParentTarget | Choices$ Discard,Sacrifice | AILogic$ PayUnlessCost
SVar:Discard:DB$ LoseLife | LifeAmount$ 5 | Defined$ ParentTarget | UnlessCost$ Discard<2/Card> | UnlessPayer$ ParentTarget | SpellDescription$ you lose 5 life unless you discards two cards.
SVar:Sacrifice:DB$ LoseLife | LifeAmount$ 5 | Defined$ ParentTarget | UnlessCost$ Sac<1/Creature;Planeswalker/creature or planeswalker> | UnlessPayer$ ParentTarget | SpellDescription$ you lose 5 life unless you sacrifices a creature or planeswalker.
SVar:Picture:http://www.wizards.com/global/images/magic/general/remorseless_punishment.jpg
Oracle:Target opponent loses 5 life unless that player discards two cards or sacrifices a creature or planeswalker. Repeat this process once.
Re: Bug Reports (snapshot builds)
by Agetian » 09 Jun 2016, 19:53
r31279: Something is now broken with cards such as Banisher Priest and Chained to the Rocks. These cards no longer work correctly: when they leave the battlefield, the card that was exiled with them is no longer returned from the exile to the battlefield. This used to work relatively recently. Maybe something happened to the imprint mechanism that is utilized by these cards internally?
EDIT: This is broken by r31277.
- Agetian
EDIT: This is broken by r31277.
- Agetian
- Agetian
- Programmer
- Posts: 3489
- Joined: 14 Mar 2011, 05:58
- Has thanked: 684 times
- Been thanked: 572 times
Re: Bug Reports (snapshot builds)
by Hanmac » 10 Jun 2016, 05:21
many thanks for pointing that out, i didn't think that this specific revision should have broke it.Agetian wrote:r31279: Something is now broken with cards such as Banisher Priest and Chained to the Rocks. These cards no longer work correctly: when they leave the battlefield, the card that was exiled with them is no longer returned from the exile to the battlefield. This used to work relatively recently. Maybe something happened to the imprint mechanism that is utilized by these cards internally?
EDIT: This is broken by r31277.
- Agetian
the check it had was "zoneType == ZoneType.Battlefield || !c.isToken()" that should have been true for that but i
sorry for breaking it i will try to fix it soon.
EDIT: the problem was the Effect in the Command Zone does count as Tokens too.
fixed in r31280.
Last edited by Hanmac on 10 Jun 2016, 05:33, edited 1 time in total.
Who is online
Users browsing this forum: No registered users and 42 guests