def __init__(self): monster.Monster.__init__( self, "drunken trainee", 60, loot.Loot("the drunken trainee", 5, 30, [[item.Nothing(), 0.4], [ item.UsableItem( "cheap whiskey", "it's nearly empty", 5, 19, lambda target: target.addEffect( effect.DamageOverTime( "intoxication", 3, 1, 2, self))), 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", 0, lambda ablty, caster, target: ability. damage(ablty, caster, target, 5, 9)), 0.5 ], [ ability.Ability( "stumble", 0, lambda ablty, caster, target: self.stumble()), 0.3 ], [ ability.Ability( "vomit", 4, lambda ablty, caster, target: target.addEffect( effect.DamageOverTime("intoxicated vomit", 2, 3, 5, self))), 0.2 ] ])
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 ] ])
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 ] ])
def __init__(self): monster.Monster.__init__( self, "giant sewer rat", 40, loot.Loot( "the giant sewer rat", 3, 30, [[item.Nothing(), 0.85], [ item.Item( "strange doubloon", "cracked and faded, but it looks to be made of gold", 19, 84), 0.15 ]]), [ # [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( "gnaw", 0, lambda ablty, caster, target: ability. damage(ablty, caster, target, 8, 13)), 0.4 ], [ ability.Ability( "bite", 0, lambda ablty, caster, target: ability. damage(ablty, caster, target, 4, 11)), 0.4 ], [ ability.Ability( "sewer plague", 1, lambda ablty, caster, target: target.addEffect( effect.DamageOverTime("sewer plague", 3, 4, 6, self ))), 0.2 ] ])
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 ] ])
def __init__(self): monster.Monster.__init__( self, "unholy ooze", 60, loot.Loot("the unholy ooze", 2, 70, [ [item.Nothing(), 0.8], [ gear.Ring( "unholy band", "an irregular loop formed from the hard core of an ancient ooze", sellCost=24, buyCost=99, stats={ "criticalStrike": 0.5, "dodge": 0.01 }), 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( "spit slime", 0, lambda ablty, caster, target: ability. damage(ablty, caster, target, 6, 10)), 0.7 ], [ ability.Ability( "jellification", 3, lambda ablty, caster, target: caster.addEffect( effect.ArmorBuff("jellification", 2, 1.4))), 0.3 ] ]) self.size = 3
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())
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 ] ])
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)
def __init__(self, position): super(GirlCharacter, self).__init__(position) self.move_direction = MoveDirection.left self.collidable.tags = set([ kidgine.collision.shape.tags.IMPEEDS_MOVEMENT, collision.Tags.PLAYER, collision.Tags.MOVEABLE ]) self.ability_one = ability.Ability(ability.Firebolt, 0.8) self.ability_two = ability.Ability(ability.Whirlpool, 4.5) self.ability_three = ability.Ability(ability.Windblast, 2.5) self.ability_four = ability.Ability(ability.Earthquake, 1.6)
def __init__(self, leagueid, opendotajson, indexjson): # init self._leagueid = leagueid # self._name = name # self._year = year self._opendotajson = opendotajson self._indexjson = indexjson self._herojson = {} self._ability = ability.Ability(self._indexjson) self._item = item.Item(self._indexjson) # init league stats # single stats self._match_num = self._opendotajson.get_match_num() self._radiant_win_num = self._opendotajson.get_radiant_win_num() self._last_matchid = self._opendotajson.get_last_matchid() self._last_unixdate = self._opendotajson.get_last_unixdate() self._name = self._opendotajson.get_leaguename() self._year = self._make_year_from_lastdate() # arr stats self._match_id_arr = self._opendotajson.get_match_id_arr() self._unixdate_arr = self._opendotajson.get_unixdate_arr() self._duration_arr = [] # dict stats self._pickbans = {} self._pickbans_ranking = {} # output json self.leaguejson = {} # init dictionary self._init_herojson() # make stats self._make_stats()
def getStab(): 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!") return ability.Ability("stab", cooldown=0, cast=stabLogic)
def make_abilities(self): self.abilities[1] = ability.Ability('Basic Attack', 20) self.abilities[2] = ability.Dot(name='Rend', base_damage=0, tick_damage=20, duration=6) self.abilities[3] = ability.Charge(name='Charge', base_damage=0) self.abilities[4] = None
def getEmbraceShadows(): def embraceShadowsLogic(ablty, player, target): enterStealth(player) player.addEffect( effect.ArmorBuff("embrace shadows", duration=3, amount=3)) return ability.Ability("embrace shadows", cooldown=20, cast=embraceShadowsLogic)
def getSmite(): 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) return ability.Ability("smite", cooldown=0, cast=smiteLogic)
def getRollTheBones(): def rollTheBonesLogic(ablty, player, target): exitStealth(player) player.addEffect( effect.CriticalChanceBuff("roll the bones", duration=10, amount=2)) return ability.Ability("roll the bones", cooldown=40, cast=rollTheBonesLogic)
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)
def __init__(self): monster.Monster.__init__( self, "bone hound", 30, loot.Loot("the bone hound", 0, 0), [ # [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( "bony bite", 0, lambda ablty, caster, target: ability. damage(ablty, caster, target, 6, 9)), 0.7 ], [ ability.Ability( "howl", 2, lambda ablty, caster, target: caster. addEffect(effect.StrengthBuffAdd("howl", 2, 12))), 0.3 ] ])
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)
def getSap(): def available(player): return player.states["stealth"] def sapLogic(ablty, player, target): exitStealth(player) target.addEffect(effect.StrengthBuff("sap", duration=6, amount=-0.4)) return ability.Ability("sap", cooldown=20, cast=sapLogic, condition=available)
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 ] ])
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 ] ])
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 ] ])
def getFireball(): manaCost = 10 def available(player): return player.states["mana"] >= manaCost def fireballLogic(ablty, player, target): consumeMana(player, manaCost) ability.damage(ablty, player, target, 5, 15) return ability.Ability("fireball", cooldown=0, cast=fireballLogic, condition=available)
def getJudgment(): holyPowerCost = 3 def available(player): return player.states["holy power"] >= holyPowerCost def judgmentLogic(ablty, player, target): consumeHolyPower(player, holyPowerCost) ability.damage(ablty, player, target, 13, 21) return ability.Ability("judgment", cooldown=0, cast=judgmentLogic, condition=available)
def getPyroblast(): manaCost = 80 def available(player): return player.states["mana"] >= manaCost def pyroblastLogic(ablty, player, target): consumeMana(player, manaCost) ability.damage(ablty, player, target, 28, 36) return ability.Ability("pyroblast", cooldown=8, cast=pyroblastLogic, condition=available)
def getIceBarrier(): manaCost = 60 def available(player): return player.states["mana"] >= manaCost def iceBarrierLogic(ablty, player, target): consumeMana(player, manaCost) player.addEffect(effect.ArmorBuff("ice barrier", duration=4, amount=1)) return ability.Ability("ice barrier", cooldown=20, cast=iceBarrierLogic, condition=available)
def getEvocate(): manaCost = 0 def available(player): return player.states["mana"] >= manaCost def evocateLogic(ablty, player, target): player.states["mana"] = 100 output.say("You evocate to refill your mana.") return ability.Ability("evocate", cooldown=40, cast=evocateLogic, condition=available)
def getPoisonDagger(): def available(player): return player.states["stealth"] def poisonLogic(ablty, player, target): # poison can only be cast when stealthed exitStealth(player) player.states["daggerPoisoned"] = True output.say("You coat your dagger in poison.") return ability.Ability("poison dagger", cooldown=0, cast=poisonLogic, condition=available)
def getFrostbolt(): manaCost = 25 def available(player): return player.states["mana"] >= manaCost def frostboltLogic(ablty, player, target): consumeMana(player, manaCost) ability.damage(ablty, player, target, 5, 7) target.addEffect(effect.StrengthBuff("freeze", 3, -0.2)) return ability.Ability("frostbolt", cooldown=0, cast=frostboltLogic, condition=available)