mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 12:02:01 -08:00
* Drooling Groodion - Fixed that the same creature could be targeted from both targets of the activated ability.
This commit is contained in:
parent
28d816b21f
commit
a183afc987
1 changed files with 26 additions and 1 deletions
|
|
@ -67,7 +67,7 @@ public class DroolingGroodion extends CardImpl {
|
|||
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new DroolingGroodionEffect(), new ManaCostsImpl("{2}{B}{G}"));
|
||||
ability.addCost(new SacrificeTargetCost(new TargetControlledCreaturePermanent(1, 1, new FilterControlledCreaturePermanent(), true)));
|
||||
ability.addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature (first target)")));
|
||||
ability.addTarget(new TargetCreaturePermanent(new FilterCreaturePermanent("creature (second target)")));
|
||||
ability.addTarget(new TargetOtherCreaturePermanent(new FilterCreaturePermanent("creature (second target)")));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
@ -112,3 +112,28 @@ class DroolingGroodionEffect extends ContinuousEffectImpl {
|
|||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
class TargetOtherCreaturePermanent extends TargetCreaturePermanent {
|
||||
|
||||
public TargetOtherCreaturePermanent(FilterCreaturePermanent filter) {
|
||||
super(filter);
|
||||
}
|
||||
|
||||
public TargetOtherCreaturePermanent(final TargetOtherCreaturePermanent target) {
|
||||
super(target);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canTarget(UUID controllerId, UUID id, Ability source, Game game) {
|
||||
if (source.getTargets().get(0).getTargets().contains(id)) {
|
||||
return false;
|
||||
}
|
||||
return super.canTarget(controllerId, id, source, game);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TargetOtherCreaturePermanent copy() {
|
||||
return new TargetOtherCreaturePermanent(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue