Esempio n. 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))
Esempio n. 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))
Esempio n. 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))
Esempio n. 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()
Esempio n. 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()
Esempio n. 6
0
	def createEffect(self, target):
		effects.addFrontLayer(Effects.TargettingPic(self.owner, target, "Heart", 30, self))
Esempio n. 7
0
	def doHitStuff(self, effectList, target, teamStruct):
		target.addStatBuff("OFF", -2)
		effects.addFrontLayer(Effects.FollowingPic(target, "Debuffing", 18, None))
Esempio n. 8
0
	def createEffect(self, target):
		pic = randFromList(["FireRay", "FrostRay", "ShockRay", "PainRay"])
		effects.addFrontLayer(Effects.TargettingPic(self.owner, target, pic, 10, self))		
Esempio n. 9
0
	def createEffect(self, target):
		pic = "Rock"
		effects.addFrontLayer(Effects.TargettingPic(self.owner, target, pic, 10, self))		
Esempio n. 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))
Esempio n. 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))
Esempio n. 12
0
 def doHitStuff(self, target, teamStruct):
     self.owner.addStatBuff("DEF", 2)
     effects.addFrontLayer(
         Effects.FollowingPic(self.owner, "Buffing", 18, None))
Esempio n. 13
0
 def createEffect(self, target):
     pic = randFromList(["FireRay", "FrostRay", "ShockRay", "PainRay"])
     effects.addFrontLayer(
         Effects.TargettingPic(self.owner, target, pic, 10, self))
Esempio n. 14
0
	def createEffect(self, target):
		effects.addFrontLayer(Effects.TargettingPic(self.owner, target, "Scratch", 7, self))
Esempio n. 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))
Esempio n. 16
0
 def doHitStuff(self, effectList, target, teamStruct):
     target.addStatBuff("OFF", -2)
     effects.addFrontLayer(
         Effects.FollowingPic(target, "Debuffing", 18, None))
Esempio n. 17
0
 def createEffect(self, target):
     effects.addFrontLayer(
         Effects.TargettingPic(self.owner, target, "Heart", 30, self))
Esempio n. 18
0
 def createEffect(self, target):
     pic = "Rock"
     effects.addFrontLayer(
         Effects.TargettingPic(self.owner, target, pic, 10, self))
Esempio n. 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))
Esempio n. 20
0
	def createEffect(self, target):
		effects.addFrontLayer(Effects.TargettingPic(self.owner, target, self.rayPic, 8, self))
Esempio n. 21
0
	def doHitStuff(self, target, teamStruct):
		self.owner.addStatBuff("DEF", 2)
		effects.addFrontLayer(Effects.FollowingPic(self.owner, "Buffing", 18, None))
Esempio n. 22
0
 def createEffect(self, target):
     effects.addFrontLayer(
         Effects.TargettingPic(self.owner, target, self.rayPic, 8, self))
Esempio n. 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))
Esempio n. 24
0
 def createEffect(self, target):
     effects.addFrontLayer(
         Effects.TargettingPic(self.owner, target, "Scratch", 7, self))