From: Daniel H. <wik...@us...> - 2006-08-30 21:04:56
|
Update of /cvsroot/arianne/stendhal/src/games/stendhal/server/maps In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv9779/src/games/stendhal/server/maps Modified Files: Semos.java Log Message: added a bakery and the NPC Erna who works in it Index: Semos.java =================================================================== RCS file: /cvsroot/arianne/stendhal/src/games/stendhal/server/maps/Semos.java,v retrieving revision 1.98 retrieving revision 1.99 diff -C2 -d -r1.98 -r1.99 *** Semos.java 30 Aug 2006 01:22:35 -0000 1.98 --- Semos.java 30 Aug 2006 21:04:53 -0000 1.99 *************** *** 62,65 **** --- 62,67 ---- buildSemosTownhallArea((StendhalRPZone) world.getRPZone(new IRPZone.ID( "int_semos_townhall"))); + buildSemosBakeryArea((StendhalRPZone) world.getRPZone(new IRPZone.ID( + "int_semos_bakery"))); } *************** *** 494,497 **** --- 496,551 ---- } + private void buildSemosBakeryArea(StendhalRPZone zone) { + Portal portal = new Portal(); + zone.assignRPObjectID(portal); + portal.setx(26); + portal.sety(14); + portal.setNumber(0); + portal.setDestination("0_semos_city", 6); + zone.addPortal(portal); + + SpeakerNPC erna = new SpeakerNPC("Erna") { + @Override + protected void createPath() { + List<Path.Node> nodes = new LinkedList<Path.Node>(); + nodes.add(new Path.Node(26, 8)); + nodes.add(new Path.Node(26, 5)); + nodes.add(new Path.Node(28, 5)); + nodes.add(new Path.Node(28, 1)); + nodes.add(new Path.Node(28, 4)); + nodes.add(new Path.Node(22, 4)); + nodes.add(new Path.Node(22, 3)); + nodes.add(new Path.Node(22, 6)); + nodes.add(new Path.Node(26, 6)); + setPath(nodes, true); + } + + @Override + protected void createDialog() { + addJob("I'm the shop assistant at this bakery."); + addReply("flour", "We usually get our flour from a mill northeast of here. If you bring us some, we can make bread for you."); + addHelp("Bread is very healthy."); + addGoodbye(); + + // Erna bakes bread if you bring her flour. + Map<String, Integer> requiredResources = new HashMap<String, Integer>(); + requiredResources.put("flour", new Integer(1)); + + ProducerBehaviour behaviour = new ProducerBehaviour( + "erna_bake_bread", "bake", "loafs", "bread", requiredResources, 10 * 60); + + addProducer(behaviour, + "Welcome to the Semos bakery. We #bake fine bread for everyone who brings us #flour."); + } + }; + npcs.add(erna); + zone.assignRPObjectID(erna); + erna.put("class", "housewifenpc"); + erna.setDirection(Direction.DOWN); + erna.set(26, 8); + erna.initHP(100); + zone.addNPC(erna); + } + private void buildSemosTempleArea(StendhalRPZone zone) { Portal portal = new Portal(); *************** *** 877,880 **** --- 931,935 ---- portal.setDestination("int_semos_tavern_0", 0); zone.addPortal(portal); + portal = new Portal(); zone.assignRPObjectID(portal); *************** *** 884,887 **** --- 939,943 ---- portal.setDestination("int_semos_temple", 2); zone.addPortal(portal); + portal = new Portal(); zone.assignRPObjectID(portal); *************** *** 891,894 **** --- 947,951 ---- portal.setDestination("int_semos_blacksmith", 0); zone.addPortal(portal); + portal = new Portal(); zone.assignRPObjectID(portal); *************** *** 898,901 **** --- 955,959 ---- portal.setDestination("int_semos_library", 0); zone.addPortal(portal); + portal = new Portal(); zone.assignRPObjectID(portal); *************** *** 905,908 **** --- 963,967 ---- portal.setDestination("int_semos_library", 1); zone.addPortal(portal); + portal = new Portal(); zone.assignRPObjectID(portal); *************** *** 912,915 **** --- 971,975 ---- portal.setDestination("int_semos_storage_0", 0); zone.addPortal(portal); + portal = new Portal(); zone.assignRPObjectID(portal); *************** *** 919,922 **** --- 979,983 ---- portal.setDestination("int_semos_bank", 0); zone.addPortal(portal); + for (int i = 0; i < 3; i++) { portal = new Portal(); *************** *** 928,931 **** --- 989,1001 ---- zone.addPortal(portal); } + + portal = new Portal(); + zone.assignRPObjectID(portal); + portal.setx(44); + portal.sety(19); + portal.setNumber(10); + portal.setDestination("int_semos_bakery", 0); + zone.addPortal(portal); + portal = new OneWayPortalDestination(); zone.assignRPObjectID(portal); *************** *** 934,937 **** --- 1004,1008 ---- portal.setNumber(60); zone.addPortal(portal); + Sign sign = new Sign(); zone.assignRPObjectID(sign); *************** *** 940,943 **** --- 1011,1015 ---- sign.setText("You are about to leave this area to move to the village.\nYou can buy a new sheep there."); zone.add(sign); + sign = new Sign(); zone.assignRPObjectID(sign); *************** *** 946,949 **** --- 1018,1022 ---- sign.setText("You are about to enter the Dungeons.\nBut Beware! This area is infested with rats and legend has \nit that many Adventurers have died down there..."); zone.add(sign); + sign = new Sign(); zone.assignRPObjectID(sign); *************** *** 952,955 **** --- 1025,1029 ---- sign.setText("You are about to leave this area and move to the plains.\nYou may fatten up your sheep there on the wild berries.\nBe careful though, wolves roam these plains."); zone.add(sign); + Chest chest = new Chest(); zone.assignRPObjectID(chest); *************** *** 965,968 **** --- 1039,1043 ---- .getItem("money")); zone.add(chest); + SpeakerNPC npc = new SpeakerNPC("Nomyr Ahba") { @Override |