Skip to content

Commit

Permalink
the recluse has been added
Browse files Browse the repository at this point in the history
  • Loading branch information
Flubberschnub committed Oct 9, 2020
1 parent 2b85157 commit 746dae4
Show file tree
Hide file tree
Showing 27 changed files with 387 additions and 4 deletions.
3 changes: 3 additions & 0 deletions data/guns/functions/general/perks/feedingfrenzy.mcfunction
@@ -0,0 +1,3 @@
##feedingfrenzy
scoreboard players remove @a[scores={feedingFrenzy=1..}] feedingFrenzy 1
scoreboard players reset @a[scores={feedingFrenzy=0}] feedingFrenzy
8 changes: 8 additions & 0 deletions data/guns/functions/general/perks/tick.mcfunction
@@ -0,0 +1,8 @@
##perks tick

##unique perks
function guns:graviton/cosmology/main
function guns:recluse/moa

##general perks
function guns:general/perks/feedingfrenzy
2 changes: 2 additions & 0 deletions data/guns/functions/general/recoiloop.mcfunction
Expand Up @@ -4,3 +4,5 @@ execute as @s[nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{
##sunshot
execute as @s[nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{gun:1,sunshot:1}}}] if score @s recoiltimer matches ..11 run function guns:sunshot/decoil
execute as @s[nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{gun:1,sunshot:2}}}] if score @s recoiltimer matches ..11 run function guns:sunshot/decoil
##recluse
execute as @s[nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{gun:1,recluse:1}}}] if score @s recoiltimer matches ..3 run function guns:recluse/decoil
24 changes: 20 additions & 4 deletions data/guns/functions/main.mcfunction
Expand Up @@ -16,13 +16,16 @@ execute as @a[nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{
##graviton
execute as @a[nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{gun:1,graviton:1,ads:1}}}] unless score @s ads matches 1.. run function guns:graviton/adsoff
execute as @a[scores={ads=1..},tag=!reloading,nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{gun:1,graviton:1,ads:0}}}] run function guns:graviton/adson
##recluse
execute as @a[nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{gun:1,recluse:1,ads:1}}}] unless score @s ads matches 1.. run function guns:recluse/adsoff
execute as @a[scores={ads=1..},tag=!reloading,nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{gun:1,recluse:1,ads:0}}}] run function guns:recluse/adson
#execute as @a[tag=ads,nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{gun:1,sunshot:2}}}] unless score @s scope matches 1.. run function guns:sunshot/adsoff
#execute as @a[scores={scope=1..},tag=!ads,tag=!reloading,nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{gun:1,sunshot:1}}}] run function guns:sunshot/adson
scoreboard players reset @a ads
scoreboard players reset @a scope

##perks
function guns:graviton/cosmology/main
function guns:general/perks/tick

##animations
execute as @a[nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{gun:1}}}] run effect give @s mining_fatigue 1 128 true
Expand All @@ -35,13 +38,20 @@ execute as @a[nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{

##shooting
##sunshot
execute as @a[scores={shootgun=1..,magazine=1..},tag=!rpm,tag=!holding,nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{gun:1,sunshot:1}}}] at @s anchored eyes run function guns:sunshot/shoot
execute as @a[scores={shootgun=1..,magazine=1..},tag=!rpm,tag=!reloading,tag=!holding,nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{gun:1,sunshot:1}}}] at @s anchored eyes run function guns:sunshot/shoot
execute as @a[scores={shootgun=1..,magazine=1..},tag=!rpm,tag=!holding,nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{gun:1,sunshot:2}}}] at @s anchored eyes run function guns:sunshot/shoot
execute as @a[scores={shootgun=1..},tag=!rpm,nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{gun:1,sunshot:1}}}] unless entity @s[scores={magazine=1..}] at @s anchored eyes run function guns:sunshot/reload
execute as @a[scores={shootgun=1..},tag=!rpm,nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{gun:1,sunshot:2}}}] unless entity @s[scores={magazine=1..}] at @s anchored eyes run function guns:sunshot/reload
##graviton
execute as @a[scores={shootgun=1..,magazine=1..},tag=!rpm,tag=!holding,nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{gun:1,graviton:1}}}] at @s anchored eyes run function guns:graviton/shoot
execute as @a[scores={shootgun=1..,magazine=1..},tag=!rpm,tag=!holding,tag=!reloading,nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{gun:1,graviton:1}}}] at @s anchored eyes run function guns:graviton/shoot
execute as @a[scores={shootgun=1..},tag=!rpm,nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{gun:1,graviton:1}}}] unless entity @s[scores={magazine=1..}] at @s anchored eyes run function guns:graviton/reload
##recluse
#execute at @a[scores={shootgun=1..,magazine=1..},tag=!reloading,nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{gun:1,recluse:1}}}] run playsound reclusehold master @a[distance=..30] ~ ~ ~ 5
tag @a[tag=shootingrecluse,tag=!rpm] remove shootingrecluse
execute as @a[scores={magazine=1..},tag=!rpm,tag=holding,tag=!reloading,nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{gun:1,recluse:1}}}] at @s anchored eyes run function guns:recluse/shoot
tag @a[tag=!shootingrecluse] remove reclusesound
execute at @a[tag=!shootingrecluse] run stopsound @a[distance=..30,tag=!shootingrecluse] master reclusehold
execute as @a[scores={shootgun=1..},tag=!holding,tag=!rpm,tag=!reloading,nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{gun:1,recluse:1}}}] unless entity @s[scores={magazine=1..}] at @s anchored eyes run function guns:recluse/reload

