- Finally fixed the bug which prevented monsters from appearing in town.
- Attempted in vain to fix the crash when showing the Choose Custom Scenario dialog. - Cleaned out the commented code in boe.global.h. - Changed name of scen_header_type::default_ground to rating to reflect its actual use. git-svn-id: http://openexile.googlecode.com/svn/trunk@83 4ebdad44-0ea0-11de-aab3-ff745001d230
This commit is contained in:
@@ -102,7 +102,7 @@ cCreature& cCreature::operator = (legacy::creature_data_type old){
|
||||
number = old.number;
|
||||
cur_loc.x = old.m_loc.x;
|
||||
cur_loc.y = old.m_loc.y;
|
||||
m_d = old.m_d;
|
||||
*this = old.m_d;
|
||||
mobility = old.mobile;
|
||||
summoned = old.summoned;
|
||||
number = old.monst_start.number;
|
||||
@@ -158,3 +158,43 @@ std::istream& operator >> (std::istream& in, eRace& e){
|
||||
else e = RACE_HUMAN;
|
||||
return in;
|
||||
}
|
||||
|
||||
extern cUniverse univ;
|
||||
extern cScenario scenario;
|
||||
cCreature& cCreature::operator = (const cCreature& other){ // replaces return_monster_template() from boe.monsters.cpp
|
||||
id = other.id;
|
||||
number = other.number;
|
||||
start_attitude = other.start_attitude;
|
||||
start_loc = other.start_loc;
|
||||
mobility = other.mobility;
|
||||
time_flag = other.time_flag;
|
||||
extra1 = other.extra1;
|
||||
extra2 = other.extra2;
|
||||
spec1 = other.spec1;
|
||||
spec2 = other.spec2;
|
||||
spec_enc_code = other.spec_enc_code;
|
||||
time_code = other.time_code;
|
||||
monster_time = other.monster_time;
|
||||
personality = other.personality;
|
||||
special_on_kill = other.special_on_kill;
|
||||
facial_pic = other.facial_pic;
|
||||
*this = scenario.scen_monsters[number];
|
||||
active = 1; // TODO: Is this right?
|
||||
if(spec_skill == 11) picture_num = 0;
|
||||
m_health /= (univ.party.stuff_done[306][7]) ? 2 : 1;
|
||||
m_health *= univ.difficulty_adjust();
|
||||
health = m_health;
|
||||
ap = 0;
|
||||
if((mu > 0 || cl > 0))
|
||||
max_mp = mp = 12 * level;
|
||||
else max_mp = mp = 0;
|
||||
m_morale = 10 * level;
|
||||
if(level >= 20) m_morale += 10 * (level - 20);
|
||||
morale = m_morale;
|
||||
direction = 0;
|
||||
for(int i = 0; i < 15; i++) status[i] = 0;
|
||||
attitude = start_attitude; // TODO: Is this right?
|
||||
cur_loc = start_loc;
|
||||
target = 6; // No target
|
||||
return *this;
|
||||
}
|
||||
|
@@ -185,7 +185,6 @@ public:
|
||||
class cCreature : public cMonster {
|
||||
public:
|
||||
using cMonster::operator=;
|
||||
cMonster m_d; // TODO: Delete this member in favour of the inherited fields
|
||||
unsigned long id;
|
||||
m_num_t number; // TODO: This appears to be a duplicate of cMonster::m_num (ie it's used for the same thing)
|
||||
short active, attitude;
|
||||
@@ -206,6 +205,8 @@ public:
|
||||
|
||||
cCreature& operator = (legacy::creature_data_type old);
|
||||
cCreature& operator = (legacy::creature_start_type old);
|
||||
cCreature& operator = (const cCreature& other);
|
||||
//cCreature& operator = (const cMonster& other);
|
||||
};
|
||||
|
||||
std::ostream& operator << (std::ostream& out, eStatus& e);
|
||||
|
@@ -798,3 +798,21 @@ cCurTown::cCurTown(){
|
||||
for(int j = 0; j < 64; j++)
|
||||
fields[i][j] = 0L;
|
||||
}
|
||||
extern cScenario scenario;
|
||||
short cUniverse::difficulty_adjust() {
|
||||
short party_level = 0;
|
||||
short adj = 1;
|
||||
|
||||
for (short i = 0; i < 6; i++)
|
||||
if (party[i].main_status == 1)
|
||||
party_level += party[i].level;
|
||||
|
||||
if ((scenario.difficulty <= 0) && (party_level >= 60))
|
||||
adj++;
|
||||
if ((scenario.difficulty <= 1) && (party_level >= 130))
|
||||
adj++;
|
||||
if ((scenario.difficulty <= 2) && (party_level >= 210))
|
||||
adj++;
|
||||
|
||||
return adj;
|
||||
}
|
||||
|
@@ -139,6 +139,7 @@ public:
|
||||
|
||||
void append(legacy::stored_town_maps_type& old);
|
||||
void append(legacy::stored_outdoor_maps_type& old);
|
||||
short difficulty_adjust();
|
||||
};
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user