diff --git a/Win32/Blades of Exile/GAMEDLOG.RC b/Win32/Blades of Exile/GAMEDLOG.RC index 6d6d5c0e..175bad95 100644 --- a/Win32/Blades of Exile/GAMEDLOG.RC +++ b/Win32/Blades of Exile/GAMEDLOG.RC @@ -1168,7 +1168,7 @@ STYLE WS_POPUP | WS_DLGFRAME { LTEXT "1_63", 1, 435, 295, 61, 20 LTEXT "5_716", 2, 6, 6, 36, 36 - LTEXT "Classic Blades of Exile build 09.01.2011 | Copyright 1997, Spiderweb Software, Inc., All rights reserved.||Blades of Exile is distributed for free under GNU General Public License version 2.", 3, 50, 6, 420, 33 + LTEXT "Classic Blades of Exile build 05.02.2011 | Copyright 1997, Spiderweb Software, Inc., All rights reserved.||Blades of Exile is distributed for free under GNU General Public License version 2.", 3, 50, 6, 420, 33 LTEXT "CONTRIBUTORS : Ormus, Ishad Nha, Celtic Minstrel, Niemand and all involved in the BoE community.", 4, 50, 227, 424, 33 LTEXT "Comments? Questions? Bugs? Post them at the Blades section of the Irony Central Board: www.ironycentral.com/forum/", 5, 50, 271, 354, 32 LTEXT "Blades of Exile was brought to you by Spiderweb Software - | _Where our aberrations become your reality._ |_Blades of Exile_ and Spiderweb Software are trademarks of Spiderweb Software.", 7, 50, 154, 410, 51 diff --git a/Win32/Blades of Exile/boe.combat.cpp b/Win32/Blades of Exile/boe.combat.cpp index d1d79740..156645f4 100644 --- a/Win32/Blades of Exile/boe.combat.cpp +++ b/Win32/Blades of Exile/boe.combat.cpp @@ -325,7 +325,7 @@ void pc_attack(short who_att,short target) sprintf (create_line, "%s punches. ", adven[who_att].name);//,hit_adj, dam_adj); add_string_to_buf((char *) create_line); - r1 = get_ran(1,0,100) + hit_adj - 20; + r1 = get_ran(1,1,100) + hit_adj - 20; r1 += 5 * (adven[current_pc].status[STATUS_WEBS] / 3); r2 = get_ran(1,1,4) + dam_adj; @@ -351,7 +351,7 @@ void pc_attack(short who_att,short target) sprintf (create_line, "%s swings. ",adven[who_att].name);//,hit_adj, dam_adj); add_string_to_buf(create_line); - r1 = get_ran(1,0,100) - 5 + hit_adj + r1 = get_ran(1,1,100) - 5 + hit_adj - 5 * adven[who_att].items[weap1].bonus; r1 += 5 * (adven[current_pc].status[STATUS_WEBS] / 3); @@ -371,7 +371,7 @@ void pc_attack(short who_att,short target) adven[who_att].items[weap1].ability_strength,which_m); // assassinate - r1 = get_ran(1,0,100); + r1 = get_ran(1,1,100); if ((adven[who_att].level >= which_m->m_d.level - 1) && (adven[who_att].skills[SKILL_ASSASSINATION] >= which_m->m_d.level / 2) && (which_m->m_d.spec_skill != MONSTER_SPLITS)) // Can't assassinate splitters @@ -433,7 +433,7 @@ void pc_attack(short who_att,short target) sprintf (create_line, "%s swings. ", adven[who_att].name);//,hit_adj, dam_adj); add_string_to_buf(create_line); - r1 = get_ran(1,0,100) + hit_adj - 5 * adven[who_att].items[weap2].bonus; + r1 = get_ran(1,1,100) + hit_adj - 5 * adven[who_att].items[weap2].bonus; // Ambidextrous? if (adven[who_att].traits[TRAIT_AMBIDEXTROUS] == false) diff --git a/Win32/Blades of Exile/boe.main.cpp b/Win32/Blades of Exile/boe.main.cpp index 6b1f14fb..7f676f6a 100644 --- a/Win32/Blades of Exile/boe.main.cpp +++ b/Win32/Blades of Exile/boe.main.cpp @@ -176,7 +176,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR, int nCmd RegisterClass(&wndclass2); - mainPtr = CreateWindow (szAppName, "Classic Blades of Exile build_09.01.2011", + mainPtr = CreateWindow (szAppName, "Classic Blades of Exile build_05.02.2011", WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN, 0, 0, diff --git a/Win32/Blades of Exile/boe.town.cpp b/Win32/Blades of Exile/boe.town.cpp index 5824e52b..ecb1b745 100644 --- a/Win32/Blades of Exile/boe.town.cpp +++ b/Win32/Blades of Exile/boe.town.cpp @@ -299,15 +299,15 @@ void start_town_mode(short which_town, short entry_dir) c_town.monst.dudes[i].active -= 10; else c_town.monst.dudes[i].active = 0; } - if ((short) town_toast > 0){ //handle entering town special events - special_queue[queue_position].queued_special = c_town.town.spec_on_entry_if_dead; //there's always at last one free slot in the special queue for entering town special + if (((short) town_toast > 0) && (c_town.town.spec_on_entry_if_dead >= 0)){ //handle entering town special events + special_queue[queue_position].queued_special = c_town.town.spec_on_entry_if_dead; //there's always at last one free slot in the special queue for entering town special, if exists special_queue[queue_position].mode = SPEC_ENTER_TOWN; - queue_position++; + queue_position = min(19, queue_position + 1);//safety valve } - else{ - special_queue[queue_position].queued_special = c_town.town.spec_on_entry; //there's always at last one free slot in the special queue for entering town special + else if (c_town.town.spec_on_entry >= 0){ + special_queue[queue_position].queued_special = c_town.town.spec_on_entry; //there's always at last one free slot in the special queue for entering town special, if exists special_queue[queue_position].mode = SPEC_ENTER_TOWN; - queue_position++; + queue_position = min(19, queue_position + 1);//safety valve } // Flush excess doomguards and viscous goos for (i = 0; i < T_M; i++) @@ -533,34 +533,45 @@ location end_town_mode(short switching_level,location destination) // returns n to_return = c_town.town.exit_locs[1].toGlobal(); else to_return.x--; party.p_loc = to_return; party.p_loc.x++; - special_queue[queue_position].queued_special = c_town.town.exit_specs[1]; - special_queue[queue_position].mode = SPEC_LEAVE_TOWN; + if(c_town.town.exit_specs[1] >= 0){//if there's a special "on exit" node to execute + special_queue[queue_position].queued_special = c_town.town.exit_specs[1]; + special_queue[queue_position].mode = SPEC_LEAVE_TOWN; + queue_position = min(19, queue_position + 1);//safety valve + } } else if (destination.x >= c_town.town.in_town_rect.right) { if (c_town.town.exit_locs[3].x > 0) to_return = c_town.town.exit_locs[3].toGlobal(); else to_return.x++; party.p_loc = to_return; party.p_loc.x--; - special_queue[queue_position].queued_special = c_town.town.exit_specs[3]; - special_queue[queue_position].mode = SPEC_LEAVE_TOWN; + if(c_town.town.exit_specs[3] >= 0){//if there's a special "on exit" node to execute + special_queue[queue_position].queued_special = c_town.town.exit_specs[3]; + special_queue[queue_position].mode = SPEC_LEAVE_TOWN; + queue_position = min(19, queue_position + 1);//safety valve + } } else if (destination.y <= c_town.town.in_town_rect.top) { if (c_town.town.exit_locs[0].x > 0) to_return = c_town.town.exit_locs[0].toGlobal(); else to_return.y--; party.p_loc = to_return; party.p_loc.y++; - special_queue[queue_position].queued_special = c_town.town.exit_specs[0]; - special_queue[queue_position].mode = SPEC_LEAVE_TOWN; + if(c_town.town.exit_specs[0] >= 0){//if there's a special "on exit" node to execute + special_queue[queue_position].queued_special = c_town.town.exit_specs[0]; + special_queue[queue_position].mode = SPEC_LEAVE_TOWN; + queue_position = min(19, queue_position + 1);//safety valve + } } else if (destination.y >= c_town.town.in_town_rect.bottom) { if (c_town.town.exit_locs[2].x > 0) to_return = c_town.town.exit_locs[2].toGlobal(); else to_return.y++; party.p_loc = to_return; party.p_loc.y--; - special_queue[queue_position].queued_special = c_town.town.exit_specs[2]; - special_queue[queue_position].mode = SPEC_LEAVE_TOWN; + if(c_town.town.exit_specs[2] >= 0){//if there's a special "on exit node" to execute + special_queue[queue_position].queued_special = c_town.town.exit_specs[2]; + special_queue[queue_position].mode = SPEC_LEAVE_TOWN; + queue_position = min(19, queue_position + 1);//safety valve + } } - queue_position++; } } diff --git a/Win32/Blades of Exile/classes/location.cpp b/Win32/Blades of Exile/classes/location.cpp index 866e9149..298d6387 100644 --- a/Win32/Blades of Exile/classes/location.cpp +++ b/Win32/Blades of Exile/classes/location.cpp @@ -98,12 +98,12 @@ void location::pickLock(short pc_num) return; } - r1 = get_ran(1,0,100) + adven[pc_num].items[which_item].ability_strength * 7; + r1 = get_ran(1,0,99) + adven[pc_num].items[which_item].ability_strength * 7; if (r1 < 75) will_break = true; - r1 = get_ran(1,0,100) - 5 * adven[pc_num].statAdj(SKILL_DEXTERITY) + c_town.difficulty * 7 + r1 = get_ran(1,0,99) - 5 * adven[pc_num].statAdj(SKILL_DEXTERITY) + c_town.difficulty * 7 - 5 * adven[pc_num].skills[SKILL_LOCKPICKING] - adven[pc_num].items[which_item].ability_strength * 7; // Nimble?