It is currently 11 Nov 2025, 08:02
   
Text Size

Bug Reports (snapshot builds)

Post MTG Forge Related Programming Questions Here

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

Re: Bug Reports (snapshot builds)

Postby Jayburner » 05 Sep 2015, 20:09

There seems to be a bug with the card propaganda it only happens when you play 3 of these cards on the table. When 3 are out the computer attacks as if you don't have any out (not paying any mana per attackers). Having 4 on the table seems to work but you still might want to check.
Jayburner
 
Posts: 5
Joined: 28 Jun 2015, 16:41
Has thanked: 0 time
Been thanked: 0 time

Re: Bug Reports (snapshot builds)

Postby friarsol » 05 Sep 2015, 21:02

Jayburner wrote:There seems to be a bug with the card propaganda it only happens when you play 3 of these cards on the table. When 3 are out the computer attacks as if you don't have any out (not paying any mana per attackers). Having 4 on the table seems to work but you still might want to check.
Are you sure the computer wasn't attacking a Planeswalker?
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 fmartel » 11 Sep 2015, 13:43

Description: [In a quick Gautlet, AI plays a Skithiryx, the Blight Dragon then the game froze]

NullPointerException | Open
Code: Select all
Forge Version:    1.5.45-SNAPSHOT-r-29932
Operating System: Windows 7 6.1 amd64
Java Version:     1.8.0_40 Oracle Corporation

java.lang.NullPointerException
   at forge.ai.ability.PumpAiBase$1.apply(PumpAiBase.java:95)
   at forge.ai.ability.PumpAiBase$1.apply(PumpAiBase.java:88)
   at com.google.common.collect.Iterators$7.computeNext(Iterators.java:647)
   at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
   at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
   at forge.util.collect.FCollection.<init>(FCollection.java:90)
   at forge.game.card.CardCollection.<init>(CardCollection.java:115)
   at forge.game.card.CardLists.filter(CardLists.java:229)
   at forge.ai.ability.PumpAiBase.isUsefulCurseKeyword(PumpAiBase.java:88)
   at forge.ai.ability.PumpAiBase.containsUsefulKeyword(PumpAiBase.java:36)
   at forge.ai.ability.PumpAiBase$6.apply(PumpAiBase.java:526)
   at forge.ai.ability.PumpAiBase$6.apply(PumpAiBase.java:523)
   at com.google.common.collect.Iterators$7.computeNext(Iterators.java:647)
   at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
   at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
   at forge.util.collect.FCollection.<init>(FCollection.java:90)
   at forge.game.card.CardCollection.<init>(CardCollection.java:115)
   at forge.game.card.CardLists.filter(CardLists.java:229)
   at forge.ai.ability.PumpAiBase.getCurseCreatures(PumpAiBase.java:523)
   at forge.ai.ability.PumpAi.pumpTgtAI(PumpAi.java:309)
   at forge.ai.ability.PumpAi.canPlayAI(PumpAi.java:190)
   at forge.ai.SpellAbilityAi.canPlayAIWithSubs(SpellAbilityAi.java:21)
   at forge.ai.AiController.canPlaySa(AiController.java:612)
   at forge.ai.AiController.canPlayAndPayFor(AiController.java:599)
   at forge.ai.AiController.chooseSpellAbilityToPlay(AiController.java:1206)
   at forge.ai.AiController.getSpellAbilityToPlay(AiController.java:1183)
   at forge.ai.AiController.chooseSpellAbilityToPlay(AiController.java:1122)
   at forge.ai.PlayerControllerAi.chooseSpellAbilityToPlay(PlayerControllerAi.java:397)
   at forge.game.phase.PhaseHandler.startFirstTurn(PhaseHandler.java:921)
   at forge.game.GameAction.startGame(GameAction.java:1440)
   at forge.game.Match.startGame(Match.java:96)
   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)
fmartel
 
Posts: 281
Joined: 31 Dec 2013, 19:27
Location: Québec City
Has thanked: 8 times
Been thanked: 4 times

Re: Bug Reports (snapshot builds)

Postby fmartel » 11 Sep 2015, 14:24

Description: [In a quick Gautlet, AI plays Orzhov Euthanist then the game froze]

NullPointerException | Open
Code: Select all
Forge Version:    1.5.45-SNAPSHOT-r-29932
Operating System: Windows 7 6.1 amd64
Java Version:     1.8.0_40 Oracle Corporation

