gpt4 book ai didi

mage.game.events.ZoneChangeEvent.getToZone()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-13 10:16:22 26 4
gpt4 key购买 nike

本文整理了Java中mage.game.events.ZoneChangeEvent.getToZone()方法的一些代码示例,展示了ZoneChangeEvent.getToZone()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZoneChangeEvent.getToZone()方法的具体详情如下:
包路径:mage.game.events.ZoneChangeEvent
类名称:ZoneChangeEvent
方法名:getToZone

ZoneChangeEvent.getToZone介绍

暂无

代码示例

代码示例来源:origin: magefree/mage

@Override
  public boolean applies(GameEvent event, Ability source, Game game) {
    ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
    return zEvent.getToZone() == Zone.GRAVEYARD
        && event.getTargetId().equals(cardId);
  }
}

代码示例来源:origin: magefree/mage

@Override
  public boolean applies(GameEvent event, Ability source, Game game) {
    ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
    return zEvent.getToZone() == Zone.GRAVEYARD
        && zEvent.getTargetId().equals(this.cardId);
  }
}

代码示例来源:origin: magefree/mage

@Override
public boolean checkTrigger(GameEvent event, Game game) {
  if (event.getTargetId().equals(target)) {
    ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
    if (zEvent.getFromZone() == Zone.BATTLEFIELD && zEvent.getToZone() == Zone.GRAVEYARD) {
      return true;
    }
  }
  return false;
}

代码示例来源:origin: magefree/mage

@Override
public void watch(GameEvent event, Game game) {
  if (event.getType() == EventType.ZONE_CHANGE) {
    ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
    if (zEvent.getFromZone() == Zone.BATTLEFIELD && zEvent.getToZone() == Zone.GRAVEYARD) {
      gravestormCount++;
    }
  }
}

代码示例来源:origin: magefree/mage

@Override
public boolean checkEventType(GameEvent event, Game game) {
  if (super.checkEventType(event, game)) {
    return ((ZoneChangeEvent) event).getFromZone() == Zone.BATTLEFIELD && ((ZoneChangeEvent) event).getToZone() == Zone.GRAVEYARD;
  }
  return false;
}

代码示例来源:origin: magefree/mage

@Override
public boolean checkTrigger(GameEvent event, Game game) {
  if (event.getTargetId().equals(this.getSourceId())) {
    ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
    if ((fromZone == null || zEvent.getFromZone() == fromZone) && (toZone == null || zEvent.getToZone() == toZone)) {
      return true;
    }
  }
  return false;
}

代码示例来源:origin: magefree/mage

@Override
public boolean applies(GameEvent event, Ability source, Game game) {
  if (event.getTargetId().equals(source.getSourceId())) {
    ZoneChangeEvent zEvent = (ZoneChangeEvent)event;
    if ( zEvent.getFromZone() == Zone.BATTLEFIELD && zEvent.getToZone() == Zone.GRAVEYARD ) {
      return true;
    }
  }
  return false;
}

代码示例来源:origin: magefree/mage

@Override
public boolean applies(GameEvent event, Ability source, Game game) {
  if (((ZoneChangeEvent)event).getToZone() == Zone.GRAVEYARD
      && event.getTargetId().equals(source.getSourceId())) {
    if (condition == null || condition.apply(game, source)) {
      return true;
    }
  }
  return false;
}

代码示例来源:origin: magefree/mage

@Override
public boolean applies(GameEvent event, Ability source, Game game) {
  if (event.getTargetId().equals(source.getFirstTarget())
      && ((ZoneChangeEvent) event).getFromZone() == Zone.BATTLEFIELD
      && ((ZoneChangeEvent) event).getToZone() != Zone.EXILED) {
    return true;
  }
  return false;
}

代码示例来源:origin: magefree/mage

@Override
  public boolean applies(GameEvent event, Ability source, Game game) {
    ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
    return zEvent.getToZone() == Zone.GRAVEYARD
        && event.getTargetId().equals(getTargetPointer().getFirst(game, source));
  }
}

代码示例来源:origin: magefree/mage

@Override
public boolean applies(GameEvent event, Ability source, Game game) {
  if (event.getTargetId().equals(source.getSourceId())) {
    ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
    if (zEvent.getFromZone() == Zone.STACK && zEvent.getToZone() == Zone.GRAVEYARD
        && source.getSourceId().equals(event.getSourceId())) { // if spell fizzled, the sourceId is null
      return true;
    }
  }
  return false;
}

