mirror of
https://github.com/correl/mage.git
synced 2024-11-15 11:09:30 +00:00
* Recurring Insight - FIxed target handling.
This commit is contained in:
parent
132ded19f6
commit
50250176ed
1 changed files with 6 additions and 8 deletions
|
@ -49,13 +49,13 @@ public class RecurringInsight extends CardImpl {
|
|||
public RecurringInsight(UUID ownerId) {
|
||||
super(ownerId, 82, "Recurring Insight", Rarity.RARE, new CardType[]{CardType.SORCERY}, "{4}{U}{U}");
|
||||
this.expansionSetCode = "ROE";
|
||||
|
||||
|
||||
// Rebound
|
||||
this.addAbility(new ReboundAbility());
|
||||
|
||||
// Draw cards equal to the number of cards in target opponent's hand.
|
||||
this.getSpellAbility().addEffect(new RecurringInsightEffect());
|
||||
this.getSpellAbility().addTarget(new TargetOpponent());
|
||||
}
|
||||
|
||||
public RecurringInsight(final RecurringInsight card) {
|
||||
|
@ -81,15 +81,13 @@ class RecurringInsightEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
TargetOpponent target = new TargetOpponent();
|
||||
Player you = game.getPlayer(source.getControllerId());
|
||||
if (target.canChoose(source.getSourceId(), source.getControllerId(), game)) {
|
||||
you.chooseTarget(Outcome.DrawCard, target, source, game);
|
||||
Player opponent = game.getPlayer(target.getFirstTarget());
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
Player opponent = game.getPlayer(getTargetPointer().getFirst(game, source));
|
||||
if (opponent != null) {
|
||||
you.drawCards(opponent.getHand().size(), game);
|
||||
return true;
|
||||
controller.drawCards(opponent.getHand().size(), game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue