I was going to suggest doing this with a table, but it seems to me that for your purposes maybe you can collect your relations into a list and write a special phrase to simultaneously set one and clear all the others. Like this:
Loving relates various persons to various persons. The verb to love means the loving relation.
Hating relates various persons to various persons. The verb to hate means the hating relation.
Liking relates various persons to various persons. The verb to like means the liking relation.
Disliking relates various persons to various persons. The verb to dislike means the disliking relation.
Indifference relates various persons to various persons. The verb to be indifferent to means the indifference relation.
The attitudes is a list of relations of persons that varies. The attitudes are {loving relation, hating relation, liking relation, disliking relation, indifference relation}.
When play begins:
set most attitudes to indifference.
To set most attitudes to indifference:
repeat with subject running through persons:
repeat with object running through persons:
let relation found be a truth state;
repeat with tested attitude running through the attitudes:
if the tested attitude relates the subject to the object:
now relation found is true;
break; [ends the repeat loop, which is not strictly necessary, but saves a bit of time]
if relation found is false: [this is outside the repeat through the attitudes, so no relation has been found]
now the subject is indifferent to the object.
To set the feeling of (subject - a person) about (object - a person) to (new attitude - a relation of persons):
[if new attitude is not listed in the attitudes:
say "Programming error! Tried to set the feeling of [subject] about [object] to [new attitude], which is not an attitude.";
otherwise:]
now the new attitude relates the subject to the object;
repeat with tested attitude running through attitudes:
if tested attitude is not the new attitude:
now the tested attitude does not relate the subject to the object.
Daily Planet is a room. Clark is a man in Daily Planet. Lois is a woman in Daily Planet. Lex is a man in Daily Planet.
Clark loves Lois. Lois likes Clark. Lex hates Clark. Clark dislikes Lex.
After jumping:
set the feeling of Lois about Clark to the loving relation.
Every turn when Lois likes Clark:
say "Lois says 'Can't wait to see Superman.'"
Every turn when Lois loves Clark:
say "Lois says 'You were Superman all along!'"
You’d have to be very careful always to change relations with the “set the feeling” phrase rather than “now Lois loves Clark,” or you’ll introduce annoying bugs. And it can be hard to remember that (I just messed this up while trying to type up this example). But a nice thing about this, compared to storing everything in a table, is that it lets you keep the relation checks like “if Lois loves Clark” and even “the list of people who love Clark.”
(Also I realize that you’re talking about relating people to subjects rather than other people. This is doable–you’d say “relation of persons to subjects” rather than just “relation of persons.” See §13.14.)