It is currently 18 May 2025, 12:36
   
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 » 02 Oct 2014, 00:04

friarsol wrote:Excessum,

It looks like your AI for Convoke is incorrect

Convoke AI | Open
for (ManaCostShard toPay : cost) {
for (Card c : list) {
if (c.hasShardinCost(toPay)) {


There's two issues here (which really are two faces of the same problem):

1) Convoke should be comparing the color of the creatures to the Shards left to pay (matters for color changing cards)
2) Tokens wouldn't have mana costs, but can tap for colored convoke mana.
You are correct. Is there a simple way to do this other than brute-forcing a switch with "isBlah" + "ManaCostShard.Blah"? I could not find a simple way to convert between the colours returned from the Card API and the ManaCost API.
excessum
 
Posts: 177
Joined: 21 Oct 2013, 02:30
Has thanked: 0 time
Been thanked: 19 times

Re: Bug Reports (snapshot builds)

Postby friarsol » 02 Oct 2014, 00:23

Hmm.. maybe something in ColorSet or CardColor? Not sure I haven't looked at any of that stuff since I was implementing Celestial Dawn and friends.
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 » 02 Oct 2014, 05:04

r27774: The game is currently unplayable for me. I did not get to see my opening hand and I did not see my hand at all until my turn (I was on the draw). Then, the initial seven cards suddenly appeared and I only got to see the card I actually drew later during the turn. I stopped right there and went back to r27764 for now, card visualization appears to be fully broken... :(

- Agetian
Agetian
Programmer
 
Posts: 3486
Joined: 14 Mar 2011, 05:58
Has thanked: 683 times
Been thanked: 569 times

Re: Bug Reports (snapshot builds)

Postby Agetian » 02 Oct 2014, 05:12

I got this crash when casting Avacyn, Guardian Angel and tapping Horizon Canopy for mana after paying WWW with three Plains. I could not reproduce this again under the very same conditions though, so not sure what exactly was really causing it.

RuntimeException | Open
Code: Select all
Forge Version:    1.5.28-SNAPSHOT-r-1u
Operating System: Mac OS X 10.9.5 x86_64
Java Version:     1.7.0_67 Oracle Corporation

java.lang.RuntimeException: Cannot remove input InputPayManaOfCostPayment because it's not on top of stack. Stack = []
   at forge.match.input.InputQueue.removeInput(InputQueue.java:63)
   at forge.match.input.InputSyncronizedBase.stop(InputSyncronizedBase.java:49)
   at forge.match.input.InputPayMana.onStateChanged(InputPayMana.java:414)
   at forge.match.input.InputPayMana.showMessage(InputPayMana.java:408)
   at forge.match.input.InputBase.showMessageInitial(InputBase.java:139)
   at forge.match.input.InputProxy$1.run(InputProxy.java:70)
   at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312)
   at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
   at java.awt.EventQueue.access$200(EventQueue.java:103)
   at java.awt.EventQueue$3.run(EventQueue.java:694)
   at java.awt.EventQueue$3.run(EventQueue.java:692)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
   at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
   at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
- Agetian
Agetian
Programmer
 
Posts: 3486
Joined: 14 Mar 2011, 05:58
Has thanked: 683 times
Been thanked: 569 times

Re: Bug Reports (snapshot builds)

Postby fiend123 » 02 Oct 2014, 06:27

Abilities that move permanents from the graveyard to the battlefield sometimes fizzle for no reasons. Had this happened with Sun Titan and Necromancy.

Screenshot | Open
Image

Forge Version:forge-gui-desktop-1.5.28-SNAPSHOT-r27774.tar
fiend123
 
Posts: 70
Joined: 05 Mar 2012, 17:26
Has thanked: 2 times
Been thanked: 1 time

Re: Bug Reports (snapshot builds)

Postby Marek14 » 02 Oct 2014, 06:53

Agetian wrote:Umm yes, but which "both" replacement effects do apply in this situation?.. I mean, Lightning Helix only deals 3 damage once, to one target... Why would it ask me to order two different replacement effects (to two different targets) if there should theoretically be only one? Or do I misunderstand something about how targeting planeswalkers works? :D

- Agetian
Lightning Helix does not target planeswalkers, simple as that. That's why all that business with replacement effects.

The rules say:
306.7. If noncombat damage would be dealt to a player by a source controlled by an opponent, that opponent may have that source deal that damage to a planeswalker the first player controls instead. This is a redirection effect (see rule 614.9) and is subject to the normal rules for ordering replacement effects (see rule 616). The opponent chooses whether to redirect the damage as the redirection effect is applied.
This actually look a bit unclear whether there is one replacement effect per planeswalker or one replacement effect in total. However, even if there's one per planeswalker, the game logic should still work correctly -- you choose which effect to apply first, then AI decides whether to redirect damage to that particular planeswalker. If it redirects the damage, other effects won't apply (as damage is no longer being dealt to you), but if it chooses to not redirect the damage, then they still apply and will allow to redirect the damage to another planeswalker you control. In your case AI hit the first planeswalker you selected but I've seen cases where it didn't happen.

Using single redirection effect would mean you just decide when to give opponent chance to redirect damage to a planeswalker and he will then decide whether to redirect it and where. The interactions with other effects would be slightly different in that case.

Which is actually correct, then?
Marek14
Tester
 
Posts: 2771
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 302 times

Re: Bug Reports (snapshot builds)

Postby Agetian » 02 Oct 2014, 07:30

Yep, I do understand that the damage from Lightning Helix is done indirectly via redirection because it can't target a planeswalker directly, but just like you I'm not certain which behavior would be rule-correct :D It seemed somewhat counterintuitive that there was a query about two possible replacement effects generated for a single instance of damage dealing effect, so I thought I'd better raise it so that we can discuss it and see if it's a bug or if it's actually correct. So, the question still stands - what *should* really happen here? Is Forge currently doing this correctly?

P.S. The reason I think it struck me as odd is because there seems to be no practical difference (at least in this particular case) what you choose. Let's say the AI casts Lightning Helix and chooses to redirect damage to Elspeth (and not Xenagos). Not matter what I choose in that dialog box ("redirect first to Elspeth, then to Xenagos" or "redirect first to Xenagos, then to Elspeth"), the net effect appears to be the same (the damage is redirected to Elspeth as chosen by the AI, the other redirection is void/nonexistent).

- Agetian
Agetian
Programmer
 
Posts: 3486
Joined: 14 Mar 2011, 05:58
Has thanked: 683 times
Been thanked: 569 times

Re: Bug Reports (snapshot builds)

Postby friarsol » 02 Oct 2014, 12:16

Agetian wrote:P.S. The reason I think it struck me as odd is because there seems to be no practical difference (at least in this particular case) what you choose. Let's say the AI casts Lightning Helix and chooses to redirect damage to Elspeth (and not Xenagos). Not matter what I choose in that dialog box ("redirect first to Elspeth, then to Xenagos" or "redirect first to Xenagos, then to Elspeth"), the net effect appears to be the same (the damage is redirected to Elspeth as chosen by the AI, the other redirection is void/nonexistent).
Sure there might not be a difference in this particular use case, but there is a difference in other damage replacement use cases. Mainly because these use cases are optional (MAY REDIRECT). (Just because the use cases may not effect one another doesn't mean we shouldn't get to order them).

Here's a note on Furnace of Rath for when the use case is important for ordering the effects.

8/1/2005: If multiple effects modify how damage will be dealt, the player who would be dealt damage or the controller of the creature that would be dealt damage chooses the order to apply the effects. For example, Mending Hands says, "Prevent the next 4 damage that would be dealt to target creature or player this turn." Suppose a spell would deal 5 damage to a player who has cast Mending Hands targeting himself or herself. That player can either (a) prevent 4 damage first and then let Furnace of Rath double the remaining 1 damage, taking 2 damage, or (b) double the damage to 10 and then prevent 4 damage, taking 6 damage.


As Marek says, it's unclear whether the redirect should be for the damage or for each Planeswalker. But probably the ordering effects should be a DualListBox for clarity.
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 Marek14 » 02 Oct 2014, 12:50

friarsol wrote:As Marek says, it's unclear whether the redirect should be for the damage or for each Planeswalker. But probably the ordering effects should be a DualListBox for clarity.
The problem with this is that the application of one replacement effect could change the others. For example, applying effect of Swans of Brynn Argol suddenly enables things like dredge or Thought Reflection. The list of replacement effects is not static.
Last edited by Marek14 on 02 Oct 2014, 14:27, edited 1 time in total.
Marek14
Tester
 
Posts: 2771
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 302 times

Re: Bug Reports (snapshot builds)

Postby excessum » 02 Oct 2014, 13:21

Similar to the 1.5.26 threads in the main forum, I am seeing random bugs with Convoke for the latest revisions. Like the random failures to auto-pay mana, the Convoke interface for humans randomly fails to recognise coloured mana selection.

Even when the Convoke is working, the coloured mana cost is not updated on the prompt ie. tapped R creature fails to update the cost from {2}{R}{R} to {2}{R} on the prompt until after the Convoke is accepted. This display bug can be easily verified in dev-mode game-states while the above random failure is much harder to pin down.
excessum
 
Posts: 177
Joined: 21 Oct 2013, 02:30
Has thanked: 0 time
Been thanked: 19 times

Re: Bug Reports (snapshot builds)

Postby Agetian » 02 Oct 2014, 14:38

@ Friarsol, Marek, Elcnesh: Oh, gotcha! Thanks for the clarifications and for a little "brainstorm" here related to ordering replacement abilities. It makes sense now! :)

- Agetian
Agetian
Programmer
 
Posts: 3486
Joined: 14 Mar 2011, 05:58
Has thanked: 683 times
Been thanked: 569 times

Re: Bug Reports (snapshot builds)

Postby ZappaZ » 02 Oct 2014, 20:47

r27777

I can untap Forsaken City during my untap step if I have 0 cards in my hand, by exiling 0 card(s).

http://imgur.com/crOAgrS

Also, I get the prompt to sacrifice a card to untap this land even if it is alreade untapped at every untap step.
ZappaZ
 
Posts: 92
Joined: 26 Jul 2014, 05:37
Has thanked: 26 times
Been thanked: 2 times

Re: Bug Reports (snapshot builds)

Postby ZappaZ » 02 Oct 2014, 21:12

r27777

I have been playing a blue deck today and it seems that after I force the AI to return creatures to it's hand it starts to play creatures "face down" randomly?

On the screenshot, the turn before I made the AI pick up 8-9 creatures with Whelming Wave and when it's the AIs turn it played (among others) a Myr Enforcer face down and one face up, it never does this before I use something like Whelming Wave or Dissipation Field.

Also, the face down creatures seems to have Vigilance, atleast they don't tap when attacking.

http://imgur.com/FcrYAuS
ZappaZ
 
Posts: 92
Joined: 26 Jul 2014, 05:37
Has thanked: 26 times
Been thanked: 2 times

Re: Bug Reports (snapshot builds)

Postby friarsol » 02 Oct 2014, 21:20

ZappaZ wrote:Also, I get the prompt to sacrifice a card to untap this land even if it is alreade untapped at every untap step.
That's not a bug. Nothing about the card says it's trigger wouldn't occur if the card is already untapped.
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 fiend123 » 03 Oct 2014, 08:41

Lightning Bolt and Chain Lightning frizzles for no reason on AI's Strangleroot Geist that has a +1/+1 counter on it.
Screenshot | Open
Image


Forge Version: forge-gui-desktop-1.5.28-SNAPSHOT-r27783.tar
fiend123
 
Posts: 70
Joined: 05 Mar 2012, 17:26
Has thanked: 2 times
Been thanked: 1 time

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 29 guests


Who is online

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

Login Form