-
Notifications
You must be signed in to change notification settings - Fork 782
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
[don't merge] implement [UNF] Xenosquirrels #12742
base: master
Are you sure you want to change the base?
Conversation
So first of all, your replacement effect isn't implementing But as far as I can tell there doesn't exist an appropriate event to replace. ROLL_DIE is fired too early for an effect that reads "after you roll a die" (side note: it's only a replacement effect because that makes the most sense, this is not properly supported by the rules). You need to see the result before making the choice of whether to apply the effect or not. The die rolling code would need careful study and adjustment, and it's entangled with planar die stuff too which is a whole mess. |
Ahh - found the appropriate section in SnickeringSquirrel.java to copy. I am hoping the RollDieType.NUMERICAL will stop it messing with a planar die. When I found SnickeringSquirrel was already implemented, I thought this was going to be pretty simple. |
I don't think it works, because the die hasn't been rolled at the time of the event. Test it in game and see if either card gives you the initial result in time to make the choice. |
public boolean replaceEvent(GameEvent event, Ability source, Game game) { | ||
Player controller = game.getPlayer(source.getControllerId()); | ||
Player dieRoller = game.getPlayer(event.getPlayerId()); | ||
if (controller == null || dieRoller == null || controller != dieRoller) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't compare Player objects directly, compare UUID using equals
|
No description provided.