It is currently 21 May 2025, 22:09
   
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 drdev » 29 Jul 2013, 23:28

Max mtg wrote:
drdev wrote:I think I know what change I made that would have broken this. I'll fix it today.
Must be that one: http://svn.slightlymagic.net/websvn/dif ... &peg=22682
Yeah, that's what I thought. I guess the match screen is using that function to refresh itself. Probably be good to add a comment there to prevent someone else falling into the same trap I did. I plan to commit a fix in the next couple hours.
drdev
Programmer
 
Posts: 1958
Joined: 27 Jul 2013, 02:07
Has thanked: 189 times
Been thanked: 565 times

Re: Bug Reports (snapshot builds)

Postby xbon » 29 Jul 2013, 23:34

Description: I hit 0 health from opponents Lava Runner, and Crimson Mage, I just destroyed their Vastwood Hydra. They targetted Lava Runner with Vastwood Hydra's ability

IllegalStateException | Open
Code: Select all
Forge Version:    r22698
Operating System: Windows 8 6.2 x86
Java Version:     1.7.0_25 Oracle Corporation

java.lang.IllegalStateException: No opponents left ingame for Lily
   at forge.game.player.Player.getOpponent(Player.java:290)
   at forge.card.ability.ai.SacrificeAi.sacrificeTgtAI(SacrificeAi.java:56)
   at forge.card.ability.ai.SacrificeAi.doTriggerAINoCost(SacrificeAi.java:38)
   at forge.card.ability.SpellAbilityAi.doTriggerNoCostWithSubs(SpellAbilityAi.java:40)
   at forge.card.ability.SpellAbilityAi.doTriggerAI(SpellAbilityAi.java:35)
   at forge.card.ability.AbilityApiBased.doTrigger(AbilityApiBased.java:72)
   at forge.card.trigger.WrappedAbility.doTrigger(WrappedAbility.java:146)
   at forge.game.zone.MagicStack.chooseOrderOfSimultaneousStackEntry(MagicStack.java:793)
   at forge.game.zone.MagicStack.chooseOrderOfSimultaneousStackEntryAll(MagicStack.java:753)
   at forge.game.zone.MagicStack.unfreezeStack(MagicStack.java:215)
   at forge.game.GameAction.checkStateEffects(GameAction.java:935)
   at forge.game.phase.PhaseHandler.startFirstTurn(PhaseHandler.java:926)
   at forge.game.GameAction.startGame(GameAction.java:1512)
   at forge.game.Match$1.run(Match.java:103)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
xbon
 
Posts: 124
Joined: 04 Jun 2013, 22:52
Has thanked: 18 times
Been thanked: 2 times

Re: Bug Reports (snapshot builds)

Postby friarsol » 30 Jul 2013, 01:11

r22698

AI attacks with Lightning Elemental, I cast unsummon. AI recasts after combat, but the Elemental ETB tapped. (Not resetting tap state changing zones)

Even weirder, it doesn't seem to actually untap after that? .. Wait, it just untapped when a Cloud Elemental was cast. I can't tell if this is a redraw issue or what the deal is. There is definitely no Intruder Alarm out or anything else like that.
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 drdev » 30 Jul 2013, 01:16

drdev wrote:
Max mtg wrote:
drdev wrote:I think I know what change I made that would have broken this. I'll fix it today.
Must be that one: http://svn.slightlymagic.net/websvn/dif ... &peg=22682
Yeah, that's what I thought. I guess the match screen is using that function to refresh itself. Probably be good to add a comment there to prevent someone else falling into the same trap I did. I plan to commit a fix in the next couple hours.
Just committed the fix for this issue in r22699.
drdev
Programmer
 
Posts: 1958
Joined: 27 Jul 2013, 02:07
Has thanked: 189 times
Been thanked: 565 times

Re: Bug Reports (snapshot builds)

Postby xbon » 30 Jul 2013, 01:52

r22700, right click to cancel block/attack no longer works.
xbon
 
Posts: 124
Joined: 04 Jun 2013, 22:52
Has thanked: 18 times
Been thanked: 2 times

Re: Bug Reports (snapshot builds)

Postby drdev » 30 Jul 2013, 02:30

xbon wrote:r22700, right click to cancel block/attack no longer works.
Is right-click specifically meant to do that, or does left click work for it to? What is the expected behavior for right-clicking cards in general given there are no context menus? I had made changes to select cards on mouse up instead of mouse down, and specifically only did so on left-click, though I can easily support selecting them on right-click too. I just don't think we should be able to right-click a card to automatically activate an ability, tap a land, or play a card, which was what was happening before.
drdev
Programmer
 
Posts: 1958
Joined: 27 Jul 2013, 02:07
Has thanked: 189 times
Been thanked: 565 times

Re: Bug Reports (snapshot builds)

Postby friarsol » 30 Jul 2013, 03:09

drdev wrote:
xbon wrote:r22700, right click to cancel block/attack no longer works.
Is right-click specifically meant to do that, or does left click work for it to? What is the expected behavior for right-clicking cards in general given there are no context menus? I had made changes to select cards on mouse up instead of mouse down, and specifically only did so on left-click, though I can easily support selecting them on right-click too. I just don't think we should be able to right-click a card to automatically activate an ability, tap a land, or play a card, which was what was happening before.
Yes, it's specifically meant for that. Left click is to declare an attacker/blocker, right click to undeclare an attacker/blocker. This isn't for activating things, it's a specific ability for Combat.
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 drdev » 30 Jul 2013, 14:31

friarsol wrote:
drdev wrote:
xbon wrote:r22700, right click to cancel block/attack no longer works.
Is right-click specifically meant to do that, or does left click work for it to? What is the expected behavior for right-clicking cards in general given there are no context menus? I had made changes to select cards on mouse up instead of mouse down, and specifically only did so on left-click, though I can easily support selecting them on right-click too. I just don't think we should be able to right-click a card to automatically activate an ability, tap a land, or play a card, which was what was happening before.
Yes, it's specifically meant for that. Left click is to declare an attacker/blocker, right click to undeclare an attacker/blocker. This isn't for activating things, it's a specific ability for Combat.
It sounds like you're suggesting that left-clicking an attacker/blocker will allow activation it's abilities, but abilities shouldn't be able to be activated in the Declare Attackers or Declare Blockers phases, so why not let left clicking undeclare the attacker/blocker? This sounds like a design oversight to me.
drdev
Programmer
 
Posts: 1958
Joined: 27 Jul 2013, 02:07
Has thanked: 189 times
Been thanked: 565 times

Re: Bug Reports (snapshot builds)

Postby friarsol » 30 Jul 2013, 14:50

drdev wrote:It sounds like you're suggesting that left-clicking an attacker/blocker will allow activation it's abilities, but abilities shouldn't be able to be activated in the Declare Attackers or Declare Blockers phases, so why not let left clicking undeclare the attacker/blocker? This sounds like a design oversight to me.
No. You are misunderstanding. Left click is to attack/block, right click to unattack/unblock. There's additional functionality related to banding when you left click an attacker that's already attacking.
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 Corwin72 » 30 Jul 2013, 15:08

Build from 2 days ago.
Forgotten Ancient freezes the game if you choose to move 0 counters.
User avatar
Corwin72
 
Posts: 793
Joined: 15 Sep 2009, 13:26
Location: Grayson, Ga
Has thanked: 25 times
Been thanked: 9 times

Re: Bug Reports (snapshot builds)

Postby drdev » 30 Jul 2013, 16:15

friarsol wrote:
drdev wrote:It sounds like you're suggesting that left-clicking an attacker/blocker will allow activation it's abilities, but abilities shouldn't be able to be activated in the Declare Attackers or Declare Blockers phases, so why not let left clicking undeclare the attacker/blocker? This sounds like a design oversight to me.
No. You are misunderstanding. Left click is to attack/block, right click to unattack/unblock. There's additional functionality related to banding when you left click an attacker that's already attacking.
I guess that makes sense. I'm just wondering how discoverable the need to right-click is is for people used to MTGO. Perhaps a tooltip could help if there isn't one already?

EDIT: Right-click support fixed for cards in r22713. Also, since I noticed that the prompt suggests right-clicking to undeclare, there's no need for a tooltip, so never mind on that idea.
drdev
Programmer
 
Posts: 1958
Joined: 27 Jul 2013, 02:07
Has thanked: 189 times
Been thanked: 565 times

Re: Bug Reports (snapshot builds)

Postby friarsol » 31 Jul 2013, 04:06

