--- src/cave.c.orig Sun Jul 20 17:10:15 2003 +++ src/cave.c Mon Jul 21 21:35:15 2003 @@ -1497,6 +1497,20 @@ case GRAPHICS_NONE: case GRAPHICS_IBM: { + if (player_symbols && p_ptr->body_monster == 0) + { + player_race *rp_ptr = &race_info[p_ptr->prace]; + player_race_mod *rmp_ptr = &race_mod_info[p_ptr->pracem]; + + if (rp_ptr->d_attr != MEGO_CHAR_ANY) + a = rp_ptr->d_attr; + if (rp_ptr->d_char != MEGO_CHAR_ANY) + c = rp_ptr->d_char; + if (rmp_ptr->d_attr != MEGO_CHAR_ANY) + a = rmp_ptr->d_attr; + if (rmp_ptr->d_char != MEGO_CHAR_ANY) + c = rmp_ptr->d_char; + } if (player_char_health) { int percent = p_ptr->chp * 10 / p_ptr->mhp; @@ -2007,6 +2021,22 @@ /* Get the "player" char */ c = r_ptr->d_char; + + /* Mega-Hack -- Apply modifications to player graphics XXX XXX XXX */ + if (player_symbols && p_ptr->body_monster == 0) + { + player_race *rp_ptr = &race_info[p_ptr->prace]; + player_race_mod *rmp_ptr = &race_mod_info[p_ptr->pracem]; + + if (rp_ptr->d_attr != MEGO_CHAR_ANY) + a = rp_ptr->d_attr; + if (rp_ptr->d_char != MEGO_CHAR_ANY) + c = rp_ptr->d_char; + if (rmp_ptr->d_attr != MEGO_CHAR_ANY) + a = rmp_ptr->d_attr; + if (rmp_ptr->d_char != MEGO_CHAR_ANY) + c = rmp_ptr->d_char; + } /* Save the info */ *ap = a; --- src/init1.c.orig Sun Jul 20 17:10:16 2003 +++ src/init1.c Mon Jul 21 21:35:15 2003 @@ -2313,6 +2313,36 @@ continue; } + /* Process 'g' for "graphics" (one line only) */ + if ((buf[0] == 'R') && (buf[2] == 'g')) + { + char sym; + int tmp; + + /* Paranoia */ + if (!buf[4]) return (1); + if (!buf[5]) return (1); + if (!buf[6]) return (1); + + /* Extract the char */ + if (buf[4] != '*') sym = buf[4]; + else sym = MEGO_CHAR_ANY; + + /* Extract the attr */ + if (buf[6] != '*') tmp = color_char_to_attr(buf[6]); + else tmp = MEGO_CHAR_ANY; + + /* Paranoia */ + if (tmp < 0) return (1); + + /* Save the values */ + rp_ptr->d_char = sym; + rp_ptr->d_attr = tmp; + + /* Next... */ + continue; + } + /* Process 'N' for "New/Number/Name" */ if ((buf[0] == 'S') && (buf[2] == 'N')) { @@ -2720,6 +2750,36 @@ if (buf[4] == 'A') rmp_ptr->pclass[z] |= choice[z]; else rmp_ptr->mclass[z] |= choice[z]; } + + /* Next... */ + continue; + } + + /* Process 'g' for "graphics" (one line only) */ + if ((buf[0] == 'S') && (buf[2] == 'g')) + { + char sym; + int tmp; + + /* Paranoia */ + if (!buf[4]) return (1); + if (!buf[5]) return (1); + if (!buf[6]) return (1); + + /* Extract the char */ + if (buf[4] != '*') sym = buf[4]; + else sym = MEGO_CHAR_ANY; + + /* Extract the attr */ + if (buf[6] != '*') tmp = color_char_to_attr(buf[6]); + else tmp = MEGO_CHAR_ANY; + + /* Paranoia */ + if (tmp < 0) return (1); + + /* Save the values */ + rmp_ptr->d_char = sym; + rmp_ptr->d_attr = tmp; /* Next... */ continue; --- src/types.h.orig Sun Jul 20 17:10:16 2003 +++ src/types.h Mon Jul 21 21:35:15 2003 @@ -1185,6 +1185,9 @@ u32b oesp[PY_MAX_LEVEL + 1]; s16b opval[PY_MAX_LEVEL + 1]; + byte d_attr; /* Default player race attribute */ + char d_char; /* Deafult player race character */ + char skill_basem[MAX_SKILLS]; u32b skill_base[MAX_SKILLS]; char skill_modm[MAX_SKILLS]; @@ -1263,6 +1266,9 @@ u32b oflags5[PY_MAX_LEVEL + 1]; u32b oesp[PY_MAX_LEVEL + 1]; s16b opval[PY_MAX_LEVEL + 1]; + + byte d_attr; /* Default player race mod attribute */ + char d_char; /* Deafult player race mod character */ byte g_attr; /* Overlay graphic attribute */ char g_char; /* Overlay graphic character */ --- lib/edit/p_info.txt.orig Sun Jul 20 17:10:14 2003 +++ lib/edit/p_info.txt Fri Aug 22 21:21:13 2003 @@ -850,6 +850,7 @@ # R:F:flags # R:k:value:modifier:skill name # R:b:level:ability +# R:g:char:attr I: @@ -863,6 +864,7 @@ R:M:14:6:72:6:180:25:66:4:150:20 R:E:1:1:1:2:1:1 R:C:Warrior | Archer | Mage | Rogue | Priest | Loremaster +R:g:*:* R:N:1:Half-Elf R:D:A crossbreed of elf and human, they get the best of the two races. @@ -873,6 +875,7 @@ R:E:1:1:1:2:1:1 R:C:Warrior | Archer | Mage | Rogue | Priest | Loremaster R:G:ELF +R:g:h:W R:N:2:Elf R:D:Elves are the first born, the Eldar. @@ -887,6 +890,7 @@ R:F:RES_LITE | R:C:Warrior | Archer | Mage | Priest | Loremaster R:G:ELF +R:g:h:W R:N:3:Hobbit R:D:An old but quiet race related to humans. @@ -902,6 +906,7 @@ R:F:SUST_DEX | R:C:Warrior | Archer | Mage | Rogue | Loremaster R:k:+0:+300:Sling-mastery +R:g:h:s R:N:4:Gnome R:D:Related to dwarves, Gnomes are between Dwarves and Hobbits in size. @@ -915,6 +920,7 @@ R:R:1:0 R:F:FREE_ACT | R:C:Warrior | Mage | Rogue +R:g:h:U R:N:5:Dwarf R:D:The children of Aule, a strong but small race. @@ -929,6 +935,7 @@ R:F:RES_BLIND | R:C:Warrior | Priest R:k:+0:+200:Axe-mastery +R:g:h:U R:N:6:Orc R:D:Quite strong but not very smart. @@ -941,6 +948,7 @@ R:R:1:0 R:F:RES_DARK | R:C:Warrior | Archer | Rogue | Priest +R:g:o:U R:N:7:Troll R:D:They can bear the light of the sun. @@ -956,6 +964,7 @@ R:R:15:0 R:F:REGEN | R:C:Warrior +R:g:T:g R:N:8:Dunadan R:D:The greatest of the Edain, humans in all respects but @@ -968,6 +977,7 @@ R:R:1:0 R:F:SUST_CON | REGEN | R:C:Warrior | Archer | Mage | Rogue | Priest | Loremaster +R:g:*:* R:N:9:High-Elf R:D:Elves are the first born, the Eldar. @@ -983,6 +993,7 @@ R:F:RES_LITE | R:G:ELF R:C:Warrior | Archer | Mage | Priest | Loremaster +R:g:h:w R:N:10:Half-Ogre R:D:A crossbreed between a human and an ogre. @@ -996,6 +1007,7 @@ R:R:1:0 R:F:SUST_STR | RES_DARK | R:C:Warrior | Priest +R:g:O:o R:N:11:Beorning R:D:A race of men shapeshifters. @@ -1012,6 +1024,7 @@ R:F:STR | R:k:+1000:+1000:Bearform-combat R:C:Warrior | Rogue | Loremaster +R:g:q:u R:N:12:Kobold R:D:A weaker kind of goblin, related to orcs. @@ -1024,6 +1037,7 @@ R:R:1:0 R:F:RES_POIS | R:C:Warrior | Archer | Rogue +R:g:k:G R:N:13:Petty-Dwarf R:D:A nearly extinct subrace of dwarves. @@ -1037,6 +1051,7 @@ R:R:1:0 R:F:RES_DARK | RES_DISEN | R:C:Warrior | Rogue +R:g:h:o R:N:14:Dark-Elf R:D:Elves are the first born, the Eldar. @@ -1055,6 +1070,7 @@ R:C:Warrior | Archer | Mage | Rogue | Priest R:G:ELF R:k:+0:+200:Magic +R:g:h:D R:N:15:Ent R:D:Guardian of the forests of Middle-earth, summoned by Yavanna before @@ -1079,6 +1095,7 @@ R:k:+0:+200:Barehand-combat R:k:+0:+600:Boulder-throwing R:b:1:Tree walking +R:g:#:G R:N:16:RohanKnight R:D:Humans from the land of Rohan, riding the great Mearas. @@ -1111,6 +1128,7 @@ R:F:SPEED | R:C:Warrior | Priest R:k:+0:+200:Weaponmastery +R:g:*:* R:N:17:Thunderlord R:D:A thunderlord is a Great Eagle of Manwe, ridden by a Maia of Manwe. @@ -1138,6 +1156,7 @@ R:R:45:0 R:F:IM_ELEC | R:C:Warrior | Mage | Archer | Priest +R:g:B:g R:N:18:DeathMold R:D:A pure mass of evilness, DeathMolds cannot move, but they have much more @@ -1154,6 +1173,7 @@ R:F:RES_NETHER | RES_NEXUS | R:C:Mage | Priest R:k:+0:+200:Necromancy +R:g:m:D R:N:19:Yeek R:D:The weakest of all the races, bad at everything except gaining levels quickly. @@ -1163,6 +1183,7 @@ R:M:10:4:40:5:50:10:35:4:45:10 R:E:1:1:1:2:1:1 R:C:Warrior | Archer | Mage | Rogue | Priest | Loremaster +R:g:y:u R:N:20:Wood-Elf R:D:Elves are the first born, the Eldar. @@ -1179,6 +1200,7 @@ R:G:ELF R:k:+0:+200:Archery R:b:1:Tree walking +R:g:h:G R:N:21:Maia R:D:An old race, dating from before the creation of Arda, the Maiar were @@ -1210,6 +1232,7 @@ R:R:48:1 R:F:STR | INT | WIS | DEX | CON | CHR | R:C:Warrior | Archer | Mage +R:g:*:* ############################################################################## @@ -1231,6 +1254,7 @@ # S:F:flags # S:k:value:modifier:skill name # S:b:level:ability +# S:g:char:attr # Make the parser actually work :) I: @@ -1246,6 +1270,7 @@ S:A:Orc | Troll | Dunadan | High-Elf | Half-Ogre | Beorning | S:A:Kobold | Petty-Dwarf | Dark-Elf | Ent | RohanKnight | Thunderlord | S:A:DeathMold | Yeek | Wood-Elf | Maia | +S:g:*:* # Just a place holder, the actualy setting are done with corruptions, see # corrupt.lua and player.lua @@ -1263,6 +1288,7 @@ S:C:A:Mage S:O:70:0:5d3 S:O:70:32:2d3 +S:g:V:* S:N:2:Spectre S:D:B:Spectres only partially exist in the mortal world and so they can @@ -1281,6 +1307,7 @@ S:F:SEE_INVIS | HOLD_LIFE | S:F:SLOW_DIGEST | RES_COLD | RES_POIS | RES_NETHER | S:O:70:32:2d3 +S:g:G:* S:N:3:Skeleton S:D:B:Yet an other kind of undead. Their physical 'body' is not very vulnerable @@ -1300,6 +1327,7 @@ S:R:10:0 S:F:RES_COLD | S:O:70:32:2d3 +S:g:s:* S:N:4:Zombie S:D:B:Strong and dumb is a zombie. @@ -1319,6 +1347,7 @@ S:R:5:0 S:F:RES_COLD | S:O:70:32:2d3 +S:g:z:* S:N:5:Barbarian S:D:A:Hardy members of their race they are strong fighters but poor spellcasters. @@ -1331,6 +1360,7 @@ S:C:F:Mage S:R:10:0 S:F:RES_FEAR | +S:g:*:* S:N:6:Hermit S:D:A:Through years of isolation hermits can manage to increase their mana @@ -1344,6 +1374,7 @@ S:A:Dunadan | High-Elf | Petty-Dwarf | Dark-Elf | Ent | RohanKnight | S:A:Thunderlord | DeathMold | Yeek | Wood-Elf | Maia | S:C:F:Warrior | Archer +S:g:*:* S:N:8:LostSoul S:D:A:In some very rare occasions souls can come back from the Halls of Mandos. @@ -1360,7 +1391,7 @@ S:A:Kobold | Petty-Dwarf | Dark-Elf | Ent | RohanKnight | Thunderlord | S:A:DeathMold | Yeek | Wood-Elf | Maia | S:O:70:32:25d2 -S:O:70:12:25d3 +S:g:*:* # Used for corruptions that can change your subrace S:N:9:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx @@ -1370,6 +1401,12 @@ S:P:0:0:0 S:M:0:0:0:0:0:0:0:0:0:0 S:E:0:0:0:0:0:0 +# Gross, Evil and Disgusting Hack(TM): This depends on the assumption that +# the only subrace that can be changed to is Vampire. Ideally, the info +# stored in the save file about this special subrace should include the +# d_attr and d_char fields copied into it by switch_subrace(), but that +# would change the save file format. +S:g:V:* ##############################################################################