代码示例来源:origin: magefree/mage

@Override
public boolean applies(GameEvent event, Ability source, Game game) {
  if (event.getType() == EventType.ZONE_CHANGE && event.getTargetId().equals(source.getSourceId())) {
    ZoneChangeEvent zEvent = (ZoneChangeEvent)event;
    if (zEvent.getToZone() == Zone.GRAVEYARD && zEvent.getFromZone() == Zone.BATTLEFIELD) {
      return true;
    }
  }
  return false;
}

代码示例来源:origin: magefree/mage

@Override
public boolean applies(GameEvent event, Ability source, Game game) {
  if (event.getType() == GameEvent.EventType.ZONE_CHANGE
      && event.getTargetId().equals(getTargetPointer().getFirst(game, source))
      && ((ZoneChangeEvent) event).getFromZone() == Zone.BATTLEFIELD
      && ((ZoneChangeEvent) event).getToZone() != Zone.EXILED) {
    return true;
  }
  return false;
}

代码示例来源:origin: magefree/mage

@Override
public boolean applies(GameEvent event, Ability source, Game game) {
  if (((ZoneChangeEvent) event).getToZone() == Zone.GRAVEYARD) {
    Card card = game.getCard(event.getTargetId());
    if (card != null && game.getOpponents(source.getControllerId()).contains(card.getOwnerId())) {
      return true;
    }
  }
  return false;
}

代码示例来源:origin: magefree/mage

@Override
public boolean checkTrigger(GameEvent event, Game game) {
  ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
  if (zEvent.getFromZone() == Zone.BATTLEFIELD && zEvent.getToZone() == Zone.GRAVEYARD) {
    Permanent permanent = (Permanent) game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD);
    if (permanent != null && filter.match(permanent, sourceId, controllerId, game)) {
      return true;
    }
  }
  return false;
}

代码示例来源:origin: magefree/mage

@Override
  public boolean applies(GameEvent event, Ability source, Game game) {
    ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
    if (zEvent.getToZone() == Zone.GRAVEYARD) {
      KessDissidentMageWatcher watcher = game.getState().getWatcher(KessDissidentMageWatcher.class);
      return (watcher != null
          && source.getSourceId().equals(watcher.spellCastWasAllowedBy(
              new MageObjectReference(event.getTargetId(), game))));
    }
    return false;
  }
}

代码示例来源:origin: magefree/mage

@Override
public boolean applies(GameEvent event, Ability source, Game game) {
  ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
  if (zEvent.getToZone() == Zone.BATTLEFIELD && (zEvent.getFromZone() == Zone.GRAVEYARD || zEvent.getFromZone() == Zone.LIBRARY)) {
    Card card = game.getCard(zEvent.getTargetId());
    if (card != null && card.isCreature()) {
      return true;
    }
  }
  return false;
}

代码示例来源:origin: magefree/mage

@Override
public boolean checkTrigger(GameEvent event, Game game) {
  if (((ZoneChangeEvent) event).getToZone() == Zone.GRAVEYARD &&
      ((ZoneChangeEvent) event).getFromZone() == Zone.BATTLEFIELD) {
    Permanent p = (Permanent) game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD);
    if (p.isControlledBy(this.getControllerId()) && p.isCreature()) {
      return true;
    }
  }
  return false;
}

代码示例来源:origin: magefree/mage

@Override
public boolean checkTrigger(GameEvent event, Game game) {
  ZoneChangeEvent zce = (ZoneChangeEvent)event;
  if(zce.getFromZone() == Zone.BATTLEFIELD && zce.getToZone() == Zone.HAND) {
    for(Effect effect: getEffects()) {
      effect.setTargetPointer(new FixedTarget(zce.getTarget().getOwnerId()));
    }
    return true;
  }
  return false;
}

代码示例来源:origin: magefree/mage

@Override
public boolean checkTrigger(GameEvent event, Game game) {
  ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
  if (zEvent.getToZone() == Zone.GRAVEYARD && !event.getTargetId().equals(getSourceId())) {
    Card card = game.getCard(event.getTargetId());
    if (card != null) {
      this.getEffects().get(0).setTargetPointer(new FixedTarget(card.getId()));
      return true;
    }
  }
  return false;
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com