using NCMS;
using UnityEngine;
using Cultivation_Way;
using Cultivation_Way.Actions;
using Cultivation_Way.Library;
using Cultivation_Way.Animation;
using System;

namespace SwordSpells
{
	[ModEntry]
	public class Main : CW_Addon
	{
		public override void awake(){
			// 不要在此处添加代码，除非你知道你在做什么
			// DO NOT code here.
			load_mod_info(System.Type.GetType("Mod"));
		}
		public override void initialize(){
			Log("Hello CW Addon!");
			// 在这里初始化模组内容
			// Initalize your mod content here
			add_sword_spells();
		}

        private void add_sword_spells()
        {
			clone("泥尘剑法", "五步拳").free_val = 0.13f;
			clone("长亭剑法", "五步拳").free_val = 0.25f;
			clone("旧雪剑法", "五步拳").free_val = 0.35f;

			clone("雨晴剑法", "一十二路入室拳").free_val = 0.68f;
			clone("太悦情剑", "一十二路入室拳").free_val = 0.78f;
			clone("六道轮回剑", "一十二路入室拳").free_val = 0.88f;

			clone("天骄文道剑", "五岳剑法").free_val = 1.04f;
			clone("婵娟剑", "五岳剑法").free_val = 1.05f;
			clone("雯以剑", "五岳剑法").free_val = 1.15f;

			clone("夜雾孤影剑", "虎鹤双形").free_val = 2.0f;
			clone("无极圣剑", "虎鹤双形").free_val = 2.0f;
			clone("明月兮风剑", "虎鹤双形").free_val = 2.3f;

			clone("踏月留香剑", "凤舞飘香手").free_val = 3.2f;
			clone("一介布衣乾坤剑", "凤舞飘香手").free_val = 3.6f;
			clone("红莲宿醉灼华剑", "凤舞飘香手").free_val = 4.2f;

			clone("暗夜无殇春秋剑", "龙爪手").free_val = 5.5f;
		}

		private static CW_Asset_Spell clone(string pNew, string pFrom)
		{
			return CW_Library_Manager.instance.spells.clone(pNew, pFrom);
		}
	}
}