mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-02 12:19:18 +00:00
Orb of Vaulting and Dark Frogs can now jump over trees and explosive barrels
This commit is contained in:
parent
3f5af1f5bd
commit
561ce1a141
@ -578,6 +578,8 @@ EX void moverefresh(bool turn IS(true)) {
|
|||||||
|
|
||||||
else if(isFire(c)) {
|
else if(isFire(c)) {
|
||||||
if(c->monst == moSalamander) c->stuntime = max<int>(c->stuntime, 1);
|
if(c->monst == moSalamander) c->stuntime = max<int>(c->stuntime, 1);
|
||||||
|
else if(c->monst == moVaulter && c->mondir == JUMP)
|
||||||
|
c->mondir = NODIR;
|
||||||
else if(c->monst && !survivesFire(c->monst) && !isWorm(c->monst)) {
|
else if(c->monst && !survivesFire(c->monst) && !isWorm(c->monst)) {
|
||||||
addMessage(XLAT("%The1 burns!", c->monst));
|
addMessage(XLAT("%The1 burns!", c->monst));
|
||||||
if(isBull(c->monst)) {
|
if(isBull(c->monst)) {
|
||||||
|
@ -159,8 +159,12 @@ EX void moveMonster(const movei& mi) {
|
|||||||
if(mi.d == JUMP && m == moVaulter) {
|
if(mi.d == JUMP && m == moVaulter) {
|
||||||
cell *cm = common_neighbor(cf, ct);
|
cell *cm = common_neighbor(cf, ct);
|
||||||
if(cm->wall == waShrub) cm->wall = waNone;
|
if(cm->wall == waShrub) cm->wall = waNone;
|
||||||
|
if(cm->wall == waSmallTree) cm->wall = waNone;
|
||||||
|
if(cm->wall == waBigTree) cm->wall = waSmallTree;
|
||||||
|
if(cm->wall == waExplosiveBarrel) explodeBarrel(cm);
|
||||||
if(cm->monst)
|
if(cm->monst)
|
||||||
attackMonster(cm, AF_NORMAL | AF_MSG | AF_GETPLAYER, m);
|
attackMonster(cm, AF_NORMAL | AF_MSG | AF_GETPLAYER, m);
|
||||||
|
ct->mondir = JUMP;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(isLeader(m)) {
|
if(isLeader(m)) {
|
||||||
|
18
orbs.cpp
18
orbs.cpp
@ -1127,13 +1127,14 @@ EX int check_vault(cell *cf, cell *ct, flagtype flags, cell*& jumpthru) {
|
|||||||
}
|
}
|
||||||
jumpthru = c2;
|
jumpthru = c2;
|
||||||
if(!c2) return 0;
|
if(!c2) return 0;
|
||||||
if(!c2->monst && c2->wall != waShrub) return 1;
|
bool cutwall = among(c2->wall, waShrub, waExplosiveBarrel, waSmallTree, waBigTree);
|
||||||
|
if(!c2->monst && !cutwall) return 1;
|
||||||
bool for_monster = !(flags & P_ISPLAYER);
|
bool for_monster = !(flags & P_ISPLAYER);
|
||||||
if(for_monster && c2->monst && frog_power(c2->monst) && !items[itOrbDiscord]) return 1;
|
if(for_monster && c2->monst && frog_power(c2->monst) && !items[itOrbDiscord]) return 1;
|
||||||
if(c3) return 2;
|
if(c3) return 2;
|
||||||
if(c2->wall != waShrub && !passable(c2, cwt.at, flags | P_JUMP1 | P_MONSTER)) return 3;
|
if(!cutwall && !passable(c2, cwt.at, flags | P_JUMP1 | P_MONSTER)) return 3;
|
||||||
if(!passable(ct, c2, flags | P_JUMP2)) return 4;
|
if(!passable(ct, c2, flags | P_JUMP2)) return 4;
|
||||||
if(c2->wall != waShrub && !canAttack(cwt.at, moPlayer, c2, c2->monst, 0)) return 5;
|
if(!cutwall && !canAttack(cwt.at, moPlayer, c2, c2->monst, 0)) return 5;
|
||||||
return 6;
|
return 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1254,6 +1255,17 @@ EX eItem targetRangedOrb(cell *c, orbAction a) {
|
|||||||
addMessage(XLAT("You chop down the shrub."));
|
addMessage(XLAT("You chop down the shrub."));
|
||||||
jumpthru->wall = waNone;
|
jumpthru->wall = waNone;
|
||||||
}
|
}
|
||||||
|
if(jumpthru->wall == waSmallTree) {
|
||||||
|
addMessage(XLAT("You chop down the tree."));
|
||||||
|
jumpthru->wall = waNone;
|
||||||
|
}
|
||||||
|
if(jumpthru->wall == waBigTree) {
|
||||||
|
addMessage(XLAT("You start chopping down the tree."));
|
||||||
|
jumpthru->wall = waSmallTree;
|
||||||
|
}
|
||||||
|
if(jumpthru->wall == waExplosiveBarrel) {
|
||||||
|
explodeBarrel(jumpthru);
|
||||||
|
}
|
||||||
if(m)
|
if(m)
|
||||||
attackMonster(jumpthru, AF_NORMAL | AF_MSG, moPlayer);
|
attackMonster(jumpthru, AF_NORMAL | AF_MSG, moPlayer);
|
||||||
k = tkills() - k;
|
k = tkills() - k;
|
||||||
|
Loading…
Reference in New Issue
Block a user