/// <reference path="effects.ts" />
/// <reference path="../_submodules/mood/moodlet.ts" />



setup.getDrug = function(drugId){
	return setup.drugs[drugId];
}

setup.drugs ??= {};
setup.drugs.alcohol = {
	deterioration: 0.0017, //~0.1/h
	effects:{
		littlebuzz:{	condition:{min:0.1,max:0.2},	effect: 'alc_1'},
		tipsy:{			condition:{min:0.2,max:0.6},	effect: 'alc_2'},
		drunk:{			condition:{min:0.6,max:1.2},	effect: 'alc_3'},
		vdrunk:{		condition:{min:1.2,max:2.0},	effect: 'alc_4'},
		wasted:{		condition:{min:2.0},			effect: 'alc_5'},
	},
	byproduct:{
		buildup: 1.5,
		deterioration: 0.0017,
		effects:{
			hangover:{
				condition:{mainEffectsInactive:true},
				effect: 'hangover'
			}
		}
	}
};

setup.effects.hangover = {
	moodlet: 'hangover',
	pain:{
		brain:{hangover:30}
	}
};
setup.effects.alc_1 = {
	sidebar:true,
	desc: 'You feel a little buzz from drinking.',
	image: 'system/icons/status/alko_1.png',
	moodlet: 'alc_1',
	consciousness: 0.95,
	painReduction: 5
}
setup.effects.alc_2 = {
	sidebar:true,
	desc: 'You are feeling a bit tipsy from drinking.',
	image: 'system/icons/status/alko_2.png',
	moodlet: 'alc_2',
	consciousness: 0.75,
	painReduction: 10,
	skills:{
		inhibition: 5
	}
}
setup.effects.alc_3 = {
	sidebar:true,
	desc: 'You are drunk.',
	image: 'system/icons/status/alko_3.png',
	moodlet: 'alc_3',
	consciousness: 0.50,
	painReduction: 15,
	skills:{
		inhibition: 10
	}
}
setup.effects.alc_4 = {
	sidebar:true,
	desc: 'You are very drunk.',
	image: 'system/icons/status/alko_4.png',
	moodlet: 'alc_3',
	consciousness: 0.25,
	painReduction: 20,
	skills:{
		inhibition: 20
	}
}
setup.effects.alc_5 = {
	sidebar:true,
	desc: 'You are wasted.',
	image: 'system/icons/status/alko_4.png',
	moodlet: 'alc_3',
	consciousness: 0.1,
	painReduction: 30,
	skills:{
		inhibition: 30
	}
}

setup.moodletGroups.drugs_pos = new MoodletGroup({
	accumulationMode: 3
});

setup.moodlets.alc_1 = new Moodlet({
	title: "Little Alcohol",
	group: 'drugs_pos',
	description: '',
	effect: 5,
	timeMode: 2
});

setup.moodlets.alc_2 = new Moodlet({
	title: "Some Alcohol",
	group: 'drugs_pos',
	description: '',
	effect: 10,
	timeMode: 2
});

setup.moodlets.alc_3 = new Moodlet({
	title: "Alcohol",
	group: 'drugs_pos',
	description: '',
	effect: 15,
	timeMode: 2
});

setup.moodletGroups.hangover = new MoodletGroup({
	accumulationMode: 2
});

setup.moodlets.hangover = new Moodlet({
	title: "Hangover",
	group: 'hangover',
	description: '',
	effect: -10,
	timeMode: 2
});