##recoil constantly runs on timer
execute as @a[scores={recoiltimer=1..}] run function guns:general/recoiloop
Expand All @@ -53,6 +63,8 @@ execute as @a[nbt={Inventory:[{id:"minecraft:carrot_on_a_stick",Slot:-106b,Count
execute as @a[nbt={Inventory:[{id:"minecraft:carrot_on_a_stick",Slot:-106b,Count:1b,tag:{gun:1,sunshot:2}}]}] unless entity @s[nbt={SelectedItem:{}}] run function guns:sunshot/reload
##graviton
execute as @a[nbt={Inventory:[{id:"minecraft:carrot_on_a_stick",Slot:-106b,Count:1b,tag:{gun:1,graviton:1}}]}] unless entity @s[nbt={SelectedItem:{}}] run function guns:graviton/reload
##recluse
execute as @a[nbt={Inventory:[{id:"minecraft:carrot_on_a_stick",Slot:-106b,Count:1b,tag:{gun:1,recluse:1}}]}] unless entity @s[nbt={SelectedItem:{}}] run function guns:recluse/reload

##reload constantly runs on timer
execute as @a[scores={reloadtimer=1..}] run function guns:general/reloadloop
Expand All @@ -63,6 +75,9 @@ execute as @a[nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{
##graviton
execute as @a[nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{gun:1,graviton:1}}},tag=!reloading,scores={magazine=8..}] run title @s actionbar [{"text":"[","color":"dark_gray","italic":false},{"score":{"name":"@s","objective":"magazine"},"color":"dark_purple","italic":false},{"text":"/30]","color":"dark_gray","italic":false}]
execute as @a[nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{gun:1,graviton:1}}},tag=!reloading,scores={magazine=..7}] run title @s actionbar [{"text":"[","color":"dark_gray","italic":false},{"score":{"name":"@s","objective":"magazine"},"color":"dark_red","italic":false},{"text":"/30]","color":"dark_gray","italic":false}]
##recluse
execute as @a[nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{gun:1,recluse:1}}},tag=!reloading,scores={magazine=10..}] run title @s actionbar [{"text":"[","color":"dark_gray","italic":false},{"score":{"name":"@s","objective":"magazine"},"color":"white","italic":false},{"text":"/36]","color":"dark_gray","italic":false}]
execute as @a[nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{gun:1,recluse:1}}},tag=!reloading,scores={magazine=..9}] run title @s actionbar [{"text":"[","color":"dark_gray","italic":false},{"score":{"name":"@s","objective":"magazine"},"color":"dark_red","italic":false},{"text":"/36]","color":"dark_gray","italic":false}]
##sunshot
execute as @a[nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{gun:1,sunshot:1}}},tag=!reloading,scores={magazine=4..}] run title @s actionbar [{"text":"[","color":"dark_gray","italic":false},{"score":{"name":"@s","objective":"magazine"},"color":"gold","italic":false},{"text":"/12]","color":"dark_gray","italic":false}]
execute as @a[nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{gun:1,sunshot:2}}},tag=!reloading,scores={magazine=4..}] run title @s actionbar [{"text":"[","color":"dark_gray","italic":false},{"score":{"name":"@s","objective":"magazine"},"color":"gold","italic":false},{"text":"/12]","color":"dark_gray","italic":false}]
Expand All @@ -75,9 +90,10 @@ execute as @a[nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{

##temporary
scoreboard players remove @a[scores={holdingtimer=1..},nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{gun:1}}}] holdingtimer 1
scoreboard players set @a[scores={shootgun=1},nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{gun:1}}}] holdingtimer 5
scoreboard players set @a[scores={shootgun=1..},nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{gun:1}}}] holdingtimer 5
#execute as @a[scores={holdingtimer=1..}] run say hi
execute as @a[scores={holdingtimer=..0},nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{gun:1}}}] run tag @s remove holding
execute as @a[scores={holdingtimer=1..},nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{gun:1}}}] run tag @s add holding
scoreboard players reset @a[scores={shootgun=1..}] shootgun