r22713
AI illegally ignores the "can't be blocked by creature tokens" granted by Legion Loyalist

Game Log | Open
Game outcome: You have won because all opponents have lost
Damage: Tahngarth, Talruum Hero (21) deals 1 damage to Soldier (127).
Damage: Legion Loyalist (7) deals 1 combat damage to Lisa Simpson.
Damage: Tahngarth, Talruum Hero (21) deals 3 combat damage to Lisa Simpson.
Damage: Wolf Pet (2) deals 2 combat damage to Lisa Simpson.
Phase: Human's First Strike Damage
Combat: Lisa Simpson didn't block Wolf Pet (2).
Lisa Simpson assigned Soldier (127) to block Tahngarth, Talruum Hero (21).
Lisa Simpson didn't block Legion Loyalist (7).
Phase: Human's Declare Blockers
Resolve stack: Battalion - Whenever Legion Loyalist and at least two other creatures attack, creatures you control gain first strike and trample until end of turn and can't be blocked by creature tokens this turn.
Resolve stack: Tahngarth, Talruum Hero (21) - (0) deals 0 damage to Tahngarth, Talruum Hero (21) and .
Damage: Soldier (129) deals 1 damage to Tahngarth, Talruum Hero (21).
Damage: Tahngarth, Talruum Hero (21) deals 4 damage to Soldier (129).
Add to stack: Human activated Tahngarth, Talruum Hero (21) targeting .
Mana: Mountain (13) - Tap: Add R to your mana pool.
Mana: Island (35) - Tap: Add U to your mana pool.
Resolve stack: Raise the Alarm (79) - Put (2) 1/1 Soldier tokens onto the battlefield.
Add to stack: Lisa Simpson cast Raise the Alarm (79).
Mana: Kjeldoran Outpost (110) - Tap: Add W to your mana pool.
Mana: Kjeldoran Outpost (108) - Tap: Add W to your mana pool.
Add to stack: Human activated Legion Loyalist (7).
Combat: Human assigned Wolf Pet (2), Tahngarth, Talruum Hero (21) and Legion Loyalist (7) to attack Lisa Simpson.
Phase: Human's Declare Attackers
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 xbon » 31 Jul 2013, 05:02

Description: Just passed priority, Field is on my side Null Champion Level 1, on theirs, Blightsoil Druid.

NullPointerException | Open
Code: Select all
Forge Version:    SVN
Operating System: Windows 8 6.2 x86
Java Version:     1.7.0_25 Oracle Corporation

java.lang.NullPointerException
   at forge.game.combat.CombatUtil.canBeBlocked(CombatUtil.java:188)
   at forge.game.combat.CombatUtil.canBlock(CombatUtil.java:503)
   at forge.card.ability.ai.PumpAiBase.isUsefulPumpKeyword(PumpAiBase.java:236)
   at forge.card.ability.ai.PumpAiBase.containsUsefulKeyword(PumpAiBase.java:32)
   at forge.card.ability.ai.PumpAiBase.shouldPumpCard(PumpAiBase.java:408)
   at forge.card.ability.ai.PumpAiBase$3.apply(PumpAiBase.java:492)
   at forge.card.ability.ai.PumpAiBase$3.apply(PumpAiBase.java:1)
   at com.google.common.collect.Iterators$7.computeNext(Iterators.java:702)
   at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
   at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
   at com.google.common.collect.Lists.newArrayList(Lists.java:144)
   at com.google.common.collect.Lists.newArrayList(Lists.java:125)
   at forge.CardLists.filter(CardLists.java:232)
   at forge.card.ability.ai.PumpAiBase.getPumpCreatures(PumpAiBase.java:489)
   at forge.card.ability.ai.PumpAi.pumpTgtAI(PumpAi.java:224)
   at forge.card.ability.ai.PumpAi.canPlayAI(PumpAi.java:174)
   at forge.card.ability.SpellAbilityAi.canPlayAIWithSubs(SpellAbilityAi.java:21)
   at forge.card.ability.SpellApiBased.canPlayAI(SpellApiBased.java:49)
   at forge.game.ai.AiController.canPlayAndPayFor(AiController.java:478)
   at forge.game.ai.AiController.chooseSpellAbilyToPlay(AiController.java:462)
   at forge.game.ai.AiController.getSpellAbilityToPlay(AiController.java:822)
   at forge.game.ai.AiController.playSpellAbilities(AiController.java:796)
   at forge.game.ai.AiController.onPriorityRecieved(AiController.java:746)
   at forge.game.player.PlayerControllerAi.takePriority(PlayerControllerAi.java:363)
   at forge.game.phase.PhaseHandler.startFirstTurn(PhaseHandler.java:932)
   at forge.game.GameAction.startGame(GameAction.java:1515)
   at forge.game.Match$1.run(Match.java:103)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
