本文整理了Java中mage.abilities.Ability.isControlledBy()
方法的一些代码示例,展示了Ability.isControlledBy()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Ability.isControlledBy()
方法的具体详情如下:
包路径:mage.abilities.Ability
类名称:Ability
方法名:isControlledBy
暂无
代码示例来源:origin: magefree/mage
@Override
public boolean applies(Ability abilityToModify, Ability source, Game game) {
if (abilityToModify.isControlledBy(source.getControllerId())
&& (abilityToModify instanceof SpellAbility)) {
return true;
}
return false;
}
代码示例来源:origin: magefree/mage
@Override
public boolean applies(Ability abilityToModify, Ability source, Game game) {
return abilityToModify.isControlledBy(source.getControllerId())
&& abilityToModify instanceof SpellAbility;
}
代码示例来源:origin: magefree/mage
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
if (!this.used) {
return source.isControlledBy(event.getPlayerId());
}
return false;
}
}
代码示例来源:origin: magefree/mage
@Override
public boolean applies(UUID objectId, Ability affectedAbility, Ability source, Game game, UUID playerId) {
return affectedAbility.isControlledBy(source.getControllerId())
&& activatedAbility.isInstance(affectedAbility);
}
代码示例来源:origin: magefree/mage
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
return source.isControlledBy(event.getPlayerId());
}
}
代码示例来源:origin: magefree/mage
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
return source.isControlledBy(event.getPlayerId());
}
}
代码示例来源:origin: magefree/mage
@Override
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
return source.isControlledBy(affectedControllerId)
&& objectId.equals(getTargetPointer().getFirst(game, source));
}
}
代码示例来源:origin: magefree/mage
@Override
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
return source.isControlledBy(affectedControllerId)
&& objectId.equals(getTargetPointer().getFirst(game, source));
}
}
代码示例来源:origin: magefree/mage
@Override
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
return source.isControlledBy(affectedControllerId)
&& objectId.equals(getTargetPointer().getFirst(game, source));
}
}
代码示例来源:origin: magefree/mage
@Override
public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) {
return source.isControlledBy(affectedControllerId)
&& sourceId.equals(getTargetPointer().getFirst(game, source));
}
}
代码示例来源:origin: magefree/mage
@Override
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
if (getTargetPointer().getTargets(game, source).contains(objectId)
&& source.isControlledBy(affectedControllerId)) {
Card card = game.getCard(objectId);
if (card != null) {
return true;
}
}
return false;
}
}
代码示例来源:origin: magefree/mage
@Override
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
if (getTargetPointer().getTargets(game, source).contains(objectId)
&& source.isControlledBy(affectedControllerId)) {
Card card = game.getCard(objectId);
if (card != null) {
return true;
}
}
return false;
}
}
代码示例来源:origin: magefree/mage
@Override
public boolean applies(Ability abilityToModify, Ability source, Game game) {
if (abilityToModify instanceof SpellAbility) {
if (abilityToModify.isControlledBy(source.getControllerId())) {
return SpellAbilityCastMode.FLASHBACK.equals(((SpellAbility) abilityToModify).getSpellAbilityCastMode());
}
}
return false;
}
代码示例来源:origin: magefree/mage
@Override
public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) {
if (sourceId.equals(cardId) && source.isControlledBy(affectedControllerId)) {
ExileZone exileZone = game.getState().getExile().getExileZone(exileId);
return exileZone != null && exileZone.contains(cardId);
}
return false;
}
}
代码示例来源:origin: magefree/mage
@Override
public boolean applies(UUID sourceId, Ability source, UUID affectedControllerId, Game game) {
if (sourceId.equals(cardId) && source.isControlledBy(affectedControllerId)) {
ExileZone exileZone = game.getState().getExile().getExileZone(exileId);
return exileZone != null && exileZone.contains(cardId);
}
return false;
}
}
代码示例来源:origin: magefree/mage
@Override
public boolean canChoose(UUID sourceControllerId, Game game) {
for (StackObject stackObject : game.getStack()) {
if (stackObject.getStackAbility() != null
&& stackObject.getStackAbility() instanceof TriggeredAbility
&& stackObject.getStackAbility().isControlledBy(sourceControllerId)) {
return true;
}
}
return false;
}
代码示例来源:origin: magefree/mage
@Override
public boolean canTarget(UUID id, Ability source, Game game) {
if (source != null && source.getSourceId().equals(id)) {
return false;
}
StackObject stackObject = game.getStack().getStackObject(id);
return stackObject.getStackAbility() != null
&& (stackObject.getStackAbility() instanceof TriggeredAbility)
&& source != null
&& stackObject.getStackAbility().isControlledBy(source.getControllerId());
}
代码示例来源:origin: magefree/mage
@Override
public boolean applies(GameEvent event, Ability source, Game game) {
if (source != null && source.getControllerId() != null) {
if (source.isControlledBy(game.getControllerId(event.getTargetId()))
&& event.getData() != null && event.getData().equals(CounterType.M1M1.getName())
&& event.getAmount() > 0) {
return true;
}
}
return false;
}
}
代码示例来源:origin: magefree/mage
@Override
public boolean applies(Ability abilityToModify, Ability source, Game game) {
if (abilityToModify instanceof SpellAbility && abilityToModify.isControlledBy(source.getControllerId())) {
Spell spell = game.getStack().getSpell(abilityToModify.getSourceId());
if (spell != null && spell.getCardType().toString().contains((String) game.getState().getValue(source.getSourceId().toString() + "_CloudKey"))) {
return true;
}
}
return false;
}
}
代码示例来源:origin: magefree/mage
@Override
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
return source.isControlledBy(affectedControllerId)
&& Objects.equals(objectId, ((FixedTarget) getTargetPointer()).getTarget())
&& ((FixedTarget) getTargetPointer()).getZoneChangeCounter() + 1 == game.getState().getZoneChangeCounter(objectId)
&& (((FixedTarget) getTargetPointer()).getZoneChangeCounter() + 1 == game.getState().getZoneChangeCounter(objectId))
&& game.getState().getZone(objectId) == Zone.STACK;
}
内容来源于网络,如有侵权,请联系作者删除!