It is currently 20 Apr 2024, 16:06
   
Text Size

Bug Reports (snapshot builds)

Post MTG Forge Related Programming Questions Here

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

Re: Bug Reports (snapshot builds)

Postby Djebb » 01 Jan 2017, 18:53

Yo !

This happens anytime i attack with an Identity Thief

Code: Select all
Description: [describe what you were doing when the crash occurred]

[spoiler=ClassCastException][code]
Forge Version:    1.5.58-SNAPSHOT-r32843
Operating System: Windows 10 10.0 amd64
Java Version:     1.8.0_111 Oracle Corporation

java.lang.ClassCastException: forge.game.ability.AbilityApiBased cannot be cast to forge.game.spellability.AbilitySub
   at forge.game.ability.AbilityFactory.getSubAbility(AbilityFactory.java:415)
   at forge.game.ability.AbilityFactory.getAbility(AbilityFactory.java:237)
   at forge.game.ability.AbilityFactory.getAbility(AbilityFactory.java:144)
   at forge.game.ability.AbilityFactory.getAbility(AbilityFactory.java:127)
   at forge.game.ability.AbilityFactory.getAbility(AbilityFactory.java:139)
   at forge.game.ability.AbilityFactory.getAbility(AbilityFactory.java:131)
   at forge.game.trigger.TriggerHandler.runSingleTrigger(TriggerHandler.java:553)
   at forge.game.trigger.TriggerHandler.runNonStaticTriggersForPlayer(TriggerHandler.java:416)
   at forge.game.trigger.TriggerHandler.runWaitingTrigger(TriggerHandler.java:358)
   at forge.game.trigger.TriggerHandler.runWaitingTriggers(TriggerHandler.java:307)
   at forge.game.zone.MagicStack.unfreezeStack(MagicStack.java:163)
   at forge.game.phase.PhaseHandler.onPhaseBegin(PhaseHandler.java:268)
   at forge.game.phase.PhaseHandler.startFirstTurn(PhaseHandler.java:977)
   at forge.game.GameAction.startGame(GameAction.java:1456)
   at forge.game.Match.startGame(Match.java:95)
   at forge.match.HostedMatch$2.run(HostedMatch.java:220)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
[/spoiler]
Last edited by Djebb on 01 Jan 2017, 22:09, edited 1 time in total.
Djebb
 
Posts: 77
Joined: 06 Dec 2014, 19:44
Has thanked: 1 time
Been thanked: 1 time

Re: Bug Reports (snapshot builds)

Postby Hanmac » 01 Jan 2017, 19:26

@Djebb: fixed in r32921.
Hanmac
 
Posts: 954
Joined: 06 May 2013, 18:44
Has thanked: 229 times
Been thanked: 158 times

Re: Bug Reports (snapshot builds)

Postby Nekoatl » 01 Jan 2017, 20:31

Description: This happens when a sliver is played while Mesmeric Sliver is on the battlefield.

RuntimeException | Open
Code: Select all
Forge Version:    1.5.58-SNAPSHOT-r32716
Operating System: Windows 10 10.0 amd64
Java Version:     1.8.0_101 Oracle Corporation

java.lang.RuntimeException: AbilityFactory : getAbility -- Manaweft Sliver has no SVar: ChooseP
   at forge.game.ability.AbilityFactory.getAbility(AbilityFactory.java:137)
   at forge.game.ability.AbilityFactory.getAbility(AbilityFactory.java:131)
   at forge.game.trigger.TriggerHandler.runSingleTrigger(TriggerHandler.java:553)
   at forge.game.trigger.TriggerHandler.runNonStaticTriggersForPlayer(TriggerHandler.java:416)
   at forge.game.trigger.TriggerHandler.runWaitingTrigger(TriggerHandler.java:358)
   at forge.game.trigger.TriggerHandler.runWaitingTriggers(TriggerHandler.java:307)
   at forge.game.zone.MagicStack.unfreezeStack(MagicStack.java:163)
   at forge.game.zone.MagicStack.finishResolving(MagicStack.java:543)
   at forge.game.zone.MagicStack.resolveStack(MagicStack.java:521)
   at forge.game.phase.PhaseHandler.startFirstTurn(PhaseHandler.java:980)
   at forge.game.GameAction.startGame(GameAction.java:1451)
   at forge.game.Match.startGame(Match.java:95)
   at forge.match.HostedMatch$2.run(HostedMatch.java:220)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
Nekoatl
 
Posts: 196
Joined: 22 Aug 2013, 20:13
Has thanked: 21 times
Been thanked: 8 times

Re: Bug Reports (snapshot builds)

Postby Marek14 » 01 Jan 2017, 22:08

Shrine of the Forsaken Gods has a typo in its second ability (the cost is listed twice).
Marek14
Tester
 
Posts: 2760
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 296 times

Re: Bug Reports (snapshot builds)

Postby Djebb » 01 Jan 2017, 22:10

Hanmac wrote:@Djebb: fixed in r32921.
nice !
Djebb
 
Posts: 77
Joined: 06 Dec 2014, 19:44
Has thanked: 1 time
Been thanked: 1 time

Re: Bug Reports (snapshot builds)

Postby Agetian » 02 Jan 2017, 04:58

Nekoatl wrote:Description: This happens when a sliver is played while Mesmeric Sliver is on the battlefield.

RuntimeException | Open
Code: Select all
Forge Version:    1.5.58-SNAPSHOT-r32716
Operating System: Windows 10 10.0 amd64
Java Version:     1.8.0_101 Oracle Corporation

java.lang.RuntimeException: AbilityFactory : getAbility -- Manaweft Sliver has no SVar: ChooseP
   at forge.game.ability.AbilityFactory.getAbility(AbilityFactory.java:137)
   at forge.game.ability.AbilityFactory.getAbility(AbilityFactory.java:131)
   at forge.game.trigger.TriggerHandler.runSingleTrigger(TriggerHandler.java:553)
   at forge.game.trigger.TriggerHandler.runNonStaticTriggersForPlayer(TriggerHandler.java:416)
   at forge.game.trigger.TriggerHandler.runWaitingTrigger(TriggerHandler.java:358)
   at forge.game.trigger.TriggerHandler.runWaitingTriggers(TriggerHandler.java:307)
   at forge.game.zone.MagicStack.unfreezeStack(MagicStack.java:163)
   at forge.game.zone.MagicStack.finishResolving(MagicStack.java:543)
   at forge.game.zone.MagicStack.resolveStack(MagicStack.java:521)
   at forge.game.phase.PhaseHandler.startFirstTurn(PhaseHandler.java:980)
   at forge.game.GameAction.startGame(GameAction.java:1451)
   at forge.game.Match.startGame(Match.java:95)
   at forge.match.HostedMatch$2.run(HostedMatch.java:220)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
Fixed (r32930).

- Agetian
Agetian
Programmer
 
Posts: 3472
Joined: 14 Mar 2011, 05:58
Has thanked: 676 times
Been thanked: 561 times

Re: Bug Reports (snapshot builds)

Postby Agetian » 02 Jan 2017, 05:00

Marek14 wrote:Shrine of the Forsaken Gods has a typo in its second ability (the cost is listed twice).
Fixed (r32931).

- Agetian
Agetian
Programmer
 
Posts: 3472
Joined: 14 Mar 2011, 05:58
Has thanked: 676 times
Been thanked: 561 times

Re: Bug Reports (snapshot builds)

Postby Devilman06 » 02 Jan 2017, 20:14

There seems to be an Issue with planechase in relation to commander. It doesn't use the custom planechase decks and instead opts for a random deck everytime. When you choose the decks then choose the planechase deck it blanks out the opponents deck every time.
Devilman06
 
Posts: 127
Joined: 29 Jan 2010, 03:59
Has thanked: 1 time
Been thanked: 2 times

Re: Bug Reports (snapshot builds)

Postby sugus » 03 Jan 2017, 01:35

This happens when 'Faerie Artisans' ability is put on the stack:

Code: Select all
Description: [describe what you were doing when the crash occurred]

[spoiler=NullPointerException][code]
Forge Version:    1.5.58-SNAPSHOT-r32816
Operating System: Windows 8.1 6.3 x86
Java Version:     1.8.0_31 Oracle Corporation

java.lang.NullPointerException
   at forge.game.ability.AbilityFactory.getAbility(AbilityFactory.java:236)
   at forge.game.ability.AbilityFactory.getAbility(AbilityFactory.java:144)
   at forge.game.ability.AbilityFactory.getAbility(AbilityFactory.java:127)
   at forge.game.ability.AbilityFactory.getAbility(AbilityFactory.java:139)
   at forge.game.ability.AbilityFactory.getSubAbility(AbilityFactory.java:415)
   at forge.game.ability.AbilityFactory.getAbility(AbilityFactory.java:229)
   at forge.game.ability.AbilityFactory.getAbility(AbilityFactory.java:144)
   at forge.game.ability.AbilityFactory.getAbility(AbilityFactory.java:127)
   at forge.game.ability.AbilityFactory.getAbility(AbilityFactory.java:139)
   at forge.game.ability.AbilityFactory.getAbility(AbilityFactory.java:131)
   at forge.game.trigger.TriggerHandler.runSingleTrigger(TriggerHandler.java:553)
   at forge.game.trigger.TriggerHandler.runNonStaticTriggersForPlayer(TriggerHandler.java:416)
   at forge.game.trigger.TriggerHandler.runWaitingTrigger(TriggerHandler.java:362)
   at forge.game.trigger.TriggerHandler.runWaitingTriggers(TriggerHandler.java:307)
   at forge.game.zone.MagicStack.unfreezeStack(MagicStack.java:163)
   at forge.game.zone.MagicStack.finishResolving(MagicStack.java:543)
   at forge.game.zone.MagicStack.resolveStack(MagicStack.java:521)
   at forge.game.phase.PhaseHandler.startFirstTurn(PhaseHandler.java:980)
   at forge.game.GameAction.startGame(GameAction.java:1456)
   at forge.game.Match.startGame(Match.java:95)
   at forge.match.HostedMatch$2.run(HostedMatch.java:220)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
sugus
 
Posts: 10
Joined: 06 Dec 2016, 21:30
Has thanked: 2 times
Been thanked: 0 time

Re: Bug Reports (snapshot builds)

Postby Agetian » 03 Jan 2017, 06:28

sugus wrote:This happens when 'Faerie Artisans' ability is put on the stack:
<...>
Hm, this is an odd card. It crashes because of a typo and AB/DB thing (AB$ with Cost 0 needs to be changed to DB$), but even if that is corrected, the card still works incorrectly, and in a big way - basically it exiles every single card on the battlefield, completely wiping it. I took at look at the code and it looks like the way it's trying to do it (via ChangeZoneAll and Imprinted) does not work since that returns all the cards instead of only the imprinted ones as expected by the script (no idea if that's intentional in that ChangeZoneAll code path, btw). How should we best rewrite this card? :/ Can using Imprint be avoided in this script?

Here's a script that does not crash but it wipes the entire battlefield in one big swoosh:
Code: Select all
Name:Faerie Artisans
ManaCost:3 U
Types:Creature Faerie Artificer
PT:2/2
K:Flying
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Creature.nonToken+OppCtrl | TriggerZones$ Battlefield | OptionalDecider$ You | Execute$ TrigImprint | TriggerDescription$Whenever a nontoken creature enters the battlefield under an opponent's control, create a token that's a copy of that creature except that it's an artifact in addition to its other types. Then exile all other tokens created with Faerie Artisans.
SVar:TrigImprint:DB$ Pump | ImprintCards$ Remembered | SubAbility$ DBCopy
SVar:DBCopy:DB$ CopyPermanent | Defined$ TriggeredCard | Controller$ You | AddTypes$ Artifact | RememberCopied$ True | SubAbility$ DBChangeZoneAll
SVar:DBChangeZoneAll:DB$ ChangeZoneAll | Origin$ Battlefield | Destination$ Exile | ChangeType$ Imprinted
DeckHas:Ability$Token
SVar:Picture:http://www.wizards.com/global/images/magic/general/faerie_artisans.jpg
Oracle:Flying\nWhenever a nontoken creature enters the battlefield under an opponent's control, create a token that's a copy of that creature except that it's an artifact in addition to its other types. Then exile all other tokens created with Faerie Artisans.
- Agetian
Agetian
Programmer
 
Posts: 3472
Joined: 14 Mar 2011, 05:58
Has thanked: 676 times
Been thanked: 561 times

Re: Bug Reports (snapshot builds)

Postby friarsol » 03 Jan 2017, 14:21

Agetian wrote:
sugus wrote:This happens when 'Faerie Artisans' ability is put on the stack:
<...>
Hm, this is an odd card. It crashes because of a typo and AB/DB thing (AB$ with Cost 0 needs to be changed to DB$), but even if that is corrected, the card still works incorrectly, and in a big way - basically it exiles every single card on the battlefield, completely wiping it. I took at look at the code and it looks like the way it's trying to do it (via ChangeZoneAll and Imprinted) does not work since that returns all the cards instead of only the imprinted ones as expected by the script (no idea if that's intentional in that ChangeZoneAll code path, btw). How should we best rewrite this card? :/ Can using Imprint be avoided in this script?

