Date: 2020/05/06 22:31:50 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
firespell_path:
type: task
script:
- playeffect flame <player.location> visibility:100 quantity:<[particleamount]>
- playeffect redstone <player.location> special_data:1|blue visibility:1000 quantity:<[particleamount]>
- foreach <[path]>:
- wait 1t
- define projectile <[value].find.living_entities.within[<[size]>]>
- playsound ENTITY_ILLUSIONER_CAST_SPELL <player.location> pitch:<[soundpitch]>
- playeffect redstone <[value].simple.as_location> special_data:1|orange visibility:1000 quantity:<[particleamount]>
- playeffect redstone <[value].simple.as_location> special_data:1|red visibility:250 quantity:<[particleamount]>
#if true this is a direct hit and will stop the projectile mid flight at <[value]> location
- if !<[projectile].is_empty>:
- define directhit:true
#redefines the target to the location of where the projectile stopped
- define target:<[value]>
#puts directly impacted entities into list
- foreach <[projectile]>:
- if <[direct_entities]> == null:
- define direct_entities:<-:null
- define direct_entities:->:<[value]>
- playeffect flame <[target]> visibility:100 quantity:<[particleamount]> offset:<[offset]>
- inject firespell_listener
- playeffect flame <[target]> visibility:100 quantity:<[particleamount]> offset:<[offset]>
- inject firespell_listener
firespell_listener:
type: task
script:
#list each entity near projectile hit
- define near_entities <[target].find.living_entities.within[10]>
#filters out the directly impacted entities if any exist
- foreach <[near_entities]>:
- define check <[value]>
- if <[directhit]>:
- foreach <[direct_entities]>:
- if <[value]> == <[check]>:
- define near_entities:<-:<[value]>
#debug
- narrate "<[near_entities]>"
- narrate "-------------------------------------------------------"
- narrate "<[direct_entities]>"
#runs through damage_process task for each entity
- if <[direct_entities]> != null:
- foreach <[direct_entities]>:
- narrate <[loop_index]>
- define entityB:<[value]>
- define is_near:false
- define is_direct:true
- burn <[value]> duration:<[burnbonus]>s
- narrate "<&4><&l>You are burnt horrendously!" targets:<[value]>
- inject damage_process
- if !<[near_entities].is_empty>:
- foreach <[near_entities]>:
- narrate <[loop_index]>
- define entityB:<[value]>
- define is_direct:false
- define is_near:true
- burn <[value]> duration:<[burntime]>s
- narrate "<&6><&l>Fire swells your surroundings!" targets:<[value]>
- inject damage_process
- stop