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

5 lines
1.6 KiB
JavaScript

import {PUBLIC_OFFICES} from './public-government.mjs';
export const REBELLION_REWARDS=Object.freeze({emperor:Object.freeze({reputationXP:10000,amountMinor:2500000}),office:Object.freeze({reputationXP:2500,amountMinor:500000})});
export const CLAN_REALM_FACTIONS=Object.freeze({kaladam:'atreides',giedermark:'harkonnen',kaiterhof:'corrino',sigmadraken_iv:'ordos',arrakduin:'fremen'});
export function rebellionQuest(officeKey,{multiplier=1,counterChallengeOf=null}={}){if(![1,2].includes(multiplier))throw Error('Invalid rebellion reward multiplier');const office=PUBLIC_OFFICES.find(o=>o.key===officeKey);if(!office)throw Error('Unknown elected office');if(!office.challengeable)throw Error('This faith office cannot be taken by rebellion');return {id:'REBELLION-'+office.key.toUpperCase(),officeKey:office.key,art:'seals/'+office.art,title:office.key==='emperor'?(counterChallengeOf?'Challenge the Imperial Succession':'Seize the Imperial Throne'):'Challenge the '+office.name,target:'Capture the incumbent main-clan Home Block in open rebellion',organisationKind:'clan',xpType:'pol',reward:Object.fromEntries(Object.entries(REBELLION_REWARDS[office.key==='emperor'?'emperor':'office']).map(([key,value])=>[key,value*multiplier])),rewardMultiplier:multiplier,counterChallengeOf,firstSuccessBonusMultiple:5,executionRequirements:{website:true,minecraft:true},producerState:'awaiting-game-adapter',rewardLimit:'once-per-clan-office-season',counterChallengeRewardLimit:'once-per-clan-source-key',termPolicy:'remaining-current-term'};}
export const UNIVERSAL_REBELLION_QUESTS=Object.freeze(PUBLIC_OFFICES.filter(o=>o.challengeable).map(o=>Object.freeze(rebellionQuest(o.key))));