-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexplont_reference.py
78 lines (78 loc) · 2.27 KB
/
explont_reference.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
# code for creating explosions from dafluffypotato's explont
# https://dafluffypotato.itch.io/explont, explont.py, lines 790-807
for i in range(16):
angle = random.random() * math.pi * 0.5 + math.pi * 5 / 4
speed = random.random() * 2 + 1
gd.circle_particles.append(
[
"fire_base",
[gd.player.center[0], gd.player.pos[1] + gd.player.rect.height],
[math.cos(angle) * speed, math.sin(angle) * speed],
(245, 237, 186),
2,
0.005,
random.random() * 0.7,
]
)
for i in range(30):
gd.circle_particles.append(
[
"fire",
[
gd.player.pos[0] + gd.player.rect.width * random.random(),
gd.player.pos[1] + gd.player.rect.height * random.random(),
],
[random.random() * 4 - 2, random.random() * 4 - 3],
(0, 0, 0),
random.random() * 24 + 2,
random.random() * 0.3 + 0.3,
random.random() * 0.8,
]
)
for i in range(36):
c = random.choice(
[
(100, 125, 52),
(192, 199, 65),
(157, 48, 59),
(157, 48, 59),
(157, 48, 59),
(157, 48, 59),
(62, 33, 55),
(62, 33, 55),
]
)
gd.circle_particles.append(
[
"flesh",
[
gd.player.pos[0] + gd.player.rect.width * random.random(),
gd.player.pos[1] + gd.player.rect.height * random.random(),
],
[random.random() * 2 - 1, random.random() * 3 - 2],
c,
random.random() * 3.5 + 1,
0.001,
0,
]
)
for i in range(30):
a = random.random() * math.pi * 2
s = random.random() + 0.5
if random.random() < 0.2:
s *= 3
gd.sparks.append(
[
gd.player.center,
a,
s * 5.5,
3,
0.05 + random.random() * 0.05,
0.88 + random.random() * 0.05,
10 + random.random() * 6,
0.99,
]
)
gd.circles.append([gd.player.center, 10, 1, 10, 0.15, 0.9, (247, 237, 186)])
gd.circles.append([gd.player.center, 7, 1, 6, 0.1, 0.87, (247, 237, 186)])
gd.game_over = 1