: say ( s -- ) me @ swap notify ; : ring ( -- d ) trigger @ location ; : func ( -- d ) trigger @ name tolower ; : did? ( -- s ) func swap tolower instr ; : main ( s -- ) ring location me @ dbcmp not if pop "You should probably be holding the ring." say exit then "propose" did? if ring owner me @ dbcmp not if pop "This ring is not yours to use." say exit then me @ "@status" getpropstr dup "engaged" stringcmp not if pop pop "You can't do that! You're engaged already!" say exit then "married" stringcmp not if pop "You can't do that! You're married!" say exit then ring "_proposed" prop-exists? if pop "This ring is already awaiting a reply." say exit then .pmatch dup not if pop "Propose to whom?" say exit then dup location loc @ dbcmp not if "Don't you think %s should be in the room?" pronoun_sub say exit then "You get down on one knee and face your beloved." say me @ "%n gets down on one bended knee and smiles at %p beloved." pronoun_sub loc @ me @ rot notify_except me @ name " smiles at %n and queries, \"Will you marry me?\"" strcat over swap pronoun_sub loc @ #-1 rot notify_except me @ name " slides an engagement ring on your finger." strcat over swap notify "You may either 'accept' or 'decline' %p offer." me @ swap pronoun_sub over swap notify ring over moveto ring "_proposed" rot intostr addprop exit then "decline" did? if pop me @ "@status" prop-exists? if "You've already done that." say exit then ring "_proposed" getpropstr atoi dbref me @ dbcmp not if "This isn't your ring. What are you doing with it?" say exit then "%n has sadly declined to marry you." ring "_proposed" getpropstr atoi dbref swap pronoun_sub ring owner swap notify me @ "You sadly but politely decline %n's proposal." ring owner swap pronoun_sub notify ring "_proposed" remove_prop ring dup owner moveto exit then "accept" did? if pop me @ "@status" prop-exists? if "You've already done that." say exit then ring "_proposed" getpropstr atoi dbref me @ dbcmp not if "This isn't your ring. What are you doing with it?" say exit then "%n said yes! %S will marry you!" ring "_proposed" getpropstr atoi dbref swap pronoun_sub ring owner swap notify me @ "You say yes, you will marry %n!" ring owner swap pronoun_sub notify me @ name " accepts %n's proposal!" strcat ring owner swap pronoun_sub loc @ me @ ring owner 4 rotate .notify_except2 me @ "@status" "engaged" addprop ring owner "@status" "engaged" addprop ring "_proposer" ring owner intostr addprop ring me @ chown ring me @ name "'s engagement ring" strcat setname "An inscription inside the band reads: " ring "_proposer" getpropstr atoi dbref name strcat " proposed to " strcat me @ name strcat " on " strcat systime ctime strcat "." strcat ring swap setdesc exit then pop "Unrecognized ring command." say exit ;