rom24-quickmud-python 2.9.9__py3-none-any.whl → 2.9.10__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/combat/engine.py +22 -4
- mud/skills/handlers.py +33 -0
- {rom24_quickmud_python-2.9.9.dist-info → rom24_quickmud_python-2.9.10.dist-info}/METADATA +1 -1
- {rom24_quickmud_python-2.9.9.dist-info → rom24_quickmud_python-2.9.10.dist-info}/RECORD +8 -8
- {rom24_quickmud_python-2.9.9.dist-info → rom24_quickmud_python-2.9.10.dist-info}/WHEEL +0 -0
- {rom24_quickmud_python-2.9.9.dist-info → rom24_quickmud_python-2.9.10.dist-info}/entry_points.txt +0 -0
- {rom24_quickmud_python-2.9.9.dist-info → rom24_quickmud_python-2.9.10.dist-info}/licenses/LICENSE +0 -0
- {rom24_quickmud_python-2.9.9.dist-info → rom24_quickmud_python-2.9.10.dist-info}/top_level.txt +0 -0
mud/combat/engine.py
CHANGED
|
@@ -613,10 +613,7 @@ def apply_damage(
|
|
|
613
613
|
update_pos(victim)
|
|
614
614
|
|
|
615
615
|
# Handle position change messages
|
|
616
|
-
|
|
617
|
-
change_message = _position_change_message(victim, old_pos)
|
|
618
|
-
if change_message:
|
|
619
|
-
_push_message(victim, change_message)
|
|
616
|
+
apply_position_change(victim, old_pos)
|
|
620
617
|
|
|
621
618
|
# Stop fighting if unconscious
|
|
622
619
|
if not is_awake(victim):
|
|
@@ -742,6 +739,27 @@ def _broadcast_pos_change(victim: Character, template: str, **extra: object) ->
|
|
|
742
739
|
listener.messages.append(message)
|
|
743
740
|
|
|
744
741
|
|
|
742
|
+
def apply_position_change(victim: Character, old_pos: Position) -> None:
|
|
743
|
+
"""Emit ROM position-transition messages after ``update_pos``.
|
|
744
|
+
|
|
745
|
+
Mirrors ``src/fight.c:837-861`` — when ``damage()`` updates a
|
|
746
|
+
victim's position, it broadcasts an ``act(... TO_ROOM)`` line
|
|
747
|
+
and sends the to-self line via ``send_to_char``. ROM funnels
|
|
748
|
+
every damage path through ``damage()``, so the broadcast is the
|
|
749
|
+
natural consequence of any hp drop that crosses a threshold.
|
|
750
|
+
|
|
751
|
+
Python's spell handlers in ``mud/skills/handlers.py`` bypass
|
|
752
|
+
:func:`apply_damage` and call :func:`update_pos` directly — they
|
|
753
|
+
must call this helper after ``update_pos`` to deliver the same
|
|
754
|
+
room + self lines (INV-016 BCAST-ON-POSITION-TRANSITION).
|
|
755
|
+
"""
|
|
756
|
+
if victim.position == old_pos:
|
|
757
|
+
return
|
|
758
|
+
message = _position_change_message(victim, old_pos)
|
|
759
|
+
if message:
|
|
760
|
+
_push_message(victim, message)
|
|
761
|
+
|
|
762
|
+
|
|
745
763
|
def _position_change_message(victim: Character, old_pos: Position) -> str:
|
|
746
764
|
"""Generate position change message following ROM logic."""
|
|
747
765
|
if victim.position == Position.MORTAL:
|
mud/skills/handlers.py
CHANGED
|
@@ -13,6 +13,7 @@ from mud.characters import is_clan_member, is_same_clan, is_same_group
|
|
|
13
13
|
from mud.characters.follow import add_follower, stop_follower
|
|
14
14
|
from mud.combat.engine import (
|
|
15
15
|
apply_damage,
|
|
16
|
+
apply_position_change,
|
|
16
17
|
attack_round,
|
|
17
18
|
get_weapon_skill,
|
|
18
19
|
get_weapon_sn,
|
|
@@ -1265,8 +1266,10 @@ def acid_blast(caster: Character, target: Character | None = None) -> int:
|
|
|
1265
1266
|
if saves_spell(level, target, DamageType.ACID):
|
|
1266
1267
|
damage = c_div(damage, 2)
|
|
1267
1268
|
|
|
1269
|
+
old_pos = target.position
|
|
1268
1270
|
target.hit -= damage
|
|
1269
1271
|
update_pos(target)
|
|
1272
|
+
apply_position_change(target, old_pos)
|
|
1270
1273
|
return damage
|
|
1271
1274
|
|
|
1272
1275
|
|
|
@@ -1293,8 +1296,10 @@ def acid_breath(caster: Character, target: Character | None = None) -> int:
|
|
|
1293
1296
|
acid_effect(target, level, dam, SpellTarget.CHAR)
|
|
1294
1297
|
damage = dam
|
|
1295
1298
|
|
|
1299
|
+
old_pos = target.position
|
|
1296
1300
|
target.hit -= damage
|
|
1297
1301
|
update_pos(target)
|
|
1302
|
+
apply_position_change(target, old_pos)
|
|
1298
1303
|
return damage
|
|
1299
1304
|
|
|
1300
1305
|
|
|
@@ -1525,8 +1530,10 @@ def burning_hands(caster: Character, target: Character | None = None) -> int:
|
|
|
1525
1530
|
if saves_spell(level, target, DamageType.FIRE):
|
|
1526
1531
|
damage = c_div(damage, 2)
|
|
1527
1532
|
|
|
1533
|
+
old_pos = target.position
|
|
1528
1534
|
target.hit -= damage
|
|
1529
1535
|
update_pos(target)
|
|
1536
|
+
apply_position_change(target, old_pos)
|
|
1530
1537
|
return damage
|
|
1531
1538
|
|
|
1532
1539
|
|
|
@@ -1561,8 +1568,10 @@ def call_lightning(caster: Character, target: Character | None = None) -> int:
|
|
|
1561
1568
|
if saves_spell(level, target, DamageType.LIGHTNING):
|
|
1562
1569
|
damage = c_div(damage, 2)
|
|
1563
1570
|
|
|
1571
|
+
old_pos = target.position
|
|
1564
1572
|
target.hit -= damage
|
|
1565
1573
|
update_pos(target)
|
|
1574
|
+
apply_position_change(target, old_pos)
|
|
1566
1575
|
return damage
|
|
1567
1576
|
|
|
1568
1577
|
|
|
@@ -2166,8 +2175,10 @@ def chill_touch(caster: Character, target: Character | None = None) -> int:
|
|
|
2166
2175
|
)
|
|
2167
2176
|
target.apply_spell_effect(effect)
|
|
2168
2177
|
|
|
2178
|
+
old_pos = target.position
|
|
2169
2179
|
target.hit -= damage
|
|
2170
2180
|
update_pos(target)
|
|
2181
|
+
apply_position_change(target, old_pos)
|
|
2171
2182
|
return damage
|
|
2172
2183
|
|
|
2173
2184
|
|
|
@@ -2266,8 +2277,10 @@ def colour_spray(caster: Character, target: Character | None = None) -> int:
|
|
|
2266
2277
|
finally:
|
|
2267
2278
|
caster.level = original_level
|
|
2268
2279
|
|
|
2280
|
+
old_pos = target.position
|
|
2269
2281
|
target.hit -= damage
|
|
2270
2282
|
update_pos(target)
|
|
2283
|
+
apply_position_change(target, old_pos)
|
|
2271
2284
|
return damage
|
|
2272
2285
|
|
|
2273
2286
|
|
|
@@ -2727,8 +2740,10 @@ def demonfire(caster: Character, target: Character | None = None) -> int:
|
|
|
2727
2740
|
if saves_spell(level, victim, DamageType.NEGATIVE):
|
|
2728
2741
|
damage = c_div(damage, 2)
|
|
2729
2742
|
|
|
2743
|
+
old_pos = victim.position
|
|
2730
2744
|
victim.hit -= damage
|
|
2731
2745
|
update_pos(victim)
|
|
2746
|
+
apply_position_change(victim, old_pos)
|
|
2732
2747
|
|
|
2733
2748
|
curse_level = max(0, c_div(3 * level, 4))
|
|
2734
2749
|
if (
|
|
@@ -3193,8 +3208,10 @@ def dispel_evil(caster: Character, target: Character | None = None) -> int:
|
|
|
3193
3208
|
if saves_spell(level, victim, DamageType.HOLY):
|
|
3194
3209
|
damage = c_div(damage, 2)
|
|
3195
3210
|
|
|
3211
|
+
old_pos = victim.position
|
|
3196
3212
|
victim.hit -= damage
|
|
3197
3213
|
update_pos(victim)
|
|
3214
|
+
apply_position_change(victim, old_pos)
|
|
3198
3215
|
return damage
|
|
3199
3216
|
|
|
3200
3217
|
|
|
@@ -3236,8 +3253,10 @@ def dispel_good(caster: Character, target: Character | None = None) -> int:
|
|
|
3236
3253
|
if saves_spell(level, victim, DamageType.NEGATIVE):
|
|
3237
3254
|
damage = c_div(damage, 2)
|
|
3238
3255
|
|
|
3256
|
+
old_pos = victim.position
|
|
3239
3257
|
victim.hit -= damage
|
|
3240
3258
|
update_pos(victim)
|
|
3259
|
+
apply_position_change(victim, old_pos)
|
|
3241
3260
|
return damage
|
|
3242
3261
|
|
|
3243
3262
|
|
|
@@ -4043,8 +4062,10 @@ def fire_breath(caster: Character, target: Character | None = None) -> int:
|
|
|
4043
4062
|
fire_effect(person, c_div(level, 2), c_div(dam, 4), SpellTarget.CHAR)
|
|
4044
4063
|
actual = c_div(dam, 2)
|
|
4045
4064
|
|
|
4065
|
+
old_pos = person.position
|
|
4046
4066
|
person.hit -= actual
|
|
4047
4067
|
update_pos(person)
|
|
4068
|
+
apply_position_change(person, old_pos)
|
|
4048
4069
|
|
|
4049
4070
|
return primary_damage
|
|
4050
4071
|
|
|
@@ -4431,8 +4452,10 @@ def frost_breath(caster: Character, target: Character | None = None) -> int:
|
|
|
4431
4452
|
cold_effect(person, c_div(level, 2), c_div(dam, 4), SpellTarget.CHAR)
|
|
4432
4453
|
actual = c_div(dam, 2)
|
|
4433
4454
|
|
|
4455
|
+
old_pos = person.position
|
|
4434
4456
|
person.hit -= actual
|
|
4435
4457
|
update_pos(person)
|
|
4458
|
+
apply_position_change(person, old_pos)
|
|
4436
4459
|
|
|
4437
4460
|
return primary_damage
|
|
4438
4461
|
|
|
@@ -4481,8 +4504,10 @@ def gas_breath(caster: Character, target: Character | None = None) -> int:
|
|
|
4481
4504
|
poison_effect(person, level, dam, SpellTarget.CHAR)
|
|
4482
4505
|
actual = dam
|
|
4483
4506
|
|
|
4507
|
+
old_pos = person.position
|
|
4484
4508
|
person.hit -= actual
|
|
4485
4509
|
update_pos(person)
|
|
4510
|
+
apply_position_change(person, old_pos)
|
|
4486
4511
|
|
|
4487
4512
|
if primary_damage == 0 and ((target is None) or person is target):
|
|
4488
4513
|
primary_damage = actual
|
|
@@ -4812,8 +4837,10 @@ def harm(caster: Character, target: Character | None = None) -> int:
|
|
|
4812
4837
|
dam = min(100, dam)
|
|
4813
4838
|
|
|
4814
4839
|
# ROM L3057: damage(ch, victim, dam, sn, DAM_HARM, TRUE)
|
|
4840
|
+
old_pos = target.position
|
|
4815
4841
|
target.hit -= dam
|
|
4816
4842
|
update_pos(target)
|
|
4843
|
+
apply_position_change(target, old_pos)
|
|
4817
4844
|
return dam
|
|
4818
4845
|
|
|
4819
4846
|
|
|
@@ -5021,8 +5048,10 @@ def heat_metal(
|
|
|
5021
5048
|
dam = c_div(2 * dam, 3)
|
|
5022
5049
|
|
|
5023
5050
|
# Apply damage
|
|
5051
|
+
old_pos = target.position
|
|
5024
5052
|
target.hit -= dam
|
|
5025
5053
|
update_pos(target)
|
|
5054
|
+
apply_position_change(target, old_pos)
|
|
5026
5055
|
return dam
|
|
5027
5056
|
|
|
5028
5057
|
|
|
@@ -5559,8 +5588,10 @@ def lightning_breath(caster: Character, target: Character | None = None) -> int:
|
|
|
5559
5588
|
shock_effect(target, level, dam, SpellTarget.CHAR)
|
|
5560
5589
|
damage = dam
|
|
5561
5590
|
|
|
5591
|
+
old_pos = target.position
|
|
5562
5592
|
target.hit -= damage
|
|
5563
5593
|
update_pos(target)
|
|
5594
|
+
apply_position_change(target, old_pos)
|
|
5564
5595
|
return damage
|
|
5565
5596
|
|
|
5566
5597
|
|
|
@@ -7088,8 +7119,10 @@ def shocking_grasp(caster: Character, target: Character | None = None) -> int:
|
|
|
7088
7119
|
|
|
7089
7120
|
# ROM L4352: damage(ch, victim, dam, sn, DAM_LIGHTNING, TRUE)
|
|
7090
7121
|
# Simplified: directly apply damage
|
|
7122
|
+
old_pos = target.position
|
|
7091
7123
|
target.hit -= damage
|
|
7092
7124
|
update_pos(target)
|
|
7125
|
+
apply_position_change(target, old_pos)
|
|
7093
7126
|
return damage
|
|
7094
7127
|
|
|
7095
7128
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: rom24-quickmud-python
|
|
3
|
-
Version: 2.9.
|
|
3
|
+
Version: 2.9.10
|
|
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>
|
|
@@ -35,7 +35,7 @@ mud/characters/follow.py,sha256=yP2cJ8WvqpWWebzOUfK5wauIQfdT5BL-ukuyax_Tni4,2751
|
|
|
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=ZJXDT-aztRjDsj76auszE_XH7dKRVf2XOEZuKy5YMFs,62437
|
|
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
|
|
@@ -188,7 +188,7 @@ mud/security/bans.py,sha256=_nM9wEJbxxdLXoe0I31u8dTYgWP0wxMqMVB9mxxfhlk,9174
|
|
|
188
188
|
mud/security/hash_utils.py,sha256=GNd2W-TFLSIOk1WMQRuvJo8l4CueBYzPI0EhQuydxUg,656
|
|
189
189
|
mud/skills/__init__.py,sha256=zzIr-ejbrlrQF1CSepODWhpxQZv8rO2pgaqIi3vpMg0,241
|
|
190
190
|
mud/skills/groups.py,sha256=_80fJkXfrPUmTcZ9JsCJHIAhRdmmGhayMJgn1pSFcQY,8127
|
|
191
|
-
mud/skills/handlers.py,sha256=
|
|
191
|
+
mud/skills/handlers.py,sha256=PjxYkSTVyNtLgvcVgtdlBk2IXs2UwPJmyZSQiKtVs6Q,269333
|
|
192
192
|
mud/skills/metadata.py,sha256=xNpiH3EmCMWY_DtO_Pjrhs2U7bYOBxyrsTL0wC_RJes,15413
|
|
193
193
|
mud/skills/registry.py,sha256=60vHbukciV5f-o0nurt2Nwwjz3EBpQpRjwWOIh-viHE,13838
|
|
194
194
|
mud/skills/say_spell.py,sha256=4voaTUbpYKsF0Plv9m-Eh0FK6lp1-Cz15rQBRq_XLNo,3909
|
|
@@ -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.10.dist-info/licenses/LICENSE,sha256=anQ2j9As6sIC8tZgQCXbo0-09JDH9vPiqhA9djnOvkY,1078
|
|
220
|
+
rom24_quickmud_python-2.9.10.dist-info/METADATA,sha256=yaPA3JHg0gV2YTFeEYTD-W_WYrH7SIRgjLOVQyGAQpQ,15671
|
|
221
|
+
rom24_quickmud_python-2.9.10.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
222
|
+
rom24_quickmud_python-2.9.10.dist-info/entry_points.txt,sha256=VFru08UQTXZA_CkK-NBjJmWHyEX5a3864fQHjhaojbw,41
|
|
223
|
+
rom24_quickmud_python-2.9.10.dist-info/top_level.txt,sha256=Fk1WPmabIIjp7_iZXLYpbAVqiq7lG7TeAHt30AsOKtQ,4
|
|
224
|
+
rom24_quickmud_python-2.9.10.dist-info/RECORD,,
|
|
File without changes
|
{rom24_quickmud_python-2.9.9.dist-info → rom24_quickmud_python-2.9.10.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{rom24_quickmud_python-2.9.9.dist-info → rom24_quickmud_python-2.9.10.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
{rom24_quickmud_python-2.9.9.dist-info → rom24_quickmud_python-2.9.10.dist-info}/top_level.txt
RENAMED
|
File without changes
|