- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中mage.constants.Zone
类的一些代码示例,展示了Zone
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Zone
类的具体详情如下:
包路径:mage.constants.Zone
类名称:Zone
暂无
代码示例来源:origin: magefree/mage
@Override
public String toString() {
return "Zone(" + zone.toString() + ')';
}
}
代码示例来源:origin: magefree/mage
@Override
public boolean applies(UUID objectId, Ability affectedAbility, Ability source, Game game, UUID affectedControllerId) {
if (affectedAbility != null && affectedAbility.getSourceId().equals(source.getSourceId())
&& affectedControllerId.equals(source.getControllerId())) {
return game.getState().getZone(objectId).equals(Zone.GRAVEYARD);
}
return false;
}
代码示例来源:origin: magefree/mage
@Override
public boolean apply(Ability input, Game game) {
return input.getZone().match(zone);
}
代码示例来源:origin: magefree/mage
@Override
public boolean checkTrigger(GameEvent event, Game game) {
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
for (Zone z : Zone.values()) {
if (game.getShortLivingLKI(sourceId, z) && z != Zone.GRAVEYARD) {
return false;
}
}
if (zEvent.getFromZone() == Zone.BATTLEFIELD && zEvent.getToZone() == Zone.GRAVEYARD) {
if (filter.match(zEvent.getTarget(), sourceId, controllerId, game)) {
return true;
}
}
return false;
}
代码示例来源:origin: magefree/mage
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
MageObject sourceObject = source.getSourceObject(game);
if (controller != null && sourceObject != null) {
Set<Card> toExile = new HashSet<>();
for (UUID permanentId : targetPointer.getTargets(game, source)) {
Permanent target = game.getPermanent(permanentId);
if (target != null) {
toExile.add(target);
}
}
controller.moveCards(toExile, Zone.EXILED, source, game);
game.applyEffects();
Set<Card> toBattlefield = new HashSet<>();
for (Card card : toExile) {
Zone currentZone = game.getState().getZone(card.getId());
if (Zone.BATTLEFIELD != currentZone && currentZone.isPublicZone()) {
toBattlefield.add(card);
}
}
controller.moveCards(toBattlefield, Zone.BATTLEFIELD, source, game);
return true;
}
return false;
}
}
代码示例来源:origin: magefree/mage
@Override
public boolean checkTrigger(GameEvent event, Game game) {
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
for (Zone z : Zone.values()) {
if (game.getShortLivingLKI(sourceId, z) && z != Zone.GRAVEYARD) {
return false;
}
}
if (zEvent.getFromZone() == Zone.BATTLEFIELD && zEvent.getToZone() == Zone.GRAVEYARD) {
if (zEvent.getTarget() != null &&
zEvent.getTarget().isOwnedBy(this.getControllerId()) &&
zEvent.getTarget().isCreature()&&
!zEvent.getTarget().getId().equals(this.getSourceId())) {
return true;
}
}
return false;
}
代码示例来源:origin: magefree/mage
@Override
public boolean apply(Game game, Ability source) {
Card card = game.getCard(source.getSourceId());
Player controller = game.getPlayer(source.getControllerId());
if (card != null && controller != null) {
Zone zone = game.getState().getZone(card.getId());
// cards needs to be in public non battlefield zone
if (zone == Zone.BATTLEFIELD || !zone.isPublicZone()) {
return true;
}
game.getState().setValue(TransformAbility.VALUE_KEY_ENTER_TRANSFORMED + source.getSourceId(), Boolean.TRUE);
controller.moveCards(card, Zone.BATTLEFIELD, source, game, false, false, false, null);
}
return true;
}
}
代码示例来源:origin: magefree/mage
private void setText() {
staticText = "target player exiles " + CardUtil.numberToText(amount, "a") + ' ' + filter.getMessage() + " from their " + zone.toString().toLowerCase(Locale.ENGLISH);
}
}
代码示例来源:origin: magefree/mage
@Override
public boolean apply(StackObject input, Game game) {
return input instanceof Spell && ((Spell) input).getFromZone().match(zone);
}
代码示例来源:origin: magefree/mage
@Override
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
Card card = game.getCard(objectId);
if (card != null) {
return (affectedControllerId.equals(source.getControllerId())
&& StaticFilters.FILTER_CARD_INSTANT_OR_SORCERY.match(card, game)
&& Zone.GRAVEYARD.equals(game.getState().getZone(card.getId())));
}
return false;
}
}
代码示例来源:origin: magefree/mage
.append(" puts ").append(withName ? card.getLogName() : "a card").append(' ');
if (fromZone != null) {
sb.append("from ").append(fromZone.toString().toLowerCase(Locale.ENGLISH)).append(' ');
代码示例来源:origin: magefree/mage
@Override
public Abilities<ActivatedAbility> getPlayableAbilities(Zone zone) {
return stream()
.filter(ability -> (ability instanceof ActivatedAbility))
.filter(ability -> ability.getZone().match(zone))
.map(ability -> (ActivatedAbility) ability)
.collect(Collectors.toCollection(AbilitiesImpl::new));
}
代码示例来源:origin: magefree/mage
boolean isCastFromPlayersLibrary(Game game, UUID playerId) {
if (!game.getStack().isEmpty()) {
StackObject stackObject = game.getStack().getLast();
return stackObject instanceof Spell
&& !((Spell) stackObject).isDoneActivatingManaAbilities()
&& Zone.LIBRARY.equals(((Spell) stackObject).getFromZone());
}
return false;
}
代码示例来源:origin: magefree/mage
sb.append(targetPickedCards.toString().toLowerCase(Locale.ENGLISH));
代码示例来源:origin: magefree/mage
@Override
public Abilities<ActivatedAbility> getActivatedAbilities(Zone zone) {
return stream()
.filter(ability -> ability instanceof ActivatedAbility)
.filter(ability -> ability.getZone().match(zone))
.map(ability -> (ActivatedAbility) ability)
.collect(Collectors.toCollection(AbilitiesImpl::new));
}
代码示例来源:origin: magefree/mage
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
MageObject sourceObject = game.getObject(source.getSourceId());
if (controller != null && sourceObject != null) {
Set<Card> cards = new HashSet<>(controller.getLibrary().getTopCards(game, 3));
if (!cards.isEmpty()) {
controller.moveCardsToExile(cards, source, game, true, source.getSourceId(), sourceObject.getIdName());
// remove cards that could not be moved to exile
for (Card card : cards) {
if (!Zone.EXILED.equals(game.getState().getZone(card.getId()))) {
cards.remove(card);
}
}
if (!cards.isEmpty()) {
ContinuousEffect effect = new PlayFromNotOwnHandZoneTargetEffect(Zone.EXILED, Duration.EndOfTurn);
effect.setTargetPointer(new FixedTargets(cards, game));
game.addEffect(effect, source);
}
}
return true;
}
return false;
}
代码示例来源:origin: magefree/mage
public void initComponents() {
hand = new mage.client.cards.Cards(true);
hand.setMinOffsetY(HAND_MIN_CARDS_OFFSET_Y);
hand.setCardDimension(GUISizeHelper.handCardDimension);
jPanel = new JPanel();
jScrollPane1 = new JScrollPane(jPanel);
jScrollPane1.getViewport().setBackground(new Color(0, 0, 0, 0));
jPanel.setLayout(new GridBagLayout()); // centers hand
jPanel.setBackground(new Color(0, 0, 0, 0));
jPanel.add(hand);
setOpaque(false);
jPanel.setOpaque(false);
jScrollPane1.setOpaque(false);
jPanel.setBorder(EMPTY_BORDER);
jScrollPane1.setBorder(EMPTY_BORDER);
jScrollPane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_NEVER);
jScrollPane1.getHorizontalScrollBar().setUnitIncrement(8);
jScrollPane1.setViewportBorder(EMPTY_BORDER);
setLayout(new BorderLayout());
add(jScrollPane1, BorderLayout.CENTER);
hand.setHScrollSpeed(8);
hand.setBackgroundColor(new Color(0, 0, 0, 0));
hand.setVisibleIfEmpty(false);
hand.setBorder(EMPTY_BORDER);
hand.setZone(Zone.HAND.toString());
}
代码示例来源:origin: magefree/mage
@Override
public Abilities<StaticAbility> getStaticAbilities(Zone zone) {
return stream()
.filter(ability -> ability instanceof StaticAbility)
.filter(ability -> ability.getZone().match(zone))
.map(ability -> (StaticAbility) ability)
.collect(Collectors.toCollection(AbilitiesImpl::new));
}
代码示例来源:origin: magefree/mage
@Override
public boolean applies(UUID objectId, Ability source, UUID affectedControllerId, Game game) {
if (!(source instanceof FlashbackAbility)
&& affectedControllerId.equals(source.getControllerId())
&& game.isActivePlayer(source.getControllerId())) {
Card card = game.getCard(objectId);
if (card != null
&& (card.isInstant()
|| card.isSorcery())
&& game.getState().getZone(objectId).equals(Zone.GRAVEYARD)) {
// check if not already a card was cast this turn with this ability
KessDissidentMageWatcher watcher = game.getState().getWatcher(KessDissidentMageWatcher.class);
return watcher != null
&& !watcher.isAbilityUsed(new MageObjectReference(source.getSourceId(), game));
}
}
return false;
}
}
代码示例来源:origin: magefree/mage
@Override
public boolean moveCardToGraveyardWithInfo(Card card, UUID sourceId,
Game game, Zone fromZone
) {
if (card == null) {
return false;
}
boolean result = false;
// Zone fromZone = game.getState().getZone(card.getId());
if (card.moveToZone(Zone.GRAVEYARD, sourceId, game, fromZone != null && fromZone == Zone.BATTLEFIELD)) {
if (!game.isSimulation()) {
if (card instanceof PermanentCard && game.getCard(card.getId()) != null) {
card = game.getCard(card.getId());
}
StringBuilder sb = new StringBuilder(this.getLogName())
.append(" puts ").append(card.getLogName()).append(' ').append(card.isCopy() ? "(Copy) " : "")
.append(fromZone != null ? "from " + fromZone.toString().toLowerCase(Locale.ENGLISH) + ' ' : "");
if (card.isOwnedBy(getId())) {
sb.append("into their graveyard");
} else {
sb.append("it into its owner's graveyard");
}
game.informPlayers(sb.toString());
}
result = true;
}
return result;
}
我刚开始使用 Magento,特别是关于模型和 ORM 的工作原理。 这三种方法我都用过 Mage::getResourceModel() Mage::getModel() Mage::getSing
任何机构都可以说两者之间有什么区别 法师:应用程序和法师:: 例如: Mage::getModel('catalog/product'); Mage::app->getLayout->createBl
本文整理了Java中mage.constants.Zone类的一些代码示例,展示了Zone类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项
本文整理了Java中mage.game.events.ZoneChangeEvent类的一些代码示例,展示了ZoneChangeEvent类的具体用法。这些代码示例主要来源于Github/Stacko
本文整理了Java中mage.watchers.common.ZuberasDiedWatcher类的一些代码示例,展示了ZuberasDiedWatcher类的具体用法。这些代码示例主要来源于Git
从布局来看,我该如何设置 crumbInfo/link Mage::getBaseUrl() 是面包屑吗? Ac
我有一个需要在每台服务器上更改的配置文件,因此一旦服务器上安装了我们的软件,客户端安装程序的配置文件就会设置为匹配该服务器的特定设置,然后复制到公共(public)Web 上用于部署的文件夹。 由于我
我目前正在学习 Magento,特别是模型和 ORM 的工作原理。 据我所知,有模型(它们是实际的实体)、资源模型(直接与数据库适配器链接)和集合(它们是保存模型集合的容器)。 为什么有大量的代码和示
My Mage::log() 函数无法正常工作。 var/log 文件夹是 777,并且从管理面板启用日志记录。我仍然无法记录任何内容 最佳答案 你在记录什么? 这里有一些需要考虑的事情: 您确定您的
我正在开发一个示例,我在其中使用 Octopus Deploy 在安装时配置和创建 clickonce 程序包,但我在“生产”机器上使用 mage.exe 时遇到了一些问题。我已经包含了 mage.e
我正在使用 Mage.exe 为我的 winform 应用程序创建单击一次部署。浏览文件并单击填充按钮后,我无法选择任何文件作为入口点。 这会导致Windows 窗体应用程序不支持 customHos
在我以前这样做之前: $response['url'] = Mage::getBaseUrl() .'module/controller/action?sku=' . $request['sku']
我有一个简单的问题。为什么 Mage::log 在 Adminhtml block 中不起作用?? 我知道文件正在读取/加载,因为当我在文件的第一行输入 die() 时,我得到一个空白屏幕,删除/重命
本文整理了Java中mage.constants.Zone.match()方法的一些代码示例,展示了Zone.match()的具体用法。这些代码示例主要来源于Github/Stackoverflow/
本文整理了Java中mage.constants.Zone.toString()方法的一些代码示例,展示了Zone.toString()的具体用法。这些代码示例主要来源于Github/Stackove
本文整理了Java中mage.game.permanent.token.ZombieWizardToken类的一些代码示例,展示了ZombieWizardToken类的具体用法。这些代码示例主要来源于
我已经在这里呆了几个小时了。 Magento 一直试图从 Mage 命名空间而不是我自己的命名空间调用我的块。 错误: /Library/WebServer/Documents/magento/app
我有一个模块:app/code/local/Namespace/Resize/ 所以我添加了一个通过 Magento 管理禁用/启用选项的选项。 系统 > 配置 > 命名空间 > 调整大小 但是当我尝
我正在尝试将 Magento 的一些功能集成到我的自定义 CMS 中,以便我的客户更轻松地更新他们的一些产品。 我已经编写了类来检索我需要的所有数据信息,但我正在尝试弄清楚如何以相同的方式保存对产品的
我目前在开发服务器(远程、SSH 访问)和生产服务器(云实例、SSH 访问)上设置了 Magento。当前设置是更新开发/生产服务器的颠覆导出。这很好用。 如果我通过 SSH 进入开发服务器,我可以导
我是一名优秀的程序员,十分优秀!