1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-25 17:40:36 +00:00

crossbow:: can hit hedgehogs

This commit is contained in:
Zeno Rogue 2023-10-27 23:23:45 +02:00
parent a233d3a7a6
commit 9da8206a9f

View File

@ -1279,6 +1279,7 @@ EX void stabbingAttack(movei mi, eMonster who, int bonuskill IS(0)) {
for(int bb=0; bb<2; bb++) achievement_count("SLASH", numbb[bb], 0);
if(peace::on) return;
bool out = who == moPlayer && bow::crossbow_mode();
for(int t=0; t<mf->type; t++) {
cell *c = mf->move(t);
@ -1291,9 +1292,9 @@ EX void stabbingAttack(movei mi, eMonster who, int bonuskill IS(0)) {
if(stabthere && c->wall == waExplosiveBarrel && markOrb(itOrbThorns))
explodeBarrel(c);
if(stabthere && canAttack(mt,who,c,c->monst,AF_STAB)) {
if(stabthere && (items[itOrbThorns] || !out) && canAttack(mt,who,c,c->monst,AF_STAB)) {
changes.ccell(c);
if(c->monst != moHedge) {
if(c->monst != moHedge || out) {
markOrb(itOrbThorns); if(who != moPlayer) markOrb(itOrbEmpathy);
}
eMonster m = c->monst;
@ -1337,7 +1338,7 @@ EX void stabbingAttack(movei mi, eMonster who, int bonuskill IS(0)) {
}
}
if(!isUnarmed(who)) forCellIdEx(c, t, mt) {
if(!isUnarmed(who) && !out) forCellIdEx(c, t, mt) {
if(!logical_adjacent(mt, who, c)) continue;
eMonster mm = c->monst;
int flag = AF_APPROACH;