It is currently 26 Apr 2024, 14:24
   
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 excessum » 26 Jan 2017, 11:41

r33426

AI was probably trying to evaluate human's Hissing Quagmire in its before combat phase when it also has its own Hissing Quagmire.
ClassCastException | Open
Code: Select all
Forge Version:    SVN
Operating System: Windows 8.1 6.3 amd64
Java Version:     1.8.0_25 Oracle Corporation

java.lang.ClassCastException: forge.player.PlayerControllerHuman cannot be cast to forge.ai.PlayerControllerAi
   at forge.ai.AiCardMemory.isRememberedCard(AiCardMemory.java:260)
   at forge.ai.ability.AnimateAi.isAnimatedThisTurn(AnimateAi.java:617)
   at forge.ai.ComputerUtilMana.chooseManaAbility(ComputerUtilMana.java:215)
   at forge.ai.ComputerUtilMana.payManaCost(ComputerUtilMana.java:378)
   at forge.ai.ComputerUtilMana.payManaCost(ComputerUtilMana.java:99)
   at forge.ai.ComputerUtilMana.canPayManaCost(ComputerUtilMana.java:62)
   at forge.ai.ComputerUtilCost.canPayCost(ComputerUtilCost.java:474)
   at forge.ai.AiAttackController.getOpponentCreatures(AiAttackController.java:125)
   at forge.ai.AiAttackController.<init>(AiAttackController.java:101)
   at forge.ai.ComputerUtilCard.doesSpecifiedCreatureAttackAI(ComputerUtilCard.java:437)
   at forge.ai.ability.AnimateAi.checkApiLogic(AnimateAi.java:180)
   at forge.ai.SpellAbilityAi.canPlayWithoutRestrict(SpellAbilityAi.java:75)
   at forge.ai.SpellAbilityAi.canPlayAI(SpellAbilityAi.java:48)
   at forge.ai.SpellAbilityAi.canPlayAIWithSubs(SpellAbilityAi.java:31)
   at forge.ai.AiController.canPlaySa(AiController.java:636)
   at forge.ai.AiController.canPlayAndPayFor(AiController.java:620)
   at forge.ai.AiController.chooseSpellAbilityToPlayFromList(AiController.java:1119)
   at forge.ai.AiController.getSpellAbilityToPlay(AiController.java:1091)
   at forge.ai.AiController.chooseSpellAbilityToPlay(AiController.java:1071)
   at forge.ai.PlayerControllerAi.chooseSpellAbilityToPlay(PlayerControllerAi.java:390)
   at forge.game.phase.PhaseHandler.startFirstTurn(PhaseHandler.java:926)
   at forge.game.GameAction.startGame(GameAction.java:1467)
   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)
excessum
 
Posts: 177
Joined: 21 Oct 2013, 02:30
Has thanked: 0 time
Been thanked: 19 times

Re: Bug Reports (snapshot builds)

Postby Agetian » 26 Jan 2017, 11:56

excessum wrote:r33426

AI was probably trying to evaluate human's Hissing Quagmire in its before combat phase when it also has its own Hissing Quagmire.
ClassCastException | Open
Code: Select all
Forge Version:    SVN
Operating System: Windows 8.1 6.3 amd64
Java Version:     1.8.0_25 Oracle Corporation

java.lang.ClassCastException: forge.player.PlayerControllerHuman cannot be cast to forge.ai.PlayerControllerAi
   at forge.ai.AiCardMemory.isRememberedCard(AiCardMemory.java:260)
   at forge.ai.ability.AnimateAi.isAnimatedThisTurn(AnimateAi.java:617)
   at forge.ai.ComputerUtilMana.chooseManaAbility(ComputerUtilMana.java:215)
   at forge.ai.ComputerUtilMana.payManaCost(ComputerUtilMana.java:378)
   at forge.ai.ComputerUtilMana.payManaCost(ComputerUtilMana.java:99)
   at forge.ai.ComputerUtilMana.canPayManaCost(ComputerUtilMana.java:62)
   at forge.ai.ComputerUtilCost.canPayCost(ComputerUtilCost.java:474)
   at forge.ai.AiAttackController.getOpponentCreatures(AiAttackController.java:125)
   at forge.ai.AiAttackController.<init>(AiAttackController.java:101)
   at forge.ai.ComputerUtilCard.doesSpecifiedCreatureAttackAI(ComputerUtilCard.java:437)
   at forge.ai.ability.AnimateAi.checkApiLogic(AnimateAi.java:180)
   at forge.ai.SpellAbilityAi.canPlayWithoutRestrict(SpellAbilityAi.java:75)
   at forge.ai.SpellAbilityAi.canPlayAI(SpellAbilityAi.java:48)
   at forge.ai.SpellAbilityAi.canPlayAIWithSubs(SpellAbilityAi.java:31)
   at forge.ai.AiController.canPlaySa(AiController.java:636)
   at forge.ai.AiController.canPlayAndPayFor(AiController.java:620)
   at forge.ai.AiController.chooseSpellAbilityToPlayFromList(AiController.java:1119)
   at forge.ai.AiController.getSpellAbilityToPlay(AiController.java:1091)
   at forge.ai.AiController.chooseSpellAbilityToPlay(AiController.java:1071)
   at forge.ai.PlayerControllerAi.chooseSpellAbilityToPlay(PlayerControllerAi.java:390)
   at forge.game.phase.PhaseHandler.startFirstTurn(PhaseHandler.java:926)
   at forge.game.GameAction.startGame(GameAction.java:1467)
   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)
