rom24-quickmud-python 2.9.10__py3-none-any.whl → 2.9.12__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.
- mud/characters/follow.py +25 -8
- mud/combat/engine.py +0 -5
- {rom24_quickmud_python-2.9.10.dist-info → rom24_quickmud_python-2.9.12.dist-info}/METADATA +1 -1
- {rom24_quickmud_python-2.9.10.dist-info → rom24_quickmud_python-2.9.12.dist-info}/RECORD +8 -8
- {rom24_quickmud_python-2.9.10.dist-info → rom24_quickmud_python-2.9.12.dist-info}/WHEEL +0 -0
- {rom24_quickmud_python-2.9.10.dist-info → rom24_quickmud_python-2.9.12.dist-info}/entry_points.txt +0 -0
- {rom24_quickmud_python-2.9.10.dist-info → rom24_quickmud_python-2.9.12.dist-info}/licenses/LICENSE +0 -0
- {rom24_quickmud_python-2.9.10.dist-info → rom24_quickmud_python-2.9.12.dist-info}/top_level.txt +0 -0
mud/characters/follow.py
CHANGED
|
@@ -68,17 +68,34 @@ def stop_follower(follower: "Character") -> None:
|
|
|
68
68
|
|
|
69
69
|
|
|
70
70
|
def die_follower(char: "Character") -> None:
|
|
71
|
-
"""
|
|
72
|
-
|
|
73
|
-
ROM
|
|
74
|
-
|
|
71
|
+
"""Detach a dying character from its group and followers.
|
|
72
|
+
|
|
73
|
+
Mirrors ROM ``src/act_comm.c:1658-1680``:
|
|
74
|
+
|
|
75
|
+
1. If ``ch`` is following someone, detach ``ch`` from its master
|
|
76
|
+
(releasing ``master->pet`` if it pointed at ``ch``).
|
|
77
|
+
2. Clear ``ch->leader``.
|
|
78
|
+
3. For every other character, if it follows ``ch`` (``master == ch``)
|
|
79
|
+
stop the follow; if it groups under ``ch`` (``leader == ch``), reset
|
|
80
|
+
its leader to itself so it becomes its own independent group leader
|
|
81
|
+
— NOT NULL, otherwise ``is_same_group`` would still equate two
|
|
82
|
+
former members via their dangling pointer at the extracted corpse.
|
|
75
83
|
"""
|
|
76
84
|
from mud.models.character import character_registry
|
|
77
85
|
|
|
78
|
-
|
|
79
|
-
master =
|
|
80
|
-
if master is char:
|
|
81
|
-
|
|
86
|
+
if getattr(char, "master", None) is not None:
|
|
87
|
+
master = char.master
|
|
88
|
+
if getattr(master, "pet", None) is char:
|
|
89
|
+
master.pet = None
|
|
90
|
+
stop_follower(char)
|
|
91
|
+
|
|
92
|
+
char.leader = None
|
|
93
|
+
|
|
94
|
+
for fch in list(character_registry):
|
|
95
|
+
if getattr(fch, "master", None) is char:
|
|
96
|
+
stop_follower(fch)
|
|
97
|
+
if getattr(fch, "leader", None) is char:
|
|
98
|
+
fch.leader = fch
|
|
82
99
|
|
|
83
100
|
|
|
84
101
|
__all__ = ["add_follower", "stop_follower", "die_follower"]
|
mud/combat/engine.py
CHANGED
|
@@ -600,11 +600,6 @@ def apply_damage(
|
|
|
600
600
|
old_pos = victim.position
|
|
601
601
|
victim.hit -= damage
|
|
602
602
|
|
|
603
|
-
# Trigger HP percent mobprog (ROM Reference: src/fight.c:1094-1136)
|
|
604
|
-
victim_is_npc = getattr(victim, "is_npc", False)
|
|
605
|
-
if victim_is_npc and victim.hit > 0:
|
|
606
|
-
mobprog.mp_hprct_trigger(victim, attacker)
|
|
607
|
-
|
|
608
603
|
# Immortals don't die (ROM IS_IMMORTAL check)
|
|
609
604
|
if not victim.is_npc and victim.is_immortal() and victim.hit < 1:
|
|
610
605
|
victim.hit = 1
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rom24-quickmud-python
|
|
3
|
-
Version: 2.9.
|
|
3
|
+
Version: 2.9.12
|
|
4
4
|
Summary: A modern Python port of the ROM 2.4b6 MUD engine with full telnet server and JSON world loading
|
|
5
5
|
Author-email: Mark Jedrzejczyk <mark.jedrzejczyk@gmail.com>
|
|
6
6
|
Maintainer-email: Mark Jedrzejczyk <mark.jedrzejczyk@gmail.com>
|
|
@@ -31,11 +31,11 @@ mud/ai/__init__.py,sha256=9hQjzFxg8ZXlLZ3mYSrwhnqaDF_9RHieNLlLXk6Hi74,9923
|
|
|
31
31
|
mud/ai/aggressive.py,sha256=YfD_DeRrLJjRcdwrNsex5hzoqoJB1kiSWS2vVjhPQEk,4177
|
|
32
32
|
mud/characters/__init__.py,sha256=BTnH4-W4m7WtjqvOgiLK2BbgzBA0nPLKb71kaa1BnB4,1635
|
|
33
33
|
mud/characters/conditions.py,sha256=h7anKi7gy-WqBjP15N761SqEehlAsj6tTp4qdd62W6w,1523
|
|
34
|
-
mud/characters/follow.py,sha256=
|
|
34
|
+
mud/characters/follow.py,sha256=einKP3qnYLJFs8BfM4aB2KlCrmmgC4gAo5yfE9-xyfM,3463
|
|
35
35
|
mud/combat/__init__.py,sha256=YUphU7bKkxT3Qw0Gj2TcMmDoDyCYyRTQbHPCqKLjugE,215
|
|
36
36
|
mud/combat/assist.py,sha256=_GDeuK0rfrXoELLNgTxBR1S8XdYIqcmPbTh8AinY9s8,7777
|
|
37
37
|
mud/combat/death.py,sha256=FQlnvIBXMtnnhfP9M55RxtiOBheXuGuBZX-IimudGsY,19152
|
|
38
|
-
mud/combat/engine.py,sha256=
|
|
38
|
+
mud/combat/engine.py,sha256=SnIHFdZMM3CEmpnXml8672qIKechrC-pmVJ1QDQ2xUI,62219
|
|
39
39
|
mud/combat/kill_table.py,sha256=oR77me5GJLGXi3q5ZnQAdp3S5lsfJNhiCmaXOMQrNgA,1040
|
|
40
40
|
mud/combat/messages.py,sha256=PVOYcOCHh4wW0P33ykbr6iYtFN8mottJ8W4S72E5pBM,7726
|
|
41
41
|
mud/combat/safety.py,sha256=EcQdUbE_vUFEhKv5ZG86ba4mNd6VG1Bw1ZWQW2sGYTc,3019
|
|
@@ -216,9 +216,9 @@ mud/world/obj_find.py,sha256=tgnUkbFjnCl586Lzl6yRzCmllZSNEfQpQlrxCMVcUGU,5295
|
|
|
216
216
|
mud/world/time_persistence.py,sha256=K4uhRpu08IDHY5uReBYTvw4BHuqsSxWvbv-h1VsPvf8,1663
|
|
217
217
|
mud/world/vision.py,sha256=NRk3cvrGyyldU4W98qAVlYZp9wL-IUE1dTgk6DpM-NA,11609
|
|
218
218
|
mud/world/world_state.py,sha256=3KpiDP6v24sZDn9-g44UypXpegzgRShHo1XvektJzdU,8810
|
|
219
|
-
rom24_quickmud_python-2.9.
|
|
220
|
-
rom24_quickmud_python-2.9.
|
|
221
|
-
rom24_quickmud_python-2.9.
|
|
222
|
-
rom24_quickmud_python-2.9.
|
|
223
|
-
rom24_quickmud_python-2.9.
|
|
224
|
-
rom24_quickmud_python-2.9.
|
|
219
|
+
rom24_quickmud_python-2.9.12.dist-info/licenses/LICENSE,sha256=anQ2j9As6sIC8tZgQCXbo0-09JDH9vPiqhA9djnOvkY,1078
|
|
220
|
+
rom24_quickmud_python-2.9.12.dist-info/METADATA,sha256=gQ4LagRqS4_EU_4m8qeleWt5xLx5GvNysXwdOQl8JuQ,15671
|
|
221
|
+
rom24_quickmud_python-2.9.12.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
222
|
+
rom24_quickmud_python-2.9.12.dist-info/entry_points.txt,sha256=VFru08UQTXZA_CkK-NBjJmWHyEX5a3864fQHjhaojbw,41
|
|
223
|
+
rom24_quickmud_python-2.9.12.dist-info/top_level.txt,sha256=Fk1WPmabIIjp7_iZXLYpbAVqiq7lG7TeAHt30AsOKtQ,4
|
|
224
|
+
rom24_quickmud_python-2.9.12.dist-info/RECORD,,
|
|
File without changes
|
{rom24_quickmud_python-2.9.10.dist-info → rom24_quickmud_python-2.9.12.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{rom24_quickmud_python-2.9.10.dist-info → rom24_quickmud_python-2.9.12.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
{rom24_quickmud_python-2.9.10.dist-info → rom24_quickmud_python-2.9.12.dist-info}/top_level.txt
RENAMED
|
File without changes
|