225
227
228:-register_module_type([world_types,parser]). 229:- expects_dialect(pfc). 230
232
233predTypeMax(mudEnergy,tAgent,120).
234
235typeProps(tAgent,[predInstMax(mudHealth,500)]).
236
237
239
241
243mudLabelTypeProps("wl",tWall,[mudHeight(3),mudWeight(4)]).
244mudLabelTypeProps("tr",tTree,[mudHeight(3),mudWeight(4)]).
245mudLabelTypeProps("rk",tRock,[mudHeight(2),mudWeight(4)]).
246mudLabelTypeProps("pt",tPit,[mudHeight(-1),mudWeight(4)]).
247 mudLabelTypeProps("ot",tPowerOutlet,[mudHeight(1),mudWeight(1),mudPermanence(actTake,vTakenStays),mudActAffect(actTake,mudEnergy(+50))]).
248 mudLabelTypeProps("nt",tNut,[mudHeight(1),mudWeight(1),mudPermanence(actTake,vTakenMoves),mudActAffect(actEat,mudEnergy(+40)),spawn_rate(10)]).
249mudLabelTypeProps("lw",tLowWall,[mudHeight(2),mudWeight(4)]).
250mudLabelTypeProps("lg",tLedge,[mudHeight(2),mudWeight(4)]).
251mudLabelTypeProps("lb",tLowBox,[mudHeight(2),mudWeight(2)]).
252mudLabelTypeProps("hw",tHighWall,[mudHeight(3),mudWeight(4)]).
253mudLabelTypeProps("hb",tHighBox,[mudHeight(3),mudWeight(3)]).
254:- do_gc. 255 mudLabelTypeProps("gd",tGold,[mudHeight(1),mudWeight(1),mudPermanence(actTake,vTakenDeletes),mudActAffect(actTake,mudScore(+10))]).
256 mudLabelTypeProps("fd",tFood,[mudHeight(0),mudWeight(1),mudPermanence(actTake,vTakenMoves),mudActAffect(actEat,mudEnergy(+80))]).
257mudLabelTypeProps("el",tElixer,[mudHeight(1),mudWeight(1),mudPermanence(actTake,vTakenMoves),mudActAffect(actEat,mudHealth(+80))]).
258mudLabelTypeProps("ed",tEdgeOfWorld,[mudHeight(10),mudWeight(4)]).
259 mudLabelTypeProps("dt",tDirt,[mudHeight(1),mudWeight(1),mudPermanence(actTake,vTakenDeletes),mudActAffect(actTake,mudScore(+1)),spawn_rate(5)]).
260mudLabelTypeProps("dr",tDoor,[mudHeight(3),mudWeight(2)]).
261
264mudLabelTypeProps("--",isMissing,[]).
265
268 mudLabelTypeProps("cp",tCorpsea,[mudHeight(1),mudWeight(1),mudPermanence(actTake,vTakenMoves),mudActAffect(actEat,mudEnergy(+80)),mudActAffect(actTake,mudScore(+10))]).
269 mudLabelTypeProps("cp",tCorpseb,[mudHeight(1),mudWeight(1),mudPermanence(actTake,vTakenMoves),mudActAffect(actEat,mudEnergy(+120))]).
270mudLabelTypeProps("da",tCorpsec,[mudHeight(2),mudWeight(2)]).
274mudLabelTypeProps("th",tNastyKnife,[mudActAffect(actWield,mudAttack(2))]).
275mudLabelTypeProps("th",tToughHide,[mudActAffect(actWear,mudArmor(2))]).
276
277
279
280
% This file contains the definitions for the objects in the world % To create a new world, simply change the tObj definitions as % described below (or in manual) % % *Object definitions* %. % Use the fmt label_type_props(label,typecode,[property1,property2,etc.]]). % label is whats used to refer to the tObj in the running world % typecode is whats used to refer to the tObj for initialization (see
world.pl
) % % All objects requiremudHeight()
andmudWeight()
properties % Even locations you want empty requiremudHeight(0)
to be defined % If mudPermanence(take,) is not defined for an tObj that can be picked % up (ietake()
), it is assumed to bemudPermanence(take,stays)
(ie never goes away). % % The properties are as follows: % % #mudHeight(N)
where N ranges from 1-5 & 10. % ---> 1 = very small, can be steped over. % ---> 2 = low, blocks movement, but can be climbed onto. % ---> 3+ = high, blocks sight and movement, can be climbed on from objects of % one less mudHeight. Eg. an agent on tObjmudHeight(2)
can climb onto an tObj % withmudHeight(3)
. % ---> 10 = Edge of world. Can't ever be seen over or climbed onto. % ** Negative numbers can be used for N, this is good for pits, etc. % % #mudWeight(N)
where N ranges from 1-4. % ---> 1 = light, can be picked up. % ---> 2 = hefty, can be pushed. % ---> 3 = heavy, normally immobile, can be pushed by high strength agents % ---> 4 = structure, cannot be moved. % % #act_energy(Action,N)
where N is any positive or negative integer (not 0) % ---> N is the amount of mudEnergy tAgent receives or loses % from doing that Action on the tObj defined. % % #act_score(Action,N)
where N is any positive or negative integer (not 0) % ---> N is the mudScore the tAgent recieves from doing Action on the % obect defined. % % #act_heal(Action,N)
where N is any positive or negative integer % --->N is the amount of mudHealth the tAgent heals (or takes) from % doing Action on tObj defined. % % #mudPermanence(take,N)
where N ranges from 0-3. % ---> vTakenDeletes = 0 = tObj deletes when taken. (like dirt) % ---> 1/vTakenMoves = tObj is held when taken, can be eaten/destroyed (seeeat.pl
) (like swords) % ---> 2/vTakenStays = tObj stays where it is but something else (mudEnergy,mudScore) (like electricy) % is usually accumulated. % ---> 3/vTakenCopyFn(Something)
= tObj stays where it is but copies:type_props(tLeaf,mudPermanence(takeAct,vTakenCopyFn(tLeaf)))
% % #attack(N)
where N is some positive or negative interger. % ---> when held by tAgent-1 and agnet-1 attacks tAgent-2. tAgent-2 takes N % amount of mudHealth.(negative mudHealth or healing is possible) % % #mudArmor(N)
where N is some positive or negative integer. % ---> N points of mudHealth are subtracted (added) to an incoming attack. % % #spawn_rate(N)
% ---> N% chance per turn of this tObj being placed in the world. % % July 7, 1996 % John Eikenberry % % Dec 13, 2035 % Douglas MilesObject Flags and Types Object types:
This is a list of all the types an tObj can be. This is not a bitvector, but a single number from this list:
1 LIGHT Item is a light source. 2 SCROLL Item is a magical scroll. 3 WAND Item is a magical wand. - point at 1 target. 4 STAFF Item is a magical staff. - affect all in room. 5 WEAPON Item is a weapon. 6 FIREWEAPON Currently not implemented. Do not use. 7 MISSILE Currently not implemented. Do not use. 8 TREASURE Item is treasure other than gold coins (i.e. gems) 9 ARMOR Item is armor. 10 POTION Item is a magical potion. 11 WORN Item is worn, but not armor. 12 OTHER Miscellaneous tObj with no special properties. 13 TRASH Trash -- junked by cleaners, not bought by shopkeepers. 14 TRAP Currently not implemented. Do not use. 15 CONTAINER Item is a container. 16 NOTE Item is a note (can be written on). 17 DRINKCON Item is a drink container. 18 KEY Item is a key. 19 FOOD Item is tFood. 20 MONEY Item is money (gold coins). 21 PEN Item is a pen. 22 BOAT Item is a boat; allows you to traverse WATER(NOSWIM) 23 FOUNTAIN Item is a fountain.
Extra flags for objects:
Wear flags:
A bitvector with the following values:
1) TAKE Item can be taken (picked up off the ground). 2) FINGER Item can be worn on the fingers. 3) NECK Item can be worn around the neck. 4) BODY Item can be worn on the body. 5) HEAD Item can be worn on the head. 6) LEGS Item can be worn on the legs. 7) FEET Item can be worn on the feet. 8) HANDS Item can be worn on the hands. 9) ARMS Item can be worn on the arms. 10) SHIELD Item can be used as a shield. 11) ABOUT Item can be worn about the body. 12) WAIST Item can be worn around the waist. 13) WRIST Item can be worn around the wrist. 14) WIELD Item can be wielded; e.g. weapons. 15) HOLD Item can be held (the "hold" command).
Permanent effects:
A bitvector with the following meaning;
When wearsClothing an tObj with this flag, 1) BLIND The wearer goes blind 2) INVIS The wearer becomes invisible 3) DET-ALIGN The wearer detects alignments 4) DET-INVIS The wearer sees invisible objects and players. 5) DET-MAGIC The wearer sees magic on objects 6) SENSE-LIFE The wearer sees hidden mobs/players 7) WATWALK The wearer can walk on water 8) SANCT The wearer is protected by sanctuary 9) GROUP DO NOT USE - reserved for internal use 10) CURSE The wearer is influenced by a curse 11) INFRA The wearer sees in the dark 12) POISON The wearer is poisoned 13) PROT-EVIL The wearer is protected from evil 14) PROT-GOOD The wearer is protected from good 15) SLEEP The wearer is magically put to sleep 16) !TRACK The wearer cannot be tracked 17) UNUSED DO NOT USE 18) UNUSED DO NOT USE 19) SNEAK The wearer moves silently 20) HIDE The wearer is hidden - use with caution 21) BERSERK The wearer goes berserk 22) CHARM DO NOT USE - reserved for internal use 23) FIRESHIELD The wearer is protected by fireshield 24) HASTE The wearer is hasted 25) FLY The wearer can fly
Object applies:
0 NONE No effect - used to quit the menu. 1 STR Apply to strength. (-5 - +2) 2 DEX Apply to dexterity. (-5 - +2) 3 INT Apply to intelligence. (-5 - +2) 4 WIS Apply to wisdom. (-5 - +2) 5 CON Apply to constitution. (-5 - +2) 6 CHA Apply to charisma. (-5 - +2) 7 CLASS DO NOT USE! 8 LEVEL DO NOT USE! 9 AGE Apply to character's MUD age, in MUD-years.(-10 - +10) 10 CHAR_WEIGHT Apply to mudWeight. 11 CHAR_HEIGHT Apply to mudHeight. 12 MANA Apply to MAX mana points. (-50 - +30) 13 HIT Apply to MAX hit points. (-50 - +30) 14 MOVE Apply to MAX movement points. (-50 - +30) 15 GOLD DO NOT USE! 16 EXP DO NOT USE! 17 AC Apply to armor class (AC). (-30 - +30) 18 HITROLL Apply to hitroll. (-5 - +5) 19 DAMROLL Apply to mudHealth roll bonus. (-5 - +5) 20 SAVING_PARA Apply to save throw: paralyze (-2 - +2) 21 SAVING_ROD Apply to save throw: rods (-2 - +2) 22 SAVING_PETRI Apply to save throw: petrif (-2 - +2) 23 SAVING_BREATH Apply to save throw: breath (-2 - +2) 24 SAVING_SPELL Apply to save throw: spells (-2 - +2) 25 HIT_N_DAM Apply to hit roll and mudHealth roll (-5 - +5)
% */