From 12ca195126a87c11b9a605bf72ff3877173d2c59 Mon Sep 17 00:00:00 2001 From: Rob Pearce Date: Fri, 8 Jun 2012 03:20:03 +0000 Subject: [PATCH] - [+] reduce chance of cold damage shattering potions - [+] 5% per point of damage - [+] bug: flightevasion is REDUCING ev, rather than increasing --- data.c | 46 +++++++++++++++++++++++----------------------- data/hiscores.db | Bin 15360 -> 15360 bytes defs.h | 4 ++-- lf.c | 4 ++-- objects.c | 4 ++-- 5 files changed, 29 insertions(+), 29 deletions(-) diff --git a/data.c b/data.c index 22b7fb4..214bccd 100644 --- a/data.c +++ b/data.c @@ -8720,7 +8720,7 @@ void initrace(void) { addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, "pw:1;"); addflag(lastrace->flags, F_VISRANGEMOD, 1, NA, NA, NULL); addflag(lastrace->flags, F_STARTSKILL, SK_EVASION, PR_NOVICE, NA, NULL); - addflag(lastrace->flags, F_AIREVASION, 20, NA, NA, NULL); + addflag(lastrace->flags, F_FLIGHTEVASION, 20, NA, NA, NULL); // penalties addbonustext(lastrace->flags, F_PENDESC, "Low hit points."); addflag(lastrace->flags, F_DTVULN, DT_FIRE, NA, NA, NULL); @@ -13272,7 +13272,7 @@ void initrace(void) { addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_VERYFAST, NA, NA, ""); addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, ""); - addflag(lastrace->flags, F_AIREVASION, 10, NA, NA, NULL); + addflag(lastrace->flags, F_FLIGHTEVASION, 10, NA, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, 1, NA, 4, NULL); @@ -13301,7 +13301,7 @@ void initrace(void) { addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_FAST, NA, NA, ""); addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, ""); - addflag(lastrace->flags, F_AIREVASION, 10, NA, NA, NULL); + addflag(lastrace->flags, F_FLIGHTEVASION, 10, NA, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, 1, NA, NA, NULL); @@ -13361,7 +13361,7 @@ void initrace(void) { addflag(lastrace->flags, F_SIZE, SZ_SMALL, NA, NA, NULL); addflag(lastrace->flags, F_MOVESPEED, SP_VERYFAST, NA, NA, ""); addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, ""); - addflag(lastrace->flags, F_AIREVASION, 10, NA, NA, NULL); + addflag(lastrace->flags, F_FLIGHTEVASION, 10, NA, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, 2, NA, NA, NULL); @@ -14062,7 +14062,7 @@ void initrace(void) { addflag(lastrace->flags, F_MOVESPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, ""); - addflag(lastrace->flags, F_AIREVASION, 10, NA, NA, NULL); + addflag(lastrace->flags, F_FLIGHTEVASION, 10, NA, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, 7, NA, NA, NULL); @@ -14103,7 +14103,7 @@ void initrace(void) { addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 2, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 2, NA, NULL); addflag(lastrace->flags, F_MAXATTACKS, 1, 1, NA, NULL); - addflag(lastrace->flags, F_AIREVASION, 10, NA, NA, NULL); + addflag(lastrace->flags, F_FLIGHTEVASION, 10, NA, NA, NULL); addflag(lastrace->flags, F_NOPACK, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_SEEINDARK, 3, NA, NA, NULL); @@ -14138,7 +14138,7 @@ void initrace(void) { addflag(lastrace->flags, F_TR, 4, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 3, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 3, NA, NULL); - addflag(lastrace->flags, F_AIREVASION, 10, NA, NA, NULL); + addflag(lastrace->flags, F_FLIGHTEVASION, 10, NA, NA, NULL); addflag(lastrace->flags, F_NOPACK, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_A_SWOOP, NA, NA, NULL); @@ -14172,7 +14172,7 @@ void initrace(void) { addflag(lastrace->flags, F_TR, 5, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 6, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 7, NA, NULL); - addflag(lastrace->flags, F_AIREVASION, 10, NA, NA, NULL); + addflag(lastrace->flags, F_FLIGHTEVASION, 10, NA, NA, NULL); addflag(lastrace->flags, F_NOPACK, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_A_SWOOP, NA, NA, NULL); @@ -14203,7 +14203,7 @@ void initrace(void) { addflag(lastrace->flags, F_TR, 8, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 11, NA, NULL); addflag(lastrace->flags, F_EXTRADAM, DT_COLD, NA, NA, "1d6"); - addflag(lastrace->flags, F_AIREVASION, 10, NA, NA, NULL); + addflag(lastrace->flags, F_FLIGHTEVASION, 10, NA, NA, NULL); addflag(lastrace->flags, F_NOPACK, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_A_SWOOP, NA, NA, NULL); @@ -14308,7 +14308,7 @@ void initrace(void) { addflag(lastrace->flags, F_HITDICE, 10, NA, NA, NULL); addflag(lastrace->flags, F_TR, 9, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 14, NA, NULL); - addflag(lastrace->flags, F_AIREVASION, 10, NA, NA, NULL); + addflag(lastrace->flags, F_FLIGHTEVASION, 10, NA, NA, NULL); addflag(lastrace->flags, F_NOPACK, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_A_SWOOP, NA, NA, NULL); @@ -14551,7 +14551,7 @@ void initrace(void) { addflag(lastrace->flags, F_TR, 15, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 18, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_CLAWS, 18, NA, NULL); - addflag(lastrace->flags, F_AIREVASION, 15, NA, NA, NULL); + addflag(lastrace->flags, F_FLIGHTEVASION, 15, NA, NA, NULL); addflag(lastrace->flags, F_NOPACK, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_A_SWOOP, NA, NA, NULL); @@ -15271,7 +15271,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_NATURALFLIGHT, B_TRUE, NA, NA, ""); - addflag(lastrace->flags, F_AIREVASION, 5, NA, NA, NULL); + addflag(lastrace->flags, F_FLIGHTEVASION, 5, NA, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, 10, NA, NA, NULL); @@ -15308,7 +15308,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_NATURALFLIGHT, B_TRUE, NA, NA, ""); - addflag(lastrace->flags, F_AIREVASION, 10, NA, NA, NULL); + addflag(lastrace->flags, F_FLIGHTEVASION, 10, NA, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, 28, NA, NA, NULL); @@ -15412,7 +15412,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_NATURALFLIGHT, B_TRUE, NA, NA, ""); - addflag(lastrace->flags, F_AIREVASION, 15, NA, NA, NULL); + addflag(lastrace->flags, F_FLIGHTEVASION, 15, NA, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, 40, NA, NA, NULL); @@ -15473,7 +15473,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_NATURALFLIGHT, B_TRUE, NA, NA, ""); - addflag(lastrace->flags, F_AIREVASION, 10, NA, NA, NULL); + addflag(lastrace->flags, F_FLIGHTEVASION, 10, NA, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, 30, NA, NA, NULL); @@ -15574,7 +15574,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_NATURALFLIGHT, B_TRUE, NA, NA, ""); - addflag(lastrace->flags, F_AIREVASION, 15, NA, NA, NULL); + addflag(lastrace->flags, F_FLIGHTEVASION, 15, NA, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, 45, NA, NA, NULL); @@ -15630,7 +15630,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_NATURALFLIGHT, B_TRUE, NA, NA, ""); - addflag(lastrace->flags, F_AIREVASION, 10, NA, NA, NULL); + addflag(lastrace->flags, F_FLIGHTEVASION, 10, NA, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, 22, NA, NA, NULL); @@ -15728,7 +15728,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_NATURALFLIGHT, B_TRUE, NA, NA, ""); - addflag(lastrace->flags, F_AIREVASION, 15, NA, NA, NULL); + addflag(lastrace->flags, F_FLIGHTEVASION, 15, NA, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, 32, NA, NA, NULL); @@ -15814,7 +15814,7 @@ void initrace(void) { addflag(lastrace->flags, F_ACTIONSPEED, SP_NORMAL, NA, NA, ""); addflag(lastrace->flags, F_SIZE, SZ_TINY, NA, NA, NULL); addflag(lastrace->flags, F_NATURALFLIGHT, B_TRUE, NA, NA, ""); - addflag(lastrace->flags, F_AIREVASION, 50, NA, NA, NULL); + addflag(lastrace->flags, F_FLIGHTEVASION, 50, NA, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, 0, NA, 1, NULL); @@ -15848,7 +15848,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_HITDICE, 0, NA, 1, NULL); addflag(lastrace->flags, F_TR, 1, NA, NA, NULL); - addflag(lastrace->flags, F_AIREVASION, 10, NA, NA, NULL); + addflag(lastrace->flags, F_FLIGHTEVASION, 10, NA, NA, NULL); addflag(lastrace->flags, F_ENHANCESMELL, 5, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 1, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); @@ -15884,7 +15884,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_HITDICE, 1, NA, NA, NULL); addflag(lastrace->flags, F_TR, 1, NA, NA, NULL); - addflag(lastrace->flags, F_AIREVASION, 5, NA, NA, NULL); + addflag(lastrace->flags, F_FLIGHTEVASION, 5, NA, NA, NULL); addflag(lastrace->flags, F_ENHANCESMELL, 5, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_TEETH, 1, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); @@ -16005,7 +16005,7 @@ void initrace(void) { addflag(lastrace->flags, F_RARITY, H_SWAMP, NA, RR_COMMON, NULL); addflag(lastrace->flags, F_HITDICE, 1, NA, 4, NULL); addflag(lastrace->flags, F_TR, 1, NA, NA, NULL); - addflag(lastrace->flags, F_AIREVASION, 50, NA, NA, NULL); + addflag(lastrace->flags, F_FLIGHTEVASION, 50, NA, NA, NULL); addflag(lastrace->flags, F_HASATTACK, OT_ZAPPER, 1, NA, NULL); addflag(lastrace->flags, F_CANWILL, OT_S_FLASH, 15, 15, "pw:4;"); addflag(lastrace->flags, F_SPELLCASTTEXT, OT_NONE, NA, NA, "pulses"); @@ -17091,7 +17091,7 @@ void initrace(void) { addflag(lastrace->flags, F_SPELLCASTTEXT, OT_S_FLIGHT, NA, NA, NULL); addflag(lastrace->flags, F_HITDICE, 2, NA, NA, NULL); addflag(lastrace->flags, F_TR, 8, NA, NA, NULL); - addflag(lastrace->flags, F_AIREVASION, 30, NA, NA, NULL); + addflag(lastrace->flags, F_FLIGHTEVASION, 30, NA, NA, NULL); addflag(lastrace->flags, F_BLOODOB, NA, NA, NA, NULL); addflag(lastrace->flags, F_NOCORPSE, B_TRUE, NA, NA, NULL); addflag(lastrace->flags, F_NOSPELLS, B_TRUE, NA, NA, NULL); diff --git a/data/hiscores.db b/data/hiscores.db index 9ef3758c0038e1b06e190366cafd27836eb57fe6..0240fedae7e5f4a4003dd748b52a0fb95f31d071 100644 GIT binary patch delta 46 zcmZpuXsDPV&B(k_hS7pCb+Vj=I~M~3gBJs%uxY%<hS7pCX|kM!yS^_2ldxt!^V6dIB%d-P1)s#S#0mx9{JiYooW#sL fg``S_M1}Os#Jm!PoYd6hjL9EFr8lp)2xJBTaDW)N diff --git a/defs.h b/defs.h index 21fd9e1..79c7cfc 100644 --- a/defs.h +++ b/defs.h @@ -2998,8 +2998,8 @@ enum FLAG { // v0 = max time allowed to rest before checkout // v1 = total time rested // text = obid of hotel - F_FLIGHTEVASION, // evasion = v0% of evasion if lf flying - F_SWIMEVASION, // evasion = v0% of evasion if lf swimming + F_FLIGHTEVASION,// +v0 evasion if flying + F_SWIMEVASION, // +v0 evasion if swimming F_ALIGNMENT, // v0 = al_good, al_neutral, al_evil. default neutral. // if al_none is selected for the player, they // can pick what alignment they want to be. diff --git a/lf.c b/lf.c index 74a6dca..23f5273 100644 --- a/lf.c +++ b/lf.c @@ -7212,13 +7212,13 @@ int getevasion(lifeform_t *lf) { // swimevasion creatures get extra evasion while swimming f = lfhasflag(lf, F_SWIMEVASION); if (f && isswimming(lf)) { - ev = pctof(f->val[0], ev); + ev += f->val[0]; } // flightevasion creatures get extra evasion while flying f = lfhasflag(lf, F_FLIGHTEVASION); if (f && (isairborne(lf) == F_FLYING)) { - ev = pctof(f->val[0], ev); + ev += f->val[0]; } ////////////////////////////////////////////////// diff --git a/objects.c b/objects.c index 3c5dda6..3fa8fb7 100644 --- a/objects.c +++ b/objects.c @@ -12572,8 +12572,8 @@ int real_takedamage(object_t *o, int howmuch, int damtype, int wantannounce) { } } else if (damtype == DT_COLD) { - // cold will shatter glass - if (o->material->id == MT_GLASS) { + // cold might shatter glass + if ((o->material->id == MT_GLASS) && pctchance(howmuch*5)) { char buf[BUFLEN]; char buf2[BUFLEN]; real_getobname(o, buf2, 1, B_NOPREMODS, B_NOCONDITION, B_NOBLINDADJUST, B_NOBLESSINGS, B_NOUSED, B_NOSHOWALL);