changeset 389:64d8e49e9a86

Hook up images for lightning and energy drain. Given lightning negative friction.
author Simon Cross <hodgestar@gmail.com>
date Sat, 09 Apr 2011 16:10:39 +0200
parents de71c3fa5626
children 93f13f7d97f2
files skaapsteker/sprites/projectiles.py
diffstat 1 files changed, 23 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/skaapsteker/sprites/projectiles.py	Sat Apr 09 16:09:32 2011 +0200
+++ b/skaapsteker/sprites/projectiles.py	Sat Apr 09 16:10:39 2011 +0200
@@ -26,10 +26,11 @@
 class Lightning(Projectile):
 
     gravitates = False
+    friction_coeff = (1.2, 1.2) # negative friction
 
-    image_dir = 'sprites/attacks/fireball'
+    image_dir = 'sprites/attacks'
     animation_regexes = [
-        ('frightening', r"^fireball-\d+-sm.png$"),
+        ('frightening', r"^lightning.png$"),
     ]
 
     facings = {
@@ -40,3 +41,23 @@
 
     PROJECTILE_SIZE = (55, 8) # pixels
     VELOCITY = (400, 0) # pps
+
+
+class EnergyDrain(Projectile):
+
+    gravitates = False
+    friction_coeff = (1.0, 1.0) # no friction
+
+    image_dir = 'sprites/attacks'
+    animation_regexes = [
+        ('draining', r"^energy_drain.png$"),
+    ]
+
+    facings = {
+        "frightening" : (
+            ('left', None),
+            ('right', lambda x: transform.flip(x, True, False))),
+    }
+
+    PROJECTILE_SIZE = (55, 8) # pixels
+    VELOCITY = (400, 0) # pps