Examples of Spell


Examples of jpotter.spells.Spell

        IncantationManager.getInstance().finish();
//        GestureManager.getInstance().finish();
        tries++;
        System.err
            .println("received incantation:" + lastReceivedIncantation + ";received gesture:" + lastReceivedGesture);
        Spell s = getSpell(lastReceivedIncantation, lastReceivedGesture);
        if (s != null) {
          System.out.println("casting " + s);
          IHM.getInstance().cast(s);
          tries = 0;
          try {
View Full Code Here

Examples of mage.game.stack.Spell

    super(effect);
  }

  @Override
  public boolean apply(Game game, Ability source) {
    Spell spell = game.getStack().getSpell(source.getFirstTarget());
    if (spell != null) {
      Spell copy = spell.copySpell();
      copy.setControllerId(source.getControllerId());
      game.getStack().push(copy);
      copy.chooseNewTargets(game);
      return true;
    }
    return false;
  }
View Full Code Here

Examples of mage.game.stack.Spell

    super(effect);
  }
 
  @Override
  public boolean apply(Game game, Ability source) {
    Spell spell = game.getStack().getSpell(source.getFirstTarget());
    if (spell != null) {
      return spell.chooseNewTargets(game);
    }
    return false;
  }
View Full Code Here

Examples of mage.game.stack.Spell

    return filter;
  }

  @Override
  public boolean canTarget(UUID id, Ability source, Game game) {
    Spell spell = game.getStack().getSpell(id);
    if (spell != null) {
      return filter.match(spell);
    }
    return false;
  }
View Full Code Here

Examples of mage.game.stack.Spell

  @Override
  public boolean applies(GameEvent event, Ability source, Game game) {
    if (event.getType() == EventType.COUNTER) {
      filterTarget.getControllerId().clear();
      filterTarget.getControllerId().add(source.getControllerId());
      Spell spell = game.getStack().getSpell(event.getTargetId());
      if (spell != null) {
        if (filterTarget.match(spell)) {
          if (filterSource == null)
            return true;
          else {
View Full Code Here

Examples of mage.game.stack.Spell

          break;
        case HAND:
          game.getPlayer(ownerId).getHand().add(this);
          break;
        case STACK:
          game.getStack().push(new Spell(this, this.getSpellAbility().copy(), ownerId));
          break;
        case EXILED:
          game.getExile().getPermanentExile().add(this);
          break;
        case LIBRARY:
View Full Code Here

Examples of mage.game.stack.Spell

    return false;
  }

  @Override
  public boolean replaceEvent(GameEvent event, Ability source, Game game) {
    Spell spell = game.getStack().getSpell(event.getSourceId());
    for (Effect effect: baseEffects) {
      if (source.activate(game, false)) {
        if (effect instanceof ContinuousEffect) {
          game.addEffect((ContinuousEffect) effect, source);
        }
        else {
          if (spell != null)
            effect.apply(game, spell.getSpellAbility());
          else
            effect.apply(game, source);
        }
      }
    }
View Full Code Here

Examples of mage.game.stack.Spell

  }

  @Override
  public boolean checkTrigger(GameEvent event, Game game) {
    if (event.getType() == EventType.SPELL_CAST) {
      Spell spell = game.getStack().getSpell(event.getTargetId());
      if (spell != null && spell.getSourceId().equals(this.getSourceId())) {
        return true;
      }
    }
    return false;
  }
View Full Code Here

Examples of mage.game.stack.Spell

  }

  @Override
  public boolean checkTrigger(GameEvent event, Game game) {
    if (event.getType() == EventType.SPELL_CAST) {
      Spell spell = game.getStack().getSpell(event.getTargetId());
      if (spell != null && spell.getColor().isBlue()) {
        return true;
      }
    }
    return false;
  }
View Full Code Here

Examples of mage.game.stack.Spell

  }

  @Override
  public boolean checkTrigger(GameEvent event, Game game) {
    if (event.getType() == EventType.SPELL_CAST) {
      Spell spell = game.getStack().getSpell(event.getTargetId());
      if (spell != null && spell.getColor().isBlack()) {
        return true;
      }
    }
    return false;
  }
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.