##crucible
Expand Down
14 changes: 14 additions & 0 deletions data/guns/functions/recluse/adsoff.mcfunction
@@ -0,0 +1,14 @@
#adsoff
scoreboard players add @s adstimer 1
execute if score @s adstimer matches 1 run replaceitem entity @s[nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{gun:1}}}] weapon.mainhand minecraft:carrot_on_a_stick{display:{Name:'{"text":"The Recluse","color":"dark_red","bold":true,"italic":false}',Lore:['{"text":"\\"My bite will turn your sweet flesh to vile rot.\\"","color":"gray","italic":true}']},Unbreakable:1b,CustomModelData:123,gun:1,recluse:1,ads:0} 1
execute if score @s adstimer matches 2 run replaceitem entity @s[nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{gun:1}}}] weapon.mainhand minecraft:carrot_on_a_stick{display:{Name:'{"text":"The Recluse","color":"dark_red","bold":true,"italic":false}',Lore:['{"text":"\\"My bite will turn your sweet flesh to vile rot.\\"","color":"gray","italic":true}']},Unbreakable:1b,CustomModelData:122,gun:1,recluse:1,ads:0} 1
execute if score @s adstimer matches 3 run replaceitem entity @s[nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{gun:1}}}] weapon.mainhand minecraft:carrot_on_a_stick{display:{Name:'{"text":"The Recluse","color":"dark_red","bold":true,"italic":false}',Lore:['{"text":"\\"My bite will turn your sweet flesh to vile rot.\\"","color":"gray","italic":true}']},Unbreakable:1b,CustomModelData:120,gun:1,recluse:1,ads:0} 1
effect clear @s slowness
tag @s remove ads
execute if score @s adstimer matches 1 at @s run playsound minecraft:recluseadsoff master @s
execute if score @s adstimer matches ..3 as @s[nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{gun:1}}}] run schedule function guns:recluse/scheduleadsoff 1t
execute if score @s adstimer matches 4.. run function guns:general/setmag
execute if score @s adstimer matches 4.. run scoreboard players reset @s adstimer

##setmag
execute as @s run function guns:general/setmag
14 changes: 14 additions & 0 deletions data/guns/functions/recluse/adson.mcfunction
@@ -0,0 +1,14 @@
##adson
scoreboard players add @s adstimer 1
execute if score @s adstimer matches 1 run replaceitem entity @s weapon.mainhand minecraft:carrot_on_a_stick{display:{Name:'{"text":"The Recluse","color":"dark_red","bold":true,"italic":false}',Lore:['{"text":"a pew pew gun"}']},Unbreakable:1b,CustomModelData:122,gun:1,recluse:1,ads:1} 1
execute if score @s adstimer matches 2 run replaceitem entity @s weapon.mainhand minecraft:carrot_on_a_stick{display:{Name:'{"text":"The Recluse","color":"dark_red","bold":true,"italic":false}',Lore:['{"text":"a pew pew gun"}']},Unbreakable:1b,CustomModelData:123,gun:1,recluse:1,ads:1} 1
execute if score @s adstimer matches 3 run replaceitem entity @s weapon.mainhand minecraft:carrot_on_a_stick{display:{Name:'{"text":"The Recluse","color":"dark_red","bold":true,"italic":false}',Lore:['{"text":"a pew pew gun"}']},Unbreakable:1b,CustomModelData:121,gun:1,recluse:1,ads:1} 1
tag @s add ads
effect give @s slowness 1000000 1 true
execute at @s if score @s adstimer matches 1 run playsound minecraft:recluseadson master @s
execute if score @s adstimer matches ..3 run schedule function guns:recluse/scheduleadson 1t
execute if score @s adstimer matches 4.. run function guns:general/setmag
execute if score @s adstimer matches 4.. run scoreboard players reset @s adstimer

##setmag
execute as @s run function guns:general/setmag
8 changes: 8 additions & 0 deletions data/guns/functions/recluse/adsrecoil.mcfunction
@@ -0,0 +1,8 @@
##adsrecoil
##animation ads
execute as @s[scores={recoiltimer=1},nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{gun:1,recluse:1,ads:1}}}] run replaceitem entity @s weapon.mainhand minecraft:carrot_on_a_stick{display:{Name:'{"text":"The Recluse","color":"dark_red","bold":true,"italic":false}',Lore:['{"text":"a pew pew gun"}']},Unbreakable:1b,CustomModelData:126,gun:1,recluse:1,ads:1} 1
execute as @s[scores={recoiltimer=2},nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{gun:1,recluse:1,ads:1}}}] run replaceitem entity @s weapon.mainhand carrot_on_a_stick{display:{Name:'{"text":"The Recluse","color":"dark_red","bold":true,"italic":false}',Lore:['{"text":"My bite will turn your","color":"gray"}','{"text":"sweet flesh to vile rot.","color":"gray"}']},HideFlags:63,Unbreakable:1b,CustomModelData:127,gun:1,recluse:1,ads:1} 1
execute as @s[scores={recoiltimer=3},nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{gun:1,recluse:1,ads:1}}}] run replaceitem entity @s weapon.mainhand carrot_on_a_stick{display:{Name:'{"text":"The Recluse","color":"dark_red","bold":true,"italic":false}',Lore:['{"text":"My bite will turn your","color":"gray"}','{"text":"sweet flesh to vile rot.","color":"gray"}']},HideFlags:63,Unbreakable:1b,CustomModelData:121,gun:1,recluse:1,ads:1} 1

##setmag
execute as @s[nbt={SelectedItem:{id:"minecraft:carrot_on_a_stick",Count:1b,tag:{gun:1,recluse:1,ads:1}}}] run function guns:general/setmag
25 changes: 25 additions & 0 deletions data/guns/functions/recluse/crit.mcfunction
@@ -0,0 +1,25 @@
##nocrit
#execute if score Range shootgun matches ..24 run effect give @e[distance=..1,type=#guns:mobs,type=!#minecraft:undead] instant_damage 1 2 true
#execute if score Range shootgun matches ..24 run effect give @e[distance=..1,type=#guns:mobs,type=#minecraft:undead] instant_health 1 2 true
#execute if score Range shootgun matches 25.. run effect give @e[distance=..1,type=#guns:mobs,type=!#minecraft:undead] instant_damage 1 1 true
#execute if score Range shootgun matches 25.. run effect give @e[distance=..1,type=#guns:mobs,type=#minecraft:undead] instant_health 1 1 true
execute as @s run function aestd1:entity/get_uuid
execute if score Range shootgun matches 0.. run effect give @a[distance=..1,tag=!shooter] instant_damage 1 0 true
execute positioned ~ ~ ~ if entity @e[distance=..1,type=#guns:mobs,scores={hp=..4}] run scoreboard players set Kill shootgun 1
execute positioned ~ ~ ~ if entity @e[distance=..1,type=#aestd1:bosses,scores={hp=..4}] run scoreboard players set Kill shootgun 1
execute if score @s masterOfArms matches 1.. positioned ~ ~ ~ if entity @e[distance=..1,type=#guns:mobs,scores={hp=..6}] run scoreboard players set Kill shootgun 1
execute if score @s masterOfArms matches 1.. positioned ~ ~ ~ if entity @e[distance=..1,type=#aestd1:bosses,scores={hp=..6}] run scoreboard players set Kill shootgun 1
tag @e[distance=..1,type=#guns:mobs] add aestd.damage.hurt_by_player
tag @e[distance=..1,type=#aestd1:bosses] add aestd.damage.hurt_by_player
execute as @e[distance=..1,type=#guns:mobs] run scoreboard players set @s aestd.damage 400
execute as @e[distance=..1,type=#aestd1:bosses] run scoreboard players set @s aestd.damage 400
execute if score @s masterOfArms matches 1.. as @e[distance=..1,type=#guns:mobs] run scoreboard players set @s aestd.damage 600
execute if score @s masterOfArms matches 1.. as @e[distance=..1,type=#aestd1:bosses] run scoreboard players set @s aestd.damage 600
execute as @e[distance=..1,type=#guns:mobs] run function aestd1:entity/damage
execute as @e[distance=..1,type=#aestd1:bosses] run function aestd1:entity/damage
scoreboard players reset @e aestd.damage
tag @e[tag=aestd.damage.hurt_by_player] remove aestd.damage.hurt_by_player
execute positioned ~ ~ ~ if entity @a[distance=..1,tag=!shooter,scores={hp=..2}] run scoreboard players set Kill shootgun 1
execute if score Kill shootgun matches 1 at @s run playsound kill master @s
execute if score Kill shootgun matches 1 positioned ~ ~ ~ run function guns:recluse/kill
scoreboard players reset Kill shootgun
9 changes: 9 additions & 0 deletions data/guns/functions/recluse/decoil.mcfunction
@@ -0,0 +1,9 @@
##decoil
execute as @s[tag=!ads] run function guns:recluse/noadsrecoil
execute as @s[tag=ads] run function guns:recluse/adsrecoil
##timer
scoreboard players add @s[tag=recoil] recoiltimer 1
execute as @s[tag=recoil,scores={recoiltimer=1..4}] at @s run tp @s ~ ~ ~ ~ ~-0.5
execute as @s[scores={recoiltimer=4..}] run function guns:general/setmag
execute as @s[scores={recoiltimer=4..}] run tag @s[tag=recoil] remove recoil
execute as @s[scores={recoiltimer=4..}] run scoreboard players reset @s recoiltimer

0 comments on commit 746dae4

Please sign in to comment.