public final void testSummonAlterCreature() {
final Player pl = PlayerTestHelper.createPlayer("hugo");
MockStendhalRPRuleProcessor.get().addPlayer(pl);
final StendhalRPZone zone = new StendhalRPZone("testzone") {
@Override
public synchronized boolean collides(final Entity entity, final double x,
final double y) {
return false;
}
};
zone.add(pl);
pl.setPosition(1, 1);
pl.setAdminLevel(5000);
RPAction action = new RPAction();
action.put("type", "summon");
action.put("creature", "rat");
action.put("x", 0);
action.put("y", 0);
CommandCenter.execute(pl, action);
assertEquals(1, pl.getID().getObjectID());
final Creature rat = (Creature) zone.getEntityAt(0, 0);
assertEquals("rat", rat.get("subclass"));
action = new RPAction();
action.put("type", "altercreature");
action.put("target", "#2");