From a7893db77bb9d9dd552918ccfddb4cd5c0ab3c19 Mon Sep 17 00:00:00 2001 From: Chokboyz Date: Mon, 12 Oct 2009 20:23:13 +0000 Subject: [PATCH] * Implemented working town difficulty for the next scenario formats * Fixed the "reversed bashing/lockpicking difficulty scale" * Corrected a typo when including "consts.h" Chokboyz git-svn-id: http://openexile.googlecode.com/svn/trunk@131 4ebdad44-0ea0-11de-aab3-ff745001d230 --- Win32/Blades of Exile/GLOBAL.H | 2 +- Win32/Blades of Exile/boe.fileio.cpp | 6 +++++- Win32/Blades of Exile/classes/LOCATION.CPP | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Win32/Blades of Exile/GLOBAL.H b/Win32/Blades of Exile/GLOBAL.H index 5cd09f2b..1f6bd795 100644 --- a/Win32/Blades of Exile/GLOBAL.H +++ b/Win32/Blades of Exile/GLOBAL.H @@ -6,7 +6,7 @@ #include #include -#include "consts.h" +#include "classes/consts.h" #include "classes/item.h" #include "classes/location.h" #include "classes/pc.h" diff --git a/Win32/Blades of Exile/boe.fileio.cpp b/Win32/Blades of Exile/boe.fileio.cpp index 6d52900d..9b482d20 100644 --- a/Win32/Blades of Exile/boe.fileio.cpp +++ b/Win32/Blades of Exile/boe.fileio.cpp @@ -1207,6 +1207,10 @@ void load_town(short town_num,short mode,short extra,char *str) { ReadFile(file_id, &c_town.town, sizeof(town_record_type), &dwBytesRead, NULL); port_town(0); + if(PSD[SDF_LEGACY_SCENARIO] == 0) + c_town.difficulty = c_town.town.difficulty; + else//legacy no difficulty setting case + c_town.difficulty = 0; } else ReadFile(file_id, &dummy_town, sizeof(town_record_type), &dwBytesRead, NULL); @@ -1876,7 +1880,7 @@ void ListFiles(char *path, HWND listbox){ short len; HANDLE find_file_id; WIN32_FIND_DATA lpFindFileData; - char copy_str[256], test_str[256]; + char copy_str[256]; sprintf(copy_str,"scenarios/%s*.*",path); diff --git a/Win32/Blades of Exile/classes/LOCATION.CPP b/Win32/Blades of Exile/classes/LOCATION.CPP index c4a47a44..d27d9d59 100644 --- a/Win32/Blades of Exile/classes/LOCATION.CPP +++ b/Win32/Blades of Exile/classes/LOCATION.CPP @@ -116,7 +116,7 @@ void location::pickLock(short pc_num) return; } unlock_adjust = scenario.ter_types[terrain].flag2; - if ((unlock_adjust >= 5) || (r1 > (unlock_adjust * 15 + 30))) { + if ((unlock_adjust >= 5) || (r1 > (90 - unlock_adjust * 15))) { add_string_to_buf(" Didn't work. "); if (will_break == TRUE) { @@ -151,7 +151,7 @@ void location::bashDoor(short pc_num) unlock_adjust = scenario.ter_types[terrain].flag2; - if ((unlock_adjust >= 5) || (r1 > (unlock_adjust * 15 + 40)) || (scenario.ter_types[terrain].special != 10)) + if ((unlock_adjust >= 5) || (r1 > (100 - unlock_adjust * 15)) || (scenario.ter_types[terrain].special != 10)) { add_string_to_buf(" Didn't work. "); adven[pc_num].damage(get_ran(1,1,4),4,-1);