This should be fixed now (r33429), thanks! :)

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

Re: Bug Reports (snapshot builds)

Postby SilencertheK9 » 27 Jan 2017, 07:10

Description: Tried to crew Heart of Kiran using the loyalty counter ability selecting Gideon, Ally of Zendikar. Has crashed the game 4 times in a row

NullPointerException | Open
Code: Select all
Forge Version:    1.5.59.002
Operating System: Linux 3.10.61-9815749 armv8l
Java Version:     0 The Android Project

java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.Iterator forge.game.card.CardCollection.iterator()' on a null object reference
   at forge.game.trigger.TriggerCrewed.performTest(TriggerCrewed.java:25)
   at forge.game.trigger.TriggerHandler.canRunTrigger(TriggerHandler.java:480)
   at forge.game.trigger.TriggerHandler.collectTriggerForWaiting(TriggerHandler.java:207)
   at forge.game.trigger.TriggerHandler.resetActiveTriggers(TriggerHandler.java:216)
   at forge.game.zone.MagicStack.removeCardFromStack(MagicStack.java:571)
   at forge.game.zone.MagicStack.finishResolving(MagicStack.java:532)
   at forge.game.zone.MagicStack.resolveStack(MagicStack.java:521)
   at forge.game.phase.PhaseHandler.startFirstTurn(PhaseHandler.java:981)
   at forge.game.GameAction.startGame(GameAction.java:1460)
   at forge.game.Match.startGame(Match.java:95)
   at forge.match.HostedMatch$2.run(HostedMatch.java:220)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
   at java.lang.Thread.run(Thread.java:818)
SilencertheK9
 
Posts: 1
Joined: 27 Jan 2017, 06:46
Has thanked: 0 time
Been thanked: 0 time

Re: Bug Reports (snapshot builds)

Postby twentytwo » 27 Jan 2017, 19:06

r33448 Slow Motion is not forcing me to pay 2 mana or sacrifice a creature at upkeep.
Attachments
slow motion.jpg
twentytwo
 
Posts: 10
Joined: 19 Apr 2015, 18:18
Has thanked: 5 times
Been thanked: 2 times

Re: Bug Reports (snapshot builds)

Postby moush » 27 Jan 2017, 23:53

Marek14 wrote:AI reanimated a creature with Footsteps of the Goryo, but didn't sacrifice it in the end step.
Came here to report this as well, though I was the one casting Goryo.
moush
 
Posts: 13
Joined: 30 Sep 2016, 08:46
Has thanked: 2 times
Been thanked: 2 times

Re: Bug Reports (snapshot builds)

Postby Agetian » 28 Jan 2017, 04:18

twentytwo wrote:r33448 Slow Motion is not forcing me to pay 2 mana or sacrifice a creature at upkeep.
This has been fixed upstream. Thanks for reporting! :)

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

Re: Bug Reports (snapshot builds)

Postby Agetian » 28 Jan 2017, 04:22

moush wrote:
Marek14 wrote:AI reanimated a creature with Footsteps of the Goryo, but didn't sacrifice it in the end step.
Came here to report this as well, though I was the one casting Goryo.
I tested this and it works well in the latest snapshot, so it must have been already taken care of. :) Thanks for reporting!

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

Re: Bug Reports (snapshot builds)

Postby excessum » 28 Jan 2017, 10:26

r33455

Not sure which version caused it but the AI is returning AiPlayDecision.CantAfford for {X}{X} creatures like Hangarback Walker and Walking Ballista. The AI was quite capable of using Hangarback Walker back when ORI was Standard-legal last year.
excessum
 
Posts: 177
Joined: 21 Oct 2013, 02:30
Has thanked: 0 time
Been thanked: 19 times

Re: Bug Reports (snapshot builds)

Postby Agetian » 28 Jan 2017, 14:38

excessum wrote:r33455

Not sure which version caused it but the AI is returning AiPlayDecision.CantAfford for {X}{X} creatures like Hangarback Walker and Walking Ballista. The AI was quite capable of using Hangarback Walker back when ORI was Standard-legal last year.
Hopefully remedied in r33460. Thanks! :)

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

Re: Bug Reports (snapshot builds)

Postby twentytwo » 29 Jan 2017, 09:16

Could you add this little change to forge.game.card.CardFactoryUtil.java line 2744:

This:
Code: Select all
final String counter = "DB$ PutCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ " + n + " | SpellDescription$ put "
                    + Lang.nounWithNumeral(n, "+1/+1 counter") + " on it";
Into This:
Code: Select all
final String counter = "DB$ PutCounter | Defined$ Self | CounterType$ P1P1 | CounterNum$ " + n + " | SpellDescription$ Put "
                    + Lang.nounWithNumeral(n, "+1/+1 counter") + " on it" + ".";
Thanks in advance :)
twentytwo
 
Posts: 10
Joined: 19 Apr 2015, 18:18
Has thanked: 5 times
Been thanked: 2 times

Re: Bug Reports (snapshot builds)

Postby Marek14 » 29 Jan 2017, 22:34

Blight Mamba is blocked by Arcbound Ravager and kills it. The Ravager's modular ability gives no counters.
Now, this is a tricky case, ruleswise. State-based effects cancel +1/+1 and -1/-1 counters at the same time the Ravager dies. But since the Ravager uses LKI when determining how many counters it has, it will see all its +1/+1 counters still on (there is no point where the Ravager is still on the battlefield AND the counters are removed). So in case of lethal -1/-1 counters, modular creatures (and similar effects, plus things like Kinsbaile Borderguard) should still see full amount of counters, before cancellation.
Marek14
Tester
 
Posts: 2761
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 297 times

Re: Bug Reports (snapshot builds)

Postby Agetian » 30 Jan 2017, 16:20

Umm I'm not sure how to fix the issue above, probably someone else will need to take care of it... :/ Sadly, not very familiar with that part of Forge, and couldn't find what's causing it and how to change it without breaking other aspects of the game. Help is very welcome.

I'd like to report something else though that's been bugging me for a while: it looks like the AI is really, really afraid of Vehicles. For example, it once had 7 creatures on the battlefield, most of them with power 2 or 3, and I was at 7 life. The AI could have easily mowed me down by alpha-striking (which it normally would have done at that point). I had only two creatures on the battlefield and a couple vehicles, Aradara Express and some other vehicle. As things stood, I could have either blocked two of the opponent's creatures with my creatures (without crewing anything), or I could have crewed one of my vehicles (but not both at the same time), and overall I would have still had no more than two blockers (since crewing taps at least one creature). Either way I would have taken lethal damage, way more than I had life left (probably around double my life total actually), but the AI did not attack me for 3 consecutive turns, adding one more creature to the board in the process and still not going for lethal. Does anyone know why this is happening? Is the AI somehow wrongly predicting that I can block with all four at once or something? (then again, even if I had four valid active blockers, I still would have taken lethal I think)

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

Re: Bug Reports (snapshot builds)

Postby Hanmac » 30 Jan 2017, 16:26

@Marek14: I will look at it and check if I can get some LKI from it if able.

@Agetian: yeah I noticed something too that the AI is VERY afraid of Vehicle. Good for me when I play them xD. I think it does check that your Vehicle is stronger than each of his creatures and so it does not attack. It didn't seems to notice that it can overrun you.
Hanmac
 
Posts: 954
Joined: 06 May 2013, 18:44
Has thanked: 229 times
Been thanked: 158 times

Re: Bug Reports (snapshot builds)

Postby chthonodynamis » 02 Feb 2017, 18:23

Description: Started a new commander game via random favorite commander option for myself and ai. Crashed before showing hand immediately upon starting the game.

ArrayIndexOutOfBoundsException | Open
Code: Select all
Forge Version:    1.5.60.002
Operating System: Linux 3.10.73-gd28c62a armv8l
Java Version:     0 The Android Project

java.lang.ArrayIndexOutOfBoundsException: length=1; index=1
   at forge.game.card.Card.keywordsToText(Card.java:1466)
   at forge.game.card.Card.getAbilityText(Card.java:1690)
   at forge.game.card.CardView$CardStateView.updateAbilityText(CardView.java:971)
   at forge.game.card.CardView$CardStateView.updateKeywords(CardView.java:980)
   at forge.game.card.Card.addIntrinsicKeyword(Card.java:3370)
   at forge.game.card.CardFactory.readCardFace(CardFactory.java:444)
   at forge.game.card.CardFactory.readCard(CardFactory.java:407)
   at forge.game.card.CardFactory.getCard(CardFactory.java:261)
   at forge.game.card.CardFactory.getCard(CardFactory.java:256)
   at forge.game.card.Card.fromPaperCard(Card.java:6940)
   at forge.game.Match.preparePlayerLibrary(Match.java:193)
   at forge.game.Match.prepareAllZones(Match.java:257)
   at forge.game.Match.startGame(Match.java:83)
   at forge.match.HostedMatch$2.run(HostedMatch.java:220)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
   at java.lang.Thread.run(Thread.java:761)
chthonodynamis
 
Posts: 3
Joined: 11 Mar 2015, 02:27
Has thanked: 0 time
Been thanked: 0 time

Re: Bug Reports (snapshot builds)

Postby onderzeeboot » 03 Feb 2017, 20:09

r33275 (the last release available at krazy's)

The token created by Voice of Resurgence doesn't trigger evolve when it's bigger than the creature with evolve.
onderzeeboot
 
Posts: 31
Joined: 29 Nov 2014, 19:37
Has thanked: 5 times
Been thanked: 0 time

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: MorganWrage and 101 guests


Who is online

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

Login Form