Date: 2020/01/25 18:19:17 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
FallDamage:
type: world
debug: false
events:
on player walks:
- define falldamage:<player.fall_distance.mul[1.25]>
- define crushedentities:<context.new_location.find.entities.within[1.32].exclude[<player>]>
- define crushedentities2:<player.location.find.entities.within[1.85].exclude[<player>]>
#- actionbar <[falldamage]>
- if <player.fall_distance> >= 4:
- if <player.location.find.entities.within[1].size> >= 2 && <player.location.find.entities.within[1].size> < 98:
- flag <player> squishing duration:1s
- hurt <[falldamage]> <[crushedentities]> source:<player>
- if <player.fall_distance> >= 98:
- burn <player> duration:50t
- flag <player> squishing duration:1s
- hurt <[falldamage]> <[crushedentities2]> source:<player>
- burn <[crushedentities2]> duration:50t
on entity damaged by fall:
- define falldamage:<context.entity.fall_distance.mul[1.25]>
- define crushedentities:<context.entity.location.find.entities.within[1.32].exclude[<context.entity>]>
- define crushedentities2:<context.entity.location.find.entities.within[1.85].exclude[<context.entity>]>
#- actionbar <[falldamage]>
- if <context.entity.fall_distance> >= 4:
- if <context.entity.location.find.entities.within[1].size> >= 2 && <context.entity.location.find.entities.within[1].size> < 98:
- flag <context.entity> squishing duration:1s
- hurt <[falldamage]> <[crushedentities]> source:<context.entity>
- if <context.entity.fall_distance> >= 98:
- burn <context.entity> duration:250t
- flag <context.entity> squishing duration:1s
- hurt <[falldamage]> <[crushedentities2]> source:<context.entity>
- burn <[crushedentities2]> duration:250t
on entity dies:
- if <context.cause||null> == ENTITY_ATTACK && <context.damager.has_flag[squishing]||false> != false:
#- announce yeet
- flag <player> squishing:!
#- announce "<&d><context.entity.name> was squished by <context.damager.name>"
- determine "<context.entity.name> was squished by <context.damager.name>"