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:
@@ -498,14 +498,11 @@ static void writeMonstersToXml(ticpp::Printer&& data) {
|
||||
data.CloseElement("attacks");
|
||||
|
||||
data.OpenElement("immunity");
|
||||
if(monst.magic_res != 100)
|
||||
data.PushElement("magic", monst.magic_res);
|
||||
if(monst.fire_res != 100)
|
||||
data.PushElement("fire", monst.fire_res);
|
||||
if(monst.cold_res != 100)
|
||||
data.PushElement("cold", monst.cold_res);
|
||||
if(monst.poison_res != 100)
|
||||
data.PushElement("poison", monst.poison_res);
|
||||
for(int i = 0; i < 8; i++) {
|
||||
eDamageType dmg = eDamageType(i);
|
||||
if(monst.resist[dmg] != 100)
|
||||
data.PushElement(boost::lexical_cast<std::string>(dmg), monst.resist[dmg]);
|
||||
}
|
||||
if(monst.mindless) data.PushElement("fear", true);
|
||||
if(monst.invuln) data.PushElement("all", true);
|
||||
data.CloseElement("immunity");
|
||||
|
Reference in New Issue
Block a user