mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
- Refactored Thrull Surgeon.
This commit is contained in:
parent
de1403c4a0
commit
14d1a24d1c
1 changed files with 13 additions and 13 deletions
|
@ -82,7 +82,7 @@ class ThrullSurgeonEffect extends OneShotEffect<ThrullSurgeonEffect> {
|
|||
|
||||
public ThrullSurgeonEffect() {
|
||||
super(Constants.Outcome.Discard);
|
||||
staticText = "Target player reveals his or her hand. You choose a card from it. That player discards that card";
|
||||
staticText = "Look at target player's hand and choose a card from it. That player discards that card.";
|
||||
}
|
||||
|
||||
public ThrullSurgeonEffect(final ThrullSurgeonEffect effect) {
|
||||
|
@ -91,20 +91,20 @@ class ThrullSurgeonEffect extends OneShotEffect<ThrullSurgeonEffect> {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getFirstTarget());
|
||||
if (player != null) {
|
||||
player.revealCards("Discard", player.getHand(), game);
|
||||
Player you = game.getPlayer(source.getControllerId());
|
||||
if (you != null) {
|
||||
TargetCard target = new TargetCard(Constants.Zone.PICK, new FilterCard());
|
||||
target.setRequired(true);
|
||||
if (you.choose(Constants.Outcome.Benefit, player.getHand(), target, game)) {
|
||||
Card card = player.getHand().get(target.getFirstTarget(), game);
|
||||
if (card != null) {
|
||||
return player.discard(card, source, game);
|
||||
}
|
||||
Player targetPlayer = game.getPlayer(source.getFirstTarget());
|
||||
Player you = game.getPlayer(source.getControllerId());
|
||||
if (targetPlayer != null && you != null) {
|
||||
you.lookAtCards("Discard", targetPlayer.getHand(), game);
|
||||
TargetCard target = new TargetCard(Constants.Zone.PICK, new FilterCard());
|
||||
target.setRequired(true);
|
||||
target.setNotTarget(true);
|
||||
if (you.choose(Constants.Outcome.Benefit, targetPlayer.getHand(), target, game)) {
|
||||
Card card = targetPlayer.getHand().get(target.getFirstTarget(), game);
|
||||
if (card != null) {
|
||||
return targetPlayer.discard(card, source, game);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue