mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
* Cloud Cover - Fixed that it not only triggered for controlled permanets.
This commit is contained in:
parent
5348d81b69
commit
339fccd262
1 changed files with 6 additions and 5 deletions
|
@ -89,11 +89,12 @@ class CloudCoverAbility extends TriggeredAbilityImpl {
|
|||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Permanent permanent = game.getPermanent(event.getTargetId());
|
||||
Player controller = game.getPlayer(this.getControllerId());
|
||||
Player targetter = game.getPlayer(event.getPlayerId());
|
||||
if (permanent != null && !permanent.getId().equals(this.getSourceId())
|
||||
&& controller != null && targetter != null
|
||||
&& !controller.getId().equals(targetter.getId())) {
|
||||
getEffects().get(0).setTargetPointer(new FixedTarget(event.getTargetId()));
|
||||
if (permanent != null
|
||||
&& permanent.getControllerId().equals(getControllerId())
|
||||
&& !permanent.getId().equals(this.getSourceId())
|
||||
&& controller != null
|
||||
&& controller.hasOpponent(event.getPlayerId(), game)) {
|
||||
getEffects().get(0).setTargetPointer(new FixedTarget(permanent, game));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue