mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
* Academy Researchers - Fixed that the static filter was modified (evil).
This commit is contained in:
parent
fbc2a7258f
commit
61dff9e3c2
1 changed files with 6 additions and 8 deletions
|
@ -78,12 +78,6 @@ public class AcademyResearchers extends CardImpl {
|
|||
|
||||
class AcademyResearchersEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterCard filter = new FilterCard();
|
||||
|
||||
static {
|
||||
filter.add(new SubtypePredicate("Aura"));
|
||||
}
|
||||
|
||||
AcademyResearchersEffect() {
|
||||
super(Outcome.PutCardInPlay);
|
||||
this.staticText = "you may put an Aura card from your hand onto the battlefield attached to {this}.";
|
||||
|
@ -103,13 +97,17 @@ class AcademyResearchersEffect extends OneShotEffect {
|
|||
Player player = game.getPlayer(source.getControllerId());
|
||||
Permanent permanent = game.getPermanent(source.getSourceId());
|
||||
if (player != null && permanent != null){
|
||||
FilterCard filter = new FilterCard();
|
||||
filter.add(new SubtypePredicate("Aura"));
|
||||
filter.add(new AuraCardCanAttachToPermanentId(permanent.getId()));
|
||||
TargetCardInHand target = new TargetCardInHand(0, 1, filter);
|
||||
if (player.choose(Outcome.PutCardInPlay, target, source.getSourceId(), game)) {
|
||||
Card auraInHand = game.getCard(target.getFirstTarget());
|
||||
if (auraInHand != null) {
|
||||
player.putOntoBattlefieldWithInfo(auraInHand, game, Zone.HAND, source.getSourceId());
|
||||
permanent.addAttachment(auraInHand.getId(), game);
|
||||
game.getState().setValue("attachTo:" + auraInHand.getId(), permanent);
|
||||
if (player.putOntoBattlefieldWithInfo(auraInHand, game, Zone.HAND, source.getSourceId())) {
|
||||
permanent.addAttachment(auraInHand.getId(), game);
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue