[escape-from-the-masters-lair] push by DarkOppr...@gmail.com - Finished adding race descriptions. Began work on good choice starting ... on 2011-04-19 19:08 GMT

0 views
Skip to first unread message

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

unread,
Apr 19, 2011, 3:08:31 PM4/19/11
to escape-from-th...@googlegroups.com
Revision: c13e66e16ac0
Author: Kevin Wells <DarkOp...@gmail.com>
Date: Tue Apr 19 12:07:59 2011
Log: Finished adding race descriptions. Began work on good choice
starting selector.
http://code.google.com/p/escape-from-the-masters-lair/source/detail?r=c13e66e16ac0

Modified:
/Development/To Do.rtf
/Escape from the Master's Lair.cbp
/Escape from the Master's Lair.layout
/Escape from the Master's Lair.layout.save
/creature.cpp
/data/templates/races
/player.cpp
/player.h
/player_start.cpp
/player_windows.cpp
/version.h

=======================================
--- /Development/To Do.rtf Tue Apr 19 03:50:10 2011
+++ /Development/To Do.rtf Tue Apr 19 12:07:59 2011
@@ -3,7 +3,7 @@
\strike -Handle anything left in the code in comments.\lang9\strike0\par
\strike -Add random character selection stuff to game startup.\strike0\par
\strike -Finish making current races all unique.\strike0\par
--Add race descriptions to race selection screen.\par
+\strike -Add race descriptions to race selection screen.\strike0\par
-Add smart startup choice thing.\par
\par
AFTER BRANCH:\par
=======================================
--- /Escape from the Master's Lair.cbp Tue Apr 19 01:14:25 2011
+++ /Escape from the Master's Lair.cbp Tue Apr 19 12:07:59 2011
@@ -184,7 +184,6 @@
<Unit filename="player.h" />
<Unit filename="player_scores.cpp" />
<Unit filename="player_start.cpp" />
- <Unit filename="player_starting_values.h" />
<Unit filename="player_windows.cpp" />
<Unit filename="quit.cpp" />
<Unit filename="quit.h" />
@@ -198,6 +197,7 @@
<Unit filename="render.h" />
<Unit filename="save_load.cpp" />
<Unit filename="save_load.h" />
+ <Unit filename="starting_values.h" />
<Unit filename="string_input.cpp" />
<Unit filename="string_input.h" />
<Unit filename="templates.cpp" />
=======================================
--- /Escape from the Master's Lair.layout Tue Apr 19 03:50:10 2011
+++ /Escape from the Master's Lair.layout Tue Apr 19 12:07:59 2011
@@ -38,10 +38,10 @@
<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="16096" topLine="481" />
+ <Cursor1 position="379" topLine="0" />
</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="5133" topLine="325" />
+ <Cursor1 position="12258" topLine="325" />
</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" />
@@ -52,8 +52,8 @@
<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="1" top="1" tabpos="4" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="39189" topLine="1349" />
+ <File name="creature_commands.cpp" open="0" top="0" tabpos="4" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="46523" topLine="1669" />
</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" />
@@ -68,7 +68,7 @@
<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="2454" topLine="94" />
+ <Cursor1 position="289" topLine="2" />
</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" />
@@ -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="2" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="4911" topLine="26" />
+ <File name="enumerations.h" open="0" top="0" tabpos="2" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="5056" 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" />
@@ -215,22 +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="9326" topLine="286" />
+ <Cursor1 position="297" topLine="0" />
</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="3579" topLine="40" />
+ <Cursor1 position="3968" topLine="130" />
</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="6880" topLine="222" />
</File>
- <File name="player_start.cpp" open="1" top="0" tabpos="1" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="1786" topLine="42" />
- </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 name="player_start.cpp" open="1" top="1" tabpos="1" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="183" topLine="36" />
</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="35094" topLine="1011" />
+ <Cursor1 position="279" topLine="0" />
</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" />
@@ -268,7 +265,10 @@
<File name="save_load.h" open="0" top="0" tabpos="4" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="204" topLine="0" />
</File>
- <File name="string_input.cpp" open="1" top="0" tabpos="3" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <File name="starting_values.h" open="0" top="0" tabpos="0" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="172" topLine="0" />
+ </File>
+ <File name="string_input.cpp" open="0" top="0" tabpos="3" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="9267" topLine="234" />
</File>
<File name="string_input.h" open="0" top="0" tabpos="0" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
=======================================
--- /Escape from the Master's Lair.layout.save Tue Apr 19 01:42:48 2011
+++ /Escape from the Master's Lair.layout.save Tue Apr 19 12:07:59 2011
@@ -52,8 +52,8 @@
<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="11700" topLine="336" />
+ <File name="creature_commands.cpp" open="0" top="0" tabpos="4" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="46523" topLine="1669" />
</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" />
@@ -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="3856" topLine="278" />
+ <File name="enumerations.h" open="0" top="0" tabpos="2" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="4911" topLine="26" />
</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" />
@@ -218,19 +218,19 @@
<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="3579" topLine="40" />
+ <Cursor1 position="3968" topLine="130" />
</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="6880" topLine="222" />
</File>
- <File name="player_start.cpp" open="1" top="1" tabpos="0" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="0" topLine="0" />
+ <File name="player_start.cpp" open="1" top="1" tabpos="1" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="1786" topLine="42" />
</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="8024" topLine="102" />
+ <Cursor1 position="13183" topLine="272" />
</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" />
@@ -268,8 +268,8 @@
<File name="save_load.h" open="0" top="0" tabpos="4" split="0" active="1"
splitpos="0" zoom_1="0" zoom_2="0">
<Cursor1 position="204" topLine="0" />
</File>
- <File name="string_input.cpp" open="0" top="0" tabpos="0" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
- <Cursor1 position="208" topLine="0" />
+ <File name="string_input.cpp" open="0" top="0" tabpos="3" split="0"
active="1" splitpos="0" zoom_1="0" zoom_2="0">
+ <Cursor1 position="9267" topLine="234" />
</File>
<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" />
=======================================
--- /creature.cpp Mon Apr 18 19:58:29 2011
+++ /creature.cpp Tue Apr 19 12:07:59 2011
@@ -10,6 +10,7 @@
#include "message_log.h"
#include "random_chance.h"
#include "max_item_stack_size.h"
+#include "starting_values.h"

using namespace std;

@@ -64,7 +65,7 @@
for(int i=0;i<SKILL_MAGIC_SUMMONING+1;i++){
skills[i][SKILL_EXPERIENCE_LEVEL]=1;
skills[i][SKILL_EXPERIENCE]=0;
- skills[i][SKILL_EXPERIENCE_MAX]=200;
+ skills[i][SKILL_EXPERIENCE_MAX]=STARTING_SKILL_EXPERIENCE_MAX;
}

for(int i=0;i<3;i++){
=======================================
--- /data/templates/races Tue Apr 19 03:50:10 2011
+++ /data/templates/races Tue Apr 19 12:07:59 2011
@@ -8,7 +8,7 @@

<race>
name:brown bear
- description:
+ description:Brown bears are slightly tough and slightly bad at melee.
appearance:B
color:brown
weight:300
@@ -18,7 +18,7 @@

<race>
name:black bear
- description:
+ description:Black bears are tough, but uneffective melee combatants.
appearance:B
color:dark blue
weight:125
@@ -28,7 +28,7 @@

<race>
name:polar bear
- description:
+ description:Polar bears are tough, possessing a naturally armored
hide.<NEWLINE>However, they are somewhat slow, and not very good melee
fighters.
appearance:B
color:white
weight:350
@@ -40,7 +40,7 @@

<race>
name:giant panda
- description:
+ description:Giant pandas are quite tough, possessing a naturally armored
hide.<NEWLINE>However, they are slow, and relatively weak.
appearance:B
color:blue
weight:125
@@ -56,7 +56,7 @@

<race>
name:mouse
- description:
+ description:Mice grow tougher with age, but aren't very quick.
appearance:r
color:light gray
weight:0.02
@@ -66,7 +66,7 @@

<race>
name:groundhog
- description:
+ description:Groundhogs grow tougher as they age, but they lack speed.
appearance:r
color:brown
weight:0.5
@@ -76,7 +76,7 @@

<race>
name:sewer rat
- description:
+ description:Sewer rats are somewhat tough, and get tougher with age, but
they are quite slow.
appearance:r
color:dark brown
weight:0.5
@@ -88,7 +88,7 @@

<race>
name:giant rat
- description:
+ description:Giant rats are tough, and get tougher with age, but they are
quite slow.
appearance:r
color:dark gray
weight:0.5
@@ -104,7 +104,7 @@

<race>
name:puppy
- description:
+ description:Puppies are born with some aptitude for unarmed combat, but
cannot use melee weapons effectively.
appearance:c
color:white
weight:300
@@ -116,7 +116,7 @@

<race>
name:dog
- description:
+ description:Dogs are good at unarmed combat, but are not good at all at
any other melee combat.
appearance:c
color:white
weight:300
@@ -128,19 +128,19 @@

<race>
name:large dog
- description:
+ description:Large dogs are ferocious unarmed combatants, but don't give
them any melee weapons.
appearance:c
color:white
weight:300
- unarmed:-75
- bladed weapons:75
- blunt weapons:75
- stabbing weapons:75
+ unarmed:-100
+ bladed weapons:100
+ blunt weapons:100
+ stabbing weapons:100
</race>

<race>
name:wolf cub
- description:
+ description:Wolf cubs are born with some toughness and some ineptitude
with armor.
appearance:c
color:gray
weight:300
@@ -150,7 +150,7 @@

<race>
name:wolf
- description:
+ description:Wolves are fairly tough, but aren't very good with armor.
appearance:c
color:gray
weight:300
@@ -160,7 +160,7 @@

<race>
name:coyote
- description:
+ description:Coyotes are tough, but don't excel at armor usage.
appearance:c
color:payne's gray
weight:300
@@ -170,7 +170,7 @@

<race>
name:jackal
- description:
+ description:Jackals are good at unarmed combat, and are fairly tough, but
they aren't very good with armor.
appearance:c
color:brown
weight:300
@@ -181,7 +181,7 @@

<race>
name:fox
- description:
+ description:Foxes are good at unarmed combat, and are fairly tough, but
they can't use any melee weapons very well.
appearance:c
color:sepia
weight:300
@@ -487,12 +487,14 @@
appearance:@
color:white
weight:55
- bladed weapons:-25
- blunt weapons:-25
- stabbing weapons:-25
+ bladed weapons:-50
+ blunt weapons:-50
+ stabbing weapons:-50
damage melee:1,2
- damage ranged:-1,-1
- launcher weapons:50
+ damage ranged:-1,-3
+ damage thrown:-1,-1
+ launcher weapons:75
+ thrown weapons:75
<ai traits>
flees:1
uses items:1
@@ -559,8 +561,8 @@
appearance:e
color:sandy brown
weight:55
- launcher weapons:-25
- thrown weapons:-25
+ launcher weapons:-75
+ thrown weapons:-75
bladed weapons:50
blunt weapons:50
stabbing weapons:50
=======================================
--- /player.cpp Mon Apr 18 18:50:18 2011
+++ /player.cpp Tue Apr 19 12:07:59 2011
@@ -8,7 +8,7 @@
#include "quit.h"
#include "save_load.h"
#include "message_log.h"
-#include "player_starting_values.h"
+#include "starting_values.h"
#include "covering_conversions.h"

using namespace std;
=======================================
--- /player.h Tue Apr 19 01:14:25 2011
+++ /player.h Tue Apr 19 12:07:59 2011
@@ -143,6 +143,11 @@
void game_start_random_skills();
void game_start_random_items();

+ void game_start_good_all();
+ void game_start_good_race();
+ void game_start_good_skills();
+ void game_start_good_items();
+
//Handle the windows' input.
void handle_input_no_game();
void handle_input_get_name();
=======================================
--- /player_start.cpp Tue Apr 19 01:14:25 2011
+++ /player_start.cpp Tue Apr 19 12:07:59 2011
@@ -3,7 +3,7 @@

#include "player.h"
#include "world.h"
-#include "player_starting_values.h"
+#include "starting_values.h"

using namespace std;

@@ -87,3 +87,89 @@

update_class_name();
}
+
+void Player::game_start_good_all(){
+ game_start_good_race();
+ game_start_good_skills();
+ game_start_good_items();
+}
+
+void Player::game_start_good_race(){
+ //Pick a good race.
+
+ int random=random_range(0,2);
+
+ string new_race="";
+
+ if(random==0){
+ new_race="human";
+ }
+ else if(random==1){
+ new_race="yak";
+ }
+ else if(random==2){
+ new_race="lynx";
+ }
+
+ //Find the race template index for the chosen race.
+ for(int i=0;i<templates.template_races.size();i++){
+ if(templates.template_races[i].name==new_race){
+ race=i;
+ break;
+ }
+ }
+
+ get_race.clear();
+}
+
+void Player::game_start_good_skills(){
+ focused_skills[0]=-1;
+ focused_skills[1]=-1;
+ focused_skills[2]=-1;
+
+ //If the player has an affiinity for one or more skills, choose those
first.
+
+ for(int i=0;i<SKILL_MAGIC_SUMMONING+1;i++){
+ //If the player has less than the standard max experience for this
skill, he has a natural affinity for it.
+ if(skills[i][SKILL_EXPERIENCE_MAX]<STARTING_SKILL_EXPERIENCE_MAX){
+ for(int n=0;n<3;n++){
+ if(focused_skills[n]==-1){
+ focused_skills[n]=i;
+ break;
+ }
+ }
+ }
+ }
+
+ for(int n=0;n<3;n++){
+ if(focused_skills[n]==-1){
+ focused_skills[n]=SKILL_BLADED_WEAPONS;
+ break;
+ }
+ }
+ for(int n=0;n<3;n++){
+ if(focused_skills[n]==-1){
+ focused_skills[n]=SKILL_ARMOR;
+ break;
+ }
+ }
+ for(int n=0;n<3;n++){
+ if(focused_skills[n]==-1){
+ focused_skills[n]=SKILL_SPEED;
+ break;
+ }
+ }
+
+ done_focusing_skills=true;
+}
+
+void Player::game_start_good_items(){
+ starting_items_gold=STARTING_ITEMS_GOLD;
+ starting_items.clear();
+
+ ///
+
+ done_buying_start_items=true;
+
+ update_class_name();
+}
=======================================
--- /player_windows.cpp Tue Apr 19 03:50:10 2011
+++ /player_windows.cpp Tue Apr 19 12:07:59 2011
@@ -7,7 +7,7 @@
#include "quit.h"
#include "material_properties.h"
#include "version.h"
-#include "player_starting_values.h"
+#include "starting_values.h"
#include "covering_conversions.h"
#include "message_log.h"
#include "grammar.h"
@@ -167,6 +167,14 @@
else if(event.key.keysym.unicode==(Uint16)'!'){
game_start_random_all();
}
+
+ else if(event.key.keysym.unicode==(Uint16)'p'){
+ game_start_good_race();
+ }
+
+ else if(event.key.keysym.unicode==(Uint16)'g'){
+ game_start_good_all();
+ }
}

void Player::handle_input_get_focused_skills(){
@@ -292,6 +300,14 @@
else if(event.key.keysym.unicode==(Uint16)'!'){
game_start_random_all();
}
+
+ else if(event.key.keysym.unicode==(Uint16)'p'){
+ game_start_good_skills();
+ }
+
+ else if(event.key.keysym.unicode==(Uint16)'g'){
+ game_start_good_all();
+ }
}

void Player::handle_input_get_starting_items(){
@@ -392,6 +408,14 @@
else if(event.key.keysym.unicode==(Uint16)'!'){
game_start_random_all();
}
+
+ else if(event.key.keysym.unicode==(Uint16)'p'){
+ game_start_good_items();
+ }
+
+ else if(event.key.keysym.unicode==(Uint16)'g'){
+ game_start_good_all();
+ }
}

void Player::handle_input_start_message(){
=======================================
--- /version.h Tue Apr 19 03:50:10 2011
+++ /version.h Tue Apr 19 12:07:59 2011
@@ -15,18 +15,18 @@

//Standard Version Type
static const long MAJOR = 0;
- static const long MINOR = 2;
- static const long BUILD = 2959;
- static const long REVISION = 16410;
+ static const long MINOR = 3;
+ static const long BUILD = 2964;
+ static const long REVISION = 16446;

//Miscellaneous Version Types
- static const long BUILDS_COUNT = 6922;
- #define RC_FILEVERSION 0,2,2959,16410
- #define RC_FILEVERSION_STRING "0, 2, 2959, 16410\0"
- static const char FULLVERSION_STRING[] = "0.2.2959.16410";
+ static const long BUILDS_COUNT = 6934;
+ #define RC_FILEVERSION 0,3,2964,16446
+ #define RC_FILEVERSION_STRING "0, 3, 2964, 16446\0"
+ static const char FULLVERSION_STRING[] = "0.3.2964.16446";

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


}

Reply all
Reply to author
Forward
0 new messages