The optional argument object limits the considered hap occurrences to a specific object, and index can be used for indexed haps.
The name parameter specifies the hap. If the -all flag is specified, all haps will be used.
When a hap triggers, the frontend object is changed to the object that triggered the hap, unless -s is specified.