Spaces:
Runtime error
Runtime error
File size: 1,261 Bytes
2803d7e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | # object
type o : t {
predicates {
combines_with(o, o, o);
fresh(o);
stored_item(o);
}
rules {
combine :: $at(P, r) & in(o, I) & in(o', I) & combines_with(o, o', o'') & fresh(o'') -> in(o'', I);
}
reverse_rules {
combine :: combine;
}
constraints {
obj1 :: in(o, I) & in(o, c) -> fail();
obj2 :: in(o, I) & on(o, s) -> fail();
obj3 :: in(o, I) & at(o, r) -> fail();
obj4 :: in(o, c) & on(o, s) -> fail();
obj5 :: in(o, c) & at(o, r) -> fail();
obj6 :: on(o, s) & at(o, r) -> fail();
obj7 :: at(o, r) & at(o, r') -> fail();
obj8 :: in(o, c) & in(o, c') -> fail();
obj9 :: on(o, s) & on(o, s') -> fail();
}
inform7 {
type {
kind :: "object-like";
definition :: "object-like is portable.";
}
predicates {
combines_with(o, o', o'') :: "";
fresh(o) :: "";
stored_item(o) :: "";
}
commands {
combine :: "combine {o} with {o'}" :: "unlocking the {o'} with the {o}";
}
code :: """
Understand "combine [something] with [something]" as unlocking it with.
""";
}
}
|