forked from vantablack/vantaMOO
32 lines
1.4 KiB
Python
32 lines
1.4 KiB
Python
"""
|
|
Movie Screen
|
|
|
|
This is a joke object that changes its description every time you look at it.
|
|
Requires installing pytracery as a pip dependency.
|
|
"""
|
|
from typeclasses.objects import Object
|
|
import tracery
|
|
from tracery.modifiers import base_english
|
|
|
|
class MovieScreen(Object):
|
|
rules = {
|
|
'origin': ['This is #genre.a# #movie# about #subject.s#.', '#subject.s.capitalize# #sequel#: The #family.capitalize# Of All #movie.s.capitalize#!'],
|
|
'sequel': ['from hell #number#','#number#','the Resurrection','Origins','Rebooted','Reimagined','Again'],
|
|
'family': ['mother','father','aunt','xyther','grunkle','grandpa','grandma'],
|
|
'number': ['2','3','4','5','6','II','III','IV','V','VI','XXIII','MCMXCIII'],
|
|
'movie': ['movie', 'flick', 'animation', 'anime', 'moving picture', 'picture'],
|
|
'genre': ['action', 'romance', 'thriller', 'horror', 'abstract', 'slice-of-life', 'comedy', 'documentary'],
|
|
'subject': ['wombat', 'stoner', '#pair# love #polycule#', 'smartphone', 'astronaut', 'explosion'],
|
|
'pair': ['gay','aromantic','nonbinary','clueless','crazy'],
|
|
'polycule': ['triange', 'pair', '3D icosahedron', 'polycule']
|
|
}
|
|
|
|
"""
|
|
Can't be a self.db.desc because we *need* a function here.
|
|
"""
|
|
def get_display_desc(self, looker, **kwargs):
|
|
grammar = tracery.Grammar(self.rules)
|
|
grammar.add_modifiers(base_english)
|
|
return grammar.flatten("#origin#")
|
|
pass
|