def createEffect(self, target, startTarg=None): if self.jumpsLeft <= 0: self.jumpsLeft = 2 if not startTarg: startTarg = self.owner effects.addFrontLayer( Effects.TargettingPic(startTarg, target, self.rayPic, 8, self))
def doHitStuff(self, effectList, target, teamStruct): target.addStatBuff("OFF", -1) target.addStatBuff("DEF", -1) dmg = calcDamage(self.owner.getStat("OFF"), target.getStat("DEF"), self.damage, self.owner.getLevel()) target.damageMe(dmg, self.owner) effects.addFrontLayer( Effects.FollowingPic(target, "Debuffing", 18, None))
def heal(self, amt): self.health[0] = min(self.health[0] + amt, self.health[1]) text = str(int(amt * 10)) if not self.readyToDelete(): pos = [ self.pos[0] - len(text) * 5 / 2, self.pos[1] - self.getSize() - 10 ] effects.addFrontLayer( Effects.TextEffect(pos, [0, 255, 0], 20, text))
def damageMe(self, amt, unit): self.health[0] -= amt text = str(int(amt * 10)) pos = [self.pos[0] - len(text) * 5 / 2, self.pos[1] - self.getSize() - 10] if not self.readyToDelete(): effects.addFrontLayer(Effects.TextEffect(pos, [255, 0, 0], 20, text)) self.damageTaken[1] = unit self.damageTaken += [amt] self.recalcDamageTaken()
def damageMe(self, amt, unit): self.health[0] -= amt text = str(int(amt * 10)) pos = [ self.pos[0] - len(text) * 5 / 2, self.pos[1] - self.getSize() - 10 ] if not self.readyToDelete(): effects.addFrontLayer( Effects.TextEffect(pos, [255, 0, 0], 20, text)) self.damageTaken[1] = unit self.damageTaken += [amt] self.recalcDamageTaken()
def createEffect(self, target): effects.addFrontLayer(Effects.TargettingPic(self.owner, target, "Heart", 30, self))
def doHitStuff(self, effectList, target, teamStruct): target.addStatBuff("OFF", -2) effects.addFrontLayer(Effects.FollowingPic(target, "Debuffing", 18, None))
def createEffect(self, target): pic = randFromList(["FireRay", "FrostRay", "ShockRay", "PainRay"]) effects.addFrontLayer(Effects.TargettingPic(self.owner, target, pic, 10, self))
def createEffect(self, target): pic = "Rock" effects.addFrontLayer(Effects.TargettingPic(self.owner, target, pic, 10, self))
def createEffect(self, target, startTarg = None): if self.jumpsLeft <= 0: self.jumpsLeft = 2 if not startTarg: startTarg = self.owner effects.addFrontLayer(Effects.TargettingPic(startTarg, target, self.rayPic, 8, self))
def doHitStuff(self, effectList, target, teamStruct): target.addStatBuff("OFF", -1) target.addStatBuff("DEF", -1) dmg = calcDamage(self.owner.getStat("OFF"), target.getStat("DEF"), self.damage, self.owner.getLevel()) target.damageMe(dmg, self.owner) effects.addFrontLayer(Effects.FollowingPic(target, "Debuffing", 18, None))
def doHitStuff(self, target, teamStruct): self.owner.addStatBuff("DEF", 2) effects.addFrontLayer( Effects.FollowingPic(self.owner, "Buffing", 18, None))
def createEffect(self, target): pic = randFromList(["FireRay", "FrostRay", "ShockRay", "PainRay"]) effects.addFrontLayer( Effects.TargettingPic(self.owner, target, pic, 10, self))
def createEffect(self, target): effects.addFrontLayer(Effects.TargettingPic(self.owner, target, "Scratch", 7, self))
def createEffect(self, target): effect = "Scratch" if random.random() < 0.5: effect = "ScratchRight" effects.addFrontLayer( Effects.TargettingPic(self.owner, target, effect, 8, self))
def doHitStuff(self, effectList, target, teamStruct): target.addStatBuff("OFF", -2) effects.addFrontLayer( Effects.FollowingPic(target, "Debuffing", 18, None))
def createEffect(self, target): effects.addFrontLayer( Effects.TargettingPic(self.owner, target, "Heart", 30, self))
def createEffect(self, target): pic = "Rock" effects.addFrontLayer( Effects.TargettingPic(self.owner, target, pic, 10, self))
def heal(self, amt): self.health[0] = min(self.health[0] + amt, self.health[1]) text = str(int(amt * 10)) if not self.readyToDelete(): pos = [self.pos[0] - len(text) * 5 / 2, self.pos[1] - self.getSize() - 10] effects.addFrontLayer(Effects.TextEffect(pos, [0, 255, 0], 20, text))
def createEffect(self, target): effects.addFrontLayer(Effects.TargettingPic(self.owner, target, self.rayPic, 8, self))
def doHitStuff(self, target, teamStruct): self.owner.addStatBuff("DEF", 2) effects.addFrontLayer(Effects.FollowingPic(self.owner, "Buffing", 18, None))
def createEffect(self, target): effects.addFrontLayer( Effects.TargettingPic(self.owner, target, self.rayPic, 8, self))
def createEffect(self, target): effect = "Scratch" if random.random() < 0.5: effect = "ScratchRight" effects.addFrontLayer(Effects.TargettingPic(self.owner, target, effect, 8, self))
def createEffect(self, target): effects.addFrontLayer( Effects.TargettingPic(self.owner, target, "Scratch", 7, self))