mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-22 12:01:23 +01:00
slightly optimize onZoom
This commit is contained in:
parent
a06e55d618
commit
929d85a335
5 changed files with 4 additions and 22 deletions
|
|
@ -792,19 +792,6 @@ window.BurgsAndStates = (function () {
|
|||
.sort((a, b) => a.start - b.start);
|
||||
};
|
||||
|
||||
const wars = {War: 6, Conflict: 2, Campaign: 4, Invasion: 2, Rebellion: 2, Conquest: 2, Intervention: 1, Expedition: 1, Crusade: 1};
|
||||
const generateCampaign = state => {
|
||||
const neighbors = state.neighbors.length ? state.neighbors : [0];
|
||||
return neighbors
|
||||
.map(i => {
|
||||
const name = i && P(0.8) ? pack.states[i].name : Names.getCultureShort(state.culture);
|
||||
const start = gauss(options.year - 100, 150, 1, options.year - 6);
|
||||
const end = start + gauss(4, 5, 1, options.year - start - 1);
|
||||
return {name: getAdjective(name) + " " + rw(wars), start, end};
|
||||
})
|
||||
.sort((a, b) => a.start - b.start);
|
||||
};
|
||||
|
||||
// generate historical conflicts of each state
|
||||
const generateCampaigns = function () {
|
||||
pack.states.forEach(s => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue