Examples of removeAttachment()


Examples of io.undertow.server.ServerConnection.removeAttachment()

                }
            });
            connection.getCloseSetter().set(new ChannelListener<Channel>() {
                @Override
                public void handleEvent(Channel channel) {
                    serverConnection.removeAttachment(clientAttachmentKey);
                }
            });
            callback.completed(exchange, new ProxyConnection(connection, uri.getPath() == null ? "/" : uri.getPath()));
        }
View Full Code Here

Examples of mage.game.permanent.Permanent.removeAttachment()

    permanent.removeFromCombat(game);
    game.getBattlefield().removePermanent(permanent.getId());
    if (permanent.getAttachedTo() != null) {
      Permanent attachedTo = game.getPermanent(permanent.getAttachedTo());
      if (attachedTo != null)
        attachedTo.removeAttachment(permanent.getId(), game);
    }
    return true;
  }

  @Override
View Full Code Here

Examples of mage.game.permanent.Permanent.removeAttachment()

      Permanent perm = it.next();
      if (perm.getOwnerId().equals(playerId)) {
        if (perm.getAttachedTo() != null) {
          Permanent attachedTo = game.getPermanent(perm.getAttachedTo());
          if (attachedTo != null)
            attachedTo.removeAttachment(perm.getId(), game);
        }
        it.remove();
      }
    }
    for (Iterator<StackObject> it = game.getStack().iterator(); it.hasNext();) {
View Full Code Here

Examples of mage.game.permanent.Permanent.removeAttachment()

        Permanent creature = getPermanent(perm.getAttachedTo());
        if (creature == null) {
          perm.attachTo(null);
        }
        else if (!creature.getCardType().contains(CardType.CREATURE) || creature.hasProtectionFrom(perm)) {
          if (creature.removeAttachment(perm.getId(), this))
            somethingHappened = true;
        }
      }
    }
    for (Permanent perm: getBattlefield().getAllActivePermanents(filterFortification)) {
View Full Code Here

Examples of mage.game.permanent.Permanent.removeAttachment()

        Permanent land = getPermanent(perm.getAttachedTo());
        if (land == null) {
          perm.attachTo(null);
        }
        else if (!land.getCardType().contains(CardType.LAND) || land.hasProtectionFrom(perm)) {
          if (land.removeAttachment(perm.getId(), this))
            somethingHappened = true;
        }
      }
    }
    //20091005 - 704.5q
View Full Code Here

Examples of mage.game.permanent.Permanent.removeAttachment()

                    if (creature == null || !creature.getAttachments().contains(perm.getId())) {
                        UUID wasAttachedTo = perm.getAttachedTo();
                        perm.attachTo(null, this);
                        fireEvent(new GameEvent(GameEvent.EventType.UNATTACHED, wasAttachedTo, perm.getId(), perm.getControllerId()));
                    } else if (!creature.getCardType().contains(CardType.CREATURE) || creature.hasProtectionFrom(perm, this)) {
                        if (creature.removeAttachment(perm.getId(), this)) {
                            somethingHappened = true;
                        }
                    }
                }
            }
View Full Code Here

Examples of mage.game.permanent.Permanent.removeAttachment()

                    Permanent land = getPermanent(perm.getAttachedTo());
                    if (land == null || !land.getAttachments().contains(perm.getId())) {
                        perm.attachTo(null, this);
                    }
                    else if (!land.getCardType().contains(CardType.LAND) || land.hasProtectionFrom(perm, this)) {
                        if (land.removeAttachment(perm.getId(), this)) {
                            somethingHappened = true;
                        }
                    }
                }
            }
View Full Code Here

Examples of mage.game.permanent.Permanent.removeAttachment()

            Permanent perm = it.next();
            if (perm.getOwnerId().equals(playerId)) {
                if (perm.getAttachedTo() != null) {
                    Permanent attachedTo = getPermanent(perm.getAttachedTo());
                    if (attachedTo != null) {
                        attachedTo.removeAttachment(perm.getId(), this);
                    }
                }
                // check if it's a creature and must be removed from combat
                if (perm.getCardType().contains(CardType.CREATURE) && this.getCombat() != null) {
                    this.getCombat().removeFromCombat(perm.getId(), this);
View Full Code Here

Examples of mage.game.permanent.Permanent.removeAttachment()

        permanent.removeFromCombat(game, false);
        game.getBattlefield().removePermanent(permanent.getId());
        if (permanent.getAttachedTo() != null) {
            Permanent attachedTo = game.getPermanent(permanent.getAttachedTo());
            if (attachedTo != null) {
                attachedTo.removeAttachment(permanent.getId(), game);
            }
        }
        if (permanent.getPairedCard() != null) {
            Permanent pairedCard = game.getPermanent(permanent.getPairedCard());
            if (pairedCard != null) {
View Full Code Here

Examples of mage.game.permanent.Permanent.removeAttachment()

            {
                Permanent oldCreature = game.getPermanent(enchantement.getAttachedTo());

                if(oldCreature != null && enchantement.getSpellAbility().getTargets().get(0).canTarget(tokenPermanent.getId(), game) && player.chooseUse(Outcome.Neutral, "Attach " + enchantement.getName() + " to the token ?", game))
                {
                    if(oldCreature.removeAttachment(enchantement.getId(), game)){
                        tokenPermanent.addAttachment(enchantement.getId(), game);
                    }
                }
            }
            return true;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.