-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6f3470c
commit f4a901c
Showing
9 changed files
with
80 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 1 addition & 11 deletions
12
data/cchesed/functions/bft/items/phantom/phantom_100t.mcfunction
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1 @@ | ||
execute if entity @p[distance=120..] run kill @s | ||
|
||
# execute store result score @s cc.ft.dx run data get entity @s Motion[0] 1000 | ||
# execute store result score @s cc.ft.dy run data get entity @s Motion[1] 1000 | ||
# execute store result score @s cc.ft.dz run data get entity @s Motion[2] 1000 | ||
|
||
# scoreboard players operation @s cc.ft.temp = @s cc.ft.dx | ||
# scoreboard players operation @s cc.ft.temp += @s cc.ft.dy | ||
# scoreboard players operation @s cc.ft.temp += @s cc.ft.dz | ||
|
||
# scoreboard players reset @s cc.ft.temp | ||
execute if entity @p[distance=120..] run kill @s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
execute store result entity @s Motion[0] double 0.0000012 run data get entity @s Motion[0] 1000000 | ||
execute store result entity @s Motion[1] double 0.0000012 run data get entity @s Motion[1] 1000000 | ||
execute store result entity @s Motion[2] double 0.0000012 run data get entity @s Motion[2] 1000000 | ||
|
||
# Final Multiplier = Target Damage / Initial Damage / Speed Multiplier | ||
# Target Damage: 2.4 | ||
# Power I → Damage: 3.0 | ||
# Speed Multiplier: 1.2 | ||
# Final Multiplier: 0.6666666667 | ||
|
||
execute store result entity @s damage double 0.000000006666666667 run data get entity @s damage 100000000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
execute store result entity @s Motion[0] double 0.0000015 run data get entity @s Motion[0] 1000000 | ||
execute store result entity @s Motion[1] double 0.0000015 run data get entity @s Motion[1] 1000000 | ||
execute store result entity @s Motion[2] double 0.0000015 run data get entity @s Motion[2] 1000000 | ||
|
||
# Target Damage: 2.65 | ||
# Power II → Damage: 3.5 | ||
# Speed Multiplier: 1.5 | ||
# Final Multiplier: 0.5047619048 | ||
|
||
execute store result entity @s damage double 0.000000005047619048 run data get entity @s damage 100000000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
execute store result entity @s Motion[0] double 0.0000019 run data get entity @s Motion[0] 1000000 | ||
execute store result entity @s Motion[1] double 0.0000019 run data get entity @s Motion[1] 1000000 | ||
execute store result entity @s Motion[2] double 0.0000019 run data get entity @s Motion[2] 1000000 | ||
|
||
# Target Damage: 2.9 | ||
# Power III → Damage: 4.0 | ||
# Speed Multiplier: 1.9 | ||
# Final Multiplier: 0.3815789474 | ||
|
||
execute store result entity @s damage double 0.000000003815789474 run data get entity @s damage 100000000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
execute store result entity @s Motion[0] double 0.0000024 run data get entity @s Motion[0] 1000000 | ||
execute store result entity @s Motion[1] double 0.0000024 run data get entity @s Motion[1] 1000000 | ||
execute store result entity @s Motion[2] double 0.0000024 run data get entity @s Motion[2] 1000000 | ||
|
||
# Target Damage: 3.15 | ||
# Power IV → Damage: 4.5 | ||
# Speed Multiplier: 2.4 | ||
# Final Multiplier: 0.28 | ||
|
||
execute store result entity @s damage double 0.000000002916666667 run data get entity @s damage 100000000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
execute store result entity @s Motion[0] double 0.000003 run data get entity @s Motion[0] 1000000 | ||
execute store result entity @s Motion[1] double 0.000003 run data get entity @s Motion[1] 1000000 | ||
execute store result entity @s Motion[2] double 0.000003 run data get entity @s Motion[2] 1000000 | ||
|
||
# Target Damage: 3.4 | ||
# Power V → Damage: 5.0 | ||
# Speed Multiplier: 3 | ||
# Final Multiplier: 0.2266666667 | ||
|
||
execute store result entity @s damage double 0.000000002266666667 run data get entity @s damage 100000000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,16 @@ | ||
# Get power level | ||
execute store result score @s cc.ft.power run data get entity @s damage 10 | ||
|
||
# Get actual power value | ||
scoreboard players operation @s cc.ft.power -= .25 cc.const | ||
scoreboard players operation @s cc.ft.power /= .5 cc.const | ||
|
||
# Cap at Power V | ||
execute if score @s cc.ft.power matches 6.. run scoreboard players set @s cc.ft.power 5 | ||
|
||
|
||
# # Add bonus damage mult from power level | ||
scoreboard players operation .bonus cc.ft.power = @s cc.ft.power | ||
scoreboard players operation .bonus cc.ft.power *= .5 cc.const | ||
|
||
# ------------------------------ Get multiplier ------------------------------ # | ||
|
||
scoreboard players operation @s cc.ft.power *= .4 cc.const | ||
# At least have 10, because that's the store result offset | ||
scoreboard players operation @s cc.ft.power += .10 cc.const | ||
|
||
|
||
# -------------------------- init damage/power value ------------------------ # | ||
# Set base power of 2.0 | ||
scoreboard players operation .damage cc.ft.power = .2250 cc.const | ||
scoreboard players operation .damage cc.ft.power /= @s cc.ft.power | ||
|
||
scoreboard players operation .damage cc.ft.power += .bonus cc.ft.power | ||
|
||
# data modify entity @s damage set value 1.0 | ||
execute store result entity @s damage double .01 run scoreboard players get .damage cc.ft.power | ||
|
||
# --------------------------- apply score to motion -------------------------- # | ||
|
||
# Transfer scores | ||
execute store result score @s cc.ft.dx run data get entity @s Motion[0] 1000000 | ||
execute store result score @s cc.ft.dy run data get entity @s Motion[1] 1000000 | ||
execute store result score @s cc.ft.dz run data get entity @s Motion[2] 1000000 | ||
|
||
scoreboard players operation @s cc.ft.dx *= @s cc.ft.power | ||
scoreboard players operation @s cc.ft.dy *= @s cc.ft.power | ||
scoreboard players operation @s cc.ft.dz *= @s cc.ft.power | ||
# Early return on non-player arrows | ||
execute on origin if entity @s[type=!player] run return fail | ||
|
||
# # Get power level | ||
execute store result score @s cc.ft.power run data get entity @s damage 10 | ||
|
||
# Cap maximum | ||
# execute if score @s cc.ft.dx matches 2147483647.. run scoreboard players set @s cc.ft.dx 2147483647 | ||
# execute if score @s cc.ft.dy matches 2147483647.. run scoreboard players set @s cc.ft.dy 2147483647 | ||
# execute if score @s cc.ft.dz matches 2147483647.. run scoreboard players set @s cc.ft.dz 2147483647 | ||
# Default arrow damage | ||
execute if score @s cc.ft.power matches 20 run return fail | ||
|
||
# execute if score @s cc.ft.dx matches -2147483648 run scoreboard players set @s cc.ft.dx -2147483648 | ||
# execute if score @s cc.ft.dy matches -2147483648 run scoreboard players set @s cc.ft.dy -2147483648 | ||
# execute if score @s cc.ft.dz matches -2147483648 run scoreboard players set @s cc.ft.dz -2147483648 | ||
# Tweak Power bows | ||
execute if score @s cc.ft.power matches 30 run return run function cchesed:bft/misc/power/1 | ||
execute if score @s cc.ft.power matches 35 run return run function cchesed:bft/misc/power/2 | ||
execute if score @s cc.ft.power matches 40 run return run function cchesed:bft/misc/power/3 | ||
execute if score @s cc.ft.power matches 45 run return run function cchesed:bft/misc/power/4 | ||
execute if score @s cc.ft.power matches 50.. run return run function cchesed:bft/misc/power/5 | ||
|
||
# store motion | ||
execute store result entity @s Motion[0] double .0000001 run scoreboard players get @s cc.ft.dx | ||
execute store result entity @s Motion[1] double .0000001 run scoreboard players get @s cc.ft.dy | ||
execute store result entity @s Motion[2] double .0000001 run scoreboard players get @s cc.ft.dz |