def __init__(self): self.combativeness = CombatComponent(health=100, power=1) self.mouth = DialogueComponent(color=(0xff, 0, 0)) self.appearance = BodyComponent(path="data/jyesula.png") self.pacified = False self.combativeness.add_attack_hook(self.on_attack) self.combativeness.add_ignore_hook(self.on_ignore) self.combativeness.add_death_hook(self.on_death) self.mouth.say('Ah. Jauld.')
def __init__(self): self.combativeness = CombatComponent(health=2.0, power=0.5) self.mouth = DialogueComponent(color=(0x40, 0x40, 0xe0)) self.appearance = BodyComponent(path='data/proselytizer.png') self.combativeness.add_attack_hook(self.on_attack) self.combativeness.add_ignore_hook(self.on_ignore) self.combativeness.add_death_hook(self.on_death) # Greet the player. self.mouth.say('Dost thou\nhave a\ndonation?')
def __init__(self): self.combativeness = CombatComponent(health=1.0, power=0.5) self.mouth = DialogueComponent(color=(0x80, 0x80, 0)) self.appearance = BodyComponent(path="data/rat.png") self.pacified = False self.combativeness.add_attack_hook(self.on_attack) self.combativeness.add_ignore_hook(self.on_ignore) self.combativeness.add_death_hook(self.on_death) self.mouth.say('*sniff*!\n *sniff*!')
def __init__(self): self.combativeness = CombatComponent(health=10.0, power=0.5) self.mouth = DialogueComponent(color=(0xff, 0x99, 0x99)) self.appearance = BodyComponent(path="data/guard.png") self.combativeness.add_attack_hook(self.on_attack) self.combativeness.add_ignore_hook(self.on_ignore) # Whether this guard is hostile yet. self.hostile = False # Greet the player. self.mouth.say('Greetings,\ncitizen.\nAnything\nto report?')