=== The #MOBILE block

Last Modified by Samson, Nov. 26, 2014

Mobiles add life to an otherwise boring place. Afterall, you need people to talk to!
A well constructed area should have several mobiles populating it. Whether they are there
for people to kill, talk to, or get quests from, is entirely up to you.

You may have as many mobiles as you like, within the assigned vnum range of the area. They can be placed
in any order you wish in the file, but each section must obey the syntax.

The syntax of a #MOBILE block is:

#MOBILE
-------
String literal. This is required to mark the beginning of a mobile block.

Vnum     <int>
--------------
An integer value > 0. This value must fall within the range assigned to the builder who owns this area, or in the event
that this area is installed, it must fall within the vnum range specified in the #AREAHEADER section of the file.

Keywords     <string>~
----------------------
A set of words which will be used to interact with this mobile. They can be practically anything you want, but they
should also make sense. The use of color codes in keywords is inadvisable since it will not be obvious to players.

Race         <string>~
----------------------
The name of the race this mobile belongs to. Needs to match one of the defined races within your game.
Choose one from the following:

   "human", "high-elf", "dwarf", "halfling", "pixie", "half-ogre", "half-orc",
   "half-troll", "half-elf", "gith", "minotaur", "duergar", "centaur",
   "iguanadon", "gnome", "drow", "wild-elf", "insectoid", "sahuagin", "r9",
   "halfbreed", "reptile", "Mysterion", "lycanthrope", "dragon", "undead",
   "orc", "insect", "spider", "dinosaur", "fish", "avis", "Giant",
   "Carnivorous", "Parasitic", "slime", "Demonic", "snake", "Herbivorous", "Tree",
   "Vegan", "Elemental", "Planar", "Diabolic", "ghost", "goblin", "troll",
   "Vegman", "Mindflayer", "Primate", "Enfan", "golem", "Aarakocra", "troglodyte",
   "Patryn", "Labrynthian", "Sartan", "Titan", "Smurf", "Kangaroo", "horse",
   "Ratperson", "Astralion", "god", "Hill Giant", "Frost Giant", "Fire Giant",
   "Cloud Giant", "Storm Giant", "Stone Giant", "Red Dragon", "Black Dragon",
   "Green Dragon", "White Dragon", "Blue Dragon", "Silver Dragon", "Gold Dragon",
   "Bronze Dragon", "Copper Dragon", "Brass Dragon", "Vampire", "Lich", "wight",
   "Ghast", "Spectre", "zombie", "skeleton", "ghoul", "Half Giant", "Deep Gnome",
   "gnoll", "Sylvan Elf", "Sea-Elf", "Tiefling", "Aasimar", "Solar", "Planitar",
   "shadow", "Giant Skeleton", "Nilbog", "Houser", "Baku", "Beast Lord", "Deva",
   "Polaris", "Demodand", "Tarasque", "Diety", "Daemon", "Vagabond",
   "gargoyle", "bear", "bat", "cat", "dog", "ant", "ape", "baboon",
   "bee", "beetle", "boar", "bugbear", "ferret", "fly", "gelatin", "gorgon",
   "harpy", "hobgoblin", "kobold", "locust", "mold", "mule",
   "neanderthal", "ooze", "rat", "rustmonster", "shapeshifter", "shrew",
   "shrieker", "stirge", "thoul", "wolf", "worm", "bovine", "canine",
   "feline", "porcine", "mammal", "rodent", "amphibian", "crustacean",
   "spirit", "magical", "animal", "humanoid", "monster"

Class        <string>~
----------------------
The name of the class this mobile belongs to. Needs to match one of the defined classes within your game.
Choose one from the following:

   "Mage", "Cleric", "Rogue", "Warrior", "Necromancer", "Druid", "Ranger",
   "Monk", "Antipaladin", "Paladin", "Bard",
   "baker", "butcher", "blacksmith", "mayor", "king", "queen"

Gender       <string>~
----------------------
The gender of this mobile. Accepted values are:

Male, Female, Neuter, Hermaphrodite

Position     <string>~
----------------------
The current position this mobile is in.

DefPos       <string>~
----------------------
The default position this mobile starts in.

The following table is used for both position settings:

"dead", "mortal", "incapacitated", "stunned", "sleeping", "berserk",
"resting", "aggressive", "sitting", "fighting", "defensive", 
"evasive", "standing", "mounted", "shove", "drag"

Specfun      <string>~
----------------------
Special code function this mobile has assigned. These give mobiles some extra AI-like behaviours.
Choose one from the following table:

spec_janitor, spec_snake, spec_poison, spec_fido, spec_cast_adept, spec_RustMonster,
spec_GenericCityguard, spec_guard, spec_GenericCitizen, spec_warrior, spec_thief,
spec_cast_mage, spec_cast_cleric, spec_cast_undead, spec_ranger, spec_paladin,
spec_druid, spec_antipaladin, spec_bard, spec_breath_any, spec_breath_acid, spec_breath_fire,
spec_breath_frost, spec_breath_gas, spec_breath_lightning

Short        <string>~
----------------------
The one or two word "name" this mobile goes by.

Long         <string>~
----------------------
The one line description of this mob when seeing it in a room. Usually paired up with the Short description name.

Desc         <string>~
----------------------
The detailed description of this mobile when it is looked at by a player. Can extend on to multiple lines.

Nattacks     <float>
--------------------
The number of attacks this mobile gets per combat round. Can contain fractional values in #.# decimal format.

Stats1 <#1> <#2> <#3> <#4> <#5> <#6>
------------------------------------
The first set of statistical values for this mobile.

#1 = Alignment. Number must be between -1000 and +1000. It will be clamped if it exceeds this range.
   -1000 to -350 is for Evil mobiles.
   -349 to +349 is for Neutral mobiles.
   +350 to +1000 is for Good mobiles.
#2 = Amount of gold this mobile carries. Must be a positive number between 0 and approximately 2.1 billion.
   Or, if set to -1, this mobile is flagged to generate random treasure instead of a fixed gold amount.
   The generated treasure depends on the mobile's level.
#3 = The height of this mobile in inches.
#4 = The weight of this mobile in pounds.
#5 = The maximum amount of movement points this mobile has.
#6 = The maximum amount of mana this mobile has.

Stats2 <#1> <#2> <#3> <#4> <#5> <#6> <#7>
-----------------------------------------
The second set of statisical values for this mobile.

#1 = Level. The mobile's base level from 1 to 110 ( unmodified code ).
   This level value is used as the basis for many automated statistical calculations.
#2 = THAC0 value ( To Hit Armor Class 0 ). This is a D&D concept best explained by one of the rulebooks.
   Value can be anything up to +20. Or set to +21 to perform an automatic calculation.
   Basic explanation of it is that lower values mean the mobile has an easier time hitting its enemies.
   Theoretically there is no low end limit and the value is allowed to go negative but isn't recommended
   to be set lower than -20 without a very good reason.
#3 = Armor Class. This value can range from -300 to +300 but for practical purposes should be between -100 and +100.
   The lower this value is set, the harder the mobile is to hit in combat.
#4 = Bonus hit points. This value is added on to the mobile's natural hit points.
   Natural hit points is calculated as: ld8 + bonus. l = level, d8 meaning an 8 sided die.
#5 = Number of damage dice. This value determines the number of dice to roll for determining combat damage.
#6 = Size of damage dice. This value determines the number of sides the combat dice being rolled have.
#7 = Additional damage added to the value rolled for combat damage.
   Note: 5, 6, and 7 are values applied as barehand damage. If the mobile is wielding a weapon, then the weapon's
   damage values are used instead and the barehand values are ignored.

Speaks              <string>~
-----------------------------
The names of the languages this mobile is capable of speaking. Separate names by spaces.

Speaking            <string>~
-----------------------------
The name of the language this mobile speaks by default. Only one name will be recognized here.

Language settings are chosen from the following:

"common", "elvish", "dwarven", "pixie", "ogre",
"orcish", "trollese", "rodent", "insectoid",
"mammal", "reptile", "dragon", "spiritual",
"magical", "goblin", "god", "ancient",
"halfling", "clan", "gith", "minotaur", "centaur", "gnomish"

Actflags            <string>~
-----------------------------
The names of the flags this mobile has set. Separate names with spaces.
Choose from the following table:

FLAG NAME     | DESCRIPTION
--------------+-------------------------------------------------------
npc           | MUST be included for all mobs ( autoset on bootup ).
sentinel      | Mob never moves from its room.
scavenger     | Mob picks up items.
innkeeper     | Mob is an Innkeeper, where PC's can rent.
banker        | Mob is a Banker, where PC's do their banking.
aggressive    | Mob attacks players on site.
stayarea      | Mob wanders, but won't leave its area.
wimpy	      | Mob will flee when wounded.
pet           | Autoset for all pets, Do not use.
nosteal       | Mob cannot be stolen from, ever.
practice      | Mob trains player skills.
immortal      | Mob cannot be harmed. Useful for shopkeepers :P
deadly        | Mob Has a deadly poison.
polyself      | Used for polymorphs? DONT USE.
meta_aggr     | Mob is extremely aggressive, will attack anything it sees.
guardian      | Mob protects its master.
boarded       | Set on a mob acting as a Skyship when the player boards.
nowander      | Mob doesn't wander unless attacked.
mountable     | Mob can be mounted.
mounted	      | Mob is mounted.
scholar       | Mob can teach languages.
secretive     | Mob's actions aren't seen.
hardhat       | Prevents the NPC from taking damage from falling objects.
mobinvis      | Mob has wizinvis, equal to its level.
noassist      | Mob won't assist other mobs.
illusion      | Currently does nothing.
pacifist      | Mob will never fight.
noattack      | Mob has no physical attacks.
annoying      | Other mobs will attack this mob.
auction       | Mob is an auctioneer, where PC's conduct auctions. **
proto         | Mob is a prototype. Used only by OLC system.
mage          | Currently does nothing.
warrior       | Currently does nothing.
cleric        | Currently does nothing.
rogue         | Currently does nothing.
druid         | Currently does nothing.
monk          | Currently does nothing.
paladin       | Currently does nothing.
ranger        | Currently does nothing.
necromancer   | Currently does nothing.
antipaladin   | Currently does nothing.
huge          | Mob is too large to be bashed in combat.
greet         | Mob will great people at random when they're in the same room.
teacher       | Mob is a trainer for racial abilities.
onmap         | Mob is on a map in the overland system.
smith         | Mob is a blacksmith. Players can do crafting with them.
guildauc      | Mob is an auctioneer for a guild or clan. **
guildbank     | Mob is a banker for a guild or clan.
guildvendor   | Mob is a vendor running a shop for a guild or clan.
guildrepair   | Mob is a repair smith for a guild or clan.
guildforge    | Mob is a blacksmith for a guild or clan.
idmob         | Mob performs item identification services.
guildidmob    | Mob performs item identification services for a guild or clan.

** See the room flags section of rooms.txt for information on auction houses.
The GUILDAUC flag is used in place of the AUCTION flag for guild and clan auctioneers.

Affected            <string>~
-----------------------------
List of magical affects this mobile is affected by. Separate names with spaces.
Choose from the following table:

Effect         | Details
---------------+-------------------------------------------------------
blind          | Mob is blinded. (Kinda pointless :P)
invisible      | Mob is invisible.
detect_evil    | Mob can detect evil.
detect_invis   | Mob can see invisible.
detect_magic   | Mob can detect magic.
detect_hidden  | Mob can detect hidden players.
hold           | Mob is paralyzed. (Kinda pointless :P)
sanctuary      | Mob has a sanctuary spell.
faerie_fire    | Mob is affected by a faerie fire spell.
infrared       | Mob has infravision.
curse          | Mob is cursed.
poison         | Mob is poisoned. (Not much point :P)
protect        | Mob is protected from evil.
paralysis      | Mob is paralyzed. (Again, pointless :P)
sneak          | Mob is sneaking.
hide           | Mob is hiding.
sleep          | Mob is sleeping.
charm          | Mob is charmed.
flying         | Mob is flying.
pass_door      | Mob can pass through doors.
floating       | Mob is floating.
truesight      | Mob has True Sight (see spell).
detect_traps   | Mob can detect traps.
scrying        | Mob can scry.
fireshield     | Mob is affected by a Fireshield spell.
shockshield    | Mob is affected by a Shockshield spell.
venomshield    | Mob is affected by a Venomshield spell.
acidmist       | Mob is affected by an Acidmist spell.
iceshield      | Mob is affected by an Iceshield spell.
wizardeye      | Player affected by the Wizard Eye spell.
berserk        | Mob is berserk, will fight until dead.
aqua_breath    | Mob can breathe underwater.
recurringspell | Mob has a recurring spell on it. ( Not sure )
contagious     | Mob carries a contagious disease.
bladebarrier   | Mob is affected by a Bladebarrier spell.
silence        | Mob cannot speak or cast spells.
growth         | Mob is too large to be bashed.
tree_travel    | Can pass through thick forest that is otherwise impassible.
passdoor       | Can pass through otherwise closed doors.
quiv           | Set by the game when a player uses the Quivering Palm skill.
                 Can only be used once per day.
haste          | Doubles the number of attacks in combat.
slow           | Halves the number of attacks in combat.
notrack        | The target cannot be tracked using the track skill.
elvensong      | Set by the game when a player uses the Elvensong skill.
                 Can only be used once per day.
bladesong      | Set by the game when a player uses the Bladesong skill.
                 Can only be used once per day.
reverie        | Set by the game when a player uses the Reverie skill.
                 Can only be used once per day.
tenacity       | Improves a player's armor class by -4 when in use.
deathsong      | Set by the game when a player uses the Deathsong skill.
                 Can only be used once per day.
possess        | Set by the game when an immortal uses the switch command.
enlighten      | Set by the game when a player uses the Enlightenment skill.
                 Can only be used once per day.
treetalk       | Set by the game when a player uses the Treetalk skill.
                 Lasts for one hour.
spamguard      | Set by the game when a player is flagged as a command spammer.
                 This can last progressively longer depending on how often the
                 player is flagged.
bash           | Set by the game when a player has used the Bash skill.
                 Victim is affected for 4 combat rounds.

Bodyparts           <string>~
-----------------------------
The list of body parts this mobile has. Separate names with spaces.
Choose from the following table:

Part          | Details
--------------+-----------------------------------
head          | Has a head. Most mobs probably need this.
arms          | Has arms. Typically used for humanoid forms.
legs          | Has legs. Can be for any humanoid or animal form.
heart         | Has a heart. Anything that bleeds should have this.
brains        | Has a brain. Any living form should probably have this.
guts          | Has intestines, stomach, etc.
hands         | Has hands.
feet          | Has feet.
ankles        | Has ankles.
fingers       | Has fingers.
ear           | Has ears.
eye           | Has eyes.
long_tongue   | Has an unusually long tongue.
eyestalks     | Has eyestalks.
tentacles     | Has tentacles.
fins          | Has fins.
wings         | Has wings.
tail          | Has a tail. Not useful in combat.
scales        | Has scales. Not useful in combat.
claws         | Has claws. Can be used in combat.
fangs         | Has fangs. Can be used in combat.
horns         | Has horns. Can be used in combat.
tusks         | Has tusks. Can be used in combat.
tailattack    | Has a tail which is useful in combat.
sharpscales   | Has sharp scales which are useful in combat.
beak          | Has a beak. Can be used in combat.
haunches      | Has haunches.
hooves        | Has hooves.
paws          | Has paws.
forelegs      | Has forelegs.
feathers      | Has feathers.
shell         | Has a hard shell.

Body parts dictate what equipment slots can be available on an NPC as well as
what sort of gore drops are made when one is killed. These flags should be set
appropriately for the type of mob being created.

If no body parts are set manually, then the game will generate a default set
for instances of mobs based on their race data. If the mob's race data does not
have any body parts set, then the code will generate a generic set based on
certain racial traits.

Resist              <string>~
-----------------------------
List of resistance flags this mobile has set.

Immune              <string>~
-----------------------------
List of immunity flags this mobile has set.

Suscept             <string>~
-----------------------------
List of susceptibility flags this mobile has set.

Absorb              <string>~
-----------------------------
List of absorbtion flags this mobile has set.

Names for the Resist, Immune, Suscept, and Absorb lines are in the Values.txt file.

Attacks             <string>~
-----------------------------
List of special attack flags this mobile has.
Choose from the following:

Attack        | Details
--------------+-----------------------------------
bite          | Uses its teeth to bite with.
claws         | Uses its claws to scratch with.
tail          | Uses its tail to lash with.
sting         | Has a stinger to stab with.
punch         | Can punch for unarmed damage.
kick          | Can kick for unarmed damage.
trip          | Can use the trip skill.
bash          | Does backstab damage if successful.
stun          | Can use the stun skill.
gouge         | Can use the gouge skill.
backstab      | Can use the backstab or circle skill.
age           | Ages the victim 1 year when successful.
drain         | Casts the Energy Drain spell.
firebreath    | Has a fire breath attack available.
frostbreath   | Has a frost breath attack available.
acidbreath    | Has an acid breath attack available.
lightnbreath  | Has a lightning breath attack available. [Flag spelling intentional]
gasbreath     | Has a gas breath attack available.
poison        | Can cause poison damage.
nastypoison   | Can cause deadly poison damage.
gaze          | Currently does nothing.
blindness     | Can use the Blindness spell.
causeserious  | Can use the Cause Serious Wounds spell.
earthquake    | Can use the Earthquake spell.
causecritical | Can use the Cause Critical Wounds spell.
curse         | Can use the Curse spell.
flamestrike   | Can use the Flamestrike spell.
harm          | Can use the Harm spell.
fireball      | Can use the Fireball spell.
colorspray    | Can use the Color Spray spell.
weaken        | Can use the Weakness spell.
spiralblast   | Can use the Spiral Blast spell.

Attack types may be combined, but try not to make the NPC too overpowered.

Defenses            <string>~
-----------------------------
List of special defense flags this mobile has set.
Choose from the following:

Defense       | Details
--------------+-----------------------------------
parry         | Allows the NPC to parry attacks.
dodge         | Allows the NPC to dodge attacks.
heal          | Allows the NPC to cast the Heal spell.
curelight     | Allows the NPC to cast Cure Light Wounds.
cureserious   | Allows the NPC to cast Cure Serious Wounds.
curecritical  | Allows the NPC to cast Cure Critical Wounds.
dispelmagic   | Allows the NPC to cast Dispel Magic.
dispelevil    | Allows the NPC to cast Dispel Evil.
sanctuary     | Allows the NPC to cast Sanctuary.
fireshield    | Allows the NPC to cast Fireshield.
shockshield   | Allows the NPC to cast Shockshield.
shield        | Unused.
bless         | Unused.
stoneskin     | Unused.
teleport      | Unused.
disarm        | Allows the NPC to disarm opponents.
grip          | Fortifies the NPC against disarm attempts.
truesight     | Unused.

Defense types may be combined, but try not to make the NPC too overpowered.

If this mobile is going to be a shopkeeper, then the following section needs to be added at this point:

ShopData <#1> <#2> <#3> <#4> <#5> <#6> <#7> <#8> <#9>
-----------------------------------------------------
The shop information values.

#1 through #5 = The item type numbers that this shopkeeper will sell.
#6 = Profit margin for selling items. The percentage of the cost of the item this shopkeeper will charge.
   Values from 0 to 99 will reduce the price of an item. Values from 101 up will increase the price of an item.
#7 = Profit margin for buying items. The percentage of the cost of the item this shopkeeper will pay to buy an item.
   Values from 0 to 99 will reduce the payment. Values from 101 up will increase the payment.
#8 = Hour of the day the shop opens.
#9 = Hour of the day the shop closes.

For a 28hr shop, specify open of 0 and close of 28 ( unmodified code ). Yes, the game's unmodified clock is a 28hr day.

If this mobile is going to be a repairsmith, then the following section needs to be added at this point:

RepairData <#1> <#2> <#3> <#4> <#5> <#6> <#7>
---------------------------------------------
The shop information values.

#1 through #3 = The item type numbers that this smith will repair.
#4 = Repair cost factor. Percentage of the item's value this smith will charge to repair it.
#5 = Type of repairs this shop will perform.
   A value of 1 means the shop repairs damaged items.
   A value of 2 means the shop recharges magical items.
#6 = Hour of the day the shop opens.
#7 = Hour of the day the shop closes.

For a 28hr shop, specify open of 0 and close of 28 ( unmodified code ). Yes, the game's unmodified clock is a 28hr day.

#MUDPROG
#ENDPROG
--------------
See the Misc.txt file for the format of Mudprog blocks. These are optional.

#ENDMOBILE
----------
String literal. This ending tag is required to mark the end of a #MOBILE block.
If it is left out, the file will be assumed to be corrupt.

===========================================================================================

An example of a finished mobile, with an attatched mobprogram:
(Mudprogs are covered in a seperate file)

#MOBILE
Vnum      1203
Keywords  krusty iguana~
Race      reptile~
Class     Warrior~
Gender    female~
Position  standing~
DefPos    standing~
Short     Krusty~
Long      A spectral iguana roams the immortal halls.
~
Desc      Wavering in and out of this diemsion and the afterlife, this spectral
iguana is all that remains of Samson's once lively pet iguana.
Considerably larger and meaner looking in undeath, the iguana is
nearly 50 feet in length, and instead of the normal green color
she is now an evil shade of black. The long claws once only used for
climbing have now become hideous slashing weapons that could shred
a grown man in an instant. The remains of an adamantite collar still
cling to the iguanas neck fold, the magical energy still pulsating
through it. A shiny gold medallion identifies the spectre as Krusty.
Only the magical forces of the immortal halls keep this beast of
undeath from ravaging the world below.......
~
Nattacks  0.000000
Stats1    0 0 0 0 150 100
Stats2    100 21 0 0 0 0 0
Speaks    common reptile~
Speaking  reptile~
Actflags  npc stayarea immortal~
Affected  detect_invis detect_hidden infrared flying truesight passdoor~
Bodyparts head legs guts feet eye tail scales claws~
Immune    poison drain sleep charm hold paralysis~
#MUDPROG
Progtype  act_prog~
Arglist   p has sent a swirling vortex to transport you.~
Comlist   if ispc($n)
mpgoto 1401
yell Why can't you people leave me alone dammit!
endif
~
#ENDPROG

#MUDPROG
Progtype  death_prog~
Arglist   100~
Comlist   mpat 1401 mpmload 1203
yell God dammit! STOP PICKING ON ME!
~
#ENDPROG

#MUDPROG
Progtype  act_prog~
Arglist   p flings you to the astral winds.~
Comlist   mpgoto 1401
yell Nice try, but I found my way home!
~
#ENDPROG

#ENDMOBILE