Several small bugfixes
- Fix incorrect dexterity cost - Fix disease working only on dead PCs - Fix Steal Food only activating in monster-on-monster combat - Clear town population when entering a new town This should avoid the issue with monsters from one town overflowing into another
This commit is contained in:
@@ -2881,12 +2881,12 @@ void monster_attack(short who_att,iLiving* target) {
|
||||
case eMonstAbil::DRAIN_XP: add_string_to_buf(" Drains life!"); break;
|
||||
case eMonstAbil::KILL: add_string_to_buf(" Killing touch!"); break;
|
||||
case eMonstAbil::STEAL_FOOD:
|
||||
if(pc_target != nullptr) continue; // Can't use this against other monsters.
|
||||
if(pc_target == nullptr) continue; // Can't use this against other monsters.
|
||||
add_string_to_buf(" Steals food!");
|
||||
snd = 26;
|
||||
break;
|
||||
case eMonstAbil::STEAL_GOLD:
|
||||
if(pc_target != nullptr) continue; // Can't use this against other monsters.
|
||||
if(pc_target == nullptr) continue; // Can't use this against other monsters.
|
||||
add_string_to_buf(" Steals gold!");
|
||||
break; // TODO: Pick a sound
|
||||
case eMonstAbil::FIELD: break; // TODO: Invent messages?
|
||||
|
||||
@@ -238,15 +238,9 @@ void start_town_mode(short which_town, short entry_dir) {
|
||||
}
|
||||
|
||||
if(!monsters_loaded) {
|
||||
univ.town.monst.clear();
|
||||
for(short i = 0; i < univ.town->creatures.size(); i++){
|
||||
if(univ.town->creatures[i].number == 0) {
|
||||
if(i >= univ.town.monst.size()) continue;
|
||||
univ.town.monst[i].active = 0;
|
||||
univ.town.monst[i].number = 0;
|
||||
univ.town.monst[i].time_flag = eMonstTime::ALWAYS;
|
||||
univ.town.monst[i].cur_loc.x = 80;
|
||||
}
|
||||
else {
|
||||
if(univ.town->creatures[i].number > 0) {
|
||||
// First set up the values.
|
||||
cTownperson& preset = univ.town->creatures[i];
|
||||
univ.town.monst.assign(i, preset, univ.scenario.scen_monsters[preset.number], univ.party.easy_mode, univ.difficulty_adjust());
|
||||
|
||||
@@ -183,7 +183,7 @@ void cPlayer::dumbfound(int how_much) {
|
||||
}
|
||||
|
||||
void cPlayer::disease(int how_much) {
|
||||
if(is_alive()) return;
|
||||
if(!is_alive()) return;
|
||||
short r1 = get_ran(1,1,100);
|
||||
if(r1 < level * 2)
|
||||
how_much -= 2;
|
||||
|
||||
@@ -31,7 +31,7 @@ std::map<eSkill,short> skill_max = {
|
||||
{eSkill::LUCK,20},
|
||||
};
|
||||
std::map<eSkill,short> skill_g_cost = {
|
||||
{eSkill::STRENGTH,50}, {eSkill::DEXTERITY,503}, {eSkill::INTELLIGENCE,50},
|
||||
{eSkill::STRENGTH,50}, {eSkill::DEXTERITY,50}, {eSkill::INTELLIGENCE,50},
|
||||
{eSkill::EDGED_WEAPONS,40}, {eSkill::BASHING_WEAPONS,40}, {eSkill::POLE_WEAPONS,40},
|
||||
{eSkill::THROWN_MISSILES,30}, {eSkill::ARCHERY,50}, {eSkill::DEFENSE,40},
|
||||
{eSkill::MAGE_SPELLS,250}, {eSkill::PRIEST_SPELLS,250}, {eSkill::MAGE_LORE,25},
|
||||
|
||||
Reference in New Issue
Block a user