1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-06-15 09:50:00 +00:00

shmup:: Orb of Magnetism, Curse of Water, Curse of Weakness, Curse of Repulsion, Curse of Fatigue now work

This commit is contained in:
Zeno Rogue 2021-05-30 14:12:51 +02:00
parent be5194958e
commit ab92209778

View File

@ -951,6 +951,7 @@ void movePlayer(monster *m, int delta) {
} }
if(playergo[cpid] && markOrb(itOrbDash)) playergo[cpid] *= 1.5; if(playergo[cpid] && markOrb(itOrbDash)) playergo[cpid] *= 1.5;
if(playergo[cpid] && markOrb(itCurseFatigue)) playergo[cpid] *= 0.75;
bool go = false; bool go = false;
@ -1176,6 +1177,8 @@ void movePlayer(monster *m, int delta) {
} }
if(c2 != m->base) { if(c2 != m->base) {
doPickupItemsWithMagnetism(c2);
if(cellUnstable(m->base) && !markOrb(itOrbAether)) if(cellUnstable(m->base) && !markOrb(itOrbAether))
doesFallSound(m->base); doesFallSound(m->base);
@ -1184,6 +1187,11 @@ void movePlayer(monster *m, int delta) {
if(makeflame(m->base, 10, false)) markOrb(itOrbFire); if(makeflame(m->base, 10, false)) markOrb(itOrbFire);
} }
if(items[itCurseWater]) {
visibleFor(800);
if(makeshallow(m->base, 10, false)) markOrb(itCurseWater);
}
if(isIcyLand(m->base) && m->base->wall == waNone && markOrb(itOrbWinter)) { if(isIcyLand(m->base) && m->base->wall == waNone && markOrb(itOrbWinter)) {
invismove = false; invismove = false;
m->base->wall = waIcewall; m->base->wall = waIcewall;
@ -1688,10 +1696,12 @@ void moveBullet(monster *m, int delta) {
eMonster ptype = parentOrSelf(m)->type; eMonster ptype = parentOrSelf(m)->type;
bool slayer = m->type == moCrushball || bool slayer = m->type == moCrushball ||
(markOrb(itOrbSlaying) && (markOrb(itOrbEmpathy) ? isPlayerOrImage(ptype) : ptype == moPlayer)); (markOrb(itOrbSlaying) && (markOrb(itOrbEmpathy) ? isPlayerOrImage(ptype) : ptype == moPlayer));
bool weak = m->type == moAirball ||
(markOrb(itCurseWeakness) && (markOrb(itOrbEmpathy) ? isPlayerOrImage(ptype) : ptype == moPlayer));
if(m->type != moTongue && !(godragon || (c2==m->base && m->type == moArrowTrap) || passable(c2, m->base, P_BULLET | P_MIRRORWALL))) { if(m->type != moTongue && !(godragon || (c2==m->base && m->type == moArrowTrap) || passable(c2, m->base, P_BULLET | P_MIRRORWALL))) {
m->dead = true; m->dead = true;
if(m->type != moAirball && (!isDie(c2->monst) || slayer)) if(!weak && (!isDie(c2->monst) || slayer))
killMonster(c2, m->get_parenttype()); killMonster(c2, m->get_parenttype());
// cell *c = m->base; // cell *c = m->base;
if(m->parent && isPlayer(m->parent)) { if(m->parent && isPlayer(m->parent)) {
@ -1744,7 +1754,7 @@ void moveBullet(monster *m, int delta) {
if(m2->type == passive_switch) { m->dead = true; continue; } if(m2->type == passive_switch) { m->dead = true; continue; }
if(m->type == moAirball && isBlowableMonster(m2->type)) { if(weak && isBlowableMonster(m2->type)) {
if(m2->blowoff < curtime) { if(m2->blowoff < curtime) {
hyperpoint h = inverse_shift(m2->pat, nat0 * C0); hyperpoint h = inverse_shift(m2->pat, nat0 * C0);