-- Oh, like I wasnt gonna copypasta Kanade's Persona script and edit it for my own dumb purposes.

-- Probably just gonna leave most of the comments unaltered so I mess up less.

freeslot("SPR_BEG1,SPR2_KILL,SPR2_LMAO,SPR2_WHAT")

if not srb2p return end
-- Due to the exe nature of the mod, this only requires a one-time check.

-- Define our base character's stats!
charStats["legacysonki"] = {

		-- GENERAL

		name = "Sonki",		-- This is only for bots / enemies
		basehp = 69,			-- base HP for level 1 (Cannot be <= 0)
		basesp = 21,			-- base SP for level 1 (Can be 0, but not < 0!)
		persona = "curd",		-- Persona to use
		melee_natk = "slash_1",	-- normal melee attack

		-- Normal attack attributes
		-- Scales with game difficulty
		atk = 22,	-- power (generally < 50)
		acc = 80,	-- accuracy (%)
		crit = 60,	-- crit rate (%)

		-- ANIMS
		-- Anims are built like this:
		-- {SPR_SPRITE, frame1, frame2, frame3, ... , duration between each frame, ["SPR2_CONST"]}
		-- (SPR2 must be a string, and is optional. Only for use with SPR_PLAY)

		-- Note: As of Beta 1.0.0, not all animations are implemented
		-- (* = unimplemented)

		anim_stand = 		{SPR_PLAY, A, 8, "SPR2_STND"},							-- standing
		anim_stand_hurt =	{SPR_PLAY, A, 8, "SPR2_STRK"},							-- standing (low HP) *
		anim_stand_bored =	{SPR_PLAY, A, 70, "SPR2_WAIT"},							-- standing (occasionally plays after anim_stand has played several times)
		anim_guard = 		{SPR_PLAY, A, 1, "SPR2_WHAT"},							-- guarding
		anim_move =			{SPR_PLAY, A, B, C, D, 2, "SPR2_WALK"},							-- moving
		anim_run =			{SPR_PLAY, A, B, 2, "SPR2_RUN_"},							-- guess what
		anim_atk =			{SPR_PLAY, A, B, C, D, 2, "SPR2_ROLL"},							-- attacking
		anim_aoa_end =		{SPR_PLAY, A, 2, "SPR2_KILL"},					-- jumping out of all-out attack
		anim_hurt =			{SPR_PLAY, A, 35, "SPR2_PAIN"},							-- taking damage
		anim_getdown =		{SPR_PLAY, A, 1, "SPR2_PAIN"},							-- knocked down from weakness / crit *
		anim_downloop =		{SPR_PLAY, A, 1, "SPR2_LMAO"},							-- is down
		anim_getup =		{SPR_PLAY, A, B, C, D, 1, "SPR2_ROLL"},					-- gets up from down
		anim_death =		{SPR_PLAY, A, 35, "SPR2_DEAD"},		-- dies
		anim_revive =		{SPR_PLAY, A, 1, "SPR2_KILL"},					-- gets revived

		-- anim_special1 through anim_special32 may also be used for various purposes (ie: attack animations)
		anim_special1 =		{SPR_PLAY, A, TICRATE, "SPR2_STND"},
		anim_special4 = 	{SPR_PLAY, C, TICRATE, "SPR2_ROLL"},			-- guard
		anim_sepcial5 =		{SPR_PLAY, A, TICRATE, "SPR2_ROLL"},			-- howling prep
		anim_special6 =		{SPR_PLAY, A, 2, "SPR2_FALL"},				-- howling

		-- VOICES
		-- Possible list of voices
		-- vfx_action = {"sfx_voice1", "sfx_voice2", [...], "sfx_voicen"}

		-- ...In the case of kanade, she's silent, but I will leave these here for reference!

		vfx_summon = {},	-- Summoning Persona to use a Skill
        vfx_skill = {},		-- Used a Skill
        vfx_item = {},		-- Used an item
        vfx_hurt = {},		-- Sustained damage
        vfx_hurtx = {},		-- Sustained heavy damage / Critical hit / Weakness
        vfx_die = {},		-- Death
        vfx_heal = {},		-- Healed by teammate
        vfx_healself = {},	-- Healed self
        vfx_kill = {},		-- Killed an enemy
        vfx_1more = {},		-- Performed 1more
        vfx_crit = {},		-- Cut-in for Weakness/Critical Hit
        vfx_aoaask = {},	-- Ask to All-Out Attack
        vfx_aoado = {},		-- Performing All-Out Attack
        vfx_aoarelent = {},	-- Relenting from All-Out Attack
        vfx_miss = {},		-- Missed attack
        vfx_dodge = {},		-- Dodged enemy attack
        vfx_win = {},		-- Battle won
        vfx_levelup = {},	-- Level Up!


		-- HUD DEFINTIIONS

		icon = "ICO_SONK",			-- head icon for character select
		hudbust = "H_SONKI",			-- patch to draw on the stat hud
		hudaoa = "H_SONKA",		-- patch for all out attack hud
		aoa_quote = "Insert Sonic 1 Sound Effect Here",
		hudcutin = "SONK_A",		-- cut in frames prefix

		-- Tip to display on the character select.
		-- Give insight on their skill type and their strengths/weaknesses in battle!
		tip = "Sonki uses the powers of cheesy curds. That's it.",
}


personaList["curd"] = {
		-- GENERAL
		name = "Curd",	-- Name of the Persona
		arcana = "ARCANA_DEATH",			-- Arcana (unused in Beta 1.0.0, can be left nil as well)

		sprite = SPR_BEG1,		-- Unused outside of debugging purposes for shortcuts. Can be left nil
		startframe = 0,			-- Unused outside of debugging purposes for shortcuts. Can be left nil

		-- Animations function the same way they do for players. (In Kanade's case, she's so good she doesn't need one, so let's make it invisible)
		anim_idle = 	{SPR_BEG1, A, 4, "SPR_BEG1"},	-- Idle animation when summoned in the menu
		anim_atk = 		{SPR_BEG1, A, 4, "SPR_BEG1"},	-- Animation when attacking

		-- Stats (at level 10)
		-- Remember that stats naturally cap at 99.
		strength = 7,
		magic = 7,
		endurance = 6,
		luck = 8,
		agility = 12,

		-- Affinities (weak, resist, block, drain)
		weak = ATK_ALMIGHTY,
		resist = ATK_STRIKE,
		block = ATK_NUCLEAR,

		/*Skills learnt and their level:
			{
				{"skillname", level, ["skill_to_replace"]},
				{"skill2name", level, ["skill_to_replace"]},
				[...]
			}

			Documentation for every existing skill name will be available publically at a later date.
			For now, feel free to scout the game files yourself!

			the 3rd argument is only useful on higher difficulties where characters automatically start at
			higher levels, meaning their skills need to be automatically replaced.

			NOTE: Characters can only have 8 skills total! But if you mess this up, the game won't stop you from having 69 skills.
			So pay attention!
		*/

		skills = {
					{"cleave", 1}, {"toxic slice", 1}, 
					{"frei", 12}, {"malfrei", 17}, 
					{"chaos_drive_1", 18}, {"provoke", 21},
					{"super", 27}, {"hand sonic", 29},

					{"blade of fury", 34, "gale slash"},
					{"freila", 36, "frei"},
					{"evade nuke", 38, "cleave"},
					{"nuke boost", 41, "provoke"},
					{"nuke amp", 45, "nuke boost"},

					{"freidyne", 51, "freila"},
					{"mafreila", 53, "malfrei"},
					{"ziodyne", 56, "hand sonic"},
					{"chaos_drive_x", 60, "chaos_drive_1"},
					{"batkan buster", 64, "blade of fury"},
					
					{"atomic flare", 69, "freidyne"},
				},
}