From 60e5b6179beecd939a3e71d3bc0d8384a94f35a3 Mon Sep 17 00:00:00 2001 From: Martin Read Date: Sun, 16 Mar 2014 21:06:43 +0000 Subject: [PATCH] Finished the merge! Victrix Abyssi now incorporates approximately all of the engineering improvements I made over the course of writing Obumbrata et Velata. --- MANIFEST | 11 ++++- Makefile | 10 ++-- cave.cc | 16 +++---- core.hh | 14 +++--- default.permobjs | 95 +++++++++++++++++++++++++++++++----- default.permons | 127 ++++++++++++++++++++++++++++++++++++++++++++++++- display-nc.cc | 4 +- dungeon.cc | 2 +- log.cc | 40 ++++++++-------- map.cc | 4 +- mapgen.hh | 6 +-- monsters.cc => mon1.cc | 0 objects.cc => obj1.cc | 0 13 files changed, 264 insertions(+), 65 deletions(-) rename monsters.cc => mon1.cc (100%) rename objects.cc => obj1.cc (100%) diff --git a/MANIFEST b/MANIFEST index dadebd6..58af5bd 100644 --- a/MANIFEST +++ b/MANIFEST @@ -7,13 +7,16 @@ man/victrix-abyssi.6 cave.cc combat.cc combat.hh +combo.cc coord.cc coord.hh core.hh +deeds.cc default.permobjs default.permons display.hh display-nc.cc +dungeon.cc fov.cc fov.hh log.cc @@ -21,13 +24,15 @@ main.cc map.cc map.hh mapgen.hh +mon1.cc mon2.cc -monsters.cc +mon3.cc monsters.hh notes.txt notify.hh notify-local-tty.cc -objects.cc +obj1.cc +obj2.cc objects.hh permobj.hh permon.hh @@ -37,7 +42,9 @@ pmon_comp pobj_comp rng.cc rng.hh +role.cc shrine.cc +skills.cc sorcery.cc sorcery.hh u.cc diff --git a/Makefile b/Makefile index ca0b39c..4f04799 100644 --- a/Makefile +++ b/Makefile @@ -9,13 +9,13 @@ vpath %.o . GENERATED_OBJS:=permobj.o permons.o GENERATED_SOURCE:=permobj.cc pobj_id.hh permons.cc pmon_id.hh GENERATED_MAKES:=dirs.mk features.mk -HANDWRITTEN_OBJS:=cave.o combat.o combo.o coord.o deeds.o display-nc.o dungeon.o fov.o log.o main.o map.o monsters.o mon2.o mon3.o notify-local-tty.o objects.o obj2.o pmon2.o rng.o role.o shrine.o skills.o sorcery.o u.o util.o +HANDWRITTEN_OBJS:=cave.o combat.o combo.o coord.o deeds.o display-nc.o dungeon.o fov.o log.o main.o map.o mon1.o mon2.o mon3.o notify-local-tty.o obj1.o obj2.o pmon2.o rng.o role.o shrine.o skills.o sorcery.o u.o util.o OBJS:=$(GENERATED_OBJS) $(HANDWRITTEN_OBJS) GAME:=victrix-abyssi MAJVERS:=0 MINVERS:=9 -PATCHVERS:=1 -COMMON_CFLAGS:=-Wall -Wwrite-strings -Wunreachable-code -Wformat -Werror=format-security -fstack-protector --param=ssp-buffer-size=4 -DMAJVERS=$(MAJVERS) -DMINVERS=$(MINVERS) -DPATCHVERS=$(PATCHVERS)-std=gnu11 -D_FORTIFY_SOURCE=2 -I$(srcdir) +PATCHVERS:=2 +COMMON_CFLAGS:=-Wall -Wwrite-strings -Wunreachable-code -Wformat -Werror=format-security -fstack-protector --param=ssp-buffer-size=4 -DMAJVERS=$(MAJVERS) -DMINVERS=$(MINVERS) -DPATCHVERS=$(PATCHVERS) -std=gnu11 -D_FORTIFY_SOURCE=2 -I$(srcdir) COMMON_CXXFLAGS:=-Wall -Wwrite-strings -Wno-unused-but-set-variable -Wredundant-decls -Wunreachable-code -Wformat -Werror=format-security -fstack-protector --param=ssp-buffer-size=4 -DMAJVERS=$(MAJVERS) -DMINVERS=$(MINVERS) -DPATCHVERS=$(PATCHVERS) -std=gnu++11 -D_FORTIFY_SOURCE=2 -I$(srcdir) PRODUCTION_CFLAGS:=$(COMMON_CFLAGS) -O2 DEVELOPMENT_CFLAGS:=$(COMMON_CFLAGS) -g -Werror @@ -111,7 +111,7 @@ main.o: $(srcdir)/main.cc $(srcdir)/combat.hh $(srcdir)/$(GAME).hh $(srcdir)/mon map.o: $(srcdir)/map.cc $(srcdir)/$(GAME).hh $(srcdir)/map.hh $(srcdir)/core.hh $(srcdir)/notify.hh $(srcdir)/objects.hh ./pobj_id.hh ./pmon_id.hh $(srcdir)/player.hh -monsters.o: $(srcdir)/monsters.cc $(srcdir)/$(GAME).hh $(srcdir)/monsters.hh $(srcdir)/notify.hh $(srcdir)/objects.hh ./pobj_id.hh ./pmon_id.hh $(srcdir)/player.hh +mon1.o: $(srcdir)/mon1.cc $(srcdir)/$(GAME).hh $(srcdir)/monsters.hh $(srcdir)/notify.hh $(srcdir)/objects.hh ./pobj_id.hh ./pmon_id.hh $(srcdir)/player.hh mon2.o: $(srcdir)/mon2.cc $(srcdir)/$(GAME).hh $(srcdir)/sorcery.hh $(srcdir)/monsters.hh $(srcdir)/notify.hh $(srcdir)/objects.hh ./pobj_id.hh ./pmon_id.hh $(srcdir)/player.hh @@ -125,7 +125,7 @@ permons.o: ./permons.cc $(srcdir)/core.hh $(srcdir)/permon.hh pmon2.o: $(srcdir)/pmon2.cc $(srcdir)/$(GAME).hh $(srcdir)/notify.hh $(srcdir)/monsters.hh ./pobj_id.hh ./pmon_id.hh $(srcdir)/player.hh -objects.o: $(srcdir)/objects.cc $(srcdir)/$(GAME).hh $(srcdir)/notify.hh $(srcdir)/objects.hh $(srcdir)/monsters.hh ./pobj_id.hh ./pmon_id.hh $(srcdir)/player.hh +obj1.o: $(srcdir)/obj1.cc $(srcdir)/$(GAME).hh $(srcdir)/notify.hh $(srcdir)/objects.hh $(srcdir)/monsters.hh ./pobj_id.hh ./pmon_id.hh $(srcdir)/player.hh obj2.o: $(srcdir)/obj2.cc $(srcdir)/$(GAME).hh $(srcdir)/notify.hh $(srcdir)/objects.hh $(srcdir)/monsters.hh ./pobj_id.hh ./pmon_id.hh $(srcdir)/player.hh diff --git a/cave.cc b/cave.cc index c3c12df..c93e450 100644 --- a/cave.cc +++ b/cave.cc @@ -67,7 +67,7 @@ void build_level_cave(Level *l) { run_random_walk_unbounded(l, c, excavation_write, walk_data, LEVGEN_WALK_CELLS); } - catch (Obumb_levgen_excep p) + catch (Game_levgen_excep p) { DEBUG_ARBITRARY(p.str); } @@ -98,7 +98,7 @@ void build_level_cave(Level *l) { run_random_walk(l, c, excavation_write, walk_data, pool_size); } - catch (Obumb_levgen_excep p) + catch (Game_levgen_excep p) { DEBUG_ARBITRARY(p.str); } @@ -123,7 +123,7 @@ void build_level_intrusions(Level *l) { run_random_walk_unbounded(l, c, excavation_write, walk_data, LEVGEN_WALK_CELLS); } - catch (Obumb_levgen_excep p) + catch (Game_levgen_excep p) { DEBUG_ARBITRARY(p.str); } @@ -145,7 +145,7 @@ void build_level_pits(Level *l, Terrain pit_type) { run_random_walk_unbounded(l, c, excavation_write, walk_data, LEVGEN_WALK_CELLS); } - catch (Obumb_levgen_excep p) + catch (Game_levgen_excep p) { DEBUG_ARBITRARY(p.str); } @@ -154,7 +154,7 @@ void build_level_pits(Level *l, Terrain pit_type) { run_random_walk_unbounded(l, c, excavation_write, walk_data, LEVGEN_WALK_CELLS); } - catch (Obumb_levgen_excep p) + catch (Game_levgen_excep p) { DEBUG_ARBITRARY(p.str); } @@ -163,7 +163,7 @@ void build_level_pits(Level *l, Terrain pit_type) { run_random_walk_unbounded(l, c, excavation_write, walk_data, LEVGEN_WALK_CELLS); } - catch (Obumb_levgen_excep p) + catch (Game_levgen_excep p) { DEBUG_ARBITRARY(p.str); } @@ -172,7 +172,7 @@ void build_level_pits(Level *l, Terrain pit_type) { run_random_walk_unbounded(l, c, excavation_write, walk_data, LEVGEN_WALK_CELLS); } - catch (Obumb_levgen_excep p) + catch (Game_levgen_excep p) { DEBUG_ARBITRARY(p.str); } @@ -182,7 +182,7 @@ void build_level_pits(Level *l, Terrain pit_type) { run_random_walk_unbounded(l, c, excavation_write, walk_data, LEVGEN_WALK_CELLS); } - catch (Obumb_levgen_excep p) + catch (Game_levgen_excep p) { DEBUG_ARBITRARY(p.str); } diff --git a/core.hh b/core.hh index cecf024..a9ce662 100644 --- a/core.hh +++ b/core.hh @@ -252,22 +252,22 @@ enum Role_id { #define LAST_ROLE (Role_thanatophile) #define NUM_ROLES (1 + LAST_ROLE) -#define OBUMBRATA_MAGIC_NUMBER 0x0b756d62 +#define SAVEFILE_MAGIC_NUMBER 0x76696374 extern void game_cleanup(void); -struct Obumb_sysexcep +struct Game_sysexcep { int err; // errno value - Obumb_sysexcep() = delete; - Obumb_sysexcep(int e) : err(e) { } + Game_sysexcep() = delete; + Game_sysexcep(int e) : err(e) { } }; -struct Obumb_dataexcep +struct Game_dataexcep { char const *str; - Obumb_dataexcep() = delete; - Obumb_dataexcep(char const *s) : str(s) { } + Game_dataexcep() = delete; + Game_dataexcep(char const *s) : str(s) { } }; extern bool game_finished; diff --git a/default.permobjs b/default.permobjs index 27e441b..9dc0ef1 100644 --- a/default.permobjs +++ b/default.permobjs @@ -34,10 +34,11 @@ POWER2 0 DEPTH 1 DAMAGEABLE MELEE_WEAPON +DAGGER WEAPON long sword PLURAL long swords -DESC A steel sword of simple but sturdy construction; the blade is three feet long. +DESC The evolution of the cruciform sword in response to ever-heavier plate armour, featuring an unsharpened ricasso to allow its use 'at the half-sword'. RARITY 30 ASCII ')' UTF8 ")" @@ -47,6 +48,37 @@ POWER2 0 DEPTH 4 DAMAGEABLE MELEE_WEAPON +SWORD + +WEAPON windsword +PLURAL windswords +DESC A magic sword imbued with the power of the rushing winds, enabling the wielder to pass safely over such hazards as water, lava, and gaping chasms. +RARITY 80 +ASCII ')' +UTF8 ")" +COLOUR white +POWER 13 +POWER2 0 +DEPTH 10 +DAMAGEABLE +MELEE_WEAPON +NOTIFY_EQUIP +FLIGHT +SWORD + +WEAPON runesword +PLURAL runeswords +DESC An eerily glowing long sword engraved with many strange runes. +RARITY 80 +ASCII ')' +UTF8 ")" +COLOUR l_cyan +POWER 20 +POWER2 0 +DEPTH 12 +DAMAGEABLE +MELEE_WEAPON +SWORD WEAPON mace PLURAL maces @@ -60,19 +92,21 @@ POWER2 0 DEPTH 2 DAMAGEABLE MELEE_WEAPON +BLUDGEON -WEAPON runesword -PLURAL runeswords -DESC An eerily glowing sword engraved with many strange runes. -RARITY 80 +WEAPON spear +PLURAL spears +DESC A blade on a stick. +RARITY 50 ASCII ')' UTF8 ")" -COLOUR l_cyan -POWER 20 +COLOUR brown +POWER 8 POWER2 0 -DEPTH 12 +DEPTH 3 DAMAGEABLE MELEE_WEAPON +POLEARM WEAPON hellglaive PLURAL hellglaives @@ -88,6 +122,8 @@ NOTIFY_EQUIP DAMAGEABLE BREAK_REACT MELEE_WEAPON +DEMONIC +POLEARM WEAPON plague scythe PLURAL plague sycthes @@ -101,6 +137,8 @@ POWER2 0 DEPTH 30 NOTIFY_EQUIP MELEE_WEAPON +DEMONIC +POLEARM WEAPON tormentor's lash PLURAL tormentor's lashes @@ -116,6 +154,8 @@ NOTIFY_EQUIP DAMAGEABLE BREAK_REACT MELEE_WEAPON +DEMONIC +WHIP WEAPON death staff PLURAL death staves @@ -129,6 +169,7 @@ POWER2 0 DEPTH 30 NOTIFY_EQUIP MELEE_WEAPON +BLUDGEON WEAPON staff of fire PLURAL staves of fire @@ -143,6 +184,7 @@ DEPTH 20 DAMAGEABLE ACTIVATABLE MELEE_WEAPON +BLUDGEON WEAPON bow PLURAL bows @@ -156,6 +198,7 @@ POWER2 0 DEPTH 1 DAMAGEABLE RANGED_WEAPON + WEAPON crossbow PLURAL crossbows DESC A crossbow. @@ -277,6 +320,7 @@ POWER 3 POWER2 10 DEPTH 1 DAMAGEABLE +LEATHERY ARMOUR chainmail PLURAL suits of chainmail @@ -325,6 +369,7 @@ POWER 2 POWER2 5 DEPTH 1 DAMAGEABLE +ROBE ARMOUR robe of swiftness PLURAL robes of swiftness @@ -337,6 +382,8 @@ POWER 8 POWER2 0 DEPTH 8 DAMAGEABLE +SPEED +ROBE ARMOUR robe of shadows PLURAL robes of shadows @@ -349,6 +396,7 @@ POWER 14 POWER2 -15 DEPTH 18 DAMAGEABLE +ROBE ARMOUR dragonhide armour PLURAL suits of dragonhide armour @@ -361,6 +409,8 @@ POWER 12 POWER2 10 DEPTH 21 DAMAGEABLE +RES_FIRE +LEATHERY ARMOUR meteoric plate armour PLURAL suits of meteoric plate armour @@ -373,6 +423,7 @@ POWER 18 POWER2 40 DEPTH 27 DAMAGEABLE +RES_FIRE ARMOUR sacred chainmail PLURAL suits of sacred chainmail @@ -408,7 +459,7 @@ UTF8 "[" COLOUR green POWER 3 POWER2 10 -DEPTH 1 +DEPTH 3 DRESS DAMAGEABLE BREAK_REACT @@ -440,6 +491,9 @@ DEPTH 30 NOTIFY_EQUIP DAMAGEABLE BREAK_REACT +RES_POISON +DEMONIC +ROBE ARMOUR lich's robe PLURAL lich's robes @@ -452,6 +506,8 @@ POWER 15 POWER2 0 DEPTH 30 NOTIFY_EQUIP +RES_NECRO +ROBE ARMOUR infernite armour PLURAL suits of infernite armour @@ -464,6 +520,8 @@ POWER 25 POWER2 20 DEPTH 30 NOTIFY_EQUIP +RES_FIRE +DEMONIC # Mr Read would like to note that he invented the following item and its # game mechanics *before* becoming aware of the anime series _Kill la Kill_. @@ -507,6 +565,8 @@ COLOUR l_grey POWER 0 POWER2 0 DEPTH 1 +RES_FIRE +DMG_FIRE RING vampire ring PLURAL vampire rings @@ -518,6 +578,8 @@ COLOUR l_grey POWER 0 POWER2 0 DEPTH 12 +RES_NECRO +DMG_NECRO RING frost ring PLURAL frost rings @@ -529,6 +591,9 @@ COLOUR l_grey POWER 0 POWER2 0 DEPTH 1 +RES_COLD +DMG_COLD +PASS_WATER RING teleport ring PLURAL teleport rings @@ -551,6 +616,8 @@ COLOUR l_grey POWER 0 POWER2 0 DEPTH 15 +RES_POISON +DEMONIC RING protection ring PLURAL protection rings @@ -562,10 +629,11 @@ COLOUR l_grey POWER 0 POWER2 0 DEPTH 15 +PROTECTIVE RING imperial seal PLURAL imperial seals -DESC This rarest and most ancient of magical rings was forged in the days before the Archon Inferni was imprisoned in this dismal place. Of the nature of its power, there are not even rumours. +DESC This rarest and most ancient of magical rings was forged in the days before the Archon Inferni was banished to the Abyss. Of the nature of its power, there are not even rumours. RARITY 100 ASCII '=' UTF8 "=" @@ -582,7 +650,7 @@ RARITY 75 ASCII '%' UTF8 "%" COLOUR brown -POWER 0 +POWER 1500 POWER2 0 DEPTH 1 STACKABLE @@ -594,7 +662,7 @@ RARITY 75 ASCII '%' UTF8 "%" COLOUR yellow -POWER 0 +POWER 1500 POWER2 0 DEPTH 1 STACKABLE @@ -606,7 +674,7 @@ RARITY 85 ASCII '%' UTF8 "%" COLOUR white -POWER 0 +POWER 1500 POWER2 0 DEPTH 1 STACKABLE @@ -622,6 +690,7 @@ POWER 0 POWER2 0 DEPTH 1 STACKABLE +DEMONIC CARRION corpse PLURAL corpses diff --git a/default.permons b/default.permons index 3fc37cd..dd04484 100644 --- a/default.permons +++ b/default.permons @@ -21,6 +21,23 @@ # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +monster adventurer +ascii '@' +utf8 "@" +desc A typical morally stunted specimen of the dungeoneering class. +rarity 100 +power 1 +hp 1 +mtohit 0 +mdam 1 +defence 1 +exp 0 +speed 1 +STUPID +MADE_OF_MEAT +CONTAINS_BLOOD +LEAVES_CORPSE + monster newt ascii 'n' utf8 "n" @@ -37,6 +54,9 @@ speed 0 STUPID SMALL QUADRUPED +MADE_OF_MEAT +CONTAINS_BLOOD +LEAVES_CORPSE # rodents monster rat @@ -55,6 +75,9 @@ speed 2 STUPID SMALL QUADRUPED +MADE_OF_MEAT +CONTAINS_BLOOD +LEAVES_CORPSE # canids monster wolf @@ -72,6 +95,9 @@ defence 6 exp 15 speed 2 QUADRUPED +MADE_OF_MEAT +CONTAINS_BLOOD +LEAVES_CORPSE # Serpents monster snake @@ -89,6 +115,9 @@ experience 40 speed 2 STUPID SERPENTINE +MADE_OF_MEAT +CONTAINS_BLOOD +LEAVES_CORPSE # thugs monster thug @@ -105,6 +134,9 @@ defence 4 experience 5 speed 1 HUMANOID +MADE_OF_MEAT +CONTAINS_BLOOD +LEAVES_CORPSE monster goon desc Really good at pushing people's faces through the backs of their heads. @@ -120,6 +152,9 @@ defence 8 experience 10 speed 1 HUMANOID +MADE_OF_MEAT +CONTAINS_BLOOD +LEAVES_CORPSE # hunters monster hunter @@ -140,6 +175,9 @@ experience 50 speed 1 ARCHER HUMANOID +MADE_OF_MEAT +CONTAINS_BLOOD +LEAVES_CORPSE # fighters monster duellist @@ -157,6 +195,9 @@ experience 130 speed 1 SMART HUMANOID +MADE_OF_MEAT +CONTAINS_BLOOD +LEAVES_CORPSE monster warlord desc A truly exceptional warrior, strong of arm and fleet of foot. @@ -173,6 +214,28 @@ experience 400 speed 2 SMART HUMANOID +MADE_OF_MEAT +CONTAINS_BLOOD +LEAVES_CORPSE + +monster sybarite +desc A thrill-seeking devotee of fell powers. +ascii 'f' +utf8 "f" +colour l_purple +rarity 30 +power 18 +hp 120 +mhit 30 +mdam 18 +defence 20 +experience 600 +speed 1 +SMART +HUMANOID +MADE_OF_MEAT +CONTAINS_BLOOD +LEAVES_CORPSE # goblins monster goblin @@ -189,6 +252,9 @@ defence 3 experience 3 speed 1 HUMANOID +MADE_OF_MEAT +CONTAINS_BLOOD +LEAVES_CORPSE # elves monster bad elf @@ -207,6 +273,9 @@ experience 15 speed 2 SMART HUMANOID +MADE_OF_MEAT +CONTAINS_BLOOD +LEAVES_CORPSE # Trolls monster troll @@ -225,6 +294,9 @@ speed 1 STUPID HUMANOID HUGE +MADE_OF_MEAT +CONTAINS_BLOOD +LEAVES_CORPSE # Huge humanoids monster giant @@ -243,6 +315,9 @@ speed 1 STUPID HUMANOID HUGE +MADE_OF_MEAT +CONTAINS_BLOOD +LEAVES_CORPSE monster giant jarl desc A rarity among giants, this one has used its great strength and unusually sharp wits to persuade its dimmer brethren to obey. @@ -259,6 +334,9 @@ experience 1000 speed 1 HUMANOID HUGE +MADE_OF_MEAT +CONTAINS_BLOOD +LEAVES_CORPSE # wizards monster wizard @@ -281,6 +359,9 @@ speed 1 SMART MAGICIAN HUMANOID +MADE_OF_MEAT +CONTAINS_BLOOD +LEAVES_CORPSE monster archmage plural archmagi @@ -304,6 +385,9 @@ SMART MAGICIAN RESIST_ELEC HUMANOID +MADE_OF_MEAT +CONTAINS_BLOOD +LEAVES_CORPSE # zombie monster zombie @@ -325,6 +409,7 @@ RESIST_COLD RESIST_POIS RESIST_NECR HUMANOID +MADE_OF_MEAT # Wraiths monster wraith @@ -374,6 +459,7 @@ RESIST_POIS RESIST_NECR MAGICIAN HUMANOID +MADE_OF_BONE monster master lich plural master liches @@ -400,6 +486,7 @@ RESIST_POIS RESIST_NECR MAGICIAN HUMANOID +MADE_OF_BONE # Vampires monster vampire @@ -421,6 +508,8 @@ RESIST_COLD RESIST_POIS RESIST_NECR HUMANOID +MADE_OF_MEAT +CONTAINS_BLOOD # 4th tier demons monster fire imp @@ -440,6 +529,7 @@ DEMONIC RESIST_FIRE FLYING HUMANOID +MADE_OF_MEAT # 3rd tier demons monster demon @@ -459,6 +549,7 @@ SMART DEMONIC RESIST_FIRE HUMANOID +MADE_OF_MEAT # 2nd tier demons monster defiler @@ -479,6 +570,7 @@ DEMONIC MAGICIAN RESIST_POIS AMORPHOUS +MADE_OF_GOO # 1st tier demons monster putrid emissary @@ -498,6 +590,9 @@ SMART DEMONIC RESIST_POIS HUMANOID +MADE_OF_MEAT +CONTAINS_PUS +BURSTS_ON_DEATH monster tormentor desc The faceless violet-skinned figure before you wears a strangely cut garment of pale, supple leather which would be far beyond the limits of decency if there were any indecent parts to reveal. With one hand it beckons to you, while from the other it trails a long whip of the same leather as its garment. @@ -516,6 +611,7 @@ SMART DEMONIC RESIST_POIS HUMANOID +MADE_OF_MEAT monster iron lord desc This loyal and unwavering servant of Verant, Great Smith of the Hells, bears arms and armour from its master's forges. Fear the iron lord! @@ -537,6 +633,8 @@ RESIST_FIRE RESIST_COLD RESIST_SLAM HUMANOID +MADE_OF_MEAT +CONTAINS_BLOOD monster centaur desc A strange magical hybrid of horse and man. @@ -552,11 +650,14 @@ defence 10 experience 50 speed 2 CENTAUROID +MADE_OF_MEAT +LEAVES_CORPSE +CONTAINS_BLOOD monster ice monster desc A ponderous, shambling half-humanoid figure of ice and snow. -ascii 'I' -utf8 "I" +ascii 'E' +utf8 "E" colour white rarity 50 power 6 @@ -573,6 +674,22 @@ speed 0 RESIST_COLD ARCHER HUMANOID +MADE_OF_ICE + +monster blood elemental +desc A heaving shape of blood in the form of a breaking wave. +ascii 'E' +utf8 "E" +colour red +rarity 50 +power 15 +hp 100 +mhit 15 +mdam 20 +defence 10 +experience 150 +CONTAINS_BLOOD +BURSTS_ON_DEATH monster dragon desc A bulky beast of scales and fangs and fumes, capable of spewing searing flames to roast its enemies and rumoured to have a preference for char-grilled princess. @@ -595,6 +712,9 @@ RESIST_FIRE ARCHER QUADRUPED HUGE +MADE_OF_MEAT +LEAVES_CORPSE +CONTAINS_BLOOD monster moondrake desc A bat-winged serpent with eyes that shimmer like quicksilver and a breath that chills the living to the bone. @@ -619,3 +739,6 @@ RESIST_NECR FLYING ARCHER SERPENTINE +MADE_OF_MEAT +LEAVES_CORPSE +CONTAINS_BLOOD diff --git a/display-nc.cc b/display-nc.cc index 83c401b..18a4745 100644 --- a/display-nc.cc +++ b/display-nc.cc @@ -1732,12 +1732,12 @@ static void run_main_menu(void) load_game(); done = true; } - catch (Obumb_sysexcep e) + catch (Game_sysexcep e) { mvwprintw(fullscreen_window, 14, 20, "Error opening saved game:\n"); mvwprintw(fullscreen_window, 15, 1, "%s\n", strerror(e.err)); } - catch (Obumb_dataexcep e) + catch (Game_dataexcep e) { mvwprintw(fullscreen_window, 14, 20, "Error loading saved game:\n"); mvwprintw(fullscreen_window, 15, 1, "%s\n", e.str); diff --git a/dungeon.cc b/dungeon.cc index e99e9f8..4165087 100644 --- a/dungeon.cc +++ b/dungeon.cc @@ -104,7 +104,7 @@ static void excavate_pillar_room(Level *l, Coord inner_tl, Coord inner_br, uint3 Offset delta = inner_br - inner_tl; if ((delta.y | delta.x) & 1) { - throw Obumb_levgen_excep("Awkward dimensions for pillar room"); + throw Game_levgen_excep("Awkward dimensions for pillar room"); } excavate_normal_room(l, inner_tl, inner_br, region); /* Second pass: What pattern of pillars? diff --git a/log.cc b/log.cc index 708746d..189ae72 100644 --- a/log.cc +++ b/log.cc @@ -56,7 +56,7 @@ void wrapped_system(char const *cmd) int i = system(cmd); if (i != 0) { - throw Obumb_sysexcep(errno); + throw Game_sysexcep(errno); } } @@ -68,15 +68,15 @@ void wrapped_fread(void *buf, size_t size, size_t nmemb, FILE *fp) { if (ferror(fp)) { - throw Obumb_sysexcep(errno); + throw Game_sysexcep(errno); } else if (feof(fp)) { - throw Obumb_dataexcep("Unexpected end of file"); + throw Game_dataexcep("Unexpected end of file"); } else { - throw Obumb_sysexcep(errno); + throw Game_sysexcep(errno); } } } @@ -220,7 +220,7 @@ static void check_monhandle(Mon_handle mon) { if (mon >= first_free_mon_handle) { - throw Obumb_dataexcep("Object handle >= first free object handle - save game probably corrupt"); + throw Game_dataexcep("Object handle >= first free object handle - save game probably corrupt"); } } @@ -228,7 +228,7 @@ static void check_pmref(int pm) { if ((pm < 0) || (pm >= NUM_OF_PERMONS)) { - throw Obumb_dataexcep("Monster permon ID out of bounds - save game probably corrupt"); + throw Game_dataexcep("Monster permon ID out of bounds - save game probably corrupt"); } } @@ -251,7 +251,7 @@ static void check_poref(int po) { if ((po < 0) || (po >= NUM_OF_PERMOBJS)) { - throw Obumb_dataexcep("Object permobj ID out of bounds - save game probably corrupt"); + throw Game_dataexcep("Object permobj ID out of bounds - save game probably corrupt"); } } @@ -260,7 +260,7 @@ static void check_objhandle(Obj_handle obj) { if (obj >= first_free_obj_handle) { - throw Obumb_dataexcep("Object handle >= first free object handle - save game probably corrupt"); + throw Game_dataexcep("Object handle >= first free object handle - save game probably corrupt"); } } @@ -524,7 +524,7 @@ void deserialize_level(FILE *fp, Level *l) } if ((i >= l->chunks_high) || (j >= l->chunks_wide)) { - throw Obumb_dataexcep("Out-of-bounds chunk indices while loading level - save probably corrupt"); + throw Game_dataexcep("Out-of-bounds chunk indices while loading level - save probably corrupt"); } l->chunks[i][j] = new Chunk(l->dead_space); deserialize_chunk(fp, l->chunks[i][j]); @@ -589,7 +589,7 @@ void save_game(void) close(fd); return; } - serialize_uint32(fp, OBUMBRATA_MAGIC_NUMBER); + serialize_uint32(fp, SAVEFILE_MAGIC_NUMBER); serialize_uint32(fp, MAJVERS); serialize_uint32(fp, MINVERS); serialize_int(fp, depth); @@ -644,9 +644,9 @@ static void rebuild_mapobjs(void) static void check_magic(uint32_t magic) { - if (magic != OBUMBRATA_MAGIC_NUMBER) + if (magic != SAVEFILE_MAGIC_NUMBER) { - throw Obumb_dataexcep("Invalid file ID code"); + throw Game_dataexcep("Invalid file ID code"); } } @@ -654,7 +654,7 @@ static void check_minvers(uint32_t minvers) { if (minvers != MINVERS) { - throw Obumb_dataexcep("Minor-version mismatch"); + throw Game_dataexcep("Minor-version mismatch"); } } @@ -662,7 +662,7 @@ static void check_majvers(uint32_t majvers) { if (majvers != MAJVERS) { - throw Obumb_dataexcep("Major-version mismatch"); + throw Game_dataexcep("Major-version mismatch"); } } @@ -680,12 +680,12 @@ void load_game(void) fd = openat(datadir_fd, "obumbrata.sav", O_RDONLY, 0); if (fd == -1) { - throw Obumb_sysexcep(errno); + throw Game_sysexcep(errno); } fp = fdopen(fd, "rb"); if (!fp) { - throw Obumb_sysexcep(errno); + throw Game_sysexcep(errno); } deserialize_uint32(fp, &tmp); check_magic(tmp); @@ -698,12 +698,12 @@ void load_game(void) deserialize_objhandle(fp, &first_free_obj_handle); if (first_free_obj_handle == 0) { - throw Obumb_dataexcep("Object pool exhausted - save file probably corrupt"); + throw Game_dataexcep("Object pool exhausted - save file probably corrupt"); } deserialize_monhandle(fp, &first_free_mon_handle); if (first_free_mon_handle == 0) { - throw Obumb_dataexcep("Monster pool exhausted - save file probably corrupt"); + throw Game_dataexcep("Monster pool exhausted - save file probably corrupt"); } deserialize_player(fp, &u); deserialize_level(fp, &lvl); @@ -753,7 +753,7 @@ void load_game(void) } return; } - catch (Obumb_dataexcep e) + catch (Game_dataexcep e) { /* NOTE: if we got a dataexcep, we've definitely opened fp, so no need * to check for null pointer */ @@ -761,7 +761,7 @@ void load_game(void) game_cleanup(); throw; } - catch (Obumb_sysexcep e) + catch (Game_sysexcep e) { if (fp) { diff --git a/map.cc b/map.cc index d99a107..e7764c1 100644 --- a/map.cc +++ b/map.cc @@ -343,7 +343,7 @@ Coord run_random_walk(Level *l, Coord oc, rwalk_mod_funcptr func, } if (bailout < 1) { - throw Obumb_levgen_excep("run_random_walk exceeded bailout limit"); + throw Game_levgen_excep("run_random_walk exceeded bailout limit"); } return c; } @@ -400,7 +400,7 @@ Coord run_random_walk_unbounded(Level *l, Coord oc, rwalk_mod_funcptr func, } if (bailout < 1) { - throw Obumb_levgen_excep("run_random_walk exceeded bailout limit"); + throw Game_levgen_excep("run_random_walk exceeded bailout limit"); } return c; } diff --git a/mapgen.hh b/mapgen.hh index 8d14745..513b687 100644 --- a/mapgen.hh +++ b/mapgen.hh @@ -65,11 +65,11 @@ Coord run_random_walk(Level *l, Coord oc, rwalk_mod_funcptr func, Coord run_random_walk_unbounded(Level *l, Coord oc, rwalk_mod_funcptr func, void const *priv_ptr, int cells); -struct Obumb_levgen_excep +struct Game_levgen_excep { char const *str; - Obumb_levgen_excep() = delete; - Obumb_levgen_excep(char const *s) : str(s) { } + Game_levgen_excep() = delete; + Game_levgen_excep(char const *s) : str(s) { } }; #endif diff --git a/monsters.cc b/mon1.cc similarity index 100% rename from monsters.cc rename to mon1.cc diff --git a/objects.cc b/obj1.cc similarity index 100% rename from objects.cc rename to obj1.cc -- 2.11.0