crimsonland 0.1.0.dev6__py3-none-any.whl → 0.1.0.dev7__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.
- crimson/audio_router.py +12 -2
- crimson/gameplay.py +49 -14
- {crimsonland-0.1.0.dev6.dist-info → crimsonland-0.1.0.dev7.dist-info}/METADATA +1 -1
- {crimsonland-0.1.0.dev6.dist-info → crimsonland-0.1.0.dev7.dist-info}/RECORD +6 -6
- {crimsonland-0.1.0.dev6.dist-info → crimsonland-0.1.0.dev7.dist-info}/WHEEL +0 -0
- {crimsonland-0.1.0.dev6.dist-info → crimsonland-0.1.0.dev7.dist-info}/entry_points.txt +0 -0
crimson/audio_router.py
CHANGED
|
@@ -9,7 +9,7 @@ from grim.audio import AudioState, play_sfx, trigger_game_tune
|
|
|
9
9
|
from .creatures.spawn import CreatureTypeId
|
|
10
10
|
from .game_modes import GameMode
|
|
11
11
|
from .weapon_sfx import resolve_weapon_sfx_ref
|
|
12
|
-
from .weapons import WEAPON_BY_ID
|
|
12
|
+
from .weapons import WEAPON_BY_ID, WeaponId
|
|
13
13
|
|
|
14
14
|
_MAX_HIT_SFX_PER_FRAME = 4
|
|
15
15
|
_MAX_DEATH_SFX_PER_FRAME = 3
|
|
@@ -96,7 +96,17 @@ class AudioRouter:
|
|
|
96
96
|
return
|
|
97
97
|
|
|
98
98
|
if int(getattr(player, "shot_seq", 0)) > int(prev_shot_seq):
|
|
99
|
-
|
|
99
|
+
if float(getattr(player, "fire_bullets_timer", 0.0)) > 0.0:
|
|
100
|
+
# player_update (crimsonland.exe): when Fire Bullets is active, the regular per-weapon
|
|
101
|
+
# shot sfx is suppressed and replaced by Fire Bullets + Plasma Minigun fire sfx.
|
|
102
|
+
fire_bullets = WEAPON_BY_ID.get(int(WeaponId.FIRE_BULLETS))
|
|
103
|
+
plasma_minigun = WEAPON_BY_ID.get(int(WeaponId.PLASMA_MINIGUN))
|
|
104
|
+
if fire_bullets is not None:
|
|
105
|
+
self.play_sfx(resolve_weapon_sfx_ref(fire_bullets.fire_sound))
|
|
106
|
+
if plasma_minigun is not None:
|
|
107
|
+
self.play_sfx(resolve_weapon_sfx_ref(plasma_minigun.fire_sound))
|
|
108
|
+
else:
|
|
109
|
+
self.play_sfx(resolve_weapon_sfx_ref(weapon.fire_sound))
|
|
100
110
|
|
|
101
111
|
reload_active = bool(getattr(player, "reload_active", False))
|
|
102
112
|
reload_timer = float(getattr(player, "reload_timer", 0.0))
|
crimson/gameplay.py
CHANGED
|
@@ -358,11 +358,49 @@ class BonusPool:
|
|
|
358
358
|
return None
|
|
359
359
|
|
|
360
360
|
rng = state.rng
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
361
|
+
# Native special-case: while any player has Pistol, 3/4 chance to force a Weapon drop.
|
|
362
|
+
if players and any(int(player.weapon_id) == int(WeaponId.PISTOL) for player in players):
|
|
363
|
+
if (int(rng.rand()) & 3) < 3:
|
|
364
|
+
entry = self.spawn_at_pos(
|
|
365
|
+
pos_x,
|
|
366
|
+
pos_y,
|
|
367
|
+
state=state,
|
|
368
|
+
players=players,
|
|
369
|
+
world_width=world_width,
|
|
370
|
+
world_height=world_height,
|
|
371
|
+
)
|
|
372
|
+
if entry is None:
|
|
373
|
+
return None
|
|
374
|
+
|
|
375
|
+
entry.bonus_id = int(BonusId.WEAPON)
|
|
376
|
+
weapon_id = int(weapon_pick_random_available(state))
|
|
377
|
+
entry.amount = int(weapon_id)
|
|
378
|
+
if weapon_id == int(WeaponId.PISTOL):
|
|
379
|
+
weapon_id = int(weapon_pick_random_available(state))
|
|
380
|
+
entry.amount = int(weapon_id)
|
|
381
|
+
|
|
382
|
+
matches = sum(1 for bonus in self._entries if bonus.bonus_id == entry.bonus_id)
|
|
383
|
+
if matches > 1:
|
|
384
|
+
self._clear_entry(entry)
|
|
385
|
+
return None
|
|
386
|
+
|
|
387
|
+
if entry.amount == int(WeaponId.PISTOL) or (players and perk_active(players[0], PerkId.MY_FAVOURITE_WEAPON)):
|
|
388
|
+
self._clear_entry(entry)
|
|
389
|
+
return None
|
|
390
|
+
|
|
391
|
+
return entry
|
|
392
|
+
|
|
393
|
+
base_roll = int(rng.rand())
|
|
394
|
+
if base_roll % 9 != 1:
|
|
395
|
+
allow_without_magnet = False
|
|
396
|
+
if players and int(players[0].weapon_id) == int(WeaponId.PISTOL):
|
|
397
|
+
allow_without_magnet = int(rng.rand()) % 5 == 1
|
|
398
|
+
|
|
399
|
+
if not allow_without_magnet:
|
|
400
|
+
if not (players and perk_active(players[0], PerkId.BONUS_MAGNET)):
|
|
401
|
+
return None
|
|
402
|
+
if int(rng.rand()) % 10 != 2:
|
|
403
|
+
return None
|
|
366
404
|
|
|
367
405
|
entry = self.spawn_at_pos(
|
|
368
406
|
pos_x,
|
|
@@ -377,11 +415,9 @@ class BonusPool:
|
|
|
377
415
|
|
|
378
416
|
if entry.bonus_id == int(BonusId.WEAPON):
|
|
379
417
|
near_sq = BONUS_WEAPON_NEAR_RADIUS * BONUS_WEAPON_NEAR_RADIUS
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
entry.amount = 100
|
|
384
|
-
break
|
|
418
|
+
if players and _distance_sq(pos_x, pos_y, players[0].pos_x, players[0].pos_y) < near_sq:
|
|
419
|
+
entry.bonus_id = int(BonusId.POINTS)
|
|
420
|
+
entry.amount = 100
|
|
385
421
|
|
|
386
422
|
if entry.bonus_id != int(BonusId.POINTS):
|
|
387
423
|
matches = sum(1 for bonus in self._entries if bonus.bonus_id == entry.bonus_id)
|
|
@@ -390,10 +426,9 @@ class BonusPool:
|
|
|
390
426
|
return None
|
|
391
427
|
|
|
392
428
|
if entry.bonus_id == int(BonusId.WEAPON):
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
return None
|
|
429
|
+
if players and entry.amount == players[0].weapon_id:
|
|
430
|
+
self._clear_entry(entry)
|
|
431
|
+
return None
|
|
397
432
|
|
|
398
433
|
return entry
|
|
399
434
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
crimson/__init__.py,sha256=dij6OQ6Wctqur9P00ojTTZw6IaUNeZagPX4-2Qqr-Kw,367
|
|
2
2
|
crimson/assets_fetch.py,sha256=z4vFH9h-RIwc2o6uKGzEtUaOdhUDSX6Art-WU6tNjd0,1864
|
|
3
3
|
crimson/atlas.py,sha256=hEcCHhPvguXAI6eH_G9Q8rpiX7M5akZ8fgJjMogmYrA,2401
|
|
4
|
-
crimson/audio_router.py,sha256=
|
|
4
|
+
crimson/audio_router.py,sha256=4lccGu5044WQ5sMz9yfZd4loSgEMDqXJWGvMmHyMGt0,5449
|
|
5
5
|
crimson/bonuses.py,sha256=owwYIRHRu1Kymtt4eEvpd62JwWAg8LOe20vDuPFB5SU,5094
|
|
6
6
|
crimson/camera.py,sha256=VxTNXTh0qHh5VR1OpkiXr-QcgEWPrWw0A3PFyQFqDkY,2278
|
|
7
7
|
crimson/cli.py,sha256=Pu4RM_bjGtUgIE_5zZs0uWFY9O8YkhJDseRcVMMPJ8k,14595
|
|
@@ -31,7 +31,7 @@ crimson/frontend/transitions.py,sha256=-sAJUDqNZ943zXlqtvJ6jCg2YH8dSi8k7qK8caAfO
|
|
|
31
31
|
crimson/game.py,sha256=_nPXvZDgu2sqEPk00ww9qx7nD8eQIXlIvU-yKfBuUA8,97537
|
|
32
32
|
crimson/game_modes.py,sha256=qW7Tt97lSBmGrt0F17Ni5h8vRyngBzyS9XwWM1TFIEI,255
|
|
33
33
|
crimson/game_world.py,sha256=nfKGcm3LHChPGLHJsurDFAATrHmhRvTmgxcLzUN9m5I,25440
|
|
34
|
-
crimson/gameplay.py,sha256=
|
|
34
|
+
crimson/gameplay.py,sha256=M4ZymFV7WNF7C8zjQN179TNILDNVccfREZeymbuHD4A,89098
|
|
35
35
|
crimson/input_codes.py,sha256=PmSWFZIit8unTBWk3uwifpHWMuk0qMg1ueKX3MGC7D0,5379
|
|
36
36
|
crimson/modes/__init__.py,sha256=U4S_2y3zgLZVfMenHRaJFBW8yqh2mUBuI291LGQVOJ8,35
|
|
37
37
|
crimson/modes/base_gameplay_mode.py,sha256=kmXJxkGnCKV5QZL_y5ML7r-p4bw7hMswKseG9XUn2jo,7555
|
|
@@ -133,7 +133,7 @@ grim/sfx.py,sha256=cpn2Mmeio7BSDgbStSft-eZchO9Ot2MrK6iXJqxlLqU,7836
|
|
|
133
133
|
grim/sfx_map.py,sha256=FM5iBzKkG30Vtu78SRavVNgXMbGK7ZFcQ8i6lgMlzVw,4697
|
|
134
134
|
grim/terrain_render.py,sha256=EZ7ySYJyTZwXcrJx1mKbY3ewZtPi7Y270XnZgGJyZG8,31509
|
|
135
135
|
grim/view.py,sha256=oF4pHZehBqOxPjKMU28TDg3qATh_amMIRJp-vMQnpn4,334
|
|
136
|
-
crimsonland-0.1.0.
|
|
137
|
-
crimsonland-0.1.0.
|
|
138
|
-
crimsonland-0.1.0.
|
|
139
|
-
crimsonland-0.1.0.
|
|
136
|
+
crimsonland-0.1.0.dev7.dist-info/WHEEL,sha256=fAguSjoiATBe7TNBkJwOjyL1Tt4wwiaQGtNtjRPNMQA,80
|
|
137
|
+
crimsonland-0.1.0.dev7.dist-info/entry_points.txt,sha256=jzzcExxiE9xpt4Iw2nbB1lwTv2Zj4H14WJTIPMkAjoE,77
|
|
138
|
+
crimsonland-0.1.0.dev7.dist-info/METADATA,sha256=6zsYDOJkNTgz5xZz1aIWW8BhL8aEcqZFKarztRyetBw,243
|
|
139
|
+
crimsonland-0.1.0.dev7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|