本文整理了Java中mage.game.events.ZoneChangeEvent.isDiesEvent()
方法的一些代码示例,展示了ZoneChangeEvent.isDiesEvent()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZoneChangeEvent.isDiesEvent()
方法的具体详情如下:
包路径:mage.game.events.ZoneChangeEvent
类名称:ZoneChangeEvent
方法名:isDiesEvent
暂无
代码示例来源:origin: magefree/mage
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
if (event.getTargetId().equals(source.getSourceId())) {
ZoneChangeEvent zce = (ZoneChangeEvent) event;
return zce.isDiesEvent();
}
return false;
}
代码示例来源:origin: magefree/mage
@Override
public void watch(GameEvent event, Game game) {
if (event.getType() == GameEvent.EventType.ZONE_CHANGE
&& ((ZoneChangeEvent) event).isDiesEvent()) {
//400.3 Intercept only the controller's events
cards.add(event.getTargetId());
}
}
代码示例来源:origin: magefree/mage
@Override
public void watch(GameEvent event, Game game) {
if (event.getType() == GameEvent.EventType.ZONE_CHANGE && ((ZoneChangeEvent)event).isDiesEvent()) {
cards.add(event.getTargetId());
}
}
代码示例来源:origin: magefree/mage
@Override
public boolean checkTrigger(GameEvent event, Game game) {
if (((ZoneChangeEvent) event).isDiesEvent()) {
if (fixedTarget.getFirst(game, this).equals(event.getTargetId())) {
return true;
}
}
return false;
}
代码示例来源:origin: magefree/mage
@Override
public boolean checkEventType(GameEvent event, Game game) {
return (event.getType() == GameEvent.EventType.ENTERS_THE_BATTLEFIELD)
|| (event.getType() == GameEvent.EventType.ZONE_CHANGE
&& ((ZoneChangeEvent) event).isDiesEvent()) ;
}
代码示例来源: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) {
if (((ZoneChangeEvent) event).isDiesEvent()) {
if (event.getTargetId().equals(watchedCreatureId)) {
Permanent creature = (Permanent) game.getLastKnownInformation(watchedCreatureId, Zone.BATTLEFIELD);
if (creature.getZoneChangeCounter(game) == this.zoneChangeCounter) {
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 && StaticFilters.FILTER_PERMANENT_CREATURES.match(zEvent.getTarget(), sourceId, controllerId, game)) {
return true;
}
return false;
}
代码示例来源:origin: magefree/mage
@Override
public boolean checkTrigger(GameEvent event, Game game) {
if (((ZoneChangeEvent) event).isDiesEvent()) {
if (fixedTarget.getFirst(game, this).equals(event.getTargetId())) {
if (this.isControlledBy(event.getPlayerId())) {
return true;
}
}
}
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 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 boolean checkTrigger(GameEvent event, Game game) {
if (((ZoneChangeEvent) event).isDiesEvent()) {
Permanent permanent = (Permanent) game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD);
if (permanent.getAttachments().contains(this.getSourceId()) && permanent.hasSubtype(SubType.HUMAN, game)) {
return true;
}
}
return false;
}
代码示例来源:origin: magefree/mage
@Override
public void watch(GameEvent event, Game game) {
if (event.getType() == EventType.ZONE_CHANGE && ((ZoneChangeEvent) event).isDiesEvent()) {
MageObject card = game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD);
if (card != null && card.isCreature()) {
creaturesDiedThisTurn++;
}
}
}
代码示例来源:origin: magefree/mage
@Override
public void watch(GameEvent event, Game game) {
if (event.getType() == EventType.ZONE_CHANGE && ((ZoneChangeEvent) event).isDiesEvent()) {
MageObject mageObject = game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD);
if (mageObject != null && mageObject.isCreature()) {
creaturesDiedThisTurn++;
}
}
}
代码示例来源:origin: magefree/mage
@Override
public void watch(GameEvent event, Game game) {
if (event.getType() == GameEvent.EventType.ZONE_CHANGE && ((ZoneChangeEvent) event).isDiesEvent()) {
MageObject card = game.getLastKnownInformation(event.getTargetId(), Zone.BATTLEFIELD);
if (card != null && ((Card) card).isOwnedBy(this.controllerId) && card.isCreature()) {
creaturesCount++;
}
}
}
代码示例来源:origin: magefree/mage
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
ZoneChangeEvent zce = (ZoneChangeEvent) event;
if (zce.isDiesEvent()) {
DamagedByEnchantedWatcher watcher = game.getState().getWatcher(DamagedByEnchantedWatcher.class, source.getSourceId());
if (watcher != null) {
return watcher.wasDamaged(zce.getTarget(), game);
}
}
return false;
}
代码示例来源:origin: magefree/mage
@Override
public boolean checkTrigger(GameEvent event, Game game) {
if (((ZoneChangeEvent) event).isDiesEvent()
&& mor.refersTo(((ZoneChangeEvent) event).getTarget(), game)) {
getEffects().setTargetPointer(new FixedTarget(event.getTargetId(), 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()
&& !(zEvent.getTarget() instanceof PermanentToken)) {
int count = getAmountOfNontokenCreatureDiedThisTurn(zEvent.getTargetId());
amountOfCreaturesThatDied.put(zEvent.getTarget().getControllerId(), ++count);
}
}
}
代码示例来源:origin: magefree/mage
@Override
public boolean checkTrigger(GameEvent event, Game game) {
if (((ZoneChangeEvent)event).isDiesEvent()) {
Card card = game.getPermanentOrLKIBattlefield(event.getTargetId());
Player controller = game.getPlayer(getControllerId());
if (controller != null && card != null && card.isArtifact()
&& controller.hasOpponent(card.getOwnerId(), game)) {
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;
}
内容来源于网络,如有侵权,请联系作者删除!