Various damage-related changes
- Rename unblockable damage to "weird" and special damage to "unblockable" - Monsters now support immunity to any damage type - Fix using wrong damage type for bonus damage in PC-on-PC attacks - Forbid use of unblockable (formerly special) damage by the scenario designer, except in special nodes; if hacked in, it's replaced with weird (formerly unblockable) damage. - Fix damage amount text in animations (both single-frame booms and fully animated booms) Changed the following things from weird (formerly unblockable) damage to unblockable (formerly special) damage: - Starvation - Debug 'K' command - Damage from items forcibly ending flight - Damage from bashing doors
This commit is contained in:
@@ -1394,15 +1394,7 @@ static void readMonstersFromXml(ticpp::Document&& data, cScenario& scenario) {
|
||||
Iterator<Element> resist;
|
||||
for(resist = resist.begin(monst.Get()); resist != resist.end(); resist++) {
|
||||
resist->GetValue(&type);
|
||||
if(type == "fire") {
|
||||
resist->GetText(&the_mon.fire_res);
|
||||
} else if(type == "cold") {
|
||||
resist->GetText(&the_mon.cold_res);
|
||||
} else if(type == "poison") {
|
||||
resist->GetText(&the_mon.poison_res);
|
||||
} else if(type == "magic") {
|
||||
resist->GetText(&the_mon.magic_res);
|
||||
} else if(type == "all") {
|
||||
if(type == "all") {
|
||||
resist->GetText(&val);
|
||||
if(val == "true")
|
||||
the_mon.invuln = true;
|
||||
@@ -1410,7 +1402,12 @@ static void readMonstersFromXml(ticpp::Document&& data, cScenario& scenario) {
|
||||
resist->GetText(&val);
|
||||
if(val == "true")
|
||||
the_mon.mindless = true;
|
||||
} else throw xBadNode(type, resist->Row(), resist->Column(), fname);
|
||||
} else try {
|
||||
eDamageType dmg = boost::lexical_cast<eDamageType>(type);
|
||||
resist->GetText(&the_mon.resist[dmg]);
|
||||
} catch(boost::bad_lexical_cast x) {
|
||||
throw xBadNode(type, resist->Row(), resist->Column(), fname);
|
||||
}
|
||||
}
|
||||
} else if(type == "loot") {
|
||||
std::set<std::string> reqs = {"type", "chance"};
|
||||
|
Reference in New Issue
Block a user