Ejemplo n.º 1
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
             ]
         ])
Ejemplo n.º 2
0
    def __init__(self):
        def stingProc(wearer, target):
            if random.random() < 0.05:
                amount = wearer.dealDamage(target, 4 + random.random() * 6)
                output.say("Dark tendrils burst from Sting, crushing " +
                           target.the + " and dealing " +
                           output.formatNumber(amount) + " damage to it.")

        self.sting = gear.Weapon(
            "Sting, Bone Reaper",
            "Aricnea's blade pulses with an ineffable energy",
            sellCost=89,
            buyCost=299,
            stats={
                "strength": 12,
                "criticalStrike": 0.8
            },
            proc=stingProc)
        monster.Monster.__init__(
            self,
            "Aricnea the Sly",
            220,
            loot.Loot("Aricnea the Sly", 38, 1460, [[
                item.Item("undead invasion plans",
                          "someone at Fort Morning would want to see this", 9,
                          99), 1
            ], [self.sting, 1]], True),
            [  # the True signifies Aricnea will drop all items in his loot table, every time.
                # [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(
                        "stab", 0, lambda ablty, caster, target: ability.
                        damage(ablty, caster, target, 11, 19)), 0.6
                ],
                [
                    ability.Ability(
                        "fan of knives", 0, lambda ablty, caster, target:
                        ability.damage(ablty, caster, target, 18, 26)), 0.2
                ],
                [
                    ability.Ability(
                        "draw shadows", 3,
                        lambda ablty, caster, target: caster.addEffect(
                            effect.ArmorBuff("draw shadows", 3, 0.8))), 0.2
                ]
            ],
            unique=True)
        self.gear.equip(self.sting)
        self.calledDogs = False
        self.dogs = fList.FrequencyList([[BoneHound(), 1]])
        self.dogFight = fight.Fight(lambda: self.dogs.getOption())
Ejemplo n.º 3
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
             ]
         ])
Ejemplo n.º 4
0
    def stabLogic(ablty, player, target):
        # stab deals 50% more damage if stealthed
        if player.states["stealth"]:
            ability.damage(ablty, player, target, 13, 17)
        else:
            ability.damage(ablty, player, target, 8, 12)

        # if the player coated their dagger with poison, apply it
        if player.states["daggerPoisoned"]:
            player.states["daggerPoisoned"] = False
            target.addEffect(
                effect.DamageOverTime("poison",
                                      duration=3,
                                      lowerBound=6,
                                      upperBound=9,
                                      caster=player))

        # stab takes the player out of stealth
        exitStealth(player)

        # stab also has a chance (increased with dodge) to put the player in stealth
        if random.random() < 0.25 + player.stats.dodge.value:
            enterStealth(player)
            output.declare("Stab triggers stealth!")
Ejemplo n.º 5
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)
Ejemplo n.º 6
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)
Ejemplo n.º 7
0
 def frostboltLogic(ablty, player, target):
     consumeMana(player, manaCost)
     ability.damage(ablty, player, target, 5, 7)
     target.addEffect(effect.StrengthBuff("freeze", 3, -0.2))
Ejemplo n.º 8
0
 def fireballLogic(ablty, player, target):
     consumeMana(player, manaCost)
     ability.damage(ablty, player, target, 5, 15)
Ejemplo n.º 9
0
 def judgmentLogic(ablty, player, target):
     consumeHolyPower(player, holyPowerCost)
     ability.damage(ablty, player, target, 13, 21)
Ejemplo n.º 10
0
 def smiteLogic(ablty, player, target):
     ability.damage(ablty, player, target, 6, 10)
     generateHolyPower(player, 1)
     if random.random() < player.stats.criticalChance.getValue():
         output.declare("Smite grants an additional holy power!")
         generateHolyPower(player, 1)
Ejemplo n.º 11
0
 def pyroblastLogic(ablty, player, target):
     consumeMana(player, manaCost)
     ability.damage(ablty, player, target, 28, 36)