@startuml

hide empty members

package social {

package effect {

interface Effect {
  Update applyTo(Update update)
}

}

package action {

class Action {
  int calculateUtility(Context context)
  Update applyEffects(Context context)
}

enum Role {
  SPEAKER
  TARGET
  OBSERVER
}

class Context {
  Action action
  Map<Role,Character> roles
}

class Update {
  Context context
  Map<CharacterId,Character> updatedCharacters
}

}

package rule {

class UtilityRule {
  String description
  int modifier
  bool isTriggered(Context context)
  int getUtilityModifier(Context context)
}

}

package condition {

interface Condition {
  bool evaluate(Context context)
}

}

}

Action "1" *-left- "*" UtilityRule
Action "1" *-up- "*" Effect
Action -[hidden]- Update
UtilityRule "1" *-- "*" Condition

Context -- Role


@enduml