Merge pull request 'Document claim Tax routing and planned Basic transfer rules' (#359) from release/claim-policy-notices into main

This commit is contained in:
unimatrix 2026-11-16 21:47:05 +00:00
commit af6d1b50e0
5 changed files with 17 additions and 4 deletions

View file

@ -83,3 +83,11 @@ requests/events, missing/occupied anchors, conflicting regions, WorldGuard timeo
or rejection, failure/retry reconciliation and replayed conquest/server events.
Distinguish simulated acceptance from actual game confirmation. Later run the
same contract tests against a real WorldGuard adapter in a test world.
## Additional agreed product / Transfer of Power rules
Reuse bank package/product, confirmation, authorisation and ledger patterns; claim tiers remain a separate product kind. Upkeep and unlocks go to the existing sys_tax_treasury account.
Prepare voluntary Transfer of Power for Basic; do NOT implement its backend yet. Sale price must cover the authoritative current debt payoff, including earned interest, rechecked at settlement. Clear debts first, credit the remaining purchase price to the acquired daughter's account and pay tax separately to sys_tax_treasury. No debt forgiveness or claimed debt-free state before confirmed settlement. Reuse existing bank payoff/repayment components later. Both daughter and mother leaders may apply for a loan on the daughter; the daughter remains the debtor.
Basic has NO conquest, organisation political powers or House candidacy. House candidacy requires Keyed/Royal status. Personal citizen voting rights remain absolute; Basic membership must not remove them. These are rules/placeholders, not newly activated political or financial actions.

View file

@ -13,3 +13,7 @@ export function claimTariffs(kind='clan'){
return base.map(([code,chunks,upkeepMinor],index)=>Object.freeze({code:kind==='company'?code.replace('C_','CO_'):kind==='protected'?'P'+code:code,stage:code.startsWith('BC')?'Basic':code.startsWith('KC')?'Keyed':'Royal',chunks:Math.floor(chunks*organisation.sizeNumerator),upkeepMinor:upkeepMinor*organisation.costNumerator/2,unlockMinor:index?(10*upkeepMinor+2000*(chunks-base[index-1][1]))*organisation.costNumerator/2:0,requirement:code==='KC_T0'?(kind==='company'?'COM-key':'CLAN-key'):code==='RC_T0'?'Political appointment + POL-key':null}));
}
export const claimMoney=minor=>(minor/100).toFixed(2)+' DM';
export const CLAIM_REVENUE_SYSTEM_KEY='sys_tax_treasury';
export const BASIC_POLITICAL_NOTICE='Basic has no conquest, organisation political powers or House candidacy. Personal citizen votes remain unchanged.';
export const ORGANISATION_TRANSFER_NOTICE='Planned voluntary Transfer of Power: sale price must cover current debt payoff. Settle debts first; credit the remaining price to the daughter account and tax to the Tax treasury. Both leaders may apply for credit on the daughter; the daughter remains the debtor.';

View file

@ -1,11 +1,12 @@
import {element as el} from './cp-v2-page-template.mjs';
import {claimTariffs,claimMoney,CLAIM_TARIFF_VERSION} from './cp-v2-claim-tariffs.mjs';
import {claimTariffs,claimMoney,CLAIM_TARIFF_VERSION,BASIC_POLITICAL_NOTICE,ORGANISATION_TRANSFER_NOTICE} from './cp-v2-claim-tariffs.mjs';
export function mountClaims(host,{kind='clan',name='Your organisation'}={}){
const root=el('section',undefined,'claims-workspace'),hero=el('div',undefined,'claims-banner');hero.append(el('small','LAND & ESTATES'),el('h2',name+' · Claims'),el('p',kind==='company'?'Company premises and Charter Beacons.':'Clan estates, Home Standards and outposts.'));
root.append(hero,el('p','Land claims are coming soon. No land is reserved and no payment is taken from this page.','claims-notice'));
const rules=el('div',undefined,'claims-grid');for(const [title,copy]of [['One shared claim budget','Every chunk is 16 × 16 blocks. Limits count all chunks claimed by your organisation, not a radius or a separate allowance for each estate.'],['Basic → Keyed → Royal','Start Basic. Your original organisation key enables mother-house status; Royal status requires a political appointment and its new POL-key.'],['Upgrade at your Home Block','Claim-tier upgrades are performed ingame by right-clicking your Home Block. This website displays information; it does not buy or apply claim upgrades.'],['Subhouse rights & costs','The mother house controls subordinate claim rights and management. The original organisation pays upkeep and upgrades, even when the mother performs the upgrade. Rights are never counted twice. Planned payment authority reuses Imperial Postbank mandates; bank-account ownership does not transfer.'],['WorldGuard bridge','Future game protection uses the central API and a DuneProtect/WorldGuard adapter. No regions are created or resized by this preview.']]){const card=el('article',undefined,'claims-card');card.append(el('h3',title),el('p',copy));rules.append(card);}root.append(rules);
const charter=el('section',undefined,'claims-card'),choice=el('select'),label=el('label','Tariff reference · this does not assign your organisation a tier'),tableWrap=el('div',undefined,'claim-preview-scroll'),table=el('table',undefined,'claim-preview-table');choice.setAttribute('aria-label','Claim tariff reference');for(const [value,title]of kind==='company'?[['company','Company tariffs']]:[['clan','Clan tariffs'],['protected','Protected House tariffs']]){const option=el('option',title);option.value=value;choice.append(option);}label.append(choice);tableWrap.tabIndex=0;tableWrap.setAttribute('role','region');tableWrap.setAttribute('aria-label','Planned claim tier prices');tableWrap.append(table);charter.append(el('h3','Claim charter & capacity'),el('p','Current tier, used chunks, available capacity, Home Block and payment status: not connected yet.'),label,tableWrap,el('p','Upkeep is monthly; unlock prices are paid once per sequential tier. Company capacity/costs × 1.5; protected capacity × 1.5 and costs × 0.5. Capacity rounds down to whole chunks.'));const rates=el('a','Open the full Rates & Charges guide →');rates.href='https://www.dunerealms.com/rates-and-charges.html#claims';rates.target='_top';charter.append(rates,el('small','Published preview · '+CLAIM_TARIFF_VERSION));
function paint(){const head=el('thead'),heading=el('tr'),body=el('tbody');for(const text of ['Tier','Total chunks','Monthly upkeep','One-time unlock','Status requirement']){const cell=el('th',text);cell.scope='col';heading.append(cell);}head.append(heading);for(const row of claimTariffs(choice.value)){const tr=el('tr');tr.append(el('th',row.code),el('td',row.chunks),el('td',claimMoney(row.upkeepMinor)),el('td',claimMoney(row.unlockMinor)),el('td',row.requirement||'Previous tier'));body.append(tr);}table.replaceChildren(head,body);}choice.onchange=paint;paint();root.append(charter);
const policy=el('section',undefined,'claims-card');policy.append(el('h3','Rights & planned Transfer of Power'),el('p',BASIC_POLITICAL_NOTICE),el('p',ORGANISATION_TRANSFER_NOTICE),el('p','Claim upkeep and unlocks go to the Tax treasury. Transfer and loan workflows are planned; no transaction is performed here.'));root.append(policy);
const grid=el('div',undefined,'claims-grid');
for(const [title,copy,action]of [['Estates','Your registered land and ownership records will appear here.','View estates'],['Home Block & anchors','Your Home Block, location and WorldGuard synchronisation status will appear here. Right-click the Home Block ingame to upgrade claim capacity.','View Home Block'],['Boundaries','Preview estate borders and check neighbouring claims. The game bridge applies verified protection changes.','View boundaries'],['Upkeep & payments','Your applied tier, monthly upkeep and payment history will appear here. Claim upgrades are initiated ingame.','View upkeep']]){
const card=el('article',undefined,'claims-card'),button=el('button',action);button.type='button';button.disabled=true;button.title='Coming soon';card.append(el('h3',title),el('p',copy),el('strong','Coming soon'),button);grid.append(card);

View file

@ -1,5 +1,5 @@
import {CLAIM_ORGANISATIONS,CLAIM_TARIFF_VERSION,claimTariffs,claimMoney} from '../control-panel/public/cp-v2/cp-v2-claim-tariffs.mjs';
import {CLAIM_ORGANISATIONS,CLAIM_TARIFF_VERSION,claimTariffs,claimMoney,BASIC_POLITICAL_NOTICE,ORGANISATION_TRANSFER_NOTICE} from '../control-panel/public/cp-v2/cp-v2-claim-tariffs.mjs';
export function claimRatesSection(){
const cards=Object.entries(CLAIM_ORGANISATIONS).map(([kind,group])=>`<article class="claim-rate-card claim-rate-${kind}"><header><h3>${group.name}</h3><p>${group.description}</p></header><div class="table-wrap" tabindex="0" role="region" aria-label="${group.name} claim tariffs"><table><caption>Per organisation · fictional DM</caption><thead><tr><th scope="col">Tier</th><th scope="col">Chunks</th><th scope="col">Monthly</th><th scope="col">Unlock</th></tr></thead><tbody>${claimTariffs(kind).map(row=>`<tr class="claim-stage-${row.stage.toLowerCase()}"><th scope="row">${row.code}${row.requirement?'<span class="claim-key-note">'+row.requirement+'</span>':''}</th><td>${row.chunks}</td><td>${claimMoney(row.upkeepMinor)}</td><td>${claimMoney(row.unlockMinor)}</td></tr>`).join('')}</tbody></table></div></article>`).join('');
return `<section id="claims" class="claim-rates"><div class="claim-rates-heading"><img src="/assets/nav-clan-v2.webp" width="80" height="80" alt=""><div><span class="eyebrow">LAND / ORGANISATION CLAIMS</span><h2>Land claims &amp; upkeep</h2><p>One organisation. One total chunk budget.</p></div></div><aside class="notice"><strong>Published schedule · claims system coming soon</strong><p>These are planned claim limits and prices. This publication does not reserve land, assign a tier, unlock an upgrade or start billing.</p></aside><div class="claim-rules"><article><h3>Count chunks, not radius</h3><p>One chunk is 16 × 16 blocks. Nine chunks in a 3 × 3 square cover 48 × 48 blocks. Limits apply across all claims belonging to the organisation.</p></article><article><h3>Separate status and capacity</h3><p>Create a Basic organisation first. Its original key unlocks Keyed status; a political appointment and new POL-key are required for Royal status. Tier unlock fees are paid once, sequentially. Upgrade claim capacity ingame by right-clicking the Home Block; this guide does not apply upgrades.</p></article><article><h3>Clear multipliers</h3><p>Companies: capacity × 1.5 and fees × 1.5. Protected Houses: capacity × 1.5 and fees × 0.5. Round capacity down to whole chunks. Both upkeep and unlock fees use the cost multiplier.</p></article></div><div class="claim-rates-grid">${cards}</div><p class="fine">Unlock calculation: 20 DM per additional chunk of standard clan capacity, plus ten months of the new standard tier’s upkeep; then apply the organisation cost multiplier. BC_T0 is free. Scaled fees are not recalculated from rounded capacity. Standard RC_T3 is 36 chunks: a possible 96 × 96-block square, fitting the agreed 100 × 100-block ceiling. Shapes may vary. A mother house controls its subordinate houses’ claim rights and management. Entitlement sources remain traceable and count only once. The original organisation remains responsible for upkeep and unlock costs, including upgrades performed by the mother house; a change in the mother’s tier does not transfer those costs.</p><p class="fine">Schedule ${CLAIM_TARIFF_VERSION}. Print this page to include claim tariffs; the downloadable bank tariff PDF currently covers bank rates, not this planned claim schedule.</p></section>`;
return `<section id="claims" class="claim-rates"><div class="claim-rates-heading"><img src="/assets/nav-clan-v2.webp" width="80" height="80" alt=""><div><span class="eyebrow">LAND / ORGANISATION CLAIMS</span><h2>Land claims &amp; upkeep</h2><p>One organisation. One total chunk budget.</p></div></div><aside class="notice"><strong>Published schedule · claims system coming soon</strong><p>These are planned claim limits and prices. This publication does not reserve land, assign a tier, unlock an upgrade or start billing.</p></aside><div class="claim-rules"><article><h3>Count chunks, not radius</h3><p>One chunk is 16 × 16 blocks. Nine chunks in a 3 × 3 square cover 48 × 48 blocks. Limits apply across all claims belonging to the organisation.</p></article><article><h3>Separate status and capacity</h3><p>Create a Basic organisation first. Its original key unlocks Keyed status; a political appointment and new POL-key are required for Royal status. Tier unlock fees are paid once, sequentially. Upgrade claim capacity ingame by right-clicking the Home Block; this guide does not apply upgrades.</p></article><article><h3>Clear multipliers</h3><p>Companies: capacity × 1.5 and fees × 1.5. Protected Houses: capacity × 1.5 and fees × 0.5. Round capacity down to whole chunks. Both upkeep and unlock fees use the cost multiplier.</p></article></div><aside class="notice"><strong>Basic rights &amp; planned transfers</strong><p>${BASIC_POLITICAL_NOTICE}</p><p>${ORGANISATION_TRANSFER_NOTICE}</p><p>Claim upkeep and tier unlock fees go to the Tax treasury.</p></aside><div class="claim-rates-grid">${cards}</div><p class="fine">Unlock calculation: 20 DM per additional chunk of standard clan capacity, plus ten months of the new standard tier’s upkeep; then apply the organisation cost multiplier. BC_T0 is free. Scaled fees are not recalculated from rounded capacity. Standard RC_T3 is 36 chunks: a possible 96 × 96-block square, fitting the agreed 100 × 100-block ceiling. Shapes may vary. A mother house controls its subordinate houses’ claim rights and management. Entitlement sources remain traceable and count only once. The original organisation remains responsible for upkeep and unlock costs, including upgrades performed by the mother house; a change in the mother’s tier does not transfer those costs.</p><p class="fine">Schedule ${CLAIM_TARIFF_VERSION}. Print this page to include claim tariffs; the downloadable bank tariff PDF currently covers bank rates, not this planned claim schedule.</p></section>`;
}

File diff suppressed because one or more lines are too long