mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-09-01 02:07:57 +00:00
Show dice type/value on mouseover
This commit is contained in:
@@ -1153,6 +1153,12 @@ EX namespace dice {
|
||||
return isDie(c->wall) || isDie(c->monst);
|
||||
}
|
||||
|
||||
EX string describe(cell *c) {
|
||||
if (!data.count(c)) return "BUG: die data missing";
|
||||
else if (!data[c].which) return "BUG: die data default-initialized";
|
||||
else return XLAT("d%1 rolled %2", its(data[c].which->faces), its(data[c].val + 1));
|
||||
}
|
||||
|
||||
EX void roll(movei mi) {
|
||||
auto &cto = mi.t;
|
||||
auto &th = mi.s;
|
||||
|
Reference in New Issue
Block a user