mirror of
https://codeberg.org/noisytoot/notnotdnethack.git
synced 2025-08-10 22:51:38 +01:00
Isamusei eventually strike in a circle.
The cross-shaped damage pattern is just a lot less useful than the forward-and-ranged damage patterns of rakuyo and clawed hands. This gives them the forward 45o arc at 57 insight and the complete circle at 70 (the forward arc being the real prize I think).
This commit is contained in:
parent
e64c94e5ca
commit
fb8ebb400a
2 changed files with 119 additions and 2 deletions
|
@ -1327,10 +1327,14 @@ char *buf;
|
|||
Strcat(buf, "blood-drenched ");
|
||||
}
|
||||
if (obj->otyp == ISAMUSEI){
|
||||
if(u.uinsight >= 45)
|
||||
if(u.uinsight >= 70)
|
||||
Strcat(buf, "circular ");
|
||||
else if(u.uinsight >= 57)
|
||||
Strcat(buf, "tredecile ");
|
||||
else if(u.uinsight >= 45)
|
||||
Strcat(buf, "crossed ");
|
||||
else if(u.uinsight >= 22)
|
||||
Strcat(buf, "twisting ");
|
||||
Strcat(buf, "reflected ");
|
||||
}
|
||||
if (obj->otyp == CLUB && check_oprop(obj, OPROP_CCLAW)){
|
||||
if(u.uinsight >= 30)
|
||||
|
|
|
@ -2691,6 +2691,119 @@ struct attack * attk;
|
|||
}
|
||||
}
|
||||
}
|
||||
if(u.uinsight >= 57){
|
||||
//45 degree rotation
|
||||
nx = sgn(dx+dy);
|
||||
ny = sgn(dy-dx);
|
||||
if (isok(x(magr) + nx, y(magr) + ny) && !(result&(MM_AGR_DIED|MM_AGR_STOP))){
|
||||
struct monst *mdef2 = !youagr ? m_u_at(x(magr) + nx, y(magr) + ny) :
|
||||
u.uswallow ? u.ustuck :
|
||||
(nx || ny) ? m_at(x(magr) + nx, y(magr) + ny) :
|
||||
(struct monst *)0;
|
||||
if (mdef2
|
||||
&& (!DEADMONSTER(mdef2))
|
||||
&& ((!youagr && mdef2 != &youmonst && mdef2->mpeaceful != magr->mpeaceful) ||
|
||||
(!youagr && mdef2 == &youmonst && !magr->mpeaceful) ||
|
||||
(youagr && !mdef2->mpeaceful))
|
||||
) { //Can hit a worm multiple times
|
||||
int vis2 = VIS_NONE;
|
||||
if(youagr || canseemon(magr))
|
||||
vis2 |= VIS_MAGR;
|
||||
if(mdef2 == &youmonst || canseemon(mdef2))
|
||||
vis2 |= VIS_MDEF;
|
||||
bhitpos.x = x(magr) + nx; bhitpos.y = y(magr) + ny;
|
||||
subresult = xmeleehity(magr, mdef2, attk, &otmp, vis2, tohitmod, TRUE);
|
||||
/* handle MM_AGR_DIED and MM_AGR_STOP by adding them to the overall result, ignore other outcomes */
|
||||
result |= subresult&(MM_AGR_DIED|MM_AGR_STOP);
|
||||
}
|
||||
}
|
||||
//-45 degree rotation
|
||||
nx = sgn(dx-dy);
|
||||
ny = sgn(dx+dy);
|
||||
if (isok(x(magr) + nx, y(magr) + ny) && !(result&(MM_AGR_DIED|MM_AGR_STOP))){
|
||||
struct monst *mdef2 = !youagr ? m_u_at(x(magr) + nx, y(magr) + ny) :
|
||||
u.uswallow ? u.ustuck :
|
||||
(nx || ny) ? m_at(x(magr) + nx, y(magr) + ny) :
|
||||
(struct monst *)0;
|
||||
if (mdef2
|
||||
&& (!DEADMONSTER(mdef2))
|
||||
&& ((!youagr && mdef2 != &youmonst && mdef2->mpeaceful != magr->mpeaceful) ||
|
||||
(!youagr && mdef2 == &youmonst && !magr->mpeaceful) ||
|
||||
(youagr && !mdef2->mpeaceful))
|
||||
) { //Can hit a worm multiple times
|
||||
int vis2 = VIS_NONE;
|
||||
if(youagr || canseemon(magr))
|
||||
vis2 |= VIS_MAGR;
|
||||
if(mdef2 == &youmonst || canseemon(mdef2))
|
||||
vis2 |= VIS_MDEF;
|
||||
bhitpos.x = x(magr) + nx; bhitpos.y = y(magr) + ny;
|
||||
subresult = xmeleehity(magr, mdef2, attk, &otmp, vis2, tohitmod, TRUE);
|
||||
/* handle MM_AGR_DIED and MM_AGR_STOP by adding them to the overall result, ignore other outcomes */
|
||||
result |= subresult&(MM_AGR_DIED|MM_AGR_STOP);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(u.uinsight >= 70){
|
||||
//135 degree rotation
|
||||
//x = xcos0 - ysin0
|
||||
//x = x*(-0.7) - y*(0.7)
|
||||
//y = xsin0 + ycos0
|
||||
//y = x*(0.7) + y*(-0.7)
|
||||
nx = sgn(-dx-dy);
|
||||
ny = sgn(dx-dy);
|
||||
if (isok(x(magr) + nx, y(magr) + ny) && !(result&(MM_AGR_DIED|MM_AGR_STOP))){
|
||||
struct monst *mdef2 = !youagr ? m_u_at(x(magr) + nx, y(magr) + ny) :
|
||||
u.uswallow ? u.ustuck :
|
||||
(nx || ny) ? m_at(x(magr) + nx, y(magr) + ny) :
|
||||
(struct monst *)0;
|
||||
if (mdef2
|
||||
&& (!DEADMONSTER(mdef2))
|
||||
&& ((!youagr && mdef2 != &youmonst && mdef2->mpeaceful != magr->mpeaceful) ||
|
||||
(!youagr && mdef2 == &youmonst && !magr->mpeaceful) ||
|
||||
(youagr && !mdef2->mpeaceful))
|
||||
) { //Can hit a worm multiple times
|
||||
int vis2 = VIS_NONE;
|
||||
if(youagr || canseemon(magr))
|
||||
vis2 |= VIS_MAGR;
|
||||
if(mdef2 == &youmonst || canseemon(mdef2))
|
||||
vis2 |= VIS_MDEF;
|
||||
bhitpos.x = x(magr) + nx; bhitpos.y = y(magr) + ny;
|
||||
subresult = xmeleehity(magr, mdef2, attk, &otmp, vis2, tohitmod, TRUE);
|
||||
/* handle MM_AGR_DIED and MM_AGR_STOP by adding them to the overall result, ignore other outcomes */
|
||||
result |= subresult&(MM_AGR_DIED|MM_AGR_STOP);
|
||||
}
|
||||
}
|
||||
//-135 degree rotation
|
||||
//x = xcos0 - ysin0
|
||||
//x = x*(-0.7) - y*(-0.7)
|
||||
//y = ysin0 + ycos0
|
||||
//y = x*(-0.7) + y*(-0.7)
|
||||
//-45 degree rotation
|
||||
nx = sgn(-dx+dy);
|
||||
ny = sgn(-dx-dy);
|
||||
if (isok(x(magr) + nx, y(magr) + ny) && !(result&(MM_AGR_DIED|MM_AGR_STOP))){
|
||||
struct monst *mdef2 = !youagr ? m_u_at(x(magr) + nx, y(magr) + ny) :
|
||||
u.uswallow ? u.ustuck :
|
||||
(nx || ny) ? m_at(x(magr) + nx, y(magr) + ny) :
|
||||
(struct monst *)0;
|
||||
if (mdef2
|
||||
&& (!DEADMONSTER(mdef2))
|
||||
&& ((!youagr && mdef2 != &youmonst && mdef2->mpeaceful != magr->mpeaceful) ||
|
||||
(!youagr && mdef2 == &youmonst && !magr->mpeaceful) ||
|
||||
(youagr && !mdef2->mpeaceful))
|
||||
) { //Can hit a worm multiple times
|
||||
int vis2 = VIS_NONE;
|
||||
if(youagr || canseemon(magr))
|
||||
vis2 |= VIS_MAGR;
|
||||
if(mdef2 == &youmonst || canseemon(mdef2))
|
||||
vis2 |= VIS_MDEF;
|
||||
bhitpos.x = x(magr) + nx; bhitpos.y = y(magr) + ny;
|
||||
subresult = xmeleehity(magr, mdef2, attk, &otmp, vis2, tohitmod, TRUE);
|
||||
/* handle MM_AGR_DIED and MM_AGR_STOP by adding them to the overall result, ignore other outcomes */
|
||||
result |= subresult&(MM_AGR_DIED|MM_AGR_STOP);
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue