* 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
This commit is contained in:
Chokboyz
2009-10-12 20:23:13 +00:00
parent a0a2634e8f
commit a7893db77b
3 changed files with 8 additions and 4 deletions

View File

@@ -6,7 +6,7 @@
#include <cstdlib>
#include <cmath>
#include "consts.h"
#include "classes/consts.h"
#include "classes/item.h"
#include "classes/location.h"
#include "classes/pc.h"

View File

@@ -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);

View File

@@ -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);