Here's a script that does not crash but it wipes the entire battlefield in one big swoosh:
Code: Select all
Name:Faerie Artisans
ManaCost:3 U
Types:Creature Faerie Artificer
PT:2/2
K:Flying
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Creature.nonToken+OppCtrl | TriggerZones$ Battlefield | OptionalDecider$ You | Execute$ TrigImprint | TriggerDescription$Whenever a nontoken creature enters the battlefield under an opponent's control, create a token that's a copy of that creature except that it's an artifact in addition to its other types. Then exile all other tokens created with Faerie Artisans.
SVar:TrigImprint:DB$ Pump | ImprintCards$ Remembered | SubAbility$ DBCopy
SVar:DBCopy:DB$ CopyPermanent | Defined$ TriggeredCard | Controller$ You | AddTypes$ Artifact | RememberCopied$ True | SubAbility$ DBChangeZoneAll
SVar:DBChangeZoneAll:DB$ ChangeZoneAll | Origin$ Battlefield | Destination$ Exile | ChangeType$ Imprinted
DeckHas:Ability$Token
SVar:Picture:http://www.wizards.com/global/images/magic/general/faerie_artisans.jpg
Oracle:Flying\nWhenever a nontoken creature enters the battlefield under an opponent's control, create a token that's a copy of that creature except that it's an artifact in addition to its other types. Then exile all other tokens created with Faerie Artisans.
- Agetian
I think ChangeType goes through the "Valid" path not the "Defined" path. So it would need to be Card.IsImprinted (or whatever the appropriate name is).
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Bug Reports (snapshot builds)

Postby Agetian » 03 Jan 2017, 14:33

Thanks, Sol! That did the trick! :)

- Agetian
Agetian
Programmer
 
Posts: 3472
Joined: 14 Mar 2011, 05:58
Has thanked: 676 times
Been thanked: 561 times

Re: Bug Reports (snapshot builds)

Postby Marek14 » 03 Jan 2017, 18:59

I still notice some odd failures to play AI suspend cards, but in addition, the ability of Curse of the Cabal doesn't trigger.
Marek14
Tester
 
Posts: 2760
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 296 times

Re: Bug Reports (snapshot builds)

Postby stormcat » 05 Jan 2017, 05:39

:r32968
Mulligan's rule in multiplayer game has not applied to the commander game.(rule 103.4c)
stormcat
 
Posts: 361
Joined: 17 Jun 2015, 05:32
Has thanked: 0 time
Been thanked: 6 times

Re: Bug Reports (snapshot builds)

Postby pfps » 05 Jan 2017, 19:10

Ordering of Simultaneous Abilities
Revision: 32943

[I put an initial report on this problem in the beta list, but I've been
working on it from the current SVN so I guess reporting here is best.]

The ordering of simultaneous abilities isn't working correctly. The problem
is that these abilities are represented by their toString() values, which
are insufficient to distinguish between abilities whose odering matters.
For example, Evolve abilities all have the same toString() value, but it is
often best to evolve Renegade Krasis last, and all Amulet of Vigor untap
abilities have the same toString() value, but sometimes the untaps should be
done in a particular order. With the recent addition of automatic ordering
there is no way to reorder these abilities so this has changed from an
annoyance to a bug.

I have made some changes to fix the problem:

0/ Add the ability to see the card of the trigger of a wrapped ability in
a dual list box. This doesn't do anything to fix the problem, but is a nice
addition to the desktop gui, I think. It is a small self-contained change
to forge-gui-desktop/src/main/java/forge/gui/DualListBox.java

1/ Use the stack description as the toString() of a wrapped ability. This
adds in most of the relevant information. I have made this change in
forge-game/src/main/java/forge/game/trigger/WrappedAbility.java
without lifting the final status of toString() higher up. It might be
better to change the status of toString() to allow a nicer change.

2/ Augment the stack description with the toString() of the host card if the
stack description doesn't include it already and the stack description
includes 'this' as a word. This is to fix evolve, which has text
"Evolve (Whenever a creature enters the battlefield under your control, if
that creature has greater power or toughness than this creature, put a +1/+1
counter on this creature.)". Perhaps a better solution would be to modify
all these abilities to include CARDNAME, but that would require looking at
all the card descriptions.

3/ Use the toString() of a card as the replacement for CARDNAME and
EFFECTSOURCE instead of the name of the card, to distinguish between
different cards with the same name. I have made this change in
forge-game/src/main/java/forge/game/trigger/Trigger.java

These changes are overkill in that abilities that do the same thing can end
up looking different but a real solution would require a major amount
of work.

I can commit these changes if it is felt that they are reasonable.
pfps
 
Posts: 53
Joined: 09 Jan 2015, 14:34
Has thanked: 0 time
Been thanked: 7 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 32 guests


Who is online

In total there are 32 users online :: 0 registered, 0 hidden and 32 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 32 guests

Login Form