Package games.stendhal.server.entity.player

Examples of games.stendhal.server.entity.player.Player.events()


    final RPAction action = new RPAction();
    action.put("type", "spell");
    action.put("target", "spell");
    assertTrue(CommandCenter.execute(pl, action));
    assertEquals(2, pl.events().size());
    assertEquals("Trying to cast a spell...", pl.events().get(0).get("text"));
    assertEquals("You can not cast this spell.", pl.events().get(1).get("text"));
    pl.clearEvents();
  }
View Full Code Here


    final RPAction action = new RPAction();
    action.put("type", "spell");
    action.put("target", "spell");
    assertTrue(CommandCenter.execute(pl, action));
    assertEquals(2, pl.events().size());
    assertEquals("Trying to cast a spell...", pl.events().get(0).get("text"));
    assertEquals("You can not cast this spell.", pl.events().get(1).get("text"));
    pl.clearEvents();
  }

  /**
 
View Full Code Here

    action.put("type", "spell");
    action.put("target", "spell");
    assertTrue(CommandCenter.execute(pl, action));
    assertEquals(2, pl.events().size());
    assertEquals("Trying to cast a spell...", pl.events().get(0).get("text"));
    assertEquals("You can not cast this spell.", pl.events().get(1).get("text"));
    pl.clearEvents();
  }

  /**
   * Tests for wrong spell name.
View Full Code Here

    final RPAction action = new RPAction();
    action.put("type", "spell");
    action.put("target", "spellX");
    assertTrue(CommandCenter.execute(pl, action));
    assertEquals(2, pl.events().size());
    int idx = 0;
    assertEquals("Trying to cast a spell...", pl.events().get(idx++).get("text"));
    assertEquals("You can not cast this spell.", pl.events().get(idx++).get("text"));
    pl.clearEvents();
  }
View Full Code Here

    action.put("type", "spell");
    action.put("target", "spellX");
    assertTrue(CommandCenter.execute(pl, action));
    assertEquals(2, pl.events().size());
    int idx = 0;
    assertEquals("Trying to cast a spell...", pl.events().get(idx++).get("text"));
    assertEquals("You can not cast this spell.", pl.events().get(idx++).get("text"));
    pl.clearEvents();
  }

  /**
 
View Full Code Here

    action.put("target", "spellX");
    assertTrue(CommandCenter.execute(pl, action));
    assertEquals(2, pl.events().size());
    int idx = 0;
    assertEquals("Trying to cast a spell...", pl.events().get(idx++).get("text"));
    assertEquals("You can not cast this spell.", pl.events().get(idx++).get("text"));
    pl.clearEvents();
  }

  /**
   * Tests for correct, but unhandled spell.
View Full Code Here

    final RPAction action = new RPAction();
    action.put("type", "spell");
    action.put("target", "spell1");
    assertTrue(CommandCenter.execute(pl, action));
    assertEquals(2, pl.events().size());
    int idx = 0;
    assertEquals("Trying to cast a spell...", pl.events().get(idx++).get("text"));
    assertEquals("The spell you tried to cast doesn't exist!", pl.events().get(idx++).get("text"));
    pl.clearEvents();
  }
View Full Code Here

    action.put("type", "spell");
    action.put("target", "spell1");
    assertTrue(CommandCenter.execute(pl, action));
    assertEquals(2, pl.events().size());
    int idx = 0;
    assertEquals("Trying to cast a spell...", pl.events().get(idx++).get("text"));
    assertEquals("The spell you tried to cast doesn't exist!", pl.events().get(idx++).get("text"));
    pl.clearEvents();
  }

  /**
 
View Full Code Here

    action.put("target", "spell1");
    assertTrue(CommandCenter.execute(pl, action));
    assertEquals(2, pl.events().size());
    int idx = 0;
    assertEquals("Trying to cast a spell...", pl.events().get(idx++).get("text"));
    assertEquals("The spell you tried to cast doesn't exist!", pl.events().get(idx++).get("text"));
    pl.clearEvents();
  }

  /**
   * Tests for "heal" spell.
View Full Code Here

    RPAction action = new RPAction();
    action.put("type", "spell");
    action.put("target", "heal");
    assertTrue(CommandCenter.execute(pl, action));
    assertEquals(2, pl.events().size());
    int idx = 0;
    assertEquals("Trying to cast a spell...", pl.events().get(idx++).get("text"));
    assertEquals("You do not have enough available mana to use this spell.", pl.events().get(idx++).get("text"));
    pl.clearEvents();
    assertEquals(35, pl.getHP());
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.