java.lang.NullPointerException
   at forge.game.spellability.SpellAbilityRestriction.checkZoneRestrictions(SpellAbilityRestriction.java:213)
   at forge.game.spellability.SpellAbilityRestriction.canPlay(SpellAbilityRestriction.java:460)
   at forge.game.spellability.Spell.canPlay(Spell.java:88)
   at forge.game.spellability.SpellAbilityView.updateCanPlay(SpellAbilityView.java:57)
   at forge.game.spellability.SpellAbility.setActivatingPlayer(SpellAbility.java:271)
   at forge.ai.ComputerUtilAbility.getOriginalAndAltCostAbilities(ComputerUtilAbility.java:50)
   at forge.ai.AiController.chooseSpellAbilityToPlay(AiController.java:1199)
   at forge.ai.AiController.getSpellAbilityToPlay(AiController.java:1183)
   at forge.ai.AiController.chooseSpellAbilityToPlay(AiController.java:1122)
   at forge.ai.PlayerControllerAi.chooseSpellAbilityToPlay(PlayerControllerAi.java:397)
   at forge.game.phase.PhaseHandler.startFirstTurn(PhaseHandler.java:921)
   at forge.game.GameAction.startGame(GameAction.java:1440)
   at forge.game.Match.startGame(Match.java:96)
   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)
fmartel
 
Posts: 281
Joined: 31 Dec 2013, 19:27
Location: Québec City
Has thanked: 8 times
Been thanked: 4 times

Re: Bug Reports (snapshot builds)

Postby KrazyTheFox » 12 Sep 2015, 14:46

Kytheon, Hero of Akros will transform into Gideon, Battle-Forged if you attack with any three creatures—Kytheon doesn't need to be among them.
User avatar
KrazyTheFox
Programmer
 
Posts: 725
Joined: 18 Mar 2014, 23:51
Has thanked: 66 times
Been thanked: 226 times

Re: Bug Reports (snapshot builds)

Postby Hanmac » 13 Sep 2015, 13:28

the Morbid trigger from Skirsdag High Priest with
Code: Select all
ThisTurnEntered_Graveyard_from_Battlefield_Creature
might need to be written differently

if i sacrifice a manifested non-creature or a animated land it should trigger even if the card is no creature in the graveyard but was one while on the battlefield. currently it does not.

similar and still problems:


still problems with status checking when sacrificing creatures,
it should check the last known status while it was on the battlefield.

===

Creature equipped with Mortarpod and soulbond to Nightshade Peddler got sacrificed by the effect of Mortarpod.

The damage should be deadly because of Deathtouch but its not.
---
might be related to my problem with Savra, Queen of the Golgari
and sacrificing a non-green/non-black creature while controlling Painter's Servant (and changing the color to green or black)
the effect should happen because the creature was green or black while controlling it on the battlefield
---

happens for Ashmouth Hound with Basilisk Collar too.
I attack, enemy blocks but before the damage effect resolves Ashmouth Hound is send to hand, but it had deathtouch while it was on the field

===

new:
transformed cards with different color indicator than the color of the primary card does show the border if the card wrong while being transformed.

===
new Crash:

