Package games.stendhal.server.entity.npc.condition

Examples of games.stendhal.server.entity.npc.condition.AlwaysTrueCondition


   * a chat condition that checks whether transactions are possible at all
   *
   * @return ChatCondition
   */
  public ChatCondition getTransactionCondition() {
    return new AlwaysTrueCondition();
  }
View Full Code Here


  public final void testIsConditionFulfilled() {
    Transition t = new Transition(someconst, Arrays.asList(ConversationParser.createTriggerExpression("trigger")), null, false, idle_0, null, null);
    assertTrue(t.isConditionFulfilled(PlayerTestHelper.createPlayer("player"),
        null, SpeakerNPCTestHelper.createSpeakerNPC()));
    t = new Transition(someconst, Arrays.asList(ConversationParser.createTriggerExpression("trigger")),
        new AlwaysTrueCondition(), false, idle_0, null, null);
    assertTrue(t.isConditionFulfilled(PlayerTestHelper.createPlayer("player"),
        null, SpeakerNPCTestHelper.createSpeakerNPC()));
    t = new Transition(someconst, Arrays.asList(ConversationParser.createTriggerExpression("trigger")),
        new NotCondition(new AlwaysTrueCondition()), false, idle_0, null, null);
    assertFalse(t.isConditionFulfilled(PlayerTestHelper.createPlayer("player"),
        null, SpeakerNPCTestHelper.createSpeakerNPC()));
  }
View Full Code Here

    setRPClass("gate");
    put("type", "gate");
    setOrientation(orientation);
    setOpen(false);
    if (condition == null) {
      condition = new AlwaysTrueCondition();
    }
    this.condition = condition;
    if (image != null) {
      put(IMAGE, image);
    } else {
View Full Code Here

TOP

Related Classes of games.stendhal.server.entity.npc.condition.AlwaysTrueCondition

Copyright © 2018 www.massapicom. 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.