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

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


    assertTrue(en.step(player, "offer"));
    assertEquals("I sell sheep.", getReply(npc));

    assertTrue(en.step(player, "buy"));
    assertEquals("A sheep will cost 30. 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"));
    assertEquals("Sorry, I don't sell dogs.", getReply(npc));
View Full Code Here


    assertTrue(en.step(player, "buy"));
    assertEquals("A sheep will cost 30. 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"));
    assertEquals("Sorry, I don't sell dogs.", getReply(npc));

    assertTrue(en.step(player, "buy house"));
    assertEquals("Sorry, I don't sell houses.", getReply(npc));
View Full Code Here

    assertEquals("Ok, how else may I help you?", getReply(npc));

    assertTrue(en.step(player, "buy dog"));
    assertEquals("Sorry, I don't sell dogs.", getReply(npc));

    assertTrue(en.step(player, "buy house"));
    assertEquals("Sorry, I don't sell houses.", getReply(npc));

    assertTrue(en.step(player, "buy someunknownthing"));
    assertEquals("Sorry, I don't sell someunknownthings.", getReply(npc));
View Full Code Here

    assertEquals("Sorry, I don't sell dogs.", getReply(npc));

    assertTrue(en.step(player, "buy house"));
    assertEquals("Sorry, I don't sell houses.", getReply(npc));

    assertTrue(en.step(player, "buy someunknownthing"));
    assertEquals("Sorry, I don't sell someunknownthings.", getReply(npc));

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

    assertEquals("Sorry, I don't sell houses.", getReply(npc));

    assertTrue(en.step(player, "buy someunknownthing"));
    assertEquals("Sorry, I don't sell someunknownthings.", getReply(npc));

    assertTrue(en.step(player, "buy sheep"));
    assertEquals("A sheep will cost 30. 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

    assertEquals("Sorry, I don't sell someunknownthings.", getReply(npc));

    assertTrue(en.step(player, "buy sheep"));
    assertEquals("A sheep will cost 30. 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 sheep"));
    assertEquals("A sheep will cost 30. Do you want to buy it?", getReply(npc));
View Full Code Here

    assertEquals("A sheep will cost 30. 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 sheep"));
    assertEquals("A sheep will cost 30. Do you want to buy it?", getReply(npc));

    assertTrue(en.step(player, "yes"));
    assertEquals("You don't seem to have enough money.", getReply(npc));
View Full Code Here

    assertEquals("Ok, how else may I help you?", getReply(npc));

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

    assertTrue(en.step(player, "yes"));
    assertEquals("You don't seem to have enough money.", getReply(npc));

    // equip with enough money to buy one sheep
    assertTrue(equipWithMoney(player, 30));
View Full Code Here

    assertEquals("You don't seem to have enough money.", getReply(npc));

    // equip with enough money to buy one sheep
    assertTrue(equipWithMoney(player, 30));

    assertTrue(en.step(player, "buy 2 sheep"));
    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));
View Full Code Here

    assertTrue(equipWithMoney(player, 30));

    assertTrue(en.step(player, "buy 2 sheep"));
    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));
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.