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

first version of the Land of Dice

This commit is contained in:
Zeno Rogue
2021-05-27 13:00:20 +02:00
parent b879682d82
commit 6a6ed4ea0d
11 changed files with 330 additions and 98 deletions

View File

@@ -379,8 +379,22 @@ EX void pushThumper(const movei& mi) {
cto->wall = waCrateOnTarget;
th->wall = waCrateTarget;
}
else if(w == waDie)
dice::roll(mi);
else if(among(w, waRichDie, waBlandDie)) {
th->wall = waNone;
cto->wall = w;
animateMovement(mi, LAYER_BOAT);
dice::roll(mi);
if(w == waRichDie && dice::data[cto].happy() > 0) {
cto->wall = waBlandDie;
if(cto->land == laDice && th->land == laDice) {
items[itDice]++;
addMessage(XLAT("The die is now happy, and you are rewarded!"));
}
else {
addMessage(XLAT("The die is now happy, but won't reward you outside of the Land of Dice!"));
}
}
}
else
cto->wall = w;
if(explode) cto->wall = waFireTrap, cto->wparam = explode;
@@ -389,7 +403,7 @@ EX void pushThumper(const movei& mi) {
}
EX bool canPushThumperOn(cell *tgt, cell *thumper, cell *player) {
if(thumper->wall == waDie && tgt->type == 7)
if(among(thumper->wall, waRichDie, waBlandDie) && ctof(tgt))
return false;
if(tgt->wall == waBoat || tgt->wall == waStrandedBoat) return false;
if(isReptile(tgt->wall)) return false;