mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 20:11:59 -08:00
* Tajuru Preserver - Fixed that also opponent was not able to sacrifice permants due to the effect.
This commit is contained in:
parent
bb478fa9d5
commit
54ceaae222
1 changed files with 12 additions and 8 deletions
|
|
@ -40,6 +40,7 @@ import mage.game.permanent.PermanentCard;
|
|||
import mage.game.stack.Spell;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
/**
|
||||
* @author noxx
|
||||
|
|
@ -97,15 +98,18 @@ class TajuruPreserverEffect extends ReplacementEffectImpl {
|
|||
|
||||
@Override
|
||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||
MageObject object = game.getObject(event.getSourceId());
|
||||
if (object instanceof PermanentCard) {
|
||||
if (game.getOpponents(source.getControllerId()).contains(((PermanentCard)object).getControllerId())) {
|
||||
return true;
|
||||
Permanent permanent = game.getPermanent(event.getTargetId());
|
||||
if (permanent != null && permanent.getControllerId().equals(source.getControllerId())) {
|
||||
MageObject object = game.getObject(event.getSourceId());
|
||||
if (object instanceof PermanentCard) {
|
||||
if (game.getOpponents(source.getControllerId()).contains(((PermanentCard)object).getControllerId())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (object instanceof Spell) {
|
||||
if (game.getOpponents(source.getControllerId()).contains(((Spell)object).getControllerId())) {
|
||||
return true;
|
||||
if (object instanceof Spell) {
|
||||
if (game.getOpponents(source.getControllerId()).contains(((Spell)object).getControllerId())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue