Package games.stendhal.server.entity.npc.fsm

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


  @Test
  public void testSellingPansySeed() {
    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));

    equipWithMoney(player, 30);
    assertTrue(en.step(player, "buy 3 pansy seed"));
    assertEquals("3 pansy seeds will cost 30. Do you want to buy them?", getReply(npc));
View Full Code Here


    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));

    equipWithMoney(player, 30);
    assertTrue(en.step(player, "buy 3 pansy seed"));
    assertEquals("3 pansy seeds will cost 30. Do you want to buy them?", getReply(npc));

    assertTrue(en.step(player, "yes"));
    assertEquals("Congratulations! Here are your pansy seeds!", getReply(npc));
    assertTrue(player.isEquipped("seed", 3));
View Full Code Here

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

    assertTrue(en.step(player, "hi"));
    assertEquals("Hi! Are you here to #trade?", getReply(npc));

    assertTrue(en.step(player, "job"));
    assertEquals("I sell roses in this here market.", getReply(npc));
View Full Code Here

    equipWithMoney(player, 30);
    assertTrue(en.step(player, "buy 3 pansy seed"));
    assertEquals("3 pansy seeds will cost 30. Do you want to buy them?", getReply(npc));

    assertTrue(en.step(player, "yes"));
    assertEquals("Congratulations! Here are your pansy seeds!", getReply(npc));
    assertTrue(player.isEquipped("seed", 3));
  }

  /**
 
View Full Code Here

    final Engine en = npc.getEngine();

    assertTrue(en.step(player, "hi"));
    assertEquals("Hi! Are you here to #trade?", getReply(npc));

    assertTrue(en.step(player, "job"));
    assertEquals("I sell roses in this here market.", getReply(npc));

    assertTrue(en.step(player, "trade"));
    assertEquals("I sell rose.", getReply(npc));
View Full Code Here

    assertEquals("Hi! Are you here to #trade?", getReply(npc));

    assertTrue(en.step(player, "job"));
    assertEquals("I sell roses in this here market.", getReply(npc));

    assertTrue(en.step(player, "trade"));
    assertEquals("I sell rose.", getReply(npc));

    // There is currently no quest response defined for Fleur.
    assertFalse(en.step(player, "quest"));
View Full Code Here

    assertTrue(en.step(player, "trade"));
    assertEquals("I sell rose.", getReply(npc));

    // There is currently no quest response defined for Fleur.
    assertFalse(en.step(player, "quest"));

    assertTrue(en.step(player, "buy"));
    assertEquals("A rose will cost 50. Do you want to buy it?", getReply(npc));
    assertTrue(en.step(player, "no"));
    assertEquals("Ok, how else may I help you?", getReply(npc));
View Full Code Here

  @Test
  public void testSellingDaisiesSeed() {
    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));

    equipWithMoney(player, 20);
    assertTrue(en.step(player, "buy daisies seed"));
    assertEquals("A daisies seed will cost 20. Do you want to buy it?", getReply(npc));
View Full Code Here

    assertEquals("I sell rose.", getReply(npc));

    // There is currently no quest response defined for Fleur.
    assertFalse(en.step(player, "quest"));

    assertTrue(en.step(player, "buy"));
    assertEquals("A rose will cost 50. Do you want to buy it?", getReply(npc));
    assertTrue(en.step(player, "no"));
    assertEquals("Ok, how else may I help you?", getReply(npc));

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

    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));

    equipWithMoney(player, 20);
    assertTrue(en.step(player, "buy daisies seed"));
    assertEquals("A daisies seed will cost 20. Do you want to buy it?", getReply(npc));

    assertTrue(en.step(player, "yes"));
    assertEquals("Congratulations! Here is your daisies seed!", getReply(npc));
    assertTrue(player.isEquipped("seed"));
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.