const p={Normal:"無屬性",Fire:"火",Water:"水",Grass:"草",Electricity:"雷",Electric:"雷",Ground:"地",Earth:"地",Ice:"冰",Dragon:"龍",Dark:"闇"},u={Kindling:"生火",EmitFlame:"生火",Watering:"澆水",Planting:"播種",Seeding:"播種",GeneratingElectricity:"發電",Handiwork:"手工作業",Handcraft:"手工作業",Gathering:"採集",Collection:"採集",Lumbering:"伐木",Deforest:"伐木",Mining:"採礦",MedicineProduction:"製藥",ProduceMedicine:"製藥",Cooling:"冷卻",Cool:"冷卻",Transporting:"搬運",Transport:"搬運",Farming:"牧場",MonsterFarm:"牧場",OilExtraction:"採油"},h={hp:"生命值",defense:"防禦",stamina:"耐力",meleeattack:"近戰攻擊",rangedattack:"遠程攻擊",support:"支援",craftspeed:"工作速度"},f={attack:"攻擊",defense:"防禦",health:"生命",shield:"護盾",durability:"耐久",magazine:"彈匣",satiety:"飽食回復",sanity:"SAN 回復",recovery:"生命回復"},o=e=>Math.max(0,Math.min(100,e)),i=e=>e>=90?"S":e>=75?"A":e>=60?"B":e>=42?"C":"D";function l(e){const a=e.stats??{},n=Math.max(a.meleeattack??0,a.rangedattack??0);return o(((a.hp??0)+(a.defense??0)+n)/4+(e.rarity??0)*2)}function d(e){var t;const a=Object.values(e.workSuitability??{}),n=a.length?Math.max(...a):0,r=a.reduce((c,s)=>c+s,0);return o(n*12+r*2+(((t=e.stats)==null?void 0:t.craftspeed)??0)/20)}function m(e){var r,t;const a=((r=e.speeds)==null?void 0:r.ride)??0,n=((t=e.speeds)==null?void 0:t.run)??0;return o(a/18+n/45)}function g(e){return o(l(e)*.48+d(e)*.34+m(e)*.18)}const k=e=>i(g(e)),w=e=>i(l(e)),b=e=>i(d(e)),S=e=>i(m(e));function x(e){const a=`${e.id} ${e.name} ${(e.effects??[]).map(t=>t.type).join(" ")}`.toLowerCase(),r=[[/move|speed|ride|swim/,"移動速度"],[/attack|atk|damage|elementboost/,"攻擊"],[/defen|def_|resist|shield/,"防禦"],[/maxhp|health|hpregen|healing/,"生命值"],[/stamina/,"耐力"],[/craft|work speed|workability/,"工作速度"],[/sanity|san_|san\b/,"SAN 值"],[/cooltime|cooldown/,"冷卻時間"],[/hunger|fullstomach|food/,"飽食度"],[/drop|sale|produce|farm|logging|mining/,"生產／掉落"],[/fire|water|aqua|ice|dragon|dark|earth|ground|leaf|grass|thunder|electric|normal/,"屬性效果"]].filter(([t])=>t.test(a)).map(([,t])=>t);return[...new Set(r.length?r:["其他效果"])]}function v(e){var t,c;const a=`${((t=e.partnerSkill)==null?void 0:t.name)??""} ${((c=e.partnerSkill)==null?void 0:c.description)??""}`.toLowerCase(),r=[[/item|drop|harvest|obtain/,"道具獲取"],[/weight|load|carry|capacity/,"負重"],[/mining|ore/,"採礦"],[/\bexp\b|experience/,"經驗"],[/fish/,"釣魚"],[/ridden|ride|mount|movement|speed|glid/,"移動／騎乘"],[/defense|damage received|reduce damage|shield/,"防禦"],[/attack|damage|weapon|firepower/,"攻擊"]].filter(([s])=>s.test(a)).map(([,s])=>s);return[...new Set(r.length?r:["探索／支援"])]}function C(e){const a=e.power??0,n=Math.max(1,e.cooldown??1);return i(o(a/6+Math.min(35,a/n)))}function M(e){const a=e.rank??0;return a>=4?"S":a===3?"A":a===2?"B":a===1?"C":"D"}function T(e){const a=Math.max(e.rarity??0,e.rank??0);return a>=5?"S":a>=4?"A":a>=3?"B":a>=2?"C":"D"}const D={S:5,A:4,B:3,C:2,D:1};export{v as a,k as b,M as c,C as d,p as e,l as f,d as g,w as h,T as i,S as j,b as k,f as l,g as m,x as p,m as r,h as s,D as t,u as w};
