- [+] "really attack the helpless something?"
- [+] don't show this message if we can't see iT! - [+] also dont count this as a peaceful attack if we can't see it. - [+] missiles missing you should interrupt training! - [+] Why does monk acuracy start at -4?! - [+] godstone of destruction (hammer ) - [+] godstone of life (heart ?) - [+] godstone of mercy (flower?) - [+] revenge/theft (glove?) - [+] godstone of purity (orb ?) - [+] death: of death. (skull ?) - [+] casts infinite death - [+] nature: of Nature (seed ?) - [+] all plants become peaceful - [+] all animals become peaceful - [+] cure all diseases - [+] quench all fires - [+] flowers grow everywhere - [+] summon treants ? - [+] battle: of Battle (make this a horn?) - [+] remove all curses on equipped wep/arm. - [+] bless weapon (if not already done) - [+] nullify all other lfs - [+] super speed attacks ? - [+] warriors appear - [+] magic: of Magic (crown ?) - [+] restore all mp - [+] learn any spell - [+] identify all objects - [+] make Lavax be playable - [+] make Fishfolk be playable - [+] fix bug with wand lof - [+] reduce rarity of wands - [+] getrandomobwithflag() - [+] fix big memleak bug (allocating map cells twice) - [+] infinite loop on win game by defeating a god. - [+] klikirak shouldn't make fire when on plane of gods/ - [+] createhabitat shouldn't be allowed to blank pre-vault (ie. locked) cells - [+] bug: wasn't any lfs in realm of gods - [+] master vault - [+] bottom of dungeon has link to "vaults". - [+] vault stairs needs a key to open it. (special stair type) - [+] stair type: - [+] metal hatch leading down - [+] metal ladder leading up - [+] add new habitat - [+] add new branch - [+] algorithm for making h_vault level: - [+] start with everything a wall - [+] place x number of random rooms or vaults with tag:vault - [+] rooms can't overlap - [+] rooms should be fairly small - [+] IMPORTANT: rooms can't be further than 2 (3?) cells away from other rooms - [+] every room has locked doors (never open entrances) - [+] then go through, and cell which has a room cell near it becomes empty - [+] problems: - [+] rooms have no doors! - [+] rooms are too small!! - [+] populate with monsters (f_rarity) - [+] more chance of "guard" jobs - [+] automatically place chests - [+] 3 levels with: - [+] 1 staircase up/down form each - [+] down stairs require key to open. - [+] first level of vaults: outer vaults - [+] antechamber with vault guardians - [+] second level: inner vaults - [+] last level: master vault - [+] inner chamber with all the godstones - [+] once you pick up one godstone, the others vanish.
This commit is contained in:
parent
a6942a58c5
commit
435b374c25
310
data.c
310
data.c
|
@ -485,8 +485,9 @@ void initjobs(void) {
|
|||
addjob(J_MONK, "Monk", "A life of strict self-discipline from an early age makes Monks masters of unarmed combat. This discipline extends to their minds, sometimes allowing them to develop powerful psionic abilities over time. On the downside, they are useless with most weapons and are strict vegetarians.");
|
||||
// stats
|
||||
addflag(lastjob->flags, F_JOBATTRMOD, A_STR, 5, NA, NULL);
|
||||
addflag(lastjob->flags, F_JOBATTRMOD, A_AGI, 10, NA, NULL);
|
||||
addflag(lastjob->flags, F_JOBATTRMOD, A_WIS, 10, NA, NULL);
|
||||
addflag(lastjob->flags, F_JOBATTRMOD, A_AGI, 20, NA, NULL);
|
||||
addflag(lastjob->flags, F_JOBATTRMOD, A_WIS, 15, NA, NULL);
|
||||
addflag(lastjob->flags, F_JOBATTRMOD, A_IQ, 5, NA, NULL);
|
||||
addflag(lastjob->flags, F_ALIGNMENT, AL_NONE, NA, NA, "gne"); // ie. select
|
||||
// initial objects
|
||||
addflag(lastjob->flags, F_STARTOB, 100, NA, NA, "robe");
|
||||
|
@ -501,14 +502,14 @@ void initjobs(void) {
|
|||
addflag(lastjob->flags, F_STARTSKILL, SK_COOKING, PR_BEGINNER, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_EVASION, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_PERCEPTION, PR_BEGINNER, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_UNARMED, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_SS_MENTAL, PR_NOVICE, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_UNARMED, PR_BEGINNER, NA, NULL);
|
||||
addflag(lastjob->flags, F_STARTSKILL, SK_STAVES, PR_NOVICE, NA, NULL);
|
||||
// learnable skills
|
||||
addflag(lastjob->flags, F_CANLEARN, SK_CLIMBING, NA, NA, NULL);
|
||||
addflag(lastjob->flags, F_CANLEARN, SK_EXOTICWEPS, PR_BEGINNER, NA, NULL); // limit
|
||||
addflag(lastjob->flags, F_CANLEARN, SK_FIRSTAID, NA, NA, NULL);
|
||||
addflag(lastjob->flags, F_CANLEARN, SK_LISTEN, NA, NA, NULL);
|
||||
addflag(lastjob->flags, F_CANLEARN, SK_SS_MENTAL, NA, NA, NULL);
|
||||
addflag(lastjob->flags, F_CANLEARN, SK_SEWING, NA, NA, NULL);
|
||||
addflag(lastjob->flags, F_CANLEARN, SK_STEALTH, PR_ADEPT, NA, NULL);
|
||||
addflag(lastjob->flags, F_CANLEARN, SK_SWIMMING, NA, NA, NULL);
|
||||
|
@ -521,6 +522,7 @@ void initjobs(void) {
|
|||
// gained abilities
|
||||
// somewhere: slow falling when next to walls
|
||||
// somehwere: alertness when sleeping
|
||||
addflag(lastjob->flags, F_LEVSKILL, 2, SK_SS_MENTAL, NA, NULL);
|
||||
addflag(lastjob->flags, F_LEVFLAG, 2, F_MPDICE, 1, NULL);
|
||||
// 2: body control - low metabolism
|
||||
addflag(lastjob->flags, F_LEVSPELL, 3, OT_S_LOWERMETAB, NA, NULL);
|
||||
|
@ -1375,6 +1377,9 @@ void initobjects(void) {
|
|||
addflag(lastmaterial->flags, F_DTVULN, DT_COLD, NA, NA, NULL);
|
||||
addmaterial(MT_GOLD, "gold", 16);
|
||||
addflag(lastmaterial->flags, F_HARDNESS, 3, NA, NA, NULL);
|
||||
addmaterial(MT_DURANITE, "duranite", 20);
|
||||
addflag(lastmaterial->flags, F_DTIMMUNE, DT_ALL, NA, NA, NULL);
|
||||
addflag(lastmaterial->flags, F_HARDNESS, 20, NA, NA, NULL);
|
||||
|
||||
// object classes
|
||||
addoc(OC_BUILDING, "Buildings", "Shops, etc.", '_', C_GREY, RR_RARE);
|
||||
|
@ -1407,7 +1412,7 @@ void initobjects(void) {
|
|||
//addflag(lastobjectclass->flags, F_MATCONVERTTEXT, MT_WATER, NA, NA, "goes soggy");
|
||||
//addflag(lastobjectclass->flags, F_MATCONVERTTEXTPL, MT_WATER, NA, NA, "go soggy");
|
||||
|
||||
addoc(OC_WAND, "Wands", "A limited-use magical wand which casts the imbued spell.", '/', C_GREY, RR_VERYRARE);
|
||||
addoc(OC_WAND, "Wands", "A limited-use magical wand which casts the imbued spell.", '/', C_GREY, RR_RARE);
|
||||
addocnoun(lastobjectclass, "wand");
|
||||
addflag(lastobjectclass->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastobjectclass->flags, F_DTIMMUNE, DT_FIRE, NA, NA, NULL);
|
||||
|
@ -1649,6 +1654,7 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_STENCH, B_TRUE, 1, NA, NULL);
|
||||
addflag(lastot->flags, F_CANBELOCKED, 50, 0, NA, NULL);
|
||||
|
||||
|
||||
addot(OT_GRATINGROOF, "drain in the roof", "An open draining grate set into the roof.", MT_NOTHING, 0, OC_DFEATURE, SZ_LARGE);
|
||||
addflag(lastot->flags, F_GLYPH, C_BLUE, '<', NA, NULL);
|
||||
addflag(lastot->flags, F_CLIMBABLE, D_UP, NA, NA, "drainage grate");
|
||||
|
@ -1689,6 +1695,7 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_CLIMBABLE, D_DOWN, NA, NA, "hollow tree");
|
||||
addflag(lastot->flags, F_OPPOSITESTAIRS, OT_TREEUP, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_ONEPERCELL, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_MAKESNOISE, 33, 1, NA, "rustling leaves.");
|
||||
addflag(lastot->flags, F_MAKESNOISE, 33, 1, NA, "birds chirping.");
|
||||
|
@ -1696,6 +1703,7 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_GLYPH, C_BROWN, '<', NA, NULL);
|
||||
addflag(lastot->flags, F_CLIMBABLE, D_UP, NA, NA, "hollow tree");
|
||||
addflag(lastot->flags, F_OPPOSITESTAIRS, OT_TREEDOWN, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_ONEPERCELL, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
|
||||
|
||||
|
@ -1705,12 +1713,14 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_OPPOSITESTAIRS, OT_TUNNELUP, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_ONEPERCELL, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_MAKESNOISE, 33, 1, NA, "a strange echoing.");
|
||||
addflag(lastot->flags, F_MAKESNOISE, 33, 1, NA, "an echoing drip.");
|
||||
addot(OT_TUNNELUP, "tunnel leading up", "A wide tunnel leading upwards.", MT_STONE, 3000, OC_DFEATURE, SZ_HUGE);
|
||||
addflag(lastot->flags, F_GLYPH, C_BROWN, '<', NA, NULL);
|
||||
addflag(lastot->flags, F_CLIMBABLE, D_UP, NA, NA, "tunnel");
|
||||
addflag(lastot->flags, F_OPPOSITESTAIRS, OT_TUNNELDOWN, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_ONEPERCELL, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
|
||||
|
||||
|
@ -1725,9 +1735,27 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_GLYPH, NA, '<', NA, NULL);
|
||||
addflag(lastot->flags, F_CLIMBABLE, D_UP, NA, NA, "staircase");
|
||||
addflag(lastot->flags, F_OPPOSITESTAIRS, OT_STAIRSDOWN, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_ONEPERCELL, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
|
||||
|
||||
addot(OT_VSTAIRSDOWN, "metal hatch leading down", "A study metal hatchway set into the floor.", MT_METAL, 3000, OC_DFEATURE, SZ_HUGE);
|
||||
addflag(lastot->flags, F_GLYPH, NA, '>', NA, NULL);
|
||||
addflag(lastot->flags, F_CLIMBABLE, D_DOWN, NA, NA, "staircase");
|
||||
addflag(lastot->flags, F_OPPOSITESTAIRS, OT_VSTAIRSUP, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_ONEPERCELL, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_LOCKED, 500, NA, B_TRUE, NULL); // impossible to disarm!
|
||||
|
||||
addot(OT_VSTAIRSUP, "metal ladder leading up", "A ladder of rigid metal, leading up to through roof.", MT_METAL, 3000, OC_DFEATURE, SZ_HUGE);
|
||||
addflag(lastot->flags, F_GLYPH, NA, '<', NA, NULL);
|
||||
addflag(lastot->flags, F_CLIMBABLE, D_UP, NA, NA, "staircase");
|
||||
addflag(lastot->flags, F_OPPOSITESTAIRS, OT_VSTAIRSDOWN, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_NOPICKUP, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_ONEPERCELL, B_TRUE, NA, NA, NULL);
|
||||
|
||||
|
||||
// buildings
|
||||
|
||||
|
@ -2326,23 +2354,29 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_VALUE, 1000, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_RARITY, H_DUNGEON, 50, RR_VERYRARE, NULL);
|
||||
// godstones
|
||||
addot(OT_GODSTONE_DESTRUCTION, "Godstone of Destruction", "An ancient artifact representing the power of anger.", MT_STONE, 3, OC_GODSTONE, SZ_SMALL);
|
||||
addflag(lastot->flags, F_GLYPH, C_RED, '*', NA, NULL);
|
||||
addot(OT_GODSTONE_DESTRUCTION, "Hammer of Destruction", "An ancient artifact representing the power of anger.", MT_STONE, 3, OC_GODSTONE, SZ_SMALL);
|
||||
addflag(lastot->flags, F_GLYPH, C_RED, ')', NA, NULL);
|
||||
addflag(lastot->flags, F_VALUE, 1000, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_CHARGES, 100, 100, NA, NULL);
|
||||
addflag(lastot->flags, F_RECHARGE, 1, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AIHEALITEM, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_REPLENISHABLE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_LINKGOD, R_GODFIRE, NA, NA, NULL);
|
||||
addot(OT_GODSTONE_LIFE, "Godstone of Life", "An ancient artifact representing the power of Life and Healing.", MT_STONE, 3, OC_GODSTONE, SZ_SMALL);
|
||||
addflag(lastot->flags, F_GLYPH, C_WHITE, '*', NA, NULL);
|
||||
addflag(lastot->flags, F_OBATTACKDELAY, 200, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_DAM, DT_BASH, 15, NA, NULL);
|
||||
addflag(lastot->flags, F_ACCURACY, 70, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_TWOHANDED, SZ_LARGE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_USESSKILL, SK_CLUBS, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_ATTREQ, A_STR, 75, 85, "10");
|
||||
addot(OT_GODSTONE_LIFE, "Heart of Life", "An ancient artifact representing the power of Life and Healing.", MT_STONE, 3, OC_GODSTONE, SZ_SMALL);
|
||||
addflag(lastot->flags, F_GLYPH, C_CYAN, '*', NA, NULL);
|
||||
addflag(lastot->flags, F_VALUE, 1000, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_CHARGES, 100, 100, NA, NULL);
|
||||
addflag(lastot->flags, F_RECHARGE, 1, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AIBOOSTITEM, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_REPLENISHABLE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_LINKGOD, R_GODLIFE, NA, NA, NULL);
|
||||
addot(OT_GODSTONE_MERCY, "Godstone of Mercy", "An ancient artifact representing the power of Mercy and Forgiveness.", MT_STONE, 3, OC_GODSTONE, SZ_SMALL);
|
||||
addot(OT_GODSTONE_MERCY, "Teardrop of Mercy", "An ancient artifact representing the power of Mercy and Forgiveness.", MT_STONE, 3, OC_GODSTONE, SZ_SMALL);
|
||||
addflag(lastot->flags, F_GLYPH, C_GREEN, '*', NA, NULL);
|
||||
addflag(lastot->flags, F_VALUE, 1000, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_CHARGES, 100, 100, NA, NULL);
|
||||
|
@ -2350,25 +2384,63 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_AIBOOSTITEM, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_REPLENISHABLE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_LINKGOD, R_GODMERCY, NA, NA, NULL);
|
||||
addot(OT_GODSTONE_PURITY, "Godstone of Purity", "An ancient artifact representing the power of Purity and Order.", MT_STONE, 3, OC_GODSTONE, SZ_SMALL);
|
||||
addflag(lastot->flags, F_GLYPH, C_MAGENTA, '*', NA, NULL);
|
||||
addot(OT_GODSTONE_PURITY, "Orb of Purity", "An ancient artifact representing the power of Purity and Order.", MT_STONE, 3, OC_GODSTONE, SZ_SMALL);
|
||||
addflag(lastot->flags, F_GLYPH, C_WHITE, '*', NA, NULL);
|
||||
addflag(lastot->flags, F_VALUE, 1000, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_CHARGES, 100, 100, NA, NULL);
|
||||
addflag(lastot->flags, F_RECHARGE, 1, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AIFLEEITEM, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_REPLENISHABLE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_LINKGOD, R_GODPURITY, NA, NA, NULL);
|
||||
|
||||
|
||||
|
||||
addot(OT_GODSTONE_REVENGE, "Godstone of Revenge", "An ancient artifact representing the power of Revenge and Thievery.", MT_STONE, 3, OC_GODSTONE, SZ_SMALL);
|
||||
addot(OT_GODSTONE_REVENGE, "Dagger of Revenge", "An ancient artifact representing the power of Revenge and Thievery.", MT_STONE, 3, OC_GODSTONE, SZ_SMALL);
|
||||
addflag(lastot->flags, F_GLYPH, C_MAGENTA, ')', NA, NULL);
|
||||
addflag(lastot->flags, F_VALUE, 1000, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_CHARGES, 100, 100, NA, NULL);
|
||||
addflag(lastot->flags, F_RECHARGE, 1, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AIBOOSTITEM, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_REPLENISHABLE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_LINKGOD, R_GODPURITY, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_DAM, DT_PIERCE, 10, NA, NULL);
|
||||
addflag(lastot->flags, F_OBATTACKDELAY, 50, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_ACCURACY, 85, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_USESSKILL, SK_SHORTBLADES, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_ATTREQ, A_AGI, 50, 70, "15");
|
||||
addflag(lastot->flags, F_CRITCHANCE, 5, NA, NA, NULL);
|
||||
addot(OT_GODSTONE_DEATH, "Skull of Death", "An ancient artifact representing the power of Death.", MT_STONE, 3, OC_GODSTONE, SZ_SMALL);
|
||||
addflag(lastot->flags, F_GLYPH, C_BLUE, '*', NA, NULL);
|
||||
addflag(lastot->flags, F_VALUE, 1000, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_CHARGES, 100, 100, NA, NULL);
|
||||
addflag(lastot->flags, F_RECHARGE, 1, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AIBOOSTITEM, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_REPLENISHABLE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_LINKGOD, R_GODTHIEVES, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_LINKGOD, R_GODDEATH, NA, NA, NULL);
|
||||
addot(OT_GODSTONE_NATURE, "Seed of Nature", "An ancient artifact representing the power of Nature and Creation.", MT_STONE, 3, OC_GODSTONE, SZ_SMALL);
|
||||
addflag(lastot->flags, F_GLYPH, C_GREEN, '*', NA, NULL);
|
||||
addflag(lastot->flags, F_VALUE, 1000, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_CHARGES, 100, 100, NA, NULL);
|
||||
addflag(lastot->flags, F_RECHARGE, 1, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AIFLEEITEM, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_REPLENISHABLE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_LINKGOD, R_GODNATURE, NA, NA, NULL);
|
||||
addot(OT_GODSTONE_BATTLE, "Horn of Battle", "An ancient artifact representing the power of Battle.", MT_STONE, 3, OC_GODSTONE, SZ_SMALL);
|
||||
addflag(lastot->flags, F_GLYPH, C_ORANGE, ']', NA, NULL);
|
||||
addflag(lastot->flags, F_VALUE, 1000, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_CHARGES, 100, 100, NA, NULL);
|
||||
addflag(lastot->flags, F_RECHARGE, 1, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AIFLEEITEM, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_REPLENISHABLE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_LINKGOD, R_GODBATTLE, NA, NA, NULL);
|
||||
addot(OT_GODSTONE_MAGIC, "Crown of Knowledge", "An ancient artifact representing the power of Magic and Knowledge.", MT_STONE, 3, OC_GODSTONE, SZ_SMALL);
|
||||
addflag(lastot->flags, F_GLYPH, C_BLUE, '[', NA, NULL);
|
||||
addflag(lastot->flags, F_VALUE, 1000, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_CHARGES, 100, 100, NA, NULL);
|
||||
addflag(lastot->flags, F_RECHARGE, 1, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AIFLEEITEM, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_REPLENISHABLE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_LINKGOD, R_GODMAGIC, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_GOESON, BP_HEAD, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_ARMOURRATING, 5, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_CRITPROTECTION, 100, NA, NA, NULL);
|
||||
|
||||
// flora
|
||||
addot(OT_FLOWER, "flower", "A colourful woodland flower.", MT_PLANT, 0.01, OC_FLORA, SZ_TINY);
|
||||
|
@ -3686,6 +3758,7 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_EXTRADESC, NA, NA, NA, "The spell's range is determined by its power.");
|
||||
addflag(lastot->flags, F_SPELLSCHOOL, SS_COLD, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_SPELLLEVEL, 5, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_RANGE, 4, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_TARGETTEDSPELL, TT_MONSTER, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_AICASTTOATTACK, ST_VICTIM, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_LOSLOF, B_FALSE, LOF_WALLSTOP, NA, NULL);
|
||||
|
@ -4852,16 +4925,22 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_GLYPH, C_GREY, '[', NA, NULL);
|
||||
addflag(lastot->flags, F_UNIQUE, NA, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_INVULNERABLE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_VAULTKEY, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_OPERABLE, B_TRUE, NA, NA, NULL);
|
||||
|
||||
addot(OT_KEYMOSS, "ancient mossy key", "An ancient key covered with moss. It looks important.", MT_METAL, 2, OC_TOOLS, SZ_SMALL);
|
||||
addflag(lastot->flags, F_GLYPH, C_GREEN, '[', NA, NULL);
|
||||
addflag(lastot->flags, F_UNIQUE, NA, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_INVULNERABLE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_VAULTKEY, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_OPERABLE, B_TRUE, NA, NA, NULL);
|
||||
|
||||
addot(OT_KEYSTONE, "ancient stone key", "An ancient key made of stone. It looks important.", MT_METAL, 2, OC_TOOLS, SZ_SMALL);
|
||||
addflag(lastot->flags, F_GLYPH, C_GREY, '[', NA, NULL);
|
||||
addflag(lastot->flags, F_UNIQUE, NA, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_INVULNERABLE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_VAULTKEY, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_OPERABLE, B_TRUE, NA, NA, NULL);
|
||||
|
||||
// tools
|
||||
addot(OT_BANDAGE, "bandage", "A small medical bandage. When worn, it will counteract bleeding.", MT_CLOTH, 0.5, OC_TOOLS, SZ_SMALL);
|
||||
|
@ -7300,6 +7379,7 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_NUMAPPEAR, 1, 10, NA, "");
|
||||
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_DAMAGABLE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_MISSILEALWAYSDIES, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_OBHP, 1, 1, NA, NULL);
|
||||
addflag(lastot->flags, F_MISSILEDAM, NA, NA, NA, "4");
|
||||
addflag(lastot->flags, F_NOOBDIETEXT, B_TRUE, NA, NA, NULL);
|
||||
|
@ -7312,6 +7392,7 @@ void initobjects(void) {
|
|||
addflag(lastot->flags, F_NUMAPPEAR, 1, 10, NA, "");
|
||||
addflag(lastot->flags, F_NOBLESS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_MISSILEDAM, NA, NA, NA, "1");
|
||||
addflag(lastot->flags, F_MISSILEALWAYSDIES, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_DAMAGABLE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastot->flags, F_OBHP, 1, 1, NA, NULL);
|
||||
addflag(lastot->flags, F_NOOBDIETEXT, B_TRUE, NA, NA, NULL);
|
||||
|
@ -8796,6 +8877,77 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_WANTSOBFLAG, F_GEM, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_ALIGNMENT, AL_NONE, NA, NA, "gne");
|
||||
|
||||
addrace(R_FISHFOLK, "fishfolk", 75, 'h', C_BOLDBLUE, MT_FLESH, RC_HUMANOID, "Water-dwelling humanoids capable of breathing normally in both water and air.");
|
||||
setbodytype(lastrace, BT_HUMANOID);
|
||||
addbodypart(lastrace, BP_TAIL, NULL);
|
||||
addflag(lastrace->flags, F_PLAYABLE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_ALIGNMENT, AL_NONE, NA, NA, "gne");
|
||||
addflag(lastrace->flags, F_STARTATT, A_STR, AT_RANDOM, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_IQ, AT_RANDOM, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_AGI, AT_RANDOM, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_CON, AT_RANDOM, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_WIS, AT_RANDOM, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_AVERAGE, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL);
|
||||
f = addflag(lastrace->flags, F_HITDICE, 1, NA, NA, NULL); addcondition(f, FC_IFPLAYER, 100);
|
||||
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HASATTACK, OT_FISTS, 2, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 3, NA, "shouts^a shout");
|
||||
addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL);
|
||||
// bonuses
|
||||
addflag(lastrace->flags, F_AQUATIC, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_BREATHWATER, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_STARTSKILL, SK_SWIMMING, PR_ADEPT, NA, NULL);
|
||||
// penalties
|
||||
addflag(lastrace->flags, F_DTVULN, DT_FIRE, NA, NA, NULL);
|
||||
// for monsters:
|
||||
f = addflag(lastrace->flags, F_HITDICE, 2, NA, NA, NULL); addcondition(f, FC_IFMONSTER, 100);
|
||||
f = addflag(lastrace->flags, F_TR, 3, NA, NA, NULL); addcondition(f, FC_IFMONSTER, 100);
|
||||
addflag(lastrace->flags, F_WANTSBETTERWEP, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_WANTSBETTERARM, B_TRUE, NA, NA, NULL);
|
||||
f = addflag(lastrace->flags, F_STARTOB, 50, NA, NA, "trident"); addcondition(f, FC_IFMONSTER, 100);
|
||||
f = addflag(lastrace->flags, F_STARTOB, 50, NA, NA, "spear"); addcondition(f, FC_IFMONSTER, 100);
|
||||
f = addflag(lastrace->flags, F_FLEEONHPPCT, 50, NA, NA, NULL); addcondition(f, FC_IFMONSTER, 100);
|
||||
|
||||
|
||||
addrace(R_LAVAX, "lavax", 90, 'h', C_RED, MT_FLESH, RC_HUMANOID, "The Lavax are a race of humanoid creatures who dwell in volcanic regions. Their skin has hardened into a clay-like substance, and is completely immune to the effects of heat or fire.");
|
||||
setbodytype(lastrace, BT_HUMANOID);
|
||||
addflag(lastrace->flags, F_PLAYABLE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_STR, AT_RANDOM, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_IQ, AT_RANDOM, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_AGI, AT_RANDOM, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_CON, AT_GTAVERAGE, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_WIS, AT_RANDOM, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_RANDOM, NA, NULL);
|
||||
addflag(lastrace->flags, F_ALIGNMENT, AL_NONE, NA, NA, "gne");
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
|
||||
f = addflag(lastrace->flags, F_HASATTACK, OT_FISTS, 5, NA, NULL); addcondition(f, FC_IFMONSTER, 100);
|
||||
f = addflag(lastrace->flags, F_HASATTACK, OT_FISTS, 2, NA, NULL); addcondition(f, FC_IFPLAYER, 100);
|
||||
f = addflag(lastrace->flags, F_HITDICE, 1, NA, NA, NULL); addcondition(f, FC_IFPLAYER, 100);
|
||||
// bonuses
|
||||
addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_BEGINNER, NA, NULL);
|
||||
addflag(lastrace->flags, F_DTIMMUNE, DT_FIRE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_EXTRADAM, DT_HEAT, NA, NA, "1d1");
|
||||
addbonustext(lastrace->flags, F_BONDESC, "+1 heat damage to all attacks");
|
||||
// penalties
|
||||
addflag(lastrace->flags, F_DTVULN, DT_COLD, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 3, NA, "shouts^a shout");
|
||||
addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL);
|
||||
// for monsters only:
|
||||
addflag(lastrace->flags, F_WANTSBETTERWEP, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_WANTSBETTERARM, B_TRUE, NA, NA, NULL);
|
||||
f = addflag(lastrace->flags, F_STARTOBCLASS, 50, OC_WEAPON, RANDOM, NULL); addcondition(f, FC_IFMONSTER, 100);
|
||||
f = addflag(lastrace->flags, F_HITDICE, 5, NA, NA, NULL); addcondition(f, FC_IFMONSTER, 100);
|
||||
f = addflag(lastrace->flags, F_TR, 5, NA, NA, NULL); addcondition(f, FC_IFMONSTER, 100);
|
||||
f = addflag(lastrace->flags, F_ARMOURRATING, 6, NA, NA, NULL); addcondition(f, FC_IFMONSTER, 100);
|
||||
|
||||
addrace(R_ELF, "selnor", 60, '@', C_GREEN, MT_FLESH, RC_HUMANOID, "The Selnor race are slender, graceful beings around human-sized but far nimbler. They have high intelligence and magical affinity, but lack physical strength. The Selnor meditate instead of sleeping, thus maintaining basic awareness.");
|
||||
setbodytype(lastrace, BT_HUMANOID);
|
||||
|
@ -8906,6 +9058,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_EXTRAINFO, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTSKILL, SK_TECHUSAGE, PR_MASTER, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 3, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_TR, 6, NA, NA, NULL);
|
||||
|
@ -8932,6 +9085,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_VERYRARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_STR, AT_GTAVERAGE, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_AGI, AT_LOW, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_IQ, AT_LTAVERAGE, NA, NULL);
|
||||
|
@ -8969,6 +9123,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_CAVE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_FOREST, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 1, NA, 4, NULL);
|
||||
addflag(lastrace->flags, F_TR, 4, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HEAVENARM, 6, NA, NA, "force field");
|
||||
|
@ -8993,6 +9148,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_NOSTAIRS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_CAVE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_FOREST, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 1, NA, 4, NULL);
|
||||
addflag(lastrace->flags, F_TR, 4, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
|
||||
|
@ -9016,6 +9172,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOSTAIRS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_STR, AT_GTAVERAGE, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_AGI, AT_LOW, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_IQ, IQ_MINDLESS, NA, NULL);
|
||||
|
@ -9043,6 +9200,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_ALL, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_NOSTAIRS, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 0, 1, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_STR, AT_GTAVERAGE, NA, NULL);
|
||||
|
@ -9070,7 +9228,8 @@ void initrace(void) {
|
|||
lastrace->baseid = R_BANDIT;
|
||||
setbodytype(lastrace, BT_HUMANOID);
|
||||
addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_ALL, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_VARLEVEL, NA, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_DEMANDSBRIBE, NA, NA, NA, "Your money or your life!");
|
||||
addflag(lastrace->flags, F_STARTATT, A_STR, AT_RANDOM, NA, NULL);
|
||||
|
@ -9103,7 +9262,8 @@ void initrace(void) {
|
|||
addrace(R_BANDIT, "bandit", 75, '@', C_GREY, MT_FLESH, RC_HUMANOID, "Bandits prey on travellers, demanding cash in exchange for not beating them to a pulp.");
|
||||
setbodytype(lastrace, BT_HUMANOID);
|
||||
addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_ALL, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_VARLEVEL, NA, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_STR, AT_RANDOM, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_AGI, AT_RANDOM, NA, NULL);
|
||||
|
@ -9312,6 +9472,8 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_TR, 50, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_UNIQUE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HASATTACK, OT_FISTS, 8, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTOB, 100, NA, NA, "blessed +5 zweihander");
|
||||
addflag(lastrace->flags, F_STARTOB, 100, NA, NA, "blessed +5 lightning javelin");
|
||||
addflag(lastrace->flags, F_STARTOB, 100, NA, NA, "blessed +5 helmet");
|
||||
addflag(lastrace->flags, F_STARTOB, 100, NA, NA, "blessed bloodstained +5 plate mail");
|
||||
addflag(lastrace->flags, F_STARTOB, 100, NA, NA, "blessed bloodstained +5 set of greaves");
|
||||
|
@ -9771,6 +9933,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_LARGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 5, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_TR, 6, NA, NA, NULL);
|
||||
|
@ -10144,6 +10307,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 6, NA, NA, NULL);
|
||||
|
@ -10228,6 +10392,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_ALIGNMENT, AL_GOOD, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_VERYRARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_BLOODOB, NA, NA, NA, "stick");
|
||||
addflag(lastrace->flags, F_BLOODOB, NA, NA, NA, "leaf");
|
||||
|
@ -10268,6 +10433,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_ALIGNMENT, AL_GOOD, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_VERYRARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_BLOODOB, NA, NA, NA, "stick");
|
||||
|
@ -10302,6 +10468,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 13, NA, NA, NULL);
|
||||
|
@ -10342,6 +10509,7 @@ void initrace(void) {
|
|||
setbodytype(lastrace, BT_HUMANOID);
|
||||
addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 15, NA, NA, NULL);
|
||||
|
@ -10385,6 +10553,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_CORPSETYPE, NA, NA, NA, "fire giant corpse");
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 15, NA, NA, NULL);
|
||||
|
@ -10439,6 +10608,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_ENHANCESMELL, 4, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 5, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_TR, 5, NA, NA, NULL);
|
||||
|
@ -10610,6 +10780,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_FOREST, 75, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_SWAMP, 75, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 4, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_TR, 5, NA, NA, NULL);
|
||||
|
@ -10646,6 +10817,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_FOREST, 70, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_SWAMP, 70, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 3, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_TR, 4, NA, NA, NULL);
|
||||
|
@ -10721,6 +10893,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_CORPSETYPE, NA, NA, NA, "goblin corpse");
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, 50, RR_VERYRARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 4, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_TR, 6, NA, NA, NULL);
|
||||
|
@ -10790,6 +10963,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 7, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_TR, 7, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_EVASION, 20, NA, NA, NULL);
|
||||
|
@ -10832,6 +11006,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_RARE, "");
|
||||
addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_STR, AT_GTAVERAGE, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_IQ, AT_LOW, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_AGI, AT_AVERAGE, NA, NULL);
|
||||
|
@ -10909,6 +11084,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_FOREST, 60, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_SWAMP, 60, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 7, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_TR, 7, NA, NA, NULL);
|
||||
|
@ -10951,6 +11127,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_ALL, NA, RR_VERYRARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 5, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_TR, 11, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_STR, AT_HIGH, NA, NULL);
|
||||
|
@ -11125,6 +11302,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_SIZE, SZ_LARGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, 72, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_FOREST, 72, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 6, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_TR, 6, NA, NA, NULL);
|
||||
|
@ -11154,6 +11332,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_ALIGNMENT, AL_NONE, NA, NA, "gne");
|
||||
addflag(lastrace->flags, F_STARTJOB, 15, J_WARRIOR, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTJOB, 15, J_DRUID, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTJOB, 15, J_GUARD, NA, NULL);
|
||||
|
||||
addrace(R_MALIK, "malik", 5, 'n', C_YELLOW, MT_FLESH, RC_MAGIC, "An evil fairy who thrives on murder. They delight in teleporting behind their victims for a quick backstab.");
|
||||
setbodytype(lastrace, BT_HUMANOID);
|
||||
|
@ -11199,6 +11378,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 6, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_TR, 6, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_STR, AT_AVERAGE, NA, NULL);
|
||||
|
@ -11275,6 +11455,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_RARITY, H_CAVE, 60, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_FOREST, 66, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_SWAMP, 66, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 4, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_TR, 5, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_EVASION, -5, NA, NA, NULL);
|
||||
|
@ -11393,6 +11574,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_RARITY, H_CAVE, 45, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_FOREST, 50, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_SWAMP, 50, RR_VERYRARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 10, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_TR, 10, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_ARMOURRATING, 10, NA, NA, NULL);
|
||||
|
@ -11645,6 +11827,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_GTAVERAGE, NA, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 5, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_TR, 5, NA, NA, NULL);
|
||||
|
@ -11790,6 +11973,8 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_STARTATT, A_CON, AT_AVERAGE, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_AVERAGE, NA, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, 72, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 6, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_TR, 6, NA, NA, NULL);
|
||||
|
@ -11820,6 +12005,8 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_STARTATT, A_IQ, AT_EXLOW, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_CON, AT_AVERAGE, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_AVERAGE, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, 72, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 3, NA, NA, NULL);
|
||||
|
@ -11844,13 +12031,14 @@ void initrace(void) {
|
|||
addrace(R_PRIMALSTONE, "stone primality", 200, 'E', C_GREY, MT_STONE, RC_MAGIC, "A living mass of stone, animated by powerful magic.");
|
||||
setbodytype(lastrace, BT_HUMANOID);
|
||||
addflag(lastrace->flags, F_ALIGNMENT, AL_NONE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_CAVE, 72, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_STR, AT_EXHIGH, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_AGI, AT_LTAVERAGE, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_WIS, AT_EXLOW, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_IQ, AT_EXLOW, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_CON, AT_EXHIGH, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_EXLOW, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_CAVE, 72, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 10, NA, NA, NULL);
|
||||
|
@ -11870,13 +12058,14 @@ void initrace(void) {
|
|||
addrace(R_PRIMALSTONEL, "lesser stone primality", 120, 'E', C_GREY, MT_STONE, RC_MAGIC, "A living mass of stone, animated by powerful magic.");
|
||||
setbodytype(lastrace, BT_HUMANOID);
|
||||
addflag(lastrace->flags, F_ALIGNMENT, AL_NONE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_CAVE, 72, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_STR, AT_EXHIGH, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_AGI, AT_LTAVERAGE, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_WIS, AT_EXLOW, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_IQ, AT_EXLOW, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_CON, AT_EXHIGH, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_EXLOW, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_CAVE, 72, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 5, NA, NA, NULL);
|
||||
|
@ -11905,6 +12094,10 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_STARTATT, A_IQ, AT_EXLOW, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_CON, AT_AVERAGE, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_AVERAGE, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_VERYRARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_VERYRARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 6, NA, NA, NULL);
|
||||
|
@ -11939,6 +12132,10 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_STARTATT, A_IQ, AT_EXLOW, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_CON, AT_AVERAGE, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_AVERAGE, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 5, NA, NA, NULL);
|
||||
|
@ -11997,32 +12194,6 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_NOSLEEP, B_TRUE, NA, NA, NULL);
|
||||
|
||||
|
||||
addrace(R_LAVAX, "lavax", 90, 'h', C_RED, MT_FLESH, RC_HUMANOID, "The Lavax are a race of humanoid creatures who dwell in volcanic regions. Their skin has hardened into a clay-like substance, and is completely immune to the effects of heat or fire.");
|
||||
setbodytype(lastrace, BT_HUMANOID);
|
||||
addflag(lastrace->flags, F_ALIGNMENT, AL_NONE, NA, NA, "gne");
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 5, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_TR, 5, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_ARMOURRATING, 6, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_STR, AT_RANDOM, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_IQ, AT_RANDOM, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_AGI, AT_RANDOM, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_CON, AT_GTAVERAGE, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_WIS, AT_RANDOM, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_RANDOM, NA, NULL);
|
||||
addflag(lastrace->flags, F_HASATTACK, OT_FISTS, 9, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTOBCLASS, 50, OC_WEAPON, RANDOM, NULL);
|
||||
addflag(lastrace->flags, F_WANTSBETTERWEP, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_WANTSBETTERARM, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 3, NA, "shouts^a shout");
|
||||
addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTSKILL, SK_PERCEPTION, PR_BEGINNER, NA, NULL);
|
||||
addflag(lastrace->flags, F_DTIMMUNE, DT_FIRE, NA, NA, NULL);
|
||||
|
||||
addrace(R_SASQUATCH, "sasquatch", 90, 'h', C_CYAN, MT_FLESH, RC_HUMANOID, "Over the years, humans dwelling in cold climates have evolved into sasquatches, their skin now covered with fur to protect against the elements.");
|
||||
setbodytype(lastrace, BT_HUMANOID);
|
||||
addflag(lastrace->flags, F_ALIGNMENT, AL_NONE, NA, NA, "gne");
|
||||
|
@ -12385,6 +12556,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 5, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_FILLPOT, OT_POT_HEALINGMIN, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_FILLPOT, OT_POT_HEALING, NA, NA, NULL);
|
||||
|
@ -12422,6 +12594,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_CAVE, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 5, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_TR, 5, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_EVASION, 10, NA, NA, NULL);
|
||||
|
@ -12445,6 +12618,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_NOCTURNAL, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_CANEATRAW, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTJOB, 25, J_WARRIOR, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTJOB, 25, J_GUARD, NA, NULL);
|
||||
|
||||
addrace(R_TROLLSNOW, "snow troll", 100, 't', C_WHITE, MT_FLESH, RC_HUMANOID, "A savage, hairy monster covered with white fur. Trolls are extremely muscular, move abnormally quickly and regenerate.");
|
||||
setbodytype(lastrace, BT_HUMANOID);
|
||||
|
@ -12620,34 +12794,6 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 8, NA, NULL);
|
||||
addflag(lastrace->flags, F_CANWILL, OT_A_GRAB, NA, NA, NULL);
|
||||
|
||||
addrace(R_FISHFOLK, "fishfolk", 75, 'h', C_BOLDBLUE, MT_FLESH, RC_HUMANOID, "Water-dwelling humanoids capable of breathing normally in both water and air.");
|
||||
setbodytype(lastrace, BT_HUMANOID);
|
||||
addbodypart(lastrace, BP_TAIL, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_FOREST, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUMAN, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 2, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_TR, 3, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_STR, AT_RANDOM, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_IQ, AT_RANDOM, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_AGI, AT_RANDOM, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_CON, AT_RANDOM, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_WIS, AT_RANDOM, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_CHA, AT_AVERAGE, NA, NULL);
|
||||
addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HASATTACK, OT_FISTS, 2, NA, NULL);
|
||||
addflag(lastrace->flags, F_NOISETEXT, N_GETANGRY, 3, NA, "shouts^a shout");
|
||||
addflag(lastrace->flags, F_HUMANOID, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTOB, 50, NA, NA, "trident");
|
||||
addflag(lastrace->flags, F_STARTOB, 50, NA, NA, "spear");
|
||||
addflag(lastrace->flags, F_FLEEONHPPCT, 50, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_WANTSBETTERWEP, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_WANTSBETTERARM, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_ALIGNMENT, AL_NONE, NA, NA, "gne");
|
||||
addflag(lastrace->flags, F_AQUATIC, B_TRUE, NA, NA, "");
|
||||
addflag(lastrace->flags, F_BREATHWATER, B_TRUE, NA, NA, "");
|
||||
|
||||
addrace(R_MERLOCH, "merloch", 250, 'm', C_ORANGE, MT_FLESH, RC_AQUATIC, "Merlochs are bipedal, fishlike beings. Equally at home in the water or on land, they use their sonic scream to disable foes.");
|
||||
setbodytype(lastrace, BT_HUMANOID);
|
||||
|
@ -15059,6 +15205,7 @@ void initrace(void) {
|
|||
addbodypart(lastrace, BP_TAIL, NULL);
|
||||
addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_LARGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
|
@ -15094,6 +15241,7 @@ void initrace(void) {
|
|||
addbodypart(lastrace, BP_TAIL, NULL);
|
||||
addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_VERYRARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
|
@ -15144,6 +15292,7 @@ void initrace(void) {
|
|||
addbodypart(lastrace, BP_TAIL, NULL);
|
||||
addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_VERYRARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
|
@ -15195,6 +15344,7 @@ void initrace(void) {
|
|||
addbodypart(lastrace, BP_TAIL, NULL);
|
||||
addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_VERYRARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
|
@ -15254,6 +15404,7 @@ void initrace(void) {
|
|||
addbodypart(lastrace, BP_TAIL, NULL);
|
||||
addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_VERYRARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
|
@ -15305,6 +15456,7 @@ void initrace(void) {
|
|||
addbodypart(lastrace, BP_TAIL, NULL);
|
||||
addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_VERYRARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
|
@ -15352,6 +15504,7 @@ void initrace(void) {
|
|||
addbodypart(lastrace, BP_TAIL, NULL);
|
||||
addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_VERYRARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
|
@ -15406,6 +15559,7 @@ void initrace(void) {
|
|||
addbodypart(lastrace, BP_TAIL, NULL);
|
||||
addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_VERYRARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
|
@ -15456,6 +15610,7 @@ void initrace(void) {
|
|||
addbodypart(lastrace, BP_TAIL, NULL);
|
||||
addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_VERYRARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
|
@ -15501,6 +15656,7 @@ void initrace(void) {
|
|||
addbodypart(lastrace, BP_TAIL, NULL);
|
||||
addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_DUNGEON, NA, RR_VERYRARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_HUGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, "");
|
||||
|
@ -15834,6 +15990,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_HEAVEN, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_ALL, NA, RR_VERYRARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 13, NA, NA, NULL);
|
||||
|
@ -15875,6 +16032,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_HEAVEN, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_ALL, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 5, NA, NA, NULL);
|
||||
|
@ -15944,6 +16102,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_ALIGNMENT, AL_EVIL, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_HEAVEN, NA, RR_COMMON, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_ALL, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_UNCOMMON, NULL);
|
||||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_MEDIUM, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_STARTATT, A_STR, AT_HIGH, NA, NULL);
|
||||
|
@ -15978,6 +16137,7 @@ void initrace(void) {
|
|||
addflag(lastrace->flags, F_HOSTILE, B_TRUE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_SIZE, SZ_LARGE, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_ALL, NA, RR_VERYRARE, NULL);
|
||||
addflag(lastrace->flags, F_RARITY, H_MASTERVAULTS, NA, RR_RARE, NULL);
|
||||
addflag(lastrace->flags, F_HITDICE, 3, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_TR, 5, NA, NA, NULL);
|
||||
addflag(lastrace->flags, F_MOVESPEED, SP_SLOW, NA, NA, NULL);
|
||||
|
|
BIN
data/hiscores.db
BIN
data/hiscores.db
Binary file not shown.
|
@ -14,7 +14,15 @@
|
|||
#:cell:metal wall
|
||||
+:ob:locked iron door
|
||||
+:exit
|
||||
g:ob:Godstone of Purity
|
||||
g:ob:Horn of Battle
|
||||
g:ob:Skull of Death
|
||||
g:ob:Hammer of Destruction
|
||||
g:ob:Heart of Life
|
||||
g:ob:Crown of Knowledge
|
||||
g:ob:Teardrop of Mercy
|
||||
g:ob:Seed of Nature
|
||||
g:ob:Orb of Purity
|
||||
g:ob:Dagger of Revenge
|
||||
^:ob:gas trap
|
||||
c:ob:candelabrum
|
||||
m:ob:landmine trap
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
@end
|
||||
|
||||
@legend
|
||||
#:cell:metal wall
|
||||
#:cell:duranite wall
|
||||
$:ob:25-200 gold
|
||||
! 30% chance of a door on each side
|
||||
+:ob:secret locked iron door:30
|
||||
|
|
19
defs.h
19
defs.h
|
@ -220,8 +220,11 @@
|
|||
#define MINROOMS_WOODS -1
|
||||
#define MAXROOMS_WOODS 3
|
||||
|
||||
#define MINROOMS_DUN 5
|
||||
#define MAXROOMS_DUN 10
|
||||
|
||||
#define MINROOMS 5
|
||||
#define MAXROOMS 10
|
||||
#define MAXROOMS 20
|
||||
#define MIN_ROOMH 4
|
||||
#define MIN_ROOMW 4
|
||||
#define MAX_ROOMW (MAX_MAPW / 3)
|
||||
|
@ -809,6 +812,7 @@ enum CELLTYPE {
|
|||
CT_WALLTREE,
|
||||
CT_WALLWOOD,
|
||||
CT_WALLDWOOD,
|
||||
CT_WALLDURANITE,
|
||||
// empty
|
||||
CT_CORRIDOR,
|
||||
CT_DIRT,
|
||||
|
@ -816,6 +820,7 @@ enum CELLTYPE {
|
|||
CT_FAKE,
|
||||
CT_FLOORFLESH,
|
||||
CT_FLOORCARPET,
|
||||
CT_FLOORDURANITE,
|
||||
CT_FLOORSHOP,
|
||||
CT_FLOORTILE,
|
||||
CT_FLOORWOOD,
|
||||
|
@ -1324,6 +1329,7 @@ enum MATERIAL {
|
|||
MT_DRAGONWOOD = 29,
|
||||
MT_DIRT = 30,
|
||||
MT_CRYSTAL = 31,
|
||||
MT_DURANITE = 32,
|
||||
};
|
||||
|
||||
// Object Types
|
||||
|
@ -1351,6 +1357,8 @@ enum OBTYPE {
|
|||
OT_HOLEINROOF,
|
||||
OT_STAIRSDOWN,
|
||||
OT_STAIRSUP,
|
||||
OT_VSTAIRSDOWN,
|
||||
OT_VSTAIRSUP,
|
||||
OT_TREEDOWN,
|
||||
OT_TREEUP,
|
||||
OT_TUNNELDOWN,
|
||||
|
@ -1409,9 +1417,13 @@ enum OBTYPE {
|
|||
// money
|
||||
OT_GOLD,
|
||||
// godstones
|
||||
OT_GODSTONE_BATTLE,
|
||||
OT_GODSTONE_DEATH,
|
||||
OT_GODSTONE_DESTRUCTION,
|
||||
OT_GODSTONE_LIFE,
|
||||
OT_GODSTONE_MAGIC,
|
||||
OT_GODSTONE_MERCY,
|
||||
OT_GODSTONE_NATURE,
|
||||
OT_GODSTONE_PURITY,
|
||||
OT_GODSTONE_REVENGE,
|
||||
// flora
|
||||
|
@ -2400,6 +2412,8 @@ enum FLAG {
|
|||
// object flags
|
||||
F_GODSTONE, // this is a godstone.
|
||||
// if v2 = TRUE, means we need to warn when we walk onto it.
|
||||
F_VAULTKEY, // this object is a vault key - it unlocks vault
|
||||
// stair objects.
|
||||
F_BADOBJECT, // this object is dangerous. ie. potion of poison,
|
||||
// potion of sleep, etc.
|
||||
F_BATTLESPOILS, // this obejct was dropped by a monster which the
|
||||
|
@ -2693,6 +2707,7 @@ enum FLAG {
|
|||
F_OPEN, // is this door open?
|
||||
F_LOCKED,// door is locked
|
||||
// v1 is difficulty to disarm
|
||||
// if v2 is set, this objcet can't be magically unlocked.
|
||||
F_JAMMED, // is this door jammed? v0 is # turns it'll take to open it.
|
||||
// v1 = have we tried this door yet?
|
||||
F_SECRET, // this object is secret. v0 is sc_search difficulty
|
||||
|
@ -4021,6 +4036,7 @@ enum REGIONTYPE {
|
|||
RG_STOMACH,
|
||||
RG_WOODS,
|
||||
RG_BABAYAGAHUT,
|
||||
RG_MASTERVAULTS,
|
||||
};
|
||||
|
||||
enum HABITAT {
|
||||
|
@ -4035,6 +4051,7 @@ enum HABITAT {
|
|||
H_SWAMP = 9,
|
||||
H_BYHUT = 10,
|
||||
H_ANTNEST = 11,
|
||||
H_MASTERVAULTS = 12,
|
||||
H_ALL = 999
|
||||
};
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ defs.h:
|
|||
|
||||
map.c:
|
||||
initmap(): define via new "addregiontype()" call
|
||||
OPTIONAL: initmap(): define at least one regionoutline
|
||||
OPTIONAL: initmaplayout(): define at least one regionoutline
|
||||
|
||||
finalisemap():
|
||||
define up/down stair types for this map
|
||||
|
|
8
god.c
8
god.c
|
@ -421,7 +421,7 @@ void angergod(enum RACE rid, int amt, enum GODANGERREASON why) {
|
|||
rollagain = B_TRUE;
|
||||
} else {
|
||||
msg("\"Maybe this will teach you some humility!\"");
|
||||
setrace(player, R_NEWT, B_TRUE); // ie. don't set origrace!
|
||||
polymorphto(player, R_NEWT, 20);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -1206,7 +1206,7 @@ int godgiftmaybe(enum RACE rid, int fromtemple) {
|
|||
if (getskill(player, SK_RANGED)) {
|
||||
char obname[BUFLEN];
|
||||
if (real_getrandomob(NULL, obname, 25, NA, getlfsize(player),
|
||||
SK_RANGED, B_TRUE, OC_WEAPON, OC_NONE, DT_NONE)) {
|
||||
SK_RANGED, B_TRUE, OC_WEAPON, OC_NONE, DT_NONE, F_NONE)) {
|
||||
snprintf(obtogive, BUFLEN, "excellent %s", obname);
|
||||
} else {
|
||||
rollagain = B_TRUE;
|
||||
|
@ -1418,6 +1418,7 @@ void godsay(enum RACE rid, int says, char *format, ...) {
|
|||
|
||||
void godstone_pickup_effects(lifeform_t *god, lifeform_t *opposegod, object_t *o) {
|
||||
int x,y;
|
||||
|
||||
// opposing god appears
|
||||
godappears(opposegod->race->id, NULL);
|
||||
|
||||
|
@ -1467,7 +1468,7 @@ void godstone_pickup_effects(lifeform_t *god, lifeform_t *opposegod, object_t *o
|
|||
wprintw(mainwin, "OR... STONE KILL EKRUB. YES! YOU WILL USE. YOU FIND\n");
|
||||
wprintw(mainwin, "HER. YOU USE STONE. STONE HELP BURN NATURE GODDESS!\n\n");
|
||||
wprintw(mainwin, "YOU GO UPWARD. UPWARD GOES TO FOREST. PORTAL IN FOREST.\n");
|
||||
wprintw(mainwin, "PORTAL TO TREE WOMAN. YOU KILL TREE WOMAN. OR YOU FIND KLIKIRAK,");
|
||||
wprintw(mainwin, "PORTAL TO TREE WOMAN. YOU KILL TREE WOMAN. OR YOU FIND KLIKIRAK,\n");
|
||||
wprintw(mainwin, "YOU GIVE STONE TO KLIKIRAK.\n\n");
|
||||
wprintw(mainwin, "YES. YES. YYYEESSS!!\"\n");
|
||||
break;
|
||||
|
@ -1593,6 +1594,7 @@ void godstone_pickup_effects(lifeform_t *god, lifeform_t *opposegod, object_t *o
|
|||
|
||||
killflagsofid(god->flags, F_PRAYEDTO);
|
||||
addflag(god->flags, F_GODBLOCKED, B_TRUE, NA, NA, NULL);
|
||||
|
||||
}
|
||||
|
||||
void modpiety(enum RACE rid, int amt) {
|
||||
|
|
38
io.c
38
io.c
|
@ -1240,6 +1240,11 @@ void announcearrival(lifeform_t *lf, map_t *newmap) {
|
|||
case H_HEAVEN:
|
||||
msg("You arrive in the Realm of the Gods!");
|
||||
break;
|
||||
case H_MASTERVAULTS:
|
||||
if ((newmap->lastplayervisit == -1) && (newmap->depth == 1)) {
|
||||
msg("You have found the master vaults!");
|
||||
}
|
||||
break;
|
||||
case H_SWAMP:
|
||||
msg("You arrive %sat a swamp.",
|
||||
(newmap->lastplayervisit == -1) ? "" : "back ");
|
||||
|
@ -4632,7 +4637,7 @@ void docomms(lifeform_t *lf) {
|
|||
}
|
||||
return;
|
||||
case 't':
|
||||
if (lfhasflag(lf, F_PHANTASM)) {
|
||||
if (lfhasflag(lf, F_PHANTASM) || lfhasflag(lf, F_SUMMONEDBY)) {
|
||||
msg("%s doesn't respond.", lfname);
|
||||
break;
|
||||
}
|
||||
|
@ -10972,6 +10977,33 @@ int screenglyphmatches(int x, int y, glyph_t *g) {
|
|||
return B_TRUE;
|
||||
}
|
||||
|
||||
// prompts the player to learn a new spell from school 'ss' (ss_none means any)
|
||||
void select_new_spell(enum SPELLSCHOOL ss) {
|
||||
int done = B_FALSE;
|
||||
flag_t *f;
|
||||
char qbuf[BUFLEN];
|
||||
sprintf(qbuf, "Learn which new spell (maxmp=%d):", getmaxmp(player));
|
||||
while (!done) {
|
||||
makespellchoicelist(&prompt, player, qbuf, "Describe which spell:", f->val[1], B_TRUE, B_FALSE, B_FALSE, player->maxmp);
|
||||
if (prompt.nchoices > 0) {
|
||||
objecttype_t *ot;
|
||||
getchoicestr(&prompt, B_TRUE, B_TRUE);
|
||||
ot = prompt.result;
|
||||
if (ot) {
|
||||
if (prompt.whichq == 0) { // learn the spell
|
||||
addtempflag(player->flags, F_CANCAST, ot->id, NA, NA, NULL, FROMJOB);
|
||||
done = B_TRUE;
|
||||
} else {
|
||||
describespell(ot);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
msg("There are no new spells for you to learn at this time.");
|
||||
done = B_TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void setcol(WINDOW *win, enum COLOUR col) {
|
||||
if (needsbold(col)) {
|
||||
wattron(win, A_BOLD);
|
||||
|
@ -13874,8 +13906,8 @@ void wingame(void) {
|
|||
msg("^%c\"ALL HAIL THE NEW GOD OF %s!!\"", getlfcol(player, CC_VGOOD), buf);
|
||||
more();
|
||||
free(buf);
|
||||
killflag(tempflag[0]);
|
||||
killflag(tempflag[1]);
|
||||
//killflag(tempflag[0]);
|
||||
//killflag(tempflag[1]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
1
io.h
1
io.h
|
@ -130,6 +130,7 @@ void redrawpause(void);
|
|||
void redrawresume(void);
|
||||
void restoregamewindows(void);
|
||||
int screenglyphmatches(int x, int y, glyph_t *g);
|
||||
void select_new_spell(enum SPELLSCHOOL ss);
|
||||
void setcol(WINDOW *win, enum COLOUR col);
|
||||
void unsetcol(WINDOW *win, enum COLOUR col);
|
||||
void setobcolour(WINDOW *win, object_t *o, int set);
|
||||
|
|
74
lf.c
74
lf.c
|
@ -1110,9 +1110,11 @@ int canquaff(lifeform_t *lf, object_t *o) {
|
|||
// can lf reach victim to attack them?
|
||||
int canreach(lifeform_t *lf, lifeform_t *victim, int *reachpenalty) {
|
||||
enum LFSIZE sizetoreach = SZ_ANY;
|
||||
int pen = 0;
|
||||
// harder to hit flying/levitating enemies, unless you are
|
||||
// large (ie. tall) enough to reach them.
|
||||
// if you are smaller than "sizetoreach", you get a penalty
|
||||
if (reachpenalty) *reachpenalty = 0;
|
||||
if (!isairborne(lf)) {
|
||||
switch (isairborne(victim)) {
|
||||
case F_FLYING:
|
||||
|
@ -1140,8 +1142,12 @@ int canreach(lifeform_t *lf, lifeform_t *victim, int *reachpenalty) {
|
|||
if (reachpenalty) *reachpenalty = 0;
|
||||
return B_TRUE;
|
||||
}
|
||||
pen = sizetoreach - getlfsize(lf);
|
||||
if (pen > 0) {
|
||||
if (reachpenalty) *reachpenalty = (sizetoreach - getlfsize(lf));
|
||||
return B_FALSE;
|
||||
}
|
||||
return B_TRUE;
|
||||
}
|
||||
|
||||
// can lf reach victim's bodypart bp?
|
||||
|
@ -2924,7 +2930,7 @@ void die(lifeform_t *lf) {
|
|||
}
|
||||
|
||||
// a god died?
|
||||
if (getraceclass(lf) == RC_GOD) {
|
||||
if ((getraceclass(lf) == RC_GOD) && !isplayer(lf)) {
|
||||
flag_t *f;
|
||||
// update godlf pointer
|
||||
for (i = 0; i < ngodlfs; i++) {
|
||||
|
@ -2940,6 +2946,7 @@ void die(lifeform_t *lf) {
|
|||
|
||||
if (!willbecomeghost) {
|
||||
if (thisisplayer && hasjob(lf, J_GOD)) {
|
||||
if (!lfhasflag(lf, F_WINNER)) {
|
||||
char ch;
|
||||
msg("^BYou are about to die..."); more();
|
||||
ch = askchar("Die", "yn", "n", B_TRUE, B_FALSE);
|
||||
|
@ -2950,6 +2957,7 @@ void die(lifeform_t *lf) {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// special cases based on race id
|
||||
if (lf->race->id == R_BABAYAGAHUT) {
|
||||
|
@ -5134,28 +5142,7 @@ void enhanceskills(lifeform_t *lf) {
|
|||
addtempflag(lf->flags, F_CANCAST, f->val[1], NA, NA, NULL, FROMJOB);
|
||||
} else if ((f->id == F_LEVSPELLSCHOOL) && !lfhasflag(lf, F_NOSPELLS)) { // select a spell from school
|
||||
if (isplayer(lf)) {
|
||||
int done = B_FALSE;
|
||||
char qbuf[BUFLEN];
|
||||
sprintf(qbuf, "Learn which new spell (maxmp=%d):", getmaxmp(player));
|
||||
while (!done) {
|
||||
makespellchoicelist(&prompt, player, qbuf, "Describe which spell:", f->val[1], B_TRUE, B_FALSE, B_FALSE, player->maxmp);
|
||||
if (prompt.nchoices > 0) {
|
||||
objecttype_t *ot;
|
||||
getchoicestr(&prompt, B_TRUE, B_TRUE);
|
||||
ot = prompt.result;
|
||||
if (ot) {
|
||||
if (prompt.whichq == 0) { // learn the spell
|
||||
addtempflag(lf->flags, F_CANCAST, ot->id, NA, NA, NULL, FROMJOB);
|
||||
done = B_TRUE;
|
||||
} else {
|
||||
describespell(ot);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
msg("There are no new spells for you to learn at this time.");
|
||||
done = B_TRUE;
|
||||
}
|
||||
}
|
||||
select_new_spell(f->val[1]);
|
||||
} else {
|
||||
// monster gets random spell
|
||||
makespellchoicelist(&prompt, lf, "xx","xx:", f->val[1], B_TRUE, B_FALSE, B_FALSE, lf->maxmp);
|
||||
|
@ -6241,11 +6228,13 @@ void gainxp(lifeform_t *lf, long amt) {
|
|||
amtneeded = getspforpoint(lf);
|
||||
assert(amtneeded > 0);
|
||||
|
||||
/*
|
||||
// would you gain more than 5 levels? probably a bug!
|
||||
if (((lf->skillxp + amt) / amtneeded) >= 3) {
|
||||
raise(SIGINT);
|
||||
}
|
||||
lf->skillxp += amt;
|
||||
*/
|
||||
|
||||
assert(lf->skillxp >= 0);
|
||||
while (lf->skillxp >= amtneeded) {
|
||||
|
@ -11356,7 +11345,7 @@ void givestartobs(lifeform_t *lf, object_t *targob, flagpile_t *fp) {
|
|||
case RANDOM: depthmod = rnd(0,MAXDEPTH); break;
|
||||
default: break;
|
||||
}
|
||||
if (real_getrandomob(targmap, buf, targmap->depth + depthmod, NA, maxobsize, SK_NONE, B_TRUE, OC_NONE, DT_NONE)) {
|
||||
if (real_getrandomob(targmap, buf, targmap->depth + depthmod, NA, maxobsize, SK_NONE, B_TRUE, OC_NONE, DT_NONE, F_NONE)) {
|
||||
if (isshop) apply_shopob_restrictions(buf);
|
||||
o = addob(op, buf);
|
||||
}
|
||||
|
@ -11374,7 +11363,7 @@ void givestartobs(lifeform_t *lf, object_t *targob, flagpile_t *fp) {
|
|||
case RANDOM: depthmod = rnd(0,MAXDEPTH); break;
|
||||
default: break;
|
||||
}
|
||||
if (real_getrandomob(targmap, buf, targmap->depth + depthmod, NA, maxobsize, SK_NONE, B_TRUE, OC_NONE, val[1], DT_NONE)) {
|
||||
if (real_getrandomob(targmap, buf, targmap->depth + depthmod, NA, maxobsize, SK_NONE, B_TRUE, OC_NONE, val[1], DT_NONE, F_NONE)) {
|
||||
if (db) snprintf(buf2, BUFLEN, "finished startobdt successfuly.");
|
||||
if (isshop) apply_shopob_restrictions(buf);
|
||||
o = addob(op, buf);
|
||||
|
@ -11396,7 +11385,7 @@ void givestartobs(lifeform_t *lf, object_t *targob, flagpile_t *fp) {
|
|||
case RANDOM: depthmod = rnd(0,MAXDEPTH); break;
|
||||
default: break;
|
||||
}
|
||||
if (real_getrandomob(targmap, buf, targmap->depth + depthmod, NA, maxobsize, val[1], B_TRUE, OC_NONE, DT_NONE)) {
|
||||
if (real_getrandomob(targmap, buf, targmap->depth + depthmod, NA, maxobsize, val[1], B_TRUE, OC_NONE, DT_NONE, F_NONE)) {
|
||||
char buf3[BUFLEN];
|
||||
if (db) snprintf(buf2, BUFLEN, "finished startobwepsk successfuly.");
|
||||
sprintf(buf3, "%s%s%s",text,strlen(text) ? " " : "",buf);
|
||||
|
@ -11421,7 +11410,7 @@ void givestartobs(lifeform_t *lf, object_t *targob, flagpile_t *fp) {
|
|||
|
||||
//obdb = B_TRUE;
|
||||
if (real_getrandomob(targmap, buf, getmapdifficulty(targmap) + depthmod, NA, maxobsize, SK_NONE, B_TRUE,
|
||||
val[1], OC_NONE, DT_NONE)) {
|
||||
val[1], OC_NONE, DT_NONE, F_NONE)) {
|
||||
if (db) snprintf(buf2, BUFLEN, "finished startobclass, success.");
|
||||
if (isshop) apply_shopob_restrictions(buf);
|
||||
o = addob(op, buf);
|
||||
|
@ -13139,6 +13128,7 @@ int isgod(lifeform_t *lf) {
|
|||
}
|
||||
|
||||
int ishelplessvictim(lifeform_t *victim, lifeform_t *attacker, enum HELPLESSTYPE *how) {
|
||||
if (!cansee(attacker, victim)) return B_FALSE;
|
||||
if (isfleeing(victim)) {
|
||||
if (how) *how = HL_FLEEING;
|
||||
return B_TRUE;
|
||||
|
@ -18428,14 +18418,22 @@ void setrace(lifeform_t *lf, enum RACE rid, int frompolymorph) {
|
|||
|
||||
// inherit most flags from race
|
||||
for (f = lf->race->flags->first ; f ; f = f->next) {
|
||||
int ignorethis = B_FALSE;
|
||||
switch (f->id) {
|
||||
case F_RARITY:
|
||||
case F_MPDICE:
|
||||
break;
|
||||
default:
|
||||
if ((f->condition == FC_IFMONSTER) && isplayer(lf)) {
|
||||
ignorethis = B_TRUE;
|
||||
} else if ((f->condition == FC_IFPLAYER) && !isplayer(lf)) {
|
||||
ignorethis = B_TRUE;
|
||||
}
|
||||
if (!ignorethis) {
|
||||
//if (gamemode == GM_GAMESTARTED) checkmapflags(player->cell->map); // debugging
|
||||
addflag_real(lf->flags, f->id, f->val[0], f->val[1], f->val[2], f->text, FROMRACE, f->known, -1);
|
||||
//if (gamemode == GM_GAMESTARTED) checkmapflags(player->cell->map); // debugging
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -19835,6 +19833,7 @@ void startlfturn(lifeform_t *lf) {
|
|||
|
||||
f = lfhasflag(lf, F_AUTOCREATEOB);
|
||||
if (f) {
|
||||
if (lf->cell->habitat->id != H_HEAVEN) {
|
||||
int radius;
|
||||
radius = f->val[0];
|
||||
if (radius == -1) {
|
||||
|
@ -19848,6 +19847,7 @@ void startlfturn(lifeform_t *lf) {
|
|||
addobsinradius(lf->cell, f->val[0], DT_COMPASS, f->text, B_FALSE, lf);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// handle life objects
|
||||
f = lfhasflag(lf, F_LIFEOB);
|
||||
|
@ -20386,6 +20386,7 @@ void startlfturn(lifeform_t *lf) {
|
|||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
f = hasflag(o->flags, F_GODSTONE);
|
||||
if (f && (f->val[2] == B_TRUE)) {
|
||||
flag_t *f2;
|
||||
|
@ -20396,6 +20397,7 @@ void startlfturn(lifeform_t *lf) {
|
|||
godsay(god->id, B_TRUE, "Mortal! Do not touch that!"); more();
|
||||
f->val[2] = B_FALSE;
|
||||
}
|
||||
*/
|
||||
|
||||
f = hasflag(o->flags, F_WALKDAM);
|
||||
if (f) {
|
||||
|
@ -21887,7 +21889,23 @@ int usestairs(lifeform_t *lf, object_t *o, int onpurpose, int climb) {
|
|||
|
||||
// locked?
|
||||
if (hasflag(o->flags, F_LOCKED)) {
|
||||
if (isplayer(lf)) msg("The %s seems to be locked.", noprefix(obname));
|
||||
if (isplayer(lf)) {
|
||||
msg("The %s seems to be locked.", noprefix(obname));
|
||||
if (o->type->id == OT_VSTAIRSDOWN) {
|
||||
object_t *key;
|
||||
key = hasobwithflag(lf->pack, F_VAULTKEY);
|
||||
if (key) {
|
||||
char ques[BUFLEN],obname[BUFLEN],ch;
|
||||
getobname(key, obname, 1);
|
||||
sprintf(ques,"Use your %s to open it?", noprefix(obname));
|
||||
ch = askchar(ques,"yn","n", B_TRUE, B_FALSE);
|
||||
if (ch == 'y') {
|
||||
operate(lf, key, lf->cell);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (onpurpose) taketime(lf, getmovespeed(lf));
|
||||
return B_TRUE;
|
||||
}
|
||||
|
|
270
map.c
270
map.c
|
@ -301,6 +301,13 @@ lifeform_t *addmonster(cell_t *c, enum RACE rid, char *racename, int randomjobok
|
|||
if (db) dbtime("checking for job");
|
||||
lf->born = B_FALSE;
|
||||
|
||||
// special case for vaults
|
||||
if (c->map->habitat->id == H_MASTERVAULTS) {
|
||||
if (hasflagval(lf->flags, F_STARTJOB, NA, J_GUARD, NA, NULL)) {
|
||||
wantjob = J_GUARD;
|
||||
}
|
||||
}
|
||||
|
||||
if (wantjob == J_NONE) {
|
||||
if (randomjobok) {
|
||||
int nretflags,i;
|
||||
|
@ -594,7 +601,7 @@ object_t *addrandomob(cell_t *c) {
|
|||
return NULL;
|
||||
}
|
||||
|
||||
if (real_getrandomob(c->map, buf, NA, c->habitat->id, SZ_MAX, SK_NONE, B_FALSE, OC_NONE, DT_NONE)) {
|
||||
if (real_getrandomob(c->map, buf, NA, c->habitat->id, SZ_MAX, SK_NONE, B_FALSE, OC_NONE, DT_NONE, F_NONE)) {
|
||||
if (db) dblog("adding rand obj %s to cell %d,%d",buf,c->x,c->y);
|
||||
o = addob(c->obpile, buf);
|
||||
}
|
||||
|
@ -732,7 +739,8 @@ int getroomid(cell_t *c) {
|
|||
|
||||
// whichside should be D_ORTH
|
||||
// for now, this function will NOT include room corners
|
||||
void getroomedge(map_t *map, int roomid, int minx, int miny, int maxx, int maxy, int whichside, cell_t **retcell, int *ncells, int onlywantsolid) {
|
||||
// if 'includefixed' is passed then walls in vaults with maintainedge ARE included.
|
||||
void getroomedge(map_t *map, int roomid, int minx, int miny, int maxx, int maxy, int whichside, cell_t **retcell, int *ncells, int onlywantsolid, int includefixed) {
|
||||
int x,y;
|
||||
cell_t *c;
|
||||
*ncells = 0;
|
||||
|
@ -740,6 +748,7 @@ void getroomedge(map_t *map, int roomid, int minx, int miny, int maxx, int maxy,
|
|||
y = miny;
|
||||
for (x = minx+1; x <= maxx-1; x++) {
|
||||
c = getcellat(map, x, y);
|
||||
if (!includefixed && cellisfixedvaultwall(c)) continue;
|
||||
if (!onlywantsolid || c->type->solid) {
|
||||
retcell[*ncells] = getcellat(map, x, y);
|
||||
(*ncells)++;
|
||||
|
@ -749,6 +758,7 @@ void getroomedge(map_t *map, int roomid, int minx, int miny, int maxx, int maxy,
|
|||
y = maxy;
|
||||
for (x = minx+1; x <= maxx-1; x++) {
|
||||
c = getcellat(map, x, y);
|
||||
if (!includefixed && cellisfixedvaultwall(c)) continue;
|
||||
if (!onlywantsolid || c->type->solid) {
|
||||
retcell[*ncells] = getcellat(map, x, y);
|
||||
(*ncells)++;
|
||||
|
@ -758,6 +768,7 @@ void getroomedge(map_t *map, int roomid, int minx, int miny, int maxx, int maxy,
|
|||
x = minx;
|
||||
for (y = miny+1; y <= maxy-1; y++) {
|
||||
c = getcellat(map, x, y);
|
||||
if (!includefixed && cellisfixedvaultwall(c)) continue;
|
||||
if (!onlywantsolid || c->type->solid) {
|
||||
retcell[*ncells] = getcellat(map, x, y);
|
||||
(*ncells)++;
|
||||
|
@ -767,6 +778,7 @@ void getroomedge(map_t *map, int roomid, int minx, int miny, int maxx, int maxy,
|
|||
x = maxx;
|
||||
for (y = miny+1; y <= maxy-1; y++) {
|
||||
c = getcellat(map, x, y);
|
||||
if (!includefixed && cellisfixedvaultwall(c)) continue;
|
||||
if (!onlywantsolid || c->type->solid) {
|
||||
retcell[*ncells] = getcellat(map, x, y);
|
||||
(*ncells)++;
|
||||
|
@ -969,11 +981,11 @@ int autodoors(map_t *map, int roomid, int minx, int miny, int maxx, int maxy, in
|
|||
// place a door.
|
||||
for (d = D_N; d <= D_W; d++) {
|
||||
npossible = 0;
|
||||
getroomedge(map, roomid, minx, miny, maxx, maxy, d, cell, &ncells, B_TRUE);
|
||||
getroomedge(map, roomid, minx, miny, maxx, maxy, d, cell, &ncells, B_TRUE, B_FALSE);
|
||||
for (i = 0; i < ncells; i++) {
|
||||
cell_t *newcell;
|
||||
|
||||
if (cellisfixedvaultwall(cell[i])) continue;
|
||||
//if (cellisfixedvaultwall(cell[i])) continue;
|
||||
|
||||
// is there empty space on the other side of this wall segment?
|
||||
newcell = getcellindir(cell[i], d);
|
||||
|
@ -1024,18 +1036,17 @@ int autodoors(map_t *map, int roomid, int minx, int miny, int maxx, int maxy, in
|
|||
if (doorsadded == 0) {
|
||||
int i,d,used[MAXDIR_ORTH],poss[MAXDIR_ORTH];
|
||||
int dodoor[MAXDIR_ORTH];
|
||||
int ndodoors = 0;
|
||||
int ndoors,nposs = 0;
|
||||
|
||||
int ndoors,maxdoors,nposs = 0;
|
||||
int sel;
|
||||
//
|
||||
for (d = D_N; d <= D_W; d++) {
|
||||
used[d] = B_FALSE;
|
||||
}
|
||||
// no possible door locations - add a random number
|
||||
ndoors = rnd(1,4);
|
||||
maxdoors = rnd(1,4);
|
||||
ndoors = 0;
|
||||
|
||||
for (i = 0; i < ndoors; i++) {
|
||||
for (i = 0; i < maxdoors; i++) {
|
||||
// find a dir we haven't already used
|
||||
nposs = 0;
|
||||
for (d = D_N; d <= D_W; d++) {
|
||||
|
@ -1046,14 +1057,14 @@ int autodoors(map_t *map, int roomid, int minx, int miny, int maxx, int maxy, in
|
|||
}
|
||||
sel = rnd(0,nposs-1);
|
||||
used[poss[sel]] = B_TRUE;
|
||||
dodoor[ndodoors] = poss[sel];
|
||||
dodoor[ndoors++] = poss[sel];
|
||||
}
|
||||
|
||||
// actually make the doors
|
||||
for (i = 0; i < ndodoors; i++) {
|
||||
for (i = 0; i < ndoors; i++) {
|
||||
int sel;
|
||||
d = dodoor[i];
|
||||
getroomedge(map, roomid, minx, miny, maxx, maxy, d, cell, &ncells, B_TRUE);
|
||||
getroomedge(map, roomid, minx, miny, maxx, maxy, d, cell, &ncells, B_TRUE, B_FALSE);
|
||||
if (ncells) {
|
||||
sel = rnd(0,ncells-1);
|
||||
if (rnd(1,100) <= doorpct) {
|
||||
|
@ -2516,7 +2527,8 @@ void calclight(map_t *map) {
|
|||
|
||||
}
|
||||
|
||||
int calcroompos(map_t *map, int w, int h, int xmargin, int ymargin, int *bx, int *by, int force) {
|
||||
// if "stayclose" is non-zero, then room must be within 'stayclose' cells of another room.
|
||||
int calcroompos(map_t *map, int w, int h, int xmargin, int ymargin, int *bx, int *by, int force, int stayclose) {
|
||||
int x,y,i;
|
||||
int bestscore = 9888;
|
||||
coord_t coord[MAX_MAPW*MAX_MAPH];
|
||||
|
@ -2549,6 +2561,56 @@ int calcroompos(map_t *map, int w, int h, int xmargin, int ymargin, int *bx, int
|
|||
int valid = B_TRUE;
|
||||
int rx,ry;
|
||||
score = 0;
|
||||
if (stayclose) {
|
||||
int disttoroom = 999;
|
||||
int n;
|
||||
for (n = 1; n <= stayclose; n++) {
|
||||
int startx,starty,endx,endy;
|
||||
startx = x - n;
|
||||
starty = y - n;
|
||||
endx = x+w + (n-1);
|
||||
endy = y+h + (n-1);
|
||||
limit(&startx, 0, map->w-1);
|
||||
limit(&starty, 0, map->h-1);
|
||||
limit(&endx, 0, map->w-1);
|
||||
limit(&endy, 0, map->h-1);
|
||||
for (ry = starty; ry <= endy; ry++) {
|
||||
// check all x vals for top / bottom
|
||||
if ((ry == starty) || (ry == endy)) {
|
||||
for (rx = startx; rx <= endx; rx++) {
|
||||
cell = getcellat(map, rx,ry);
|
||||
// near a room?
|
||||
if (cell && isroom(cell)) {
|
||||
disttoroom = n;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// otherwise just check l/r
|
||||
cell = getcellat(map, startx,ry);
|
||||
if (cell && isroom(cell)) {
|
||||
disttoroom = n;
|
||||
} else {
|
||||
cell = getcellat(map, endx,ry);
|
||||
if (cell && isroom(cell)) {
|
||||
disttoroom = n;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (disttoroom != 999) break;
|
||||
}
|
||||
|
||||
if (disttoroom != 999) break;
|
||||
}
|
||||
if (disttoroom > stayclose) {
|
||||
// can't do this one.
|
||||
valid = B_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (valid) {
|
||||
// calculate score if we placed the room with its top left corner here.
|
||||
for (ry = y; (ry < y+h) && valid; ry++) {
|
||||
for (rx = x; (rx < x+w) && valid; rx++) {
|
||||
|
@ -2606,7 +2668,7 @@ int calcroompos(map_t *map, int w, int h, int xmargin, int ymargin, int *bx, int
|
|||
// avoid being adjacent to other room walls
|
||||
if (countcellexits(cell, DT_ORTH)) score++;
|
||||
|
||||
score += (countadjrooms(cell)*3);
|
||||
score += (countadjrooms(cell, DT_ORTH)*3);
|
||||
|
||||
// overlapping another room?
|
||||
if (isroom(cell)) {
|
||||
|
@ -2619,6 +2681,8 @@ int calcroompos(map_t *map, int w, int h, int xmargin, int ymargin, int *bx, int
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (valid) {
|
||||
if (score < bestscore) {
|
||||
if (db) dblog("new best score: %d (topleft at %d,%d)",score,x,y);
|
||||
|
@ -2707,11 +2771,17 @@ int countadjcellsoftype(cell_t *cell, enum CELLTYPE id, int dirtype) {
|
|||
return count;
|
||||
}
|
||||
|
||||
int countadjrooms(cell_t *cell) {
|
||||
int countadjrooms(cell_t *cell, int dirtype) {
|
||||
int d;
|
||||
int count = 0;
|
||||
cell_t *newcell;
|
||||
for (d = D_N; d < MAXDIR_ORTH; d++) {
|
||||
int start, end;
|
||||
if (dirtype == DT_COMPASS) {
|
||||
start = DC_N; end = DC_NW;
|
||||
} else {
|
||||
start = D_N; end = D_W;
|
||||
}
|
||||
for (d = start; d <= end; d++) {
|
||||
newcell = getcellindir(cell, d);
|
||||
if (newcell && isroom(newcell)) {
|
||||
count++;
|
||||
|
@ -2851,18 +2921,22 @@ void createantnest(map_t *map, int depth, map_t *parentmap, int exitdir, object_
|
|||
enum CELLTYPE emptycell,solidcell;
|
||||
int ndug = 0;
|
||||
|
||||
// what kind of cells will 'empty' ones be?
|
||||
emptycell = getmapempty(map);
|
||||
solidcell = getmapsolid(map);
|
||||
|
||||
// fill entire maze with walls
|
||||
for (y = 0; y < map->h; y++) {
|
||||
for (x = 0; x < map->w; x++) {
|
||||
addcell(map, x, y);
|
||||
c = getcellat(map, x, y);
|
||||
if (!c->locked) {
|
||||
setcelltype(c, solidcell);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
map->illumination = IL_FULLLIT;
|
||||
|
||||
// what kind of cells will 'empty' ones be?
|
||||
emptycell = getmapempty(map);
|
||||
solidcell = getmapsolid(map);
|
||||
|
||||
// pick initial random point
|
||||
c = getrandomcell(map);
|
||||
|
@ -2877,6 +2951,7 @@ void createantnest(map_t *map, int depth, map_t *parentmap, int exitdir, object_
|
|||
|
||||
}
|
||||
|
||||
|
||||
void createborder(map_t *map, enum CELLTYPE solidtype) {
|
||||
int x,y;
|
||||
cell_t *c;
|
||||
|
@ -2921,8 +2996,8 @@ void createbyhut(map_t *map, int depth, map_t *parentmap, int exitdir, object_t
|
|||
// fill entire maze with walls
|
||||
for (y = 0; y < map->h; y++) {
|
||||
for (x = 0; x < map->w; x++) {
|
||||
c = addcell(map, x, y);
|
||||
setcelltype(c, solidcell);
|
||||
c = getcellat(map, x, y);
|
||||
if (!c->locked) setcelltype(c, solidcell);
|
||||
}
|
||||
}
|
||||
// add a random babayaga's hut vault
|
||||
|
@ -2977,7 +3052,7 @@ void createcave(map_t *map, int depth, map_t *parentmap, int exitdir, object_t *
|
|||
for (y = 0; y < map->h; y++) {
|
||||
for (x = 0; x < map->w; x++) {
|
||||
c = getcellat(map, x, y);
|
||||
setcelltype(c, solidcell);
|
||||
if (!c->locked) setcelltype(c, solidcell);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3013,7 +3088,7 @@ void createcave(map_t *map, int depth, map_t *parentmap, int exitdir, object_t *
|
|||
}
|
||||
}
|
||||
// just do a normal room
|
||||
calcposandmakeroom(map, map->nrooms, NA, NA, DEF_VAULTMARGIN, DEF_VAULTMARGIN, NULL, NULL, NULL, NULL, 50, B_FALSE);
|
||||
calcposandmakeroom(map, map->nrooms, NA, NA, NA, NA, DEF_VAULTMARGIN, DEF_VAULTMARGIN, NULL, NULL, NULL, NULL, 50, 25, B_FALSE, 0);
|
||||
//roomvault[i] = B_FALSE;
|
||||
}
|
||||
}
|
||||
|
@ -3057,8 +3132,8 @@ void createdungeon(map_t *map, int depth, map_t *parentmap, int exitdir, object_
|
|||
int turnpct = DEF_TURNPCT;
|
||||
int sparseness = DEF_SPARSENESS;
|
||||
int looppct = DEF_LOOPPCT;
|
||||
int minrooms = MINROOMS;
|
||||
int maxrooms = MAXROOMS;
|
||||
int minrooms = MINROOMS_DUN;
|
||||
int maxrooms = MAXROOMS_DUN;
|
||||
enum CORRIDORTYPE corridortype = CDT_NORMAL;
|
||||
|
||||
int moved = 0;
|
||||
|
@ -3380,7 +3455,7 @@ void createdungeon(map_t *map, int depth, map_t *parentmap, int exitdir, object_
|
|||
}
|
||||
}
|
||||
// just do a normal room
|
||||
calcposandmakeroom(map, map->nrooms, NA, NA, DEF_VAULTMARGIN, DEF_VAULTMARGIN, NULL, NULL, NULL, NULL, 50, B_FALSE);
|
||||
calcposandmakeroom(map, map->nrooms, NA, NA, NA, NA, DEF_VAULTMARGIN, DEF_VAULTMARGIN, NULL, NULL, NULL, NULL, 50, 25, B_FALSE, 0);
|
||||
//roomvault[i] = B_FALSE;
|
||||
}
|
||||
}
|
||||
|
@ -3525,7 +3600,7 @@ void createforest(map_t *map, int depth, map_t *parentmap, int exitdir, object_t
|
|||
for (y = 0; y < map->h; y++) {
|
||||
for (x = 0; x < map->w; x++) {
|
||||
c = getcellat(map, x, y);
|
||||
setcelltype(c, onein(4) ? CT_DIRT : emptycell );
|
||||
if (!c->locked) setcelltype(c, onein(4) ? CT_DIRT : emptycell );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3630,6 +3705,9 @@ void createhabitat(map_t *map, int depth, map_t *parentmap, int exitdir, object_
|
|||
case H_HEAVEN:
|
||||
createheaven(map, depth, parentmap, exitdir, entryob);
|
||||
break;
|
||||
case H_MASTERVAULTS:
|
||||
createmastervaults(map, depth, parentmap, exitdir, entryob);
|
||||
break;
|
||||
case H_PIT:
|
||||
createpit(map, depth, parentmap, exitdir, entryob);
|
||||
break;
|
||||
|
@ -3669,8 +3747,8 @@ void createheaven(map_t *map, int depth, map_t *parentmap, int exitdir, object_t
|
|||
// fill entire maze with walls
|
||||
for (y = 0; y < map->h; y++) {
|
||||
for (x = 0; x < map->w; x++) {
|
||||
c = addcell(map, x, y);
|
||||
setcelltype(c, solidcell);
|
||||
c = getcellat(map, x, y);
|
||||
if (!c->locked) setcelltype(c, solidcell);
|
||||
}
|
||||
}
|
||||
// add a random heaven vault
|
||||
|
@ -4020,6 +4098,7 @@ void createmap(map_t *map, int depth, region_t *region, map_t *parentmap, int ex
|
|||
c->locked = B_TRUE;
|
||||
}
|
||||
}
|
||||
nprevaults++;
|
||||
}
|
||||
} // for each remembered thing
|
||||
|
||||
|
@ -4294,11 +4373,13 @@ void createmap(map_t *map, int depth, region_t *region, map_t *parentmap, int ex
|
|||
c = getcellat(map, x, y);
|
||||
if (c) {
|
||||
// add random obs, but not in vaults
|
||||
if (isempty(c) && !getcellvault(c)) {
|
||||
if (isempty(c)) {
|
||||
if (!getcellvault(c) || (c->habitat->id == H_HEAVEN)) {
|
||||
if (rnd(1,100) <= c->habitat->randthingpct) {
|
||||
addrandomthing(c, c->habitat->randobpct, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
// remove bad objects
|
||||
if (!c->room) {
|
||||
object_t *o,*nexto;
|
||||
|
@ -4403,9 +4484,11 @@ void createsewer(map_t *map, int depth, map_t *parentmap, int exitdir, object_t
|
|||
for (y = 0; y < map->h; y++) {
|
||||
for (x = 0; x < map->w; x++) {
|
||||
c = getcellat(map, x, y);
|
||||
if (!c->locked) {
|
||||
setcelltype(c, getcellempty(c));
|
||||
}
|
||||
}
|
||||
}
|
||||
roomon = malloc((roomcountx * roomcounty) * sizeof(int));
|
||||
rowfirst = malloc(roomcounty * sizeof(int));
|
||||
rowlast = malloc(roomcounty * sizeof(int));
|
||||
|
@ -4594,11 +4677,13 @@ void createsewer(map_t *map, int depth, map_t *parentmap, int exitdir, object_t
|
|||
void createstomach(map_t *map, int depth, map_t *parentmap, int exitdir, object_t *entryob) {
|
||||
vault_t *v;
|
||||
int x,y;
|
||||
cell_t *c;
|
||||
|
||||
// fill entire maze with walls
|
||||
for (y = 0; y < map->h; y++) {
|
||||
for (x = 0; x < map->w; x++) {
|
||||
addcell(map, x, y);
|
||||
c = getcellat(map, x, y);
|
||||
if (!c->locked) setcelltype(c, getcellsolid(c));
|
||||
}
|
||||
}
|
||||
// add a random worm vault
|
||||
|
@ -4698,7 +4783,7 @@ int createvault(map_t *map, int roomid, vault_t *v, int *retw, int *reth, int *r
|
|||
// - we don't do autodoors (will handle this further down) -------------
|
||||
minw = f->val[0];
|
||||
minh = f->val[1];
|
||||
if (calcposandmakeroom(map, roomid, minw, minh, xmargin, ymargin, &minx, &miny, &w, &h, B_NODOORS, B_TRUE)) {
|
||||
if (calcposandmakeroom(map, roomid, minw, minh, NA, NA, xmargin, ymargin, &minx, &miny, &w, &h, B_NODOORS, 0, B_TRUE, 0)) {
|
||||
return B_TRUE;
|
||||
}
|
||||
if (db) dblog("made random vault %s at pos %d,%d on map %s", v->id, minx, miny, map->name);
|
||||
|
@ -4710,7 +4795,7 @@ int createvault(map_t *map, int roomid, vault_t *v, int *retw, int *reth, int *r
|
|||
//h = v->h;
|
||||
getvaultwh(v, &w, &h, rotation);
|
||||
// find vault position
|
||||
if (calcroompos(map, w, h, xmargin, ymargin, &minx, &miny, B_TRUE)) {
|
||||
if (calcroompos(map, w, h, xmargin, ymargin, &minx, &miny, B_TRUE, 0)) {
|
||||
// forced calcroompos should never fail since it's
|
||||
// allowed to overlap other rooms.
|
||||
dblog("** couldn't find position for vault %s (roomid %d)!\n", v->id, roomid);
|
||||
|
@ -5359,6 +5444,81 @@ int linkexits(map_t *m, int roomid) {
|
|||
return nadded;
|
||||
}
|
||||
|
||||
void createmastervaults(map_t *map, int depth, map_t *parentmap, int exitdir, object_t *entryob) {
|
||||
int x,y,i;
|
||||
cell_t *c;
|
||||
enum CELLTYPE emptycell,solidcell;
|
||||
int nextrarooms;
|
||||
int minw,minh,maxw,maxh;
|
||||
int xmarg,ymarg;
|
||||
int db = B_TRUE,rv;
|
||||
|
||||
minw = 5;
|
||||
minh = 5;
|
||||
maxw = 10;
|
||||
maxh = 10;
|
||||
|
||||
xmarg = 3;
|
||||
ymarg = 3;
|
||||
|
||||
// what kind of cells will 'empty' ones be?
|
||||
emptycell = getmapempty(map);
|
||||
solidcell = getmapsolid(map);
|
||||
|
||||
// fill entire maze with walls
|
||||
for (y = 0; y < map->h; y++) {
|
||||
for (x = 0; x < map->w; x++) {
|
||||
c = getcellat(map, x, y);
|
||||
if (!c->locked) setcelltype(c, solidcell);
|
||||
}
|
||||
}
|
||||
|
||||
map->illumination = IL_FULLLIT;
|
||||
|
||||
// place initial random room. make sure it works!
|
||||
rv = B_TRUE;
|
||||
while (rv) {
|
||||
rv = calcposandmakeroom(map, map->nrooms, minw,minh,maxw,maxh, xmarg,ymarg, NULL, NULL, NULL, NULL, 100, 0, B_TRUE, 0);
|
||||
}
|
||||
|
||||
|
||||
// place more rooms, but they must be within 3 cells of each other.
|
||||
nextrarooms = rnd(4,8);
|
||||
for (i = 0; i < nextrarooms; i++) {
|
||||
if (calcposandmakeroom(map, map->nrooms, minw,minh,maxw,maxh, xmarg,ymarg, NULL, NULL, NULL, NULL, 100, 0, B_TRUE, 3)) {
|
||||
// failed.
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// clear all solid cells with adjacent rooms
|
||||
for (y = 0; y < map->h; y++) {
|
||||
for (x = 0; x < map->w; x++) {
|
||||
c = getcellat(map, x, y);
|
||||
if (issolid(c) && !isroom(c) && countadjrooms(c, DT_COMPASS)) {
|
||||
setcelltype(c, emptycell);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// place chests
|
||||
for (i = 0; i < map->nrooms; i++) {
|
||||
int nchests;
|
||||
nchests = rnd(1,5);
|
||||
c = getrandomroomcell(map, i, WE_WALKABLE);
|
||||
if (c) {
|
||||
addob(c->obpile, "random container");
|
||||
}
|
||||
}
|
||||
|
||||
// now do a border, just in case.
|
||||
createborder(map, solidcell);
|
||||
|
||||
if (db) dblog("linkexits complete (%d rooms added).", map->nrooms);
|
||||
|
||||
}
|
||||
|
||||
void createpit(map_t *map, int depth, map_t *parentmap, int exitdir, object_t *entryob) {
|
||||
object_t *o;
|
||||
cell_t *c;
|
||||
|
@ -5366,7 +5526,8 @@ void createpit(map_t *map, int depth, map_t *parentmap, int exitdir, object_t *e
|
|||
// fill entire maze with walls
|
||||
for (y = 0; y < map->h; y++) {
|
||||
for (x = 0; x < map->w; x++) {
|
||||
addcell(map, x, y);
|
||||
c = getcellat(map, x, y);
|
||||
if (!c->locked) setcelltype(c, getcellsolid(c));
|
||||
}
|
||||
}
|
||||
// select random spot
|
||||
|
@ -5518,7 +5679,7 @@ void createroom(map_t *map, int roomid, int x1, int y1, int x2, int y2, int forc
|
|||
}
|
||||
|
||||
// room w/h are returned in *w and *h if given.
|
||||
int calcposandmakeroom(map_t *map, int roomid, int overrideminw, int overrideminh, int xmargin, int ymargin, int *retx, int *rety, int *retw, int *reth, int doorpct, int forcewalls) {
|
||||
int calcposandmakeroom(map_t *map, int roomid, int overrideminw, int overrideminh, int overridemaxw, int overridemaxh, int xmargin, int ymargin, int *retx, int *rety, int *retw, int *reth, int doorpct, int dooropenchance, int forcewalls, int stayclose) {
|
||||
int minx,miny;
|
||||
int maxx,maxy;
|
||||
int w,h;
|
||||
|
@ -5533,6 +5694,12 @@ int calcposandmakeroom(map_t *map, int roomid, int overrideminw, int overridemin
|
|||
if (overrideminh != NA) {
|
||||
minroomh = overrideminh;
|
||||
}
|
||||
if (overridemaxw != NA) {
|
||||
maxroomw = overridemaxw;
|
||||
}
|
||||
if (overridemaxh != NA) {
|
||||
maxroomh = overridemaxh;
|
||||
}
|
||||
|
||||
// select random width/height
|
||||
w = rnd(minroomw, maxroomw);
|
||||
|
@ -5542,7 +5709,7 @@ int calcposandmakeroom(map_t *map, int roomid, int overrideminw, int overridemin
|
|||
if (reth) *reth = h;
|
||||
|
||||
// find room position
|
||||
if (calcroompos(map, w, h, xmargin, ymargin, &minx, &miny, B_FALSE)) {
|
||||
if (calcroompos(map, w, h, xmargin, ymargin, &minx, &miny, B_FALSE, stayclose)) {
|
||||
dblog("** couldn't make room!\n");
|
||||
return B_TRUE;
|
||||
}
|
||||
|
@ -5562,7 +5729,7 @@ int calcposandmakeroom(map_t *map, int roomid, int overrideminw, int overridemin
|
|||
|
||||
// add doors
|
||||
if (doorpct) {
|
||||
autodoors(map, roomid, minx, miny, maxx, maxy, doorpct, 25);
|
||||
autodoors(map, roomid, minx, miny, maxx, maxy, doorpct, dooropenchance);
|
||||
}
|
||||
|
||||
return B_FALSE;
|
||||
|
@ -7082,12 +7249,14 @@ void initmap(void) {
|
|||
addhabitat(H_SWAMP, "swamp", CT_CORRIDOR, CT_WALL, 3, 50, 0, MAXVISRANGE, OT_STAIRSUP, OT_STAIRSDOWN);
|
||||
addhabitat(H_BYHUT, "babayaga's hut", CT_FLOORWOOD, CT_WALLDWOOD, 0, 0, 0, MAXVISRANGE, OT_BYHUTDOOR, OT_NONE);
|
||||
addhabitat(H_ANTNEST, "ant nest", CT_DIRT, CT_WALLDIRT, 5, 40, 0, MAXVISRANGE, OT_STAIRSUP, OT_STAIRSDOWN);
|
||||
addhabitat(H_MASTERVAULTS, "master vaults", CT_FLOORDURANITE, CT_WALLDURANITE, 5, 0, 0, MAXVISRANGE, OT_VSTAIRSUP, OT_VSTAIRSDOWN);
|
||||
|
||||
// cell types - solid
|
||||
// floorheight, hp
|
||||
addcelltype(CT_WALL, "rock wall", UNI_SHADEDARK, C_GREY, B_SOLID, B_OPAQUE, MT_STONE, 0, 50);
|
||||
addcelltype(CT_WALLBRICK, "brick wall", UNI_SHADEDARK, C_ORANGE, B_SOLID, B_OPAQUE, MT_STONE, 0, 40);
|
||||
addcelltype(CT_WALLDIRT, "dirt wall", UNI_SHADEMED, C_BROWN, B_SOLID, B_OPAQUE, MT_STONE, 0, 20);
|
||||
addcelltype(CT_WALLDURANITE, "duranite wall", UNI_SHADEDARK, C_MAGENTA, B_SOLID, B_OPAQUE, MT_DURANITE, 0, 20000);
|
||||
addcelltype(CT_WALLWOOD, "wooden wall", UNI_SOLID, C_BROWN, B_SOLID, B_OPAQUE, MT_WOOD, 0, 30);
|
||||
addcelltype(CT_WALLDWOOD, "wyrmwood wall", UNI_SOLID, C_BROWN, B_SOLID, B_OPAQUE, MT_DRAGONWOOD, 0, 100);
|
||||
addcelltype(CT_WALLFLESH, "flesh wall", UNI_SOLID, C_RED, B_SOLID, B_OPAQUE, MT_FLESH, 0, 25);
|
||||
|
@ -7100,6 +7269,7 @@ void initmap(void) {
|
|||
addcelltype(CT_CORRIDOR, "rock floor", '.', C_GREY, B_EMPTY, B_TRANS, MT_STONE, 0, -1);
|
||||
addcelltype(CT_LOOPCORRIDOR, "rock floor", 'L', C_GREY, B_EMPTY, B_TRANS, MT_STONE, 0, -1);
|
||||
addcelltype(CT_FLOORCARPET, "carpetted floor", '.', C_RED, B_EMPTY, B_TRANS, MT_CLOTH, 0, -1);
|
||||
addcelltype(CT_FLOORDURANITE, "duranite floor", '.', C_MAGENTA, B_EMPTY, B_TRANS, MT_DURANITE, 0, -1);
|
||||
addcelltype(CT_FLOORWOOD, "wood floor", '.', C_BROWN, B_EMPTY, B_TRANS, MT_WOOD, 0, -1);
|
||||
addcelltype(CT_FLOORFLESH, "flesh floor", '.', C_RED, B_EMPTY, B_TRANS, MT_FLESH, 0, -1);
|
||||
addcelltype(CT_FLOORSHOP, "shop floor", '.', C_BROWN, B_EMPTY, B_TRANS, MT_WOOD, 0, -1);
|
||||
|
@ -7121,6 +7291,7 @@ void initmap(void) {
|
|||
addregiontype(RG_MAINDUNGEON, "The Main Dungeon", B_FALSE, H_DUNGEON, 25, 3, D_DOWN, B_TRUE, 0, B_FALSE);
|
||||
addregiontype(RG_CAVE, "The Goblin Caves", B_TRUE, H_CAVE, 5, 1, D_DOWN, B_TRUE, 2, B_FALSE);
|
||||
addregiontype(RG_WOODS, "The Sylvan Woods", B_TRUE, H_FOREST, 5, 3, D_DOWN, B_TRUE, 1, B_FALSE);
|
||||
addregiontype(RG_MASTERVAULTS, "The Master Vaults", B_TRUE, H_MASTERVAULTS, 3, 1, D_DOWN, B_TRUE, 5, B_TRUE);
|
||||
// minor branches
|
||||
addregiontype(RG_PIT, "A Pit", B_FALSE, H_PIT, 1, 1, D_DOWN, B_FALSE, 0, B_TRUE);
|
||||
addregiontype(RG_SEWER, "A Sewer", B_FALSE, H_SEWER, 1, 0, D_NONE, B_FALSE, 2, B_TRUE);
|
||||
|
@ -7133,7 +7304,12 @@ void initmap(void) {
|
|||
void initmaplayout(void) {
|
||||
//int vx[4],vy[4];
|
||||
int i;
|
||||
int lastlevel;
|
||||
regiontype_t *rt;
|
||||
// MAPMAPMAPMAP
|
||||
|
||||
rt = findregiontype(RG_MAINDUNGEON);
|
||||
lastlevel = rt->maxdepth;
|
||||
// region definitions (outlines)
|
||||
addregionoutline(RG_WORLDMAP);
|
||||
// link to first dungeon
|
||||
|
@ -7179,8 +7355,9 @@ void initmaplayout(void) {
|
|||
addregionthing(lastregionoutline, i, NA, NA, RT_LF, NA, "queen ant");
|
||||
// l11 - 14: swamp
|
||||
addregionthing(lastregionoutline, rnd(11,14), NA, NA, RT_HABITAT, H_SWAMP, NULL);
|
||||
|
||||
// l25: last level
|
||||
addregionthing(lastregionoutline, 25, NA, NA, RT_RNDVAULTWITHTAG, NA, "shrine"); // godstone on last floor
|
||||
addregionthing(lastregionoutline, lastlevel, NA, NA, RT_REGIONLINK, RG_MASTERVAULTS, "metal hatch leading down");
|
||||
|
||||
// 1-3 fixed sewers
|
||||
addregionthing(lastregionoutline, rnd(1,25), NA, NA, RT_REGIONLINK, RG_SEWER, "drainage grate");
|
||||
|
@ -7207,6 +7384,10 @@ void initmaplayout(void) {
|
|||
addregionoutline(RG_WOODS);
|
||||
addregionthing(lastregionoutline, 5, NA, NA, RT_RNDVAULTWITHTAG, NA, "forestboss");
|
||||
|
||||
addregionoutline(RG_MASTERVAULTS);
|
||||
rt = findregiontype(RG_MASTERVAULTS);
|
||||
addregionthing(lastregionoutline, rt->maxdepth, NA, NA, RT_RNDVAULTWITHTAG, NA, "shrine"); // godstone on last floor of master vaults.
|
||||
|
||||
// add initial regions
|
||||
addregion(RG_WORLDMAP, NULL, -1, 0, -1);
|
||||
addregion(RG_HEAVEN, NULL, -1, 0, -1);
|
||||
|
@ -7735,10 +7916,17 @@ void makedoor(cell_t *cell, int openchance) {
|
|||
|
||||
setcelltype(cell, getcellempty(cell));
|
||||
|
||||
strcpy(doorbuf, "");
|
||||
// in master vaults, doors are always locked.
|
||||
if (m->habitat->id == H_MASTERVAULTS) {
|
||||
strcpy(doorbuf, "locked ");
|
||||
}
|
||||
|
||||
|
||||
if ((rnd(1,100) + m->depth) >= 66) {
|
||||
strcpy(doorbuf, "iron door");
|
||||
strcat(doorbuf, "iron door");
|
||||
} else {
|
||||
strcpy(doorbuf, "wooden door");
|
||||
strcat(doorbuf, "wooden door");
|
||||
}
|
||||
|
||||
// addob will determine whether the door is locked. if so,
|
||||
|
|
10
map.h
10
map.h
|
@ -55,13 +55,13 @@ map_t *getmapindir(map_t *src, int dir);
|
|||
int getmapmaxvisrange(map_t *m);
|
||||
void getradiuscells(cell_t *centre, int radius, int dirtype, int outsideonly, enum LOFTYPE needlof, int wantcentre, cell_t **retcell, int *ncells, int scatterdensity);
|
||||
int getroomid(cell_t *c);
|
||||
void getroomedge(map_t *m, int roomid, int minx, int miny, int maxx, int maxy, int whichside, cell_t **retcell, int *ncells, int onlywantsolid);
|
||||
void getroomedge(map_t *m, int roomid, int minx, int miny, int maxx, int maxy, int whichside, cell_t **retcell, int *ncells, int onlywantsolid, int includefixed);
|
||||
object_t *gettopobject(cell_t *where, int forglyph);
|
||||
void calclight(map_t *map);
|
||||
int calcroompos(map_t *map, int w, int h, int xmargin, int ymargin, int *bx, int *by, int force);
|
||||
int calcroompos(map_t *map, int w, int h, int xmargin, int ymargin, int *bx, int *by, int force, int stayclose);
|
||||
int compassdir(int orthdir);
|
||||
int countadjcellsoftype(cell_t *cell, enum CELLTYPE id, int dirtype);
|
||||
int countadjrooms(cell_t *cell);
|
||||
int countadjrooms(cell_t *cell, int dirtype);
|
||||
int countadjcellswithflag(cell_t *cell, enum FLAG fid, int dirtype);
|
||||
int countadjdoors(cell_t *cell);
|
||||
int countadjwalls(cell_t *cell);
|
||||
|
@ -71,6 +71,7 @@ int countmapobs(map_t *m, enum OBTYPE oid);
|
|||
int countmapobswithflag(map_t *m, enum FLAG flagid);
|
||||
int countmapobswithflagval(map_t *m, enum FLAG flagid, int val0, int val1, int val2, char *text);
|
||||
int countstairs(map_t *m, int dir);
|
||||
void createantnest(map_t *map, int depth, map_t *parentmap, int exitdir, object_t *entryob);
|
||||
void createborder(map_t *map, enum CELLTYPE solidtype);
|
||||
void createbyhut(map_t *map, int depth, map_t *parentmap, int exitdir, object_t *entryob);
|
||||
void createcave(map_t *map, int depth, map_t *parentmap, int exitdir, object_t *entryob);
|
||||
|
@ -80,12 +81,13 @@ void createforest(map_t *map, int depth, map_t *parentmap, int exitdir, object_t
|
|||
void createhabitat(map_t *map, int depth, map_t *parentmap, int exitdir, object_t *entryob);
|
||||
void createheaven(map_t *map, int depth, map_t *parentmap, int exitdir, object_t *entryob);
|
||||
void createmap(map_t *map, int depth, region_t *region, map_t *parentmap, int exitdir, object_t *entryob);
|
||||
void createmastervaults(map_t *map, int depth, map_t *parentmap, int exitdir, object_t *entryob);
|
||||
void createpit(map_t *map, int depth, map_t *parentmap, int exitdir, object_t *entryob);
|
||||
void createregionlink(map_t *m, cell_t *c, object_t *o, char *obname, enum REGIONTYPE newregiontype, region_t *parent);
|
||||
void createregionthing(map_t *map, regionthing_t *rt);
|
||||
void createriver(map_t *m);
|
||||
void createroom(map_t *map, int roomid, int x1, int y1, int x2, int y2, int forcewalls);
|
||||
int calcposandmakeroom(map_t *map, int roomid, int overrideminw, int overrideminh, int xmargin, int ymargin, int *retx, int *rety, int *retw, int *reth, int doorpct, int forcewalls);
|
||||
int calcposandmakeroom(map_t *map, int roomid, int overrideminw, int overrideminh, int overridemaxw, int overridemaxh, int xmargin, int ymargin, int *retx, int *rety, int *retw, int *reth, int doorpct, int dooropenchance, int forcewalls, int stayclose);
|
||||
void createsewer(map_t *map, int depth, map_t *parentmap, int exitdir, object_t *entryob);
|
||||
void createstomach(map_t *map, int depth, map_t *parentmap, int exitdir, object_t *entryob);
|
||||
void createswamp(map_t *map, int depth, map_t *parentmap, int exitdir, object_t *entryob);
|
||||
|
|
2
move.c
2
move.c
|
@ -884,10 +884,12 @@ int knockback(lifeform_t *lf, int dir, int howfar, lifeform_t *pusher, int fallc
|
|||
preventchance += ((lfsize - SZ_HUMAN) * 15);
|
||||
}
|
||||
if (pctchance(preventchance)) {
|
||||
if (cansee(player, lf)) {
|
||||
msg("%s stagger%s %s but hold%s %s %s.",lfname,isplayer(lf) ? "" : "s",
|
||||
getreldirname(getrelativedir(lf, dir)),
|
||||
isplayer(lf) ? "" : "s", isplayer(lf) ? "your" : "its",
|
||||
isairborne(lf) ? "position" : "ground");
|
||||
}
|
||||
return B_TRUE;
|
||||
}
|
||||
|
||||
|
|
11
nexus.c
11
nexus.c
|
@ -1039,8 +1039,14 @@ void gettrrange(int depth, int *min, int *max, int range, int oodok) {
|
|||
//mid = (depth/2);
|
||||
mid = (depth);
|
||||
|
||||
*min = mid - range - 10; limit(min, 0, maxmonhitdice);
|
||||
*max = mid + range; limit(max, *min, maxmonhitdice);
|
||||
*min = mid - range - 10;
|
||||
//limit(min, 0, maxmonhitdice);
|
||||
limit(min, 0, 8);
|
||||
|
||||
*max = mid + range;
|
||||
limit(max, *min, maxmonhitdice);
|
||||
|
||||
|
||||
}
|
||||
|
||||
int getoption(enum OPTION id) {
|
||||
|
@ -1175,6 +1181,7 @@ int init(void) {
|
|||
return B_FALSE;
|
||||
}
|
||||
|
||||
// retcell[0] will be initial location
|
||||
void calcbresnham(map_t *m, int x1, int y1, int x2, int y2, cell_t **retcell, int *numpixels) {
|
||||
int xinc1,xinc2,yinc1,yinc2,dinc1,dinc2,d;
|
||||
int xinc,yinc,dinc;
|
||||
|
|
249
objects.c
249
objects.c
|
@ -27,6 +27,7 @@ extern objectclass_t *objectclass,*lastobjectclass;
|
|||
extern brand_t *firstbrand,*lastbrand;
|
||||
extern obmod_t *firstobmod,*lastobmod;
|
||||
extern material_t *material,*lastmaterial;
|
||||
extern race_t *firstrace, *lastrace;
|
||||
extern recipe_t *firstrecipe,*lastrecipe;
|
||||
extern skill_t *firstskill, *lastskill;
|
||||
extern region_t *firstregion;
|
||||
|
@ -1059,7 +1060,7 @@ object_t *addobject(obpile_t *where, char *name, int canstack, int dolinks, enum
|
|||
}
|
||||
if (found) break;
|
||||
}
|
||||
// cope with "random gem"
|
||||
// cope with "random _otherstuff_"
|
||||
if (!found) {
|
||||
if (strstarts(p, "random gem")) {
|
||||
int minrarity,maxrarity;
|
||||
|
@ -1075,6 +1076,15 @@ object_t *addobject(obpile_t *where, char *name, int canstack, int dolinks, enum
|
|||
found = B_TRUE;
|
||||
}
|
||||
}
|
||||
if (strstarts(p, "random container")) {
|
||||
char buf[BUFLEN];
|
||||
cell_t *cc;
|
||||
cc = getobpilelocation(where);
|
||||
ot = getrandomobwithflag(cc->map, F_CONTAINER, buf);
|
||||
if (ot) {
|
||||
found = B_TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!found) {
|
||||
|
@ -4720,6 +4730,8 @@ int getmaterialvalue(enum MATERIAL mat) {
|
|||
case MT_GOLD:
|
||||
case MT_DRAGONWOOD:
|
||||
return 7;
|
||||
case MT_DURANITE:
|
||||
return 10;
|
||||
}
|
||||
// default
|
||||
return 1;
|
||||
|
@ -6058,10 +6070,10 @@ objecttype_t *getoppositestairs(objecttype_t *ot) {
|
|||
}
|
||||
|
||||
// varargs are:
|
||||
// OC_CLASS1, OC_CLAS2, OC_NONE, ..., DT_DAMTYPE1, DT_DAMTYPE2, .., DT_NONE
|
||||
// OC_CLASS1, OC_CLAS2, OC_NONE, ..., DT_DAMTYPE1, DT_DAMTYPE2, .., DT_NONE, F_WANTFLAG1, F_WANTFLAG2, ..., F_NONE
|
||||
//
|
||||
// if no objectclass given then it will be picked randomly, or (if wepsk isn't sk_none) set to oc_weapon.
|
||||
char *real_getrandomob(map_t *map, char *buf, int forcedepth, int forcehabitat, enum LFSIZE maxsize, enum SKILL wepsk, int forpickup, ... ) {
|
||||
objecttype_t *real_getrandomob(map_t *map, char *buf, int forcedepth, int forcehabitat, enum LFSIZE maxsize, enum SKILL wepsk, int forpickup, ... ) {
|
||||
va_list args;
|
||||
objecttype_t *ot;
|
||||
objecttype_t *poss[MAXRANDOMOBCANDIDATES];
|
||||
|
@ -6069,6 +6081,8 @@ char *real_getrandomob(map_t *map, char *buf, int forcedepth, int forcehabitat,
|
|||
int nwantclass = 0;
|
||||
enum DAMTYPE wantdt[MAXCANDIDATES];
|
||||
int nwantdt = 0;
|
||||
enum FLAG wantflag[MAXCANDIDATES];
|
||||
int nwantflag = 0;
|
||||
int nposs = 0;
|
||||
int selidx;
|
||||
int amt;
|
||||
|
@ -6105,6 +6119,12 @@ char *real_getrandomob(map_t *map, char *buf, int forcedepth, int forcehabitat,
|
|||
nwantdt++;
|
||||
wantdt[nwantdt] = va_arg(args, enum DAMTYPE);
|
||||
}
|
||||
|
||||
wantflag[nwantflag] = va_arg(args, enum FLAG);
|
||||
while (wantflag[nwantflag] != F_NONE) {
|
||||
nwantflag++;
|
||||
wantflag[nwantflag] = va_arg(args, enum FLAG);
|
||||
}
|
||||
va_end(args);
|
||||
|
||||
if (wepsk) {
|
||||
|
@ -6140,16 +6160,18 @@ char *real_getrandomob(map_t *map, char *buf, int forcedepth, int forcehabitat,
|
|||
|
||||
// no obclass given? pick one randomly.
|
||||
if (!nwantclass) {
|
||||
if (wantsk) {
|
||||
if (wantsk || nwantdt) {
|
||||
wantclass[0] = OC_WEAPON;
|
||||
} else {
|
||||
wantclass[0] = getrandomobclass(hab->id);
|
||||
}
|
||||
nwantclass = 1;
|
||||
} else if (!nwantflag) {
|
||||
wantclass[0] = getrandomobclass(hab->id);
|
||||
nwantclass = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if ((nwantclass == 1) && (wantclass[0] == OC_BUILDING)) {
|
||||
int minused = 9999;
|
||||
objecttype_t *selot = NULL;
|
||||
// find least used building
|
||||
for (i = 0; i < nbuildingusage; i++) {
|
||||
if (buildingusage[i].count < minused) {
|
||||
|
@ -6168,8 +6190,9 @@ char *real_getrandomob(map_t *map, char *buf, int forcedepth, int forcehabitat,
|
|||
}
|
||||
}
|
||||
assert(nposs > 0);
|
||||
sprintf(buf, "%s", poss[rnd(0,nposs-1)]->name);
|
||||
return buf;
|
||||
selot = poss[rnd(0,nposs-1)];
|
||||
sprintf(buf, "%s", selot->name);
|
||||
return selot;
|
||||
}
|
||||
|
||||
while (!done) {
|
||||
|
@ -6280,6 +6303,21 @@ char *real_getrandomob(map_t *map, char *buf, int forcedepth, int forcehabitat,
|
|||
}
|
||||
}
|
||||
|
||||
// matches wanted flags?
|
||||
if (nwantflag) {
|
||||
found = B_TRUE;
|
||||
for (i = 0; i < nwantflag; i++) {
|
||||
if (!hasflag(ot->flags, wantflag[i])) {
|
||||
found = B_FALSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
condok = B_FALSE;
|
||||
if (db) dblog(" %s fails wantflag check.", ot->name);
|
||||
}
|
||||
}
|
||||
|
||||
// matches wanted weapon skill?
|
||||
if (wantsk) {
|
||||
if (!hasflagval(ot->flags, F_USESSKILL, wantsk->id, NA, NA, NULL)) {
|
||||
|
@ -6448,25 +6486,29 @@ char *real_getrandomob(map_t *map, char *buf, int forcedepth, int forcehabitat,
|
|||
|
||||
if (db || partdb) dblog("random ob for %s: %d x %s ('%s')", habname, amt, ot->name,pluralname);
|
||||
free(pluralname);
|
||||
return buf;
|
||||
return ot;
|
||||
}
|
||||
|
||||
char *getrandomob(map_t *map, char *buf) {
|
||||
return real_getrandomob(map, buf, NA, NA, SZ_MAX, SK_NONE, B_FALSE, OC_NONE, DT_NONE);
|
||||
objecttype_t *getrandomob(map_t *map, char *buf) {
|
||||
return real_getrandomob(map, buf, NA, NA, SZ_MAX, SK_NONE, B_FALSE, OC_NONE, DT_NONE, F_NONE);
|
||||
}
|
||||
|
||||
char *getrandomobofsize(map_t *map, char *buf, enum LFSIZE maxsize) {
|
||||
return real_getrandomob(map, buf, NA, NA, maxsize, SK_NONE, B_FALSE, OC_NONE, DT_NONE);
|
||||
objecttype_t *getrandomobofsize(map_t *map, char *buf, enum LFSIZE maxsize) {
|
||||
return real_getrandomob(map, buf, NA, NA, maxsize, SK_NONE, B_FALSE, OC_NONE, DT_NONE, F_NONE);
|
||||
}
|
||||
|
||||
char *getrandomobwithdt(map_t *map, enum DAMTYPE damtype, char *buf) {
|
||||
return real_getrandomob(map, buf, NA, NA, SZ_MAX, SK_NONE, B_TRUE, OC_NONE, damtype, DT_NONE);
|
||||
objecttype_t *getrandomobwithdt(map_t *map, enum DAMTYPE damtype, char *buf) {
|
||||
return real_getrandomob(map, buf, NA, NA, SZ_MAX, SK_NONE, B_TRUE, OC_NONE, damtype, DT_NONE, F_NONE);
|
||||
}
|
||||
|
||||
char *getrandomobwithclass(map_t *map, enum OBCLASS cid, char *buf, int depthmod) {
|
||||
objecttype_t *getrandomobwithflag(map_t *map, enum FLAG fid, char *buf) {
|
||||
return real_getrandomob(map, buf, NA, NA, SZ_MAX, SK_NONE, B_TRUE, OC_NONE, DT_NONE, fid, F_NONE);
|
||||
}
|
||||
|
||||
objecttype_t *getrandomobwithclass(map_t *map, enum OBCLASS cid, char *buf, int depthmod) {
|
||||
//return real_getrandomob(map, buf, RO_OBCLASS, cid, map->depth + depthmod);
|
||||
//if (depthmod == NA) depthmod = 0;
|
||||
return real_getrandomob(map, buf, getmapdifficulty(map) + depthmod, NA, SZ_MAX, SK_NONE, B_FALSE, cid, OC_NONE, DT_NONE);
|
||||
return real_getrandomob(map, buf, getmapdifficulty(map) + depthmod, NA, SZ_MAX, SK_NONE, B_FALSE, cid, OC_NONE, DT_NONE, F_NONE);
|
||||
}
|
||||
|
||||
enum OBCLASS getrandomobclass(enum HABITAT hab) {
|
||||
|
@ -8291,6 +8333,17 @@ object_t *real_moveob(object_t *src, obpile_t *dst, int howmany, int stackok) {
|
|||
}
|
||||
}
|
||||
|
||||
// is it a godstone moving? if so, all other godstones will now vanish
|
||||
if (src->type->obclass->id == OC_GODSTONE) {
|
||||
object_t *oo,*nextoo;
|
||||
for (oo = src->pile->first ; oo ; oo = nextoo) {
|
||||
nextoo = oo->next;
|
||||
if ((oo != src) && (oo->type->obclass->id == OC_GODSTONE)) {
|
||||
removeob(oo, ALL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (db) dblog("DB: moveob() - moving %d x %s",howmany, src->type->name);
|
||||
if (stackok) {
|
||||
|
@ -9088,12 +9141,26 @@ int operate(lifeform_t *lf, object_t *o, cell_t *where) {
|
|||
|
||||
if (isplayer(lf)) {
|
||||
char subprompt[BUFLEN];
|
||||
enum LOFTYPE ltype;
|
||||
|
||||
if (!isknown(o)) {
|
||||
// default to needing lof
|
||||
ltype = LOF_NEED;
|
||||
} else {
|
||||
f = hasflag(o->flags, F_LINKSPELL);
|
||||
if (f) {
|
||||
ltype = getspellloftype(f->val[0]);
|
||||
} else {
|
||||
ltype = LOF_NEED;
|
||||
}
|
||||
}
|
||||
|
||||
snprintf(subprompt, BUFLEN, "%s->Aim->", obname);
|
||||
if (strlen(f->text) > 0) {
|
||||
where = askcoords(f->text, subprompt, ttype, lf, range, LOF_NEED, B_TRUE);
|
||||
where = askcoords(f->text, subprompt, ttype, lf, range, ltype, B_TRUE);
|
||||
} else {
|
||||
snprintf(buf, BUFLEN, "Where will you aim %s?",obname);
|
||||
where = askcoords(buf, subprompt, ttype, lf, range, LOF_NEED, B_TRUE);
|
||||
where = askcoords(buf, subprompt, ttype, lf, range, ltype, B_TRUE);
|
||||
if (!haslos(lf, where)) {
|
||||
msg("You can't see there!");
|
||||
return B_TRUE;
|
||||
|
@ -9360,7 +9427,7 @@ int operate(lifeform_t *lf, object_t *o, cell_t *where) {
|
|||
default:
|
||||
break;
|
||||
}
|
||||
dospelleffects(lf, spelltocast, power, where ? where->lf : NULL, NULL, where, B_UNCURSED, &willid, B_FALSE, NULL);
|
||||
dospelleffects(lf, spelltocast, power, where ? where->lf : NULL, NULL, where, B_UNCURSED, &willid, B_FALSE, o);
|
||||
// special wands
|
||||
} else if (o->type->id == OT_WAND_WONDER) {
|
||||
int power;
|
||||
|
@ -9473,6 +9540,25 @@ int operate(lifeform_t *lf, object_t *o, cell_t *where) {
|
|||
// lumara does.
|
||||
pleasegodmaybe(R_GODMAGIC, 2);
|
||||
|
||||
} else if (hasflag(o->flags, F_VAULTKEY)) {
|
||||
if (isplayer(lf)) {
|
||||
object_t *stairs;
|
||||
// vault stairs here?
|
||||
stairs = hasob(lf->cell->obpile, OT_VSTAIRSDOWN);
|
||||
if (stairs && hasflag(stairs->flags, F_LOCKED)) {
|
||||
char stairsname[BUFLEN];
|
||||
getobname(stairs, stairsname, 1);
|
||||
msg("You unlock %s with your %s.", stairsname, noprefix(obname));
|
||||
more();
|
||||
killflagsofid(stairs->flags, F_LOCKED);
|
||||
msg("Your %s vanishes!", noprefix(obname));
|
||||
removeob(o, ALL);
|
||||
} else {
|
||||
msg("Your %s doesn't fit anything here.", noprefix(obname));
|
||||
}
|
||||
} else {
|
||||
return B_TRUE;
|
||||
}
|
||||
// FROM HERE ON ARE INDIVIDUAL ONES
|
||||
} else if (o->type->id == OT_BUTANETORCH) {
|
||||
int seen = B_FALSE;
|
||||
|
@ -9485,6 +9571,8 @@ int operate(lifeform_t *lf, object_t *o, cell_t *where) {
|
|||
} else if (o->type->obclass->id == OC_GODSTONE) {
|
||||
if (isfullycharged(o)) {
|
||||
int i;
|
||||
object_t *oo;
|
||||
cell_t *c;
|
||||
// announce
|
||||
if (isplayer(lf)){
|
||||
msg("Your %s unleashes a blast of power!", noprefix(obname));
|
||||
|
@ -9495,6 +9583,54 @@ int operate(lifeform_t *lf, object_t *o, cell_t *where) {
|
|||
}
|
||||
noise(lf->cell, NULL, NC_OTHER, 10, "an ear-splitting crack", NULL);
|
||||
switch (o->type->id) {
|
||||
case OT_GODSTONE_BATTLE:
|
||||
// bless weapon
|
||||
oo = getweapon(lf);
|
||||
if (oo && (oo->blessed == B_UNCURSED)) {
|
||||
blessob(oo);
|
||||
}
|
||||
// uncurse wep/arm
|
||||
for (oo = lf->pack->first ; oo ; oo = oo->next) {
|
||||
if (isequipped(oo) && iscursed(oo)) {
|
||||
if (isweapon(oo) || isarmour(oo)) {
|
||||
uncurseob(oo, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
// haste
|
||||
dospelleffects(NULL, OT_S_HASTE, 10, lf, NULL, lf->cell, B_UNCURSED, NULL, B_FALSE, o);
|
||||
// everyone in lof...
|
||||
for (i = 0; i < lf->cell->map->w * lf->cell->map->h; i++) {
|
||||
cell_t *c;
|
||||
c = lf->cell->map->cell[i];
|
||||
if (c->lf && (c->lf != lf) && haslof(lf->cell, c, LOF_WALLSTOP, NULL)) {
|
||||
// nullify
|
||||
dospelleffects(NULL, OT_S_NULLIFY, 10, c->lf, NULL, c->lf->cell, B_BLESSED, NULL, B_TRUE, o);
|
||||
}
|
||||
}
|
||||
// summon 3 warriors
|
||||
for (i = 0;i < 3; i++) {
|
||||
// find a race which can be a warrior
|
||||
race_t *poss[MAXCANDIDATES],*r;
|
||||
int nposs = 0;
|
||||
for (r = firstrace ; r ; r = r->next) {
|
||||
if (hasflagval(r->flags, F_STARTJOB, NA, J_WARRIOR, NA, NULL)) {
|
||||
poss[nposs++] = r;
|
||||
}
|
||||
}
|
||||
if (nposs) {
|
||||
cell_t *c;
|
||||
char wname[BUFLEN];
|
||||
r = poss[rnd(0,nposs-1)];
|
||||
sprintf(wname, "%s warrior", r->name);
|
||||
|
||||
c = real_getrandomadjcell(lf->cell, WE_WALKABLE, B_ALLOWEXPAND, LOF_WALLSTOP, NULL, NULL, lf);
|
||||
if (c) {
|
||||
summonmonster(lf, c, R_SPECIFIED, wname, rnd(50,90), B_TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case OT_GODSTONE_PURITY:
|
||||
// everyone in lof drops to same hp as user
|
||||
/*
|
||||
|
@ -9530,7 +9666,7 @@ int operate(lifeform_t *lf, object_t *o, cell_t *where) {
|
|||
// revert polymorphs
|
||||
if (lfhasflag(c->lf, F_ORIGRACE)) {
|
||||
dospelleffects(NULL, OT_A_POLYREVERT, 1,
|
||||
c->lf, NULL, c->lf->cell, B_BLESSED, NULL, B_TRUE, NULL);
|
||||
c->lf, NULL, c->lf->cell, B_BLESSED, NULL, B_TRUE, o);
|
||||
}
|
||||
// fix injuries ("deformities")
|
||||
killflagsofid(c->lf->flags, F_INJURY);
|
||||
|
@ -9541,6 +9677,9 @@ int operate(lifeform_t *lf, object_t *o, cell_t *where) {
|
|||
}
|
||||
}
|
||||
break;
|
||||
case OT_GODSTONE_DEATH:
|
||||
dospelleffects(lf, OT_S_INFINITEDEATH, 10, lf, NULL, lf->cell, B_BLESSED, NULL, B_TRUE, o);
|
||||
break;
|
||||
case OT_GODSTONE_DESTRUCTION: // rage
|
||||
// everyone in lof gets f_rage, and hates everything
|
||||
for (i = 0; i < lf->cell->map->w * lf->cell->map->h; i++) {
|
||||
|
@ -9570,7 +9709,7 @@ int operate(lifeform_t *lf, object_t *o, cell_t *where) {
|
|||
if (c->lf) {
|
||||
// restore
|
||||
dospelleffects(NULL, OT_S_RESTORATION, 1,
|
||||
c->lf, NULL, c->lf->cell, B_BLESSED, NULL, B_TRUE, NULL);
|
||||
c->lf, NULL, c->lf->cell, B_BLESSED, NULL, B_TRUE, o);
|
||||
} else {
|
||||
object_t *oo, *nextoo;
|
||||
// revive corpses
|
||||
|
@ -9578,13 +9717,64 @@ int operate(lifeform_t *lf, object_t *o, cell_t *where) {
|
|||
nextoo = oo->next;
|
||||
if (oo->type->id == OT_CORPSE) {
|
||||
dospelleffects(NULL, OT_S_RESSURECTION, 1,
|
||||
NULL, oo, c, B_BLESSED, NULL, B_TRUE, NULL);
|
||||
NULL, oo, c, B_BLESSED, NULL, B_TRUE, o);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case OT_GODSTONE_MAGIC:
|
||||
// restore all mp
|
||||
gainmp(lf, lf->maxmp);
|
||||
// identify all objects
|
||||
for (oo = lf->pack->first ; oo ; oo = oo->next) {
|
||||
if (!isidentified(oo)) {
|
||||
dospelleffects(lf, OT_S_IDENTIFY, 10, NULL, oo, NULL, B_BLESSED, NULL, B_FALSE, o);
|
||||
}
|
||||
}
|
||||
// learn any spell
|
||||
select_new_spell(SS_NONE);
|
||||
break;
|
||||
case OT_GODSTONE_NATURE:
|
||||
// cure diseases
|
||||
dospelleffects(NULL, OT_S_CUREPOISON, 10, lf, NULL, lf->cell, B_UNCURSED, NULL, B_FALSE, o);
|
||||
// everyone in lof...
|
||||
for (i = 0; i < lf->cell->map->w * lf->cell->map->h; i++) {
|
||||
cell_t *c;
|
||||
c = lf->cell->map->cell[i];
|
||||
if (c->lf && (c->lf != lf) && haslof(lf->cell, c, LOF_WALLSTOP, NULL)) {
|
||||
// plants/animals become peaceful
|
||||
if ((getraceclass(c->lf) == RC_PLANT) || (getraceclass(c->lf) == RC_ANIMAL)) {
|
||||
makepeaceful(c->lf, lf);
|
||||
}
|
||||
}
|
||||
}
|
||||
// all in LOS
|
||||
for (i = 0; i < lf->nlos; i++) {
|
||||
object_t *oo,*nextoo;
|
||||
cell_t *c;
|
||||
c = lf->los[i];
|
||||
if (!issolid(c)) {
|
||||
// destroy fires
|
||||
for (oo = c->obpile->first ; oo ; oo = nextoo) {
|
||||
nextoo = oo->next;
|
||||
if (oo->material->id == MT_FIRE) {
|
||||
removeob(oo, ALL);
|
||||
}
|
||||
}
|
||||
// ground turns to dirt
|
||||
setcelltype(c, CT_DIRT);
|
||||
// flower grows here.
|
||||
addobfast(c->obpile, OT_FLOWER);
|
||||
}
|
||||
}
|
||||
// summon treant
|
||||
c = real_getrandomadjcell(lf->cell, WE_WALKABLE, B_ALLOWEXPAND, LOF_WALLSTOP, NULL, NULL, lf);
|
||||
if (c) {
|
||||
summonmonster(lf, c, R_TREANT, NULL, rnd(50,90), B_TRUE);
|
||||
}
|
||||
break;
|
||||
case OT_GODSTONE_REVENGE:
|
||||
// everyone's objects appear underneath you
|
||||
// everyone else attacks themself
|
||||
|
@ -9597,7 +9787,7 @@ int operate(lifeform_t *lf, object_t *o, cell_t *where) {
|
|||
object_t *oo, *nextoo;
|
||||
|
||||
// they get an injury
|
||||
dospelleffects(NULL, OT_S_FLAYFLESH, 1, c->lf, NULL, c, B_BLESSED, NULL, B_TRUE, NULL);
|
||||
dospelleffects(NULL, OT_S_FLAYFLESH, 1, c->lf, NULL, c, B_BLESSED, NULL, B_TRUE, o);
|
||||
|
||||
// they attack themself.
|
||||
attackcell(c->lf, c, B_TRUE);
|
||||
|
@ -13527,6 +13717,15 @@ int real_fireat(lifeform_t *thrower, object_t *o, int amt, cell_t *where, int sp
|
|||
angergodmaybe(R_GODMAGIC, 10, GA_HERESY);
|
||||
}
|
||||
|
||||
// if you sa something miss you, stop eating/training/digging/etc
|
||||
//
|
||||
// we use 'announcedmiss' here because we shouldn't wake up we were
|
||||
// asleep (ie. couldn't see the missile missing us)
|
||||
// If it hit us, losehp() will have taken care of the interruption.
|
||||
if (target && isplayer(target) && announcedmiss) {
|
||||
interrupt(target);
|
||||
}
|
||||
|
||||
if (newobptr) *newobptr = newob;
|
||||
return B_FALSE;
|
||||
}
|
||||
|
|
11
objects.h
11
objects.h
|
@ -140,11 +140,12 @@ char *getobhurtname(object_t *o, enum DAMTYPE damtype);
|
|||
float getobweight(object_t *o);
|
||||
float getobunitweight(object_t *o);
|
||||
objecttype_t *getoppositestairs(objecttype_t *ot);
|
||||
char *real_getrandomob(map_t *map, char *buf, int forcedepth, int forcehabitat, enum LFSIZE maxsize, enum SKILL wepsk, int forpickup, ... );
|
||||
char *getrandomob(map_t *map, char *buf);
|
||||
char *getrandomobofsize(map_t *map, char *buf, enum LFSIZE maxsize);
|
||||
char *getrandomobwithdt(map_t *map, enum DAMTYPE damtype, char *buf);
|
||||
char *getrandomobwithclass(map_t *map, enum OBCLASS cid, char *buf, int depthmod);
|
||||
objecttype_t *real_getrandomob(map_t *map, char *buf, int forcedepth, int forcehabitat, enum LFSIZE maxsize, enum SKILL wepsk, int forpickup, ... );
|
||||
objecttype_t *getrandomob(map_t *map, char *buf);
|
||||
objecttype_t *getrandomobofsize(map_t *map, char *buf, enum LFSIZE maxsize);
|
||||
objecttype_t *getrandomobwithdt(map_t *map, enum DAMTYPE damtype, char *buf);
|
||||
objecttype_t *getrandomobwithflag(map_t *map, enum FLAG fid, char *buf);
|
||||
objecttype_t *getrandomobwithclass(map_t *map, enum OBCLASS cid, char *buf, int depthmod);
|
||||
enum OBCLASS getrandomobclass(enum HABITAT hab);
|
||||
int getobrarity(object_t *o, enum RARITY *rr);
|
||||
enum SPELLSCHOOL getschool(enum OBTYPE sid);
|
||||
|
|
51
spell.c
51
spell.c
|
@ -3501,9 +3501,35 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
|||
// default to unseen
|
||||
if (seenbyplayer) *seenbyplayer = B_FALSE;
|
||||
|
||||
// adjust destination/range for wands, since you might inadvertantly
|
||||
// target an invalid cell if you don't know what it is yet.
|
||||
if (fromob && caster) {
|
||||
enum LOFTYPE loft;
|
||||
int maxr;
|
||||
|
||||
// reduce range if required
|
||||
maxr = getspellrange(caster, spellid, power, NULL);
|
||||
if (targcell && (maxr != UNLIMITED) && (getcelldist(caster->cell, targcell) > maxr)) {
|
||||
cell_t *retcell[MAXCANDIDATES];
|
||||
int nretcells;
|
||||
calcbresnham(caster->cell->map, caster->cell->x, caster->cell->y, targcell->x, targcell->y, retcell, &nretcells);
|
||||
if (maxr > (nretcells-1)) {
|
||||
maxr = nretcells-1;
|
||||
}
|
||||
targcell = retcell[maxr];
|
||||
}
|
||||
|
||||
// adjust for LOF
|
||||
loft = getspellloftype(spellid);
|
||||
if (loft != LOF_DONTNEED) {
|
||||
cell_t *newtarg;
|
||||
haslof(caster->cell, targcell, loft, &newtarg);
|
||||
targcell = newtarg;
|
||||
}
|
||||
}
|
||||
|
||||
if (caster) {
|
||||
|
||||
if (hasflag(sp->flags, F_ONGOING)) {
|
||||
if (lfhasflagval(caster, F_BOOSTSPELL, spellid, NA, NA, NULL)) {
|
||||
// cancel it.
|
||||
|
@ -9041,7 +9067,11 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
|||
addflag(o->flags, F_DEAD, B_TRUE, NA, NA, NULL);
|
||||
donesomething = B_TRUE;
|
||||
}
|
||||
} else if (hasflag(o->flags, F_LOCKED)) {
|
||||
} else {
|
||||
flag_t *f;
|
||||
f = hasflag(o->flags, F_LOCKED);
|
||||
if (f) {
|
||||
if (f->val[2] == NA) {
|
||||
// unlock it
|
||||
if (haslos(player, targcell)) {
|
||||
getobname(o, buf, 1);
|
||||
|
@ -9052,6 +9082,8 @@ int dospelleffects(lifeform_t *caster, enum OBTYPE spellid, int power, lifeform_
|
|||
donesomething = B_TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!donesomething) {
|
||||
fizzle(caster);
|
||||
|
@ -12991,6 +13023,20 @@ int getspelllevel(enum OBTYPE spellid) {
|
|||
return level;
|
||||
}
|
||||
|
||||
enum LOFTYPE getspellloftype(enum OBTYPE spellid) {
|
||||
objecttype_t *ot;
|
||||
flag_t *f;
|
||||
ot = findot(spellid);
|
||||
if (!ot) {
|
||||
return LOF_DONTNEED;
|
||||
}
|
||||
f = hasflag(ot->flags, F_LOSLOF);
|
||||
if (f) {
|
||||
return f->val[1];
|
||||
}
|
||||
return LOF_DONTNEED;
|
||||
}
|
||||
|
||||
int getspellmaxpower(enum OBTYPE spellid) {
|
||||
flag_t *f;
|
||||
objecttype_t *ot;
|
||||
|
@ -13865,6 +13911,9 @@ int summonlfs(lifeform_t *caster, cell_t *where, enum RACE wantrace, enum RACECL
|
|||
if (hasflag(r->flags, F_GODOF)) {
|
||||
ok = B_FALSE;
|
||||
}
|
||||
if (hasflag(r->flags, F_UNIQUE)) {
|
||||
ok = B_FALSE;
|
||||
}
|
||||
if ((wantrc != RC_ANY) && (r->raceclass->id != wantrc)) {
|
||||
ok = B_FALSE;
|
||||
}
|
||||
|
|
1
spell.h
1
spell.h
|
@ -20,6 +20,7 @@ enum SPELLSCHOOL getskillschool(enum SKILL skid);
|
|||
char *getspellcosttext(lifeform_t *lf, enum OBTYPE spellid, int power, char *buf);
|
||||
int getspellduration(int min,int max,int blessed);
|
||||
int getspelllevel(enum OBTYPE spellid);
|
||||
enum LOFTYPE getspellloftype(enum OBTYPE spellid);
|
||||
int getspellmaxpower(enum OBTYPE spellid);
|
||||
char *getspellname(enum OBTYPE spellid, lifeform_t *lf, char *buf, int forcepower);
|
||||
int getspellpower(lifeform_t *lf, enum OBTYPE spellid);
|
||||
|
|
25
text.c
25
text.c
|
@ -1418,6 +1418,15 @@ char *getregionname(char *buf, map_t *m, region_t *r, enum REGIONNAMEFORMAT how)
|
|||
case RG_MAINDUNGEON:
|
||||
snprintf(buf, BUFLEN, "dungeon L%d", m->depth);
|
||||
break;
|
||||
case RG_MASTERVAULTS:
|
||||
if (m->depth == 1) {
|
||||
snprintf(buf, BUFLEN, "outer vault");
|
||||
} if (m->depth == 2) {
|
||||
snprintf(buf, BUFLEN, "inner vault");
|
||||
} else {
|
||||
snprintf(buf, BUFLEN, "master vault");
|
||||
}
|
||||
break;
|
||||
case RG_HEAVEN:
|
||||
snprintf(buf, BUFLEN, "the realm of gods");
|
||||
break;
|
||||
|
@ -1448,6 +1457,15 @@ char *getregionname(char *buf, map_t *m, region_t *r, enum REGIONNAMEFORMAT how)
|
|||
case RG_MAINDUNGEON:
|
||||
snprintf(buf, BUFLEN, "on level %d of the dungeon", m->depth);
|
||||
break;
|
||||
case RG_MASTERVAULTS:
|
||||
if (m->depth == 1) {
|
||||
snprintf(buf, BUFLEN, "in the outer vault");
|
||||
} if (m->depth == 2) {
|
||||
snprintf(buf, BUFLEN, "in the inner vault");
|
||||
} else {
|
||||
snprintf(buf, BUFLEN, "in the master vault");
|
||||
}
|
||||
break;
|
||||
case RG_HEAVEN:
|
||||
snprintf(buf, BUFLEN, "in the realm of gods");
|
||||
break;
|
||||
|
@ -1478,6 +1496,9 @@ char *getregionname(char *buf, map_t *m, region_t *r, enum REGIONNAMEFORMAT how)
|
|||
case RG_MAINDUNGEON:
|
||||
strcpy(buf, "the dungeon");
|
||||
break;
|
||||
case RG_MASTERVAULTS:
|
||||
snprintf(buf, BUFLEN, "the master vaults");
|
||||
break;
|
||||
case RG_HEAVEN:
|
||||
snprintf(buf, BUFLEN, "the realm of gods");
|
||||
break;
|
||||
|
@ -1981,6 +2002,10 @@ char *noprefix(char *obname) {
|
|||
p = obname;
|
||||
while (donesomething) {
|
||||
donesomething = B_FALSE;
|
||||
if (strcasestarts(p, "your ")) {
|
||||
p += strlen("your ");
|
||||
donesomething = B_TRUE;
|
||||
}
|
||||
if (strcasestarts(p, "the ")) {
|
||||
p += strlen("the ");
|
||||
donesomething = B_TRUE;
|
||||
|
|
Loading…
Reference in New Issue