Examples of entersBattlefield()


Examples of mage.game.permanent.PermanentCard.entersBattlefield()

            game.getPlayer(ownerId).getLibrary().putOnBottom(this, game);
          break;
        case BATTLEFIELD:
          PermanentCard permanent = new PermanentCard(this, ownerId);
          game.getBattlefield().addPermanent(permanent);
          permanent.entersBattlefield(sourceId, game);
          game.applyEffects();
          if (flag)
            permanent.setTapped(true);
          break;
      }
View Full Code Here

Examples of mage.game.permanent.PermanentCard.entersBattlefield()

  public boolean putOntoBattlefield(Game game, Zone fromZone, UUID sourceId, UUID controllerId) {
    PermanentCard permanent = new PermanentCard(this, controllerId);
    game.getBattlefield().addPermanent(permanent);
    game.setZone(objectId, Zone.BATTLEFIELD);
    game.applyEffects();
    permanent.entersBattlefield(sourceId, game);
    game.fireEvent(new ZoneChangeEvent(permanent, controllerId, fromZone, Zone.BATTLEFIELD));
    return true;
  }

}
View Full Code Here

Examples of mage.game.permanent.PermanentCard.entersBattlefield()

            for (PermanentCard card : battlefield) {
                setZone(card.getId(), Zone.BATTLEFIELD);
                card.setOwnerId(ownerId);
                PermanentCard permanent = new PermanentCard(card.getCard(), ownerId);
                getBattlefield().addPermanent(permanent);
                permanent.entersBattlefield(permanent.getId(), this, Zone.OUTSIDE, false);
                ((PermanentImpl)permanent).removeSummoningSickness();
                if (card.isTapped()) {
                    permanent.setTapped(true);
                }
            }
View Full Code Here

Examples of mage.game.permanent.PermanentCard.entersBattlefield()

                    game.resetForSourceId(permanent.getId());
                    game.addPermanent(permanent);
                    game.setZone(objectId, Zone.BATTLEFIELD);
                    game.setScopeRelevant(true);
                    game.applyEffects();
                    permanent.entersBattlefield(sourceId, game, event.getFromZone(), true);
                    game.setScopeRelevant(false);
                    game.applyEffects();
                    if (flag) {
                        permanent.setTapped(true);
                    }
View Full Code Here

Examples of mage.game.permanent.PermanentCard.entersBattlefield()

            game.getContinuousEffects().setController(objectId, controllerId);
            game.addPermanent(permanent);
            game.setZone(objectId, Zone.BATTLEFIELD);
            game.setScopeRelevant(true);
            permanent.setTapped(tapped);
            permanent.entersBattlefield(sourceId, game, event.getFromZone(), true);
            game.setScopeRelevant(false);
            game.applyEffects();
            game.fireEvent(new ZoneChangeEvent(permanent, controllerId, fromZone, Zone.BATTLEFIELD));
            return true;
        }
View Full Code Here

Examples of mage.game.permanent.PermanentCard.entersBattlefield()

            PermanentCard permanent = new PermanentCard(card, card.getOwnerId());
            game.getBattlefield().addPermanent(permanent);
            game.setZone(card.getId(), Zone.BATTLEFIELD);
            game.applyEffects();
            permanent.entersBattlefield(event.getSourceId(), game, fromZone, true);
            game.applyEffects();
            game.fireEvent(new ZoneChangeEvent(permanent, controllerId, fromZone, Zone.BATTLEFIELD));

            if (targetPermanent != null) {
                targetPermanent.addAttachment(permanent.getId(), game);
View Full Code Here

Examples of mage.game.permanent.PermanentToken.entersBattlefield()

  }

  public boolean putOntoBattlefield(Game game, UUID sourceId, UUID controllerId) {
    PermanentToken permanent = new PermanentToken(this, controllerId);
    game.getBattlefield().addPermanent(permanent);
    permanent.entersBattlefield(sourceId, game);
    game.applyEffects();
    game.fireEvent(new ZoneChangeEvent(permanent, controllerId, Zone.OUTSIDE, Zone.BATTLEFIELD));
    return true;
  }
View Full Code Here

Examples of mage.game.permanent.PermanentToken.entersBattlefield()

                }
                this.lastAddedTokenIds.add(newToken.getId());
                this.lastAddedTokenId = newToken.getId();
                game.setScopeRelevant(true);
                game.applyEffects();
                newToken.entersBattlefield(sourceId, game, Zone.OUTSIDE, true);
                game.setScopeRelevant(false);
                game.applyEffects();
                game.fireEvent(new ZoneChangeEvent(newToken, controllerId, Zone.OUTSIDE, Zone.BATTLEFIELD));
                if (attacking && game.getCombat() != null) {
                    game.getCombat().addAttackingCreature(newToken.getId(), game);
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.