seller.say("You don't seem to have enough money.");
return false;
}
seller.say("Here you go, a cute little kitten! Your kitten will eat any piece of chicken or fish you place on the ground. Enjoy her!");
final Cat cat = new Cat(player);
Entity sellerEntity = seller.getEntity();
cat.setPosition(sellerEntity.getX(), sellerEntity.getY() + 1);
player.setPet(cat);
player.notifyWorldAboutChanges();
return true;
}
}
}
final Map<String, Integer> items = new HashMap<String, Integer>();
items.put("cat", BUYING_PRICE);
addGreeting();
addJob("I sell cats. Well, really they are just little kittens when I sell them to you but if you #care for them well they grow into cats.");
addHelp("I sell cats. To buy one, just tell me you want to #buy #cat. If you're new to this business, I can tell you how to #travel with her and take #care of her. If you find any wild cat, incidentally, you can make them your #own.");
addGoodbye();
new SellerAdder().addSeller(this, new CatSellerBehaviour(items));
addReply("care",
"Cats love chicken and fish. Just place a piece on the ground and your cat will run over to eat it. You can right-click on her and choose 'Look' at any time, to check up on her weight; she will gain one unit of weight for every piece of chicken she eats.");
addReply("travel",
"You'll need your cat to be close by in order for her to follow you when you change zones; you can say #cat to call her if she's not paying attention. If you decide to abandon her instead, you can right-click on yourself and select 'Leave Pet'; but frankly I think that sort of behaviour is disgraceful.");
addReply("sell",
"Sell??? What kind of a monster are you? Why would you ever sell your beautiful cat?");
addReply("own",
"If you find any wild or abandoned cat, you can right-click on them and select 'Own' to tame them. It will start following you immediately. Cats go a bit crazy without an owner!");
}
};
npc.setEntityClass("woman_009_npc");
npc.setPosition(6, 8);
npc.initHP(100);
npc.setDescription("Felina is walking around while taking care of her kittens. They are purring out of all corners.");
zone.add(npc);
// Also put a cat in her bedroom (people can't Own it as it is behind a fence)
final Cat hercat = new Cat();
hercat.setPosition(19, 3);
zone.add(hercat);
}