new RepairingPriceCalculationStrategy(new HashSet<String>()),
new HashSet<String>(Arrays.asList("buckler")));
final Engine engine = npc.getEngine();
//sentence was not recognized
ChatCondition errorCondition = new SentenceHasErrorCondition();
engine.add(ConversationStates.ATTENDING, "repair", errorCondition,
false, ConversationStates.ATTENDING,
null, new ComplainAboutSentenceErrorAction());
//sentence recognized but not able to repair
ChatCondition cannotRepair = new AndCondition(
new NotCondition(new SentenceHasErrorCondition()),
new NotCondition(repairerBehaviour.getTransactionCondition()));
engine.add(ConversationStates.ATTENDING, "repair", cannotRepair,
false, ConversationStates.ATTENDING,
null, repairerBehaviour.getRejectedTransactionAction());
//recognized and able to repair
ChatCondition recognizedCondition = new AndCondition(
new NotCondition(new SentenceHasErrorCondition()),
repairerBehaviour.getTransactionCondition());
engine.add(ConversationStates.ATTENDING, "repair",
recognizedCondition, false, ConversationStates.REPAIR_OFFERED,
null, new RepairingBehaviourAction(repairerBehaviour));