示例#1
0
 def __init__(self):
     monster.Monster.__init__(
         self,
         "prowling fox",
         60,
         loot.Loot(
             "the prowling fox", 5, 50,
             [[item.Nothing(), 0.9],
              [
                  item.Item("bushy tail",
                            "a muddled red to blend in with the trees", 4,
                            19), 0.1
              ]]),
         [
             # [name, cooldown, caster (always self), cast logic (takes ablty, which means ability but can't be confused with the module, and target)], probability
             [
                 ability.Ability(
                     "pounce", 999, lambda ablty, caster, target: ability.
                     damage(ablty, caster, target, 14, 20)), 999
             ],
             [
                 ability.Ability(
                     "claw", 0, lambda ablty, caster, target: ability.
                     damage(ablty, caster, target, 6, 8)), 0.8
             ],
             [
                 ability.Ability(
                     "tense", 2, lambda ablty, caster, target: caster.
                     addEffect(effect.StrengthBuff("tense", 1, 0.5))), 0.2
             ]
         ])
示例#2
0
 def __init__(self):
     monster.Monster.__init__(
         self,
         "ghoul",
         60,
         loot.Loot(
             "the ghoul", 5, 120,
             [[item.Nothing(), 0.8],
              [
                  item.Item("decayed fingernail",
                            "dry, brittle, came from a ghoul", 1, 4), 0.2
              ]]),
         [
             # [name, cooldown, caster (always self), cast logic (takes ablty, which means ability but can't be confused with the module, and target)], probability
             [
                 ability.Ability(
                     "knitting flesh", 999,
                     lambda ablty, caster, target: caster.addEffect(
                         effect.HealOverTime("knitting flesh", 9, 4, 10))),
                 999
             ],
             [
                 ability.Ability(
                     "mindless maul", 0, lambda ablty, caster, target:
                     ability.damage(ablty, caster, target, 9, 18)), 0.7
             ],
             [
                 ability.Ability(
                     "putrid breath", 5,
                     lambda ablty, caster, target: target.addEffect(
                         effect.ArmorBuff("putrid breath", 4, -0.3))), 0.3
             ]
         ])
示例#3
0
 def __init__(self):
     monster.Monster.__init__(
         self,
         "skeleton scout",
         60,
         loot.Loot(
             "the skeleton scout", 8, 140,
             [[item.Nothing(), 0.4],
              [
                  item.Item("cracked bone",
                            "dirty gray with a scratch along its middle", 3,
                            9), 0.6
              ]]),
         [
             # [name, cooldown, caster (always self), cast logic (takes ablty, which means ability but can't be confused with the module, and target)], probability
             [
                 ability.Ability(
                     "charge", 999, lambda ablty, caster, target: ability.
                     damage(ablty, caster, target, 9, 16)), 999
             ],
             [
                 ability.Ability(
                     "slash", 0, lambda ablty, caster, target: ability.
                     damage(ablty, caster, target, 6, 15)), 0.8
             ],
             [
                 ability.Ability(
                     "fuse bone", 4, lambda ablty, caster, target: ability.
                     heal(ablty, caster, target, 18, 30)), 0.2
             ]
         ])
示例#4
0
 def __init__(self):
     monster.Monster.__init__(
         self,
         "skeleton archer",
         60,
         loot.Loot(
             "the skeleton archer", 4, 80,
             [[item.Nothing(), 0.4],
              [
                  item.Item("cracked bone",
                            "dirty gray with a scratch along its middle", 3,
                            9), 0.3
              ],
              [
                  item.Item(
                      "unfeathered arrow",
                      "its tip seems to be made of tempered brown clay", 4,
                      6), 0.2
              ],
              [
                  gear.Boots(
                      "crude sabatons",
                      "probably held together with mud and bone marrow",
                      sellCost=15,
                      buyCost=44,
                      stats={
                          "armor": 2,
                          "criticalChance": 0.02
                      }), 0.1
              ]]),
         [
             # [name, cooldown, caster (always self), cast logic (takes ablty, which means ability but can't be confused with the module, and target)], probability
             [
                 ability.Ability(
                     "iron bolt", 0, lambda ablty, caster, target: ability.
                     damage(ablty, caster, target, 9, 14)), 0.5
             ],
             [
                 ability.Ability(
                     "arrow as dagger", 0, lambda ablty, caster, target:
                     ability.damage(ablty, caster, target, 3, 21)), 0.4
             ],
             [
                 ability.Ability(
                     "archer's resolve", 2,
                     lambda ablty, caster, target: caster.addEffect(
                         effect.CriticalChanceBuffAdd(
                             "archer's resolve", 2, 0.6))), 0.1
             ]
         ])
示例#5
0
 def __init__(self):
     monster.Monster.__init__(
         self,
         "sorcerer outcast",
         50,
         loot.Loot("the sorcerer outcast", 8, 80, [
             [item.Nothing(), 0.4],
             [
                 item.UsableItem(
                     "mysterious green brew",
                     "it could be poison, it could be eternal life, it could be stool softener",
                     9, 49, lambda target: target.addEffect(
                         effect.SpiritBuff("heightened spirits", 20, 2))),
                 0.2
             ],
             [
                 item.Item(
                     "cryptic spellbook",
                     "the writing looks hasty and is in an elvish tongue",
                     30, 99), 0.2
             ],
             [
                 gear.Helmet(
                     "pointy black hat",
                     "several patches mottle the hat, including a long seam directly above the brim",
                     sellCost=19,
                     buyCost=49,
                     stats={"criticalChance": 0.05}), 0.2
             ]
         ]),
         [
             # [name, cooldown, caster (always self), cast logic (takes ablty, which means ability but can't be confused with the module, and target)], probability
             [
                 ability.Ability(
                     "frostbolt", 0, lambda ablty, caster, target: ability.
                     damage(ablty, caster, target, 8, 14)), 0.5
             ],
             [
                 ability.Ability(
                     "frigid wind", 2,
                     lambda ablty, caster, target: target.addEffect(
                         effect.StrengthBuff("frigid wind", 2, -0.5))), 0.3
             ],
             [
                 ability.Ability(
                     "icy shield", 4, lambda ablty, caster, target: caster.
                     addEffect(effect.ArmorBuff("icy shield", 3, 1))), 0.2
             ]
         ],
         armor=4)
示例#6
0
    def __init__(self):
        def voodooFetishProc(wearer, target):
            if random.random() < 0.05:
                output.say(
                    wearer.the.capitalize() +
                    "'s voodoo fetish begins wailing softly, disorienting " +
                    target.the + ".")
                target.addEffect(effect.StrengthBuff("voodoo stun", 2, -0.2))

        self.voodooFetish = gear.Trinket(
            "voodoo fetish",
            "the force that governs voodoo is twisted and vague... only strange creatures commune with it well",
            sellCost=29,
            buyCost=99,
            stats={"criticalChance": 0.05},
            proc=voodooFetishProc)
        monster.Monster.__init__(
            self,
            "Graglis the Gremlin",
            80,
            loot.Loot("Graglis the Gremlin", 16, 140,
                      [[self.voodooFetish, 1]]),
            [
                # [name, cooldown, caster (always self), cast logic (takes ablty, which means ability but can't be confused with the module, and target)], probability
                [
                    ability.Ability(
                        "hop and scratch", 0, lambda ablty, caster, target:
                        ability.damage(ablty, caster, target, 7, 14)), 0.5
                ],
                [
                    ability.Ability(
                        "mutter nonsense", 0,
                        lambda ablty, caster, target: self.mutterNonsense()),
                    0.3
                ],
                [
                    ability.Ability(
                        "voodoo", 6,
                        lambda ablty, caster, target: self.voodoo()), 0.2
                ]
            ],
            dodge=0.15,
            unique=True)
        self.gear.equip(self.voodooFetish)
示例#7
0
 def __init__(self):
     monster.Monster.__init__(
         self,
         "doom panda",
         500,
         loot.Loot(
             "the doom panda", 260, 1, [
                 [
                     item.UsableItem(
                         "big black potion",
                         "this is undoubtedly some bad stuff", 1, 2,
                         lambda target: target.addEffect(
                             effect.StrengthBuff("strength of a doom panda",
                                                 8, 30))), 0.5
                 ],
                 [
                     gear.Weapon("The Black Scythe",
                                 "the sword of the doom panda",
                                 sellCost=1,
                                 buyCost=2,
                                 stats={
                                     "strength": 10,
                                     "criticalChance": 0.1
                                 }), 0.5
                 ]
             ]),
         [
             # [name, cooldown, caster (always self), cast logic (takes ablty, which means ability but can't be confused with the module, and target)], probability
             [
                 ability.Ability(
                     "cuddle", 0, lambda ablty, caster, target: ability.
                     heal(ablty, caster, target, 1, 5)), 0.9
             ],
             [
                 ability.Ability(
                     "DOOOOOOOOOOM", 6, lambda ablty, caster, target:
                     ability.damage(ablty, caster, target, 80, 100)), 0.1
             ],
         ],
         armor=16,
         criticalChance=0)
示例#8
0
 def __init__(self):
     monster.Monster.__init__(
         self,
         "wolf",
         40,
         loot.Loot(
             "the wolf", 2, 20,
             [[item.Nothing(), 0.65],
              [
                  potions.HealthPotion(
                      "lean wolf flank",
                      "its owner must not have had enough to eat", 2, 9, 6),
                  0.3
              ],
              [
                  gear.Gloves("torn wolfhide gloves",
                              "the coarse fabric seems vaguely glovelike",
                              sellCost=8,
                              buyCost=26,
                              stats={"armor": 2}), 0.05
              ]]),
         [
             # [name, cooldown, caster (always self), cast logic (takes ablty, which means ability but can't be confused with the module, and target)], probability
             [
                 ability.Ability(
                     "bite", 0, lambda ablty, caster, target: ability.
                     damage(ablty, caster, target, 2, 5)), 0.5
             ],
             [
                 ability.Ability(
                     "snap", 0, lambda ablty, caster, target: ability.
                     damage(ablty, caster, target, 4, 7)), 0.3
             ],
             [
                 ability.Ability(
                     "lick wounds", 2, lambda ablty, caster, target: ability
                     .heal(ablty, caster, target, 4, 10)), 0.2
             ]
         ])
示例#9
0
 def __init__(self):
     monster.Monster.__init__(
         self,
         "owl",
         30,
         loot.Loot("the owl", 2, 40, [
             [item.Nothing(), 0.8],
             [item.Item("feather", "it's definitely a feather", 1, 4), 0.2]
         ]),
         [
             # [name, cooldown, caster (always self), cast logic (takes ablty, which means ability but can't be confused with the module, and target)], probability
             [
                 ability.Ability(
                     "peck", 0, lambda ablty, caster, target: ability.
                     damage(ablty, caster, target, 4, 8)), 0.6
             ],
             [
                 ability.Ability(
                     "gouge", 0, lambda ablty, caster, target: ability.
                     damage(ablty, caster, target, 8, 12)), 0.4
             ]
         ])
示例#10
0
 def __init__(self):
     monster.Monster.__init__(
         self,
         "skeleton warrior",
         60,
         loot.Loot(
             "the skeleton warrior", 4, 80,
             [[item.Nothing(), 0.4],
              [
                  item.Item("cracked bone",
                            "dirty gray with a scratch along its middle", 3,
                            9), 0.4
              ],
              [
                  gear.Chest("frayed mail vest",
                             "at least three holes in the front",
                             sellCost=9,
                             buyCost=39,
                             stats={"armor": 4}), 0.2
              ]]),
         [
             # [name, cooldown, caster (always self), cast logic (takes ablty, which means ability but can't be confused with the module, and target)], probability
             [
                 ability.Ability(
                     "charge", 999, lambda ablty, caster, target: ability.
                     damage(ablty, caster, target, 9, 16)), 999
             ],
             [
                 ability.Ability(
                     "slash", 0, lambda ablty, caster, target: ability.
                     damage(ablty, caster, target, 6, 15)), 0.8
             ],
             [
                 ability.Ability(
                     "fuse bone", 4, lambda ablty, caster, target: ability.
                     heal(ablty, caster, target, 18, 30)), 0.2
             ]
         ])
示例#11
0
 "Old Hermit",
 "I see you've wandered your way on to an adventure in beautiful Morning Fields... that's as a good a reason as any for me to order you around.",
 [
     quest.Quest(
         "Mad Coiner",
         "First name's Old and last name's Hermit. Why, adventurer, would you care to participate with me in a game of wits?\n\nScavenge around until you've found 10 gold, then deliver it to me and I shall give you 20 gold. What a deal for you, friend. Do be wary of the wolves that wander in these parts.",
         "You have the gold yet? I'm no mad coiner, I'll certainly give you 20 gold back.",
         "Ah, here we have the coins.\n\nOh, you really thought I'd give you any gold back? Ha! I'm a hermit, we don't live by an honor code.\n\nStop whining. Look, because of my good morals, I'll leave you with this rock I found. How's that?",
         lambda player: player.inventory.removeGold(10),
         loot.Loot(
             "Old Hermit",
             gold=0,
             experience=150,
             items=[[
                 item.UsableItem(
                     "jagged rock",
                     "what would happen if you smash it on yourself?",
                     sellCost=1,
                     buyCost=5,
                     use=lambda target: target.addEffect(
                         effect.DamageOverTime("smashed", 6, 1, 2,
                                               globals.get_player()))), 1
             ]]), lambda player: True),
     quest.Quest(
         "To the Brink and Back",
         "I'm not strange. I'm normal, but everyone thinks I'm strange because they're crackpots.\n\nSometimes I stand near the skeleton cave in the Silent Forest just for the thrill, you know? Evil reanimated bones could kill you at any time -- that kind of excitement.\n\nWhy don't you go try it? Come back here severely injured, under 20 health. I'll brew something up for you to drink afterward while you're at it.",
         "You're not nearly hurt enough! Go and break a leg. Literally. Get under 20 health.",
         "Haha! The great adventurer returns to his hermit master at the lips of death, ready to return to life. That's how it's done.\n\nThe other adventurer who came down last week never returned -- his name was Erikna if I recall -- and I found his bones outside the skeleton cave in the Silent Forest eaten clean. Who knows if he's been reanimated yet?\n\nOh, right. You should drink this. It'll make you feel better.",
         lambda player: player.health < 20,
         loot.Loot(
             "Old Hermit",
             gold=0,