[escape-from-the-masters-lair] 3 new revisions pushed by DarkOppr...@gmail.com on 2011-04-17 04:44 GMT

0 views
Skip to first unread message

escape-from-th...@googlecode.com

unread,
Apr 17, 2011, 12:45:49 AM4/17/11
to escape-from-th...@googlegroups.com
3 new revisions:

Revision: 3b3615d2ac59
Author: Kevin Wells <DarkOp...@gmail.com>
Date: Sat Apr 16 16:41:43 2011
Log: Added a bunch of new races.
http://code.google.com/p/escape-from-the-masters-lair/source/detail?r=3b3615d2ac59

Revision: 40c81c89b456
Author: Kevin Wells <DarkOp...@gmail.com>
Date: Sat Apr 16 21:36:42 2011
Log: Added more races. Balanced. Fixed a couple bugs. Tweaked. Added
more f...
http://code.google.com/p/escape-from-the-masters-lair/source/detail?r=40c81c89b456

Revision: 4aa622bf9b0c
Author: Kevin Wells <DarkOp...@gmail.com>
Date: Sat Apr 16 21:44:48 2011
Log: Started adding some more ai stuff. Added first ai traits for
races.
http://code.google.com/p/escape-from-the-masters-lair/source/detail?r=4aa622bf9b0c

==============================================================================
Revision: 3b3615d2ac59
Author: Kevin Wells <DarkOp...@gmail.com>
Date: Sat Apr 16 16:41:43 2011
Log: Added a bunch of new races.
http://code.google.com/p/escape-from-the-masters-lair/source/detail?r=3b3615d2ac59

Modified:
/Development/Old To Do.rtf
/Development/Races.rtf
/Development/To Do.rtf
/Escape from the Master's Lair.layout
/Escape from the Master's Lair.layout.save
/creature.cpp
/creature_experience.cpp
/creature_skills.cpp
/data/templates/races
/monster.cpp
/player.cpp
/race.cpp
/race.h
/templates.cpp
/version.h

=======================================
--- /Development/Old To Do.rtf Fri Apr 15 23:09:58 2011
+++ /Development/Old To Do.rtf Sat Apr 16 16:41:43 2011
@@ -123,6 +123,10 @@
\strike -Also, disable the luck attribute.\strike0\par
\strike -Disable gender.\strike0\par
\strike -Disable mana.\strike0\par
-\strike -Disable comprehension and acumen attributes.\lang9\strike0\par
+\strike -Disable comprehension and acumen attributes.\par
+-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
}

=======================================
--- /Development/Races.rtf Sat Apr 16 07:21:30 2011
+++ /Development/Races.rtf Sat Apr 16 16:41:43 2011
@@ -8,13 +8,7 @@
Random range of mana gain on level up\strike0\par
\strike Bonuses and penalties to attributes and skills\strike0\par
\strike Bonuses and penalties to max health and mana\par
-Bonuses and penalties to movement speed\par
-\par
-\strike0 Racial Categories:\strike\par
-\strike0 B - bears\par
-r - rodents\par
-f - felines\par
-q - quadrupeds\par
+Bonuses and penalties to movement speed\strike0\par
\par
Guidelines for designing races:\par
The name is obvious.\par
=======================================
--- /Development/To Do.rtf Sat Apr 16 07:21:30 2011
+++ /Development/To Do.rtf Sat Apr 16 16:41:43 2011
@@ -1,17 +1,17 @@
{\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fnil\fcharset0 Calibri;}}
{\*\generator Msftedit
5.41.21.2510;}\viewkind4\uc1\pard\sa200\sl240\slmult1\lang1033\f0\fs22
-Expand the equipping/unequipping/item command related messages.\par
--Implement an action taking multiple turns.\strike\par
--Add a maximum stack size, for technical reasons.\strike0\par
+-Implement an action taking multiple turns.\par
-Implement drinking from fountains.\par
-Allow creatures to drop equipped items with one command.\par
-\strike -Handle a vs. an.\strike0\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.\par
-\strike -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.\strike0\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
+-Add a natural armor trait to races.\par
+-The three types of damage range bonuses for races should also be able to
be penalties.\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.layout Sat Apr 16 07:21:30 2011
+++ /Escape from the Master's Lair.layout Sat Apr 16 16:41:43 2011
@@ -20,7 +20,7 @@
<Cursor1 position="132" topLine="0" />
</File>
<File name="combat_all.cpp" open="0" top="0" tabpos="1" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="232" topLine="0" />
+ <Cursor1 position="307" topLine="0" />
</File>
<File name="combat_all.h" open="0" top="0" tabpos="0" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="199" topLine="0" />
@@ -37,20 +37,20 @@
<File name="covering_conversions.h" open="0" top="0" tabpos="0" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="325" topLine="0" />
</File>
- <File name="creature.cpp" open="0" top="0" tabpos="2" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="3433" topLine="122" />
+ <File name="creature.cpp" open="1" top="0" tabpos="4" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="758" topLine="24" />
</File>
<File name="creature.h" open="0" top="0" tabpos="4" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="2118" topLine="54" />
+ <Cursor1 position="8832" topLine="230" />
</File>
<File name="creature_alchemy.cpp" open="0" top="0" tabpos="0" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="3400" topLine="48" />
</File>
<File name="creature_attributes.cpp" open="0" top="0" tabpos="0"
split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="924" topLine="6" />
+ <Cursor1 position="620" topLine="6" />
</File>
- <File name="creature_combat.cpp" open="0" top="0" tabpos="6" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="17556" topLine="389" />
+ <File name="creature_combat.cpp" open="1" top="1" tabpos="7" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="3018" topLine="54" />
</File>
<File name="creature_commands.cpp" open="0" top="0" tabpos="7" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="5518" topLine="144" />
@@ -59,22 +59,22 @@
<Cursor1 position="1187" topLine="18" />
</File>
<File name="creature_experience.cpp" open="0" top="0" tabpos="2"
split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="4625" topLine="126" />
+ <Cursor1 position="2545" topLine="71" />
</File>
- <File name="creature_other_stats.cpp" open="0" top="0" tabpos="1"
split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="4610" topLine="154" />
+ <File name="creature_other_stats.cpp" open="1" top="0" tabpos="3"
split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="1976" topLine="56" />
</File>
<File name="creature_save_load.cpp" open="0" top="0" tabpos="0" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="3482" topLine="150" />
</File>
<File name="creature_skills.cpp" open="0" top="0" tabpos="0" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="553" topLine="0" />
+ <Cursor1 position="4380" topLine="126" />
</File>
<File name="dungeon.h" open="0" top="0" tabpos="0" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="140" topLine="0" />
</File>
<File name="dungeon_generation.cpp" open="0" top="0" tabpos="6" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="29128" topLine="754" />
+ <Cursor1 position="31279" topLine="798" />
</File>
<File name="dungeon_location.cpp" open="0" top="0" tabpos="0" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="235" topLine="0" />
@@ -88,8 +88,8 @@
<File name="effect.h" open="0" top="0" tabpos="0" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="132" topLine="0" />
</File>
- <File name="enumerations.h" open="0" top="0" tabpos="1" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="2533" topLine="132" />
+ <File name="enumerations.h" open="1" top="0" tabpos="1" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="4831" topLine="276" />
</File>
<File name="font.cpp" open="0" top="0" tabpos="5" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="1745" topLine="48" />
@@ -104,7 +104,7 @@
<Cursor1 position="818" topLine="29" />
</File>
<File name="game.cpp" open="0" top="0" tabpos="3" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="3521" topLine="112" />
+ <Cursor1 position="2207" topLine="80" />
</File>
<File name="game.h" open="0" top="0" tabpos="4" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="1777" topLine="60" />
@@ -179,7 +179,7 @@
<Cursor1 position="255" topLine="0" />
</File>
<File name="monster.cpp" open="0" top="0" tabpos="3" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="4497" topLine="18" />
+ <Cursor1 position="2427" topLine="60" />
</File>
<File name="monster.h" open="0" top="0" tabpos="3" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="313" topLine="31" />
@@ -203,7 +203,7 @@
<Cursor1 position="132" topLine="0" />
</File>
<File name="player.cpp" open="0" top="0" tabpos="6" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="1092" topLine="54" />
+ <Cursor1 position="5081" topLine="179" />
</File>
<File name="player.h" open="0" top="0" tabpos="7" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="3010" topLine="97" />
@@ -211,8 +211,8 @@
<File name="player_scores.cpp" open="0" top="0" tabpos="5" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="3462" topLine="112" />
</File>
- <File name="player_starting_gold.h" open="1" top="1" tabpos="1" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="230" topLine="0" />
+ <File name="player_starting_gold.h" open="0" top="0" tabpos="1" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="180" topLine="0" />
</File>
<File name="player_windows.cpp" open="0" top="0" tabpos="1" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="39449" topLine="1090" />
@@ -223,11 +223,11 @@
<File name="quit.h" open="0" top="0" tabpos="0" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="132" topLine="0" />
</File>
- <File name="race.cpp" open="0" top="0" tabpos="0" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="288" topLine="0" />
+ <File name="race.cpp" open="1" top="0" tabpos="5" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="190" topLine="0" />
</File>
- <File name="race.h" open="0" top="0" tabpos="0" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="462" topLine="0" />
+ <File name="race.h" open="1" top="0" tabpos="6" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="17" topLine="0" />
</File>
<File name="random_chance.cpp" open="0" top="0" tabpos="2" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="4101" topLine="164" />
@@ -259,14 +259,14 @@
<File name="string_input.h" open="0" top="0" tabpos="0" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="242" topLine="0" />
</File>
- <File name="templates.cpp" open="0" top="0" tabpos="2" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="1967" topLine="42" />
+ <File name="templates.cpp" open="1" top="0" tabpos="2" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="18183" topLine="72" />
</File>
- <File name="templates.h" open="0" top="0" tabpos="7" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="2400" topLine="63" />
+ <File name="templates.h" open="0" top="0" tabpos="1" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="207" topLine="0" />
</File>
<File name="templates_strings.cpp" open="0" top="0" tabpos="6" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="477" topLine="0" />
+ <Cursor1 position="7031" topLine="288" />
</File>
<File name="tile.cpp" open="0" top="0" tabpos="5" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="3899" topLine="96" />
@@ -290,7 +290,7 @@
<Cursor1 position="132" topLine="0" />
</File>
<File name="update.cpp" open="0" top="0" tabpos="1" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="4217" topLine="102" />
+ <Cursor1 position="20220" topLine="441" />
</File>
<File name="update.h" open="0" top="0" tabpos="11" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="249" topLine="0" />
=======================================
--- /Escape from the Master's Lair.layout.save Sat Apr 16 01:26:55 2011
+++ /Escape from the Master's Lair.layout.save Sat Apr 16 16:41:43 2011
@@ -20,7 +20,7 @@
<Cursor1 position="132" topLine="0" />
</File>
<File name="combat_all.cpp" open="0" top="0" tabpos="1" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="232" topLine="0" />
+ <Cursor1 position="307" topLine="0" />
</File>
<File name="combat_all.h" open="0" top="0" tabpos="0" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="199" topLine="0" />
@@ -37,17 +37,17 @@
<File name="covering_conversions.h" open="0" top="0" tabpos="0" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="325" topLine="0" />
</File>
- <File name="creature.cpp" open="0" top="0" tabpos="2" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="781" topLine="19" />
+ <File name="creature.cpp" open="1" top="0" tabpos="2" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="999" topLine="24" />
</File>
<File name="creature.h" open="0" top="0" tabpos="4" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="2118" topLine="54" />
+ <Cursor1 position="8832" topLine="230" />
</File>
<File name="creature_alchemy.cpp" open="0" top="0" tabpos="0" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="3400" topLine="48" />
</File>
- <File name="creature_attributes.cpp" open="0" top="0" tabpos="0"
split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="924" topLine="6" />
+ <File name="creature_attributes.cpp" open="1" top="1" tabpos="0"
split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="581" topLine="6" />
</File>
<File name="creature_combat.cpp" open="0" top="0" tabpos="6" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="17556" topLine="389" />
@@ -59,22 +59,22 @@
<Cursor1 position="1187" topLine="18" />
</File>
<File name="creature_experience.cpp" open="0" top="0" tabpos="2"
split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="4625" topLine="126" />
+ <Cursor1 position="2545" topLine="71" />
</File>
- <File name="creature_other_stats.cpp" open="0" top="0" tabpos="1"
split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <File name="creature_other_stats.cpp" open="1" top="0" tabpos="1"
split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="4610" topLine="154" />
</File>
<File name="creature_save_load.cpp" open="0" top="0" tabpos="0" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="3482" topLine="150" />
</File>
<File name="creature_skills.cpp" open="0" top="0" tabpos="0" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="553" topLine="0" />
+ <Cursor1 position="4380" topLine="126" />
</File>
<File name="dungeon.h" open="0" top="0" tabpos="0" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="140" topLine="0" />
</File>
<File name="dungeon_generation.cpp" open="0" top="0" tabpos="6" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="3397" topLine="96" />
+ <Cursor1 position="31279" topLine="798" />
</File>
<File name="dungeon_location.cpp" open="0" top="0" tabpos="0" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="235" topLine="0" />
@@ -88,8 +88,8 @@
<File name="effect.h" open="0" top="0" tabpos="0" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="132" topLine="0" />
</File>
- <File name="enumerations.h" open="0" top="0" tabpos="1" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="9011" topLine="18" />
+ <File name="enumerations.h" open="1" top="0" tabpos="1" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="2533" topLine="132" />
</File>
<File name="font.cpp" open="0" top="0" tabpos="5" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="1745" topLine="48" />
@@ -104,10 +104,10 @@
<Cursor1 position="818" topLine="29" />
</File>
<File name="game.cpp" open="0" top="0" tabpos="3" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="3521" topLine="112" />
+ <Cursor1 position="2207" topLine="80" />
</File>
<File name="game.h" open="0" top="0" tabpos="4" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="1195" topLine="36" />
+ <Cursor1 position="1777" topLine="60" />
</File>
<File name="game_window.cpp" open="0" top="0" tabpos="2" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="464" topLine="182" />
@@ -128,10 +128,10 @@
<Cursor1 position="170" topLine="0" />
</File>
<File name="item.cpp" open="0" top="0" tabpos="15" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="602" topLine="19" />
+ <Cursor1 position="11165" topLine="405" />
</File>
<File name="item.h" open="0" top="0" tabpos="2" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="3393" topLine="96" />
+ <Cursor1 position="2385" topLine="78" />
</File>
<File name="item_combat.cpp" open="0" top="0" tabpos="1" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="336" topLine="42" />
@@ -139,6 +139,12 @@
<File name="item_save_load.cpp" open="0" top="0" tabpos="14" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="3653" topLine="162" />
</File>
+ <File name="item_template.cpp" open="0" top="0" tabpos="0" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="232" topLine="0" />
+ </File>
+ <File name="item_template.h" open="0" top="0" tabpos="0" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="296" topLine="0" />
+ </File>
<File name="level.cpp" open="0" top="0" tabpos="6" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="2385" topLine="185" />
</File>
@@ -152,16 +158,16 @@
<Cursor1 position="132" topLine="0" />
</File>
<File name="main.cpp" open="0" top="0" tabpos="1" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="7396" topLine="4" />
+ <Cursor1 position="402" topLine="167" />
</File>
<File name="main.h" open="0" top="0" tabpos="0" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="198" topLine="0" />
</File>
<File name="material_properties.cpp" open="0" top="0" tabpos="1"
split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="2311" topLine="51" />
+ <Cursor1 position="390" topLine="12" />
</File>
<File name="material_properties.h" open="0" top="0" tabpos="0" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="421" topLine="0" />
+ <Cursor1 position="476" topLine="3" />
</File>
<File name="max_objects.h" open="0" top="0" tabpos="5" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="211" topLine="0" />
@@ -173,7 +179,7 @@
<Cursor1 position="255" topLine="0" />
</File>
<File name="monster.cpp" open="0" top="0" tabpos="3" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="4308" topLine="96" />
+ <Cursor1 position="2427" topLine="60" />
</File>
<File name="monster.h" open="0" top="0" tabpos="3" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="313" topLine="31" />
@@ -197,7 +203,7 @@
<Cursor1 position="132" topLine="0" />
</File>
<File name="player.cpp" open="0" top="0" tabpos="6" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="2907" topLine="72" />
+ <Cursor1 position="5081" topLine="179" />
</File>
<File name="player.h" open="0" top="0" tabpos="7" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="3010" topLine="97" />
@@ -205,11 +211,11 @@
<File name="player_scores.cpp" open="0" top="0" tabpos="5" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="3462" topLine="112" />
</File>
- <File name="player_starting_gold.h" open="0" top="0" tabpos="0" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="230" topLine="0" />
+ <File name="player_starting_gold.h" open="0" top="0" tabpos="1" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="180" topLine="0" />
</File>
- <File name="player_windows.cpp" open="1" top="1" tabpos="1" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="2473" topLine="70" />
+ <File name="player_windows.cpp" open="0" top="0" tabpos="1" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="39449" topLine="1090" />
</File>
<File name="quit.cpp" open="0" top="0" tabpos="0" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="963" topLine="21" />
@@ -218,10 +224,10 @@
<Cursor1 position="132" topLine="0" />
</File>
<File name="race.cpp" open="0" top="0" tabpos="0" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="288" topLine="0" />
+ <Cursor1 position="190" topLine="0" />
</File>
<File name="race.h" open="0" top="0" tabpos="0" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="462" topLine="0" />
+ <Cursor1 position="273" topLine="0" />
</File>
<File name="random_chance.cpp" open="0" top="0" tabpos="2" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="4101" topLine="164" />
@@ -253,14 +259,14 @@
<File name="string_input.h" open="0" top="0" tabpos="0" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="242" topLine="0" />
</File>
- <File name="templates.cpp" open="0" top="0" tabpos="2" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="15099" topLine="102" />
+ <File name="templates.cpp" open="1" top="0" tabpos="2" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="17004" topLine="48" />
</File>
- <File name="templates.h" open="0" top="0" tabpos="7" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="259" topLine="40" />
+ <File name="templates.h" open="0" top="0" tabpos="1" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="207" topLine="0" />
</File>
<File name="templates_strings.cpp" open="0" top="0" tabpos="6" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="477" topLine="0" />
+ <Cursor1 position="7031" topLine="288" />
</File>
<File name="tile.cpp" open="0" top="0" tabpos="5" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="3899" topLine="96" />
@@ -284,7 +290,7 @@
<Cursor1 position="132" topLine="0" />
</File>
<File name="update.cpp" open="0" top="0" tabpos="1" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="8883" topLine="512" />
+ <Cursor1 position="20220" topLine="441" />
</File>
<File name="update.h" open="0" top="0" tabpos="11" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="249" topLine="0" />
=======================================
--- /creature.cpp Sat Apr 16 07:21:30 2011
+++ /creature.cpp Sat Apr 16 16:41:43 2011
@@ -47,7 +47,7 @@
experience_level=1;

experience=0;
- experience_max=300;
+ experience_max=10;

thirst=THIRST_THIRSTY-500;

@@ -692,7 +692,7 @@
//Exercise the armor skill.

if(rc_exercise_skill_armor()){
- points_gained=1;
+ points_gained=0;
inventory_weight=return_inventory_weight(ITEM_ARMOR);
//Apply the encumbrance bonus to the armor skill increase.
points_gained+=inventory_weight/75.0;
=======================================
--- /creature_experience.cpp Fri Apr 15 23:09:58 2011
+++ /creature_experience.cpp Sat Apr 16 16:41:43 2011
@@ -42,16 +42,54 @@
experience_level++;

//Increase max health.
+
+ int health_gain=0;
+
//Apply the base increase.
-
health_max+=random_range(templates.base_stats.levelup_hp_min,templates.base_stats.levelup_hp_max);
+
health_gain+=random_range(templates.base_stats.levelup_hp_min,templates.base_stats.levelup_hp_max);
+
//Apply the racial modifier.
-
health_max+=random_range(templates.template_races[race].levelup_hp_min,templates.template_races[race].levelup_hp_max);
+ //If the race has a levelup health bonus.
+ if(templates.template_races[race].levelup_hp_bonus){
+
health_gain+=random_range(templates.template_races[race].levelup_hp_min,templates.template_races[race].levelup_hp_max);
+ }
+ //If the race has a levelup health penalty.
+ else{
+
health_gain-=random_range(templates.template_races[race].levelup_hp_min,templates.template_races[race].levelup_hp_max);
+ }
+
+ if(health_gain<0){
+ health_gain=0;
+ }
+
+ health_max+=health_gain;

//Increase max mana.
+
+ int mana_gain=0;
+
//Apply the base increase.
-
mana_max+=random_range(templates.base_stats.levelup_mana_min,templates.base_stats.levelup_mana_max);
+
mana_gain+=random_range(templates.base_stats.levelup_mana_min,templates.base_stats.levelup_mana_max);
+
//Apply the racial modifier.
-
mana_max+=random_range(templates.template_races[race].levelup_mana_min,templates.template_races[race].levelup_mana_max);
+ //If the race has a levelup mana bonus.
+ if(templates.template_races[race].levelup_mana_bonus){
+
mana_gain+=random_range(templates.template_races[race].levelup_mana_min,templates.template_races[race].levelup_mana_max);
+ }
+ //If the race has a levelup mana penalty.
+ else{
+
mana_gain-=random_range(templates.template_races[race].levelup_mana_min,templates.template_races[race].levelup_mana_max);
+ }
+
+ if(mana_gain<0){
+ mana_gain=0;
+ }
+
+ mana_max+=mana_gain;
+
+
ss.clear();ss.str("");ss<<health_gain;ss<<",";ss<<mana_gain;msg=ss.str();
+
+ update_text_log(msg.c_str(),true);

//Determine whether 1, 2, or 3 attributes are to be improved this
level.
int attributes_to_improve=(experience_level%3)+1;
@@ -179,21 +217,24 @@
}

void Creature::gain_skill_experience(short skill,int points_gained,int
experience_gained,bool allow_focused_bonus){
- //If this skill is a focused skill.
- if(allow_focused_bonus && is_focused_skill(skill)){
- //Apply the focused skill bonus to this skill's experience gain.
- points_gained*=2.0;
- }
-
- //The creature gains experience for gaining skill experience.
- gain_experience(experience_gained);
-
- //Add points_gained to the skill's experience.
- skills[skill][SKILL_EXPERIENCE]+=points_gained;
-
- //If the skill's experience reaches its current maximum experience.
-
if(skills[skill][SKILL_EXPERIENCE]>=skills[skill][SKILL_EXPERIENCE_MAX]){
- //The skill levels up.
- level_up_skill(skill,experience_gained*5.0);
+ //As long as at least one point is being gained.
+ if(points_gained>0){
+ //If this skill is a focused skill.
+ if(allow_focused_bonus && is_focused_skill(skill)){
+ //Apply the focused skill bonus to this skill's experience
gain.
+ points_gained*=2.0;
+ }
+
+ //The creature gains experience for gaining skill experience.
+ gain_experience(experience_gained);
+
+ //Add points_gained to the skill's experience.
+ skills[skill][SKILL_EXPERIENCE]+=points_gained;
+
+ //If the skill's experience reaches its current maximum experience.
+
if(skills[skill][SKILL_EXPERIENCE]>=skills[skill][SKILL_EXPERIENCE_MAX]){
+ //The skill levels up.
+ level_up_skill(skill,experience_gained*5.0);
+ }
}
}
=======================================
--- /creature_skills.cpp Fri Apr 15 23:09:58 2011
+++ /creature_skills.cpp Sat Apr 16 16:41:43 2011
@@ -18,9 +18,6 @@
int Creature::return_skill_bladed_weapons(){
double skill=skills[SKILL_BLADED_WEAPONS][SKILL_EXPERIENCE_LEVEL];

- //Apply the racial modifier.
-
skill+=templates.template_races[race].skills[SKILL_BLADED_WEAPONS][SKILL_EXPERIENCE_LEVEL];
-
if(skill<1.0){
skill=1.0;
}
@@ -31,9 +28,6 @@
int Creature::return_skill_blunt_weapons(){
double skill=skills[SKILL_BLUNT_WEAPONS][SKILL_EXPERIENCE_LEVEL];

- //Apply the racial modifier.
-
skill+=templates.template_races[race].skills[SKILL_BLUNT_WEAPONS][SKILL_EXPERIENCE_LEVEL];
-
if(skill<1.0){
skill=1.0;
}
@@ -44,9 +38,6 @@
int Creature::return_skill_stabbing_weapons(){
double skill=skills[SKILL_STABBING_WEAPONS][SKILL_EXPERIENCE_LEVEL];

- //Apply the racial modifier.
-
skill+=templates.template_races[race].skills[SKILL_STABBING_WEAPONS][SKILL_EXPERIENCE_LEVEL];
-
if(skill<1.0){
skill=1.0;
}
@@ -57,9 +48,6 @@
int Creature::return_skill_unarmed(){
double skill=skills[SKILL_UNARMED][SKILL_EXPERIENCE_LEVEL];

- //Apply the racial modifier.
-
skill+=templates.template_races[race].skills[SKILL_UNARMED][SKILL_EXPERIENCE_LEVEL];
-
if(skill<1.0){
skill=1.0;
}
@@ -70,9 +58,6 @@
/**int Creature::return_skill_security(){
double skill=skills[SKILL_SECURITY][SKILL_EXPERIENCE_LEVEL];

- //Apply the racial modifier.
-
skill+=templates.template_races[race].skills[SKILL_SECURITY][SKILL_EXPERIENCE_LEVEL];
-
if(skill<1.0){
skill=1.0;
}
@@ -83,9 +68,6 @@
/**int Creature::return_skill_stealth(){
double skill=skills[SKILL_STEALTH][SKILL_EXPERIENCE_LEVEL];

- //Apply the racial modifier.
-
skill+=templates.template_races[race].skills[SKILL_STEALTH][SKILL_EXPERIENCE_LEVEL];
-
if(skill<1.0){
skill=1.0;
}
@@ -96,9 +78,6 @@
int Creature::return_skill_launcher_weapons(){
double skill=skills[SKILL_LAUNCHER_WEAPONS][SKILL_EXPERIENCE_LEVEL];

- //Apply the racial modifier.
-
skill+=templates.template_races[race].skills[SKILL_LAUNCHER_WEAPONS][SKILL_EXPERIENCE_LEVEL];
-
if(skill<1.0){
skill=1.0;
}
@@ -109,9 +88,6 @@
int Creature::return_skill_thrown_weapons(){
double skill=skills[SKILL_THROWN_WEAPONS][SKILL_EXPERIENCE_LEVEL];

- //Apply the racial modifier.
-
skill+=templates.template_races[race].skills[SKILL_THROWN_WEAPONS][SKILL_EXPERIENCE_LEVEL];
-
if(skill<1.0){
skill=1.0;
}
@@ -122,9 +98,6 @@
int Creature::return_skill_dual_wielding(){
double skill=skills[SKILL_DUAL_WIELDING][SKILL_EXPERIENCE_LEVEL];

- //Apply the racial modifier.
-
skill+=templates.template_races[race].skills[SKILL_DUAL_WIELDING][SKILL_EXPERIENCE_LEVEL];
-
if(skill<1.0){
skill=1.0;
}
@@ -140,9 +113,6 @@
//Apply the encumbrance penalty.
skill-=(return_inventory_weight()-return_carry_capacity())*0.1;
}
-
- //Apply the racial modifier.
-
skill+=templates.template_races[race].skills[SKILL_SPEED][SKILL_EXPERIENCE_LEVEL];

if(skill<1.0){
skill=1.0;
@@ -154,9 +124,6 @@
/**int Creature::return_skill_fighting(){
double skill=skills[SKILL_FIGHTING][SKILL_EXPERIENCE_LEVEL];

- //Apply the racial modifier.
-
skill+=templates.template_races[race].skills[SKILL_FIGHTING][SKILL_EXPERIENCE_LEVEL];
-
if(skill<1.0){
skill=1.0;
}
@@ -167,9 +134,6 @@
int Creature::return_skill_dodging(){
double skill=skills[SKILL_DODGING][SKILL_EXPERIENCE_LEVEL];

- //Apply the racial modifier.
-
skill+=templates.template_races[race].skills[SKILL_DODGING][SKILL_EXPERIENCE_LEVEL];
-
if(skill<1.0){
skill=1.0;
}
@@ -180,9 +144,6 @@
int Creature::return_skill_armor(){
double skill=skills[SKILL_ARMOR][SKILL_EXPERIENCE_LEVEL];

- //Apply the racial modifier.
-
skill+=templates.template_races[race].skills[SKILL_ARMOR][SKILL_EXPERIENCE_LEVEL];
-
if(skill<1.0){
skill=1.0;
}
@@ -193,9 +154,6 @@
/**int Creature::return_skill_magic_air(){
double skill=skills[SKILL_MAGIC_AIR][SKILL_EXPERIENCE_LEVEL];

- //Apply the racial modifier.
-
skill+=templates.template_races[race].skills[SKILL_MAGIC_AIR][SKILL_EXPERIENCE_LEVEL];
-
if(skill<1.0){
skill=1.0;
}
@@ -206,9 +164,6 @@
int Creature::return_skill_magic_fire(){
double skill=skills[SKILL_MAGIC_FIRE][SKILL_EXPERIENCE_LEVEL];

- //Apply the racial modifier.
-
skill+=templates.template_races[race].skills[SKILL_MAGIC_FIRE][SKILL_EXPERIENCE_LEVEL];
-
if(skill<1.0){
skill=1.0;
}
@@ -219,9 +174,6 @@
int Creature::return_skill_magic_water(){
double skill=skills[SKILL_MAGIC_WATER][SKILL_EXPERIENCE_LEVEL];

- //Apply the racial modifier.
-
skill+=templates.template_races[race].skills[SKILL_MAGIC_WATER][SKILL_EXPERIENCE_LEVEL];
-
if(skill<1.0){
skill=1.0;
}
@@ -232,9 +184,6 @@
int Creature::return_skill_magic_cold(){
double skill=skills[SKILL_MAGIC_COLD][SKILL_EXPERIENCE_LEVEL];

- //Apply the racial modifier.
-
skill+=templates.template_races[race].skills[SKILL_MAGIC_COLD][SKILL_EXPERIENCE_LEVEL];
-
if(skill<1.0){
skill=1.0;
}
@@ -245,9 +194,6 @@
int Creature::return_skill_magic_earth(){
double skill=skills[SKILL_MAGIC_EARTH][SKILL_EXPERIENCE_LEVEL];

- //Apply the racial modifier.
-
skill+=templates.template_races[race].skills[SKILL_MAGIC_EARTH][SKILL_EXPERIENCE_LEVEL];
-
if(skill<1.0){
skill=1.0;
}
@@ -258,9 +204,6 @@
int Creature::return_skill_magic_conjuration(){
double skill=skills[SKILL_MAGIC_CONJURATION][SKILL_EXPERIENCE_LEVEL];

- //Apply the racial modifier.
-
skill+=templates.template_races[race].skills[SKILL_MAGIC_CONJURATION][SKILL_EXPERIENCE_LEVEL];
-
if(skill<1.0){
skill=1.0;
}
@@ -271,9 +214,6 @@
int Creature::return_skill_magic_enchantment(){
double skill=skills[SKILL_MAGIC_ENCHANTMENT][SKILL_EXPERIENCE_LEVEL];

- //Apply the racial modifier.
-
skill+=templates.template_races[race].skills[SKILL_MAGIC_ENCHANTMENT][SKILL_EXPERIENCE_LEVEL];
-
if(skill<1.0){
skill=1.0;
}
@@ -284,9 +224,6 @@
int Creature::return_skill_magic_summoning(){
double skill=skills[SKILL_MAGIC_SUMMONING][SKILL_EXPERIENCE_LEVEL];

- //Apply the racial modifier.
-
skill+=templates.template_races[race].skills[SKILL_MAGIC_SUMMONING][SKILL_EXPERIENCE_LEVEL];
-
if(skill<1.0){
skill=1.0;
}
=======================================
--- /data/templates/races Sat Apr 16 07:21:30 2011
+++ /data/templates/races Sat Apr 16 16:41:43 2011
@@ -5,13 +5,14 @@
//************//
// B - bears: //
//************//
+//Slight health bonus

<race>
name:polar bear
appearance:B
color:white
weight:350
- health:50
+ health:5
</race>

<race>
@@ -19,7 +20,7 @@
appearance:B
color:dark blue
weight:125
- health:50
+ health:5
</race>

<race>
@@ -27,7 +28,7 @@
appearance:B
color:brown
weight:300
- health:50
+ health:5
</race>

<race>
@@ -35,42 +36,221 @@
appearance:B
color:blue
weight:125
- health:50
+ health:5
</race>

//**************//
// r - rodents: //
//**************//
+//Slow
+//HP on levelup bonus

<race>
- name:rat
+ name:sewer rat
+ appearance:r
+ color:dark brown
+ weight:0.5
+ levelup hp range:1,2
+ movement speed:2
+</race>
+
+<race>
+ name:giant rat
appearance:r
color:dark gray
weight:0.5
- damage melee:2-4
- movement speed:5
+ levelup hp range:1,2
+ movement speed:2
</race>

+<race>
+ name:groundhog
+ appearance:r
+ color:brown
+ weight:0.5
+ levelup hp range:1,2
+ movement speed:2
+</race>
+
<race>
name:mouse
appearance:r
color:light gray
weight:0.02
- damage melee:2-4
- movement speed:5
+ levelup hp range:1,2
+ movement speed:2
</race>

+//**************//
+// d - canines: //
+//**************//
+//Unarmed bonus
+
+<race>
+ name:puppy
+ appearance:d
+ color:white
+ weight:300
+ unarmed:-50
+</race>
+
+<race>
+ name:dog
+ appearance:d
+ color:white
+ weight:300
+ unarmed:-50
+</race>
+
+<race>
+ name:large dog
+ appearance:d
+ color:white
+ weight:300
+ unarmed:-50
+</race>
+
+<race>
+ name:hell hound pup
+ appearance:d
+ color:red
+ weight:300
+ unarmed:-50
+</race>
+
+<race>
+ name:hell hound
+ appearance:d
+ color:red
+ weight:300
+ unarmed:-50
+</race>
+
+<race>
+ name:wolf cub
+ appearance:d
+ color:gray
+ weight:300
+ unarmed:-50
+</race>
+
+<race>
+ name:wolf
+ appearance:d
+ color:gray
+ weight:300
+ unarmed:-50
+</race>
+
+<race>
+ name:coyote
+ appearance:d
+ color:paynes gray
+ weight:300
+ unarmed:-50
+</race>
+
+<race>
+ name:jackal
+ appearance:d
+ color:brown
+ weight:300
+ unarmed:-50
+</race>
+
+<race>
+ name:fox
+ appearance:d
+ color:sepia
+ weight:300
+ unarmed:-50
+</race>
+
//**************//
// f - felines: //
//**************//
+//Fast
+//Melee damage bonus
+//Health penalty
+
+<race>
+ name:kitten
+ appearance:f
+ color:blue
+ weight:300
+ damage melee:2,4
+ movement speed:-2
+ health:-15
+</race>
+
+<race>
+ name:housecat
+ appearance:f
+ color:blue
+ weight:300
+ damage melee:2,4
+ movement speed:-2
+ health:-15
+</race>
+
+<race>
+ name:jaguar
+ appearance:f
+ color:carrot orange
+ weight:300
+ damage melee:2,4
+ movement speed:-2
+ health:-15
+</race>
+
+<race>
+ name:lynx
+ appearance:f
+ color:burnt sienna
+ weight:300
+ damage melee:2,4
+ movement speed:-2
+ health:-15
+</race>
+
+<race>
+ name:leopard
+ appearance:f
+ color:pumpkin
+ weight:300
+ damage melee:2,4
+ movement speed:-2
+ health:-15
+</race>
+
+<race>
+ name:cougar
+ appearance:f
+ color:sandy brown
+ weight:300
+ damage melee:2,4
+ movement speed:-2
+ health:-15
+</race>
+
+<race>
+ name:pink panther
+ appearance:f
+ color:pink
+ weight:300
+ damage melee:2,4
+ movement speed:-2
+ health:-15
+</race>

<race>
name:tiger
appearance:f
color:orange
weight:300
- damage melee:2-4
- movement speed:-5
+ damage melee:2,4
+ movement speed:-2
+ health:-15
</race>

<race>
@@ -78,21 +258,24 @@
appearance:f
color:burnt orange
weight:250
- damage melee:2-4
- movement speed:-5
+ damage melee:2,4
+ movement speed:-2
+ health:-15
</race>

//*****************//
// q - quadrupeds: //
//*****************//
+//Slow
+//Health bonus

<race>
name:wild boar
appearance:q
color:pale brown
weight:90
- health:50
- damage melee:2-4
+ health:15
+ movement speed:2
</race>

<race>
@@ -101,17 +284,53 @@
appearance:q
color:light gray
weight:4175
- health:50
- damage melee:2-4
+ health:15
+ movement speed:2
</race>

+<race>
+ name:woolly mammoth
+ appearance:q
+ color:gray
+ weight:4175
+ health:15
+ movement speed:2
+</race>
+
+<race>
+ name:mastodon
+ appearance:q
+ color:dark gray
+ weight:4175
+ health:15
+ movement speed:2
+</race>
+
+<race>
+ name:yak
+ appearance:q
+ color:brown
+ weight:4175
+ health:15
+ movement speed:2
+</race>
+
+<race>
+ name:wumpus
+ appearance:q
+ color:blue
+ weight:4175
+ health:15
+ movement speed:2
+</race>
+
<race>
name:buffalo
appearance:q
color:dark brown
weight:1760
- health:50
- damage melee:2-4
+ health:15
+ movement speed:2
</race>

<race>
@@ -119,8 +338,8 @@
appearance:q
color:burnt sienna
weight:450
- health:50
- damage melee:2-4
+ health:15
+ movement speed:2
</race>

<race>
@@ -128,23 +347,96 @@
appearance:q
color:payne's gray
weight:850
- health:50
- damage melee:2-4
+ health:15
+ movement speed:2
</race>

+//***********//
+// o - orcs: //
+//***********//
+//Bladed weapons skill bonus
+//Slight melee damage bonus
+//Slight health penalty
+
<race>
- name:grid bug
- appearance:x
- color:purple
- weight:0.07
- movement speed:1
+ name:orc
+ prefix article:an
+ appearance:o
+ color:green
+ weight:55
+ bladed weapons:-50
+ damage melee:1,2
+ health:-5
</race>

+<race>
+ name:hill orc
+ appearance:o
+ color:yellow
+ weight:55
+ bladed weapons:-50
+ damage melee:1,2
+ health:-5
+</race>
+
+<race>
+ name:cave orc
+ appearance:o
+ color:gray
+ weight:55
+ bladed weapons:-50
+ damage melee:1,2
+ health:-5
+</race>
+
+<race>
+ name:Beoghan orc
+ appearance:o
+ color:blue
+ weight:55
+ bladed weapons:-50
+ damage melee:1,2
+ health:-5
+</race>
+
+//****************//
+// @ - humanoids: //
+//****************//
+//Bladed weapons skill bonus
+//Slight melee damage bonus
+//Armor penalty
+
<race>
name:human
appearance:@
color:white
weight:55
- item:dagger
- item:simple leather helm
+ bladed weapons:-50
+ damage melee:1,2
+ armor:50
+</race>
+
+//************//
+// e - elves: //
+//************//
+//Launcher weapons skill bonus
+//Slight ranged damage bonus
+//Slight levelup hp gain penalty.
+
+<race>
+ name:elf
+ prefix article:an
+ appearance:@
+ color:sandy brown
+ weight:55
+ launcher weapons:-50
+ damage ranged:1,2
+ levelup hp range:-1,-2
+</race>
+
+<race>
+ name:grid bug
+ appearance:x
+ color:purple
+ weight:0.07
</race>
=======================================
--- /monster.cpp Fri Apr 15 23:09:58 2011
+++ /monster.cpp Sat Apr 16 16:41:43 2011
@@ -86,6 +86,10 @@

carry_capacity=templates.base_stats.carry_capacity;

+ for(int i=SKILL_BLADED_WEAPONS;i<SKILL_MAGIC_SUMMONING+1;i++){
+
skills[i][SKILL_EXPERIENCE_MAX]+=templates.template_races[race].skills[i][SKILL_EXPERIENCE_MAX];
+ }
+
//Set the monster's focused skills.
for(int i=0;i<3;){
//Choose a random skill.
=======================================
--- /player.cpp Sat Apr 16 07:21:30 2011
+++ /player.cpp Sat Apr 16 16:41:43 2011
@@ -204,6 +204,10 @@
next_move=movement_speed;

carry_capacity=templates.base_stats.carry_capacity;
+
+ for(int i=SKILL_BLADED_WEAPONS;i<SKILL_MAGIC_SUMMONING+1;i++){
+
skills[i][SKILL_EXPERIENCE_MAX]+=templates.template_races[race].skills[i][SKILL_EXPERIENCE_MAX];
+ }
}

void Player::handle_input(){
=======================================
--- /race.cpp Tue Mar 22 03:17:06 2011
+++ /race.cpp Sat Apr 16 16:41:43 2011
@@ -8,7 +8,9 @@
Race::Race(){
levelup_hp_min=0;
levelup_hp_max=0;
+ levelup_hp_bonus=true;

levelup_mana_min=0;
levelup_mana_max=0;
-}
+ levelup_mana_bonus=true;
+}
=======================================
--- /race.h Wed Mar 30 22:41:07 2011
+++ /race.h Sat Apr 16 16:41:43 2011
@@ -12,9 +12,11 @@

int levelup_hp_min;
int levelup_hp_max;
+ bool levelup_hp_bonus;

int levelup_mana_min;
int levelup_mana_max;
+ bool levelup_mana_bonus;

//A list of inventory item names.
//These are the items that a member of this race starts with.
=======================================
--- /templates.cpp Sat Apr 16 07:21:30 2011
+++ /templates.cpp Sat Apr 16 16:41:43 2011
@@ -480,7 +480,7 @@
}

for(int i=0;i<SKILL_MAGIC_SUMMONING+1;i++){
- temp_race.skills[i][SKILL_EXPERIENCE_LEVEL]=0;
+ temp_race.skills[i][SKILL_EXPERIENCE_MAX]=0;
}

//As long as we haven't reached the end of the file.
@@ -595,9 +595,9 @@

//Look through the characters remaining in line.
for(int i=0;i<line.length();i++){
- //If the dash is encountered.
- if(line[i]=='-'){
- //Erase the dash.
+ //If the comma is encountered.
+ if(line[i]==','){
+ //Erase the comma.
line.erase(i,1);

for(int n=i;n<line.length();n++){
@@ -613,6 +613,13 @@

temp_race.levelup_hp_min=atoi(min_number.c_str());
temp_race.levelup_hp_max=atoi(max_number.c_str());
+
+ //If the hp modifier is a penalty.
+ if(temp_race.levelup_hp_max<0){
+ temp_race.levelup_hp_bonus=false;
+ temp_race.levelup_hp_min=abs(temp_race.levelup_hp_min);
+ temp_race.levelup_hp_max=abs(temp_race.levelup_hp_max);
+ }
}
//Level up mana Range.
else if(icontains(line,mana_range)){
@@ -624,9 +631,9 @@

//Look through the characters remaining in line.
for(int i=0;i<line.length();i++){
- //If the dash is encountered.
- if(line[i]=='-'){
- //Erase the dash.
+ //If the comma is encountered.
+ if(line[i]==','){
+ //Erase the comma.
line.erase(i,1);

for(int n=i;n<line.length();n++){
@@ -642,6 +649,13 @@

temp_race.levelup_mana_min=atoi(min_number.c_str());
temp_race.levelup_mana_max=atoi(max_number.c_str());
+
+ //If the mana modifier is a penalty.
+ if(temp_race.levelup_mana_max<0){
+ temp_race.levelup_mana_bonus=false;
+ temp_race.levelup_mana_min=abs(temp_race.levelup_mana_min);
+ temp_race.levelup_mana_max=abs(temp_race.levelup_mana_max);
+ }
}
//Health.
else if(icontains(line,health)){
@@ -667,9 +681,9 @@

//Look through the characters remaining in line.
for(int i=0;i<line.length();i++){
- //If the dash is encountered.
- if(line[i]=='-'){
- //Erase the dash.
+ //If the comma is encountered.
+ if(line[i]==','){
+ //Erase the comma.
line.erase(i,1);

for(int n=i;n<line.length();n++){
@@ -696,9 +710,9 @@

//Look through the characters remaining in line.
for(int i=0;i<line.length();i++){
- //If the dash is encountered.
- if(line[i]=='-'){
- //Erase the dash.
+ //If the comma is encountered.
+ if(line[i]==','){
+ //Erase the comma.
line.erase(i,1);

for(int n=i;n<line.length();n++){
@@ -725,9 +739,9 @@

//Look through the characters remaining in line.
for(int i=0;i<line.length();i++){
- //If the dash is encountered.
- if(line[i]=='-'){
- //Erase the dash.
+ //If the comma is encountered.
+ if(line[i]==','){
+ //Erase the comma.
line.erase(i,1);

for(int n=i;n<line.length();n++){
@@ -798,147 +812,147 @@
//Clear the data name.
line.erase(0,bladed_weapons.length());

-
temp_race.skills[SKILL_BLADED_WEAPONS][SKILL_EXPERIENCE_LEVEL]=atoi(line.c_str());
+
temp_race.skills[SKILL_BLADED_WEAPONS][SKILL_EXPERIENCE_MAX]=atoi(line.c_str());
}
//Blunt weapons
else if(icontains(line,blunt_weapons)){
//Clear the data name.
line.erase(0,blunt_weapons.length());

-
temp_race.skills[SKILL_BLUNT_WEAPONS][SKILL_EXPERIENCE_LEVEL]=atoi(line.c_str());
+
temp_race.skills[SKILL_BLUNT_WEAPONS][SKILL_EXPERIENCE_MAX]=atoi(line.c_str());
}
//Stabbing weapons
else if(icontains(line,stabbing_weapons)){
//Clear the data name.
line.erase(0,stabbing_weapons.length());

-
temp_race.skills[SKILL_STABBING_WEAPONS][SKILL_EXPERIENCE_LEVEL]=atoi(line.c_str());
+
temp_race.skills[SKILL_STABBING_WEAPONS][SKILL_EXPERIENCE_MAX]=atoi(line.c_str());
}
//Unarmed
else if(icontains(line,unarmed)){
//Clear the data name.
line.erase(0,unarmed.length());

-
temp_race.skills[SKILL_UNARMED][SKILL_EXPERIENCE_LEVEL]=atoi(line.c_str());
+
temp_race.skills[SKILL_UNARMED][SKILL_EXPERIENCE_MAX]=atoi(line.c_str());
}
//Security
else if(icontains(line,security)){
//Clear the data name.
line.erase(0,security.length());

-
temp_race.skills[SKILL_SECURITY][SKILL_EXPERIENCE_LEVEL]=atoi(line.c_str());
+
temp_race.skills[SKILL_SECURITY][SKILL_EXPERIENCE_MAX]=atoi(line.c_str());
}
//Stealth
else if(icontains(line,stealth)){
//Clear the data name.
line.erase(0,stealth.length());

-
temp_race.skills[SKILL_STEALTH][SKILL_EXPERIENCE_LEVEL]=atoi(line.c_str());
+
temp_race.skills[SKILL_STEALTH][SKILL_EXPERIENCE_MAX]=atoi(line.c_str());
}
//Launcher weapons
else if(icontains(line,launcher_weapons)){
//Clear the data name.
line.erase(0,launcher_weapons.length());

-
temp_race.skills[SKILL_LAUNCHER_WEAPONS][SKILL_EXPERIENCE_LEVEL]=atoi(line.c_str());
+
temp_race.skills[SKILL_LAUNCHER_WEAPONS][SKILL_EXPERIENCE_MAX]=atoi(line.c_str());
}
//Thrown weapons
else if(icontains(line,thrown_weapons)){
//Clear the data name.
line.erase(0,thrown_weapons.length());

-
temp_race.skills[SKILL_THROWN_WEAPONS][SKILL_EXPERIENCE_LEVEL]=atoi(line.c_str());
+
temp_race.skills[SKILL_THROWN_WEAPONS][SKILL_EXPERIENCE_MAX]=atoi(line.c_str());
}
//Dual wielding
else if(icontains(line,dual_wielding)){
//Clear the data name.
line.erase(0,dual_wielding.length());

-
temp_race.skills[SKILL_DUAL_WIELDING][SKILL_EXPERIENCE_LEVEL]=atoi(line.c_str());
+
temp_race.skills[SKILL_DUAL_WIELDING][SKILL_EXPERIENCE_MAX]=atoi(line.c_str());
}
//Speed
else if(icontains(line,speed)){
//Clear the data name.
line.erase(0,speed.length());

-
temp_race.skills[SKILL_SPEED][SKILL_EXPERIENCE_LEVEL]=atoi(line.c_str());
+
temp_race.skills[SKILL_SPEED][SKILL_EXPERIENCE_MAX]=atoi(line.c_str());
}
//Fighting
else if(icontains(line,fighting)){
//Clear the data name.
line.erase(0,fighting.length());

-
temp_race.skills[SKILL_FIGHTING][SKILL_EXPERIENCE_LEVEL]=atoi(line.c_str());
+
temp_race.skills[SKILL_FIGHTING][SKILL_EXPERIENCE_MAX]=atoi(line.c_str());
}
//Dodging
else if(icontains(line,dodging)){
//Clear the data name.
line.erase(0,dodging.length());

-
temp_race.skills[SKILL_DODGING][SKILL_EXPERIENCE_LEVEL]=atoi(line.c_str());
+
temp_race.skills[SKILL_DODGING][SKILL_EXPERIENCE_MAX]=atoi(line.c_str());
}
//Armor
else if(icontains(line,armor)){
//Clear the data name.
line.erase(0,armor.length());

-
temp_race.skills[SKILL_ARMOR][SKILL_EXPERIENCE_LEVEL]=atoi(line.c_str());
+
temp_race.skills[SKILL_ARMOR][SKILL_EXPERIENCE_MAX]=atoi(line.c_str());
}
//Air magic
else if(icontains(line,air_magic)){
//Clear the data name.
line.erase(0,air_magic.length());

-
temp_race.skills[SKILL_MAGIC_AIR][SKILL_EXPERIENCE_LEVEL]=atoi(line.c_str());
+
temp_race.skills[SKILL_MAGIC_AIR][SKILL_EXPERIENCE_MAX]=atoi(line.c_str());
}
//Fire magic
else if(icontains(line,fire_magic)){
//Clear the data name.
line.erase(0,fire_magic.length());

-
temp_race.skills[SKILL_MAGIC_FIRE][SKILL_EXPERIENCE_LEVEL]=atoi(line.c_str());
+
temp_race.skills[SKILL_MAGIC_FIRE][SKILL_EXPERIENCE_MAX]=atoi(line.c_str());
}
//Water magic
else if(icontains(line,water_magic)){
//Clear the data name.
line.erase(0,water_magic.length());

-
temp_race.skills[SKILL_MAGIC_WATER][SKILL_EXPERIENCE_LEVEL]=atoi(line.c_str());
+
temp_race.skills[SKILL_MAGIC_WATER][SKILL_EXPERIENCE_MAX]=atoi(line.c_str());
}
//Cold magic
else if(icontains(line,cold_magic)){
//Clear the data name.
line.erase(0,cold_magic.length());

-
temp_race.skills[SKILL_MAGIC_COLD][SKILL_EXPERIENCE_LEVEL]=atoi(line.c_str());
+
temp_race.skills[SKILL_MAGIC_COLD][SKILL_EXPERIENCE_MAX]=atoi(line.c_str());
}
//Earth magic
else if(icontains(line,earth_magic)){
//Clear the data name.
line.erase(0,earth_magic.length());

-
temp_race.skills[SKILL_MAGIC_EARTH][SKILL_EXPERIENCE_LEVEL]=atoi(line.c_str());
+
temp_race.skills[SKILL_MAGIC_EARTH][SKILL_EXPERIENCE_MAX]=atoi(line.c_str());
}
//Conjuration magic
else if(icontains(line,conjuration_magic)){
//Clear the data name.
line.erase(0,conjuration_magic.length());

-
temp_race.skills[SKILL_MAGIC_CONJURATION][SKILL_EXPERIENCE_LEVEL]=atoi(line.c_str());
+
temp_race.skills[SKILL_MAGIC_CONJURATION][SKILL_EXPERIENCE_MAX]=atoi(line.c_str());
}
//Enchantment magic
else if(icontains(line,enchantment_magic)){
//Clear the data name.
line.erase(0,enchantment_magic.length());

-
temp_race.skills[SKILL_MAGIC_ENCHANTMENT][SKILL_EXPERIENCE_LEVEL]=atoi(line.c_str());
+
temp_race.skills[SKILL_MAGIC_ENCHANTMENT][SKILL_EXPERIENCE_MAX]=atoi(line.c_str());
}
//Summoning magic
else if(icontains(line,summoning_magic)){
//Clear the data name.
line.erase(0,summoning_magic.length());

-
temp_race.skills[SKILL_MAGIC_SUMMONING][SKILL_EXPERIENCE_LEVEL]=atoi(line.c_str());
+
temp_race.skills[SKILL_MAGIC_SUMMONING][SKILL_EXPERIENCE_MAX]=atoi(line.c_str());
}
//Item
else if(icontains(line,item)){
=======================================
--- /version.h Sat Apr 16 07:21:30 2011
+++ /version.h Sat Apr 16 16:41:43 2011
@@ -16,17 +16,17 @@
//Standard Version Type
static const long MAJOR = 0;
static const long MINOR = 1;
- static const long BUILD = 2822;
- static const long REVISION = 15689;
+ static const long BUILD = 2831;
+ static const long REVISION = 15747;

//Miscellaneous Version Types
- static const long BUILDS_COUNT = 6503;
- #define RC_FILEVERSION 0,1,2822,15689
- #define RC_FILEVERSION_STRING "0, 1, 2822, 15689\0"
- static const char FULLVERSION_STRING[] = "0.1.2822.15689";
+ static const long BUILDS_COUNT = 6545;
+ #define RC_FILEVERSION 0,1,2831,15747
+ #define RC_FILEVERSION_STRING "0, 1, 2831, 15747\0"
+ static const char FULLVERSION_STRING[] = "0.1.2831.15747";

//These values are to keep track of your versioning state, don't modify
them.
- static const long BUILD_HISTORY = 622;
+ static const long BUILD_HISTORY = 631;


}

==============================================================================
Revision: 40c81c89b456
Author: Kevin Wells <DarkOp...@gmail.com>
Date: Sat Apr 16 21:36:42 2011
Log: Added more races. Balanced. Fixed a couple bugs. Tweaked. Added
more features to the race template system.
http://code.google.com/p/escape-from-the-masters-lair/source/detail?r=40c81c89b456

Modified:
/Development/Races.rtf
/Development/To Do.rtf
/Escape from the Master's Lair.layout
/Escape from the Master's Lair.layout.save
/creature.cpp
/creature_combat.cpp
/creature_experience.cpp
/creature_other_stats.cpp
/data/templates/races
/item_combat.cpp
/monster_ai.cpp
/race.cpp
/race.h
/templates.cpp
/version.h

=======================================
--- /Development/Races.rtf Sat Apr 16 16:41:43 2011
+++ /Development/Races.rtf Sat Apr 16 21:36:42 2011
@@ -18,9 +18,9 @@
For movement speed, try to shoot for even numbers, at least. Most or all
races within a category should have the same movement speed. Make
exceptions when necessary, though.\par
\par
Categories of racial bonus types:\par
-Fast, slight melee attack, health penalty\par
+\strike Fast, slight melee attack, health penalty\strike0\par
slightly slow, ranged attack\par
-slower, health bonus\par
+\strike slower, health bonus\strike0\par
fast, slight range bonus, health penalty\par
slightly slow, good ranged attack\par
}
=======================================
--- /Development/To Do.rtf Sat Apr 16 16:41:43 2011
+++ /Development/To Do.rtf Sat Apr 16 21:36:42 2011
@@ -10,8 +10,8 @@
-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
--Add a natural armor trait to races.\par
--The three types of damage range bonuses for races should also be able to
be penalties.\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.layout Sat Apr 16 16:41:43 2011
+++ /Escape from the Master's Lair.layout Sat Apr 16 21:36:42 2011
@@ -49,8 +49,8 @@
<File name="creature_attributes.cpp" open="0" top="0" tabpos="0"
split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="620" topLine="6" />
</File>
- <File name="creature_combat.cpp" open="1" top="1" tabpos="7" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="3018" topLine="54" />
+ <File name="creature_combat.cpp" open="0" top="0" tabpos="7" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="3034" topLine="64" />
</File>
<File name="creature_commands.cpp" open="0" top="0" tabpos="7" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="5518" topLine="144" />
@@ -59,7 +59,7 @@
<Cursor1 position="1187" topLine="18" />
</File>
<File name="creature_experience.cpp" open="0" top="0" tabpos="2"
split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="2545" topLine="71" />
+ <Cursor1 position="1694" topLine="41" />
</File>
<File name="creature_other_stats.cpp" open="1" top="0" tabpos="3"
split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="1976" topLine="56" />
@@ -131,10 +131,10 @@
<Cursor1 position="11165" topLine="405" />
</File>
<File name="item.h" open="0" top="0" tabpos="2" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="2385" topLine="78" />
+ <Cursor1 position="6386" topLine="6" />
</File>
<File name="item_combat.cpp" open="0" top="0" tabpos="1" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="336" topLine="42" />
+ <Cursor1 position="10469" topLine="79" />
</File>
<File name="item_save_load.cpp" open="0" top="0" tabpos="14" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="3653" topLine="162" />
@@ -223,11 +223,11 @@
<File name="quit.h" open="0" top="0" tabpos="0" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="132" topLine="0" />
</File>
- <File name="race.cpp" open="1" top="0" tabpos="5" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="190" topLine="0" />
+ <File name="race.cpp" open="0" top="0" tabpos="5" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="293" topLine="0" />
</File>
- <File name="race.h" open="1" top="0" tabpos="6" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="17" topLine="0" />
+ <File name="race.h" open="0" top="0" tabpos="6" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="298" topLine="0" />
</File>
<File name="random_chance.cpp" open="0" top="0" tabpos="2" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="4101" topLine="164" />
@@ -259,8 +259,8 @@
<File name="string_input.h" open="0" top="0" tabpos="0" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="242" topLine="0" />
</File>
- <File name="templates.cpp" open="1" top="0" tabpos="2" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="18183" topLine="72" />
+ <File name="templates.cpp" open="1" top="1" tabpos="2" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="21185" topLine="180" />
</File>
<File name="templates.h" open="0" top="0" tabpos="1" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="207" topLine="0" />
=======================================
--- /Escape from the Master's Lair.layout.save Sat Apr 16 16:41:43 2011
+++ /Escape from the Master's Lair.layout.save Sat Apr 16 21:36:42 2011
@@ -37,20 +37,20 @@
<File name="covering_conversions.h" open="0" top="0" tabpos="0" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="325" topLine="0" />
</File>
- <File name="creature.cpp" open="1" top="0" tabpos="2" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <File name="creature.cpp" open="0" top="0" tabpos="4" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="999" topLine="24" />
</File>
<File name="creature.h" open="0" top="0" tabpos="4" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="8832" topLine="230" />
+ <Cursor1 position="3704" topLine="109" />
</File>
<File name="creature_alchemy.cpp" open="0" top="0" tabpos="0" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="3400" topLine="48" />
</File>
- <File name="creature_attributes.cpp" open="1" top="1" tabpos="0"
split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="581" topLine="6" />
+ <File name="creature_attributes.cpp" open="0" top="0" tabpos="0"
split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="620" topLine="6" />
</File>
- <File name="creature_combat.cpp" open="0" top="0" tabpos="6" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="17556" topLine="389" />
+ <File name="creature_combat.cpp" open="0" top="0" tabpos="7" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="3034" topLine="64" />
</File>
<File name="creature_commands.cpp" open="0" top="0" tabpos="7" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="5518" topLine="144" />
@@ -59,10 +59,10 @@
<Cursor1 position="1187" topLine="18" />
</File>
<File name="creature_experience.cpp" open="0" top="0" tabpos="2"
split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="2545" topLine="71" />
+ <Cursor1 position="1694" topLine="41" />
</File>
- <File name="creature_other_stats.cpp" open="1" top="0" tabpos="1"
split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="4610" topLine="154" />
+ <File name="creature_other_stats.cpp" open="0" top="0" tabpos="3"
split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="2518" topLine="56" />
</File>
<File name="creature_save_load.cpp" open="0" top="0" tabpos="0" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="3482" topLine="150" />
@@ -88,8 +88,8 @@
<File name="effect.h" open="0" top="0" tabpos="0" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="132" topLine="0" />
</File>
- <File name="enumerations.h" open="1" top="0" tabpos="1" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="2533" topLine="132" />
+ <File name="enumerations.h" open="1" top="1" tabpos="1" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="4831" topLine="276" />
</File>
<File name="font.cpp" open="0" top="0" tabpos="5" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="1745" topLine="48" />
@@ -131,10 +131,10 @@
<Cursor1 position="11165" topLine="405" />
</File>
<File name="item.h" open="0" top="0" tabpos="2" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="2385" topLine="78" />
+ <Cursor1 position="6386" topLine="6" />
</File>
<File name="item_combat.cpp" open="0" top="0" tabpos="1" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="336" topLine="42" />
+ <Cursor1 position="10469" topLine="79" />
</File>
<File name="item_save_load.cpp" open="0" top="0" tabpos="14" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="3653" topLine="162" />
@@ -223,11 +223,11 @@
<File name="quit.h" open="0" top="0" tabpos="0" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="132" topLine="0" />
</File>
- <File name="race.cpp" open="0" top="0" tabpos="0" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="190" topLine="0" />
+ <File name="race.cpp" open="0" top="0" tabpos="5" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="312" topLine="0" />
</File>
- <File name="race.h" open="0" top="0" tabpos="0" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="273" topLine="0" />
+ <File name="race.h" open="0" top="0" tabpos="6" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="356" topLine="0" />
</File>
<File name="random_chance.cpp" open="0" top="0" tabpos="2" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="4101" topLine="164" />
@@ -259,8 +259,8 @@
<File name="string_input.h" open="0" top="0" tabpos="0" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="242" topLine="0" />
</File>
- <File name="templates.cpp" open="1" top="0" tabpos="2" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="17004" topLine="48" />
+ <File name="templates.cpp" open="0" top="0" tabpos="2" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="25599" topLine="420" />
</File>
<File name="templates.h" open="0" top="0" tabpos="1" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="207" topLine="0" />
=======================================
--- /creature.cpp Sat Apr 16 16:41:43 2011
+++ /creature.cpp Sat Apr 16 21:36:42 2011
@@ -47,7 +47,7 @@
experience_level=1;

experience=0;
- experience_max=10;
+ experience_max=300;

thirst=THIRST_THIRSTY-500;

=======================================
--- /creature_combat.cpp Fri Apr 15 23:09:58 2011
+++ /creature_combat.cpp Sat Apr 16 21:36:42 2011
@@ -69,7 +69,15 @@
damage=base_damage;

//Add the racial base melee damage modifier.
-
damage+=random_range(templates.template_races[race].base_damage_melee_min,templates.template_races[race].base_damage_melee_max);
+
+ //If the race has a melee damage bonus.
+ if(templates.template_races[race].base_damage_melee_max>=0){
+
damage+=random_range(templates.template_races[race].base_damage_melee_min,templates.template_races[race].base_damage_melee_max);
+ }
+ //If the race has a melee damage penalty.
+ else{
+
damage-=random_range(abs(templates.template_races[race].base_damage_melee_min),abs(templates.template_races[race].base_damage_melee_max));
+ }

//Add in melee weapon damage.

=======================================
--- /creature_experience.cpp Sat Apr 16 16:41:43 2011
+++ /creature_experience.cpp Sat Apr 16 21:36:42 2011
@@ -50,12 +50,12 @@

//Apply the racial modifier.
//If the race has a levelup health bonus.
- if(templates.template_races[race].levelup_hp_bonus){
+ if(templates.template_races[race].levelup_hp_max>=0){

health_gain+=random_range(templates.template_races[race].levelup_hp_min,templates.template_races[race].levelup_hp_max);
}
//If the race has a levelup health penalty.
else{
-
health_gain-=random_range(templates.template_races[race].levelup_hp_min,templates.template_races[race].levelup_hp_max);
+
health_gain-=random_range(abs(templates.template_races[race].levelup_hp_min),abs(templates.template_races[race].levelup_hp_max));
}

if(health_gain<0){
@@ -73,7 +73,7 @@

//Apply the racial modifier.
//If the race has a levelup mana bonus.
- if(templates.template_races[race].levelup_mana_bonus){
+ if(templates.template_races[race].levelup_mana_max>=0){

mana_gain+=random_range(templates.template_races[race].levelup_mana_min,templates.template_races[race].levelup_mana_max);
}
//If the race has a levelup mana penalty.
@@ -87,10 +87,6 @@

mana_max+=mana_gain;

-
ss.clear();ss.str("");ss<<health_gain;ss<<",";ss<<mana_gain;msg=ss.str();
-
- update_text_log(msg.c_str(),true);
-
//Determine whether 1, 2, or 3 attributes are to be improved this
level.
int attributes_to_improve=(experience_level%3)+1;

=======================================
--- /creature_other_stats.cpp Fri Apr 15 23:09:58 2011
+++ /creature_other_stats.cpp Sat Apr 16 21:36:42 2011
@@ -82,6 +82,13 @@
number+=armor_absorption;
}
}
+
+ //Apply the racial modifier.
+ number+=templates.template_races[race].natural_armor;
+
+ if(number<0.0){
+ number=0.0;
+ }

return (int)number;
}
=======================================
--- /data/templates/races Sat Apr 16 16:41:43 2011
+++ /data/templates/races Sat Apr 16 21:36:42 2011
@@ -82,13 +82,13 @@
</race>

//**************//
-// d - canines: //
+// c - canines: //
//**************//
//Unarmed bonus

<race>
name:puppy
- appearance:d
+ appearance:c
color:white
weight:300
unarmed:-50
@@ -96,7 +96,7 @@

<race>
name:dog
- appearance:d
+ appearance:c
color:white
weight:300
unarmed:-50
@@ -104,7 +104,7 @@

<race>
name:large dog
- appearance:d
+ appearance:c
color:white
weight:300
unarmed:-50
@@ -112,7 +112,7 @@

<race>
name:hell hound pup
- appearance:d
+ appearance:c
color:red
weight:300
unarmed:-50
@@ -120,7 +120,7 @@

<race>
name:hell hound
- appearance:d
+ appearance:c
color:red
weight:300
unarmed:-50
@@ -128,7 +128,7 @@

<race>
name:wolf cub
- appearance:d
+ appearance:c
color:gray
weight:300
unarmed:-50
@@ -136,7 +136,7 @@

<race>
name:wolf
- appearance:d
+ appearance:c
color:gray
weight:300
unarmed:-50
@@ -144,7 +144,7 @@

<race>
name:coyote
- appearance:d
+ appearance:c
color:paynes gray
weight:300
unarmed:-50
@@ -152,7 +152,7 @@

<race>
name:jackal
- appearance:d
+ appearance:c
color:brown
weight:300
unarmed:-50
@@ -160,7 +160,7 @@

<race>
name:fox
- appearance:d
+ appearance:c
color:sepia
weight:300
unarmed:-50
@@ -180,7 +180,7 @@
weight:300
damage melee:2,4
movement speed:-2
- health:-15
+ health:-25
</race>

<race>
@@ -190,7 +190,7 @@
weight:300
damage melee:2,4
movement speed:-2
- health:-15
+ health:-25
</race>

<race>
@@ -200,7 +200,7 @@
weight:300
damage melee:2,4
movement speed:-2
- health:-15
+ health:-25
</race>

<race>
@@ -210,7 +210,7 @@
weight:300
damage melee:2,4
movement speed:-2
- health:-15
+ health:-25
</race>

<race>
@@ -220,7 +220,7 @@
weight:300
damage melee:2,4
movement speed:-2
- health:-15
+ health:-25
</race>

<race>
@@ -230,7 +230,7 @@
weight:300
damage melee:2,4
movement speed:-2
- health:-15
+ health:-25
</race>

<race>
@@ -240,7 +240,7 @@
weight:300
damage melee:2,4
movement speed:-2
- health:-15
+ health:-25
</race>

<race>
@@ -250,7 +250,7 @@
weight:300
damage melee:2,4
movement speed:-2
- health:-15
+ health:-25
</race>

<race>
@@ -260,7 +260,7 @@
weight:250
damage melee:2,4
movement speed:-2
- health:-15
+ health:-25
</race>

//*****************//
@@ -359,7 +359,7 @@
//Slight health penalty

<race>
- name:orc
+ name:valley orc
prefix article:an
appearance:o
color:green
@@ -399,13 +399,13 @@
health:-5
</race>

-//****************//
-// @ - humanoids: //
-//****************//
+//************//
+// humanoids: //
+//************//
+
//Bladed weapons skill bonus
//Slight melee damage bonus
-//Armor penalty
-
+//Armor skill penalty
<race>
name:human
appearance:@
@@ -416,6 +416,19 @@
armor:50
</race>

+//Blunt weapons skill bonus
+//Natural armor
+//Agility penalty
+<race>
+ name:dwarf
+ appearance:d
+ color:white
+ weight:55
+ blunt weapons:-50
+ natural armor:5
+ agility:-1
+</race>
+
//************//
// e - elves: //
//************//
@@ -424,9 +437,18 @@
//Slight levelup hp gain penalty.

<race>
- name:elf
- prefix article:an
- appearance:@
+ name:wood elf
+ appearance:e
+ color:light brown
+ weight:55
+ launcher weapons:-50
+ damage ranged:1,2
+ levelup hp range:-1,-2
+</race>
+
+<race>
+ name:high elf
+ appearance:e
color:sandy brown
weight:55
launcher weapons:-50
@@ -434,6 +456,36 @@
levelup hp range:-1,-2
</race>

+<race>
+ name:night elf
+ appearance:e
+ color:indigo
+ weight:55
+ launcher weapons:-50
+ damage ranged:1,2
+ levelup hp range:-1,-2
+</race>
+
+<race>
+ name:cave elf
+ appearance:e
+ color:light gray
+ weight:55
+ launcher weapons:-50
+ damage ranged:1,2
+ levelup hp range:-1,-2
+</race>
+
+<race>
+ name:kokiri
+ appearance:e
+ color:green
+ weight:55
+ launcher weapons:-50
+ damage ranged:1,2
+ levelup hp range:-1,-2
+</race>
+
<race>
name:grid bug
appearance:x
=======================================
--- /item_combat.cpp Fri Apr 15 23:09:58 2011
+++ /item_combat.cpp Sat Apr 16 21:36:42 2011
@@ -90,7 +90,15 @@
damage=base_damage;

//Add the racial base thrown damage modifier.
-
damage+=random_range(templates.template_races[owner_data_thrown[0].race].base_damage_thrown_min,templates.template_races[owner_data_thrown[0].race].base_damage_thrown_max);
+
+ //If the race has a thrown damage bonus.
+
if(templates.template_races[owner_data_thrown[0].race].base_damage_thrown_max>=0){
+
damage+=random_range(templates.template_races[owner_data_thrown[0].race].base_damage_thrown_min,templates.template_races[owner_data_thrown[0].race].base_damage_thrown_max);
+ }
+ //If the race has a thrown damage penalty.
+ else{
+
damage-=random_range(abs(templates.template_races[owner_data_thrown[0].race].base_damage_thrown_min),abs(templates.template_races[owner_data_thrown[0].race].base_damage_thrown_max));
+ }

//Add in thrown weapon damage.

@@ -244,7 +252,15 @@
damage=base_damage;

//Add the racial base ranged damage modifier.
-
damage+=random_range(templates.template_races[owner_data_fired[0].race].base_damage_ranged_min,templates.template_races[owner_data_fired[0].race].base_damage_ranged_max);
+
+ //If the race has a ranged damage bonus.
+
if(templates.template_races[owner_data_fired[0].race].base_damage_ranged_max>=0){
+
damage+=random_range(templates.template_races[owner_data_fired[0].race].base_damage_ranged_min,templates.template_races[owner_data_fired[0].race].base_damage_ranged_max);
+ }
+ //If the race has a ranged damage penalty.
+ else{
+
damage-=random_range(abs(templates.template_races[owner_data_fired[0].race].base_damage_ranged_min),abs(templates.template_races[owner_data_fired[0].race].base_damage_ranged_max));
+ }

//Add the actual projectile's thrown weapon damage.

=======================================
--- /monster_ai.cpp Thu Mar 31 05:05:42 2011
+++ /monster_ai.cpp Sat Apr 16 21:36:42 2011
@@ -49,6 +49,8 @@

coordinates hostile_creature=ai_nearest_hostile();

+ Race* monster_race=&templates.template_races[race];
+
//-Survival-//

if(ai_state_low_health() &&
ai_state_hostile_nearby(hostile_creature.x,hostile_creature.y)){
=======================================
--- /race.cpp Sat Apr 16 16:41:43 2011
+++ /race.cpp Sat Apr 16 21:36:42 2011
@@ -8,9 +8,12 @@
Race::Race(){
levelup_hp_min=0;
levelup_hp_max=0;
- levelup_hp_bonus=true;

levelup_mana_min=0;
levelup_mana_max=0;
- levelup_mana_bonus=true;
-}
+
+ natural_armor=0;
+
+ ai_trait_flees=false;
+ ai_trait_uses_items=false;
+}
=======================================
--- /race.h Sat Apr 16 16:41:43 2011
+++ /race.h Sat Apr 16 21:36:42 2011
@@ -12,16 +12,21 @@

int levelup_hp_min;
int levelup_hp_max;
- bool levelup_hp_bonus;

int levelup_mana_min;
int levelup_mana_max;
- bool levelup_mana_bonus;
+
+ int natural_armor;

//A list of inventory item names.
//These are the items that a member of this race starts with.
std::vector<std::string> inventory_items;

+ //AI Traits:
+
+ bool ai_trait_flees;
+ bool ai_trait_uses_items;
+
Race();
};

=======================================
--- /templates.cpp Sat Apr 16 16:41:43 2011
+++ /templates.cpp Sat Apr 16 21:36:42 2011
@@ -502,6 +502,7 @@
string base_damage_ranged="damage ranged:";
string base_damage_thrown="damage thrown:";
string movement_speed="movement speed:";
+ string natural_armor="natural armor:";
string strength="strength:";
string agility="agility:";
string hardiness="hardiness:";
@@ -613,13 +614,6 @@

temp_race.levelup_hp_min=atoi(min_number.c_str());
temp_race.levelup_hp_max=atoi(max_number.c_str());
-
- //If the hp modifier is a penalty.
- if(temp_race.levelup_hp_max<0){
- temp_race.levelup_hp_bonus=false;
- temp_race.levelup_hp_min=abs(temp_race.levelup_hp_min);
- temp_race.levelup_hp_max=abs(temp_race.levelup_hp_max);
- }
}
//Level up mana Range.
else if(icontains(line,mana_range)){
@@ -649,13 +643,6 @@

temp_race.levelup_mana_min=atoi(min_number.c_str());
temp_race.levelup_mana_max=atoi(max_number.c_str());
-
- //If the mana modifier is a penalty.
- if(temp_race.levelup_mana_max<0){
- temp_race.levelup_mana_bonus=false;
- temp_race.levelup_mana_min=abs(temp_race.levelup_mana_min);
- temp_race.levelup_mana_max=abs(temp_race.levelup_mana_max);
- }
}
//Health.
else if(icontains(line,health)){
@@ -765,6 +752,13 @@

temp_race.movement_speed=atoi(line.c_str());
}
+ //Natural armor.
+ else if(icontains(line,natural_armor)){
+ //Clear the data name.
+ line.erase(0,natural_armor.length());
+
+ temp_race.natural_armor=atoi(line.c_str());
+ }
//Strength.
else if(icontains(line,strength)){
//Clear the data name.
=======================================
--- /version.h Sat Apr 16 16:41:43 2011
+++ /version.h Sat Apr 16 21:36:42 2011
@@ -16,17 +16,17 @@
//Standard Version Type
static const long MAJOR = 0;
static const long MINOR = 1;
- static const long BUILD = 2831;
- static const long REVISION = 15747;
+ static const long BUILD = 2834;
+ static const long REVISION = 15764;

//Miscellaneous Version Types
- static const long BUILDS_COUNT = 6545;
- #define RC_FILEVERSION 0,1,2831,15747
- #define RC_FILEVERSION_STRING "0, 1, 2831, 15747\0"
- static const char FULLVERSION_STRING[] = "0.1.2831.15747";
+ 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";

//These values are to keep track of your versioning state, don't modify
them.
- static const long BUILD_HISTORY = 631;
+ static const long BUILD_HISTORY = 634;


}

==============================================================================
Revision: 4aa622bf9b0c
Author: Kevin Wells <DarkOp...@gmail.com>
Date: Sat Apr 16 21:44:48 2011
Log: Started adding some more ai stuff. Added first ai traits for
races.
http://code.google.com/p/escape-from-the-masters-lair/source/detail?r=4aa622bf9b0c

Modified:
/Escape from the Master's Lair.layout
/Escape from the Master's Lair.layout.save
/monster_ai.cpp
/race.cpp
/race.h

=======================================
--- /Escape from the Master's Lair.layout Sat Apr 16 21:36:42 2011
+++ /Escape from the Master's Lair.layout Sat Apr 16 21:44:48 2011
@@ -37,11 +37,11 @@
<File name="covering_conversions.h" open="0" top="0" tabpos="0" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="325" topLine="0" />
</File>
- <File name="creature.cpp" open="1" top="0" tabpos="4" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="758" topLine="24" />
+ <File name="creature.cpp" open="0" top="0" tabpos="4" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="999" topLine="24" />
</File>
<File name="creature.h" open="0" top="0" tabpos="4" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="8832" topLine="230" />
+ <Cursor1 position="3704" topLine="109" />
</File>
<File name="creature_alchemy.cpp" open="0" top="0" tabpos="0" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="3400" topLine="48" />
@@ -61,8 +61,8 @@
<File name="creature_experience.cpp" open="0" top="0" tabpos="2"
split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="1694" topLine="41" />
</File>
- <File name="creature_other_stats.cpp" open="1" top="0" tabpos="3"
split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="1976" topLine="56" />
+ <File name="creature_other_stats.cpp" open="0" top="0" tabpos="3"
split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="2518" topLine="56" />
</File>
<File name="creature_save_load.cpp" open="0" top="0" tabpos="0" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="3482" topLine="150" />
@@ -184,11 +184,11 @@
<File name="monster.h" open="0" top="0" tabpos="3" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="313" topLine="31" />
</File>
- <File name="monster_ai.cpp" open="0" top="0" tabpos="1" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="2389" topLine="60" />
+ <File name="monster_ai.cpp" open="1" top="1" tabpos="4" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="2051" topLine="56" />
</File>
<File name="monster_ai_states.cpp" open="0" top="0" tabpos="2" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="1586" topLine="33" />
+ <Cursor1 position="1747" topLine="33" />
</File>
<File name="object.cpp" open="0" top="0" tabpos="0" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="1144" topLine="74" />
@@ -223,11 +223,11 @@
<File name="quit.h" open="0" top="0" tabpos="0" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="132" topLine="0" />
</File>
- <File name="race.cpp" open="0" top="0" tabpos="5" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="293" topLine="0" />
+ <File name="race.cpp" open="1" top="0" tabpos="2" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="401" topLine="0" />
</File>
- <File name="race.h" open="0" top="0" tabpos="6" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="298" topLine="0" />
+ <File name="race.h" open="1" top="0" tabpos="3" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="18" topLine="0" />
</File>
<File name="random_chance.cpp" open="0" top="0" tabpos="2" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="4101" topLine="164" />
@@ -259,8 +259,8 @@
<File name="string_input.h" open="0" top="0" tabpos="0" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="242" topLine="0" />
</File>
- <File name="templates.cpp" open="1" top="1" tabpos="2" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="21185" topLine="180" />
+ <File name="templates.cpp" open="0" top="0" tabpos="2" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="25599" topLine="420" />
</File>
<File name="templates.h" open="0" top="0" tabpos="1" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="207" topLine="0" />
=======================================
--- /Escape from the Master's Lair.layout.save Sat Apr 16 21:36:42 2011
+++ /Escape from the Master's Lair.layout.save Sat Apr 16 21:44:48 2011
@@ -88,7 +88,7 @@
<File name="effect.h" open="0" top="0" tabpos="0" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="132" topLine="0" />
</File>
- <File name="enumerations.h" open="1" top="1" tabpos="1" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <File name="enumerations.h" open="1" top="0" tabpos="1" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="4831" topLine="276" />
</File>
<File name="font.cpp" open="0" top="0" tabpos="5" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
@@ -184,11 +184,11 @@
<File name="monster.h" open="0" top="0" tabpos="3" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="313" topLine="31" />
</File>
- <File name="monster_ai.cpp" open="0" top="0" tabpos="1" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <File name="monster_ai.cpp" open="1" top="1" tabpos="1" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="2389" topLine="60" />
</File>
<File name="monster_ai_states.cpp" open="0" top="0" tabpos="2" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="1586" topLine="33" />
+ <Cursor1 position="1747" topLine="33" />
</File>
<File name="object.cpp" open="0" top="0" tabpos="0" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="1144" topLine="74" />
@@ -223,10 +223,10 @@
<File name="quit.h" open="0" top="0" tabpos="0" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="132" topLine="0" />
</File>
- <File name="race.cpp" open="0" top="0" tabpos="5" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
+ <File name="race.cpp" open="1" top="0" tabpos="5" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="312" topLine="0" />
</File>
- <File name="race.h" open="0" top="0" tabpos="6" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
+ <File name="race.h" open="1" top="0" tabpos="6" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="356" topLine="0" />
</File>
<File name="random_chance.cpp" open="0" top="0" tabpos="2" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
=======================================
--- /monster_ai.cpp Sat Apr 16 21:36:42 2011
+++ /monster_ai.cpp Sat Apr 16 21:44:48 2011
@@ -49,28 +49,33 @@

coordinates hostile_creature=ai_nearest_hostile();

- Race* monster_race=&templates.template_races[race];
+ Race* mr=&templates.template_races[race];

//-Survival-//

- if(ai_state_low_health() &&
ai_state_hostile_nearby(hostile_creature.x,hostile_creature.y)){
+ if(mr->ai_trait_flees && ai_state_low_health() &&
ai_state_hostile_nearby(hostile_creature.x,hostile_creature.y)){
action.action=AI_ACTION_MOVE;
coordinates
flee_coords=ai_opposite_direction(hostile_creature.x,hostile_creature.y);
action.coords.x=flee_coords.x;
action.coords.y=flee_coords.y;
}
- else if(ai_state_low_health()
&& !ai_state_hostile_nearby(hostile_creature.x,hostile_creature.y)){
+ else if(mr->ai_trait_uses_items && ai_state_low_health()
&& !ai_state_hostile_nearby(hostile_creature.x,hostile_creature.y)){
action.action=AI_ACTION_HEAL;
}
else if(ai_state_thirsty()){
- action.action=AI_ACTION_DRINK;
+ if(mr->ai_trait_uses_items && /**Has thirst quenching item*/){
+ action.action=AI_ACTION_DRINK;
+ }
+ else{
+ action.action=AI_ACTION_SEEK_WATER;
+ }
}
else if(!ai_state_low_health() &&
ai_state_hostile_nearby(hostile_creature.x,hostile_creature.y)){
action.action=AI_ACTION_MOVE;
action.coords.x=hostile_creature.x;
action.coords.y=hostile_creature.y;
}
- else{
+ else if(mr->ai_trait_wanders){
action.action=AI_ACTION_MOVE;

action.coords.x=random_range(0,vector_levels[current_level].level_x-1);

action.coords.y=random_range(0,vector_levels[current_level].level_y-1);
=======================================
--- /race.cpp Sat Apr 16 21:36:42 2011
+++ /race.cpp Sat Apr 16 21:44:48 2011
@@ -16,4 +16,5 @@

ai_trait_flees=false;
ai_trait_uses_items=false;
-}
+ ai_trait_wanders=true;
+}
=======================================
--- /race.h Sat Apr 16 21:36:42 2011
+++ /race.h Sat Apr 16 21:44:48 2011
@@ -26,6 +26,7 @@

bool ai_trait_flees;
bool ai_trait_uses_items;
+ bool ai_trait_wanders;

Race();
};
Reply all
Reply to author
Forward
0 new messages