dofile("script/layouts/room2_defaults.lua")
dofile("script/shifts/shift2_5_animations.lua")

levelDesc.name = "Shift 2.5"
levelDesc.levelId = 25
levelDesc.musicMood = "2"
levelDesc.trigger =
{
	class = "TriggerSystem",
	triggers =
	{
		{ trigger = "spawn", delay=1, hearts=1, diseaseDesc = { class="Disease", steps={"PILLS2", "XRAY_MINIGAME", "GERM_MATCH"} } },
		{ trigger = "spawn", delay=8000, hearts=1, diseaseDesc = { class="Disease", steps={"XRAY", "GIVE_BLOOD"} } },
		{ trigger = "spawn", delay=6000, hearts=3, diseaseDesc = { class="Disease", steps={"PUT_ON_CREAM",} } },
		{ trigger = "spawn", delay=8000, hearts=1, diseaseDesc = { class="Disease", steps={"XRAY", "GIVE_BLOOD"} } },
		{ trigger = "spawn", delay=20000, hearts=1, diseaseDesc = { class="Disease", steps={"PILLS1", "PILLS2", "XRAY_MINIGAME", "GERM_MATCH"} } },
		{ trigger = "spawn", delay=6000, hearts=1, diseaseDesc = { class="Disease", steps={"XRAY", "GIVE_BLOOD"} } },
		{ trigger = "spawn", delay=8000, hearts=1, diseaseDesc = { class="Disease", steps={"PILLS3", "PUT_ON_CREAM",} } },
		{ trigger = "spawn", delay=25000, hearts=2, diseaseDesc = { class="Disease", steps={"XRAY", "GERM_MATCH"} } },
		{ trigger = "spawn", delay=6000, hearts=2, diseaseDesc = { class="Disease", steps={"XRAY_MINIGAME", "GIVE_BLOOD"} } },
		{ trigger = "spawn", delay=6000, hearts=2, diseaseDesc = { class="Disease", steps={"XRAY_MINIGAME", "GIVE_BLOOD"} } },
		{ trigger = "spawn", delay=20000, hearts=2, diseaseDesc = { class="Disease", steps={"XRAY", "GERM_MATCH"} } },
		{ trigger = "spawn", delay=6000, hearts=1, diseaseDesc = { class="Disease", steps={"PILLS3", "PUT_ON_CREAM",} } },
		{ trigger = "spawn", delay=8000, hearts=1, diseaseDesc = { class="Disease", steps={"XRAY", "GIVE_BLOOD"} } },
		{ trigger = "spawn", delay=15000, hearts=1, diseaseDesc = { class="Disease", steps={"PILLS1", "PILLS2", "XRAY_MINIGAME", "GERM_MATCH"} } },
		{ trigger = "spawn", delay=15000, hearts=1, diseaseDesc = { class="Disease", steps={"XRAY", "GIVE_BLOOD"} } },
		{ trigger = "spawn", delay=10000, hearts=3, diseaseDesc = { class="Disease", steps={"PUT_ON_CREAM",} } },
		{ trigger = "spawn", delay=1000, hearts=1, diseaseDesc = { class="Disease", steps={"XRAY", "GIVE_BLOOD"} } },
	}
}
levelDesc.patientList =
{
	p0 = { weight = 25,
		base = "gran",
	},
	p1 = { weight = 50,
		base = "lady",
	},
	p2 = { weight = 50,
		base = "mother",
	},
	p3 = { weight = 25,
		base = "teen",
	},
	p5 = { weight = 50,
		base = "local_male",
	},
}
levelDesc.eventDesc =
{
 	class="SpecialRoom2",
	eventBarImage = "EVENTBAR_ICON_R2_S5:icons",
	eventBarText = "TEXT_EVENT_SPECIAL2",
	presents = {"PRESENT1", "PRESENT2", "PRESENT3", "PRESENT4", "PRESENT5"},
	doctors = {"connor", "janitor", "robin", "chance", "resident"},
	hideAllObjects = true,
	playIdleAnimations=false,
}

function levelDesc:onInitialized(desc)
	PigRace.initShift(self)
end

function levelDesc:createPostShiftAnimation()
	self:fireTrigger("startEvent")
end

function levelDesc:handleTrigger(trigger, meta)
	CareLevel.handleTrigger(self, trigger, meta)
	if (trigger == "trophy22") then
		player.trophyManager:awardTrophy(22,1)
	end
end