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

[don't merge] implement [UNF] Xenosquirrels #12742

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

tiera3
Copy link
Contributor

@tiera3 tiera3 commented Aug 27, 2024

No description provided.

@github-actions github-actions bot added the cards label Aug 27, 2024
@xenohedron xenohedron changed the title Tiera3 xenosquirrels [don't merge] implement [UNF] Xenosquirrels Aug 27, 2024
@xenohedron
Copy link
Contributor

So first of all, your replacement effect isn't implementing checksEventType().

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.

@tiera3
Copy link
Contributor Author

tiera3 commented Aug 27, 2024

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.

@xenohedron
Copy link
Contributor

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) {
Copy link
Contributor

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

@xenohedron
Copy link
Contributor

If you roll the planar die in a Planechase game, you can remove a +1/+1 counter from Xenosquirrels, but you can’t alter the result of the roll. (2022-10-07)

@tiera3
Copy link
Contributor Author

tiera3 commented Aug 27, 2024

You are correct. Snickering Squirrel doesn't work.

image

@tiera3 tiera3 marked this pull request as draft August 27, 2024 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants