[escape-from-the-masters-lair] push by DarkOppr...@gmail.com - Worked on some other tasks. on 2011-04-19 01:50 GMT

1 view
Skip to first unread message

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

unread,
Apr 18, 2011, 9:51:18 PM4/18/11
to escape-from-th...@googlegroups.com
Revision: a33298b078bb
Author: Kevin Wells <DarkOp...@gmail.com>
Date: Mon Apr 18 18:50:18 2011
Log: Worked on some other tasks.
http://code.google.com/p/escape-from-the-masters-lair/source/detail?r=a33298b078bb

Modified:
/Development/Old To Do.rtf
/Development/To Do.rtf
/Escape from the Master's Lair.layout
/Escape from the Master's Lair.layout.save
/ai_keys.h
/creature.cpp
/creature.h
/creature_attributes.cpp
/creature_combat.cpp
/creature_commands.cpp
/creature_other_stats.cpp
/creature_skills.cpp
/data/templates/drinks
/enumerations.h
/main.cpp
/monster.cpp
/monster.h
/monster_ai.cpp
/monster_ai_states.cpp
/player.cpp
/player.h
/player_windows.cpp
/random_chance.cpp
/random_chance.h
/update.cpp
/version.h

=======================================
--- /Development/Old To Do.rtf Sun Apr 17 01:59:21 2011
+++ /Development/Old To Do.rtf Mon Apr 18 18:50:18 2011
@@ -133,6 +133,12 @@
\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
+\strike -Add some more (fun) races.\par
+\lang9 -Setup the class name system.\par
+-Make sure everything displays nicely with different resolutions.\par
+\lang1033 -Add the highscores list.\par
+\cf1 -Implement an action taking multiple turns. UPDATE: I may just cut
this out entirely.\cf0\strike0\par
+\strike -Allow creatures to drop equipped items with one
command.\strike0\par
+\strike -Expand the equipping/unequipping/item command related
messages.\lang9\strike0\par
}

=======================================
--- /Development/To Do.rtf Mon Apr 18 05:06:09 2011
+++ /Development/To Do.rtf Mon Apr 18 18:50:18 2011
@@ -1,14 +1,7 @@
{\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fnil\fcharset0 Calibri;}}
-{\colortbl ;\red255\green0\blue0;}
-{\*\generator Msftedit
5.41.21.2510;}\viewkind4\uc1\pard\sa200\sl240\slmult1\cf1\lang1033\strike\f0\fs22
-Implement an action taking multiple turns. UPDATE: I may just cut this out
entirely.\cf0\strike0\par
-\strike -Allow creatures to drop equipped items with one
command.\strike0\par
-\strike -Expand the equipping/unequipping/item command related
messages.\strike0\par
--Implement drinking from fountains.\par
-\strike -Add the highscores list.\strike0\par
--Handle anything left in the code in comments.\lang9\par
-\strike -Make sure everything displays nicely with different
resolutions.\strike0\par
+{\*\generator Msftedit
5.41.21.2510;}\viewkind4\uc1\pard\sa200\sl240\slmult1\lang1033\strike\f0\fs22
-Implement drinking from fountains.\strike0\par
+\strike -Handle anything left in the code in comments.\lang9\strike0\par
-Add random character selection stuff to game startup.\par
-\strike -Setup the class name system.\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 Mon Apr 18 05:06:09 2011
+++ /Escape from the Master's Lair.layout Mon Apr 18 18:50:18 2011
@@ -11,7 +11,7 @@
<Cursor1 position="347" topLine="0" />
</File>
<File name="ai_keys.h" open="0" top="0" tabpos="0" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="707" topLine="13" />
+ <Cursor1 position="679" topLine="3" />
</File>
<File name="collision.cpp" open="0" top="0" tabpos="0" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="142" topLine="0" />
@@ -38,37 +38,37 @@
<Cursor1 position="325" topLine="0" />
</File>
<File name="creature.cpp" open="0" top="0" tabpos="4" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="778" topLine="18" />
+ <Cursor1 position="15238" topLine="444" />
</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="12689" topLine="346" />
+ <Cursor1 position="10588" topLine="302" />
</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="620" topLine="6" />
+ <Cursor1 position="1460" topLine="36" />
</File>
- <File name="creature_combat.cpp" open="1" top="0" tabpos="3" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="18179" topLine="400" />
+ <File name="creature_combat.cpp" open="0" top="0" tabpos="3" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="18168" topLine="400" />
</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="249" topLine="0" />
+ <Cursor1 position="11700" topLine="336" />
</File>
<File name="creature_equipment.cpp" open="0" top="0" tabpos="5" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="1187" topLine="18" />
</File>
- <File name="creature_experience.cpp" open="1" top="0" tabpos="1"
split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <File name="creature_experience.cpp" open="0" top="0" tabpos="1"
split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="3573" topLine="79" />
</File>
- <File name="creature_other_stats.cpp" open="1" top="1" tabpos="4"
split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="294" topLine="0" />
+ <File name="creature_other_stats.cpp" open="0" top="0" tabpos="4"
split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="8620" topLine="267" />
</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="681" topLine="18" />
+ <Cursor1 position="1018" topLine="18" />
</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="2009" topLine="97" />
+ <Cursor1 position="2454" topLine="94" />
</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="198" topLine="0" />
@@ -89,7 +89,7 @@
<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="4572" topLine="252" />
+ <Cursor1 position="6951" topLine="386" />
</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" />
@@ -170,7 +170,7 @@
<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="4511" topLine="83" />
+ <Cursor1 position="4402" topLine="80" />
</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" />
@@ -191,16 +191,16 @@
<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="5634" topLine="119" />
+ <Cursor1 position="11064" topLine="303" />
</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" />
+ <Cursor1 position="1103" topLine="27" />
</File>
- <File name="monster_ai.cpp" open="1" top="0" tabpos="2" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="2141" topLine="64" />
+ <File name="monster_ai.cpp" open="0" top="0" tabpos="2" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="985" topLine="96" />
</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="1747" topLine="33" />
+ <Cursor1 position="250" topLine="0" />
</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" />
@@ -215,19 +215,19 @@
<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="40213" topLine="979" />
+ <Cursor1 position="9326" topLine="286" />
</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="1247" topLine="43" />
+ <Cursor1 position="4482" topLine="145" />
</File>
- <File name="player_scores.cpp" open="1" top="0" tabpos="5" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <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="6880" topLine="222" />
</File>
<File name="player_starting_values.h" open="0" top="0" tabpos="0"
split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="196" 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="15552" topLine="452" />
+ <Cursor1 position="57480" topLine="1408" />
</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" />
@@ -242,10 +242,10 @@
<Cursor1 position="666" topLine="9" />
</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" />
+ <Cursor1 position="2427" topLine="76" />
</File>
<File name="random_chance.h" open="0" top="0" tabpos="3" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="1008" topLine="25" />
+ <Cursor1 position="758" topLine="8" />
</File>
<File name="random_number_generator.cpp" open="0" top="0" tabpos="0"
split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="474" topLine="0" />
@@ -284,7 +284,7 @@
<Cursor1 position="3899" topLine="96" />
</File>
<File name="tile.h" open="0" top="0" tabpos="9" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="55" topLine="0" />
+ <Cursor1 position="469" topLine="0" />
</File>
<File name="tile_size.h" open="0" top="0" tabpos="6" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="231" topLine="0" />
@@ -302,7 +302,7 @@
<Cursor1 position="132" topLine="0" />
</File>
<File name="update.cpp" open="0" top="0" tabpos="2" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="2363" topLine="69" />
+ <Cursor1 position="15835" topLine="352" />
</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 Mon Apr 18 02:59:47 2011
+++ /Escape from the Master's Lair.layout.save Mon Apr 18 18:50:18 2011
@@ -11,7 +11,7 @@
<Cursor1 position="347" topLine="0" />
</File>
<File name="ai_keys.h" open="0" top="0" tabpos="0" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="707" topLine="13" />
+ <Cursor1 position="679" topLine="3" />
</File>
<File name="collision.cpp" open="0" top="0" tabpos="0" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="142" topLine="0" />
@@ -38,37 +38,37 @@
<Cursor1 position="325" topLine="0" />
</File>
<File name="creature.cpp" open="0" top="0" tabpos="4" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="756" topLine="18" />
+ <Cursor1 position="15238" topLine="444" />
</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="2035" topLine="63" />
+ <Cursor1 position="10588" topLine="302" />
</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="620" topLine="6" />
+ <Cursor1 position="1460" topLine="36" />
</File>
- <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="312" topLine="0" />
+ <File name="creature_combat.cpp" open="0" top="0" tabpos="3" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="18168" topLine="400" />
</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" />
+ <Cursor1 position="11700" topLine="336" />
</File>
<File name="creature_equipment.cpp" open="0" top="0" tabpos="5" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<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="1694" topLine="41" />
+ <File name="creature_experience.cpp" open="0" top="0" tabpos="1"
split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="3573" topLine="79" />
</File>
- <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 name="creature_other_stats.cpp" open="0" top="0" tabpos="4"
split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="8620" topLine="267" />
</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="776" topLine="18" />
+ <Cursor1 position="1018" topLine="18" />
</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="2009" topLine="97" />
+ <Cursor1 position="2454" topLine="94" />
</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="198" topLine="0" />
@@ -89,7 +89,7 @@
<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="835" topLine="36" />
+ <Cursor1 position="6951" topLine="386" />
</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" />
@@ -170,7 +170,7 @@
<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="402" topLine="167" />
+ <Cursor1 position="4402" topLine="80" />
</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" />
@@ -191,16 +191,16 @@
<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="424" topLine="30" />
+ <Cursor1 position="11064" topLine="303" />
</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" />
+ <Cursor1 position="1103" topLine="27" />
</File>
- <File name="monster_ai.cpp" open="0" top="0" tabpos="4" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="1896" topLine="52" />
+ <File name="monster_ai.cpp" open="0" top="0" tabpos="2" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="985" topLine="96" />
</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="1747" topLine="33" />
+ <Cursor1 position="250" topLine="0" />
</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" />
@@ -215,19 +215,19 @@
<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="27636" topLine="602" />
+ <Cursor1 position="9326" topLine="286" />
</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="1247" topLine="43" />
+ <Cursor1 position="4482" topLine="145" />
</File>
<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="2834" topLine="77" />
+ <Cursor1 position="6880" topLine="222" />
</File>
<File name="player_starting_values.h" open="0" top="0" tabpos="0"
split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="196" 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="43004" topLine="1157" />
+ <Cursor1 position="57480" topLine="1408" />
</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" />
@@ -242,10 +242,10 @@
<Cursor1 position="666" topLine="9" />
</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" />
+ <Cursor1 position="2427" topLine="76" />
</File>
<File name="random_chance.h" open="0" top="0" tabpos="3" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="1008" topLine="25" />
+ <Cursor1 position="758" topLine="8" />
</File>
<File name="random_number_generator.cpp" open="0" top="0" tabpos="0"
split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="474" topLine="0" />
@@ -284,7 +284,7 @@
<Cursor1 position="3899" topLine="96" />
</File>
<File name="tile.h" open="0" top="0" tabpos="9" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="55" topLine="0" />
+ <Cursor1 position="469" topLine="0" />
</File>
<File name="tile_size.h" open="0" top="0" tabpos="6" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="231" topLine="0" />
@@ -302,7 +302,7 @@
<Cursor1 position="132" topLine="0" />
</File>
<File name="update.cpp" open="0" top="0" tabpos="2" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="18564" topLine="405" />
+ <Cursor1 position="15835" topLine="352" />
</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" />
=======================================
--- /ai_keys.h Sat Mar 26 04:45:29 2011
+++ /ai_keys.h Mon Apr 18 18:50:18 2011
@@ -29,6 +29,7 @@
AIK_THROW_ITEM,
AIK_FIRE_ITEM,
AIK_QUAFF_ITEM,
+ AIK_QUAFF_FROM_FOUNTAIN,
AIK_USE_ITEM,
AIK_MIX_ITEMS,
AIK_READ_ITEM
=======================================
--- /creature.cpp Mon Apr 18 05:06:09 2011
+++ /creature.cpp Mon Apr 18 18:50:18 2011
@@ -24,7 +24,7 @@

item_info=-1;

- initiate_move=false;
+ initiate_turn=false;

is_player=false;

@@ -425,20 +425,22 @@

//Apply the overencumbered thirst penalty, if any.

