mirror of
https://codeberg.org/noisytoot/notnotdnethack.git
synced 2025-07-26 23:32:25 +01:00
Protection spell lasts a little longer, scales more, and the effect is never reduced by AC randomization
This commit is contained in:
parent
1d7edc1dfb
commit
b9f6174c20
5 changed files with 18 additions and 16 deletions
|
@ -2803,7 +2803,7 @@ int dieroll; /* needed for Magicbane and vorpal blades */
|
|||
} else if(arti_threeHead(otmp) && youdefend){
|
||||
int extrahits = 2;
|
||||
int monAC, extrahit=1;
|
||||
monAC = AC_VALUE(u.uac) + 10; /* monAC ~= 0 - 20 */
|
||||
monAC = AC_VALUE(u.uac+u.uspellprot) + 10 - u.uspellprot; /* monAC ~= 0 - 20 */
|
||||
monAC += magr->m_lev;
|
||||
if(magr->data == &mons[PM_CHOKHMAH_SEPHIRAH]) monAC += u.chokhmah;
|
||||
if(multi < 0) monAC += 4;
|
||||
|
@ -2912,7 +2912,7 @@ int dieroll; /* needed for Magicbane and vorpal blades */
|
|||
} else if(arti_tentRod(otmp) && youdefend){
|
||||
int extrahits = rn2(7);
|
||||
int extrahit = 1, tmp;
|
||||
tmp = AC_VALUE(u.uac) + 10; /* tmp ~= 0 - 20 */
|
||||
tmp = AC_VALUE(u.uac+u.uspellprot) + 10 - u.uspellprot; /* tmp ~= 0 - 20 */
|
||||
tmp += magr->m_lev;
|
||||
if(magr->data == &mons[PM_CHOKHMAH_SEPHIRAH]) tmp += u.chokhmah;
|
||||
if(multi < 0) tmp += 4;
|
||||
|
|
16
src/mhitu.c
16
src/mhitu.c
|
@ -547,8 +547,8 @@ mattacku(mtmp)
|
|||
}
|
||||
|
||||
/* Work out the armor class differential */
|
||||
tmp = AC_VALUE(u.uac) + 10; /* tmp ~= 0 - 20 */
|
||||
tchtmp = AC_VALUE(base_uac()) + 10;
|
||||
tmp = AC_VALUE(u.uac+u.uspellprot) + 10 - u.uspellprot; /* tmp ~= 0 - 20 */
|
||||
tchtmp = AC_VALUE(base_uac()+u.uspellprot) + 10 - u.uspellprot;
|
||||
tmp += mtmp->m_lev;
|
||||
tchtmp += mtmp->m_lev;
|
||||
tmp += u.ustdy;
|
||||
|
@ -1497,14 +1497,14 @@ hitmu(mtmp, mattk)
|
|||
artifact_hit(mtmp, &youmonst, uwep, &dmg,dieroll)))
|
||||
hitmsg(mtmp, mattk);
|
||||
if (!dmg) break;
|
||||
if (u.mh > 1 && u.mh > ((u.uac>=0) ? dmg : dmg+AC_VALUE(u.uac)) &&
|
||||
if (u.mh > 1 && u.mh > ((u.uac>=0) ? dmg : dmg+AC_VALUE(u.uac+u.uspellprot)-u.uspellprot) &&
|
||||
objects[uwep->otyp].oc_material == IRON &&
|
||||
(u.umonnum==PM_BLACK_PUDDING
|
||||
|| u.umonnum==PM_BROWN_PUDDING)) {
|
||||
/* This redundancy necessary because you have to
|
||||
* take the damage _before_ being cloned.
|
||||
*/
|
||||
if (u.uac < 0) dmg += AC_VALUE(u.uac);
|
||||
if (u.uac < 0) dmg += AC_VALUE(u.uac+u.uspellprot)-u.uspellprot;
|
||||
if (dmg < 1) dmg = 1;
|
||||
if (dmg > 1) exercise(A_STR, FALSE);
|
||||
u.mh -= dmg;
|
||||
|
@ -1631,14 +1631,14 @@ hitmu(mtmp, mattk)
|
|||
artifact_hit(mtmp, &youmonst, otmp, &dmg,dieroll)))
|
||||
hitmsg(mtmp, mattk);
|
||||
if (!dmg) break;
|
||||
if (u.mh > 1 && u.mh > ((u.uac>=0) ? dmg : dmg+AC_VALUE(u.uac)) &&
|
||||
if (u.mh > 1 && u.mh > ((u.uac>=0) ? dmg : dmg+AC_VALUE(u.uac+u.uspellprot)-u.uspellprot) &&
|
||||
objects[otmp->otyp].oc_material == IRON &&
|
||||
(u.umonnum==PM_BLACK_PUDDING
|
||||
|| u.umonnum==PM_BROWN_PUDDING)) {
|
||||
/* This redundancy necessary because you have to
|
||||
* take the damage _before_ being cloned.
|
||||
*/
|
||||
if (u.uac < 0) dmg += AC_VALUE(u.uac);
|
||||
if (u.uac < 0) dmg += AC_VALUE(u.uac+u.uspellprot)-u.uspellprot;
|
||||
if (dmg < 1) dmg = 1;
|
||||
if (dmg > 1) exercise(A_STR, FALSE);
|
||||
u.mh -= dmg;
|
||||
|
@ -3162,10 +3162,10 @@ dopois:
|
|||
if (dmg){
|
||||
if(u.uac < 0) {
|
||||
if(mattk->adtyp != AD_SHDW && mattk->adtyp != AD_STAR && !phasearmor){
|
||||
dmg += AC_VALUE(u.uac);
|
||||
dmg += AC_VALUE(u.uac+u.uspellprot)-u.uspellprot;
|
||||
if (dmg < 1) dmg = 1;
|
||||
} else if(base_uac() < 0){
|
||||
dmg += AC_VALUE(base_uac());
|
||||
dmg += AC_VALUE(base_uac()+u.uspellprot)-u.uspellprot;
|
||||
if (dmg < 1) dmg = 1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -81,14 +81,14 @@ boolean burn;
|
|||
return 0;
|
||||
}
|
||||
|
||||
if((bypassDR && (AC_VALUE(base_uac()) + tlev <= rnd(20))) || (!bypassDR && (AC_VALUE(u.uac) + tlev <= rnd(20)))) {
|
||||
if((bypassDR && (AC_VALUE(base_uac()+u.uspellprot) - u.uspellprot + tlev <= rnd(20))) || (!bypassDR && (AC_VALUE(u.uac+u.uspellprot)-u.uspellprot + tlev <= rnd(20)))) {
|
||||
if(Blind || !flags.verbose) pline("It misses.");
|
||||
else You("are almost hit by %s.", onm);
|
||||
return(0);
|
||||
} else {
|
||||
|
||||
if(bypassDR && base_uac() < 0) dam -= AC_VALUE(base_uac());
|
||||
else if(!bypassDR && u.uac < 0) dam -= AC_VALUE(u.uac);
|
||||
if(bypassDR && base_uac() < 0) dam -= AC_VALUE(base_uac()+u.uspellprot)-u.uspellprot;
|
||||
else if(!bypassDR && u.uac < 0) dam -= AC_VALUE(u.uac+u.uspellprot)-u.uspellprot;
|
||||
|
||||
if(dam < 1) dam = 1;
|
||||
|
||||
|
@ -688,7 +688,7 @@ m_throw(mon, x, y, dx, dy, range, obj, verbose)
|
|||
if(hitu>0) break;
|
||||
default:
|
||||
dam = dmgval(singleobj, &youmonst, 0);
|
||||
if(!bypassDR && u.uac<0) dam += AC_VALUE(u.uac);
|
||||
if(!bypassDR && u.uac<0) dam += AC_VALUE(u.uac+u.uspellprot)-u.uspellprot;
|
||||
hitv = 3 - distmin(u.ux,u.uy, mon->mx,mon->my);
|
||||
if (hitv < -4) hitv = (hitv+4)/2-4;
|
||||
if (hitv < -8) hitv = (hitv+8)*2/3-8;
|
||||
|
|
|
@ -1163,7 +1163,9 @@ cast_protection()
|
|||
}
|
||||
u.uspellprot += gain;
|
||||
u.uspmtime =
|
||||
P_SKILL(spell_skilltype(SPE_PROTECTION)) == P_EXPERT ? 20 : 10;
|
||||
P_SKILL(spell_skilltype(SPE_PROTECTION)) == P_EXPERT ? 30:
|
||||
P_SKILL(spell_skilltype(SPE_PROTECTION)) == P_SKILLED ? 20:
|
||||
P_SKILL(spell_skilltype(SPE_PROTECTION)) == P_BASIC ? 15: 10;
|
||||
if (!u.usptime)
|
||||
u.usptime = u.uspmtime;
|
||||
find_ac();
|
||||
|
|
|
@ -3683,7 +3683,7 @@ int type; /* either hero cast spell type or 0 */
|
|||
if (!chance) return rnd(10) < ac+spell_bonus;
|
||||
|
||||
/* very high armor protection does not achieve invulnerability */
|
||||
ac = AC_VALUE(ac);
|
||||
ac = AC_VALUE(ac+u.uspellprot)-u.uspellprot;
|
||||
|
||||
return (3 - chance) < ac+spell_bonus;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue