Animated Die are now distinct from HexDemon, for alt geometries
This commit is contained in:
parent
12c1009039
commit
6fb5cc879e
|
@ -1712,7 +1712,7 @@ WALL('d', 0x106010, "Happy Die", waHappyDie, WF_WALL | WF_PUSHABLE, RESERVED, 0,
|
||||||
"weak spots. You can roll Happy Dice, but it may become angry!"
|
"weak spots. You can roll Happy Dice, but it may become angry!"
|
||||||
)
|
)
|
||||||
|
|
||||||
MONSTER('d', 0x603010, "Animated Die", moAnimatedDie, ZERO, RESERVED, moHexDemon,
|
MONSTER('d', 0x603010, "Animated Die", moAnimatedDie, ZERO, RESERVED, moAnimatedDie,
|
||||||
"When sentient dice are too long in an incorrect position, they start to move on their own, "
|
"When sentient dice are too long in an incorrect position, they start to move on their own, "
|
||||||
"and attack everyone. You can still convince Animated Dice of your good intentions by "
|
"and attack everyone. You can still convince Animated Dice of your good intentions by "
|
||||||
"rolling them into a position such that the highest number is on top. "
|
"rolling them into a position such that the highest number is on top. "
|
||||||
|
@ -1720,7 +1720,7 @@ MONSTER('d', 0x603010, "Animated Die", moAnimatedDie, ZERO, RESERVED, moHexDemon
|
||||||
"Other rolls and attacks are not allowed."
|
"Other rolls and attacks are not allowed."
|
||||||
)
|
)
|
||||||
|
|
||||||
MONSTER('d', 0x901010, "Angry Die", moAngryDie, ZERO, RESERVED, moHexDemon,
|
MONSTER('d', 0x901010, "Angry Die", moAngryDie, ZERO, RESERVED, moAnimatedDie,
|
||||||
"You have made a die unhappy, and it remembers that! This one won't forgive you, no matter what you do."
|
"You have made a die unhappy, and it remembers that! This one won't forgive you, no matter what you do."
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,7 @@ namespace hr {
|
||||||
#define HF_MONK Flag(30)
|
#define HF_MONK Flag(30)
|
||||||
#define HF_WESTWALL Flag(31)
|
#define HF_WESTWALL Flag(31)
|
||||||
#define HF_JUMP Flag(32)
|
#define HF_JUMP Flag(32)
|
||||||
|
#define HF_DICE Flag(33)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
EX flagtype havewhat, hadwhat;
|
EX flagtype havewhat, hadwhat;
|
||||||
|
@ -481,7 +482,7 @@ EX void bfs() {
|
||||||
else if(isMagneticPole(c2->monst)) havewhat |= HF_MAGNET;
|
else if(isMagneticPole(c2->monst)) havewhat |= HF_MAGNET;
|
||||||
else if(c2->monst == moAltDemon) havewhat |= HF_ALT;
|
else if(c2->monst == moAltDemon) havewhat |= HF_ALT;
|
||||||
else if(c2->monst == moHexDemon) havewhat |= HF_HEXD;
|
else if(c2->monst == moHexDemon) havewhat |= HF_HEXD;
|
||||||
else if(among(c2->monst, moAnimatedDie, moAngryDie)) havewhat |= HF_HEXD;
|
else if(among(c2->monst, moAnimatedDie, moAngryDie)) havewhat |= HF_DICE;
|
||||||
else if(c2->monst == moMonk) havewhat |= HF_MONK;
|
else if(c2->monst == moMonk) havewhat |= HF_MONK;
|
||||||
else if(c2->monst == moShark || c2->monst == moCShark || among(c2->monst, moRusalka, moPike)) havewhat |= HF_SHARK;
|
else if(c2->monst == moShark || c2->monst == moCShark || among(c2->monst, moRusalka, moPike)) havewhat |= HF_SHARK;
|
||||||
else if(c2->monst == moAirElemental)
|
else if(c2->monst == moAirElemental)
|
||||||
|
|
|
@ -2086,6 +2086,7 @@ EX void movemonsters() {
|
||||||
groupmove(moNorthPole, 0); */
|
groupmove(moNorthPole, 0); */
|
||||||
DEBB(DF_TURN, ("bugs"));
|
DEBB(DF_TURN, ("bugs"));
|
||||||
if(havewhat & HF_HEXD) groupmove(moHexDemon, 0);
|
if(havewhat & HF_HEXD) groupmove(moHexDemon, 0);
|
||||||
|
if(havewhat & HF_DICE) groupmove(moAnimatedDie, 0);
|
||||||
if(havewhat & HF_ALT) groupmove(moAltDemon, 0);
|
if(havewhat & HF_ALT) groupmove(moAltDemon, 0);
|
||||||
if(havewhat & HF_MONK) groupmove(moMonk, 0);
|
if(havewhat & HF_MONK) groupmove(moMonk, 0);
|
||||||
|
|
||||||
|
|
19
passable.cpp
19
passable.cpp
|
@ -539,6 +539,25 @@ EX bool passable_for(eMonster m, cell *w, cell *from, flagtype extra) {
|
||||||
}
|
}
|
||||||
return !pseudohept(w) && passable(w, from, extra);
|
return !pseudohept(w) && passable(w, from, extra);
|
||||||
}
|
}
|
||||||
|
if(m == moAnimatedDie) {
|
||||||
|
if(extra & P_ONPLAYER) {
|
||||||
|
if(isPlayerOn(w)) return true;
|
||||||
|
}
|
||||||
|
if(from && among(from->monst, moAnimatedDie, moAngryDie)) {
|
||||||
|
bool ok = false;
|
||||||
|
for(int i=0; i<from->type; i++) {
|
||||||
|
if(from->move(i) != w) continue;
|
||||||
|
if(dice::can_roll(movei(from, i))) ok = true;
|
||||||
|
}
|
||||||
|
if(!ok) return false;
|
||||||
|
}
|
||||||
|
if(from && !dice::die_possible(from))
|
||||||
|
return false;
|
||||||
|
else if(!dice::die_possible(w))
|
||||||
|
return false;
|
||||||
|
else
|
||||||
|
return passable(w, from, extra);
|
||||||
|
}
|
||||||
if(m == moFrog) {
|
if(m == moFrog) {
|
||||||
return isNeighbor1(from, w) ? passable(w, from, extra) : check_jump(from, w, extra, dummy) == 3;
|
return isNeighbor1(from, w) ? passable(w, from, extra) : check_jump(from, w, extra, dummy) == 3;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue