mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-01-13 10:50:35 +00:00
crossbow:: can hit hedgehogs
This commit is contained in:
parent
a233d3a7a6
commit
9da8206a9f
@ -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);
|
for(int bb=0; bb<2; bb++) achievement_count("SLASH", numbb[bb], 0);
|
||||||
|
|
||||||
if(peace::on) return;
|
if(peace::on) return;
|
||||||
|
bool out = who == moPlayer && bow::crossbow_mode();
|
||||||
|
|
||||||
for(int t=0; t<mf->type; t++) {
|
for(int t=0; t<mf->type; t++) {
|
||||||
cell *c = mf->move(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))
|
if(stabthere && c->wall == waExplosiveBarrel && markOrb(itOrbThorns))
|
||||||
explodeBarrel(c);
|
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);
|
changes.ccell(c);
|
||||||
if(c->monst != moHedge) {
|
if(c->monst != moHedge || out) {
|
||||||
markOrb(itOrbThorns); if(who != moPlayer) markOrb(itOrbEmpathy);
|
markOrb(itOrbThorns); if(who != moPlayer) markOrb(itOrbEmpathy);
|
||||||
}
|
}
|
||||||
eMonster m = c->monst;
|
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;
|
if(!logical_adjacent(mt, who, c)) continue;
|
||||||
eMonster mm = c->monst;
|
eMonster mm = c->monst;
|
||||||
int flag = AF_APPROACH;
|
int flag = AF_APPROACH;
|
||||||
|
Loading…
Reference in New Issue
Block a user