Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue with adjacent minions #28

Closed
hstoner009 opened this issue Apr 8, 2015 · 5 comments
Closed

issue with adjacent minions #28

hstoner009 opened this issue Apr 8, 2015 · 5 comments
Labels

Comments

@hstoner009
Copy link

Hey,

I'll look into joining the irc channel. I was running the following test and hit "AssertionError: Zone.GRAVEYARD". The error looks like it has to do with the zone assertion in the adjacentMinions function.

    game = prepare_game()
    dire1 = game.player1.give("EX1_162")
    dire2 = game.player1.give("EX1_162")
    dire1.play()
    dire2.play()
    game.endTurn();
    yeti = game.player2.give("GVG_078")
    yeti.play()
    yeti.attack(dire2)

Interestingly enough, if the yeti attack dire1, the assert is not triggered.

@jleclanche
Copy link
Owner

Thanks. I'm currently doing a pretty massive revamp of the tag system so this one will have to wait until that's done.

@hstoner009
Copy link
Author

No problem! If I am bombarding you too frequently with these issues, let me know and I can try to queue up more issues that I observe before I pass them along to you.

@jleclanche
Copy link
Owner

No don't worry, file as much as you want, I appreciate it a lot. It helps having someone test stuff for actual situations. =)

But yeah if you have anything immediate, swing by the IRC channel instead. You can try Freenode's Webchat if you don't have an IRC client.

@jleclanche
Copy link
Owner

Phew, done with the tag refactoring.

This is an interesting bug for sure. The true root cause is my lack of support for a "death phase". Deaths currently happen instantaneously.

What this means in practice is that when the yeti hits the wolf, the DAMAGE event is broadcast. That DAMAGE event is what causes the wolf to die, and it is moved to the graveyard during event propagation. During said DAMAGE broadcast, the UPDATE event is re-broadcast all the time to those same entities, and towards the end of the propagation chain is the Aura, which has already been destroyed and whose source is already in the graveyard, but it's still in the event listener.

A real fix for this won't come until I implement the death phase, but I'll see if I can fix it some other way.

jleclanche added a commit that referenced this issue Apr 9, 2015
@jleclanche
Copy link
Owner

Fixed by the new actions API, which includes proper death events :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants