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
Implement Dungeon Master and Nira, Hellkite Duelist #5995
Conversation
Use |
|
||
@Override | ||
public boolean apply(Game game, Ability source) { | ||
for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) { |
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.
You can use game.getOpponents(source.getControllerId())
|
||
Random rnd = new Random(); | ||
int number = 0; | ||
number = rnd.nextInt(4)+2; |
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.
Use xmage's RandomUtil.nextInt()
, not java
I don't think it's correct to use random ability in constructor. There are special cards to work with roll dice events like As Luck Would Have It . Some of that cards can change roll dice result like Krark's Other Thumb. And that's all are in-game events with user dialogs -- it's can't be in constructor. That's why I recommend change random to |
I was following file naming that we have already if there's multiple tokens of the same creature type. For example, we have BeastToken, BeastToken2, BeastToken3, and BeastToken4. |
This for completion of the set, since Chandra, Gremlin Wrangler is already implemented.