Examples of addStatus()


Examples of org.mokai.persist.MessageCriteria.addStatus()

    MongoMessageStore store = new MongoMessageStore();
    store.setMongo(db);

    MessageCriteria criteria = new MessageCriteria();
    criteria.setDirection(Direction.TO_APPLICATIONS);
    criteria.addStatus(Message.STATUS_FAILED);
    criteria.addStatus(Message.STATUS_RETRYING);
    store.updateStatus(criteria, Message.STATUS_PROCESSED);

    BasicDBObject obj = (BasicDBObject) connectionsCol.findOne();
    Assert.assertNotNull(obj);
View Full Code Here

Examples of org.mokai.persist.MessageCriteria.addStatus()

    store.setMongo(db);

    MessageCriteria criteria = new MessageCriteria();
    criteria.setDirection(Direction.TO_APPLICATIONS);
    criteria.addStatus(Message.STATUS_FAILED);
    criteria.addStatus(Message.STATUS_RETRYING);
    store.updateStatus(criteria, Message.STATUS_PROCESSED);

    BasicDBObject obj = (BasicDBObject) connectionsCol.findOne();
    Assert.assertNotNull(obj);
    Assert.assertEquals( (byte) obj.getInt("status"), Message.STATUS_FAILED);
View Full Code Here

Examples of org.pokenet.server.battle.Pokemon.addStatus()

                    }else if (i.getId() == 800) { //Voltorb Lollipop
            String message = poke.getName()+" ate the Voltorb Lollipop/nThe Lollipop restored 50 HP to " +poke.getName()+"!";
            poke.changeHealth(50);
            int random = rand.nextInt(10);
            if(random <3){
              poke.addStatus(new ParalysisEffect());
              message+="/n"+poke.getName()+" was Paralyzed from the Lollipop!";
            }
            if (p.isBattling()) {
              p.getBattleField().forceExecuteTurn();
            }else{
View Full Code Here

Examples of org.pokenet.server.battle.Pokemon.addStatus()

              }
            }
            int random = rand.nextInt(10);
            if(random <3){
              try{
              poke.addStatus(new FreezeEffect());
              message+="/n"+poke.getName()+" was frozen solid from the cold candy!";
              }catch(Exception e){}//Already under a status effect.
            }
            if (p.isBattling()) {
              p.getBattleField().forceExecuteTurn();
View Full Code Here

Examples of org.pokenet.server.battle.Pokemon.addStatus()

          }else if (i.getId() == 802) { //Cinnamon Candy
            String message = poke.getName()+" ate the Cinnamon Candy./nThe Cinnamon Candy restored " +poke.getName()+"'s status to normal!";
            poke.removeStatusEffects(true);
            int random = rand.nextInt(10);
            if(random <3){
              poke.addStatus(new BurnEffect());
              message+="/n"+poke.getName()+" was burned from the candy!";
            }
            if (p.isBattling()) {
              p.getBattleField().forceExecuteTurn();
            }else{
View Full Code Here

Examples of org.pokenet.server.battle.Pokemon.addStatus()

              poke.setHappiness(happiness);
            else
              poke.setHappiness(300);
            int random = rand.nextInt(10);
            if(random <3){
              poke.addStatus(new PoisonEffect());
              message+="/n"+poke.getName()+" got Poisoned from the rotten candy!";
            }
            if (p.isBattling()) {
              p.getBattleField().forceExecuteTurn();
            }else
View Full Code Here

Examples of org.pokenet.server.battle.Pokemon.addStatus()

              poke.setHappiness(happiness);
            else
              poke.setHappiness(255);
            int random = rand.nextInt(10);
            if(random <3){
              poke.addStatus(new ParalysisEffect());
              message+="/nThe gummi was too sweet for "+poke.getName()+"./n"+poke.getName()+" fell asleep!";
            }
            if (p.isBattling()) {
              p.getBattleField().forceExecuteTurn();
            }else
View Full Code Here

Examples of org.pokenet.server.battle.Pokemon.addStatus()

    ));

    m_moves.add(new MoveListEntry("Heal Block",
        new PokemonMove(PokemonType.T_PSYCHIC, 0, 1.0, 15) {
      public int use(BattleMechanics mech, Pokemon user, Pokemon target) {
        target.addStatus(user, new HealBlockEffect());
        return 0;
      }
      public boolean attemptHit(BattleMechanics mech, Pokemon user, Pokemon target) {
        return true;
      }
View Full Code Here

Examples of org.pokenet.server.battle.Pokemon.addStatus()

      public int getPriority() {
        return 5;
      }
      public int use(BattleMechanics mech, Pokemon user, Pokemon target) {
        user.getField().showMessage(user.getName() + " created a barrier!");
        target.addStatus(user, new StatusEffect() {
          public boolean isMoveTransformer(boolean enemy) {
            return !enemy;
          }
          public MoveListEntry getTransformedMove(Pokemon p, MoveListEntry entry) {
            PokemonMove move = entry.getMove();
View Full Code Here

Examples of org.pokenet.server.battle.Pokemon.addStatus()

          user.getField().showMessage("But it failed!");
          return 0;
        }
        Pokemon p = (Pokemon)party.get(mech.getRandom().nextInt(party.size()));
        p.getField().switchInPokemon(p.getParty(), p.getId());
        p.addStatus(user, new StatusEffect() {
          public int getTier() {
            return 1;
          }
          public boolean tick(Pokemon p) {
            p.removeStatus(this);
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.