- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中mage.game.events.ZoneChangeEvent.getTarget()
方法的一些代码示例,展示了ZoneChangeEvent.getTarget()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZoneChangeEvent.getTarget()
方法的具体详情如下:
包路径:mage.game.events.ZoneChangeEvent
类名称:ZoneChangeEvent
方法名:getTarget
暂无
代码示例来源:origin: magefree/mage
@Override
public boolean checkTrigger(GameEvent event, Game game) {
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
if (zEvent.isDiesEvent() && zEvent.getTarget() != null && StaticFilters.FILTER_PERMANENT_CREATURES.match(zEvent.getTarget(), sourceId, controllerId, game)) {
return true;
}
return false;
}
代码示例来源:origin: magefree/mage
@Override
public void watch(GameEvent event, Game game) {
if (event.getType() == GameEvent.EventType.ZONE_CHANGE) {
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
if (zEvent.isDiesEvent()
&& zEvent.getTarget() != null
&& zEvent.getTarget().isCreature()) {
diedThisTurn.add(zEvent.getTargetId());
}
}
}
代码示例来源:origin: magefree/mage
@Override
public void watch(GameEvent event, Game game) {
if (event.getType() == GameEvent.EventType.ZONE_CHANGE) {
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
if (zEvent.getToZone() == Zone.BATTLEFIELD
&& zEvent.getTarget().isPlaneswalker()) {
players.add(zEvent.getTarget().getControllerId());
}
}
}
代码示例来源:origin: magefree/mage
@Override
public void watch(GameEvent event, Game game) {
if (event.getType() == GameEvent.EventType.ZONE_CHANGE) {
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
if (zEvent.isDiesEvent() && zEvent.getTarget() != null
&& zEvent.getTarget().isCreature()
&& !(zEvent.getTarget() instanceof PermanentToken)) {
int count = getAmountOfNontokenCreatureDiedThisTurn(zEvent.getTargetId());
amountOfCreaturesThatDied.put(zEvent.getTarget().getControllerId(), ++count);
}
}
}
代码示例来源:origin: magefree/mage
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
ZoneChangeEvent zce = (ZoneChangeEvent) event;
return zce.isDiesEvent() && zce.getTarget().isCreature();
}
代码示例来源:origin: magefree/mage
@Override
public boolean checkTrigger(GameEvent event, Game game) {
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
if (zEvent.getFromZone() == Zone.BATTLEFIELD && zEvent.getTarget() != null && zEvent.getTargetId().equals(getTargets().getFirstTarget())) {
this.getTargets().clear(); // else spell fizzles because target creature died
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) {
if (zEvent.getTarget().isOwnedBy(getControllerId())
&& zEvent.getTarget().isCreature()
&& !zEvent.getTarget().getId().equals(getSourceId())) {
return true;
}
}
return false;
}
代码示例来源:origin: magefree/mage
@Override
public boolean checkTrigger(GameEvent event, Game game) {
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
if (zEvent.isDiesEvent() && zEvent.getTarget() != null && zEvent.getTargetId().equals(getTargets().getFirstTarget())) {
this.getTargets().clear(); // else spell fizzles because target creature died
Target target = new TargetPlayer();
target.add(zEvent.getTarget().getControllerId(), game);
this.addTarget(target);
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
&& zEvent.getTarget().isArtifact()
&& !Objects.equals(zEvent.getTarget().getId(), this.getSourceId())) {
this.getTargets().get(0).add(zEvent.getTarget().getControllerId(), game);
return true;
}
return false;
}
代码示例来源:origin: magefree/mage
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
Permanent permanent = ((ZoneChangeEvent) event).getTarget();
Player controller = game.getPlayer(source.getControllerId());
if (controller != null && permanent != null) {
return controller.moveCards(permanent, Zone.EXILED, source, game);
}
return false;
}
代码示例来源:origin: magefree/mage
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
Permanent permanent = ((ZoneChangeEvent) event).getTarget();
if (permanent != null) {
Player player = game.getPlayer(permanent.getControllerId());
if (player != null) {
return player.moveCards(permanent, Zone.EXILED, source, game);
}
}
return false;
}
代码示例来源:origin: magefree/mage
@Override
public void watch(GameEvent event, Game game) {
if (condition) {
return;
}
if (event.getType() == GameEvent.EventType.ZONE_CHANGE
&& ((ZoneChangeEvent) event).isDiesEvent()
&& ((ZoneChangeEvent) event).getTarget().isCreature()) {
condition = true;
}
}
代码示例来源:origin: magefree/mage
@Override
public boolean checkTrigger(GameEvent event, Game game) {
if (super.checkTrigger(event, game)) {
Permanent permanent = ((ZoneChangeEvent) event).getTarget();
if (permanent.getCounters(game).getCount(CounterType.M1M1) == 0) {
return true;
}
}
return false;
}
代码示例来源:origin: magefree/mage
@Override
public boolean checkTrigger(GameEvent event, Game game) {
if (((ZoneChangeEvent) event).isDiesEvent()) {
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
Object object = game.getState().getValue(getSourceId().toString() + "returnedCreature");
if ((object instanceof MageObjectReference) && ((MageObjectReference) object).refersTo(zEvent.getTarget(), game)) {
return true;
}
}
return false;
}
代码示例来源:origin: magefree/mage
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
Permanent permanent = ((ZoneChangeEvent) event).getTarget();
Player controller = game.getPlayer(source.getControllerId());
if (controller != null && permanent != null) {
return controller.moveCardToExileWithInfo(permanent, null, null, source.getSourceId(), game, Zone.BATTLEFIELD, true);
}
return false;
}
代码示例来源:origin: magefree/mage
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
Permanent permanent = ((ZoneChangeEvent) event).getTarget();
Player controller = game.getPlayer(source.getControllerId());
if (controller != null && permanent != null) {
return controller.moveCardToExileWithInfo(permanent, null, "", source.getSourceId(), game, Zone.BATTLEFIELD, true);
}
return false;
}
代码示例来源:origin: magefree/mage
@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
Permanent permanent = ((ZoneChangeEvent)event).getTarget();
if (permanent != null) {
permanent.moveToExile(null, "", source.getSourceId(), game);
new AddExtraTurnControllerEffect().apply(game, source);
return true;
}
return false;
}
代码示例来源:origin: magefree/mage
@Override
public boolean checkTrigger(GameEvent event, Game game) {
ZoneChangeEvent zce = (ZoneChangeEvent) event;
if (zce.isDiesEvent()) {
DamagedByWatcher watcher = game.getState().getWatcher(DamagedByWatcher.class, this.getSourceId());
if (watcher != null) {
return watcher.wasDamaged(zce.getTarget(), game);
}
}
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.getFromZone() == Zone.BATTLEFIELD && zEvent.getToZone() == Zone.GRAVEYARD) {
if (zEvent.getTarget().isCreature()) {
Effect effect = this.getEffects().get(0);
effect.setTargetPointer(new FixedTarget(event.getTargetId()));
return true;
}
}
return false;
}
本文整理了Java中mage.game.events.ZoneChangeEvent.getTargetId()方法的一些代码示例,展示了ZoneChangeEvent.getTargetId()的具
本文整理了Java中mage.game.events.ZoneChangeEvent.isDiesEvent()方法的一些代码示例,展示了ZoneChangeEvent.isDiesEvent()的具
本文整理了Java中mage.game.events.ZoneChangeEvent.getAppliedEffects()方法的一些代码示例,展示了ZoneChangeEvent.getApplie
本文整理了Java中mage.game.events.ZoneChangeEvent.getToZone()方法的一些代码示例,展示了ZoneChangeEvent.getToZone()的具体用法。
本文整理了Java中mage.game.events.ZoneChangeEvent.getPlayerId()方法的一些代码示例,展示了ZoneChangeEvent.getPlayerId()的具
本文整理了Java中mage.game.events.ZoneChangeEvent.getTarget()方法的一些代码示例,展示了ZoneChangeEvent.getTarget()的具体用法。
本文整理了Java中mage.game.events.ZoneChangeEvent.getFromZone()方法的一些代码示例,展示了ZoneChangeEvent.getFromZone()的具
本文整理了Java中com.cardshifter.modapi.cards.ZoneChangeEvent.getCard()方法的一些代码示例,展示了ZoneChangeEvent.getCard
本文整理了Java中com.cardshifter.modapi.cards.ZoneChangeEvent.getDestination()方法的一些代码示例,展示了ZoneChangeEvent.
我是一名优秀的程序员,十分优秀!