jael: add %lyfe and %ryft scrys (unitized %life and %rift) and use in +trouble

This commit is contained in:
John Franklin 2019-11-30 19:04:18 -06:00
parent aa7ba9f075
commit c36edc838e
2 changed files with 37 additions and 3 deletions

View File

@ -24,14 +24,18 @@
=/ o=@ta (scot %p our)
=/ n=@ta (scot %da now)
?~ b ~[o a n]
~[o a n (scot %p u.b)]
~[o a n (scot %p u.b)]
::
++ info
|= [=term =ship]
:: unitized life and rift
=/ lyfe .^((unit @ud) %j (pathify ~.lyfe `ship))
=/ ryft .^((unit @ud) %j (pathify ~.ryft `ship))
:* term
ship=ship
point=(crip (slag 2 (scow %ui ship)))
life=.^(* %j (pathify ~.life `ship))
rift=.^(* %j (pathify ~.rift `ship))
:: report as units
life=lyfe
rift=ryft
==
--

View File

@ -996,6 +996,22 @@
=/ pub (~(get by pos.zim.pki.lex) u.who)
?~ pub ~
``[%atom !>(life.u.pub)]
::
%lyfe :: unitized %life
?. ?=([@ ~] tyl) [~ ~]
?. =([%& our] why)
[~ ~]
=/ who (slaw %p i.tyl)
?~ who [~ ~]
:: fake ships always have life=1
::
?: fak.own.pki.lex
``[%noun !>((some 1))]
?: =(u.who p.why)
``[%noun !>((some lyf.own.pki.lex))]
=/ pub (~(get by pos.zim.pki.lex) u.who)
?~ pub ``[%noun !>(~)]
``[%noun !>((some life.u.pub))]
::
%rift
?. ?=([@ ~] tyl) [~ ~]
@ -1010,6 +1026,20 @@
=/ pos (~(get by pos.zim.pki.lex) u.who)
?~ pos ~
``[%atom !>(rift.u.pos)]
::
%ryft :: unitized %rift
?. ?=([@ ~] tyl) [~ ~]
?. =([%& our] why)
[~ ~]
=/ who (slaw %p i.tyl)
?~ who [~ ~]
:: fake ships always have rift=1
::
?: fak.own.pki.lex
``[%noun !>((some 1))]
=/ pos (~(get by pos.zim.pki.lex) u.who)
?~ pos ``[%noun !>(~)]
``[%noun !>((some rift.u.pos))]
::
%vein
?. ?=([@ ~] tyl) [~ ~]