示例#1
0
    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.')
示例#2
0
    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?')
示例#3
0
文件: rat.py 项目: unternehmen/dirt
    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*!')
示例#4
0
文件: guard.py 项目: unternehmen/dirt
    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?')