@prog read-docs.muf 1 9999 d 1 i ( Usage: @nnnn abcdef c where abcdef are the flag characters to potentially be set and c is the flag to be cleared by this run. Flags are kept in a property whose name is in the @docs-prop: on trigger @. When going from not-all-flags-cleared to all-flags-cleared, if the player has an @virtual-b-bit: property, it is removed and the player's B bit is set. ) $def bbit-prop "@virtual-b-bit" : mutate-b-bit me @ bbit-prop prop-exists? if me @ "b" set me @ bbit-prop remove_prop me @ trigger @ "@docs-prop" getpropstr remove_prop then ; : main me @ "b" flag? if pop exit then me @ true-royalty? if pop exit then " " explode dup 2 > if mpop exit then 1 = if "" swap then ( c abcdef ) trigger @ "@docs-prop" getpropstr ( c abcdef propname ) dup not if 3 mpop exit then me @ over prop-exists? not if me @ over 4 rotate addprop else swap pop then ( c propname ) me @ over getpropstr ( c propname oldval ) dup not if 3 mpop exit then rot dup not if 3 mpop exit then "" swap subst ( propname newval ) me @ rot 3 pick addprop not if mutate-b-bit then ; . c q