comparison pytouhou/games/sample/shots.py @ 600:2a748aa29c3f

Add a sample character.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sat, 25 Oct 2014 18:52:56 +0200
parents
children
comparison
equal deleted inserted replaced
599:d471b07ce4fd 600:2a748aa29c3f
1 # -*- encoding: utf-8 -*-
2 ##
3 ## Copyright (C) 2014 Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
4 ##
5 ## This program is free software; you can redistribute it and/or modify
6 ## it under the terms of the GNU General Public License as published
7 ## by the Free Software Foundation; version 3 only.
8 ##
9 ## This program is distributed in the hope that it will be useful,
10 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 ## GNU General Public License for more details.
13 ##
14
15 from math import radians
16 from pytouhou.formats.exe import SHT, Shot
17
18
19 player = SHT()
20 player.horizontal_vertical_speed = 2.
21 player.horizontal_vertical_focused_speed = 1.5
22 player.diagonal_speed = 1.5
23 player.diagonal_focused_speed = 1.
24
25 shot = Shot()
26 shot.interval = 10
27 shot.delay = 5
28 shot.pos = (0, -32)
29 shot.hitbox = (5, 5)
30 shot.angle = radians(-90)
31 shot.speed = 5.
32 shot.damage = 16
33 shot.orb = 0
34 shot.type = 2
35 shot.sprite = 64
36 shot.unknown1 = 0
37
38 # Dict of list of shots, each for one power level.
39 # Always define at least the shot for max power, usually 999.
40 player.shots[999] = [shot]
41
42 # List of (unfocused, focused) shot types.
43 characters = [(player, player)]