NullPointerException | Open
Game-0 > java.lang.NullPointerException
at forge.game.spellability.SpellAbilityRestriction.checkZoneRestrictions(SpellAbilityRestriction.java:213)
at forge.game.spellability.SpellAbilityRestriction.canPlay(SpellAbilityRestriction.java:460)
at forge.game.spellability.Spell.canPlay(Spell.java:88)
at forge.game.spellability.SpellAbilityView.updateCanPlay(SpellAbilityView.java:57)
at forge.game.spellability.SpellAbility.setActivatingPlayer(SpellAbility.java:271)
at forge.ai.ComputerUtilAbility.getOriginalAndAltCostAbilities(ComputerUtilAbility.java:50)
at forge.ai.AiController.chooseSpellAbilityToPlay(AiController.java:1199)
at forge.ai.AiController.getSpellAbilityToPlay(AiController.java:1183)
at forge.ai.AiController.chooseSpellAbilityToPlay(AiController.java:1122)
at forge.ai.PlayerControllerAi.chooseSpellAbilityToPlay(PlayerControllerAi.java:397)
at forge.game.phase.PhaseHandler.startFirstTurn(PhaseHandler.java:921)
at forge.game.GameAction.startGame(GameAction.java:1440)
at forge.game.Match.startGame(Match.java:96)
at forge.match.HostedMatch$2.run(HostedMatch.java:220)
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:745)
Gamestate:
Code: Select all
humanlife=93
ailife=4
activeplayer=ai
activephase=MAIN1
humancardsinhand=Gather the Townsfolk
humancardsinlibrary=Isolated Chapel;Temple of Silence;Bloodsoaked Champion;Skirsdag High Priest;Skirsdag High Priest;Cartel Aristocrat;Avacyn's Collar;Xathrid Necromancer;Teysa, Orzhov Scion;Spirit Bonds;Avacyn's Collar;Qarsi Sadist;Precinct Captain;Auriok Champion;Gather the Townsfolk;Mistveil Plains;Viscera Seer;Swamp;Soul Warden;Cartel Aristocrat;Mistveil Plains;Blood Host;Deathgreeter;Spirit Bonds;Kheru Bloodsucker;Plains;Teysa, Orzhov Scion;Thraben Doomsayer;Godless Shrine;Fetid Heath;Thraben Doomsayer;Thraben Doomsayer;Sorin, Solemn Visitor;Temple of Silence;Suture Priest;Auriok Champion;Viscera Seer;Blood Host;Qarsi High Priest;Qarsi High Priest;Isolated Chapel;Godless Shrine
humancardsingraveyard=Bloodsoaked Champion
humancardsinplay=Scoured Barrens;Fetid Heath|Tapped:True;Suture Priest;Godless Shrine|Tapped:True;Mistveil Plains|Tapped:True;Soul Warden;t:Human,P:1,T:1,Cost:no cost,Types:Creature-Human,Keywords:Lifelink,Image:w_1_1_human;Swamp|Tapped:True;Thraben Doomsayer|Tapped:True;Sorin, Solemn Visitor|Counters:LOYALTY,LOYALTY,LOYALTY,LOYALTY,LOYALTY,LOYALTY;Godless Shrine|Tapped:True;Kheru Bloodsucker|Counters:P1P1,P1P1,P1P1,P1P1,P1P1,P1P1,P1P1,P1P1,P1P1,P1P1,P1P1;Plains|Tapped:True;Qarsi Sadist;Precinct Captain;Xathrid Necromancer;t:Zombie,P:2,T:2,Cost:no cost,Types:Creature-Zombie,Keywords:Lifelink,Image:b_2_2_zombie_m14;Scoured Barrens;t:Zombie,P:2,T:2,Cost:no cost,Types:Creature-Zombie,Keywords:Lifelink,Image:b_2_2_zombie_m14;t:Zombie,P:2,T:2,Cost:no cost,Types:Creature-Zombie,Keywords:Lifelink,Image:b_2_2_zombie_m14;Mistveil Plains|Tapped:True;t:Zombie,P:2,T:2,Cost:no cost,Types:Creature-Zombie,Keywords:Lifelink,Image:b_2_2_zombie_m14;Deathgreeter|SummonSick:True;t:Zombie,P:2,T:2,Cost:no cost,Types:Creature-Zombie,Keywords:,Image:b_2_2_zombie_m14|Tapped:True|SummonSick:True;t:Zombie,P:2,T:2,Cost:no cost,Types:Creature-Zombie,Keywords:,Image:b_2_2_zombie_m14|Tapped:True|SummonSick:True
humancardsinexile=
humancardsincommand=t:Sorin, Solemn Visitor emblem,P:0,T:0,Cost:no cost,Types:Effect,Keywords:,Image:null
aicardsinhand=Kozilek, Butcher of Truth;Updraft;Updraft;Updraft
aicardsinlibrary=Birds of Paradise;Paragon of Eternal Wilds;Wall of Wood;Kruphix's Insight;Island;Riftwing Cloudskate;Kruphix's Insight;Wall of Wood;Forest;Forest;Biorhythm;Cudgel Troll;Cudgel Troll;Vigilant Drake;Carapace;Forest;Carapace;Island;Paragon of Eternal Wilds;Kozilek, Butcher of Truth;Realms Uncharted;Carapace;Wall of Wood;Birds of Paradise;Forest;Cudgel Troll;Forest;Forest;Sakura-Tribe Elder;Forest;Island;Merfolk Looter
aicardsingraveyard=Forest;Tropical Island;Island;Scatter the Seeds;Scatter the Seeds;Kruphix's Insight;Kruphix's Insight;Wall of Wood;Birds of Paradise;Paragon of Eternal Wilds;Brushstrider;Cudgel Troll;Misty Rainforest;Riftwing Cloudskate;Carapace
aicardsinplay=Forest;Forest;Forest;Forest;Forest;Forest;Forest;Forest;Breeding Pool
aicardsinexile=
aicardsincommand=
i think he AI did crash while trying to play Kozilek, Butcher of Truth ?

===
Shorecrasher Elemental exiled and come back from the first ability cant turned face up again

===
Cinder Elemental i dont know why or how but it somehow only did deal 0 Damage, but i could not reproduce it.

===

my version: forge-gui-desktop-1.5.45-SNAPSHOT-r29932.tar.bz2
Last edited by Hanmac on 15 Sep 2015, 18:09, edited 1 time in total.
Hanmac
 
Posts: 954
Joined: 06 May 2013, 18:44
Has thanked: 229 times
Been thanked: 158 times

Re: Bug Reports (snapshot builds)

Postby Jayburner » 14 Sep 2015, 16:36

friarsol wrote:
Jayburner wrote:There seems to be a bug with the card propaganda it only happens when you play 3 of these cards on the table. When 3 are out the computer attacks as if you don't have any out (not paying any mana per attackers). Having 4 on the table seems to work but you still might want to check.
Are you sure the computer wasn't attacking a Planeswalker?
No, sometimes even if there is no planeswalker on the board, comp stll attacks without paying mana. This only happens sometimes, but if it does happen it's always once there are 3 Propaganda on the table.
Jayburner
 
Posts: 5
Joined: 28 Jun 2015, 16:41
Has thanked: 0 time
Been thanked: 0 time

Re: Bug Reports (snapshot builds)

Postby QuixoticMcGee » 15 Sep 2015, 07:12

Found in 1.5.45:

The AI does not take into account the +1/+1 buff from the card Selesnya Guildmage when deciding how to block. It will often block thinking it's safe or that the creatures will trade and then I simply activate the ability.
QuixoticMcGee
 
Posts: 1
Joined: 15 Sep 2015, 07:06
Has thanked: 0 time
Been thanked: 0 time

Re: Bug Reports (snapshot builds)

Postby friarsol » 15 Sep 2015, 12:48

QuixoticMcGee wrote:Found in 1.5.45:

The AI does not take into account the +1/+1 buff from the card Selesnya Guildmage when deciding how to block. It will often block thinking it's safe or that the creatures will trade and then I simply activate the ability.
Please read the link in my signature.
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 Hanmac » 15 Sep 2015, 18:10

Shorecrasher Elemental exiled and come back from the first ability cant turned face up again but it still does have its counters but it should not.

my version: forge-gui-desktop-1.5.45-SNAPSHOT-r29932.tar.bz2
Hanmac
 
Posts: 954
Joined: 06 May 2013, 18:44
Has thanked: 229 times
Been thanked: 158 times

Re: Bug Reports (snapshot builds)

Postby friarsol » 22 Sep 2015, 23:20

r30083

Write into Being is confusing now. I'm not sure how it used to work, but I Had to stop and search the card online to see what the popup was asking me about.
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 » 23 Sep 2015, 05:20

friarsol wrote:r30083

Write into Being is confusing now. I'm not sure how it used to work, but I Had to stop and search the card online to see what the popup was asking me about.
I tried fixing this in r30084-30085, it had to do with my initial attempt at fixing abilities such as Explorer's Scope (and Quest for Ula's Temple is another example). The code for AB Dig has become rather tangled, to be honest. I tried a couple things to add a universal solution for the problem (e.g. fix Explorer's Scope without breaking, for example, Write into Being or making Quest for Ula's Temple excessively annoying) but every global solution I tried broke a certain subset of scripts.

The problem as I see it is that whenever ChangeNum is set to All, DigNum is set to 1 in the card scripts, and the ability is marked as Optional (there are currently two cards like that in Forge - Explorer's Scope and Quest for Ula's Temple), the game skips revealing the card to the player, skips prompting the player for the optional ability and also always proceeds with it automatically (as if the user said "Yes").

On the surface it looks like the problem should be easy to solve (e.g. add the necessary logic for ChangeNum=All, DigNum=1, Optional=True), however, there are quite a few card scripts in Forge that seem to use the fact that nothing is revealed or that the user is not prompted (despite having the Optional parameter set) as a feature. A good example for that is, actually, Quest for Ula's Temple which uses a chain of subabilities, one of which has ChangeNum=All, and relies on the fact that the card is revealed only once to the player (in the very beginning with TrigDig). If the logic to reveal the card is global, then Quest for Ula's Temple becomes annoying because it reveals the card to the player three times and, if an optional prompt is thrown in, also adds the useless "Would you like to proceed with the optional ability?" prompt (when the ability is not even actually optional!)

A similar thing happens with Write into Being, in fact, with the exception that there's no issue with the extra reveal, but treating "Optional" globally as the necessity to prompt the user for the dig as an optional ability, once again, causes a bug here because the script for Write into Being (as well as the relevant block of code, for ChangeNum=1, DigNum=1) uses Optional not to mark the entire dig ability as optional, but to treat the "move to the top of the library" part as optional (and otherwise proceed with moving to the bottom of the library instead). Therefore, treating Optional globally as "the ability is optional" does not work here either and causes all sorts of bugs and unwanted side effects in many other cards that use AB Dig.

To add even more confusion to the mix, optionality itself is also treated somewhat differently depending on which mode of AB Dig is used and "Optional$ True" can, in fact, be used to mark entire abilities as optional too (but only for some types of AB Dig). For instance, for the multi-card dig ability in Ajani, Mentor of Heroes, optionality is treated as the ability for the user to press "Cancel" when choosing a creature card, in which case the entire optional ability ("you may reveal and put into your hand") is canceled. However, for the single-card dig ability in Write into Being, optionality is treated as the ability to choose to put the card on the bottom of the library instead of to the top of the library (but the entire ability is not treated as optional).

I could not devise a universal solution here that would have worked cleanly for all cards and did not cause weird bugs elsewhere, but as a hotfix for the issue I introduced a couple script parameters that allow to add an additional forced reveal to the controller and an additional forced user prompt to proceed with or cancel the entire ability. This is definitely not optimal (and complicates card scripting even more than it already is), so ideas for a cleaner solution are indeed welcome...

EDIT: r30085 - implemented a somewhat cleaner solution with parameter names that make more sense and work more predictably.

- Agetian
Last edited by Agetian on 23 Sep 2015, 06:30, edited 10 times in total.
Agetian
Programmer
 
Posts: 3490
Joined: 14 Mar 2011, 05:58
Has thanked: 684 times
Been thanked: 572 times

Re: Bug Reports (snapshot builds)

Postby Marek14 » 23 Sep 2015, 05:49

Maybe the best solution would be to split the Dig into several abilities depending on use?

For example:
Automatic dig (reveal certain number of cards or reveal until condition is satisfied, then do something to the cards without player's input)
Choice dig (look at cards/reveal cards, choose some subset of cards directly from the dialogue that shows them to you, do one thing to the chosen subset and another thing to the rest)
Top card manipulation (look at/reveal the top card only, with simpler UI)
Marek14
Tester
 
Posts: 2774
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 303 times

Re: Bug Reports (snapshot builds)

Postby Agetian » 23 Sep 2015, 09:41

Marek14 wrote:Maybe the best solution would be to split the Dig into several abilities depending on use?

For example:
Automatic dig (reveal certain number of cards or reveal until condition is satisfied, then do something to the cards without player's input)
Choice dig (look at cards/reveal cards, choose some subset of cards directly from the dialogue that shows them to you, do one thing to the chosen subset and another thing to the rest)
Top card manipulation (look at/reveal the top card only, with simpler UI)
This, I think, is actually a very good idea but it'll be a bit time-consuming to implement properly, I think (scripts will have to be carefully modified, and I think there are a lot of scripts using AB Dig in different ways). But still definitely something to consider if and when someone has enough time to dig into the relevant code (the "dig" pun not intended, lol :)).

- Agetian
Agetian
Programmer
 
Posts: 3490
Joined: 14 Mar 2011, 05:58
Has thanked: 684 times
Been thanked: 572 times

Re: Bug Reports (snapshot builds)

Postby friarsol » 23 Sep 2015, 12:47

Marek14 wrote:Maybe the best solution would be to split the Dig into several abilities depending on use?

For example:
Automatic dig (reveal certain number of cards or reveal until condition is satisfied, then do something to the cards without player's input)
Choice dig (look at cards/reveal cards, choose some subset of cards directly from the dialogue that shows them to you, do one thing to the chosen subset and another thing to the rest)
Top card manipulation (look at/reveal the top card only, with simpler UI)
I mean, we already have DigUntil (which you are calling Auto dig) and Choice Dig (which is just normal Dig). For Top card manipulation we have both PeelAndReveal AND Scry. Maybe just some of these cards are using Dig when they should be using something else entirely?
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 34 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 34 users online :: 0 registered, 0 hidden and 34 guests (based on users active over the past 10 minutes)
Most users ever online was 9824 on 10 Nov 2025, 04:33

Users browsing this forum: No registered users and 34 guests

Login Form