Revision: bc3121670976
Author: Kevin Wells <
DarkOp...@gmail.com>
Date: Sun Apr 17 01:59:21 2011
Log: Added more items. Added a randomized size system for item
templates. Most items use this now. Finished making starting items. Tweaked
things. Balanced things. There is at least one of every weapon category in
the game now.
http://code.google.com/p/escape-from-the-masters-lair/source/detail?r=bc3121670976
Added:
/data/templates/armor_set
/data/templates/weapons_melee
/data/templates/weapons_ranged
/grammar.cpp
/grammar.h
/player_starting_values.h
Deleted:
/data/templates/armor_set_huge
/data/templates/armor_set_large
/data/templates/armor_set_medium
/data/templates/armor_set_small
/data/templates/armor_set_tiny
/data/templates/weapon_melee_daggers
/data/templates/weapon_ranged_bows
/data/templates/weapon_thrown_arrows
/player_starting_gold.h
Modified:
/Development/Items.rtf
/Development/Old To Do.rtf
/Development/To Do.rtf
/Escape from the Master's Lair.cbp
/ai.h
/creature.cpp
/creature.h
/creature_combat.cpp
/creature_save_load.cpp
/data/templates/base_stats
/data/templates/races
/data/templates/starting_equipment
/data/templates/weapons_thrown
/dungeon.h
/dungeon_generation.cpp
/game.cpp
/item_combat.cpp
/item_template.cpp
/item_template.h
/material_properties.cpp
/monster.cpp
/monster_ai.cpp
/player.cpp
/player.h
/player_scores.cpp
/player_windows.cpp
/race.cpp
/race.h
/templates.cpp
/templates.h
/version.h
=======================================
--- /dev/null
+++ /data/templates/armor_set Sun Apr 17 01:59:21 2011
@@ -0,0 +1,265 @@
+//********//
+// Armor: //
+//********//
+
+ //*******//
+ // Head: //
+ //*******//
+
+ <item category:armor>
+ <RANDOM SIZE>
+ name:SIZE MATERIAL helm
+ plural name:SIZE MATERIAL helms
+ writing:
+ appearance:[
+ stackable:0
+ size:5.0
+ allowed material:cloth
+ allowed material:leather
+ allowed material:copper
+ allowed material:brass
+ allowed material:bronze
+ allowed material:iron
+ allowed material:steel
+ allowed material:silver
+ allowed material:gold
+ allowed material:bone
+ <armor>
+ armor category:head
+ </armor>
+ </item>
+
+ //************//
+ // Shoulders: //
+ //************//
+
+ <item category:armor>
+ <RANDOM SIZE>
+ name:pair of SIZE MATERIAL spaulders
+ plural name:pairs of SIZE MATERIAL spaulders
+ writing:
+ appearance:[
+ stackable:0
+ size:6.0
+ allowed material:cloth
+ allowed material:leather
+ allowed material:copper
+ allowed material:brass
+ allowed material:bronze
+ allowed material:iron
+ allowed material:steel
+ allowed material:silver
+ allowed material:gold
+ allowed material:bone
+ <armor>
+ armor category:shoulders
+ </armor>
+ </item>
+
+ //********//
+ // Chest: //
+ //********//
+
+ <item category:armor>
+ <RANDOM SIZE>
+ name:SIZE MATERIAL chestpiece
+ plural name:SIZE MATERIAL chestpieces
+ writing:
+ appearance:[
+ stackable:0
+ size:10.0
+ allowed material:cloth
+ allowed material:leather
+ allowed material:copper
+ allowed material:brass
+ allowed material:bronze
+ allowed material:iron
+ allowed material:steel
+ allowed material:silver
+ allowed material:gold
+ allowed material:bone
+ <armor>
+ armor category:chest
+ </armor>
+ </item>
+
+ //*******//
+ // Back: //
+ //*******//
+
+ <item category:armor>
+ <RANDOM SIZE>
+ name:SIZE MATERIAL cloak
+ plural name:SIZE MATERIAL cloaks
+ writing:
+ appearance:[
+ stackable:0
+ size:4.0
+ allowed material:cloth
+ allowed material:leather
+ <armor>
+ armor category:back
+ </armor>
+ </item>
+
+ //********//
+ // Waist: //
+ //********//
+
+ <item category:armor>
+ <RANDOM SIZE>
+ name:SIZE MATERIAL belt
+ plural name:SIZE MATERIAL belts
+ writing:
+ appearance:[
+ stackable:0
+ size:7.0
+ allowed material:cloth
+ allowed material:leather
+ allowed material:copper
+ allowed material:brass
+ allowed material:bronze
+ allowed material:iron
+ allowed material:steel
+ allowed material:silver
+ allowed material:gold
+ allowed material:bone
+ <armor>
+ armor category:waist
+ </armor>
+ </item>
+
+ //*******//
+ // Legs: //
+ //*******//
+
+ <item category:armor>
+ <RANDOM SIZE>
+ name:pair of SIZE MATERIAL trousers
+ plural name:pairs of SIZE MATERIAL trousers
+ writing:
+ appearance:[
+ stackable:0
+ size:9.0
+ allowed material:cloth
+ allowed material:leather
+ allowed material:copper
+ allowed material:brass
+ allowed material:bronze
+ allowed material:iron
+ allowed material:steel
+ allowed material:silver
+ allowed material:gold
+ allowed material:bone
+ <armor>
+ armor category:legs
+ </armor>
+ </item>
+
+ //*******//
+ // Feet: //
+ //*******//
+
+ <item category:armor>
+ <RANDOM SIZE>
+ name:pair of SIZE MATERIAL boots
+ plural name:pairs of SIZE MATERIAL boots
+ writing:
+ appearance:[
+ stackable:0
+ size:4.0
+ allowed material:cloth
+ allowed material:leather
+ allowed material:copper
+ allowed material:brass
+ allowed material:bronze
+ allowed material:iron
+ allowed material:steel
+ allowed material:silver
+ allowed material:gold
+ allowed material:bone
+ <armor>
+ armor category:feet
+ </armor>
+ </item>
+
+ //********//
+ // Hands: //
+ //********//
+
+ <item category:armor>
+ <RANDOM SIZE>
+ name:pair of SIZE MATERIAL gloves
+ plural name:pairs of SIZE MATERIAL gloves
+ writing:
+ appearance:[
+ stackable:0
+ size:3.0
+ allowed material:cloth
+ allowed material:leather
+ allowed material:copper
+ allowed material:brass
+ allowed material:bronze
+ allowed material:iron
+ allowed material:steel
+ allowed material:silver
+ allowed material:gold
+ allowed material:bone
+ <armor>
+ armor category:hands
+ </armor>
+ </item>
+
+ //*********//
+ // Wrists: //
+ //*********//
+
+ <item category:armor>
+ <RANDOM SIZE>
+ name:pair of SIZE MATERIAL bracers
+ plural name:pairs of SIZE MATERIAL bracers
+ writing:
+ appearance:[
+ stackable:0
+ size:2.0
+ allowed material:cloth
+ allowed material:leather
+ allowed material:copper
+ allowed material:brass
+ allowed material:bronze
+ allowed material:iron
+ allowed material:steel
+ allowed material:silver
+ allowed material:gold
+ allowed material:bone
+ <armor>
+ armor category:wrists
+ </armor>
+ </item>
+
+ //*********//
+ // Shield: //
+ //*********//
+
+ <item category:armor>
+ <RANDOM SIZE>
+ name:SIZE MATERIAL shield
+ plural name:SIZE MATERIAL shields
+ writing:
+ appearance:[
+ stackable:0
+ size:8.0
+ allowed material:leather
+ allowed material:copper
+ allowed material:brass
+ allowed material:bronze
+ allowed material:iron
+ allowed material:steel
+ allowed material:silver
+ allowed material:gold
+ allowed material:bone
+ allowed material:wood
+ <armor>
+ armor category:shield
+ </armor>
+ </item>
=======================================
--- /dev/null
+++ /data/templates/weapons_melee Sun Apr 17 01:59:21 2011
@@ -0,0 +1,163 @@
+//**********//
+// Weapons: //
+//**********//
+
+ //********//
+ // Melee: //
+ //********//
+
+ <item category:weapon>
+ <RANDOM SIZE>
+ name:SIZE MATERIAL dagger
+ plural name:SIZE MATERIAL daggers
+ writing:
+ appearance:)
+ stackable:0
+ size:1.0
+ allowed material:copper
+ allowed material:brass
+ allowed material:bronze
+ allowed material:iron
+ allowed material:steel
+ allowed material:silver
+ allowed material:gold
+ allowed material:bone
+ allowed material:wood
+ allowed material:stone
+ allowed material:glass
+ <weapon>
+ governing weapon skill:bladed weapons
+ weapon category:short blades
+ </weapon>
+ </item>
+
+ <item category:weapon>
+ <RANDOM SIZE>
+ name:SIZE MATERIAL short sword
+ plural name:SIZE MATERIAL short swords
+ writing:
+ appearance:)
+ stackable:0
+ size:3.0
+ allowed material:copper
+ allowed material:brass
+ allowed material:bronze
+ allowed material:iron
+ allowed material:steel
+ allowed material:silver
+ allowed material:gold
+ allowed material:bone
+ allowed material:wood
+ <weapon>
+ governing weapon skill:bladed weapons
+ weapon category:short blades
+ </weapon>
+ </item>
+
+ <item category:weapon>
+ <RANDOM SIZE>
+ name:SIZE MATERIAL long sword
+ plural name:SIZE MATERIAL long swords
+ writing:
+ appearance:)
+ stackable:0
+ size:5.0
+ allowed material:copper
+ allowed material:brass
+ allowed material:bronze
+ allowed material:iron
+ allowed material:steel
+ allowed material:silver
+ allowed material:gold
+ allowed material:bone
+ allowed material:wood
+ <weapon>
+ governing weapon skill:bladed weapons
+ weapon category:long blades
+ </weapon>
+ </item>
+
+ <item category:weapon>
+ <RANDOM SIZE>
+ name:SIZE MATERIAL axe
+ plural name:SIZE MATERIAL axes
+ writing:
+ appearance:)
+ stackable:0
+ size:3.0
+ allowed material:copper
+ allowed material:brass
+ allowed material:bronze
+ allowed material:iron
+ allowed material:steel
+ allowed material:silver
+ allowed material:gold
+ allowed material:bone
+ allowed material:wood
+ <weapon>
+ governing weapon skill:bladed weapons
+ weapon category:axes
+ </weapon>
+ </item>
+
+ <item category:weapon>
+ <RANDOM SIZE>
+ name:SIZE MATERIAL mace
+ plural name:SIZE MATERIAL maces
+ writing:
+ appearance:)
+ stackable:0
+ size:3.0
+ allowed material:copper
+ allowed material:brass
+ allowed material:bronze
+ allowed material:iron
+ allowed material:steel
+ allowed material:silver
+ allowed material:gold
+ allowed material:bone
+ allowed material:wood
+ <weapon>
+ governing weapon skill:blunt weapons
+ weapon category:maces
+ </weapon>
+ </item>
+
+ <item category:weapon>
+ <RANDOM SIZE>
+ name:SIZE MATERIAL quarterstaff
+ plural name:SIZE MATERIAL quarterstaves
+ writing:
+ appearance:)
+ stackable:0
+ size:3.0
+ allowed material:bone
+ allowed material:wood
+ <weapon>
+ governing weapon skill:blunt weapons
+ weapon category:staves
+ </weapon>
+ </item>
+
+ <item category:weapon>
+ <RANDOM SIZE>
+ name:SIZE MATERIAL spear
+ plural name:SIZE MATERIAL spears
+ writing:
+ appearance:)
+ stackable:0
+ size:5.0
+ allowed material:copper
+ allowed material:brass
+ allowed material:bronze
+ allowed material:iron
+ allowed material:steel
+ allowed material:silver
+ allowed material:gold
+ allowed material:bone
+ allowed material:wood
+ <weapon>
+ governing weapon skill:stabbing weapons
+ weapon category:polearms
+ </weapon>
+ </item>
=======================================
--- /dev/null
+++ /data/templates/weapons_ranged Sun Apr 17 01:59:21 2011
@@ -0,0 +1,54 @@
+//**********//
+// Weapons: //
+//**********//
+
+ //*********//
+ // Ranged: //
+ //*********//
+
+ <item category:weapon>
+ <RANDOM SIZE>
+ name:SIZE MATERIAL bow
+ plural name:SIZE MATERIAL bows
+ writing:
+ appearance:)
+ stackable:0
+ size:8.0
+ allowed material:bone
+ allowed material:wood
+ <weapon>
+ governing weapon skill:launcher weapons
+ weapon category:bows
+ </weapon>
+ </item>
+
+ <item category:weapon>
+ <RANDOM SIZE>
+ name:SIZE MATERIAL crossbow
+ plural name:SIZE MATERIAL crossbows
+ writing:
+ appearance:)
+ stackable:0
+ size:7.0
+ allowed material:bone
+ allowed material:wood
+ <weapon>
+ governing weapon skill:launcher weapons
+ weapon category:crossbows
+ </weapon>
+ </item>
+
+ <item category:weapon>
+ <RANDOM SIZE>
+ name:SIZE MATERIAL sling
+ plural name:SIZE MATERIAL slings
+ writing:
+ appearance:)
+ stackable:0
+ size:5.0
+ allowed material:cloth
+ <weapon>
+ governing weapon skill:launcher weapons
+ weapon category:slings
+ </weapon>
+ </item>
=======================================
--- /dev/null
+++ /grammar.cpp Sun Apr 17 01:59:21 2011
@@ -0,0 +1,38 @@
+/* Copyright (c) 2011 Kevin Wells */
+/* Escape from the Master's Lair may be freely redistributed. See license
for details. */
+
+#include "grammar.h"
+#include "world.h"
+
+using namespace std;
+
+string a_vs_an(Item* item){
+ string a_or_an="";
+
+ //If the item is a corpse or skeleton.
+ if(item->is_corpse || item->is_skeleton){
+ a_or_an=templates.template_races[item->race].prefix_article;
+ }
+ //If the item is anything else.
+ else{
+ a_or_an=item->prefix_article;
+ }
+
+ return a_or_an;
+}
+
+string a_vs_an(Creature* creature){
+ string a_or_an="";
+
+ a_or_an=templates.template_races[creature->race].prefix_article;
+
+ return a_or_an;
+}
+
+string a_vs_an(short race){
+ string a_or_an="";
+
+ a_or_an=templates.template_races[race].prefix_article;
+
+ return a_or_an;
+}
=======================================
--- /dev/null
+++ /grammar.h Sun Apr 17 01:59:21 2011
@@ -0,0 +1,18 @@
+/* Copyright (c) 2011 Kevin Wells */
+/* Escape from the Master's Lair may be freely redistributed. See license
for details. */
+
+#ifndef grammar_h
+#define grammar_h
+
+#include "item.h"
+#include "creature.h"
+
+#include <string>
+
+std::string a_vs_an(Item* item);
+
+std::string a_vs_an(Creature* creature);
+
+std::string a_vs_an(short race);
+
+#endif
=======================================
--- /dev/null
+++ /player_starting_values.h Sun Apr 17 01:59:21 2011
@@ -0,0 +1,11 @@
+/* Copyright (c) 2011 Kevin Wells */
+/* Escape from the Master's Lair may be freely redistributed. See license
for details. */
+
+#ifndef player_starting_values_h
+#define player_starting_values_h
+
+const int STARTING_ITEMS_GOLD=25;
+
+const int STARTING_THROWN_STACK_SIZE=30;
+
+#endif
=======================================
--- /data/templates/armor_set_huge Sat Apr 16 13:57:39 2011
+++ /dev/null
@@ -1,255 +0,0 @@
-//********//
-// Armor: //
-//********//
-
- //*******//
- // Head: //
- //*******//
-
- <item category:armor>
- name:huge MATERIAL helm
- plural name:huge MATERIAL helms
- writing:
- appearance:[
- stackable:0
- size:7.0
- allowed material:cloth
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- <armor>
- armor category:head
- </armor>
- </item>
-
- //************//
- // Shoulders: //
- //************//
-
- <item category:armor>
- name:pair of huge MATERIAL spaulders
- plural name:pairs of huge MATERIAL spaulders
- writing:
- appearance:[
- stackable:0
- size:8.0
- allowed material:cloth
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- <armor>
- armor category:shoulders
- </armor>
- </item>
-
- //********//
- // Chest: //
- //********//
-
- <item category:armor>
- name:huge MATERIAL chestpiece
- plural name:huge MATERIAL chestpieces
- writing:
- appearance:[
- stackable:0
- size:12.0
- allowed material:cloth
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- <armor>
- armor category:chest
- </armor>
- </item>
-
- //*******//
- // Back: //
- //*******//
-
- <item category:armor>
- name:huge MATERIAL cloak
- plural name:huge MATERIAL cloaks
- writing:
- appearance:[
- stackable:0
- size:6.0
- allowed material:cloth
- allowed material:leather
- <armor>
- armor category:back
- </armor>
- </item>
-
- //********//
- // Waist: //
- //********//
-
- <item category:armor>
- name:huge MATERIAL belt
- plural name:huge MATERIAL belts
- writing:
- appearance:[
- stackable:0
- size:9.0
- allowed material:cloth
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- <armor>
- armor category:waist
- </armor>
- </item>
-
- //*******//
- // Legs: //
- //*******//
-
- <item category:armor>
- name:pair of huge MATERIAL trousers
- plural name:pairs of huge MATERIAL trousers
- writing:
- appearance:[
- stackable:0
- size:11.0
- allowed material:cloth
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- <armor>
- armor category:legs
- </armor>
- </item>
-
- //*******//
- // Feet: //
- //*******//
-
- <item category:armor>
- name:pair of huge MATERIAL boots
- plural name:pairs of huge MATERIAL boots
- writing:
- appearance:[
- stackable:0
- size:6.0
- allowed material:cloth
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- <armor>
- armor category:feet
- </armor>
- </item>
-
- //********//
- // Hands: //
- //********//
-
- <item category:armor>
- name:pair of huge MATERIAL gloves
- plural name:pairs of huge MATERIAL gloves
- writing:
- appearance:[
- stackable:0
- size:5.0
- allowed material:cloth
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- <armor>
- armor category:hands
- </armor>
- </item>
-
- //*********//
- // Wrists: //
- //*********//
-
- <item category:armor>
- name:pair of huge MATERIAL bracers
- plural name:pairs of huge MATERIAL bracers
- writing:
- appearance:[
- stackable:0
- size:4.0
- allowed material:cloth
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- <armor>
- armor category:wrists
- </armor>
- </item>
-
- //*********//
- // Shield: //
- //*********//
-
- <item category:armor>
- name:huge MATERIAL shield
- plural name:huge MATERIAL shields
- writing:
- appearance:[
- stackable:0
- size:10.0
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- allowed material:wood
- <armor>
- armor category:shield
- </armor>
- </item>
=======================================
--- /data/templates/armor_set_large Sat Apr 16 13:57:39 2011
+++ /dev/null
@@ -1,255 +0,0 @@
-//********//
-// Armor: //
-//********//
-
- //*******//
- // Head: //
- //*******//
-
- <item category:armor>
- name:large MATERIAL helm
- plural name:large MATERIAL helms
- writing:
- appearance:[
- stackable:0
- size:6.0
- allowed material:cloth
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- <armor>
- armor category:head
- </armor>
- </item>
-
- //************//
- // Shoulders: //
- //************//
-
- <item category:armor>
- name:pair of large MATERIAL spaulders
- plural name:pairs of large MATERIAL spaulders
- writing:
- appearance:[
- stackable:0
- size:7.0
- allowed material:cloth
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- <armor>
- armor category:shoulders
- </armor>
- </item>
-
- //********//
- // Chest: //
- //********//
-
- <item category:armor>
- name:large MATERIAL chestpiece
- plural name:large MATERIAL chestpieces
- writing:
- appearance:[
- stackable:0
- size:11.0
- allowed material:cloth
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- <armor>
- armor category:chest
- </armor>
- </item>
-
- //*******//
- // Back: //
- //*******//
-
- <item category:armor>
- name:large MATERIAL cloak
- plural name:large MATERIAL cloaks
- writing:
- appearance:[
- stackable:0
- size:5.0
- allowed material:cloth
- allowed material:leather
- <armor>
- armor category:back
- </armor>
- </item>
-
- //********//
- // Waist: //
- //********//
-
- <item category:armor>
- name:large MATERIAL belt
- plural name:large MATERIAL belts
- writing:
- appearance:[
- stackable:0
- size:8.0
- allowed material:cloth
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- <armor>
- armor category:waist
- </armor>
- </item>
-
- //*******//
- // Legs: //
- //*******//
-
- <item category:armor>
- name:pair of large MATERIAL trousers
- plural name:pairs of large MATERIAL trousers
- writing:
- appearance:[
- stackable:0
- size:10.0
- allowed material:cloth
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- <armor>
- armor category:legs
- </armor>
- </item>
-
- //*******//
- // Feet: //
- //*******//
-
- <item category:armor>
- name:pair of large MATERIAL boots
- plural name:pairs of large MATERIAL boots
- writing:
- appearance:[
- stackable:0
- size:5.0
- allowed material:cloth
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- <armor>
- armor category:feet
- </armor>
- </item>
-
- //********//
- // Hands: //
- //********//
-
- <item category:armor>
- name:pair of large MATERIAL gloves
- plural name:pairs of large MATERIAL gloves
- writing:
- appearance:[
- stackable:0
- size:4.0
- allowed material:cloth
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- <armor>
- armor category:hands
- </armor>
- </item>
-
- //*********//
- // Wrists: //
- //*********//
-
- <item category:armor>
- name:pair of large MATERIAL bracers
- plural name:pairs of large MATERIAL bracers
- writing:
- appearance:[
- stackable:0
- size:3.0
- allowed material:cloth
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- <armor>
- armor category:wrists
- </armor>
- </item>
-
- //*********//
- // Shield: //
- //*********//
-
- <item category:armor>
- name:large MATERIAL shield
- plural name:large MATERIAL shields
- writing:
- appearance:[
- stackable:0
- size:9.0
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- allowed material:wood
- <armor>
- armor category:shield
- </armor>
- </item>
=======================================
--- /data/templates/armor_set_medium Sat Apr 16 13:57:39 2011
+++ /dev/null
@@ -1,255 +0,0 @@
-//********//
-// Armor: //
-//********//
-
- //*******//
- // Head: //
- //*******//
-
- <item category:armor>
- name:medium MATERIAL helm
- plural name:medium MATERIAL helms
- writing:
- appearance:[
- stackable:0
- size:5.0
- allowed material:cloth
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- <armor>
- armor category:head
- </armor>
- </item>
-
- //************//
- // Shoulders: //
- //************//
-
- <item category:armor>
- name:pair of medium MATERIAL spaulders
- plural name:pairs of medium MATERIAL spaulders
- writing:
- appearance:[
- stackable:0
- size:6.0
- allowed material:cloth
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- <armor>
- armor category:shoulders
- </armor>
- </item>
-
- //********//
- // Chest: //
- //********//
-
- <item category:armor>
- name:medium MATERIAL chestpiece
- plural name:medium MATERIAL chestpieces
- writing:
- appearance:[
- stackable:0
- size:10.0
- allowed material:cloth
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- <armor>
- armor category:chest
- </armor>
- </item>
-
- //*******//
- // Back: //
- //*******//
-
- <item category:armor>
- name:medium MATERIAL cloak
- plural name:medium MATERIAL cloaks
- writing:
- appearance:[
- stackable:0
- size:4.0
- allowed material:cloth
- allowed material:leather
- <armor>
- armor category:back
- </armor>
- </item>
-
- //********//
- // Waist: //
- //********//
-
- <item category:armor>
- name:medium MATERIAL belt
- plural name:medium MATERIAL belts
- writing:
- appearance:[
- stackable:0
- size:7.0
- allowed material:cloth
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- <armor>
- armor category:waist
- </armor>
- </item>
-
- //*******//
- // Legs: //
- //*******//
-
- <item category:armor>
- name:pair of medium MATERIAL trousers
- plural name:pairs of medium MATERIAL trousers
- writing:
- appearance:[
- stackable:0
- size:9.0
- allowed material:cloth
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- <armor>
- armor category:legs
- </armor>
- </item>
-
- //*******//
- // Feet: //
- //*******//
-
- <item category:armor>
- name:pair of medium MATERIAL boots
- plural name:pairs of medium MATERIAL boots
- writing:
- appearance:[
- stackable:0
- size:4.0
- allowed material:cloth
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- <armor>
- armor category:feet
- </armor>
- </item>
-
- //********//
- // Hands: //
- //********//
-
- <item category:armor>
- name:pair of medium MATERIAL gloves
- plural name:pairs of medium MATERIAL gloves
- writing:
- appearance:[
- stackable:0
- size:3.0
- allowed material:cloth
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- <armor>
- armor category:hands
- </armor>
- </item>
-
- //*********//
- // Wrists: //
- //*********//
-
- <item category:armor>
- name:pair of medium MATERIAL bracers
- plural name:pairs of medium MATERIAL bracers
- writing:
- appearance:[
- stackable:0
- size:2.0
- allowed material:cloth
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- <armor>
- armor category:wrists
- </armor>
- </item>
-
- //*********//
- // Shield: //
- //*********//
-
- <item category:armor>
- name:medium MATERIAL shield
- plural name:medium MATERIAL shields
- writing:
- appearance:[
- stackable:0
- size:8.0
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- allowed material:wood
- <armor>
- armor category:shield
- </armor>
- </item>
=======================================
--- /data/templates/armor_set_small Sat Apr 16 13:57:39 2011
+++ /dev/null
@@ -1,255 +0,0 @@
-//********//
-// Armor: //
-//********//
-
- //*******//
- // Head: //
- //*******//
-
- <item category:armor>
- name:small MATERIAL helm
- plural name:small MATERIAL helms
- writing:
- appearance:[
- stackable:0
- size:4.0
- allowed material:cloth
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- <armor>
- armor category:head
- </armor>
- </item>
-
- //************//
- // Shoulders: //
- //************//
-
- <item category:armor>
- name:pair of small MATERIAL spaulders
- plural name:pairs of small MATERIAL spaulders
- writing:
- appearance:[
- stackable:0
- size:5.0
- allowed material:cloth
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- <armor>
- armor category:shoulders
- </armor>
- </item>
-
- //********//
- // Chest: //
- //********//
-
- <item category:armor>
- name:small MATERIAL chestpiece
- plural name:small MATERIAL chestpieces
- writing:
- appearance:[
- stackable:0
- size:9.0
- allowed material:cloth
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- <armor>
- armor category:chest
- </armor>
- </item>
-
- //*******//
- // Back: //
- //*******//
-
- <item category:armor>
- name:small MATERIAL cloak
- plural name:small MATERIAL cloaks
- writing:
- appearance:[
- stackable:0
- size:3.0
- allowed material:cloth
- allowed material:leather
- <armor>
- armor category:back
- </armor>
- </item>
-
- //********//
- // Waist: //
- //********//
-
- <item category:armor>
- name:small MATERIAL belt
- plural name:small MATERIAL belts
- writing:
- appearance:[
- stackable:0
- size:6.0
- allowed material:cloth
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- <armor>
- armor category:waist
- </armor>
- </item>
-
- //*******//
- // Legs: //
- //*******//
-
- <item category:armor>
- name:pair of small MATERIAL trousers
- plural name:pairs of small MATERIAL trousers
- writing:
- appearance:[
- stackable:0
- size:8.0
- allowed material:cloth
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- <armor>
- armor category:legs
- </armor>
- </item>
-
- //*******//
- // Feet: //
- //*******//
-
- <item category:armor>
- name:pair of small MATERIAL boots
- plural name:pairs of small MATERIAL boots
- writing:
- appearance:[
- stackable:0
- size:3.0
- allowed material:cloth
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- <armor>
- armor category:feet
- </armor>
- </item>
-
- //********//
- // Hands: //
- //********//
-
- <item category:armor>
- name:pair of small MATERIAL gloves
- plural name:pairs of small MATERIAL gloves
- writing:
- appearance:[
- stackable:0
- size:2.0
- allowed material:cloth
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- <armor>
- armor category:hands
- </armor>
- </item>
-
- //*********//
- // Wrists: //
- //*********//
-
- <item category:armor>
- name:pair of small MATERIAL bracers
- plural name:pairs of small MATERIAL bracers
- writing:
- appearance:[
- stackable:0
- size:1.0
- allowed material:cloth
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- <armor>
- armor category:wrists
- </armor>
- </item>
-
- //*********//
- // Shield: //
- //*********//
-
- <item category:armor>
- name:small MATERIAL shield
- plural name:small MATERIAL shields
- writing:
- appearance:[
- stackable:0
- size:7.0
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- allowed material:wood
- <armor>
- armor category:shield
- </armor>
- </item>
=======================================
--- /data/templates/armor_set_tiny Sat Apr 16 13:57:39 2011
+++ /dev/null
@@ -1,255 +0,0 @@
-//********//
-// Armor: //
-//********//
-
- //*******//
- // Head: //
- //*******//
-
- <item category:armor>
- name:tiny MATERIAL helm
- plural name:tiny MATERIAL helms
- writing:
- appearance:[
- stackable:0
- size:3.0
- allowed material:cloth
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- <armor>
- armor category:head
- </armor>
- </item>
-
- //************//
- // Shoulders: //
- //************//
-
- <item category:armor>
- name:pair of tiny MATERIAL spaulders
- plural name:pairs of tiny MATERIAL spaulders
- writing:
- appearance:[
- stackable:0
- size:4.0
- allowed material:cloth
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- <armor>
- armor category:shoulders
- </armor>
- </item>
-
- //********//
- // Chest: //
- //********//
-
- <item category:armor>
- name:tiny MATERIAL chestpiece
- plural name:tiny MATERIAL chestpieces
- writing:
- appearance:[
- stackable:0
- size:8.0
- allowed material:cloth
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- <armor>
- armor category:chest
- </armor>
- </item>
-
- //*******//
- // Back: //
- //*******//
-
- <item category:armor>
- name:tiny MATERIAL cloak
- plural name:tiny MATERIAL cloaks
- writing:
- appearance:[
- stackable:0
- size:2.0
- allowed material:cloth
- allowed material:leather
- <armor>
- armor category:back
- </armor>
- </item>
-
- //********//
- // Waist: //
- //********//
-
- <item category:armor>
- name:tiny MATERIAL belt
- plural name:tiny MATERIAL belts
- writing:
- appearance:[
- stackable:0
- size:5.0
- allowed material:cloth
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- <armor>
- armor category:waist
- </armor>
- </item>
-
- //*******//
- // Legs: //
- //*******//
-
- <item category:armor>
- name:pair of tiny MATERIAL trousers
- plural name:pairs of tiny MATERIAL trousers
- writing:
- appearance:[
- stackable:0
- size:7.0
- allowed material:cloth
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- <armor>
- armor category:legs
- </armor>
- </item>
-
- //*******//
- // Feet: //
- //*******//
-
- <item category:armor>
- name:pair of tiny MATERIAL boots
- plural name:pairs of tiny MATERIAL boots
- writing:
- appearance:[
- stackable:0
- size:2.0
- allowed material:cloth
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- <armor>
- armor category:feet
- </armor>
- </item>
-
- //********//
- // Hands: //
- //********//
-
- <item category:armor>
- name:pair of tiny MATERIAL gloves
- plural name:pairs of tiny MATERIAL gloves
- writing:
- appearance:[
- stackable:0
- size:1.0
- allowed material:cloth
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- <armor>
- armor category:hands
- </armor>
- </item>
-
- //*********//
- // Wrists: //
- //*********//
-
- <item category:armor>
- name:pair of tiny MATERIAL bracers
- plural name:pairs of tiny MATERIAL bracers
- writing:
- appearance:[
- stackable:0
- size:0.5
- allowed material:cloth
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- <armor>
- armor category:wrists
- </armor>
- </item>
-
- //*********//
- // Shield: //
- //*********//
-
- <item category:armor>
- name:tiny MATERIAL shield
- plural name:tiny MATERIAL shields
- writing:
- appearance:[
- stackable:0
- size:6.0
- allowed material:leather
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- allowed material:wood
- <armor>
- armor category:shield
- </armor>
- </item>
=======================================
--- /data/templates/weapon_melee_daggers Sat Apr 16 13:57:39 2011
+++ /dev/null
@@ -1,127 +0,0 @@
-//**********//
-// Weapons: //
-//**********//
-
- //********//
- // Melee: //
- //********//
-
- <item category:weapon>
- name:tiny MATERIAL dagger
- plural name:tiny MATERIAL daggers
- writing:
- appearance:)
- stackable:0
- size:0.5
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- allowed material:wood
- allowed material:stone
- allowed material:glass
- <weapon>
- governing weapon skill:bladed weapons
- weapon category:short blades
- </weapon>
- </item>
-
- <item category:weapon>
- name:small MATERIAL dagger
- plural name:small MATERIAL daggers
- writing:
- appearance:)
- stackable:0
- size:0.75
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- allowed material:wood
- allowed material:stone
- allowed material:glass
- <weapon>
- governing weapon skill:bladed weapons
- weapon category:short blades
- </weapon>
- </item>
-
- <item category:weapon>
- name:medium MATERIAL dagger
- plural name:medium MATERIAL daggers
- writing:
- appearance:)
- stackable:0
- size:1.0
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- allowed material:wood
- allowed material:stone
- allowed material:glass
- <weapon>
- governing weapon skill:bladed weapons
- weapon category:short blades
- </weapon>
- </item>
-
- <item category:weapon>
- name:large MATERIAL dagger
- plural name:large MATERIAL daggers
- writing:
- appearance:)
- stackable:0
- size:1.25
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- allowed material:wood
- allowed material:stone
- allowed material:glass
- <weapon>
- governing weapon skill:bladed weapons
- weapon category:short blades
- </weapon>
- </item>
-
- <item category:weapon>
- name:huge MATERIAL dagger
- plural name:huge MATERIAL daggers
- writing:
- appearance:)
- stackable:0
- size:1.5
- allowed material:copper
- allowed material:brass
- allowed material:bronze
- allowed material:iron
- allowed material:steel
- allowed material:silver
- allowed material:gold
- allowed material:bone
- allowed material:wood
- allowed material:stone
- allowed material:glass
- <weapon>
- governing weapon skill:bladed weapons
- weapon category:short blades
- </weapon>
- </item>
=======================================
--- /data/templates/weapon_ranged_bows Sat Apr 16 13:57:39 2011
+++ /dev/null
@@ -1,82 +0,0 @@
-//**********//
-// Weapons: //
-//**********//
-
- //*********//
- // Ranged: //
- //*********//
-
- <item category:weapon>
- name:tiny MATERIAL bow
- plural name:tiny MATERIAL bows
- writing:
- appearance:)
- stackable:0
- size:6.0
- allowed material:bone
- allowed material:wood
- <weapon>
- governing weapon skill:launcher weapons
- weapon category:bows
- </weapon>
- </item>
-
- <item category:weapon>
- name:small MATERIAL bow
- plural name:small MATERIAL bows
- writing:
- appearance:)
- stackable:0
- size:7.0
- allowed material:bone
- allowed material:wood
- <weapon>
- governing weapon skill:launcher weapons
- weapon category:bows
- </weapon>
- </item>
-
- <item category:weapon>
- name:medium MATERIAL bow
- plural name:medium MATERIAL bows
- writing:
- appearance:)
- stackable:0
- size:8.0
- allowed material:bone
- allowed material:wood
- <weapon>
- governing weapon skill:launcher weapons
- weapon category:bows
- </weapon>
- </item>
-
- <item category:weapon>
- name:large MATERIAL bow
- plural name:large MATERIAL bows
- writing:
- appearance:)
- stackable:0
- size:9.0
- allowed material:bone
- allowed material:wood
- <weapon>
- governing weapon skill:launcher weapons
- weapon category:bows
- </weapon>
- </item>
-
- <item category:weapon>
- name:huge MATERIAL bow
- plural name:huge MATERIAL bows
- writing:
- appearance:)
- stackable:0
- size:10.0
- allowed material:bone
- allowed material:wood
- <weapon>
- governing weapon skill:launcher weapons
- weapon category:bows
- </weapon>
- </item>
=======================================
--- /data/templates/weapon_thrown_arrows Sat Apr 16 13:57:39 2011
+++ /dev/null
@@ -1,24 +0,0 @@
-//**********//
-// Weapons: //
-//**********//
-
- //*********//
- // Thrown: //
- //*********//
-
- <item category:weapon>
- name:arrow made of MATERIAL
- plural name:arrows made of MATERIAL
- prefix article:an
- writing:
- appearance:)
- stackable:1
- size:0.5
- allowed material:bone
- allowed material:wood
- <weapon>
- governing weapon skill:thrown weapons
- weapon category:thrown
- launcher:bows
- </weapon>
- </item>
=======================================
--- /player_starting_gold.h Sat Apr 16 07:21:30 2011
+++ /dev/null
@@ -1,9 +0,0 @@
-/* Copyright (c) 2011 Kevin Wells */
-/* Escape from the Master's Lair may be freely redistributed. See license
for details. */
-
-#ifndef player_starting_gold_h
-#define player_starting_gold_h
-
-const int STARTING_ITEMS_GOLD=25;
-
-#endif
=======================================
--- /Development/Items.rtf Sat Apr 16 07:21:30 2011
+++ /Development/Items.rtf Sun Apr 17 01:59:21 2011
@@ -18,12 +18,12 @@
Thrown damage is 1-x.\par
\tab To find x, divide melee's x by 2.\par
EXCEPTION: For actual throwing weapons, damage is x-y.\par
-\tab To find x, multiply size by toughness, and multiply by 3.\par
+\tab To find x, multiply size by toughness and multiply by 3.\par
\tab To find y, multiply size by toughness, and multiply by 4.\par
Ranged damage is 0-0.\par
EXCEPTION: For actual ranged weapons, damage is x-y.\par
-\tab To find x, multiply size by toughness, and multiply by 3.\par
-\tab To find y, multiply size by toughness, and multiply by 4.\par
+\tab To find x, multiply size by toughness, and multiply by 0.25.\par
+\tab To find y, multiply size by toughness, and multiply by 0.35.\par
\par
Item categories:\par
-Weapons\par
=======================================
--- /Development/Old To Do.rtf Sat Apr 16 16:41:43 2011
+++ /Development/Old To Do.rtf Sun Apr 17 01:59:21 2011
@@ -127,6 +127,12 @@
-Comment out any unused items.\strike0\par
\lang9\strike -I should upgrade the template system again. Weapons and
armor can be defined independent of material. Aside from that, they will be
identical. Then, the game can randomly determine the material of the weapon
or armor when the item is generated. The game will need access to a list of
acceptable materials for such items. One other thought on this: I might
need to have each item template give a list of acceptable materials for
that item type, instead of the game keeping a list for all items. This way,
I could have warhammers made only of metals, and bows made only of
different kinds of wood, for example.\par
\lang1033 -Handle a vs. an.\par
--Add a maximum stack size, for technical reasons.\lang9\strike0\par
+-Add a maximum stack size, for technical reasons.\par
+\lang9 -Dual wielding should give a damage penalty. This is made less and
eventually it becomes a bonus instead by your dual wielding
skill.\strike0\par
+\strike -Make a/an handling into a function.\strike0\par
+\strike -Add a natural armor trait to races.\strike0\par
+\strike -The three types of damage range bonuses for races should also be
able to be penalties.\par
+\lang1033 -There should be some oil and water guaranteed or something.
UPDATE: When generating items for the level, it should keep track of water
and oil generated. When the first has not had a single one generated, it
should be heavily weighted towards making one of that item. Then the
second.\strike0\par
+\strike -Add some more (fun) races.\lang9\strike0\par
}
=======================================
--- /Development/To Do.rtf Sat Apr 16 21:36:42 2011
+++ /Development/To Do.rtf Sun Apr 17 01:59:21 2011
@@ -4,14 +4,8 @@
-Implement drinking from fountains.\par
-Allow creatures to drop equipped items with one command.\par
-Add the highscores list.\par
--There should be some oil and water guaranteed or something. UPDATE: When
generating items for the level, it should keep track of water and oil
generated. When the first has not had a single one generated, it should be
heavily weighted towards making one of that item. Then the second.\par
--Add some more (fun) races.\par
-Handle anything left in the code in comments.\lang9\par
-Make sure everything displays nicely with different resolutions.\par
--Dual wielding should give a damage penalty. This is made less and
eventually it becomes a bonus instead by your dual wielding skill.\par
--Make a/an handling into a function.\par
-\strike -Add a natural armor trait to races.\strike0\par
-\strike -The three types of damage range bonuses for races should also be
able to be penalties.\strike0\par
\par
AFTER BRANCH:\par
-Clean up the focused skills selection window. Letters should be in proper
order. All in one column.\par
=======================================
--- /Escape from the Master's Lair.cbp Sat Apr 16 07:21:30 2011
+++ /Escape from the Master's Lair.cbp Sun Apr 17 01:59:21 2011
@@ -143,6 +143,8 @@
<Unit filename="game.h" />
<Unit filename="game_window.cpp" />
<Unit filename="game_window.h" />
+ <Unit filename="grammar.cpp" />
+ <Unit filename="grammar.h" />
<Unit filename="image.cpp" />
<Unit filename="image.h" />
<Unit filename="image_data.h" />
@@ -176,7 +178,7 @@
<Unit filename="player.cpp" />
<Unit filename="player.h" />
<Unit filename="player_scores.cpp" />
- <Unit filename="player_starting_gold.h" />
+ <Unit filename="player_starting_values.h" />
<Unit filename="player_windows.cpp" />
<Unit filename="quit.cpp" />
<Unit filename="quit.h" />
@@ -213,7 +215,7 @@
<debugger />
<lib_finder disable_auto="1" />
<AutoVersioning>
- <Scheme minor_max="10" build_max="0" rev_max="0" rev_rand_max="10"
build_times_to_increment_minor="1000" />
+ <Scheme minor_max="10" build_max="0" rev_max="0" rev_rand_max="10"
build_times_to_increment_minor="100" />
<Settings autoincrement="1" date_declarations="1" update_manifest="1"
do_auto_increment="1" ask_to_increment="0" language="C++" svn="0"
svn_directory="" header_path="version.h" />
<Changes_Log show_changes_editor="0" app_title="released
version %M.%m.%b of %p" changeslog_path="ChangesLog.txt" />
<Code header_guard="VERSION_H" namespace="AutoVersion" prefix="" />
=======================================
--- /ai.h Thu Mar 24 17:51:02 2011
+++ /ai.h Sun Apr 17 01:59:21 2011
@@ -13,6 +13,7 @@
AI_ACTION_MOVE,
AI_ACTION_HEAL,
AI_ACTION_DRINK,
+ AI_ACTION_SEEK_FOUNTAIN,
AI_ACTION_DROP_WEIGHT
};
=======================================
--- /creature.cpp Sat Apr 16 21:36:42 2011
+++ /creature.cpp Sun Apr 17 01:59:21 2011
@@ -33,8 +33,6 @@
race=-1;
race_name="";
- prefix_article="a";
-
///class_name="";
class_name="<class name>";
=======================================
--- /creature.h Sat Apr 16 01:26:55 2011
+++ /creature.h Sun Apr 17 01:59:21 2011
@@ -72,9 +72,6 @@
short race;
std::string race_name;
- //The article ('a' or 'an') to be used before a single one of this
creature in a sentence.
- std::string prefix_article;
-
std::string class_name;
int health;
@@ -250,7 +247,7 @@
void attack_melee(Creature* target);
- void die(short cause_of_death,std::string killer="",std::string
killer_item="");
+ void die(short cause_of_death,std::string killer="",std::string
killer_item="",std::string killer_article="",std::string
killer_item_article="");
//Level up the creature.
void level_up();
=======================================
--- /creature_combat.cpp Sat Apr 16 21:36:42 2011
+++ /creature_combat.cpp Sun Apr 17 01:59:21 2011
@@ -7,6 +7,7 @@
#include "random_number_generator.h"
#include "world.h"
#include "combat_all.h"
+#include "grammar.h"
using namespace std;
@@ -97,15 +98,15 @@
//If the item is governed by the bladed weapons skill.
if(inventory[item_identifier].category==ITEM_WEAPON &&
inventory[item_identifier].governing_skill_weapon==SKILL_BLADED_WEAPONS){
-
weapon_damage+=weapon_damage*(return_skill_bladed_weapons()/10);
+
weapon_damage+=weapon_damage*(return_skill_bladed_weapons()/10.0);
}
//If the item is governed by the blunt weapons skill.
else
if(inventory[item_identifier].category==ITEM_WEAPON &&
inventory[item_identifier].governing_skill_weapon==SKILL_BLUNT_WEAPONS){
-
weapon_damage+=weapon_damage*(return_skill_blunt_weapons()/10);
+
weapon_damage+=weapon_damage*(return_skill_blunt_weapons()/10.0);
}
//If the item is governed by the stabbing weapons
skill.
else
if(inventory[item_identifier].category==ITEM_WEAPON &&
inventory[item_identifier].governing_skill_weapon==SKILL_STABBING_WEAPONS){
-
weapon_damage+=weapon_damage*(return_skill_stabbing_weapons()/10);
+
weapon_damage+=weapon_damage*(return_skill_stabbing_weapons()/10.0);
}
//Add the weapon's damage to the attack's damage.
@@ -115,18 +116,24 @@
//If items are being dual-wielded.
if(equipment[EQUIP_HOLD_RIGHT]!=0 &&
equipment[EQUIP_HOLD_LEFT]!=0){
- //Add the dual-wielding bonus.
- damage+=return_skill_dual_wielding()/2;
+ //Apply the dual-wielding modifier.
+
+ if(return_skill_dual_wielding()<10){
+ damage-=50.0/return_skill_dual_wielding();
+ }
+ else{
+ damage+=return_skill_dual_wielding()/2.0;
+ }
}
//If there are no items being wielded.
else if(equipment[EQUIP_HOLD_RIGHT]==0 &&
equipment[EQUIP_HOLD_LEFT]==0){
//Apply the unarmed weapon skill.
- damage+=base_damage*(return_skill_unarmed()/10);
+ damage+=base_damage*(return_skill_unarmed()/10.0);
}
//Apply the strength bonus.
- damage+=damage*(return_attribute_strength()/4);
+ damage+=damage*(return_attribute_strength()/4.0);
//We have finished determining the maximum damage the attacker
can do.
//Now, we determine the damage reduction based on the target's
stats.
@@ -393,11 +400,11 @@
//If the target's health drops to 0 or below, it has been killed.
if(target->return_health()<=0){
- target->die(CAUSE_OF_DEATH_MELEE,return_full_name(),"");
+
target->die(CAUSE_OF_DEATH_MELEE,return_full_name(),"",a_vs_an(this),"");
}
}
-void Creature::die(short cause_of_death,string killer,string killer_item){
+void Creature::die(short cause_of_death,string killer,string
killer_item,string killer_article,string killer_item_article){
//The creature is now dead.
alive=false;
@@ -406,14 +413,20 @@
string message="";
if(is_player){
- if(cause_of_death==CAUSE_OF_DEATH_DROWN){
+ if(cause_of_death==CAUSE_OF_DEATH_THIRST){
+ message="You succumb to thirst... Press [Spacebar] to
continue.";
+ }
+ else if(cause_of_death==CAUSE_OF_DEATH_LAVA){
+ message="You melt into nothing... Press [Spacebar] to
continue.";
+ }
+ else if(cause_of_death==CAUSE_OF_DEATH_DROWN){
message="You sink beneath the waves... Press [Spacebar] to
continue.";
}
else{
message="You die... Press [Spacebar] to continue.";
}
- player.save_game_log_entry(cause_of_death,killer,killer_item);
+
player.save_game_log_entry(cause_of_death,killer,killer_item,killer_article,killer_item_article);
player.current_window=WINDOW_DEATH_1;
}
=======================================
--- /creature_save_load.cpp Sat Apr 16 01:26:55 2011
+++ /creature_save_load.cpp Sun Apr 17 01:59:21 2011
@@ -35,8 +35,6 @@
save<<race_name<<"\n";
- save<<prefix_article<<"\n";
-
save<<class_name<<"\n";
save<<health<<"\n";
@@ -159,9 +157,6 @@
getline(*load,line);
race_name=line;
- getline(*load,line);
- prefix_article=line;
-
getline(*load,line);
class_name=line;
=======================================
--- /data/templates/base_stats Fri Mar 25 03:51:13 2011
+++ /data/templates/base_stats Sun Apr 17 01:59:21 2011
@@ -9,7 +9,7 @@
damage ranged:6-10
damage thrown:4-8
movement speed:50
- carrying capacity:350
+ carrying capacity:150
levelup hp range:2-3
levelup mana range:1-2
</base stats>
=======================================
--- /data/templates/races Sat Apr 16 21:36:42 2011
+++ /data/templates/races Sun Apr 17 01:59:21 2011
@@ -5,14 +5,16 @@
//************//
// B - bears: //
//************//
-//Slight health bonus
+//Health bonus
+//Slight melee damage penalty
<race>
name:polar bear
appearance:B
color:white
weight:350
- health:5
+ health:15
+ damage melee:-1,-2
</race>
<race>
@@ -20,7 +22,8 @@
appearance:B
color:dark blue
weight:125
- health:5
+ health:15
+ damage melee:-1,-2
</race>
<race>
@@ -28,7 +31,8 @@
appearance:B
color:brown
weight:300
- health:5
+ health:15
+ damage melee:-1,-2
</race>
<race>
@@ -36,7 +40,8 @@
appearance:B
color:blue
weight:125
- health:5
+ health:15
+ damage melee:-1,-2
</race>
//**************//
@@ -145,7 +150,7 @@
<race>
name:coyote
appearance:c
- color:paynes gray
+ color:payne's gray
weight:300
unarmed:-50
</race>
@@ -367,6 +372,10 @@
bladed weapons:-50
damage melee:1,2
health:-5
+ <ai traits>
+ flees:1
+ uses items:1
+ </ai traits>
</race>
<race>
@@ -377,6 +386,10 @@
bladed weapons:-50
damage melee:1,2
health:-5
+ <ai traits>
+ flees:1
+ uses items:1
+ </ai traits>
</race>
<race>
@@ -387,6 +400,10 @@
bladed weapons:-50
damage melee:1,2
health:-5
+ <ai traits>
+ flees:1
+ uses items:1
+ </ai traits>
</race>
<race>
@@ -397,6 +414,10 @@
bladed weapons:-50
damage melee:1,2
health:-5
+ <ai traits>
+ flees:1
+ uses items:1
+ </ai traits>
</race>
//************//
@@ -414,6 +435,10 @@
bladed weapons:-50
damage melee:1,2
armor:50
+ <ai traits>
+ flees:1
+ uses items:1
+ </ai traits>
</race>
//Blunt weapons skill bonus
@@ -427,6 +452,10 @@
blunt weapons:-50
natural armor:5
agility:-1
+ <ai traits>
+ flees:1
+ uses items:1
+ </ai traits>
</race>
//************//
@@ -439,11 +468,15 @@
<race>
name:wood elf
appearance:e
- color:light brown
+ color:pale brown
weight:55
launcher weapons:-50
damage ranged:1,2
levelup hp range:-1,-2
+ <ai traits>
+ flees:1
+ uses items:1
+ </ai traits>
</race>
<race>
@@ -454,6 +487,10 @@
launcher weapons:-50
damage ranged:1,2
levelup hp range:-1,-2
+ <ai traits>
+ flees:1
+ uses items:1
+ </ai traits>
</race>
<race>
@@ -464,6 +501,10 @@
launcher weapons:-50
damage ranged:1,2
levelup hp range:-1,-2
+ <ai traits>
+ flees:1
+ uses items:1
+ </ai traits>
</race>
<race>
@@ -474,6 +515,10 @@
launcher weapons:-50
damage ranged:1,2
levelup hp range:-1,-2
+ <ai traits>
+ flees:1
+ uses items:1
+ </ai traits>
</race>
<race>
@@ -484,6 +529,10 @@
launcher weapons:-50
damage ranged:1,2
levelup hp range:-1,-2
+ <ai traits>
+ flees:1
+ uses items:1
+ </ai traits>
</race>
<race>
=======================================
--- /data/templates/starting_equipment Sat Apr 16 13:57:39 2011
+++ /data/templates/starting_equipment Sun Apr 17 01:59:21 2011
@@ -24,6 +24,102 @@
</weapon>
</item>
+ <item category:weapon>
+ <DO NOT SPAWN>
+ name:simple wooden short sword
+ plural name:simple wooden short swords
+ writing:
+ appearance:)
+ stackable:0
+ size:1.5
+ color:wood
+ material:wood
+ <weapon>
+ governing weapon skill:bladed weapons
+ weapon category:short blades
+ </weapon>
+ </item>
+
+ <item category:weapon>
+ <DO NOT SPAWN>
+ name:simple wooden long sword
+ plural name:simple wooden long swords
+ writing:
+ appearance:)
+ stackable:0
+ size:2.5
+ color:wood
+ material:wood
+ <weapon>
+ governing weapon skill:bladed weapons
+ weapon category:long blades
+ </weapon>
+ </item>
+
+ <item category:weapon>
+ <DO NOT SPAWN>
+ name:simple wooden axe
+ plural name:simple wooden axes
+ writing:
+ appearance:)
+ stackable:0
+ size:1.5
+ color:wood
+ material:wood
+ <weapon>
+ governing weapon skill:bladed weapons
+ weapon category:axes
+ </weapon>
+ </item>
+
+ <item category:weapon>
+ <DO NOT SPAWN>
+ name:simple wooden mace
+ plural name:simple wooden maces
+ writing:
+ appearance:)
+ stackable:0
+ size:1.5
+ color:wood
+ material:wood
+ <weapon>
+ governing weapon skill:blunt weapons
+ weapon category:maces
+ </weapon>
+ </item>
+
+ <item category:weapon>
+ <DO NOT SPAWN>
+ name:simple wooden quarterstaff
+ plural name:simple wooden quarterstaves
+ writing:
+ appearance:)
+ stackable:0
+ size:1.5
+ color:wood
+ material:wood
+ <weapon>
+ governing weapon skill:blunt weapons
+ weapon category:staves
+ </weapon>
+ </item>
+
+ <item category:weapon>
+ <DO NOT SPAWN>
+ name:simple wooden spear
+ plural name:simple wooden spears
+ writing:
+ appearance:)
+ stackable:0
+ size:2.5
+ color:wood
+ material:wood
+ <weapon>
+ governing weapon skill:stabbing weapons
+ weapon category:polearms
+ </weapon>
+ </item>
+
//*********//
// Ranged: //
//*********//
@@ -35,7 +131,7 @@
writing:
appearance:)
stackable:0
- size:6.0
+ size:4.0
color:wood
material:wood
<weapon>
@@ -44,6 +140,38 @@
</weapon>
</item>
+ <item category:weapon>
+ <DO NOT SPAWN>
+ name:simple wooden crossbow
+ plural name:simple wooden crossbows
+ writing:
+ appearance:)
+ stackable:0
+ size:3.5
+ color:wood
+ material:wood
+ <weapon>
+ governing weapon skill:launcher weapons
+ weapon category:crossbows
+ </weapon>
+ </item>
+
+ <item category:weapon>
+ <DO NOT SPAWN>
+ name:simple sling
+ plural name:simple slings
+ writing:
+ appearance:)
+ stackable:0
+ size:2.5
+ color:cloth
+ material:cloth
+ <weapon>
+ governing weapon skill:launcher weapons
+ weapon category:slings
+ </weapon>
+ </item>
+
//*********//
// Thrown: //
//*********//
@@ -64,6 +192,56 @@
launcher:bows
</weapon>
</item>
+
+ <item category:weapon>
+ <DO NOT SPAWN>
+ name:simple wooden crossbow bolt
+ plural name:simple wooden crossbow bolts
+ writing:
+ appearance:)
+ stackable:1
+ size:0.25
+ color:wood
+ material:wood
+ <weapon>
+ governing weapon skill:thrown weapons
+ weapon category:thrown
+ launcher:crossbows
+ </weapon>
+ </item>
+
+ <item category:weapon>
+ <DO NOT SPAWN>
+ name:simple stone
+ plural name:simple stones
+ writing:
+ appearance:)
+ stackable:1
+ size:0.25
+ color:stone
+ material:stone
+ <weapon>
+ governing weapon skill:thrown weapons
+ weapon category:thrown
+ launcher:slings
+ </weapon>
+ </item>
+
+ <item category:weapon>
+ <DO NOT SPAWN>
+ name:simple bone shuriken
+ plural name:simple bone shurikens
+ writing:
+ appearance:)
+ stackable:1
+ size:0.25
+ color:bone
+ material:bone
+ <weapon>
+ governing weapon skill:thrown weapons
+ weapon category:thrown
+ </weapon>
+ </item>
//********//
// Armor: //
=======================================
--- /data/templates/weapons_thrown Sat Apr 16 07:21:30 2011
+++ /data/templates/weapons_thrown Sun Apr 17 01:59:21 2011
@@ -7,14 +7,72 @@
//*********//
<item category:weapon>
- name:shuriken
- plural name:shurikens
+ <RANDOM SIZE>
+ name:SIZE arrow made of MATERIAL
+ plural name:SIZE arrows made of MATERIAL
writing:
appearance:)
stackable:1
size:0.5
- color:iron
- material:iron
+ allowed material:bone
+ allowed material:wood
+ <weapon>
+ governing weapon skill:thrown weapons
+ weapon category:thrown
+ launcher:bows
+ </weapon>
+ </item>
+
+ <item category:weapon>
+ <RANDOM SIZE>
+ name:SIZE crossbow bolt made of MATERIAL
+ plural name:SIZE crossbow bolts made of MATERIAL
+ writing:
+ appearance:)
+ stackable:1
+ size:0.5
+ allowed material:bone
+ allowed material:wood
+ <weapon>
+ governing weapon skill:thrown weapons
+ weapon category:thrown
+ launcher:crossbows
+ </weapon>
+ </item>
+
+ <item category:weapon>
+ <RANDOM SIZE>
+ name:SIZE stone
+ plural name:SIZE stones
+ writing:
+ appearance:)
+ stackable:1
+ size:0.5
+ color:stone
+ material:stone
+ <weapon>
+ governing weapon skill:thrown weapons
+ weapon category:thrown
+ launcher:slings
+ </weapon>
+ </item>
+
+ <item category:weapon>
+ <RANDOM SIZE>
+ name:SIZE MATERIAL shuriken
+ plural name:SIZE MATERIAL shurikens
+ writing:
+ appearance:)
+ stackable:1
+ size:0.5
+ allowed material:copper
+ allowed material:brass
+ allowed material:bronze
+ allowed material:iron
+ allowed material:steel
+ allowed material:silver
+ allowed material:gold
+ allowed material:bone
<weapon>
governing weapon skill:thrown weapons
weapon category:thrown
=======================================
--- /dungeon.h Tue Apr 5 15:34:16 2011
+++ /dungeon.h Sun Apr 17 01:59:21 2011
@@ -4,6 +4,6 @@
#ifndef dungeon_h
#define dungeon_h
-const int DUNGEON_DEPTH=26;
+const int DUNGEON_DEPTH=13;
#endif
=======================================
--- /dungeon_generation.cpp Sat Apr 16 07:21:30 2011
+++ /dungeon_generation.cpp Sun Apr 17 01:59:21 2011
@@ -724,6 +724,9 @@
int
max_items=random_range((generated_level_x*generated_level_y)/500,(generated_level_x*generated_level_y)/250);
//The maximum number of tries.
int
random_amount_items=random_range((generated_level_x*generated_level_y)/10,(generated_level_x*generated_level_y)/4);
+ //The amount of important survival items generated on this level so
far.
+ int amount_water_bottles=0;
+ int amount_oil_bottles=0;
for(int i=0;i<random_amount_items &&
generated_items.size()<max_items;i++){
//Choose a random location in the level.
@@ -731,12 +734,56 @@
short y=random_range(0,generated_level_y-1);
//Randomly determine the item category.
- ///For now, equal chance for all categories.
- int random_item_category=random_range(ITEM_WEAPON,ITEM_OTHER);
+
+ int random_item_category=0;
+
+ if(amount_water_bottles==0 || amount_oil_bottles==0){
+ random_item_category=random_range(ITEM_WEAPON,ITEM_OTHER+8);
+ if(random_item_category>ITEM_OTHER){
+ random_item_category=ITEM_DRINK;
+ }
+ }
+ else if(amount_water_bottles==1 || amount_oil_bottles==1){
+ random_item_category=random_range(ITEM_WEAPON,ITEM_OTHER+2);
+ if(random_item_category>ITEM_OTHER){
+ random_item_category=ITEM_DRINK;
+ }
+ }
+ else{
+ random_item_category=random_range(ITEM_WEAPON,ITEM_OTHER);
+ }
//Randomly select an item from the chosen category's template.
- ///For now, equal chance for all items within category.
- int
random_item_template=random_range(0,templates.template_items[random_item_category].size()-1);
+
+ int random_item_template=0;
+
+ if(amount_water_bottles==0){
+
random_item_template=random_range(0,templates.template_items[random_item_category].size()-1+templates.template_items[random_item_category].size()/4.0);
+
if(random_item_template>templates.template_items[random_item_category].size()-1){
+ random_item_template=player.return_item_template("bottle
of water").index;
+ }
+ }
+ else if(amount_oil_bottles==0){
+
random_item_template=random_range(0,templates.template_items[random_item_category].size()-1+templates.template_items[random_item_category].size()/4.0);
+
if(random_item_template>templates.template_items[random_item_category].size()-1){
+ random_item_template=player.return_item_template("bottle
of oil").index;
+ }
+ }
+ else if(amount_water_bottles==1){
+
random_item_template=random_range(0,templates.template_items[random_item_category].size()-1+templates.template_items[random_item_category].size()/8.0);
+
if(random_item_template>templates.template_items[random_item_category].size()-1){
+ random_item_template=player.return_item_template("bottle
of water").index;
+ }
+ }
+ else if(amount_oil_bottles==1){
+
random_item_template=random_range(0,templates.template_items[random_item_category].size()-1+templates.template_items[random_item_category].size()/8.0);
+
if(random_item_template>templates.template_items[random_item_category].size()-1){
+ random_item_template=player.return_item_template("bottle
of oil").index;
+ }
+ }
+ else{
+
random_item_template=random_range(0,templates.template_items[random_item_category].size()-1);
+ }
//If the item is not spawnable.
if(!templates.template_items[random_item_category][random_item_template].spawnable){
@@ -779,6 +826,13 @@
//Set the newly generated item's position.
generated_items[generated_items.size()-1].x=x;
generated_items[generated_items.size()-1].y=y;
+
+
if(templates.template_items[random_item_category][random_item_template].name=="bottle
of water"){
+ amount_water_bottles++;
+ }
+ else
if(templates.template_items[random_item_category][random_item_template].name=="bottle
of oil"){
+ amount_oil_bottles++;
+ }
}
}
=======================================
--- /game.cpp Thu Apr 7 02:39:49 2011
+++ /game.cpp Sun Apr 17 01:59:21 2011
@@ -9,6 +9,7 @@
#include "max_objects.h"
#include "dungeon.h"
#include "message_log.h"
+#include "grammar.h"
#include <fstream>
@@ -136,7 +137,9 @@
string welcome="Welcome, ";
welcome+=
player.name;
- welcome+="! You are a ";
+ welcome+="! You are ";
+ welcome+=a_vs_an(&player);
+ welcome+=" ";
welcome+=player.race_name;
welcome+=" ";
welcome+=player.class_name;
=======================================
--- /item_combat.cpp Sat Apr 16 21:36:42 2011
+++ /item_combat.cpp Sun Apr 17 01:59:21 2011
@@ -9,6 +9,7 @@
#include "message_log.h"
#include "combat_all.h"
#include "world.h"
+#include "grammar.h"
using namespace std;
@@ -230,7 +231,7 @@
//If the target's health drops to 0 or below, it has been killed.
if(target->return_health()<=0){
-
target->die(CAUSE_OF_DEATH_THROWN,owner_data_thrown[0].full_name,return_full_name(1));
+
target->die(CAUSE_OF_DEATH_THROWN,owner_data_thrown[0].full_name,return_full_name(1),a_vs_an(owner_data_thrown[0].race),a_vs_an(this));
}
}
@@ -397,6 +398,6 @@
//If the target's health drops to 0 or below, it has been killed.
if(target->return_health()<=0){
-
target->die(CAUSE_OF_DEATH_RANGED,owner_data_fired[0].full_name,return_full_name(1));
+
target->die(CAUSE_OF_DEATH_RANGED,owner_data_fired[0].full_name,return_full_name(1),a_vs_an(owner_data_fired[0].race),a_vs_an(this));
}
}
=======================================
--- /item_template.cpp Sat Apr 16 13:57:39 2011
+++ /item_template.cpp Sun Apr 17 01:59:21 2011
@@ -7,4 +7,5 @@
Item_Template::Item_Template(){
size=0.0;
-}
+ random_size=false;
+}
=======================================
--- /item_template.h Sat Apr 16 13:57:39 2011
+++ /item_template.h Sun Apr 17 01:59:21 2011
@@ -13,6 +13,10 @@
//The size of the item.
double size;
+ //If true, this item will have its size randomly determined upon
generation.
+ //If false, the size variable will simply be used as-is.
+ bool random_size;
+
//The materials this item can be.
//This is only used for items that do not have a color/material
defined in their template entry.
std::vector<short> allowed_materials;
=======================================
--- /material_properties.cpp Mon Apr 4 16:44:32 2011
+++ /material_properties.cpp Sun Apr 17 01:59:21 2011
@@ -64,7 +64,7 @@
values[MATERIAL_BONE]=6;
values[MATERIAL_FOOD]=8;
values[MATERIAL_GLASS]=11;
- values[MATERIAL_STONE]=10;
+ values[MATERIAL_STONE]=5;
values[MATERIAL_CORPSE]=7;
values[MATERIAL_BRONZE]=14;
values[MATERIAL_STEEL]=17;
=======================================
--- /monster.cpp Sat Apr 16 16:41:43 2011
+++ /monster.cpp Sun Apr 17 01:59:21 2011
@@ -19,7 +19,9 @@
}
//Add some random bottles of water.
- give_item("bottle of water",random_range(1,2));
+ if(templates.template_races[race].ai_trait_uses_items){
+ give_item("bottle of water",random_range(1,2));
+ }
//Give the monster any race-specific items.
for(int
i=0;i<templates.template_races[race].inventory_items.size();i++){
=======================================
--- /monster_ai.cpp Sat Apr 16 21:44:48 2011
+++ /monster_ai.cpp Sun Apr 17 01:59:21 2011
@@ -63,11 +63,12 @@
action.action=AI_ACTION_HEAL;
}
else if(ai_state_thirsty()){
- if(mr->ai_trait_uses_items && /**Has thirst quenching item*/){
+ if(mr->ai_trait_uses_items/** && Has thirst quenching item*/){
action.action=AI_ACTION_DRINK;
}
else{
- action.action=AI_ACTION_SEEK_WATER;
+ action.action=AI_ACTION_SEEK_FOUNTAIN;
+ ///Set action coords to nearest fountain.
}
}
else if(!ai_state_low_health() &&
ai_state_hostile_nearby(hostile_creature.x,hostile_creature.y)){
@@ -148,6 +149,10 @@
}
}
}
+ else if(action.action==AI_ACTION_SEEK_FOUNTAIN){
+ ///If target location is this monster's location, drink from
the fountain here.
+ ///If not, move towards the location.
+ }
else if(action.action==AI_ACTION_DROP_WEIGHT){
///Find the heaviest non-equipped item.
///Drop the item.
=======================================
--- /player.cpp Sat Apr 16 16:41:43 2011
+++ /player.cpp Sun Apr 17 01:59:21 2011
@@ -8,7 +8,7 @@
#include "quit.h"
#include "save_load.h"
#include "message_log.h"
-#include "player_starting_gold.h"
+#include "player_starting_values.h"
#include "covering_conversions.h"
using namespace std;
@@ -51,11 +51,31 @@
available_starting_items.push_back("simple wooden dagger");
+ available_starting_items.push_back("simple wooden short sword");
+
+ available_starting_items.push_back("simple wooden long sword");
+
+ available_starting_items.push_back("simple wooden axe");
+
+ available_starting_items.push_back("simple wooden mace");
+
+ available_starting_items.push_back("simple wooden quarterstaff");
+
+ available_starting_items.push_back("simple wooden spear");
+
available_starting_items.push_back("simple wooden bow");
+ available_starting_items.push_back("simple wooden crossbow");
+
+ available_starting_items.push_back("simple sling");
+
available_starting_items.push_back("simple wooden arrow");
- available_starting_items.push_back("shuriken");
+ available_starting_items.push_back("simple wooden crossbow bolt");
+
+ available_starting_items.push_back("simple stone");
+
+ available_starting_items.push_back("simple bone shuriken");
available_starting_items.push_back("simple leather helm");
@@ -140,11 +160,17 @@
for(int i=0;i<starting_items.size();i++){
int stack=1;
- if(available_starting_items[starting_items[i]]=="arrow"){
- stack=20;
- }
- else if(available_starting_items[starting_items[i]]=="shuriken"){
- stack=20;
+ if(available_starting_items[starting_items[i]]=="simple wooden
arrow"){
+ stack=STARTING_THROWN_STACK_SIZE;
+ }
+ else if(available_starting_items[starting_items[i]]=="simple
wooden crossbow bolt"){
+ stack=STARTING_THROWN_STACK_SIZE;
+ }
+ else if(available_starting_items[starting_items[i]]=="simple
stone"){
+ stack=STARTING_THROWN_STACK_SIZE;
+ }
+ else if(available_starting_items[starting_items[i]]=="simple bone
shuriken"){
+ stack=STARTING_THROWN_STACK_SIZE;
}
give_item(available_starting_items[starting_items[i]],stack);
@@ -693,13 +719,6 @@
///******************///
if(option_dev){
- //Die
- /**if(keystates[SDLK_d]){
- die();
-
- keystates[SDLK_d]=NULL;
- }*/
-
//Command: DESTROY WALL (TEST)
/**if(keystates[SDLK_t]){
execute_command(-1);
@@ -714,16 +733,6 @@
keystates[SDLK_w]=NULL;
}*/
- //Command: Toggle all light items in current dungeon level.
(TEST)
- /**if(keystates[SDLK_f]){
- for(short
i=0;i<vector_levels[current_level].vector_item_lights.size();i++){
- //If the light item is on.
-
vector_levels[current_level].vector_item_lights[i].on=!vector_levels[current_level].vector_item_lights[i].on;
- }
-
- keystates[SDLK_f]=NULL;
- }*/
-
if(SDL_GetMouseState(NULL,NULL)&SDL_BUTTON(SDL_BUTTON_LEFT)){
int
mouse_current_x=(int)((int)(mouse_x+camera_x)/TILE_SIZE_X);
int
mouse_current_y=(int)((int)(mouse_y+camera_y)/TILE_SIZE_Y);
=======================================
--- /player.h Fri Apr 15 17:11:18 2011
+++ /player.h Sun Apr 17 01:59:21 2011
@@ -177,7 +177,7 @@
void render(std::vector< std::vector<bool> >* tile_rendered);
//Saves an entry to the game log for this game.
- void save_game_log_entry(short cause_of_death,std::string
killer="",std::string killer_item="");
+ void save_game_log_entry(short cause_of_death,std::string
killer="",std::string killer_item="",std::string
killer_article="",std::string killer_item_article="");
};
#endif
=======================================
--- /player_scores.cpp Fri Apr 15 23:09:58 2011
+++ /player_scores.cpp Sun Apr 17 01:59:21 2011
@@ -14,7 +14,7 @@
using namespace std;
using namespace boost::algorithm;
-void Player::save_game_log_entry(short cause_of_death,string killer,string
killer_item){
+void Player::save_game_log_entry(short cause_of_death,string killer,string
killer_item,string killer_article,string killer_item_article){
ofstream save_log("game_log",ifstream::app);
if(save_log!=NULL){
@@ -142,21 +142,31 @@
}*/
if(cause_of_death==CAUSE_OF_DEATH_MELEE){
- death_message="Killed by a ";
+ death_message="Killed by ";
+ death_message+=killer_article;
+ death_message+=" ";
death_message+=killer;
death_message+=".";
}
else if(cause_of_death==CAUSE_OF_DEATH_THROWN){
- death_message="Killed by a ";
+ death_message="Killed by ";
+ death_message+=killer_item_article;
+ death_message+=" ";
death_message+=killer_item;
- death_message+=" thrown by a ";
+ death_message+=" thrown by ";
+ death_message+=killer_article;
+ death_message+=" ";
death_message+=killer;
death_message+=".";
}
else if(cause_of_death==CAUSE_OF_DEATH_RANGED){
- death_message="Killed by a ";
+ death_message="Killed by ";
+ death_message+=killer_item_article;
+ death_message+=" ";
death_message+=killer_item;
- death_message+=" fired by a ";
+ death_message+=" fired by ";
+ death_message+=killer_article;
+ death_message+=" ";
death_message+=killer;
death_message+=".";
}
@@ -164,7 +174,7 @@
death_message="Died of thirst.";
}
else if(cause_of_death==CAUSE_OF_DEATH_LAVA){
- death_message="Incinerated by lava.";
+ death_message="Incinerated by molten lava.";
}
else if(cause_of_death==CAUSE_OF_DEATH_DROWN){
death_message="Drowned.";
=======================================
--- /player_windows.cpp Sat Apr 16 07:21:30 2011
+++ /player_windows.cpp Sun Apr 17 01:59:21 2011
@@ -7,9 +7,10 @@
#include "quit.h"
#include "material_properties.h"
#include "version.h"
-#include "player_starting_gold.h"
+#include "player_starting_values.h"
#include "covering_conversions.h"
#include "message_log.h"
+#include "grammar.h"
using namespace std;
using namespace boost::algorithm;
@@ -620,10 +621,12 @@
i--;
continue;
}
+
+ short render_color=templates.template_races[i].color;
ss.clear();ss.str("");ss<<i;ss<<"
- ";ss<<templates.template_races[i].name;ss<<"\xA";msg=ss.str();
-
font_small.show(5+column*column_width,font_small.spacing_y*2+font_small.spacing_y*lines_rendered++,msg,COLOR_WHITE);
+
font_small.show(5+column*column_width,font_small.spacing_y*2+font_small.spacing_y*lines_rendered++,msg,render_color);
}
if(get_race.length()>0 &&
atoi(get_race.c_str())<templates.template_races.size()){
@@ -922,9 +925,22 @@
item_value=templates.template_items[item_template.category][item_template.index].monetary_value;
-
ss.clear();ss.str("");ss<<(char)letter;ss<<purchased;ss<<available_starting_items[i];ss<<"
(cost: ";ss<<item_value;ss<<")";ss<<"\xA";msg=ss.str();
-
-
font_small.show(5+column*column_width,font_small.spacing_y*2+font_small.spacing_y*lines_rendered++,msg,COLOR_WHITE);
+ string stack_size="";
+
+ //If this item is a thrown weapon.
+
if(templates.template_items[item_template.category][item_template.index].category==ITEM_WEAPON
&&
+
templates.template_items[item_template.category][item_template.index].weapon_category==WEAPON_THROWN){
+ //Ammo items should cost a bit more, since you get a stack
of them.
+ item_value*=2.5;
+ //The store should display the size of the stack you will
get.
+ ss.clear();ss.str("");ss<<"
x";ss<<STARTING_THROWN_STACK_SIZE;stack_size=ss.str();
+ }
+
+ short
render_color=templates.template_items[item_template.category][item_template.index].color;
+
+
ss.clear();ss.str("");ss<<(char)letter;ss<<purchased;ss<<available_starting_items[i];ss<<stack_size;ss<<"
(cost: ";ss<<item_value;ss<<")";ss<<"\xA";msg=ss.str();
+
+
font_small.show(5+column*column_width,font_small.spacing_y*2+font_small.spacing_y*lines_rendered++,msg,render_color);
}
ss.clear();ss.str("");ss<<"Press [Enter] to continue
--> ";msg=ss.str();
@@ -1093,16 +1109,9 @@
string item_amount_prefix="";
if(inventory[item_info].stack==1){
- //If the item is a corpse or skeleton.
- if(inventory[item_info].is_corpse ||
inventory[item_info].is_skeleton){
-
item_amount_prefix=templates.template_races[inventory[item_info].race].prefix_article;
- item_amount_prefix+=" ";
- }
- //If the item is anything else.
- else{
- item_amount_prefix=inventory[item_info].prefix_article;
- item_amount_prefix+=" ";
- }
+ item_amount_prefix=a_vs_an(&inventory[item_info]);
+
+ item_amount_prefix+=" ";
}
ss.clear();ss.str("");ss<<inventory[item_info].appearance;ss<<"
- ";ss<<item_amount_prefix;ss<<inventory[item_info].return_full_name();ss<<"\xA";msg=ss.str();
@@ -1482,16 +1491,9 @@
string item_amount_prefix="";
if(inventory[i].stack==1){
- //If the item is a corpse or skeleton.
- if(inventory[i].is_corpse ||
inventory[i].is_skeleton){
-
item_amount_prefix=templates.template_races[inventory[i].race].prefix_article;
- item_amount_prefix+=" ";
- }
- //If the item is anything else.
- else{
- item_amount_prefix=inventory[i].prefix_article;
- item_amount_prefix+=" ";
- }
+ item_amount_prefix=a_vs_an(&inventory[i]);
+
+ item_amount_prefix+=" ";
}
string str_item="";
=======================================
--- /race.cpp Sat Apr 16 21:44:48 2011
+++ /race.cpp Sun Apr 17 01:59:21 2011
@@ -14,6 +14,8 @@
natural_armor=0;
+ prefix_article="a";
+
ai_trait_flees=false;
ai_trait_uses_items=false;
ai_trait_wanders=true;
=======================================
--- /race.h Sat Apr 16 21:44:48 2011
+++ /race.h Sun Apr 17 01:59:21 2011
@@ -22,6 +22,9 @@
//These are the items that a member of this race starts with.
std::vector<std::string> inventory_items;
+ //The article ('a' or 'an') to be used before a single one of this
creature in a sentence.
+ std::string prefix_article;
+
//AI Traits:
bool ai_trait_flees;
=======================================
--- /templates.cpp Sat Apr 16 21:36:42 2011
+++ /templates.cpp Sun Apr 17 01:59:21 2011
@@ -107,8 +107,8 @@
if(item->damage_max_ranged==-1){
//If the item is a ranged weapon.
if(item->category==ITEM_WEAPON &&
item->weapon_category>=WEAPON_BOWS && item->weapon_category<=WEAPON_SLINGS){
-
item->damage_min_ranged=temp_item_size*toughness[item->material]*3.0;
-
item->damage_max_ranged=temp_item_size*toughness[item->material]*4.0;
+
item->damage_min_ranged=temp_item_size*toughness[item->material]*0.25;
+
item->damage_max_ranged=temp_item_size*toughness[item->material]*0.35;
if(item->damage_min_ranged<1){
item->damage_min_ranged=1;
@@ -140,7 +140,56 @@
replace_first(item->plural_name,"MATERIAL",material_to_string(item->material));
-
calculate_item_attributes(item,template_items[item_category][item_template_index].size);
+ //Determine the size to use for the item's attribute calculations.
+ double
size_to_use=template_items[item_category][item_template_index].size;
+
+ //If the item is set to have a random size.
+ if(template_items[item_category][item_template_index].random_size){
+
size_to_use=determine_item_size(item,item_category,item_template_index);
+ }
+
+ calculate_item_attributes(item,size_to_use);
+}
+
+double Templates::determine_item_size(Item* item,int item_category,int
item_template_index){
+ //Start with the item's medium size, which is defined by its template
entry.
+ double size=template_items[item_category][item_template_index].size;
+
+ //Choose a random size.
+ int random_size=random_range(0,4);
+
+ //Tiny
+ if(random_size==0){
+ size*=0.5;
+ replace_first(item->name,"SIZE","tiny");
+ replace_first(item->plural_name,"SIZE","tiny");
+ }
+ //Small
+ else if(random_size==1){
+ size*=0.75;
+ replace_first(item->name,"SIZE","small");
+ replace_first(item->plural_name,"SIZE","small");
+ }
+ //Medium
+ else if(random_size==2){
+ //Leave the size alone.
+ replace_first(item->name,"SIZE","medium");
+ replace_first(item->plural_name,"SIZE","medium");
+ }
+ //Large
+ else if(random_size==3){
+ size*=1.25;
+ replace_first(item->name,"SIZE","large");
+ replace_first(item->plural_name,"SIZE","large");
+ }
+ //Huge
+ else if(random_size==4){
+ size*=1.5;
+ replace_first(item->name,"SIZE","huge");
+ replace_first(item->plural_name,"SIZE","huge");
+ }
+
+ return size;
}
bool Templates::load_templates(){
@@ -955,6 +1004,11 @@
temp_race.inventory_items.push_back(line);
}
+
+ //If the line begins ai traits data.
+ else if(icontains(line,"<ai traits")){
+ load_template_race_ai_traits(&temp_race);
+ }
//If the line ends the race.
else if(icontains(line,"</race>")){
@@ -967,6 +1021,60 @@
}
}
}
+
+void Templates::load_template_race_ai_traits(Race* temp_race){
+ //As long as we haven't reached the end of the file.
+ while(!load.eof()){
+ string line="";
+
+ //The data name strings used in the file.
+
+ string flees="flees:";
+ string uses_items="uses items:";
+ string wanders="wanders:";
+
+ //Grab the next line of the file.
+ getline(load,line);
+
+ //Clear initial whitespace from the line.
+ trim(line);
+
+ //If the line is a comment.
+ if(istarts_with(line,"//")){
+ //Ignore this line.
+ }
+
+ //Load data based on the line.
+
+ //Flees.
+ else if(icontains(line,flees)){
+ //Clear the data name.
+ line.erase(0,flees.length());
+
+ temp_race->ai_trait_flees=(bool)atoi(line.c_str());
+ }
+ //Uses items.
+ else if(icontains(line,uses_items)){
+ //Clear the data name.
+ line.erase(0,uses_items.length());
+
+ temp_race->ai_trait_uses_items=(bool)atoi(line.c_str());
+ }
+ //Wanders.
+ else if(icontains(line,wanders)){
+ //Clear the data name.
+ line.erase(0,wanders.length());
+
+ temp_race->ai_trait_wanders=(bool)atoi(line.c_str());
+ }
+
+ //If the line ends the ai traits.
+ else if(icontains(line,"</ai traits>")){
+ //Done reading ai traits data.
+ return;
+ }
+ }
+}
void Templates::load_template_item(short category){
//Create a temporary item template based on category.
@@ -997,6 +1105,7 @@
//The item data name strings used in the file.
string spawnable="<DO NOT SPAWN>";
+ string random_size="<RANDOM SIZE>";
string name="name:";
string plural_name="plural name:";
string prefix_article="prefix article:";
@@ -1037,6 +1146,13 @@
temp_item.spawnable=false;
}
+ //Random size.
+ else if(icontains(line,random_size)){
+ //Clear the data name.
+ line.erase(0,random_size.length());
+
+ temp_item.random_size=true;
+ }
//Plural name.
else if(icontains(line,plural_name)){
//Clear the data name.
=======================================
--- /templates.h Sat Apr 16 07:21:30 2011
+++ /templates.h Sun Apr 17 01:59:21 2011
@@ -36,6 +36,8 @@
void load_template_race();
+ void load_template_race_ai_traits(Race* temp_race);
+
void load_template_item(short category);
void load_template_item_weapon(Item* temp_item);
@@ -81,6 +83,9 @@
//Randomly chooses a material from the list of allowed materials for
the passed item.
void determine_item_material(Item* item,int item_category,int
item_template_index);
+ //Randomly chooses a size from the (global) list of allowed sizes for
the passed item.
+ double determine_item_size(Item* item,int item_category,int
item_template_index);
+
//Calculates various attriutes of the passed item.
void calculate_item_attributes(Item* item,double temp_item_size);
};
=======================================
--- /version.h Sat Apr 16 21:36:42 2011
+++ /version.h Sun Apr 17 01:59:21 2011
@@ -4,7 +4,7 @@
namespace AutoVersion{
//Date Version Types
- static const char DATE[] = "16";
+ static const char DATE[] = "17";
static const char MONTH[] = "04";
static const char YEAR[] = "2011";
static const char UBUNTU_VERSION_STYLE[] = "11.04";
@@ -15,18 +15,18 @@
//Standard Version Type
static const long MAJOR = 0;
- static const long MINOR = 1;
- static const long BUILD = 2834;
- static const long REVISION = 15764;
+ static const long MINOR = 2;
+ static const long BUILD = 2862;
+ static const long REVISION = 15882;
//Miscellaneous Version Types
- static const long BUILDS_COUNT = 6549;
- #define RC_FILEVERSION 0,1,2834,15764
- #define RC_FILEVERSION_STRING "0, 1, 2834, 15764\0"
- static const char FULLVERSION_STRING[] = "0.1.2834.15764";
+ static const long BUILDS_COUNT = 6602;
+ #define RC_FILEVERSION 0,2,2862,15882
+ #define RC_FILEVERSION_STRING "0, 2, 2862, 15882\0"
+ static const char FULLVERSION_STRING[] = "0.2.2862.15882";
//These values are to keep track of your versioning state, don't modify
them.
- static const long BUILD_HISTORY = 634;
+ static const long BUILD_HISTORY = 2;
}