mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-27 14:37:16 +00:00
fixup to ElectricLand
This commit is contained in:
parent
d08c5ea0c4
commit
bc12d35053
@ -639,6 +639,7 @@ static const flagtype LF_HAUNTED = Flag(12);
|
||||
static const flagtype LF_TROLL = Flag(13);
|
||||
static const flagtype LF_INMIRROR = Flag(14);
|
||||
static const flagtype LF_INMIRRORORWALL = Flag(15);
|
||||
static const flagtype LF_ELECTRIC = Flag(17);
|
||||
|
||||
struct landtype {
|
||||
color_t color;
|
||||
|
10
complex.cpp
10
complex.cpp
@ -211,7 +211,7 @@ EX namespace elec {
|
||||
c->wall == waDeadTroll2 ||
|
||||
c->wall == waVinePlant ||
|
||||
c->wall == waMetal || isAlchAny(c))
|
||||
return c->land == laStorms ? ecConductor : ecGrounded;
|
||||
return isElectricLand(c) ? ecConductor : ecGrounded;
|
||||
if(c->wall == waBarrier)
|
||||
return ecIsolator;
|
||||
if(c->wall == waChasm)
|
||||
@ -220,7 +220,7 @@ EX namespace elec {
|
||||
if(shmup::on ? isPlayerOn(c) : (isPlayerOn(c) || stalemate::isMoveto(c) || (items[itOrbEmpathy] && isFriendly(c)))) {
|
||||
if(items[itOrbShield]) return ecIsolator;
|
||||
if(afterOrb) return ecIsolator;
|
||||
if(!items[itOrbAether]) return c->land == laStorms ? ecConductor : ecGrounded;
|
||||
if(!items[itOrbAether]) return isElectricLand(c) ? ecConductor : ecGrounded;
|
||||
}
|
||||
|
||||
// if(c->monst && stalemate::moveto) printf("%p: isKilled = %d\n", c, stalemate::isKilled(c));
|
||||
@ -233,9 +233,9 @@ EX namespace elec {
|
||||
c->monst != moGhost && c->monst != moIvyDead && c->monst != moIvyNext
|
||||
&& !(isDragon(c->monst) && !c->hitpoints)
|
||||
)
|
||||
return c->land == laStorms ? (ao ? ecCharged : ecConductor) : ecGrounded;
|
||||
return isElectricLand(c) ? (ao ? ecCharged : ecConductor) : ecGrounded;
|
||||
|
||||
if(c->land != laStorms)
|
||||
if(!isElectricLand(c))
|
||||
return ecGrounded;
|
||||
|
||||
if(ao) return ecCharged;
|
||||
@ -449,7 +449,7 @@ EX namespace elec {
|
||||
EX void act() {
|
||||
int k = tkills();
|
||||
for(int i=0; i<numplayers(); i++)
|
||||
if(multi::playerActive(i) && playerpos(i)->land == laStorms && !afterOrb)
|
||||
if(multi::playerActive(i) && isElectricLand(playerpos(i)) && !afterOrb)
|
||||
markOrb(itOrbShield), markOrb(itOrbAether);
|
||||
builder b;
|
||||
fire();
|
||||
|
@ -61,6 +61,7 @@ LANDFLAGCHECK(isHaunted, flag & LF_HAUNTED)
|
||||
LANDFLAGCHECK(isTrollLand, flag & LF_TROLL)
|
||||
LANDFLAGCHECK(inmirror, flag & LF_INMIRROR)
|
||||
LANDFLAGCHECK(inmirrororwall, flag & LF_INMIRRORORWALL)
|
||||
LANDFLAGCHECK(isElectricLand, flag & LF_ELECTRIC)
|
||||
|
||||
MONFLAGCHECK(isGhostable, !(flag & CF_NOGHOST))
|
||||
MONFLAGCHECK(isRaider, flag & CF_RAIDER)
|
||||
|
Loading…
Reference in New Issue
Block a user