xbon
 
Posts: 124
Joined: 04 Jun 2013, 22:52
Has thanked: 18 times
Been thanked: 2 times

Re: Bug Reports (snapshot builds)

Postby Max mtg » 31 Jul 2013, 06:50

For NPE @ CombatUtil.canBeBlocked(CombatUtil.java:188)

code @PumpAiBase:236 first checks that phase is before declare attackers, then uses combat which is obviously null (for there is no combat at that moment) to perform canBlock checks

I have applied a npe check at CombatUtil:177, but that does not seem to fix all possible errors on this code path
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: Bug Reports (snapshot builds)

Postby andrewd13 » 31 Jul 2013, 07:55

Description: Was playing the random mill deck. AI opponent had Wu Scout, Onyx Mage on the field, I had just cast Nemesis of Reason. On the Beginning of Combat phase, the game NPE'd.

Other cards:
Me: Millstone, Whetstone, 3x Island, 2x Swamp
AI: 1x Island, 1x Swamp

NullPointerException | Open
Code: Select all
Forge Version:    1.4.4-SNAPSHOT-r22675
Operating System: Mac OS X 10.7.5 x86_64
Java Version:     1.7.0_25 Oracle Corporation

java.lang.NullPointerException
   at forge.game.combat.CombatUtil.canBeBlocked(CombatUtil.java:188)
   at forge.game.combat.CombatUtil.canBlock(CombatUtil.java:503)
   at forge.card.ability.ai.PumpAiBase.isUsefulPumpKeyword(PumpAiBase.java:236)
   at forge.card.ability.ai.PumpAiBase.containsUsefulKeyword(PumpAiBase.java:32)
   at forge.card.ability.ai.PumpAiBase.shouldPumpCard(PumpAiBase.java:408)
   at forge.card.ability.ai.PumpAiBase$3.apply(PumpAiBase.java:492)
   at forge.card.ability.ai.PumpAiBase$3.apply(PumpAiBase.java:489)
   at com.google.common.collect.Iterators$7.computeNext(Iterators.java:702)
   at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
   at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
   at com.google.common.collect.Lists.newArrayList(Lists.java:144)
   at com.google.common.collect.Lists.newArrayList(Lists.java:125)
   at forge.CardLists.filter(CardLists.java:232)
   at forge.card.ability.ai.PumpAiBase.getPumpCreatures(PumpAiBase.java:489)
   at forge.card.ability.ai.PumpAi.pumpTgtAI(PumpAi.java:222)
   at forge.card.ability.ai.PumpAi.canPlayAI(PumpAi.java:174)
   at forge.card.ability.SpellAbilityAi.canPlayAIWithSubs(SpellAbilityAi.java:21)
   at forge.card.ability.AbilityApiBased.canPlayAI(AbilityApiBased.java:67)
   at forge.game.ai.AiController.canPlayAndPayFor(AiController.java:478)
   at forge.game.ai.AiController.chooseSpellAbilyToPlay(AiController.java:462)
   at forge.game.ai.AiController.getSpellAbilityToPlay(AiController.java:822)
   at forge.game.ai.AiController.playSpellAbilities(AiController.java:796)
   at forge.game.ai.AiController.onPriorityRecieved(AiController.java:746)
   at forge.game.player.PlayerControllerAi.takePriority(PlayerControllerAi.java:363)
   at forge.game.phase.PhaseHandler.startFirstTurn(PhaseHandler.java:932)
   at forge.game.GameAction.startGame(GameAction.java:1512)
   at forge.game.Match$1.run(Match.java:103)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
   at java.lang.Thread.run(Thread.java:724)
andrewd13
 
Posts: 17
Joined: 29 Jul 2013, 15:43
Has thanked: 0 time
Been thanked: 0 time

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 17 guests


Who is online

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

Login Form