diff --git a/rogueviz/ru/classes.cpp b/rogueviz/ru/classes.cpp index 3177ff48..508f9339 100644 --- a/rogueviz/ru/classes.cpp +++ b/rogueviz/ru/classes.cpp @@ -393,6 +393,7 @@ struct man : public entity { int last_action; + int gameseed; int experience; stat profession; string backstory; diff --git a/rogueviz/ru/man.cpp b/rogueviz/ru/man.cpp index 07feeb4f..3c56ddbf 100644 --- a/rogueviz/ru/man.cpp +++ b/rogueviz/ru/man.cpp @@ -65,7 +65,8 @@ void man::hs(stater& s) { .act("attack_when", attack_when, 0) .act("on_floor_when", on_floor_when, 0) .act("xp", experience, 0) - .act("last_action", last_action, 0); + .act("last_action", last_action, 0) + .act("gameseed", gameseed, 0); sact(s1, "hair", hair); sact(s1, "eyes", eye); string z = unspace(backstory); diff --git a/rogueviz/ru/powers.cpp b/rogueviz/ru/powers.cpp index e6213c38..fc3698a2 100644 --- a/rogueviz/ru/powers.cpp +++ b/rogueviz/ru/powers.cpp @@ -54,7 +54,7 @@ power& power::be_armor(const vector>& v) { get_desc = [this, gd, v] () -> string { auto desc = gd(); std::mt19937 armorgen; - armorgen.seed(statseed ^ v[0][0][0] ^ (v[1][0][0] << 8)); + armorgen.seed(m.gameseed ^ v[0][0][0] ^ (v[1][0][0] << 8)); println(hlog, "after armorgen"); vector qty(v.size(), 0); for(int i=0; i