sorcery  Artifact [91c2fdbd59]

Artifact 91c2fdbd597a7c100a6ffb98547b869626c9ffd55c23296e8f1a5716eefda9c8:


return {
	-- survival
	regen = {
		name = 'Regeneration';
		color = {243,106,44};
		style = 'sparkle';
		desc = "A potion that amps up your body's natural\nhealing abilities, causing you to heal rapidly\neven if you're starving";
		infusion = 'sorcery:blood';
		basis = 'sorcery:potion_luminous';
		duration = function(self,meta)
			return 10 + meta:get_int('duration')*2
		end;
		quals = { force = true, duration = true };
		effect = function(self, user, proto)
			local meta = self:get_meta()
			local force = 1 + meta:get_int('force')
			late.new_effect(user, {
				duration = proto:duration(meta);
				raise = 4; fall = 4;
				impacts = {
					damage = {0-force, 0.5};
				};
			})
		end;
	};
	waterbreathing = {
		name = 'Waterbreathing';
		color = {79,228,243}; style = 'sparkle';
		basis = 'sorcery:potion_luminous';
		desc = "Conserve your precious supply of oxygen when diving down into the ocean's depths";
		infusion = 'sorcery:extract_kelp';
		duration = function(self,meta)
			return 20 + meta:get_int('duration')*30
		end;
		quals = { force = true, duration = true };
		effect = function(self,user,proto)
			local meta = self:get_meta()
			local force = 1 + 2 * (meta:get_int('force'))
			late.new_effect(user, {
				duration = proto:duration(meta);
				raise = 2; fall = 5;
				impacts = {
					breath = {1 * force, 5}
				};
			})
		end;
	};
	heal = {
		name = 'Healing';
		color = {243,44,58};
		style = 'sparkle';
		quals = { force = true };
		desc = 'This blood-red liquid glitters with an enchantment that rapidly knits torn flesh and broken bones';
		infusion = 'sorcery:oil_sanguine';
		basis = 'sorcery:potion_luminous';
		effect = function(self, user)
			local meta = self:get_meta()
			user:set_hp(user:get_hp() + (2 * (2 + meta:get_int('force'))))
		end;
	};

	-- status effects

	stealth = {
		name = 'Stealth';
		color = {184,106,224}; style = 'sparkle';
		infusion = 'default:coal_lump';
		basis = 'sorcery:potion_soft';
		desc = 'Drinking this dark, swirling draught will shelter you from the power of mortal perception for a time, even rendering you entirely invisible at full strength.';
		quals = { force = true, duration = true };
		duration = function(self,meta)
			return 30 + meta:get_int('duration')*30
		end;
		effect = function(self,user,proto)
			local meta = self:get_meta()
			local force = 1 + 1 * (meta:get_int('force'))
			local opacity = 1.0 - (1.0 * (force / 4)) 
			late.new_effect(user, {
				duration = proto:duration(meta);
				raise = 10; fall = 15;
				impacts = {
					texture = { nil, opacity };
					nametag = { nil, opacity };
				};
			})
		end;
	};
	nightsight = {
		name = 'Nightsight';
		color = {91,0,200}; style = 'sparkle';
		desc = 'While this potion flows through your veins, your vision will be strengthened against the darkness of the night';
		maxforce = 3;
		infusion = 'sorcery:oil_dawn';
		basis = 'sorcery:potion_soft';
		quals = { force = true, duration = true };
		duration = function(self,meta)
			return 50 + meta:get_int('duration')*70
		end;
		effect = function(self,user,proto)
			--TODO ensure it can only be drunk at night
			--TODO ensure it can't last more than one night
			local meta = self:get_meta()
			local force = 0.3 * (1+meta:get_int('force'))
			late.new_effect(user, {
				duration = proto:duration(meta);
				raise = 15; fall = 30;
				impacts = {
					daylight = force;
				};
			})
		end;
	};
	antigravity = {
		name = 'Antigravity';
		color = {240,59,255}; style = 'sparkle';
		desc = 'Loosen the crushing grip of the earth upon your tender mortal form with a few sips from this glittering phial';
		infusion = 'sorcery:oil_stone';
		basis = 'sorcery:potion_soft';
		quals = { force = true, duration = true };
		duration = function(self,meta)
			return 20 + meta:get_int('duration')*25
		end;
		effect = function(self,user,proto)
			local meta = self:get_meta()
			local force = 1 - 0.3 * (meta:get_int('force') + 1)
			late.new_effect(user, {
				duration = proto:duration(meta);
				raise = 2; fall = 15;
				impacts = {
					gravity = force;
				};
			})
		end;
	};
	gale = {
		name = 'Gale';
		color = {187,176,203};
		desc = 'Move and strike with the speed of a hurricane as this enchanted fluid courses through your veins';
		infusion = 'sorcery:grease_storm';
		basis = 'sorcery:potion_soft';
		quals = { force = true, duration = true };
		duration = function(self,meta)
			return 10 + meta:get_int('duration')*15
		end;
		effect = function(self,user,proto)
			local meta = self:get_meta()
			local force = 2 + 0.7 * (meta:get_int('force'))
			late.new_effect(user, {
				duration = proto:duration(meta);
				raise = 5; fall = 5;
				impacts = {
					speed = force;
				};
			})
		end;
	};
	obsidian = {
		name = 'Obsidian';
		infusion = 'default:obsidian_shard';
		color = {76,0,121}; style = 'sparkle';
		desc = 'Walk untroubled through volleys of arrows and maelstroms of swinging blades, for all will batter uselessly against skin protected by spellwork mightier than the doughtiest armor';
		infusion = 'default:obsidian_shard';
		basis = 'sorcery:potion_luminous';
		quals = { duration = true };
		duration = function(self,meta)
			return 5 + meta:get_int('duration')*7
		end;
	};
	lavabreathing = {
		name = 'Lavabreathing';
		color = {243,118,79}; style = 'sparkle'; glow = 12;
		basis = 'sorcery:potion_soft';
		desc = "Wade through seas of roiling lava as easily as though it were but a babbling brook";
		quals = { duration = true };
	};
	-- mighty = {
	-- 	name = 'Mighty';
	-- 	color = {255,0,119}; style = 'sparkle'; glow = 5;
	-- 	infusion = 'sorcery:grease_war';
	-- 	basis = 'sorcery:potion_soft';
	-- 	desc = 'Amplify the power of your blows and crack steel armor with the force of your bare hands';
	-- };
	resilient = {
		name = 'Resilient';
		color = {124,124,124}; style = 'dull';
		infusion = 'sorcery:liquid_sap_pine_bottle';
		basis = 'sorcery:potion_soft';
		desc = 'Withstand greater damage and hold your ground even in face of tremendous force';
		quals = { force = true, duration = true };
	};
	hover = {
		name = 'Hover';
		color = {164,252,55}; style = 'sparkle';
		desc = 'Rise into the air for a time and stay there until the potion wears off';
		basis = 'sorcery:potion_soft';
		quals = { force = true, duration = true };
	}; 
	flight = {
		name = 'Flight';
		color = {143,35,255}; style = 'sparkle';
		desc = 'Free yourself totally from the shackles of gravity and soar through the air however you should will';
		basis = 'sorcery:potion_soft';
		infusion = 'sorcery:grease_lift';
		quals = { duration = true };
		duration = function(self,meta)
			return 40 + meta:get_int('duration')*55
		end;
		effect = function(self,user,proto)
			late.new_effect(user, {
				duration = proto:duration(self:get_meta());
				impacts = {
					fly = 1;
				};
			})
		end;
	};
	leap = {
		name = 'Leap';
		color = {164,252,55};
		desc = 'Soar high into the air each time you jump (but may risk damage if used without a Feather Potion)';
		infusion = 'sorcery:oil_wind';
		basis = 'sorcery:potion_soft';
		quals = { force = true, duration = true };
		duration = function(self,meta)
			 return 5 + meta:get_int('duration')*7
		end;
		effect = function(self,user,proto)
			local meta = self:get_meta()
			local force = 2 + (0.5 * meta:get_int('force'))
			late.new_effect(user, {
				duration = proto:duration(meta);
				fall = 3;
				impacts = {
					jump = force;
				};
			})
		end
	};
}