sgastudio / wagic

Automatically exported from code.google.com/p/wagic
Other
0 stars 0 forks source link

AI trigger fail (example: Rancor) #749

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. AI casts Rancor on one of its creatures.
2. You kill the enchanted creature.

What is the expected output? What do you see instead?

The Rancor card enchanting the dying creature should return to AI's hand from 
the graveyard. Instead no trigger is shown and nothing happens, so Rancor stays 
in the graveyard.

Please use labels and text to provide additional information.

To prevent any misunderstandings: 

1. Rancor works very fine for YOU. The Rancor tests in test suite all pass! 
This is an AI-exclusive problem!

2. This issue affects ALL cards with a "@movedTo"-trigger. Yet another card 
group not working in the current game.

Original issue reported on code.google.com by dan.solo...@googlemail.com on 24 Oct 2011 at 8:17

GoogleCodeExporter commented 9 years ago
exclamation points are unnecessary. :)

Original comment by omegabla...@gmail.com on 25 Oct 2011 at 10:24

GoogleCodeExporter commented 9 years ago
i allowed ai to cast rancor on its creature, i then killed the creature using 
lightining bolt, no crash.
please post more information on how to reproduce this.

Original comment by omegabla...@gmail.com on 25 Oct 2011 at 10:58

GoogleCodeExporter commented 9 years ago
actually scratch that sorry trying to work on both bug (which are actually 
related to the same thing, at the same time.

Original comment by omegabla...@gmail.com on 25 Oct 2011 at 11:06

GoogleCodeExporter commented 9 years ago
I renamed the issue. Rancor does not cause a crash, but does not return to ai 
hand.

Just read what i wrote in the issue description.

Why did you change it to low priority? If a game based on matches does crash or 
fail because of main errors in the ai code section, the priority should not be 
set as low.
What is your argument then?

Original comment by dan.solo...@googlemail.com on 25 Oct 2011 at 11:24

GoogleCodeExporter commented 9 years ago
I changed it to low becuase im currently working on it right now doc. having it 
set to high will flag all the other devs to start working on it which is wasted 
man power. i even took ownership of it.

Original comment by omegabla...@gmail.com on 25 Oct 2011 at 11:26

GoogleCodeExporter commented 9 years ago
Ok, got that.

Original comment by dan.solo...@googlemail.com on 25 Oct 2011 at 11:40

GoogleCodeExporter commented 9 years ago
this can be reproduced, and is extremely tricky...it seems that for ai 
gameobserver events are not being sent at for @movedto triggers from sources 
that are auras.

Original comment by omegabla...@gmail.com on 25 Oct 2011 at 11:57

GoogleCodeExporter commented 9 years ago
we will need to back track through revs to find the cause of this, there is no 
sign of why the events are not being recieved for ai on movedto....

Original comment by omegabla...@gmail.com on 25 Oct 2011 at 12:08

GoogleCodeExporter commented 9 years ago
bumping to critical it effects all movedto effects for ai either by not 
triggering at all or having a side-effect,

Original comment by omegabla...@gmail.com on 25 Oct 2011 at 12:52

GoogleCodeExporter commented 9 years ago
The "good" new is that this is not an AI specific bug, it's a "player2" 
specific bug, so we can reproduce it in the test suite:

[INIT]
SECONDMAIN
[PLAYER1]
[PLAYER2]
inplay:Llanowar Elves,forest,mountain
hand:Rancor,Shock
[DO]
eot
goto firstmain
Forest
Rancor
Llanowar Elves
Mountain
Shock
Llanowar Elves
[ASSERT]
FIRSTMAIN
[PLAYER2]
graveyard:Llanowar Elves,Shock
hand:Rancor
inplay:forest,mountain
manapool:{0}
[END]

Original comment by wagic.the.homebrew@gmail.com on 30 Oct 2011 at 2:01

GoogleCodeExporter commented 9 years ago
Apologies, that test should be:
[INIT]
SECONDMAIN
[PLAYER1]
[PLAYER2]
inplay:Llanowar Elves,forest,mountain
hand:Rancor,Shock
[DO]
eot
goto firstmain
Forest
Rancor
Llanowar Elves
Mountain
Shock
Llanowar Elves
[ASSERT]
FIRSTMAIN
[PLAYER1]
[PLAYER2]
graveyard:Llanowar Elves,Shock
hand:Rancor
inplay:forest,mountain
manapool:{0}
[END]

I went back to r3800 and could confirm the issue was already there back in 
August, so this is a fairly old issue, maybe it's been here for a long time

Original comment by wagic.the.homebrew@gmail.com on 30 Oct 2011 at 2:58

GoogleCodeExporter commented 9 years ago
I found the problem, the fix is extremely simple. running the test suite now to 
make sure I didn't break anything else.

If that's any consolation, (I don't think it is), all 
autohand/autograveyard/autoexile/etc... abilities have been broken since day 1 
( r1462 , 2 years ago) for player 2.

At a quick glance, this potentially fixes around 300 cards that weren't working 
correctly with player2. Cycling, etc...

Original comment by wagic.the.homebrew@gmail.com on 30 Oct 2011 at 9:25

GoogleCodeExporter commented 9 years ago
Fixed in r4040

Original comment by wagic.the.homebrew@gmail.com on 30 Oct 2011 at 9:35