+ short encumbrance=return_encumbrance_state();
+
//If the creature is somewhat burdened.
- if(return_inventory_weight()>=return_carry_capacity()*1.5+1 &&
return_inventory_weight()<=return_carry_capacity()*2.0){
+ if(encumbrance==ENCUMBRANCE_SOMEWHAT_BURDENED){
thirst_change=random_range(1,2);
}
//If the creature is quite burdened.
- else if(return_inventory_weight()>=return_carry_capacity()*2.0+1 &&
return_inventory_weight()<=return_carry_capacity()*2.5){
+ else if(encumbrance==ENCUMBRANCE_QUITE_BURDENED){
thirst_change=random_range(1,2);
}
//If the creature is heavily burdened.
- else if(return_inventory_weight()>=return_carry_capacity()*2.5+1 &&
return_inventory_weight()<=return_carry_capacity()*3.0){
+ else if(encumbrance==ENCUMBRANCE_HEAVILY_BURDENED){
thirst_change=2;
}
//If the creature is overburdened.
- else if(return_inventory_weight()>=return_carry_capacity()*3.0+1){
+ else if(encumbrance==ENCUMBRANCE_OVERBURDENED){
thirst_change=random_range(2,3);
}

@@ -454,15 +456,17 @@

//Handle thirst states. These are only handled when thirst
increases.

+ short thirst_state=return_thirst_state();
+
//If the creature is fainting.
- if(thirst>=THIRST_FAINTING && thirst<THIRST_DEATH){
+ if(thirst_state==THIRST_FAINTING){
///I need to add 'if the creature is not currently fainted'
here.
if(rc_thirst_faint()){
///Faint.
}
}
//If the creature has reached the point of death from thirst.
- else if(thirst>=THIRST_DEATH+(return_attribute_hardiness()*15)){
+ else if(thirst_state==THIRST_DEATH){
if(rc_thirst_lose_health()){
health--;

@@ -484,72 +488,6 @@
}
}
}
-
-string Creature::return_thirst_state(){
- string thirst_state="";
-
- //If the creature is bloated.
- if(thirst<=THIRST_BLOATED){
- thirst_state="bloated";
- }
- //If the creature is satiated.
- else if(thirst>=THIRST_SATIATED && thirst<THIRST_NOT_THIRSTY){
- thirst_state="satiated";
- }
- //If the creature is not thirsty.
- else if(thirst>=THIRST_NOT_THIRSTY && thirst<THIRST_THIRSTY){
- thirst_state="not thirsty";
- }
- //If the creature is thirsty.
- else if(thirst>=THIRST_THIRSTY && thirst<THIRST_WEAK){
- thirst_state="thirsty";
- }
- //If the creature is weak.
- else if(thirst>=THIRST_WEAK && thirst<THIRST_FAINTING){
- thirst_state="weak from thirst";
- }
- //If the creature is fainting.
- else if(thirst>=THIRST_FAINTING && thirst<THIRST_DEATH){
- thirst_state="fainting from lack of water";
- }
- //If the creature is dead.
- else if(thirst>=THIRST_DEATH){
- thirst_state="dying of thirst";
- }
-
- return thirst_state;
-}
-
-string Creature::return_encumbrance_state(){
- string state="";
-
- //If the creature is unburdened.
- if(return_inventory_weight()<=return_carry_capacity()){
- state="unburdened";
- }
- //If the creature is slightly burdened.
- else if(return_inventory_weight()>=return_carry_capacity()+1 &&
return_inventory_weight()<=return_carry_capacity()*1.5){
- state="slightly burdened";
- }
- //If the creature is somewhat burdened.
- else if(return_inventory_weight()>=return_carry_capacity()*1.5+1 &&
return_inventory_weight()<=return_carry_capacity()*2.0){
- state="somewhat burdened";
- }
- //If the creature is quite burdened.
- else if(return_inventory_weight()>=return_carry_capacity()*2.0+1 &&
return_inventory_weight()<=return_carry_capacity()*2.5){
- state="quite burdened";
- }
- //If the creature is heavily burdened.
- else if(return_inventory_weight()>=return_carry_capacity()*2.5+1 &&
return_inventory_weight()<=return_carry_capacity()*3.0){
- state="heavily burdened";
- }
- //If the creature is overburdened.
- else if(return_inventory_weight()>=return_carry_capacity()*3.0+1){
- state="overburdened";
- }
-
- return state;
-}

void Creature::apply_race(short race_to_apply){
//If the creature currently has a race (it always will after the first
call to apply_race()).
=======================================
--- /creature.h Mon Apr 18 05:06:09 2011
+++ /creature.h Mon Apr 18 18:50:18 2011
@@ -53,8 +53,7 @@

//If true, the creature has given some input that should initiate a
call to turn().
//Only used by the Player class.
- ///This should really be renamed initiate_turn.
- bool initiate_move;
+ bool initiate_turn;

//If true, this creature is the player.
//If false, this creature is not the player.
@@ -281,10 +280,6 @@
//Increase or decrease thirst, and then handle thirst states.
void change_thirst(bool increase,short amount);

- std::string return_thirst_state();
-
- std::string return_encumbrance_state();
-
//Mix two items together.
//The first item is applied to the second item.
void mix_items(int item_index_1,int item_index_2);
@@ -315,6 +310,10 @@
int return_movement_speed();
int return_next_move();
double return_carry_capacity();
+ short return_encumbrance_state();
+ short return_thirst_state();
+ std::string return_encumbrance_string();
+ std::string return_thirst_string();

//Each of these functions returns the current TRUE attribute value
(with all relevant bonuses, penalties, etc.) for the corresponding
attribute.
int return_attribute_strength();
=======================================
--- /creature_attributes.cpp Fri Apr 15 23:09:58 2011
+++ /creature_attributes.cpp Mon Apr 18 18:50:18 2011
@@ -9,22 +9,28 @@
int Creature::return_attribute_strength(){
double attribute=attributes[ATTRIBUTE_STRENGTH];

+ short thirst_state=return_thirst_state();
+
//If the creature's thirst is satiated.
- if(thirst>=THIRST_SATIATED && thirst<THIRST_NOT_THIRSTY){
+ if(thirst_state==THIRST_SATIATED){
attribute+=attribute*0.10;
}
//If the creature is thirsty.
- else if(thirst>=THIRST_THIRSTY && thirst<THIRST_WEAK){
+ else if(thirst_state==THIRST_THIRSTY){
attribute-=attribute*0.10;
}
//If the creature is weak.
- else if(thirst>=THIRST_WEAK && thirst<THIRST_FAINTING){
+ else if(thirst_state==THIRST_WEAK){
attribute-=attribute*0.25;
}
//If the creature is fainting.
- else if(thirst>=THIRST_FAINTING && thirst<THIRST_DEATH){
+ else if(thirst_state==THIRST_FAINTING){
attribute-=attribute*0.25;
}
+ //If the creature is dying.
+ else if(thirst_state==THIRST_DEATH){
+ attribute-=attribute*0.25;
+ }

//Apply the racial modifier.

attribute+=templates.template_races[race].attributes[ATTRIBUTE_STRENGTH];
@@ -39,22 +45,29 @@
int Creature::return_attribute_agility(){
double attribute=attributes[ATTRIBUTE_AGILITY];

- //If the creature is anything aside from unencumbered.
- if(!(return_inventory_weight()<=return_carry_capacity())){
+ //If the creature is anything aside from unburdened.
+ if(return_encumbrance_state()!=ENCUMBRANCE_UNBURDENED){
//Apply the encumbrance penalty.

attribute-=(return_inventory_weight()-return_carry_capacity())*0.025;
}
+
+ short thirst_state=return_thirst_state();

//If the creature is satiated.
- if(thirst>=THIRST_SATIATED && thirst<THIRST_NOT_THIRSTY){
+ if(thirst_state==THIRST_SATIATED){
//Apply a satiated bonus.
attribute+=attribute*0.10;
}
//If the creature is fainting.
- else if(thirst>=THIRST_FAINTING && thirst<THIRST_DEATH){
+ else if(thirst_state==THIRST_FAINTING){
//Apply a fainting penalty.
attribute-=attribute*0.25;
}
+ //If the creature is dying.
+ else if(thirst_state==THIRST_DEATH){
+ //Apply a dying penalty.
+ attribute-=attribute*0.25;
+ }

//Apply the racial modifier.

attribute+=templates.template_races[race].attributes[ATTRIBUTE_AGILITY];
=======================================
--- /creature_combat.cpp Mon Apr 18 05:06:09 2011
+++ /creature_combat.cpp Mon Apr 18 18:50:18 2011
@@ -408,8 +408,6 @@
//The creature is now dead.
alive=false;

- ///health=0;
-
string message="";

if(is_player){
=======================================
--- /creature_commands.cpp Mon Apr 18 05:06:09 2011
+++ /creature_commands.cpp Mon Apr 18 18:50:18 2011
@@ -20,7 +20,7 @@
//

if(vector_levels[current_level].tiles[x][y].type==TILE_TYPE_DOWN_STAIRS){
command_standard=command;
- initiate_move=true;
+ initiate_turn=true;
}
//
//If creature is located on: Anything else.
@@ -36,7 +36,7 @@
//And if the level above is not the outside.

if(vector_levels[current_level].tiles[x][y].type==TILE_TYPE_UP_STAIRS &&
current_level-1>=0){
command_standard=command;
- initiate_move=true;
+ initiate_turn=true;
}
//If the creature is located on the up stairs.
//And if the level above is the outside.
@@ -70,7 +70,7 @@
if(inventory.size()<INVENTORY_MAX_SIZE){
//Due to the above if() statements, there is at least
one item that can definitely be picked up on this tile.
command_standard=command;
- initiate_move=true;
+ initiate_turn=true;

//There is no need to continue checking, so we return
from this function.
return;
@@ -101,7 +101,7 @@
///This if() may be unnecessary, as there may be no case in which
a creature cannot wait.
if(true){
command_standard=command;
- initiate_move=true;
+ initiate_turn=true;
}
//If the creature cannot wait.
else{
@@ -114,7 +114,7 @@
///This if() may be unnecessary, as there may be no case in which
a creature cannot search.
if(true){
command_standard=command;
- initiate_move=true;
+ initiate_turn=true;
}
//If the creature cannot search.
else{
@@ -226,13 +226,26 @@
else if(command==COMMAND_WAIT){
///Handle waiting.

- update_text_log("You wait around.",true);
+ update_text_log("You wait around.",is_player);
}

else if(command==COMMAND_SEARCH){
search();

- update_text_log("You search the area.",true);
+ update_text_log("You search the area.",is_player);
+ }
+
+ else if(command==COMMAND_QUAFF_FROM_FOUNTAIN){
+ change_thirst(false,300);
+
+ update_text_log("You drink from the fountain.",is_player);
+
+ if(rc_fountain_dry_up()){
+ vector_levels[current_level].tiles[x][y].type=TILE_TYPE_FLOOR;
+
vector_levels[current_level].tiles[x][y].material=MATERIAL_STONE;
+
+ update_text_log("The fountain dries up.",true);
+ }
}
}

@@ -344,7 +357,7 @@
}

//If the creature is overburdened and the directional command is a
move command.
- if(return_inventory_weight()>=return_carry_capacity()*3.0+1 &&
+ if(return_encumbrance_state()==ENCUMBRANCE_OVERBURDENED &&
(command==DIRECTIONAL_COMMAND_MOVE_LEFT ||
command==DIRECTIONAL_COMMAND_MOVE_UP ||
command==DIRECTIONAL_COMMAND_MOVE_RIGHT ||
command==DIRECTIONAL_COMMAND_MOVE_DOWN ||
command==DIRECTIONAL_COMMAND_MOVE_LEFT_UP ||
command==DIRECTIONAL_COMMAND_MOVE_RIGHT_UP ||
command==DIRECTIONAL_COMMAND_MOVE_RIGHT_DOWN ||
command==DIRECTIONAL_COMMAND_MOVE_LEFT_DOWN)){
@@ -362,7 +375,7 @@
//Target: Closed door.
//

if(vector_levels[current_level].tiles[coords.check_x][coords.check_y].type==TILE_TYPE_DOOR_CLOSED){
- initiate_move=true;
+ initiate_turn=true;
}
//
//Target: Open door.
@@ -393,7 +406,7 @@
//Target: Open door.
//

if(vector_levels[current_level].tiles[coords.check_x][coords.check_y].type==TILE_TYPE_DOOR_OPEN){
- initiate_move=true;
+ initiate_turn=true;
}
//
//Target: Closed door.
@@ -422,7 +435,7 @@
else if(command==DIRECTIONAL_COMMAND_THROW_ITEM){
//If the item can be thrown.
if(true){
- initiate_move=true;
+ initiate_turn=true;
}
//If the item cannot be thrown.
else{
@@ -440,7 +453,7 @@
//And if a launcher is being wielded in either the right or
left hand.
((!equipment_slot_empty(-1,EQUIP_HOLD_RIGHT) &&
inventory[index_of_item_in_slot(EQUIP_HOLD_RIGHT)].category==ITEM_WEAPON &&
inventory[index_of_item_in_slot(EQUIP_HOLD_RIGHT)].governing_skill_weapon==SKILL_LAUNCHER_WEAPONS)
||
(!equipment_slot_empty(-1,EQUIP_HOLD_LEFT) &&
inventory[index_of_item_in_slot(EQUIP_HOLD_LEFT)].category==ITEM_WEAPON &&
inventory[index_of_item_in_slot(EQUIP_HOLD_LEFT)].governing_skill_weapon==SKILL_LAUNCHER_WEAPONS))){
- initiate_move=true;
+ initiate_turn=true;
}
//If no item is quivered.
else if(equipment_slot_empty(-1,EQUIP_QUIVER)){
@@ -464,7 +477,7 @@
bool move_check=check_movement(x-1,y);

if(move_check){
- initiate_move=true;
+ initiate_turn=true;
}
else{
//No directional command will be executed.
@@ -477,7 +490,7 @@
bool move_check=check_movement(x,y-1);

if(move_check){
- initiate_move=true;
+ initiate_turn=true;
}
else{
//No directional command will be executed.
@@ -490,7 +503,7 @@
bool move_check=check_movement(x+1,y);

if(move_check){
- initiate_move=true;
+ initiate_turn=true;
}
else{
//No directional command will be executed.
@@ -503,7 +516,7 @@
bool move_check=check_movement(x,y+1);

if(move_check){
- initiate_move=true;
+ initiate_turn=true;
}
else{
//No directional command will be executed.
@@ -523,7 +536,7 @@
}

if(move_check){
- initiate_move=true;
+ initiate_turn=true;
}
else{
//No directional command will be executed.
@@ -543,7 +556,7 @@
}

if(move_check){
- initiate_move=true;
+ initiate_turn=true;
}
else{
//No directional command will be executed.
@@ -563,7 +576,7 @@
}

if(move_check){
- initiate_move=true;
+ initiate_turn=true;
}
else{
//No directional command will be executed.
@@ -583,7 +596,7 @@
}

if(move_check){
- initiate_move=true;
+ initiate_turn=true;
}
else{
//No directional command will be executed.
@@ -1117,12 +1130,12 @@
if(command==INVENTORY_COMMAND_DROP_ITEM){
//If the item is unequipped.
if(!inventory[inventory_item_index].equipped){
- initiate_move=true;
+ initiate_turn=true;
}
//If the item is equipped.
else{
input_inventory=INVENTORY_COMMAND_UNEQUIP_AND_DROP_ITEM;
- initiate_move=true;
+ initiate_turn=true;
}
}

@@ -1145,7 +1158,7 @@
if(!inventory[inventory_item_index].equipped &&
//And if the corresponding equipment slot is open.
equipment_slot_empty(inventory_item_index,equip_slot)){
- initiate_move=true;
+ initiate_turn=true;
}
//If the item is already equipped.
else if(inventory[inventory_item_index].equipped){
@@ -1185,7 +1198,7 @@
else if(command==INVENTORY_COMMAND_UNEQUIP_ITEM){
//If the item is equipped.
if(inventory[inventory_item_index].equipped){
- initiate_move=true;
+ initiate_turn=true;
}
//If the item is not equipped.
else{
@@ -1237,7 +1250,7 @@
if((!inventory[inventory_item_index].equipped ||
(inventory[inventory_item_index].equipped &&
inventory[inventory_item_index].stack>1)) &&
//And if the item is a drink.
inventory[inventory_item_index].category==ITEM_DRINK){
- initiate_move=true;
+ initiate_turn=true;
}
//If the item is equipped and its stack size is 1.
else if(inventory[inventory_item_index].equipped &&
inventory[inventory_item_index].stack==1){
@@ -1270,7 +1283,7 @@
else if(command==INVENTORY_COMMAND_USE_ITEM){
//If the item can be used.

if(inventory[inventory_item_index].possesses_effect(ITEM_EFFECT_USE_LIGHT)
&& inventory[inventory_item_index].fuel>0){
- initiate_move=true;
+ initiate_turn=true;
}
//If the item is a light source with no fuel.
else
if(inventory[inventory_item_index].possesses_effect(ITEM_EFFECT_USE_LIGHT)
&& inventory[inventory_item_index].fuel==0){
@@ -1327,7 +1340,7 @@
else if(command==INVENTORY_COMMAND_MIX_ITEMS_2){
//If the items can be mixed.
if(items_mixable(first_inventory_item_index,inventory_item_index)){
- initiate_move=true;
+ initiate_turn=true;
}
//If the items cannot be mixed.
else{
@@ -1340,7 +1353,7 @@
else if(command==INVENTORY_COMMAND_READ_ITEM){
//If the item can be read.

if(boost::algorithm::trim_copy(inventory[inventory_item_index].writing).length()>0){
- initiate_move=true;
+ initiate_turn=true;
}
//If the item cannot be read.
else{
@@ -1545,7 +1558,7 @@

if(command==INVENTORY_COMMAND_UNEQUIP_AND_DROP_ITEM){
input_inventory=INVENTORY_COMMAND_UNEQUIPPED_NOW_DROP_ITEM;
- initiate_move=true;
+ initiate_turn=true;
}
}

=======================================
--- /creature_other_stats.cpp Sat Apr 16 21:36:42 2011
+++ /creature_other_stats.cpp Mon Apr 18 18:50:18 2011
@@ -185,3 +185,117 @@

return number;
}
+
+short Creature::return_encumbrance_state(){
+ //If the creature is unburdened.
+ if(return_inventory_weight()<=return_carry_capacity()){
+ return ENCUMBRANCE_UNBURDENED;
+ }
+ //If the creature is slightly burdened.
+ else if(return_inventory_weight()>=return_carry_capacity()+1 &&
return_inventory_weight()<=return_carry_capacity()*1.5){
+ return ENCUMBRANCE_SLIGHTLY_BURDENED;
+ }
+ //If the creature is somewhat burdened.
+ else if(return_inventory_weight()>=return_carry_capacity()*1.5+1 &&
return_inventory_weight()<=return_carry_capacity()*2.0){
+ return ENCUMBRANCE_SOMEWHAT_BURDENED;
+ }
+ //If the creature is quite burdened.
+ else if(return_inventory_weight()>=return_carry_capacity()*2.0+1 &&
return_inventory_weight()<=return_carry_capacity()*2.5){
+ return ENCUMBRANCE_QUITE_BURDENED;
+ }
+ //If the creature is heavily burdened.
+ else if(return_inventory_weight()>=return_carry_capacity()*2.5+1 &&
return_inventory_weight()<=return_carry_capacity()*3.0){
+ return ENCUMBRANCE_HEAVILY_BURDENED;
+ }
+ //If the creature is overburdened.
+ else if(return_inventory_weight()>=return_carry_capacity()*3.0+1){
+ return ENCUMBRANCE_OVERBURDENED;
+ }
+}
+
+short Creature::return_thirst_state(){
+ //If the creature is bloated.
+ if(thirst<=-1){
+ return THIRST_BLOATED;
+ }
+ //If the creature is satiated.
+ else if(thirst>=0 && thirst<500){
+ return THIRST_SATIATED;
+ }
+ //If the creature is not thirsty.
+ else if(thirst>=500 && thirst<1500){
+ return THIRST_NOT_THIRSTY;
+ }
+ //If the creature is thirsty.
+ else if(thirst>=1500 && thirst<1800){
+ return THIRST_THIRSTY;
+ }
+ //If the creature is weak.
+ else if(thirst>=1800 && thirst<1900){
+ return THIRST_WEAK;
+ }
+ //If the creature is fainting.
+ else if(thirst>=1900 && thirst<2000+(return_attribute_hardiness()*15)){
+ return THIRST_FAINTING;
+ }
+ //If the creature is dead.
+ else if(thirst>=2000+(return_attribute_hardiness()*15)){
+ return THIRST_DEATH;
+ }
+}
+
+string Creature::return_encumbrance_string(){
+ short encumbrance=return_encumbrance_state();
+
+ if(encumbrance==ENCUMBRANCE_UNBURDENED){
+ return "unburdened";
+ }
+ else if(encumbrance==ENCUMBRANCE_SLIGHTLY_BURDENED){
+ return "slightly burdened";
+ }
+ else if(encumbrance==ENCUMBRANCE_SOMEWHAT_BURDENED){
+ return "somewhat burdened";
+ }
+ else if(encumbrance==ENCUMBRANCE_QUITE_BURDENED){
+ return "quite burdened";
+ }
+ else if(encumbrance==ENCUMBRANCE_HEAVILY_BURDENED){
+ return "heavily burdened";
+ }
+ else if(encumbrance==ENCUMBRANCE_OVERBURDENED){
+ return "overburdened";
+ }
+}
+
+string Creature::return_thirst_string(){
+ short thirst_state=return_thirst_state();
+
+ //If the creature is bloated.
+ if(thirst_state==THIRST_BLOATED){
+ return "bloated";
+ }
+ //If the creature is satiated.
+ else if(thirst_state==THIRST_SATIATED){
+ return "satiated";
+ }
+ //If the creature is not thirsty.
+ else if(thirst_state==THIRST_NOT_THIRSTY){
+ return "not thirsty";
+ }
+ //If the creature is thirsty.
+ else if(thirst_state==THIRST_THIRSTY){
+ return "thirsty";
+ }
+ //If the creature is weak.
+ else if(thirst_state==THIRST_WEAK){
+ return "weak from thirst";
+ }
+ //If the creature is fainting.
+ else if(thirst_state==THIRST_FAINTING){
+ return "fainting from lack of water";
+ }
+ //If the creature is dead.
+ else if(thirst_state==THIRST_DEATH){
+ return "dying of thirst";
+ }
+}
=======================================
--- /creature_skills.cpp Sat Apr 16 16:41:43 2011
+++ /creature_skills.cpp Mon Apr 18 18:50:18 2011
@@ -108,8 +108,8 @@
int Creature::return_skill_speed(){
double skill=skills[SKILL_SPEED][SKILL_EXPERIENCE_LEVEL];

- //If the creature is anything aside from unencumbered.
- if(!(return_inventory_weight()<=return_carry_capacity())){
+ //If the creature is anything aside from unburdened.
+ if(return_encumbrance_state()!=ENCUMBRANCE_UNBURDENED){
//Apply the encumbrance penalty.
skill-=(return_inventory_weight()-return_carry_capacity())*0.1;
}
=======================================
--- /data/templates/drinks Thu Apr 7 01:03:15 2011
+++ /data/templates/drinks Mon Apr 18 18:50:18 2011
@@ -13,7 +13,7 @@
material:glass
effect:water
<drink>
- thirst quenched:250
+ thirst quenched:200
</drink>
</item>

=======================================
--- /enumerations.h Mon Apr 18 05:06:09 2011
+++ /enumerations.h Mon Apr 18 18:50:18 2011
@@ -404,16 +404,29 @@
//****************//

enum{
- THIRST_DEATH=1850,
- THIRST_FAINTING=1650,
- THIRST_WEAK=1600,
- THIRST_THIRSTY=1500,
- THIRST_NOT_THIRSTY=500,
- THIRST_SATIATED=0,
- THIRST_BLOATED=-1,
+ THIRST_DEATH,
+ THIRST_FAINTING,
+ THIRST_WEAK,
+ THIRST_THIRSTY,
+ THIRST_NOT_THIRSTY,
+ THIRST_SATIATED,
+ THIRST_BLOATED,
THIRST_FLOOR=-20000
};

+//*********************//
+// Encumbrance States: //
+//*********************//
+
+enum{
+ ENCUMBRANCE_UNBURDENED,
+ ENCUMBRANCE_SLIGHTLY_BURDENED,
+ ENCUMBRANCE_SOMEWHAT_BURDENED,
+ ENCUMBRANCE_QUITE_BURDENED,
+ ENCUMBRANCE_HEAVILY_BURDENED,
+ ENCUMBRANCE_OVERBURDENED
+};
+
//****************//
// Light Sources: //
//****************//
@@ -432,7 +445,8 @@
COMMAND_GO_UP_STAIRS,
COMMAND_PICK_UP,
COMMAND_WAIT,
- COMMAND_SEARCH
+ COMMAND_SEARCH,
+ COMMAND_QUAFF_FROM_FOUNTAIN
};

//***********************//
@@ -508,6 +522,7 @@
WINDOW_DEATH_1,
WINDOW_DEATH,
WINDOW_CONFIRM_LEAVE_DUNGEON,
+ WINDOW_CONFIRM_QUAFF_FROM_FOUNTAIN,
WINDOW_LEAVE_DUNGEON,
WINDOW_INTERACTIVE_INVENTORY_RELEVANT,
WINDOW_INTERACTIVE_INVENTORY_ALL,
=======================================
--- /main.cpp Mon Apr 18 05:06:09 2011
+++ /main.cpp Mon Apr 18 18:50:18 2011
@@ -93,9 +93,9 @@
input();

if(player.game_in_progress){
- //Then, we move all of the objects, if the player has
initiated a move.
- if(player.alive && player.initiate_move){
- player.initiate_move=false;
+ //Then, we move all of the objects, if the player has
initiated a turn.
+ if(player.alive && player.initiate_turn){
+ player.initiate_turn=false;
turn();
player.turn++;
}
=======================================
--- /monster.cpp Mon Apr 18 05:06:09 2011
+++ /monster.cpp Mon Apr 18 18:50:18 2011
@@ -312,6 +312,11 @@
else if(ai_keystates[AIK_QUAFF_ITEM]){
input_inventory=INVENTORY_COMMAND_QUAFF_ITEM;
}
+
+ //Quaff from fountain.
+ else if(ai_keystates[AIK_QUAFF_FROM_FOUNTAIN]){
+ command_standard=COMMAND_QUAFF_FROM_FOUNTAIN;
+ }

//Use item.
else if(ai_keystates[AIK_USE_ITEM]){
=======================================
--- /monster.h Thu Mar 24 17:51:02 2011
+++ /monster.h Mon Apr 18 18:50:18 2011
@@ -52,12 +52,8 @@
coordinates ai_opposite_direction(short target_x,short target_y);

//AI States:
- //
- //

bool ai_state_thirsty();
- bool ai_state_encumbered();
- bool ai_state_overencumbered();
bool ai_state_low_health();
bool ai_state_hostile_nearby(short hostile_x,short hostile_y);
};
=======================================
--- /monster_ai.cpp Mon Apr 18 05:06:09 2011
+++ /monster_ai.cpp Mon Apr 18 18:50:18 2011
@@ -42,13 +42,18 @@
}

ai_action Monster::ai_determine_action(){
+ //The default action is to do nothing.
ai_action action;
action.action=AI_ACTION_DO_NOTHING;
action.coords.x=x;
action.coords.y=y;

+ //Determine the coordinates of the nearest hostile creature.
coordinates hostile_creature=ai_nearest_hostile();

+ //Determine the encumbrance state of the monster.
+ short encumbrance=return_encumbrance_state();
+
Race* mr=&templates.template_races[race];

//-Survival-//
@@ -84,7 +89,7 @@

//-Movement-//

- if(action.action==AI_ACTION_MOVE && ai_state_overencumbered()){
+ if(action.action==AI_ACTION_MOVE &&
encumbrance==ENCUMBRANCE_OVERBURDENED){
action.action=AI_ACTION_DROP_WEIGHT;
}

=======================================
--- /monster_ai_states.cpp Thu Mar 31 05:05:42 2011
+++ /monster_ai_states.cpp Mon Apr 18 18:50:18 2011
@@ -7,41 +7,7 @@

bool Monster::ai_state_thirsty(){
//If the creature is thirsty.
- if(thirst>=THIRST_THIRSTY){
- return true;
- }
-
- return false;
-}
-
-bool Monster::ai_state_encumbered(){
- //If the creature is slightly burdened.
- if(return_inventory_weight()>=return_carry_capacity()+1 &&
return_inventory_weight()<=return_carry_capacity()*1.5){
- return true;
- }
- //If the creature is somewhat burdened.
- else if(return_inventory_weight()>=return_carry_capacity()*1.5+1 &&
return_inventory_weight()<=return_carry_capacity()*2.0){
- return true;
- }
- //If the creature is quite burdened.
- else if(return_inventory_weight()>=return_carry_capacity()*2.0+1 &&
return_inventory_weight()<=return_carry_capacity()*2.5){
- return true;
- }
- //If the creature is heavily burdened.
- else if(return_inventory_weight()>=return_carry_capacity()*2.5+1 &&
return_inventory_weight()<=return_carry_capacity()*3.0){
- return true;
- }
- //If the creature is overburdened.
- else if(return_inventory_weight()>=return_carry_capacity()*3.0+1){
- return true;
- }
-
- return false;
-}
-
-bool Monster::ai_state_overencumbered(){
- //If the creature is overburdened.
- if(return_inventory_weight()>=return_carry_capacity()*3.0+1){
+ if(return_thirst_state()<=THIRST_THIRSTY){
return true;
}

=======================================
--- /player.cpp Mon Apr 18 05:06:09 2011
+++ /player.cpp Mon Apr 18 18:50:18 2011
@@ -295,6 +295,9 @@
else if(current_window==WINDOW_CONFIRM_LEAVE_DUNGEON){
handle_input_confirm_leave_dungeon();
}
+ else
if(current_window==WINDOW_CONFIRM_QUAFF_FROM_FOUNTAIN){
+ handle_input_confirm_quaff_from_fountain();
+ }
else if(current_window==WINDOW_LEAVE_DUNGEON){
handle_input_leave_dungeon();
}
@@ -478,9 +481,16 @@

//Quaff item.
else if(input_inventory==INVENTORY_COMMAND_NONE &&
input_directional==DIRECTIONAL_COMMAND_NONE &&
event.key.keysym.unicode==(Uint16)'q'){
- update_text_log("What do you want to drink?
[?*]",is_player);
-
- input_inventory=INVENTORY_COMMAND_QUAFF_ITEM;
+
if(vector_levels[current_level].tiles[x][y].type==TILE_TYPE_FOUNTAIN){
+ update_text_log("There is a fountain here.
Drink from it? [yn]",is_player);
+
+
player.current_window=WINDOW_CONFIRM_QUAFF_FROM_FOUNTAIN;
+ }
+ else{
+ update_text_log("What do you want to
drink? [?*]",is_player);
+
+
input_inventory=INVENTORY_COMMAND_QUAFF_ITEM;
+ }
}

//Equip item in right hand.
=======================================
--- /player.h Mon Apr 18 02:59:47 2011
+++ /player.h Mon Apr 18 18:50:18 2011
@@ -153,6 +153,7 @@
void handle_input_death();
void handle_input_death_1();
void handle_input_confirm_leave_dungeon();
+ void handle_input_confirm_quaff_from_fountain();
void handle_input_leave_dungeon();

//Render the windows.
=======================================
--- /player_windows.cpp Mon Apr 18 05:06:09 2011
+++ /player_windows.cpp Mon Apr 18 18:50:18 2011
@@ -533,7 +533,7 @@

command_standard=COMMAND_GO_UP_STAIRS;

- initiate_move=true;
+ initiate_turn=true;
}

//Return to game.
@@ -543,6 +543,26 @@
update_text_log("You decide to remain in the dungeon for
now.",true);
}
}
+
+void Player::handle_input_confirm_quaff_from_fountain(){
+ //Quaff from the fountain.
+ if(event.key.keysym.unicode==(Uint16)'y'){
+ current_window=WINDOW_NONE;
+
+ command_standard=COMMAND_QUAFF_FROM_FOUNTAIN;
+
+ initiate_turn=true;
+ }
+
+ //Return to game.
+ else if(event.key.keysym.unicode==(Uint16)'n'){
+ current_window=WINDOW_NONE;
+
+ update_text_log("What do you want to drink? [?*]",is_player);
+
+ input_inventory=INVENTORY_COMMAND_QUAFF_ITEM;
+ }
+}

void Player::handle_input_leave_dungeon(){
//Close the game.
@@ -1406,7 +1426,7 @@

ss.clear();ss.str("");ss<<"Weight/Capacity: ";ss<<(int)return_inventory_weight();ss<<"/";ss<<(int)return_carry_capacity();msg=ss.str();

font_small.show((option_screen_width-msg.length()*font_small.spacing_x)/2,0,msg,render_color);

- ss.clear();ss.str("");ss<<"You are
currently ";ss<<return_encumbrance_state();ss<<".";msg=ss.str();
+ ss.clear();ss.str("");ss<<"You are
currently ";ss<<return_encumbrance_string();ss<<".";msg=ss.str();

font_small.show((option_screen_width-msg.length()*font_small.spacing_x)/2,font_small.spacing_y,msg,render_color);

for(short n=ITEM_WEAPON;n<ITEM_OTHER+1;n++){
=======================================
--- /random_chance.cpp Fri Apr 15 23:09:58 2011
+++ /random_chance.cpp Mon Apr 18 18:50:18 2011
@@ -86,6 +86,17 @@
return false;
}
}
+
+bool rc_fountain_dry_up(){
+ int random_attempt=random_range(0,99);
+
+ if(random_attempt>=0 && random_attempt<40){
+ return true;
+ }
+ else{
+ return false;
+ }
+}

/**bool rc_regain_mana(){
int random_attempt=random_range(0,99);
=======================================
--- /random_chance.h Fri Apr 15 23:09:58 2011
+++ /random_chance.h Mon Apr 18 18:50:18 2011
@@ -25,6 +25,8 @@

bool rc_discover_secret_door();

+bool rc_fountain_dry_up();
+
//Turn stuff//

///bool rc_regain_mana();
=======================================
--- /update.cpp Mon Apr 18 02:59:47 2011
+++ /update.cpp Mon Apr 18 18:50:18 2011
@@ -201,7 +201,8 @@
glClear(GL_COLOR_BUFFER_BIT);

if(player.game_in_progress){
- if(player.current_window==WINDOW_NONE ||
player.current_window==WINDOW_DEATH_1 ||
player.current_window==WINDOW_CONFIRM_LEAVE_DUNGEON){
+ if(player.current_window==WINDOW_NONE ||
player.current_window==WINDOW_DEATH_1 ||
player.current_window==WINDOW_CONFIRM_LEAVE_DUNGEON ||
+ player.current_window==WINDOW_CONFIRM_QUAFF_FROM_FOUNTAIN){
//Used to keep track of what spaces have something rendered on
them this frame.
vector< vector<bool> > tile_rendered;

tile_rendered.resize(vector_levels[current_level].level_x,vector<bool>(vector_levels[current_level].level_y));
@@ -316,69 +317,60 @@
bool thirsty=false;
bool burdened=false;

- //If the player is anything aside from unencumbered.
-
if(!(player.return_inventory_weight()<=player.return_carry_capacity())){
+ //If the player is anything aside from unburdened.
+ if(player.return_encumbrance_state()!=ENCUMBRANCE_UNBURDENED){
burdened=true;
}

//If the player is anything other than not thirsty.
- if(!(player.thirst>=THIRST_NOT_THIRSTY &&
player.thirst<THIRST_THIRSTY)){
+ if(player.return_thirst_state()!=THIRST_NOT_THIRSTY){
thirsty=true;
}

short burden_color=COLOR_WHITE;
- //If the player is unencumbered.
-
if(player.return_inventory_weight()<=player.return_carry_capacity()){
+ short encumbrance=player.return_encumbrance_state();
+
+ if(encumbrance==ENCUMBRANCE_UNBURDENED){
burden_color=COLOR_GREEN;
}
- //If the player is burdened.
- else
if(player.return_inventory_weight()>=player.return_carry_capacity()+1 &&
player.return_inventory_weight()<=player.return_carry_capacity()*1.5){
+ else if(encumbrance==ENCUMBRANCE_SLIGHTLY_BURDENED){
burden_color=COLOR_YELLOW;
}
- //If the player is stressed.
- else
if(player.return_inventory_weight()>=player.return_carry_capacity()*1.5+1
&& player.return_inventory_weight()<=player.return_carry_capacity()*2.0){
+ else if(encumbrance==ENCUMBRANCE_SOMEWHAT_BURDENED){
burden_color=COLOR_ORANGE;
}
- //If the player is strained.
- else
if(player.return_inventory_weight()>=player.return_carry_capacity()*2.0+1
&& player.return_inventory_weight()<=player.return_carry_capacity()*2.5){
+ else if(encumbrance==ENCUMBRANCE_QUITE_BURDENED){
burden_color=COLOR_PUMPKIN;
}
- //If the player is overtaxed.
- else
if(player.return_inventory_weight()>=player.return_carry_capacity()*2.5+1
&& player.return_inventory_weight()<=player.return_carry_capacity()*3.0){
+ else if(encumbrance==ENCUMBRANCE_HEAVILY_BURDENED){
burden_color=COLOR_RED;
}
- //If the player is overloaded.
- else
if(player.return_inventory_weight()>=player.return_carry_capacity()*3.0+1){
+ else if(encumbrance==ENCUMBRANCE_OVERBURDENED){
burden_color=COLOR_DARK_RED;
}

short thirst_color=COLOR_WHITE;
- //If the player is bloated.
- if(player.thirst<=THIRST_BLOATED){
+ short thirst_state=player.return_thirst_state();
+
+ if(thirst_state==THIRST_BLOATED){
thirst_color=COLOR_PURPLE;
}
- //If the player is satiated.
- else if(player.thirst>=THIRST_SATIATED &&
player.thirst<THIRST_NOT_THIRSTY){
+ else if(thirst_state==THIRST_SATIATED){
thirst_color=COLOR_BLUE;
}
- //If the player is not thirsty.
- else if(player.thirst>=THIRST_NOT_THIRSTY &&
player.thirst<THIRST_THIRSTY){
+ else if(thirst_state==THIRST_NOT_THIRSTY){
thirst_color=COLOR_GREEN;
}
- //If the player is thirsty.
- else if(player.thirst>=THIRST_THIRSTY &&
player.thirst<THIRST_WEAK){
+ else if(thirst_state==THIRST_THIRSTY){
thirst_color=COLOR_YELLOW;
}
- //If the player is weak.
- else if(player.thirst>=THIRST_WEAK &&
player.thirst<THIRST_FAINTING){
+ else if(thirst_state==THIRST_WEAK){
thirst_color=COLOR_ORANGE;
}
- //If the player is fainting.
- else if(player.thirst>=THIRST_FAINTING &&
player.thirst<THIRST_DEATH){
+ else if(thirst_state==THIRST_FAINTING){
thirst_color=COLOR_RED;
}
- //If the player is dead.
- else if(player.thirst>=THIRST_DEATH){
+ else if(thirst_state==THIRST_DEATH){
thirst_color=COLOR_DARK_RED;
}

@@ -422,10 +414,10 @@
//If the player is anything other than not thirsty.
if(thirsty){
if(!burdened){
- ss.clear();ss.str("");ss<<"
is ";ss<<player.return_thirst_state();ss<<".";msg=ss.str();
+ ss.clear();ss.str("");ss<<"
is ";ss<<player.return_thirst_string();ss<<".";msg=ss.str();
}
else{
- ss.clear();ss.str("");ss<<"
is ";ss<<player.return_thirst_state();msg=ss.str();
+ ss.clear();ss.str("");ss<<"
is ";ss<<player.return_thirst_string();msg=ss.str();
}

font_small.show(5+font_small.spacing_x*size_last_msg,player.option_screen_height-170,msg,thirst_color);
size_last_msg+=msg.length();
@@ -434,10 +426,10 @@
//If the player is anything aside from unencumbered.
if(burdened){
if(!thirsty){
- ss.clear();ss.str("");ss<<"
is ";ss<<player.return_encumbrance_state();ss<<".";msg=ss.str();
+ ss.clear();ss.str("");ss<<"
is ";ss<<player.return_encumbrance_string();ss<<".";msg=ss.str();
}
else{
- ss.clear();ss.str("");ss<<"
and ";ss<<player.return_encumbrance_state();ss<<".";msg=ss.str();
+ ss.clear();ss.str("");ss<<"
and ";ss<<player.return_encumbrance_string();ss<<".";msg=ss.str();
}

font_small.show(5+font_small.spacing_x*size_last_msg,player.option_screen_height-170,msg,burden_color);
}
=======================================
--- /version.h Mon Apr 18 05:06:09 2011
+++ /version.h Mon Apr 18 18:50:18 2011
@@ -16,17 +16,17 @@
//Standard Version Type
static const long MAJOR = 0;
static const long MINOR = 2;
- static const long BUILD = 2903;
- static const long REVISION = 16123;
+ static const long BUILD = 2912;
+ static const long REVISION = 16170;

//Miscellaneous Version Types
- static const long BUILDS_COUNT = 6702;
- #define RC_FILEVERSION 0,2,2903,16123
- #define RC_FILEVERSION_STRING "0, 2, 2903, 16123\0"
- static const char FULLVERSION_STRING[] = "0.2.2903.16123";
+ static const long BUILDS_COUNT = 6724;
+ #define RC_FILEVERSION 0,2,2912,16170
+ #define RC_FILEVERSION_STRING "0, 2, 2912, 16170\0"
+ static const char FULLVERSION_STRING[] = "0.2.2912.16170";

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


}
Reply all
Reply to author
Forward
0 new messages