Examples of step()


Examples of games.stendhal.server.entity.npc.fsm.Engine.step()

    assertEquals("2 sheep will cost 60. Do you want to buy them?", getReply(npc));

    assertTrue(en.step(player, "yes"));
    assertEquals("Hmm... I just don't think you're cut out for taking care of a whole flock of sheep at once.", getReply(npc));

    assertTrue(en.step(player, "buy sheep"));
    assertEquals("A sheep will cost 30. Do you want to buy it?", getReply(npc));

    assertFalse(player.hasSheep());

    assertTrue(en.step(player, "yes"));
View Full Code Here

Examples of games.stendhal.server.entity.npc.fsm.Engine.step()

    assertTrue(en.step(player, "buy sheep"));
    assertEquals("A sheep will cost 30. Do you want to buy it?", getReply(npc));

    assertFalse(player.hasSheep());

    assertTrue(en.step(player, "yes"));
    assertEquals("Here you go, a nice fluffy little sheep! Take good care of it, now...", getReply(npc));

    assertTrue(player.hasSheep());
  }
View Full Code Here

Examples of games.stendhal.server.entity.npc.fsm.Engine.step()

  @Test
  public void testSellSheep() {
    final SpeakerNPC npc = getNPC("Nishiya");
    final Engine en = npc.getEngine();

    assertTrue(en.step(player, "hi Nishiya"));
    assertEquals("Greetings! How may I help you?", getReply(npc));

    assertTrue(en.step(player, "sell"));
    assertEquals("Once you've gotten your sheep up to a weight of 100, you can take her to Sato in Semos; he will buy her from you.", getReply(npc));
View Full Code Here

Examples of games.stendhal.server.entity.npc.fsm.Engine.step()

    final Engine en = npc.getEngine();

    assertTrue(en.step(player, "hi Nishiya"));
    assertEquals("Greetings! How may I help you?", getReply(npc));

    assertTrue(en.step(player, "sell"));
    assertEquals("Once you've gotten your sheep up to a weight of 100, you can take her to Sato in Semos; he will buy her from you.", getReply(npc));

    assertTrue(en.step(player, "sell sheep"));
    assertEquals("Once you've gotten your sheep up to a weight of 100, you can take her to Sato in Semos; he will buy her from you.", getReply(npc));
  }
View Full Code Here

Examples of games.stendhal.server.entity.npc.fsm.Engine.step()

    assertEquals("Greetings! How may I help you?", getReply(npc));

    assertTrue(en.step(player, "sell"));
    assertEquals("Once you've gotten your sheep up to a weight of 100, you can take her to Sato in Semos; he will buy her from you.", getReply(npc));

    assertTrue(en.step(player, "sell sheep"));
    assertEquals("Once you've gotten your sheep up to a weight of 100, you can take her to Sato in Semos; he will buy her from you.", getReply(npc));
  }

}
View Full Code Here

Examples of games.stendhal.server.entity.npc.fsm.Engine.step()

  @Test
  public void testHiAndBye() {
    final SpeakerNPC npc = getNPC("Jenny");
    final Engine en = npc.getEngine();

    assertTrue(en.step(player, "hi Jenny"));
    assertEquals("Greetings! I am Jenny, the local miller. If you bring me some #grain, I can #mill it into flour for you.", getReply(npc));

    assertTrue(en.step(player, "bye"));
    assertEquals("Bye.", getReply(npc));
  }
View Full Code Here

Examples of games.stendhal.server.entity.npc.fsm.Engine.step()

    final Engine en = npc.getEngine();

    assertTrue(en.step(player, "hi Jenny"));
    assertEquals("Greetings! I am Jenny, the local miller. If you bring me some #grain, I can #mill it into flour for you.", getReply(npc));

    assertTrue(en.step(player, "bye"));
    assertEquals("Bye.", getReply(npc));
  }

  /**
   * Tests for quest.
View Full Code Here

Examples of games.stendhal.server.entity.npc.fsm.Engine.step()

  @Test
  public void testQuest() {
    final SpeakerNPC npc = getNPC("Jenny");
    final Engine en = npc.getEngine();

    assertTrue(en.step(player, "hi"));
    assertEquals("Greetings! I am Jenny, the local miller. If you bring me some #grain, I can #mill it into flour for you.", getReply(npc));

    assertTrue(en.step(player, "job"));
    assertEquals("I run this windmill, where I can #mill people's #grain into flour for them. I also supply the bakery in Semos.", getReply(npc));
View Full Code Here

Examples of games.stendhal.server.entity.npc.fsm.Engine.step()

    final Engine en = npc.getEngine();

    assertTrue(en.step(player, "hi"));
    assertEquals("Greetings! I am Jenny, the local miller. If you bring me some #grain, I can #mill it into flour for you.", getReply(npc));

    assertTrue(en.step(player, "job"));
    assertEquals("I run this windmill, where I can #mill people's #grain into flour for them. I also supply the bakery in Semos.", getReply(npc));

    assertTrue(en.step(player, "grain"));
    assertEquals("There's a farm nearby; they usually let people harvest there. You'll need a scythe, of course.", getReply(npc));
View Full Code Here

Examples of games.stendhal.server.entity.npc.fsm.Engine.step()

    assertEquals("Greetings! I am Jenny, the local miller. If you bring me some #grain, I can #mill it into flour for you.", getReply(npc));

    assertTrue(en.step(player, "job"));
    assertEquals("I run this windmill, where I can #mill people's #grain into flour for them. I also supply the bakery in Semos.", getReply(npc));

    assertTrue(en.step(player, "grain"));
    assertEquals("There's a farm nearby; they usually let people harvest there. You'll need a scythe, of course.", getReply(npc));

    assertTrue(en.step(player, "help"));
    assertEquals("Do you know the bakery in Semos? I'm proud to say they use my flour. But the wolves ate my delivery boy again recently... they're probably running out.", getReply(npc));
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.