zombie-escape 1.7.1__py3-none-any.whl → 1.10.0__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 +41 -8
- zombie_escape/entities.py +376 -306
- zombie_escape/entities_constants.py +6 -0
- zombie_escape/gameplay/__init__.py +2 -2
- zombie_escape/gameplay/constants.py +1 -7
- zombie_escape/gameplay/footprints.py +2 -2
- zombie_escape/gameplay/interactions.py +4 -10
- zombie_escape/gameplay/layout.py +43 -4
- zombie_escape/gameplay/movement.py +45 -7
- zombie_escape/gameplay/spawn.py +283 -43
- zombie_escape/gameplay/state.py +19 -16
- zombie_escape/gameplay/survivors.py +47 -15
- zombie_escape/gameplay/utils.py +19 -1
- zombie_escape/input_utils.py +167 -0
- zombie_escape/level_blueprints.py +28 -0
- zombie_escape/locales/ui.en.json +55 -11
- zombie_escape/locales/ui.ja.json +54 -10
- zombie_escape/localization.py +28 -0
- zombie_escape/models.py +54 -7
- zombie_escape/render.py +704 -267
- zombie_escape/render_constants.py +12 -0
- zombie_escape/screens/__init__.py +1 -0
- zombie_escape/screens/game_over.py +8 -4
- zombie_escape/screens/gameplay.py +88 -41
- zombie_escape/screens/settings.py +124 -13
- zombie_escape/screens/title.py +111 -0
- zombie_escape/stage_constants.py +116 -3
- zombie_escape/world_grid.py +134 -0
- zombie_escape/zombie_escape.py +68 -61
- {zombie_escape-1.7.1.dist-info → zombie_escape-1.10.0.dist-info}/METADATA +11 -3
- zombie_escape-1.10.0.dist-info/RECORD +47 -0
- zombie_escape-1.7.1.dist-info/RECORD +0 -45
- {zombie_escape-1.7.1.dist-info → zombie_escape-1.10.0.dist-info}/WHEEL +0 -0
- {zombie_escape-1.7.1.dist-info → zombie_escape-1.10.0.dist-info}/entry_points.txt +0 -0
- {zombie_escape-1.7.1.dist-info → zombie_escape-1.10.0.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),
|
|
@@ -72,6 +77,16 @@ _GLOOM_ENVIRONMENT_PALETTE = EnvironmentPalette(
|
|
|
72
77
|
floor_secondary=_adjust_color(
|
|
73
78
|
_DEFAULT_ENVIRONMENT_PALETTE.floor_secondary, brightness=0.74, saturation=0.65
|
|
74
79
|
),
|
|
80
|
+
fall_zone_primary=_adjust_color(
|
|
81
|
+
_DEFAULT_ENVIRONMENT_PALETTE.fall_zone_primary,
|
|
82
|
+
brightness=0.725,
|
|
83
|
+
saturation=0.675,
|
|
84
|
+
),
|
|
85
|
+
fall_zone_secondary=_adjust_color(
|
|
86
|
+
_DEFAULT_ENVIRONMENT_PALETTE.fall_zone_secondary,
|
|
87
|
+
brightness=0.74,
|
|
88
|
+
saturation=0.65,
|
|
89
|
+
),
|
|
75
90
|
outside=_adjust_color(
|
|
76
91
|
_DEFAULT_ENVIRONMENT_PALETTE.outside, brightness=0.7, saturation=0.625
|
|
77
92
|
),
|
|
@@ -85,13 +100,17 @@ _GLOOM_ENVIRONMENT_PALETTE = EnvironmentPalette(
|
|
|
85
100
|
_DEFAULT_ENVIRONMENT_PALETTE.outer_wall, brightness=0.75, saturation=0.675
|
|
86
101
|
),
|
|
87
102
|
outer_wall_border=_adjust_color(
|
|
88
|
-
_DEFAULT_ENVIRONMENT_PALETTE.outer_wall_border,
|
|
103
|
+
_DEFAULT_ENVIRONMENT_PALETTE.outer_wall_border,
|
|
104
|
+
brightness=0.75,
|
|
105
|
+
saturation=0.675,
|
|
89
106
|
),
|
|
90
107
|
)
|
|
91
108
|
|
|
92
109
|
_DAWN_ENVIRONMENT_PALETTE = EnvironmentPalette(
|
|
93
110
|
floor_primary=(58, 70, 84),
|
|
94
111
|
floor_secondary=(66, 78, 92),
|
|
112
|
+
fall_zone_primary=(84, 39, 29),
|
|
113
|
+
fall_zone_secondary=(95, 44, 33),
|
|
95
114
|
outside=(118, 140, 104),
|
|
96
115
|
inner_wall=(125, 101, 78),
|
|
97
116
|
inner_wall_border=(136, 110, 85),
|
|
@@ -111,30 +130,42 @@ def get_environment_palette(key: str | None) -> EnvironmentPalette:
|
|
|
111
130
|
|
|
112
131
|
if not key:
|
|
113
132
|
return ENVIRONMENT_PALETTES[DEFAULT_AMBIENT_PALETTE_KEY]
|
|
114
|
-
return ENVIRONMENT_PALETTES.get(
|
|
133
|
+
return ENVIRONMENT_PALETTES.get(
|
|
134
|
+
key, ENVIRONMENT_PALETTES[DEFAULT_AMBIENT_PALETTE_KEY]
|
|
135
|
+
)
|
|
115
136
|
|
|
116
137
|
|
|
117
138
|
def ambient_palette_key_for_flashlights(count: int) -> str:
|
|
118
139
|
"""Return the palette key for the provided flashlight inventory count."""
|
|
119
140
|
|
|
120
141
|
return (
|
|
121
|
-
DEFAULT_AMBIENT_PALETTE_KEY
|
|
122
|
-
if max(0, count) > 0
|
|
123
|
-
else NO_FLASHLIGHT_PALETTE_KEY
|
|
142
|
+
DEFAULT_AMBIENT_PALETTE_KEY if max(0, count) > 0 else NO_FLASHLIGHT_PALETTE_KEY
|
|
124
143
|
)
|
|
125
144
|
|
|
126
145
|
|
|
127
146
|
# World colors (default palette versions preserved for backwards compatibility).
|
|
128
147
|
INTERNAL_WALL_COLOR: tuple[int, int, int] = _DEFAULT_ENVIRONMENT_PALETTE.inner_wall
|
|
129
|
-
INTERNAL_WALL_BORDER_COLOR: tuple[int, int, int] =
|
|
148
|
+
INTERNAL_WALL_BORDER_COLOR: tuple[int, int, int] = (
|
|
149
|
+
_DEFAULT_ENVIRONMENT_PALETTE.inner_wall_border
|
|
150
|
+
)
|
|
130
151
|
OUTER_WALL_COLOR: tuple[int, int, int] = _DEFAULT_ENVIRONMENT_PALETTE.outer_wall
|
|
131
|
-
OUTER_WALL_BORDER_COLOR: tuple[int, int, int] =
|
|
152
|
+
OUTER_WALL_BORDER_COLOR: tuple[int, int, int] = (
|
|
153
|
+
_DEFAULT_ENVIRONMENT_PALETTE.outer_wall_border
|
|
154
|
+
)
|
|
132
155
|
FLOOR_COLOR_PRIMARY: tuple[int, int, int] = _DEFAULT_ENVIRONMENT_PALETTE.floor_primary
|
|
133
|
-
FLOOR_COLOR_SECONDARY: tuple[int, int, int] =
|
|
156
|
+
FLOOR_COLOR_SECONDARY: tuple[int, int, int] = (
|
|
157
|
+
_DEFAULT_ENVIRONMENT_PALETTE.floor_secondary
|
|
158
|
+
)
|
|
134
159
|
FLOOR_COLOR_OUTSIDE: tuple[int, int, int] = _DEFAULT_ENVIRONMENT_PALETTE.outside
|
|
135
160
|
FOOTPRINT_COLOR: tuple[int, int, int] = (110, 200, 255)
|
|
136
161
|
STEEL_BEAM_COLOR: tuple[int, int, int] = (110, 50, 50)
|
|
137
162
|
STEEL_BEAM_LINE_COLOR: tuple[int, int, int] = (180, 90, 90)
|
|
163
|
+
FALL_ZONE_FLOOR_PRIMARY: tuple[int, int, int] = (
|
|
164
|
+
_DEFAULT_ENVIRONMENT_PALETTE.fall_zone_primary
|
|
165
|
+
)
|
|
166
|
+
FALL_ZONE_FLOOR_SECONDARY: tuple[int, int, int] = (
|
|
167
|
+
_DEFAULT_ENVIRONMENT_PALETTE.fall_zone_secondary
|
|
168
|
+
)
|
|
138
169
|
|
|
139
170
|
|
|
140
171
|
__all__ = [
|
|
@@ -161,6 +192,8 @@ __all__ = [
|
|
|
161
192
|
"FOOTPRINT_COLOR",
|
|
162
193
|
"STEEL_BEAM_COLOR",
|
|
163
194
|
"STEEL_BEAM_LINE_COLOR",
|
|
195
|
+
"FALL_ZONE_FLOOR_PRIMARY",
|
|
196
|
+
"FALL_ZONE_FLOOR_SECONDARY",
|
|
164
197
|
"EnvironmentPalette",
|
|
165
198
|
"DEFAULT_AMBIENT_PALETTE_KEY",
|
|
166
199
|
"NO_FLASHLIGHT_PALETTE_KEY",
|