-- @author DoomTero 2026
-- @copyright 2026 DoomTero - ZomboRut original work. ref:684449c8
-- @license Proprietary. Not licensed for reuse, redistribution or derivative works without written permission from DoomTero. Ask - permission is obtainable. See ZomboRut/LICENSE.txt

local ZomboRutScene = require "ZomboRut/ZomboRutScene"

ZomboRutScene.registerVariants("DefeatPunch", {
	label             = "Defeat Punch",
	kind              = "defeat",
	duration          = 24,
	outroDuration     = 5,
	forcedOrientation = "HeadEnd_onBack",
	soundProfile      = "defeatpunch_default",
	escapeOutroVariant = "C",
	chains = {
		A = { "Intro", "Main", "Outro" },
		B = { "Intro", "Main" },
	},
}, {
	MF = { soundProfile = "soft_moan" },
	FM = { pregnancyRisk = true },
})

ZomboRutScene.registerVariants("DefeatBJ", {
	label             = "Defeat BJ",
	kind              = "defeat",
	duration          = 24,
	outroDuration     = 5,
	forcedOrientation = "HeadEnd_onBack",
	soundProfile      = "bj_default",
	isOral            = true,
	escapeOutroVariant = "C",
	chains = {
		A = { "Intro", "Main", "Outro" },
		B = { "Intro", "Main" },
	},
}, {
	MF = { soundProfile = "soft_moan" },
	FM = {},
})

ZomboRutScene.registerVariants("DefeatLunge", {
	label             = "Defeat Lunge",
	kind              = "defeat",
	duration          = 24,
	outroDuration     = 5,
	forcedOrientation = "HeadEnd_onBack",
	soundProfile      = "defeatpunch_default",
	escapeOutroVariant = "C",
	chains = {
		A = { "Intro", "Main", "Outro" },
		B = { "Intro", "Main" },
	},
}, {
	MF = { soundProfile = "soft_moan" },
	FM = { pregnancyRisk = true },
})

ZomboRutScene.register("DefeatLesbianFaceSit_DefeatLesbianFaceSit_DefeatLesbianFaceSit_FF", {
	label                = "Defeat Lesbian Face Sit",
	kind                 = "defeat",
	duration             = 24,
	outroDuration        = 5,
	forcedOrientation    = "HeadEnd_onBack",
	soundProfile         = "facesit_default",
	isOral               = true,
	partnerOffsetForward = -0.4,
	chains = { A = { "Intro", "Main", "Outro" } },
})

ZomboRutScene.register("DefeatForcedCowGirl_DefeatForcedCowGirl_DefeatForcedCowGirl_FM", {
	label             = "Defeat Forced Cowgirl",
	kind              = "defeat",
	duration          = 24,
	outroDuration     = 5,
	forcedOrientation = "HeadEnd_onBack",
	soundProfile      = "defeatpunch_default",
	pregnancyRisk     = true,
	escapeOutroVariant = "C",
	chains = { A = { "Intro", "Main", "Outro" } },
})

ZomboRutScene.registerVariants("DefeatRevLotus", {
	label                = "Defeat Reverse Lotus",
	kind                 = "defeat",
	duration             = 24,
	outroDuration        = 5,
	forcedOrientation    = "HeadEnd_onBack",
	soundProfile         = "defeatpunch_default",
	isOral               = true,
	partnerOffsetForward = -0.85,
	escapeOutroVariant   = "C",
	chains = { A = { "Intro", "Main", "Outro" } },
}, {
	FF = {},
})

ZomboRutScene.register("BJ_BJ_BJ_FM", {
	label                = "[ZR DEBUG] BJ (placeholder)",
	debugOnly            = true,
	kind                 = "consensual",
	duration             = 24,
	outroDuration        = 9,
	forcedOrientation    = "HeadEnd_onBack",
	soundProfile         = "bj_default",
	isOral               = true,
	partnerOffsetForward = 0.0,
	chains = { A = { "Intro", "Main", "Outro" } },
})

ZomboRutScene.register("Cowgirl_Cowgirl_Cowgirl_FM", {
	label             = "Cowgirl",
	kind              = "consensual",
	duration          = 17,
	outroDuration     = 5,
	forcedOrientation = "HeadEnd_onBack",
	soundProfile      = "defeatpunch_default",
	pregnancyRisk     = true,
	corpseOnly        = true,
	exactGenderOnly   = true,
	chains = { A = { "Intro", "Main", "Outro" } },
})

local SEX_SUBDUE_BASE = {
	kind              = "consensual",
	duration          = 17,
	outroDuration     = 5,
	forcedOrientation = "HeadEnd_onBack",
	soundProfile      = "soft_moan",
	chains = { A = { "Intro", "Main", "Outro" } },
}

local function _withLabel(label, extra)
	local t = {}
	for k, v in pairs(SEX_SUBDUE_BASE) do t[k] = v end
	t.label = label
	if extra then
		for k, v in pairs(extra) do t[k] = v end
	end
	return t
end

ZomboRutScene.register("Sex_SubdueCowgirl_FM", _withLabel("Cowgirl", { pregnancyRisk = true, exactGenderOnly = true }))
ZomboRutScene.register("Sex_SubdueCowgirl_FF", _withLabel("Cowgirl"))
ZomboRutScene.register("Sex_SubdueDoggy_MF",   _withLabel("Doggy"))
ZomboRutScene.register("Sex_SubdueDoggy_MM",   _withLabel("Doggy"))
ZomboRutScene.register("Sex_SubdueDoggy_FM",   _withLabel("Doggy", { pregnancyRisk = true, exactGenderOnly = true }))
ZomboRutScene.register("Sex_SubdueMissionary_MF", _withLabel("Missionary"))

ZomboRutScene.register("Drag_Subdue", {
	label                = "Drag Subdued",
	kind                 = "utility",
	duration             = 60,
	outroDuration        = 0,
	forcedOrientation    = "HeadEnd_onBack",
	partnerOffsetForward = -0.9,
	noMovementLock       = true,
	autoWalk             = false,
	isUtility            = true,
	noSceneProtection    = true,
	chains = { A = { "Main" } },
})

ZomboRutScene.registerVariants("Holding", {
	label             = "Holding",
	kind              = "consensual",
	duration          = 17,
	outroDuration     = 5,
	forcedOrientation = "HeadEnd_onBack",
	soundProfile      = "soft_moan",
	friendlyOnly      = true,
	partnerOffsetForward = -0.4,
	chains = { A = { "Intro", "Main", "Outro" } },
}, {
	MF = {},
	FM = { pregnancyRisk = true },
})

ZomboRutScene.registerVariants("StandingDoggy", {
	label             = "Standing Doggy",
	kind              = "consensual",
	duration          = 17,
	outroDuration     = 5,
	forcedOrientation = "HeadEnd_onBack",
	soundProfile      = "soft_moan",
	friendlyOnly      = true,
	partnerOffsetForward = -0.5,
	chains = { A = { "Intro", "Main", "Outro" } },
}, {
	MF = {},
	FM = { pregnancyRisk = true },
})

ZomboRutScene.register("HeldDrag", {
	label                = "[ZR DEBUG] HeldDrag",
	kind                 = "utility",
	duration             = 60,
	outroDuration        = 0,
	forcedOrientation    = "HeadEnd_onBack",
	soundProfile         = "default",
	partnerOffsetForward = 0.6,
	noMovementLock       = true,
	autoWalk             = true,
	isUtility            = true,
	debugOnly            = true,
	chains = { A = { "Main" } },
})

ZomboRutScene.register("Tackle_Drag_Drag", {
	label                = "Sprinter Takedown",
	kind                 = "defeat",
	duration             = 120,
	outroDuration        = 2,
	forcedOrientation    = "HeadEnd_onFront",
	keepPlayerFacing     = true,
	partnerOffsetForward = -1.9,
	partnerOffsetYaw     = 180.0,
	noMovementLock       = true,
	autoWalk             = false,
	isUtility            = true,
	chains = { A = { "Intro", "Main", "Outro" } },
	onBegin = function(player, body, ctx)
		player:setVariable("ZR_Tackle_Drag_DragIntroVariant", "A")
		player:setVariable("ZR_Tackle_Drag_DragMainVariant",  "A")
		player:setVariable("ZR_Tackle_Drag_DragOutroVariant",  "A")
	end,
	onEnd = function(player, ctx, result)
		pcall(function() player:setVariable("ZR_Tackle_Drag_DragIntroVariant", "") end)
		pcall(function() player:setVariable("ZR_Tackle_Drag_DragMainVariant",  "") end)
		pcall(function() player:setVariable("ZR_Tackle_Drag_DragOutroVariant",  "") end)
	end,
})

local ZR_Scenes = {}
return ZR_Scenes
