{
	"name": {
		"text": "Polymorph"
	},
	
	"icon": {
		"type": "texture",
		"texture": "ben_ten:textures/gui/omnitrix/recalibrated_omnitrix_red.png"
	},
	
	"creative_tab": "ben10",
	
	"max_level": 40,
	
	"capsule_color" : 8519680,
	
	"effects": [		
		{
		"type": "skin_change",
        "texture": "ben_ten:textures/models/transformations/inv_polymorph.png"
		},
		{
            "type": "skin_change",
            "texture": "ben_10_addon:textures/models/blank.png",
		  "conditions": [
				{
					"type": "ability_enabled",
					"ability": "puddle",
					"use_key": true
				}
			]
		},
		{
            "type": "skin_overlay",
            "texture": "ben_ten:textures/overlays/glow/inv_polymorph_glow.png",
            "size": 0,
            "glow": true,
		  "conditions": [{
					"type": "ability_enabled",
					"ability": "nopuddle",
					"use_key": true
				}]
		}
	],
	
	"abilities": {
		"inv_timer_polya":{
			"ability": "lucraftcore:command_loop",
			"show_in_bar": false,
			"cooldown": 0,
			"title": {"text":"Timer"},			
			"icon": {"type": "texture",
				"texture": "ben_ten:textures/gui/omnitrix/recalibrated_omnitrix.png"},
			"commands": ["/scoreboard objectives add Omni:Sneak stat.sneakTime",
			"/scoreboard players tag @s[score_Omni:Sneak_min=1] add Sneaking",
			"/scoreboard players tag @s[score_Omni:Sneak=0] remove Sneaking",
			"/scoreboard players set @s[score_Omni:Sneak_min=1] Omni:Sneak 0",
"execute @e[tag=goopyshot] ~ ~ ~ /particle slime ~ ~ ~ 0.1 0.1 0.1 0 120",
"effect @s clear",
"scoreboard objectives add polydisc dummy",
"execute @e[name=polydisc,r=4] ~ ~ ~ scoreboard players add @p[tag=Goopy] polydisc 2",
"execute @s ~ ~ ~ scoreboard players set @e[name=polydisc,r=4] polydisc 2",
"/entitydata @e[name=polydisc,score_polydisc_min=2] {NoGravity:1}",
"/entitydata @e[name=polydisc,score_polydisc_min=1] {NoGravity:0}",
"scoreboard players remove @s[score_polydisc_min=1,r=4] polydisc 1",
"scoreboard players remove @s[score_polydisc_min=3,r=4] polydisc 2",

"scoreboard players tag @s[score_polydisc_min=3] add NoFly",
"scoreboard players tag @s[score_polydisc=0] remove NoFly",

"scoreboard players remove @e[name=polydisc,score_polydisc_min=1,r=4] polydisc 1",
"/execute @s[score_polydisc_min=3] ~ ~ ~ /spreadplayers ~ ~ 4 5 false @e[name=polydisc,r=4]",
"tp @e[name=polydisc,r=4] @s",
"execute @s[tag=!puddle] ~ ~ ~ tp @e[name=polydisc,r=4,score_polydisc_min=1] ~ ~2.0 ~",
"execute @s[tag=puddle] ~ ~ ~ tp @e[name=polydisc,r=4,score_polydisc_min=1] ~ ~1.0 ~",
"/entitydata @e[name=polydisc,score_polydisc_min=1] {NoGravity:0}",
"/entitydata @e[name=polydisc,score_polydisc_min=2] {NoGravity:1}",

"sizechange @s[tag=!puddle] 1 pymtech:pym_particles",
"sizechange @s[tag=puddle] 0.5 pymtech:pym_particles",
"/scoreboard players tag @s[score_polydisc_min=1] remove puddle",
"/scoreboard players tag @s[score_polydisc=0] add puddle",

"/scoreboard players tag @s[score_polydisc_min=1] add nopuddle",
"/scoreboard players tag @s[score_polydisc=0] remove nopuddle",

"effect @s[score_polydisc_min=1] slowness 0",
"effect @s[score_polydisc=0] slowness 1 3 true",
"/particle blockcrack ~ ~ ~ 0.5 0.1 0.5 0 250 normal @s[score_polydisc=0] 165",


			"/scoreboard players tag @s[score_Timer=12000,score_Timer_min=12000,tag=!MasterControl] remove Goopy",
			"execute @s[score_Timer=11999,score_Timer_min=11999,tag=!MasterControl] ~ ~ ~ kill @e[name=polydisc,r=5]",

"scoreboard players add @s Timer 1",
			"clear @s ben_10_addon_af:dial_goop_chest",
			"clear @s ben_10_addon_af:dial_goop_iv_chest",
			"scoreboard players add @s[score_Timer=12000,score_Timer_min=12000,tag=!MasterControl] NoArmor 1",
			"replaceitem entity @s[score_Timer=11998,score_Timer_min=0] slot.armor.head ben_ten:u_invis_suit_helmet 1 0 {ench:[{id:10,lvl:1},{id:71,lvl:1}]}",
			"replaceitem entity @s[score_Timer=11998,score_Timer_min=0] slot.armor.chest ben_ten:u_invis_suit_chest 1 0 {ench:[{id:10,lvl:1},{id:71,lvl:1}]}",
			"replaceitem entity @s[score_Timer=11998,score_Timer_min=0] slot.armor.legs ben_ten:u_invis_suit_legs 1 0 {ench:[{id:10,lvl:1},{id:71,lvl:1}]}",
			"replaceitem entity @s[score_Timer=11998,score_Timer_min=0] slot.armor.feet ben_ten:u_invis_suit_boots 1 0 {ench:[{id:10,lvl:1},{id:71,lvl:1}]}",
			"replaceitem entity @s[tag=MasterControl] slot.armor.head ben_ten:u_invis_suit_helmet 1 0 {ench:[{id:10,lvl:1},{id:71,lvl:1}]}",
			"replaceitem entity @s[tag=MasterControl] slot.armor.chest ben_ten:u_invis_suit_chest 1 0 {ench:[{id:10,lvl:1},{id:71,lvl:1}]}",
			"replaceitem entity @s[tag=MasterControl] slot.armor.legs ben_ten:u_invis_suit_legs 1 0 {ench:[{id:10,lvl:1},{id:71,lvl:1}]}",
			"replaceitem entity @s[tag=MasterControl] slot.armor.feet ben_ten:u_invis_suit_boots 1 0 {ench:[{id:10,lvl:1},{id:71,lvl:1}]}",
			"replaceitem entity @s[score_NoArmor=1,score_NoArmor_min=1] slot.armor.head air",
			"replaceitem entity @s[score_NoArmor=1,score_NoArmor_min=1] slot.armor.chest air",
			"replaceitem entity @s[score_NoArmor=1,score_NoArmor_min=1] slot.armor.legs air",
			"replaceitem entity @s[score_NoArmor=1,score_NoArmor_min=1] slot.armor.feet air",
			"execute @s[score_Timer_min=12000,tag=!MasterControl] ~ ~ ~ /superpower @s ben_10_addon_af:recal_omnitrix_timedout", 
			"execute @s[score_Timer_min=12000,tag=!MasterControl] ~ ~ ~ particle fallingdust ~ ~1.2 ~ 0.3 0.4 0.3 0 3000 force @a 0152", 
			"execute @s[score_Timer=12000,score_Timer_min=12000,tag=!MasterControl] ~ ~ ~ /playsound ben_ten:recalibrated_detransform master @a ~ ~ ~",
			"superpower @s[score_DoD=1,score_DoD_min=1] ben_10_addon_af:recal_omnitrix",
			"scoreboard players set @s[score_DoD_min=1] DoD 0"], 
			"hidden": true
		},
	"add goopy": {
		"ability": "lucraftcore:command_on_gain",
		"show_in_bar": false,
		"title": {"translate":"Goopy Body"},
		"bar_color": "light_gray",
		"commands": ["/scoreboard players set @s polydisc 1","/scoreboard players tag @s add Goopy", "/summon minecraft:armor_stand ~ ~2.0 ~ {CustomName:\"polydisc\",Small:1,Invisible:1,NoGravity:1}","replaceitem entity @e[name=polydisc] slot.armor.head ben_10_addon_af:goop_disc_chest 1 0 {ench:[{id:10,lvl:1},{id:71,lvl:1}]}"]
	},
	"Goopy shot": {
        		"ability": "lucraftcore:energy_blast",
			"cooldown": 15,
			"damage": 8.0,
			"bar_color": "green",
			"icon": { "type": "texture", "texture": "ben_ten:textures/gui/powers/slime_shot.png" },
			"title": {"text":"Slime Projectile"},
			"play_sound": false,
			"invisible": true

		},
        "Goopy shot com": {
			"ability": "lucraftcore:command",
			"show_in_bar": false,
			"title": {"translate":"Goopy shot com"},
			"parent_ability": "Goopy shot",
			"commands": ["scoreboard players tag @e[type=lucraftcore:energy_blast,r=2] add goopyshot",
			"superpowerxp 10 @s"]
		},
	"Goopy phase": {
        		"ability": "lucraftcore:energy_blast",
			"cooldown": 20,
			"damage": 0.0,
			"bar_color": "green",
			"icon": { "type": "texture", "texture": "ben_ten:textures/gui/powers/poly_phasing.png" },
			"title": {"text":"Seep Through Gaps"},
			"play_sound": false,
			"invisible": true

		},
		"wall phase": {
			"ability": "speedsterheroes:phasing",
			"parent_ability": "Goopy phase",
			"show_in_bar": false,
			"cooldown": 1,
			"icon": { "type": "texture", "texture": "ben_ten:textures/gui/powers/poly_phasing.png" },
			"title": {"translate":"Seep Through Gaps"},
			"bar_color": "green"
		},
		"polymorph puddle": {
			"ability": "lucraftcore:command_toggle",
			"cooldown": 0,
			"show_in_bar": true,
			"title": {"text":"Polymorph Puddle"},
			"icon": { "type": "texture", "texture": "ben_ten:textures/gui/powers/polymorph_flight.png" },
			"bar_color": "green",
			"commands": [
"effect @e[r=2] poison 1 1 true",
"effect @s[r=2] poison 0 0",
"/scoreboard players tag @s add puddle",
"/scoreboard players tag @s remove nopuddle",
"/particle blockdust ~ ~ ~ 0.4 0.2 0.4 0 250 normal @s 165"],
			"conditions": [{"type": "lucraftcore:not",
					"conditions": [{"type": "lucraftcore:potion_weakness",
							"potion": "NoFly"}]}]
		},
		"speed swimmingdf": {
			"ability": "lucraftcore:flight",
			"required_ability": "polymorph puddle",
			"cooldown": 0,
			"icon": { "type": "texture", "texture": "ben_ten:textures/gui/powers/inv_poly_flight.png" },
			"show_in_bar": true,
			"title": {"text":"Slime Flight"},
			"bar_color": "green",				
			"speed": 1.9,
			"sprint_speed": 1.9,
			"rotate_arms": false
		},
		"invselector_poly": {	
	        "ability": "lucraftcore:command",		
			"cooldown": 0,
            "show_in_bar": true,	
            "title": {"text":"Selector"},
			"icon": { "type": "texture", "texture": "ben_ten:textures/gui/omnitrix/recalibrated_omnitrix_red.png" },
            "bar_color": "red",				
			"commands": ["/superpower @s ben_ten:inv_polymorph_selector"],
			"conditions": [{
             	 	"type": "lucraftcore:scoreboard_tag",
              		"tag": "Sneaking"}]
		},
		"invdetransform_poly": {	
	        "ability": "lucraftcore:command",		
			"cooldown": 0,
            "show_in_bar": true,	
            "title": {"text":"Detransform"},
			"icon": { "type": "texture", "texture": "ben_ten:textures/gui/omnitrix/recalibrated_omnitrix.png" },
            "bar_color": "green",				
			"commands": ["replaceitem entity @s slot.armor.head air",
			"replaceitem entity @s slot.armor.chest air",
			"replaceitem entity @s slot.armor.legs air",
			"replaceitem entity @s slot.armor.feet air",
			"scoreboard players set @s NoArmor 0",
			"/superpower @s ben_10_addon_af:recal_omnitrix",
			"playsound ben_ten:recalibrated_detransform player @a ~ ~ ~",
			"particle fallingdust ~ ~1.2 ~ 0.3 0.4 0.3 0 3000 force @a 0152",
			"/scoreboard players tag @s remove Goopy",
			"kill @e[name=polydisc,r=5]"],
			"conditions": [{"type": "lucraftcore:not",
 			"conditions": [{
             	 	"type": "lucraftcore:scoreboard_tag",
              		"tag": "Sneaking"}]}]
		},
		"puddle": {
			"ability": "lucraftcore:fall_resistance",
			"title": {"translate":"Puddle Form"},
			"amount": 0,
 			"conditions": [{
             	 	"type": "lucraftcore:scoreboard_tag",
              		"tag": "puddle"}]
		},
		"nopuddle": {
			"ability": "lucraftcore:fall_resistance",
			"title": {"translate":"Puddle Form"},
			"amount": 0,
 			"conditions": [{
             	 	"type": "lucraftcore:scoreboard_tag",
              		"tag": "nopuddle"}]
		},
		"regeneration_poly": {
			"ability": "lucraftcore:healing",
			"show_in_bar": false,
			"title": {"text":"regeneration"},
			"icon": { "type": "internal" },
			"bar_color": "light_gray",
			"amount": 4.0,
			"frequency": 10
		},
		"water breathing": {
			"ability": "lucraftcore:water_breathing",
			"show_in_bar": false,
			"title": {"text":"Water Breathing"},
			"icon": { "type": "internal" }
		},
		"fire resistance": {
			"ability": "lucraftcore:fire_resistance"
		},
		"enhanced strength": {	
			"ability": "lucraftcore:strength",				
            "show_in_bar": false,		
            "title": {"text":"Enhanced Strength"},							
			"amount": 8,
			"operation": 0,
			"uuid": "7d706001-8484-44fd-8fe3-ae93e2efe315"	
		},
		"defense": {
			"ability": "lucraftcore:resistance",			
            "show_in_bar": false,		
            "title": {"text":"Durability"},						
			"amount": 4,
			"operation": 0,
			"uuid": "8e327f4a-2a25-457f-82b9-03b5b6f17118"
		},
		"fall resistance": {
			"ability": "lucraftcore:fall_resistance",
			"show_in_bar": false,
			"title": {"text":"Fall Resistance"},
			"amount": 999,
			"operation": 0,
			"uuid": "d22e1d91-2a5c-488f-a9ec-df4a577987e8"
		},
		"slime projectile XP": {
            "ability": "lucraftcore:command",
            "cooldown": 0,
			"parent_ability": "slime projectile",
            "show_in_bar": false,
            "title": {"text":"Slime Projectile XP"},
            "icon": { "type": "internal" },
            "bar_color": "light_gray",
            "conditions": [{
			    "type": "ability_enabled",
				"ability": "lucraftcore:energy_blast"}],
		    "commands": ["/superpowerxp 2 @s"],
		    "hidden": true
		},
		"slime combat XP": {
            "ability": "lucraftcore:command",
            "cooldown": 0,
			"parent_ability": "slime combat",
            "show_in_bar": false,
            "title": {"text":"Slime Combat XP"},
            "icon": { "type": "internal" },
            "bar_color": "light_gray",
            "conditions": [{
			    "type": "ability_enabled",
				"ability": "lucraftcore:potion_punch"}],
		    "commands": ["/superpowerxp 5 @s"],
		    "hidden": true
		},
		"leaping XP": {
			"ability": "lucraftcore:command",
			"cooldown": 0,
			"parent_ability": "polymorph leaping",
			"show_in_bar": false,
			"title": {"text":"Leaping XP"},
			"icon": { "type": "internal" },
			"bar_color": "light_gray",
			"conditions": [{
				"type": "ability_enabled",
				"ability": "lucraftcore:slowfall"}],
			"commands": ["/superpowerxp 3 @s"],
			"hidden": true
		}
	}
}