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