mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2026-05-26 23:42:12 +00:00
Merge branch 'master' of https://github.com/zenorogue/hyperrogue
This commit is contained in:
@@ -18,6 +18,7 @@ if [[ "$GH_HYP_PNG" == "png_1" ]]; then
|
||||
fi
|
||||
|
||||
if [[ "$GH_OS" == "ubuntu-latest" ]]; then
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install $GH_DEPS_UBUNTU
|
||||
elif [[ "$GH_OS" == "macos-latest" ]]; then
|
||||
brew update
|
||||
|
||||
@@ -1194,6 +1194,7 @@ EX vector<cell*> gun_targets(cell *c) {
|
||||
if(passable(c2, c1, P_BULLET | P_FLYING | P_MONSTER))
|
||||
if(cl.add(c2)) dists.push_back(dists[i] + 1);
|
||||
}
|
||||
cl.remove(c);
|
||||
return cl.lst;
|
||||
}
|
||||
|
||||
|
||||
+4
-2
@@ -400,6 +400,7 @@ EX bool incompatible1(eLand l1, eLand l2) {
|
||||
if(l1 == laBull && l2 == laTerracotta) return true;
|
||||
if(l1 == laReptile && l2 == laTerracotta) return true;
|
||||
if(l1 == laBull && l2 == laDeadCaves) return true;
|
||||
if(l1 == laMinefield && l2 == laZebra) return true;
|
||||
if(isElemental(l1) && isElemental(l2)) return true;
|
||||
return false;
|
||||
}
|
||||
@@ -416,8 +417,9 @@ EX int elementalKills() {
|
||||
}
|
||||
|
||||
EX eLand randomElementalLandWeighted() {
|
||||
if(all_unlocked) return pick(laEAir, laEWater, laEEarth, laEFire);
|
||||
int i = hrand(elementalKills());
|
||||
int ek = elementalKills();
|
||||
if(ek == 0 || all_unlocked) return pick(laEAir, laEWater, laEEarth, laEFire);
|
||||
int i = hrand(ek);
|
||||
i -= kills[moAirElemental]; if(i<0) return laEAir;
|
||||
i -= kills[moWaterElemental]; if(i<0) return laEWater;
|
||||
i -= kills[moEarthElemental]; if(i<0) return laEEarth;
|
||||
|
||||
@@ -413,6 +413,16 @@ struct manual_celllister {
|
||||
return true;
|
||||
}
|
||||
|
||||
/** \brief remove a cell from the list */
|
||||
bool remove(cell *c) {
|
||||
if(!listed(c)) return false;
|
||||
int i = c->listindex;
|
||||
c->listindex = tmps[i];
|
||||
tmps.erase(tmps.begin() + i);
|
||||
lst.erase(lst.begin() + i);
|
||||
return true;
|
||||
}
|
||||
|
||||
~manual_celllister() {
|
||||
for(int i=0; i<isize(lst); i++) lst[i]->listindex = tmps[i];
|
||||
}
|
||||
|
||||
@@ -1094,6 +1094,9 @@ bool pcmove::move_if_okay() {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(getOLR(c2->item, c2->land) == olrDangerous && !checkonly && warningprotection(XLAT("Collecting %the1 in %the2 can be dangerous -- are you sure?", c2->item, c2->land)))
|
||||
return false;
|
||||
|
||||
if(switchplace_prevent(cwt.at, c2, *this))
|
||||
return false;
|
||||
if(!checkonly && warningprotection_hit(do_we_stab_a_friend(mi, moPlayer)))
|
||||
|
||||
Reference in New Issue
Block a user