mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
- Fixed #8071
This commit is contained in:
parent
3725c60281
commit
64d533b70f
1 changed files with 4 additions and 5 deletions
|
@ -136,24 +136,23 @@ class PeaceTalksPlayersAndPermanentsCantBeTargetsOfSpellsOrActivatedAbilities ex
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean checksEventType(GameEvent event, Game game) {
|
public boolean checksEventType(GameEvent event, Game game) {
|
||||||
return event.getType() == GameEvent.EventType.CAST_SPELL
|
return event.getType() == GameEvent.EventType.TARGET;
|
||||||
|| event.getType() == GameEvent.EventType.ACTIVATE_ABILITY;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean applies(GameEvent event, Ability source, Game game) {
|
public boolean applies(GameEvent event, Ability source, Game game) {
|
||||||
for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) {
|
for (UUID playerId : game.getState().getPlayersInRange(source.getControllerId(), game)) {
|
||||||
if (event.getTargetId().equals(playerId)) {
|
if (event.getTargetId().equals(playerId)) {
|
||||||
return false;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (Permanent permanent : game.getBattlefield().getAllActivePermanents()) {
|
for (Permanent permanent : game.getBattlefield().getAllActivePermanents()) {
|
||||||
if (event.getTargetId().equals(permanent.getId())) {
|
if (event.getTargetId().equals(permanent.getId())) {
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
|
|
Loading…
Reference in a new issue