Date: 2023/02/23 23:08:42 UTC-08:00
Type: Denizen Script
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
healthSystemFlags:
type: world
events:
on player join:
- if <player.has_flag[feeling].not>:
- flag <player> feeling:100
- if <player.has_flag[sanity].not>:
- flag <player> sanity:100
- if <player.has_flag[blood].not>:
- flag <player> blood:100
- if <player.has_flag[physicalDamage].not>:
- flag <player> physicalDamage:0
- if <player.has_flag[internalDamage].not>:
- flag <player> internalDamage:0
- if <player.has_flag[temperature].not>:
- flag <player> temperature:40
- definemap bloodMOVEMENTSPEED:
GENERIC_MOVEMENT_SPEED:
1:
operation: ADD_SCALAR
amount: <element[0].sub[<element[100].sub[<player.flag[blood]>]>].div[200]>
id: 91100000-1000-1000-1000-100000000000
- adjust <player> add_attribute_modifiers:<[bloodMOVEMENTSPEED]>
healthSystemTick:
type: world
events:
on delta time secondly:
- foreach <server.online_players> as:__player:
# Bloodloss
- if <player.flag[blood].round_up> < 100:
- if <player.has_flag[bleeding].not>:
- if <util.random_chance[<player.food_level.add[<player.saturation>].mul[1.5]>]>:
- flag <player> blood:+:1
- else:
- if <util.random_chance[<player.food_level.add[<player.saturation>].mul[1.0]>]>:
- flag <player> blood:+:1
- if <player.has_flag[bleeding]>:
- choose <player.flag[bleeding]>:
- case minor:
- if <util.random_chance[25]>:
- playeffect effect:item_crack special_data:red_wool at:<player.location.add[0,1,0]> offset:0.1,0.33,0.1 quantity:2 velocity:1 data:0.025
- flag <player> blood:-:1
- if <util.random_chance[1]>:
- flag <player> bleeding:!
- case mild:
- if <util.random_chance[50]>:
- playeffect effect:item_crack special_data:red_wool at:<player.location.add[0,1,0]> offset:0.1,0.33,0.1 quantity:4 velocity:1 data:0.05
- flag <player> blood:-:1
- if <util.random_chance[0.5]>:
- flag <player> bleeding:!
- case severe:
- if <util.random_chance[75]>:
- playeffect effect:item_crack special_data:red_wool at:<player.location.add[0,1,0]> offset:0.1,0.33,0.1 quantity:8 velocity:1 data:0.05
- flag <player> blood:-:1
- if <util.random_chance[0.1]>:
- flag <player> bleeding:!
- case lethal:
- playeffect effect:item_crack special_data:red_wool at:<player.location.add[0,1,0]> offset:0.1,0.33,0.1 quantity:16 velocity:1 data:0.075
- flag <player> blood:-:<util.random.int[1].to[2]>
- if <util.random_chance[0.05]>:
- flag <player> bleeding:!
- if <player.flag[blood].round_up> < 0:
- flag <player> blood:0
# Bloodloss Damage
- define blooddamage 0
- if <player.flag[blood].round_up> <= 59 && <player.flag[blood].round_up> >= 50:
- if <util.random_chance[5]>:
- define blooddamage:+:0.05
- if <player.flag[blood].round_up> <= 49 && <player.flag[blood].round_up> >= 40:
- if <util.random_chance[10]>:
- define blooddamage:+:0.05
- if <player.flag[blood].round_up> <= 39 && <player.flag[blood].round_up> >= 30:
- if <util.random_chance[25]>:
- define blooddamage:+:0.05
- if <player.flag[blood].round_up> <= 29 && <player.flag[blood].round_up> >= 20:
- if <util.random_chance[50]>:
- define blooddamage:+:0.05
- if <player.flag[blood].round_up> <= 19 && <player.flag[blood].round_up> >= 10:
- if <util.random_chance[75]>:
- define blooddamage:+:0.05
- if <player.flag[blood].round_up> <= 19 && <player.flag[blood].round_up> >= 10:
- define blooddamage:+:0.05
- if <player.flag[blood].round_up> <= 9 && <player.flag[blood].round_up> >= 5:
- define blooddamage:+:0.1
- if <player.flag[blood].round_up> <= 4 && <player.flag[blood].round_up> >= 1:
- define blooddamage:+:0.2
- if <player.flag[blood].round_up> <= 0:
- define blooddamage:+:0.4
- hurt <player.health_max.mul[<[blooddamage]>]> cause:CUSTOM
# Bloodloss Speed
- definemap bloodMOVEMENTSPEED:
GENERIC_MOVEMENT_SPEED:
1:
operation: ADD_SCALAR
amount: <element[0].sub[<element[100].sub[<player.flag[blood]>]>].div[200]>
id: 91100000-1000-1000-1000-100000000000
- adjust <player> attribute_modifiers:<[bloodMOVEMENTSPEED]>