-
Notifications
You must be signed in to change notification settings - Fork 1
/
fcatan.js
70 lines (58 loc) · 2.54 KB
/
fcatan.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/**
* The minimal possible Foundry game system intended for board game use.
* Founders of Catan PERSONAL USE ONLY added.
* Author: Norc
*/
//TODO: Convert from Pseudocode
//Hooks.on("createCombat") { init array with all tiles with water texture. Opacity blue = port. Opacity black = land }
//Store array in combat.
//Shuffle appropriate sized tile decks and set images accordingly.
//If possible, place number tiles also, skipping deserts.
//TODO: Extend core card applications to be more catan-friendly
//MUST DO:
//Extend Pass to also pass the card data (nicely sorted and grouped string of passed cards). submit feature request also.
//populate player macro barsvideo
//VERY NICE TO DO:
//Auto game setup.
// Import Modules
import { addTiebreaker } from "./module/combat.js";
import { FCCards } from "./module/FCCards.js";
/* -----------------------------------------*/
/* Founders of Catan System Initialization */
/* -----------------------------------------*/
/**
* Init hook.
*/
Hooks.once("init", async function() {
console.log(`CATAN | Initializing Founders of Catan System`);
//set CONFIGs and define any non-optional things as basically as possible here.
CONFIG.Combat.initiative.formula = '2d6';
CONFIG.Catan = {waterTexture: 'Catan/Land%20Tiles/Water.png'
, desertTexture: 'Catan/Land%20Tiles/Desert-1.png'
, fieldsTexture: 'Catan/Land%20Tiles/Plains-1.png'
, forestTexture: 'Catan/Land%20Tiles/Wood-1.png'
, hillsTexture: 'Catan/Land%20Tiles/Brick-1.png'
, mountainsTexture: 'Catan/Land%20Tiles/Stone-1.png'
, pastureTexture: 'Catan/Land%20Tiles/Sheep-1.png'
, port3to1Texture: 'Catan/Port%20Tiles/3Port%20Tile.png'
, portGrainTexture: 'Catan/Port%20Tiles/GrainPort.png'
, portSheepTexture: 'Catan/Port%20Tiles/SheepPort.png'
, portWoodTexture: 'Catan/Port%20Tiles/WoodPort.png'
, portBrickTexture: 'Catan/Port%20Tiles/BrickPort.png'
, portStoneTexture: 'Catan/Port%20Tiles/StonePort.png'
, blankLandTexture: 'Catan/Land%20Tiles/BlankLand.png'
, blankPortTexture: 'Catan/Land%20Tiles/BlankPort.png'
, blankLetDiscTexture: 'Catan/Number%tiles/BlankNum'
};
CONFIG.Cards.documentClass = FCCards;
});
//experimental
Hooks.on("combatTurn", (c) => {if (c.updateData.updateOptions ==1) game.cards.getName("DISCARD PILE").recall()} );
/**
* Add array of possible tiebreakers to combat when it is created
*/
Hooks.on("createCombat", (combat, opts, ID) => addTiebreaker(combat));
// Hooks.on("hotbarDrop", (bar, data, slot) => macros.create5eMacro(data, slot));
/**
* Clear Discard pile on combat turn end
*/