Mercurial > skaapsteker
changeset 473:14cab059bf39
More tails.
author | Simon Cross <hodgestar@gmail.com> |
---|---|
date | Sat, 09 Apr 2011 21:29:13 +0200 |
parents | 2375bc040e63 |
children | 9e85c30dd12f |
files | skaapsteker/sprites/items.py skaapsteker/sprites/player.py |
diffstat | 2 files changed, 50 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/skaapsteker/sprites/items.py Sat Apr 09 21:12:36 2011 +0200 +++ b/skaapsteker/sprites/items.py Sat Apr 09 21:29:13 2011 +0200 @@ -224,17 +224,63 @@ image_file = None tail_type = None + help_msg = None def player_action(self, player): player.add_tail(self.tail_type) + notify(self.help_msg) self.remove() class ShapeshiftTail(Tail): image_file = 'icons/tails/shapeshifted.png' tail_type = 'shapeshift' + help_msg = "Shapeshifting tail. Press C to shape shift." \ + " Your powers are more limited while in human form." class FireballTail(Tail): image_file = 'icons/tails/fireball.png' tail_type = 'fireball' + help_msg = "Fireball tail. The X attack key now shoots fireballs." + + +class SprintTail(Tail): + image_file = 'icons/tails/sprint.png' + tail_type = 'sprint' + help_msg = "Sprint tail. Double-tap the left or right arrow key to" \ + " sprint for a few seconds." + + +class InvisibilityTail(Tail): + image_file = 'icons/tails/invisibility.png' + tail_type = 'invisibility' + help_msg = "Invisibility tail. Press V to become invisible for a few seconds." \ + " You become visible again if you attack or interact with others." + + +class FlightTail(Tail): + image_file = 'icons/tails/flight.png' + tail_type = 'flight' + help_msg = "Flight tail. Double-tap up to fly. Press down while on the ground to land." \ + " If you stay in the air too long you'll tire and fall." + + +class ShieldTail(Tail): + image_file = 'icons/tails/shield.png' + tail_type = 'shield' + help_msg = "Shield tail. If you get hit, your mystical shield will protect you for" \ + " one second. After that it'll need a little time to recharge." + + +class StealTail(Tail): + image_file = 'icons/tails/steal.png' + tail_type = 'steal' + help_msg = "Life-stealing tail. If you projectiles hit your enemies, you steal some" \ + " of their life." + + +class LightningTail(Tail): + image_file = 'icons/tails/lightning.png' + tail_type = 'lightning' + help_msg = "Lightning tail. The Z attack now shoots lightning bolts."
--- a/skaapsteker/sprites/player.py Sat Apr 09 21:12:36 2011 +0200 +++ b/skaapsteker/sprites/player.py Sat Apr 09 21:29:13 2011 +0200 @@ -360,6 +360,10 @@ elif self._me.item is not None and self.on_solid: self.drop_item() + def add_tail(self, tail_type): + if tail_type not in self._me.tails: + self._me.tails.append(tail_type) + def _bite_attack(self): self.invisible = 0 self.attacking = 2