ludic.session: ply_rest_least, the party's rest for the clock (the valley's selftest57 down into the packages): the roster's freed slot reused and ply_leave_all, the nearest player alone, and ludic.shop's week of demand leaving the shared Random stream untouched
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
5bc2342174
commit
78c261c625
5 changed files with 46 additions and 1 deletions
|
|
@ -41,6 +41,13 @@ export function ply_rest(session_st: SessionState, p: int) -> float {
|
|||
return session_st.session__slot[p].rest
|
||||
}
|
||||
|
||||
# how much the party's rest speeds the clock: only as much as the least-resting player on
|
||||
export function ply_rest_least(session_st: SessionState) -> float {
|
||||
var m = ply_rest(session_st, 0)
|
||||
for p in 1 .. PLY_MAX { if ply_on(session_st, p) { m = Math.min(m, ply_rest(session_st, p)) } }
|
||||
return m
|
||||
}
|
||||
|
||||
export function ply_sleeping(session_st: SessionState, p: int) -> bool {
|
||||
if p == 0 { return session_st.session__me_sleeping }
|
||||
return ply_on(session_st, p) and session_st.session__slot[p].sleeping
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue