1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-30 21:42:59 +00:00

Magnetic and Switch V1

This commit is contained in:
Zeno Rogue
2017-12-30 15:12:15 +01:00
parent 9948b09b69
commit d3e789bc93
9 changed files with 126 additions and 14 deletions

View File

@@ -276,7 +276,7 @@ int itemclass(eItem i) {
i == itGreenGrass || i == itBull ||
i == itLavaLily || i == itHunting ||
i == itBlizzard || i == itTerra || i == itGlowCrystal || i == itSnake ||
i == itDock || i == itInvix
i == itDock || i == itInvix || i == itSwitch
)
return IC_TREASURE;
if(i == itSavedPrincess || i == itStrongWind || i == itWarning)
@@ -385,7 +385,18 @@ bool normalMover(eMonster m) {
m == moHunterDog || m == moTerraWarrior || m == moJiangshi ||
m == moLavaWolf || m == moSalamander ||
m == moHunterGuard || m == moHunterChanging ||
m == moIceGolem || slowMover(m);
m == moIceGolem ||
m == moNorthPole || m == moSouthPole ||
m == moSwitch1 || m == moSwitch2 ||
slowMover(m);
}
bool isMagneticPole(eMonster m) {
return m == moNorthPole || m == moSouthPole;
}
bool isSwitch(eMonster m) {
return m == moSwitch1 || m == moSwitch2;
}
// from-to
@@ -494,6 +505,7 @@ bool isInactiveEnemy(cell *w, eMonster forwho) {
bool isActiveEnemy(cell *w, eMonster forwho) {
if(((forwho == moPlayer) ? realstuntime(w) : realstuntime(w) > 1))
return false;
if(w->monst == passive_switch) return false;
if(w->monst == moNone) return false;
if(isFriendly(w)) return false;
if(isInactiveEnemy(w, forwho)) return false;