Example #1
0
 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))
Example #2
0
 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))
Example #3
0
 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))
Example #4
0
	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()
Example #5
0
    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()
Example #6
0
	def createEffect(self, target):
		effects.addFrontLayer(Effects.TargettingPic(self.owner, target, "Heart", 30, self))
Example #7
0
	def doHitStuff(self, effectList, target, teamStruct):
		target.addStatBuff("OFF", -2)
		effects.addFrontLayer(Effects.FollowingPic(target, "Debuffing", 18, None))
Example #8
0
	def createEffect(self, target):
		pic = randFromList(["FireRay", "FrostRay", "ShockRay", "PainRay"])
		effects.addFrontLayer(Effects.TargettingPic(self.owner, target, pic, 10, self))		
Example #9
0
	def createEffect(self, target):
		pic = "Rock"
		effects.addFrontLayer(Effects.TargettingPic(self.owner, target, pic, 10, self))		
Example #10
0
	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))
Example #11
0
	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))
Example #12
0
 def doHitStuff(self, target, teamStruct):
     self.owner.addStatBuff("DEF", 2)
     effects.addFrontLayer(
         Effects.FollowingPic(self.owner, "Buffing", 18, None))
Example #13
0
 def createEffect(self, target):
     pic = randFromList(["FireRay", "FrostRay", "ShockRay", "PainRay"])
     effects.addFrontLayer(
         Effects.TargettingPic(self.owner, target, pic, 10, self))
Example #14
0
	def createEffect(self, target):
		effects.addFrontLayer(Effects.TargettingPic(self.owner, target, "Scratch", 7, self))
Example #15
0
 def createEffect(self, target):
     effect = "Scratch"
     if random.random() < 0.5:
         effect = "ScratchRight"
     effects.addFrontLayer(
         Effects.TargettingPic(self.owner, target, effect, 8, self))
Example #16
0
 def doHitStuff(self, effectList, target, teamStruct):
     target.addStatBuff("OFF", -2)
     effects.addFrontLayer(
         Effects.FollowingPic(target, "Debuffing", 18, None))
Example #17
0
 def createEffect(self, target):
     effects.addFrontLayer(
         Effects.TargettingPic(self.owner, target, "Heart", 30, self))
Example #18
0
 def createEffect(self, target):
     pic = "Rock"
     effects.addFrontLayer(
         Effects.TargettingPic(self.owner, target, pic, 10, self))
Example #19
0
	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))
Example #20
0
	def createEffect(self, target):
		effects.addFrontLayer(Effects.TargettingPic(self.owner, target, self.rayPic, 8, self))
Example #21
0
	def doHitStuff(self, target, teamStruct):
		self.owner.addStatBuff("DEF", 2)
		effects.addFrontLayer(Effects.FollowingPic(self.owner, "Buffing", 18, None))
Example #22
0
 def createEffect(self, target):
     effects.addFrontLayer(
         Effects.TargettingPic(self.owner, target, self.rayPic, 8, self))
Example #23
0
	def createEffect(self, target):
		effect = "Scratch"
		if random.random() < 0.5:
			effect = "ScratchRight"
		effects.addFrontLayer(Effects.TargettingPic(self.owner, target, effect, 8, self))
Example #24
0
 def createEffect(self, target):
     effects.addFrontLayer(
         Effects.TargettingPic(self.owner, target, "Scratch", 7, self))