Flesh out acid as a real damage type

This commit is contained in:
2025-05-08 18:17:18 -05:00
parent 01608064f2
commit 005d40806c
12 changed files with 54 additions and 28 deletions

View File

@@ -595,7 +595,7 @@ void writeMonstersToXml(ticpp::Printer&& data, cScenario& scenario) {
data.CloseElement("attacks");
data.OpenElement("immunity");
for(int i = 0; i < 8; i++) {
for(int i = 0; i < int(eDamageType::SPECIAL); i++) {
eDamageType dmg = eDamageType(i);
if(monst.resist[dmg] != 100)
data.PushElement(boost::lexical_cast<std::string>(dmg), monst.resist[dmg]);

View File

@@ -88,6 +88,7 @@ extern rectangle terrain_rects[256];
unsigned char small_what_drawn[64][64];
extern bool small_any_drawn;
// These are at the bottom of edbuttons.png:
static short get_small_icon(ter_num_t ter){
short icon = -1;
switch(scenario.ter_types[ter].special){
@@ -108,6 +109,9 @@ static short get_small_icon(ter_num_t ter){
case eDamageType::POISON:
icon = 17;
break;
case eDamageType::ACID:
icon = 24; // green with black spots, doesn't seem to be used elsewhere
break;
case eDamageType::MAGIC:
icon = 20;
break;

View File

@@ -221,6 +221,7 @@ static void set_pattern(cTilemap& map, const effect_pat_type& pat) {
case eDamageType::WEAPON: clr = Colours::MAROON; break;
case eDamageType::FIRE: clr = Colours::RED; break;
case eDamageType::POISON: clr = Colours::GREEN; break;
case eDamageType::ACID: clr = Colours::LIGHT_GREEN; break; // Distinct enough from green?
case eDamageType::MAGIC: clr = Colours::PURPLE; break;
case eDamageType::UNBLOCKABLE: clr = Colours::LIGHT_BLUE; break;
case eDamageType::COLD: clr = Colours::BLUE; break;
@@ -975,8 +976,8 @@ short choose_field_type(short cur, cDialog* parent, bool includeSpec) {
}
pic_num_t choose_damage_type(short cur, cDialog* parent, bool allow_spec) {
static const char*const damageNames[] = {"Weapon", "Fire", "Poison", "Magic", "Weird", "Cold", "Undead", "Demon", "Unblockable"};
static const std::vector<pic_num_t> pics = {3,0,2,1,5,4,3,3,1};
static const char*const damageNames[] = {"Weapon", "Fire", "Poison", "Magic", "Weird", "Cold", "Undead", "Demon", "Acid", "Unblockable"};
static const std::vector<pic_num_t> pics = {3,0,2,1,5,4,3,3,6,1};
short prev = cur;
if(cur < 0 || cur >= pics.size()) cur = 0;
cPictChoice pic_dlg(pics.begin(), pics.end() - !allow_spec, PIC_BOOM, parent);