web/website/node/elytra-quest-policy.mjs
2026-11-27 23:43:05 +00:00

5 lines
1 KiB
JavaScript

import {ELYTRA_QUESTS} from '../control-panel/public/cp-v2/cp-v2-elytra-quests.mjs';
export const ELYTRA_RECIPE=Object.freeze({world:'Arrakis',quality:'very_rare',equipmentMark:11,result:'Elytra',grid:[['Netherite ingot','Phantom membrane','Netherite ingot'],['Iron ingot','Diamond','Iron ingot'],['Contaminated spice','Phantom membrane','Contaminated spice']]});
export const FLIGHT_METRICS=Object.freeze(Object.fromEntries(ELYTRA_QUESTS.map(d=>[d.metric,d.target])));
export function applyElytraAlternative(totals){if((totals.get('flight-elytra-acquired')||0)>0)for(const [metric,target]of Object.entries(FLIGHT_METRICS))totals.set(metric,Math.max(target,totals.get(metric)||0));return totals;}
export function flightDossier(quest){if(quest.id!=='POL-ELYTRA-CRAFT')return quest;if(!quest.canStart&&!['active','completed','claimed'].includes(quest.state))return {...quest,objective:'Complete the preparation quests to reveal the elytra recipe.'};return {...quest,objective:'Craft this elytra on Arrakis using the revealed recipe.',recipe:ELYTRA_RECIPE};}