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 Marek14 » 04 Jun 2016, 17:42
When you activate the equip ability of Grafted Wargear and target the same creature (for example because it's Daru Spiritualist), its unattach ability shouldn't trigger since it never stopped being attached to that creature.
Gatherer ruling:
Gatherer ruling:
Morphling has an amusing typo where its +1/-1 ability on stack claims that I will get the bonus, not the creature.The “becomes unattached” ability triggers if (a) Grafted Wargear leaves the battlefield, (b) the equip ability moves it onto another creature, (c) another effect moves it onto another creature, (d) an effect causes it to become unattached, or (e) the creature leaves the battlefield.
Re: Bug Reports (snapshot builds)
by Bog Wraith » 05 Jun 2016, 16:48
1.5.53-SNAPSHOT-r31270
A.I. had 14 creatures on the attack when this crash occurred:
A.I. had 14 creatures on the attack when this crash occurred:
- ConcurrentModificationException | Open
- Code: Select all
Forge Version: 1.5.53-SNAPSHOT-r31270
Operating System: Mac OS X 10.10.5 x86_64
Java Version: 1.8.0_91 Oracle Corporation
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextNode(HashMap.java:1429)
at java.util.HashMap$KeyIterator.next(HashMap.java:1453)
at java.util.AbstractCollection.addAll(AbstractCollection.java:343)
at java.util.HashSet.<init>(HashSet.java:119)
at forge.game.combat.CombatView.getAttackers(CombatView.java:61)
at forge.screens.match.TargetingOverlay.addArcsForCard(TargetingOverlay.java:279)
at forge.screens.match.TargetingOverlay.assembleArcs(TargetingOverlay.java:160)
at forge.screens.match.TargetingOverlay.access$700(TargetingOverlay.java:57)
at forge.screens.match.TargetingOverlay$OverlayPanel.paintComponent(TargetingOverlay.java:389)
at javax.swing.JComponent.paint(JComponent.java:1056)
at javax.swing.JComponent.paintChildren(JComponent.java:889)
at javax.swing.JComponent.paint(JComponent.java:1065)
at javax.swing.JLayeredPane.paint(JLayeredPane.java:586)
at javax.swing.JComponent.paintChildren(JComponent.java:889)
at javax.swing.JComponent.paint(JComponent.java:1065)
at javax.swing.JLayeredPane.paint(JLayeredPane.java:586)
at javax.swing.JComponent.paintChildren(JComponent.java:889)
at javax.swing.JComponent.paint(JComponent.java:1065)
at javax.swing.JComponent.paintToOffscreen(JComponent.java:5210)
at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(RepaintManager.java:1579)
at javax.swing.RepaintManager$PaintManager.paint(RepaintManager.java:1502)
at javax.swing.RepaintManager.paint(RepaintManager.java:1272)
at javax.swing.JComponent._paintImmediately(JComponent.java:5158)
at javax.swing.JComponent.paintImmediately(JComponent.java:4969)
at javax.swing.RepaintManager$4.run(RepaintManager.java:831)
at javax.swing.RepaintManager$4.run(RepaintManager.java:814)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:814)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:789)
at javax.swing.RepaintManager.prePaintDirtyRegions(RepaintManager.java:738)
at javax.swing.RepaintManager.access$1200(RepaintManager.java:64)
at javax.swing.RepaintManager$ProcessingRunnable.run(RepaintManager.java:1732)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
'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 Hanmac » 05 Jun 2016, 17:33
@Bog Wraith about that ConcurrentModificationException, many more get that one too, sometimes it does crash in nextEntry, sometimes it does nextNode (depending on the java version i think)
i do test if ConcurrentHashMap would solve this problem.
because the crash does happen internal of java when turning that HashMap into a HashSet.
i do test if ConcurrentHashMap would solve this problem.
because the crash does happen internal of java when turning that HashMap into a HashSet.
Re: Bug Reports (snapshot builds)
by Bog Wraith » 06 Jun 2016, 00:14
I'm not a coder so what you're telling me is not anything I can understand, but I will help if I can when it comes to reporting bugs & testing them when they're fixed as I've done in the past. I especially like testing the latest snapshots as it helps to get the next public release ready for prime time users & it affords us the chance to play & learn with the latest sets & cards before the next version is ready.Hanmac wrote:@Bog Wraith about that ConcurrentModificationException, many more get that one too, sometimes it does crash in nextEntry, sometimes it does nextNode (depending on the java version i think)
i do test if ConcurrentHashMap would solve this problem.
because the crash does happen internal of java when turning that HashMap into a HashSet.
'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 Hanmac » 06 Jun 2016, 14:41
@Bog Wraith: its just that what i think was the problem.
as for now it seems it did fix it.
but now (i need to check if that was the problem) i get:
"AI Attack declaration invalid"
when the AI does have two Silent Arbiter. but i need to investigate more where the problem is or if i was the culprit.
===
PS: i am currently trying to implement Hedonist's Trove.
for that i found two things with "may be played"
first with "AddHiddenKeyword$ May be played"
second with "MayPlay$ True"
both are used with "Mode$ Continuous"
which one is the correct way? or is there a difference?
as for now it seems it did fix it.
but now (i need to check if that was the problem) i get:
"AI Attack declaration invalid"
when the AI does have two Silent Arbiter. but i need to investigate more where the problem is or if i was the culprit.
===
PS: i am currently trying to implement Hedonist's Trove.
for that i found two things with "may be played"
first with "AddHiddenKeyword$ May be played"
second with "MayPlay$ True"
both are used with "Mode$ Continuous"
which one is the correct way? or is there a difference?
Re: Bug Reports (snapshot builds)
by friarsol » 06 Jun 2016, 17:10
The problem with Hedonist's Trove is that Forge doesn't really track which effect was used to cast things.Hanmac wrote:PS: i am currently trying to implement Hedonist's Trove.
for that i found two things with "may be played"
first with "AddHiddenKeyword$ May be played"
second with "MayPlay$ True"
both are used with "Mode$ Continuous"
which one is the correct way? or is there a difference?
The "may be played" keyword is the 'simple' version, and the 'MayPlay' handler is the more complex one. You'd probably need to use the MayPlay version, with some type of restriction so when attempting to cast the card the tracking takes places. Not only does the Trove need to know when things it exiled were cast, it also needs to know if they were cast through this effect. This probably cascades a fair amount into when cards have multiple "MayPlay" effects, the creator of the effect is recorded, and the user has to choose which "May Play" effect they are playing via.
- 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 » 06 Jun 2016, 17:24
@friarsol: thanks good to know, i will experiment with it and try to add the creator of the effect to the host card.
if you are interested, that is my current state of the card, its not tested yet. My idea was to catch the Played event when something does hit the Stack from exile while remembered.
out.setMadness(in.isMadness());
only works for Pyromancer's Goggles works, but Replicate from Djinn Illuminatus does fizzle ...
a long investigation with debug output did show that the x-values where not set when the spell is copied though Replicate.
if you are interested, that is my current state of the card, its not tested yet. My idea was to catch the Played event when something does hit the Stack from exile while remembered.
- Code: Select all
Name:Hedonist's Trove
ManaCost:5 B B
Types:Enchantment
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigExile | TriggerDescription$ When CARDNAME enters the battlefield, exile all cards from target opponent's graveyard.
SVar:TrigExile:AB$ ChangeZoneAll | Cost$ 0 | ValidTgts$ Opponent | TgtPrompt$ Select target Opponent | Origin$ Graveyard | Destination$ Exile | ChangeType$ Card | IsCurse$ True | RememberChanged$ True
S:Mode$ Continuous | MayPlay$ True | Affected$ Land.IsRemembered | AffectedZone$ Exile | Description$ ou may play land cards exiled with CARDNAME.
S:Mode$ Continuous | MayPlay$ True | Affected$ Card.nonLand+IsRemembered | AffectedZone$ Exile | CheckSVar$ X | SVarCompare$ EG0 | Description$ You may play cards exiled with CARDNAME.
T:Mode$ ChangesZone | Origin$ Exile | Destination$ Stack | Static$ True | ValidCard$ Card.nonLand+IsRemembered | Execute$ DBTrigSpellPlayed
T:Mode$ ChangesZone | Origin$ Exile | Destination$ Any | ExcludedDestinations$ Stack | Static$ True | ValidCard$ Card.IsRemembered | Execute$ DBForget
SVar:DBTrigSpellPlayed:DB$ StoreSVar | SVar$ X | Type$ CountSVar | Expression$ X/Plus.1 | SubAbility$ DBForget
SVar:DBForget:DB$ Pump | Defined$ TriggeredCard | ForgetObjects$ TriggeredCard
T:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Any | Static$ True | ValidCard$ Card.Self | Execute$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
T:Mode$ Phase | Phase$ Cleanup | Execute$ TrigReset | Static$ True
SVar:TrigReset:DB$ StoreSVar | SVar$ X | Type$ Number | Expression$ 0
SVar:X:Number$0
SVar:Picture:http://www.wizards.com/global/images/magic/general/hedonists_trove.jpg
Oracle:When Hedonist's Trove enters the battlefield, exile all cards from target opponent's graveyard.\nYou may play land cards exiled with Hedonist's Trove.\nYou may cast nonland cards exiled with Hedonist's Trove. You can't cast more than one spell this way each turn.
out.setMadness(in.isMadness());
only works for Pyromancer's Goggles works, but Replicate from Djinn Illuminatus does fizzle ...
a long investigation with debug output did show that the x-values where not set when the spell is copied though Replicate.
Re: Bug Reports (snapshot builds)
by friarsol » 06 Jun 2016, 18:24
Looks pretty similar to my protoype -
viewtopic.php?f=52&t=17152&p=178985&hilit=hedonist%27s+trove#p178985
viewtopic.php?f=52&t=17152&p=178985&hilit=hedonist%27s+trove#p178985
- 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 » 06 Jun 2016, 19:06
You seem to be assuming that Madness is the issue, while it looks like Djinn Illuminatus is.Hanmac wrote:PS: i didn't know if you tried it before, but did you take a look at Madness spells with xCost with getting Replicate from Djinn Illuminatus?
out.setMadness(in.isMadness());
only works for Pyromancer's Goggles works, but Replicate from Djinn Illuminatus does fizzle ...
a long investigation with debug output did show that the x-values where not set when the spell is copied though Replicate.
It definitely should be copying the spell that's cast, not "SourceFirstSpell".AB$ CopySpellAbility | Cost$ 0 | Defined$ SourceFirstSpell | Amount$ %d", magnitude)
- 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 Marek14 » 07 Jun 2016, 06:51
Around half of investigate cards lacks TokenAltImage command to use all six images:
Bygone Bishop, Confirm Suspicions, Daring Sleuth, Declaration in Stone, Expose Evil, Jace's Scrutiny, Magnifying Glass, Ongoing Investigation, Tamiyo's Journal, Tireless Tracker, Trail of Evidence, Ulvenwald Mysteries
Bygone Bishop, Confirm Suspicions, Daring Sleuth, Declaration in Stone, Expose Evil, Jace's Scrutiny, Magnifying Glass, Ongoing Investigation, Tamiyo's Journal, Tireless Tracker, Trail of Evidence, Ulvenwald Mysteries
Re: Bug Reports (snapshot builds)
by Agetian » 07 Jun 2016, 08:13
Fixed (r31275).Marek14 wrote:Around half of investigate cards lacks TokenAltImage command to use all six images:
Bygone Bishop, Confirm Suspicions, Daring Sleuth, Declaration in Stone, Expose Evil, Jace's Scrutiny, Magnifying Glass, Ongoing Investigation, Tamiyo's Journal, Tireless Tracker, Trail of Evidence, Ulvenwald Mysteries
- 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 » 07 Jun 2016, 08:44
@friarsol: i managed to fix it after a long go.
the SpellAbilityStackInstance did had the X value, but not the Card.
so i changed that the Copy in the factory does try to copy the x Value from the StackInstance if possible.
i tested it and it does work so far.
===
about the investigate, i would still have it liked more if there would be an Action/Effect where that stuff is bundled, but its okay if it works. (until new cards will broke it)
the SpellAbilityStackInstance did had the X value, but not the Card.
so i changed that the Copy in the factory does try to copy the x Value from the StackInstance if possible.
i tested it and it does work so far.
===
about the investigate, i would still have it liked more if there would be an Action/Effect where that stuff is bundled, but its okay if it works. (until new cards will broke it)
Re: Bug Reports (snapshot builds)
by Marek14 » 07 Jun 2016, 10:12
AI cast False Peace on itself (a strange decision by itself), but the bug is that AI skipped combat on that turn -- False Peace says that the affected player skips combat on his NEXT turn.
Re: Bug Reports (snapshot builds)
by friarsol » 07 Jun 2016, 12:33
Probably the "correct" fix was making replicate a true trigger like Cascade.Hanmac wrote:@friarsol: i managed to fix it after a long go.
the SpellAbilityStackInstance did had the X value, but not the Card.
so i changed that the Copy in the factory does try to copy the x Value from the StackInstance if possible.
i tested it and it does work so far.
===
about the investigate, i would still have it liked more if there would be an Action/Effect where that stuff is bundled, but its okay if it works. (until new cards will broke it)
That's not how we've done things in the past, especially when it's not doing anything out of the ordinary. It's literally just creating a token. Effects should be kept very generic, a one shot effect we never see again isn't very useful.
- 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 Marek14 » 07 Jun 2016, 12:52
Endless Whispers causes creatures to trigger twice.
Who is online
Users browsing this forum: No registered users and 29 guests