zombie-escape 1.8.0__py3-none-any.whl → 1.10.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- zombie_escape/__about__.py +1 -1
- zombie_escape/colors.py +49 -14
- zombie_escape/entities.py +295 -332
- zombie_escape/entities_constants.py +6 -0
- zombie_escape/gameplay/__init__.py +2 -2
- zombie_escape/gameplay/constants.py +1 -1
- zombie_escape/gameplay/footprints.py +2 -2
- zombie_escape/gameplay/interactions.py +4 -10
- zombie_escape/gameplay/layout.py +38 -4
- zombie_escape/gameplay/movement.py +5 -7
- zombie_escape/gameplay/spawn.py +245 -12
- zombie_escape/gameplay/state.py +17 -16
- zombie_escape/gameplay/survivors.py +5 -4
- zombie_escape/gameplay/utils.py +19 -1
- zombie_escape/locales/ui.en.json +14 -2
- zombie_escape/locales/ui.ja.json +14 -2
- zombie_escape/models.py +52 -7
- zombie_escape/render.py +760 -284
- zombie_escape/render_constants.py +26 -8
- zombie_escape/screens/__init__.py +1 -0
- zombie_escape/screens/game_over.py +4 -4
- zombie_escape/screens/gameplay.py +10 -24
- zombie_escape/stage_constants.py +90 -2
- zombie_escape/world_grid.py +134 -0
- zombie_escape/zombie_escape.py +65 -61
- {zombie_escape-1.8.0.dist-info → zombie_escape-1.10.1.dist-info}/METADATA +9 -1
- zombie_escape-1.10.1.dist-info/RECORD +47 -0
- zombie_escape-1.8.0.dist-info/RECORD +0 -46
- {zombie_escape-1.8.0.dist-info → zombie_escape-1.10.1.dist-info}/WHEEL +0 -0
- {zombie_escape-1.8.0.dist-info → zombie_escape-1.10.1.dist-info}/entry_points.txt +0 -0
- {zombie_escape-1.8.0.dist-info → zombie_escape-1.10.1.dist-info}/licenses/LICENSE.txt +0 -0
zombie_escape/__about__.py
CHANGED
zombie_escape/colors.py
CHANGED
|
@@ -23,6 +23,8 @@ class EnvironmentPalette:
|
|
|
23
23
|
|
|
24
24
|
floor_primary: tuple[int, int, int]
|
|
25
25
|
floor_secondary: tuple[int, int, int]
|
|
26
|
+
fall_zone_primary: tuple[int, int, int]
|
|
27
|
+
fall_zone_secondary: tuple[int, int, int]
|
|
26
28
|
outside: tuple[int, int, int]
|
|
27
29
|
inner_wall: tuple[int, int, int]
|
|
28
30
|
inner_wall_border: tuple[int, int, int]
|
|
@@ -41,6 +43,7 @@ def _adjust_color(
|
|
|
41
43
|
|
|
42
44
|
r, g, b = color
|
|
43
45
|
gray = 0.2126 * r + 0.7152 * g + 0.0722 * b
|
|
46
|
+
|
|
44
47
|
def mix(component: int) -> int:
|
|
45
48
|
value = gray + (component - gray) * saturation
|
|
46
49
|
value *= brightness
|
|
@@ -57,6 +60,8 @@ DAWN_AMBIENT_PALETTE_KEY = "dawn"
|
|
|
57
60
|
_DEFAULT_ENVIRONMENT_PALETTE = EnvironmentPalette(
|
|
58
61
|
floor_primary=(43, 57, 70),
|
|
59
62
|
floor_secondary=(50, 64, 79),
|
|
63
|
+
fall_zone_primary=(84, 48, 29),
|
|
64
|
+
fall_zone_secondary=(94, 54, 32),
|
|
60
65
|
outside=(32, 60, 40),
|
|
61
66
|
inner_wall=(125, 101, 78),
|
|
62
67
|
inner_wall_border=(136, 110, 85),
|
|
@@ -67,31 +72,47 @@ _DEFAULT_ENVIRONMENT_PALETTE = EnvironmentPalette(
|
|
|
67
72
|
# Dark, desaturated palette that sells the "alone without a flashlight" vibe.
|
|
68
73
|
_GLOOM_ENVIRONMENT_PALETTE = EnvironmentPalette(
|
|
69
74
|
floor_primary=_adjust_color(
|
|
70
|
-
_DEFAULT_ENVIRONMENT_PALETTE.floor_primary, brightness=0.
|
|
75
|
+
_DEFAULT_ENVIRONMENT_PALETTE.floor_primary, brightness=0.8, saturation=0.75
|
|
71
76
|
),
|
|
72
77
|
floor_secondary=_adjust_color(
|
|
73
|
-
_DEFAULT_ENVIRONMENT_PALETTE.floor_secondary, brightness=0.
|
|
78
|
+
_DEFAULT_ENVIRONMENT_PALETTE.floor_secondary, brightness=0.8, saturation=0.75
|
|
79
|
+
),
|
|
80
|
+
fall_zone_primary=_adjust_color(
|
|
81
|
+
_DEFAULT_ENVIRONMENT_PALETTE.fall_zone_primary,
|
|
82
|
+
brightness=0.8,
|
|
83
|
+
saturation=0.75,
|
|
84
|
+
),
|
|
85
|
+
fall_zone_secondary=_adjust_color(
|
|
86
|
+
_DEFAULT_ENVIRONMENT_PALETTE.fall_zone_secondary,
|
|
87
|
+
brightness=0.8,
|
|
88
|
+
saturation=0.75,
|
|
74
89
|
),
|
|
75
90
|
outside=_adjust_color(
|
|
76
|
-
_DEFAULT_ENVIRONMENT_PALETTE.outside, brightness=0.
|
|
91
|
+
_DEFAULT_ENVIRONMENT_PALETTE.outside, brightness=0.8, saturation=0.75
|
|
77
92
|
),
|
|
78
93
|
inner_wall=_adjust_color(
|
|
79
|
-
_DEFAULT_ENVIRONMENT_PALETTE.inner_wall, brightness=0.
|
|
94
|
+
_DEFAULT_ENVIRONMENT_PALETTE.inner_wall, brightness=0.8, saturation=0.75
|
|
80
95
|
),
|
|
81
96
|
inner_wall_border=_adjust_color(
|
|
82
|
-
_DEFAULT_ENVIRONMENT_PALETTE.inner_wall_border,
|
|
97
|
+
_DEFAULT_ENVIRONMENT_PALETTE.inner_wall_border,
|
|
98
|
+
brightness=0.8,
|
|
99
|
+
saturation=0.75,
|
|
83
100
|
),
|
|
84
101
|
outer_wall=_adjust_color(
|
|
85
|
-
_DEFAULT_ENVIRONMENT_PALETTE.outer_wall, brightness=0.
|
|
102
|
+
_DEFAULT_ENVIRONMENT_PALETTE.outer_wall, brightness=0.8, saturation=0.75
|
|
86
103
|
),
|
|
87
104
|
outer_wall_border=_adjust_color(
|
|
88
|
-
_DEFAULT_ENVIRONMENT_PALETTE.outer_wall_border,
|
|
105
|
+
_DEFAULT_ENVIRONMENT_PALETTE.outer_wall_border,
|
|
106
|
+
brightness=0.8,
|
|
107
|
+
saturation=0.75,
|
|
89
108
|
),
|
|
90
109
|
)
|
|
91
110
|
|
|
92
111
|
_DAWN_ENVIRONMENT_PALETTE = EnvironmentPalette(
|
|
93
112
|
floor_primary=(58, 70, 84),
|
|
94
113
|
floor_secondary=(66, 78, 92),
|
|
114
|
+
fall_zone_primary=(84, 39, 29),
|
|
115
|
+
fall_zone_secondary=(95, 44, 33),
|
|
95
116
|
outside=(118, 140, 104),
|
|
96
117
|
inner_wall=(125, 101, 78),
|
|
97
118
|
inner_wall_border=(136, 110, 85),
|
|
@@ -111,30 +132,42 @@ def get_environment_palette(key: str | None) -> EnvironmentPalette:
|
|
|
111
132
|
|
|
112
133
|
if not key:
|
|
113
134
|
return ENVIRONMENT_PALETTES[DEFAULT_AMBIENT_PALETTE_KEY]
|
|
114
|
-
return ENVIRONMENT_PALETTES.get(
|
|
135
|
+
return ENVIRONMENT_PALETTES.get(
|
|
136
|
+
key, ENVIRONMENT_PALETTES[DEFAULT_AMBIENT_PALETTE_KEY]
|
|
137
|
+
)
|
|
115
138
|
|
|
116
139
|
|
|
117
140
|
def ambient_palette_key_for_flashlights(count: int) -> str:
|
|
118
141
|
"""Return the palette key for the provided flashlight inventory count."""
|
|
119
142
|
|
|
120
143
|
return (
|
|
121
|
-
DEFAULT_AMBIENT_PALETTE_KEY
|
|
122
|
-
if max(0, count) > 0
|
|
123
|
-
else NO_FLASHLIGHT_PALETTE_KEY
|
|
144
|
+
DEFAULT_AMBIENT_PALETTE_KEY if max(0, count) > 0 else NO_FLASHLIGHT_PALETTE_KEY
|
|
124
145
|
)
|
|
125
146
|
|
|
126
147
|
|
|
127
148
|
# World colors (default palette versions preserved for backwards compatibility).
|
|
128
149
|
INTERNAL_WALL_COLOR: tuple[int, int, int] = _DEFAULT_ENVIRONMENT_PALETTE.inner_wall
|
|
129
|
-
INTERNAL_WALL_BORDER_COLOR: tuple[int, int, int] =
|
|
150
|
+
INTERNAL_WALL_BORDER_COLOR: tuple[int, int, int] = (
|
|
151
|
+
_DEFAULT_ENVIRONMENT_PALETTE.inner_wall_border
|
|
152
|
+
)
|
|
130
153
|
OUTER_WALL_COLOR: tuple[int, int, int] = _DEFAULT_ENVIRONMENT_PALETTE.outer_wall
|
|
131
|
-
OUTER_WALL_BORDER_COLOR: tuple[int, int, int] =
|
|
154
|
+
OUTER_WALL_BORDER_COLOR: tuple[int, int, int] = (
|
|
155
|
+
_DEFAULT_ENVIRONMENT_PALETTE.outer_wall_border
|
|
156
|
+
)
|
|
132
157
|
FLOOR_COLOR_PRIMARY: tuple[int, int, int] = _DEFAULT_ENVIRONMENT_PALETTE.floor_primary
|
|
133
|
-
FLOOR_COLOR_SECONDARY: tuple[int, int, int] =
|
|
158
|
+
FLOOR_COLOR_SECONDARY: tuple[int, int, int] = (
|
|
159
|
+
_DEFAULT_ENVIRONMENT_PALETTE.floor_secondary
|
|
160
|
+
)
|
|
134
161
|
FLOOR_COLOR_OUTSIDE: tuple[int, int, int] = _DEFAULT_ENVIRONMENT_PALETTE.outside
|
|
135
162
|
FOOTPRINT_COLOR: tuple[int, int, int] = (110, 200, 255)
|
|
136
163
|
STEEL_BEAM_COLOR: tuple[int, int, int] = (110, 50, 50)
|
|
137
164
|
STEEL_BEAM_LINE_COLOR: tuple[int, int, int] = (180, 90, 90)
|
|
165
|
+
FALL_ZONE_FLOOR_PRIMARY: tuple[int, int, int] = (
|
|
166
|
+
_DEFAULT_ENVIRONMENT_PALETTE.fall_zone_primary
|
|
167
|
+
)
|
|
168
|
+
FALL_ZONE_FLOOR_SECONDARY: tuple[int, int, int] = (
|
|
169
|
+
_DEFAULT_ENVIRONMENT_PALETTE.fall_zone_secondary
|
|
170
|
+
)
|
|
138
171
|
|
|
139
172
|
|
|
140
173
|
__all__ = [
|
|
@@ -161,6 +194,8 @@ __all__ = [
|
|
|
161
194
|
"FOOTPRINT_COLOR",
|
|
162
195
|
"STEEL_BEAM_COLOR",
|
|
163
196
|
"STEEL_BEAM_LINE_COLOR",
|
|
197
|
+
"FALL_ZONE_FLOOR_PRIMARY",
|
|
198
|
+
"FALL_ZONE_FLOOR_SECONDARY",
|
|
164
199
|
"EnvironmentPalette",
|
|
165
200
|
"DEFAULT_AMBIENT_PALETTE_KEY",
|
|
166
201
|
"NO_FLASHLIGHT_PALETTE_KEY",
|