mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-08 23:20:12 +00:00
fixed ambush size
This commit is contained in:
parent
4828623960
commit
35dbeea702
@ -798,8 +798,8 @@ EX int size(cell *c, eItem what) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EX void ambush(cell *c, eItem what) {
|
EX void ambush(cell *c, int dogs) {
|
||||||
LATE ( ambush(c, what); )
|
LATE ( ambush(c, dogs); )
|
||||||
int maxdist = gamerange();
|
int maxdist = gamerange();
|
||||||
celllister cl(c, maxdist, 1000000, NULL);
|
celllister cl(c, maxdist, 1000000, NULL);
|
||||||
cell *c0 = c;
|
cell *c0 = c;
|
||||||
@ -812,7 +812,6 @@ EX void ambush(cell *c, eItem what) {
|
|||||||
if(dh > d) c0 = cx, d = dh;
|
if(dh > d) c0 = cx, d = dh;
|
||||||
}
|
}
|
||||||
if(sphere) {
|
if(sphere) {
|
||||||
int dogs = size(c, what);
|
|
||||||
for(int i = cl.lst.size()-1; i>0 && dogs; i--)
|
for(int i = cl.lst.size()-1; i>0 && dogs; i--)
|
||||||
if(!isPlayerOn(cl.lst[i]) && !cl.lst[i]->monst)
|
if(!isPlayerOn(cl.lst[i]) && !cl.lst[i]->monst)
|
||||||
cl.lst[i]->monst = moHunterDog, dogs--;
|
cl.lst[i]->monst = moHunterDog, dogs--;
|
||||||
@ -849,7 +848,6 @@ EX void ambush(cell *c, eItem what) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
int N = isize(around);
|
int N = isize(around);
|
||||||
int dogs = size(c, what);
|
|
||||||
|
|
||||||
int gaps = dogs;
|
int gaps = dogs;
|
||||||
int result = dogs0;
|
int result = dogs0;
|
||||||
|
@ -80,7 +80,7 @@ EX bool collectItem(cell *c2, bool telekinesis IS(false)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(c2->land == laHunting && c2->item && !inv::activating) {
|
if(c2->land == laHunting && c2->item && !inv::activating) {
|
||||||
ambush::ambush(c2, c2->item);
|
ambush::ambush(c2, ambush::size(c2, c2->item));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isRevivalOrb(c2->item) && multi::revive_queue.size()) {
|
if(isRevivalOrb(c2->item) && multi::revive_queue.size()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user