Date: 2020/05/10 18:26:45 UTC-07: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
ghost_overlay:
type: item
mechanisms:
custom_model_data: 700001
nbt:
- attacklvl/1
- strengthlvl/1
- defenselvl/10
- magiclvl/13
- hitpointslvl/8
- rangelvl/1
material: wooden_sword
ghost:
type: entity
entity_type: zombie
age: adult
age_lock: true
health: <item[ghost_overlay].nbt[hitpointslvl]>
ghost_attack:
type: world
events:
on ghost targets player:
- define entityA:<player>
- define entityB:<context.entity>
- if !<[entityA].has_flag[<[entityB].uuid>]>:
- flag <[entityA]> <[entityB].uuid>
- flag <[entityB]> <[entityB].uuid>
- while <[entityA].has_flag[<[entityB].uuid>]>:
- if !<[entityB].has_flag[<[entityB].uuid>]>:
- stop
- choose <[entityB].formatted_health>:
- case dying:
- attack <[entityB]> target:<[entityA]>
- default:
- inject locally path:ghost_magic_attack
- wait 4s
on player kills ghost:
- if <player.has_flag[<context.entity.uuid>]>:
- flag player <context.entity.uuid>:!
- flag server <context.entity.uuid>:!
on player dies by ghost:
- if <player.has_flag[<context.entity.uuid>]>:
- flag player <context.entity.uuid>:!
on ghost dies:
- if <context.entity.has_flag[<context.entity.uuid>]>:
- flag <context.entity> <context.entity.uuid>:!
ghost_magic_attack:
- define damage:<proc[magic_damage_process].context[<[entityB]>|<[entityA]>]>
- define target:<[entityB].location.above[6]>
- define path1:<[entityB].location.points_between[<[target]>].distance[1]>
- define path2:<[target].points_between[<[entityA].location>].distance[1]>
- foreach <[path1]>:
- wait 1t
- playsound ENTITY_PLAYER_ATTACK_CRIT <player.location> pitch:3
- playeffect redstone <[value]> special_data:1|gray visibility:1000 quantity:15
- playeffect redstone <[value]> special_data:1|green visibility:1000 quantity:200
- playsound ENTITY_GENERIC_BURN <player.location> pitch:3
- foreach <[path2]>:
- define projectile <[value].find.living_entities.within[1.3]>
- playsound ENTITY_PARROT_IMITATE_GHAST <player.location> pitch:-3
- playeffect redstone <[value]> special_data:1|black visibility:1000 quantity:100
- playeffect redstone <[value]> special_data:1|gray visibility:250 quantity:20
- if !<[projectile].is_empty>:
- foreach <[projectile]>:
- if <[value]> == <player>:
- hurt <[damage]> <[entityA]>