1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-09-01 18:27:55 +00:00

variant:: cleaner implementation

This commit is contained in:
Zeno Rogue
2020-02-26 01:23:42 +01:00
parent bc12d35053
commit 00e436f0e2
2 changed files with 16 additions and 9 deletions

View File

@@ -51,6 +51,8 @@ struct stalemate1 {
};
#endif
EX bool used_impact;
bool stalemate1::isKilled(cell *w) {
if(w->monst == moNone || w == killed) return true;
if(!moveto) return false;
@@ -66,6 +68,9 @@ bool stalemate1::isKilled(cell *w) {
if(wid >= 0 && wfrom >= 0 && anglestraight(moveto, wfrom, wid)) flag |= AF_HORNS;
if(canAttack(moveto, who, w, w->monst, flag)) return true;
}
if(used_impact && !isMultitile(w) && isNeighbor(w, moveto))
return true;
if(isNeighbor(w, comefrom) && comefrom == moveto && killed) {
int d1 = neighborId(comefrom, w);