@v12-engine/create 0.1.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -1
- package/base/_gitignore +5 -0
- package/base/package.json +3 -3
- package/base/src/main.ts +36 -10
- package/base/src/navigation.worker.ts +7 -0
- package/base/vite.config.ts +24 -2
- package/cli.mjs +21 -6
- package/index.mjs +27 -7
- package/layers/desktop/electron/app.mjs +237 -0
- package/layers/desktop/electron/config.mjs +16 -0
- package/layers/desktop/electron/dev.mjs +63 -0
- package/layers/desktop/electron/files.mjs +86 -0
- package/layers/desktop/electron/icons/icon.icns +0 -0
- package/layers/desktop/electron/icons/icon.png +0 -0
- package/layers/desktop/electron/main.mjs +12 -0
- package/layers/desktop/electron/package.mjs +75 -0
- package/layers/desktop/electron/preload.cjs +41 -0
- package/layers/desktop/electron/presentation.m +87 -0
- package/layers/desktop/electron/serve.mjs +76 -0
- package/layers/desktop/electron/tools.mjs +63 -0
- package/layers/desktop/electron/updates.mjs +71 -0
- package/layers/desktop/package.json +13 -0
- package/layers/desktop/src/desktop.ts +175 -0
- package/layers/desktop/src/shell.ts +279 -0
- package/layers/desktop/tests/main.test.ts +189 -0
- package/layers/desktop/tests/shell.test.ts +152 -0
- package/layers/rooms/server.ts +13 -10
- package/layers/server/server.ts +4 -5
- package/layers/source/vite.config.ts +21 -1
- package/package.json +2 -1
- package/starters/campaign/README.md +9 -2
- package/starters/campaign/layers/rooms/server.ts +3 -3
- package/starters/campaign/layers/server/server.ts +3 -5
- package/starters/campaign/layers/tests/tests/rules.test.ts +40 -21
- package/starters/campaign/src/campaign/game.ts +26 -5
- package/starters/campaign/src/campaign/index.ts +104 -68
- package/starters/campaign/src/campaign/kills.ts +1 -1
- package/starters/campaign/src/campaign/missions/homecoming.ts +7 -7
- package/starters/campaign/src/campaign/missions/siege.ts +6 -6
- package/starters/campaign/src/campaign/missions/warlord.ts +13 -14
- package/starters/campaign/src/campaign/scenes.ts +8 -7
- package/starters/campaign/src/campaign/units.ts +59 -20
- package/starters/campaign/src/campaign/view/attacks.ts +19 -0
- package/starters/campaign/src/campaign/view/fire.ts +2 -2
- package/starters/campaign/src/campaign/view/index.ts +54 -43
- package/starters/campaign/src/campaign/waves.ts +18 -17
- package/starters/campaign/src/game.ts +8 -1
- package/starters/campaign/src/main.ts +38 -19
- package/starters/campaign/src/maps/fort.names.ts +2 -2
- package/starters/campaign/src/maps/fort.vgmap.json +102 -2
- package/starters/campaign/src/maps/homestead.names.ts +2 -2
- package/starters/campaign/src/maps/homestead.vgmap.json +85 -1
- package/starters/campaign/src/maps/pass.names.ts +2 -2
- package/starters/campaign/src/maps/pass.vgmap.json +69 -1
- package/starters/campaign/src/waves-panel.ts +2 -1
- package/starters/empty/README.md +18 -10
- package/starters/empty/layers/tests/tests/rules.test.ts +16 -17
- package/starters/empty/src/game.ts +11 -75
- package/starters/empty/src/generate.worker.ts +5 -5
- package/starters/empty/src/rules.ts +83 -25
- package/starters/empty/src/view.ts +82 -0
- package/starters/examples/README.md +83 -0
- package/starters/examples/layers/tests/tests/examples.test.ts +30 -0
- package/starters/examples/package.json +5 -0
- package/starters/examples/src/examples/abilities/areas.ts +165 -0
- package/starters/examples/src/examples/abilities/areasLooks.ts +30 -0
- package/starters/examples/src/examples/abilities/buffs.ts +287 -0
- package/starters/examples/src/examples/abilities/buffsLooks.ts +46 -0
- package/starters/examples/src/examples/abilities/changing.ts +228 -0
- package/starters/examples/src/examples/abilities/changingLooks.ts +61 -0
- package/starters/examples/src/examples/abilities/control.ts +158 -0
- package/starters/examples/src/examples/abilities/controlLooks.ts +78 -0
- package/starters/examples/src/examples/abilities/damage.ts +156 -0
- package/starters/examples/src/examples/abilities/damageLooks.ts +37 -0
- package/starters/examples/src/examples/abilities/family.ts +29 -0
- package/starters/examples/src/examples/abilities/index.ts +32 -0
- package/starters/examples/src/examples/abilities/kit.ts +179 -0
- package/starters/examples/src/examples/abilities/lookKit.ts +71 -0
- package/starters/examples/src/examples/abilities/looks.ts +47 -0
- package/starters/examples/src/examples/abilities/missiles.ts +203 -0
- package/starters/examples/src/examples/abilities/missilesLooks.ts +38 -0
- package/starters/examples/src/examples/abilities/moves.ts +206 -0
- package/starters/examples/src/examples/abilities/movesLooks.ts +52 -0
- package/starters/examples/src/examples/abilities/recasts.ts +181 -0
- package/starters/examples/src/examples/abilities/recastsLooks.ts +41 -0
- package/starters/examples/src/examples/abilities/resources.ts +166 -0
- package/starters/examples/src/examples/abilities/resourcesLooks.ts +42 -0
- package/starters/examples/src/examples/abilities/summons.ts +296 -0
- package/starters/examples/src/examples/abilities/summonsLooks.ts +115 -0
- package/starters/examples/src/examples/abilities/triggers.ts +204 -0
- package/starters/examples/src/examples/abilities/triggersLooks.ts +53 -0
- package/starters/examples/src/examples/abilities/vision.ts +137 -0
- package/starters/examples/src/examples/abilities/visionLooks.ts +50 -0
- package/starters/examples/src/examples/animation/index.ts +235 -0
- package/starters/examples/src/examples/animation/looks.ts +444 -0
- package/starters/examples/src/examples/catalog.ts +52 -0
- package/starters/examples/src/examples/cinematics/index.ts +217 -0
- package/starters/examples/src/examples/cinematics/looks.ts +476 -0
- package/starters/examples/src/examples/cinematics/tour.json +43 -0
- package/starters/examples/src/examples/cinematics/village.ts +88 -0
- package/starters/examples/src/examples/common/looks.ts +65 -0
- package/starters/examples/src/examples/common/units.ts +70 -0
- package/starters/examples/src/examples/construction/index.ts +329 -0
- package/starters/examples/src/examples/construction/looks.ts +275 -0
- package/starters/examples/src/examples/custom-animation/bones.ts +92 -0
- package/starters/examples/src/examples/custom-animation/index.ts +190 -0
- package/starters/examples/src/examples/custom-animation/looks.ts +523 -0
- package/starters/examples/src/examples/custom-animation/runes.ts +82 -0
- package/starters/examples/src/examples/custom-fx/glaive.look.ts +110 -0
- package/starters/examples/src/examples/custom-fx/glaive.ts +40 -0
- package/starters/examples/src/examples/custom-fx/gpu.look.ts +145 -0
- package/starters/examples/src/examples/custom-fx/gpu.ts +22 -0
- package/starters/examples/src/examples/custom-fx/index.ts +25 -0
- package/starters/examples/src/examples/custom-fx/lights.look.ts +144 -0
- package/starters/examples/src/examples/custom-fx/lights.ts +25 -0
- package/starters/examples/src/examples/custom-fx/looks.ts +36 -0
- package/starters/examples/src/examples/custom-fx/meteor.look.ts +133 -0
- package/starters/examples/src/examples/custom-fx/meteor.ts +26 -0
- package/starters/examples/src/examples/custom-fx/parts.look.ts +193 -0
- package/starters/examples/src/examples/custom-fx/parts.ts +21 -0
- package/starters/examples/src/examples/custom-fx/portal.look.ts +193 -0
- package/starters/examples/src/examples/custom-fx/portal.ts +48 -0
- package/starters/examples/src/examples/custom-fx/renderer.look.ts +139 -0
- package/starters/examples/src/examples/custom-fx/renderer.ts +18 -0
- package/starters/examples/src/examples/custom-fx/ribbons.look.ts +151 -0
- package/starters/examples/src/examples/custom-fx/ribbons.ts +22 -0
- package/starters/examples/src/examples/custom-fx/shader.ts +42 -0
- package/starters/examples/src/examples/custom-fx/shield.look.ts +226 -0
- package/starters/examples/src/examples/custom-fx/shield.ts +43 -0
- package/starters/examples/src/examples/define.ts +86 -0
- package/starters/examples/src/examples/destruction/index.ts +570 -0
- package/starters/examples/src/examples/destruction/looks.ts +447 -0
- package/starters/examples/src/examples/dialogs/index.ts +383 -0
- package/starters/examples/src/examples/dialogs/looks.ts +546 -0
- package/starters/examples/src/examples/dynamic-map/index.ts +603 -0
- package/starters/examples/src/examples/dynamic-map/looks.ts +301 -0
- package/starters/examples/src/examples/fx/blood.look.ts +62 -0
- package/starters/examples/src/examples/fx/blood.ts +59 -0
- package/starters/examples/src/examples/fx/feel.look.ts +86 -0
- package/starters/examples/src/examples/fx/feel.ts +57 -0
- package/starters/examples/src/examples/fx/fight.ts +28 -0
- package/starters/examples/src/examples/fx/floats.look.ts +108 -0
- package/starters/examples/src/examples/fx/floats.ts +24 -0
- package/starters/examples/src/examples/fx/gallery.look.ts +168 -0
- package/starters/examples/src/examples/fx/gallery.ts +23 -0
- package/starters/examples/src/examples/fx/index.ts +30 -0
- package/starters/examples/src/examples/fx/links.look.ts +83 -0
- package/starters/examples/src/examples/fx/links.ts +49 -0
- package/starters/examples/src/examples/fx/looks.ts +55 -0
- package/starters/examples/src/examples/fx/map.look.ts +93 -0
- package/starters/examples/src/examples/fx/map.ts +33 -0
- package/starters/examples/src/examples/fx/marks.look.ts +100 -0
- package/starters/examples/src/examples/fx/marks.ts +36 -0
- package/starters/examples/src/examples/fx/shots.look.ts +92 -0
- package/starters/examples/src/examples/fx/shots.ts +71 -0
- package/starters/examples/src/examples/fx/spells.look.ts +87 -0
- package/starters/examples/src/examples/fx/spells.ts +122 -0
- package/starters/examples/src/examples/fx/stage.ts +31 -0
- package/starters/examples/src/examples/gui/babylonScreen.ts +167 -0
- package/starters/examples/src/examples/gui/babylonWorld.ts +191 -0
- package/starters/examples/src/examples/gui/htmlPart.ts +95 -0
- package/starters/examples/src/examples/gui/index.ts +143 -0
- package/starters/examples/src/examples/gui/keys.ts +91 -0
- package/starters/examples/src/examples/gui/layout.ts +42 -0
- package/starters/examples/src/examples/gui/looks.ts +270 -0
- package/starters/examples/src/examples/gui/minimap.ts +127 -0
- package/starters/examples/src/examples/gui/ownInterface.ts +129 -0
- package/starters/examples/src/examples/gui/plates.ts +87 -0
- package/starters/examples/src/examples/gui/radial.ts +104 -0
- package/starters/examples/src/examples/gui/solidPart.ts +107 -0
- package/starters/examples/src/examples/looks.ts +45 -0
- package/starters/examples/src/examples/mechanics/battle.ts +51 -0
- package/starters/examples/src/examples/mechanics/damage.ts +80 -0
- package/starters/examples/src/examples/mechanics/flying.ts +93 -0
- package/starters/examples/src/examples/mechanics/formations.ts +58 -0
- package/starters/examples/src/examples/mechanics/highGround.ts +82 -0
- package/starters/examples/src/examples/mechanics/index.ts +44 -0
- package/starters/examples/src/examples/mechanics/looks.ts +289 -0
- package/starters/examples/src/examples/mechanics/maze.ts +119 -0
- package/starters/examples/src/examples/mechanics/orders.ts +68 -0
- package/starters/examples/src/examples/mechanics/selection.ts +30 -0
- package/starters/examples/src/examples/moba/index.ts +377 -0
- package/starters/examples/src/examples/moba/looks.ts +349 -0
- package/starters/examples/src/examples/moba/maps.ts +69 -0
- package/starters/examples/src/examples/moba/spells.ts +34 -0
- package/starters/examples/src/examples/moba/units.ts +196 -0
- package/starters/examples/src/examples/nature/camera.ts +15 -0
- package/starters/examples/src/examples/nature/grass.ts +64 -0
- package/starters/examples/src/examples/nature/index.ts +327 -0
- package/starters/examples/src/examples/nature/land.ts +173 -0
- package/starters/examples/src/examples/nature/looks.ts +577 -0
- package/starters/examples/src/examples/nature/maps.ts +370 -0
- package/starters/examples/src/examples/nature/skies.ts +324 -0
- package/starters/examples/src/examples/nature/weather.ts +80 -0
- package/starters/examples/src/examples/performance/index.ts +263 -0
- package/starters/examples/src/examples/performance/looks.ts +372 -0
- package/starters/examples/src/examples/performance/meter.ts +158 -0
- package/starters/examples/src/examples/post/grades.ts +86 -0
- package/starters/examples/src/examples/post/index.ts +202 -0
- package/starters/examples/src/examples/post/looks.ts +884 -0
- package/starters/examples/src/examples/post/passes.ts +213 -0
- package/starters/examples/src/examples/rts/ai.ts +49 -0
- package/starters/examples/src/examples/rts/airlift.ts +43 -0
- package/starters/examples/src/examples/rts/base.ts +129 -0
- package/starters/examples/src/examples/rts/build.ts +65 -0
- package/starters/examples/src/examples/rts/camps.ts +36 -0
- package/starters/examples/src/examples/rts/carry.ts +103 -0
- package/starters/examples/src/examples/rts/creeps.ts +61 -0
- package/starters/examples/src/examples/rts/data.ts +406 -0
- package/starters/examples/src/examples/rts/ferry.ts +41 -0
- package/starters/examples/src/examples/rts/garrison.ts +50 -0
- package/starters/examples/src/examples/rts/harvest.ts +29 -0
- package/starters/examples/src/examples/rts/hero.ts +67 -0
- package/starters/examples/src/examples/rts/index.ts +77 -0
- package/starters/examples/src/examples/rts/looks.ts +721 -0
- package/starters/examples/src/examples/rts/shop.ts +46 -0
- package/starters/examples/src/examples/rts/tech.ts +39 -0
- package/starters/examples/src/examples/rts/train.ts +48 -0
- package/starters/examples/src/examples/rts/waterside.ts +185 -0
- package/starters/examples/src/examples/showcase/index.ts +714 -0
- package/starters/examples/src/examples/showcase/looks.ts +238 -0
- package/starters/examples/src/game.ts +17 -0
- package/starters/examples/src/main.ts +82 -0
- package/starters/examples/src/rules.ts +31 -0
- package/starters/examples/src/shell/look.ts +79 -0
- package/starters/examples/src/shell/registry.ts +7 -0
- package/starters/examples/src/shell/scenes.ts +178 -0
- package/starters/examples/src/shell/shell.ts +290 -0
- package/starters/examples/src/shell/style.ts +202 -0
- package/starters/examples/src/view.ts +50 -0
- package/starters/melee/README.md +12 -3
- package/starters/melee/layers/tests/tests/heroes.test.ts +402 -0
- package/starters/melee/layers/tests/tests/rules.test.ts +10 -8
- package/starters/melee/src/game.ts +32 -2
- package/starters/melee/src/maps/bay.names.ts +2 -2
- package/starters/melee/src/maps/bay.vgmap.json +198 -1
- package/starters/melee/src/maps.ts +11 -9
- package/starters/melee/src/melee/abilities.ts +1 -194
- package/starters/melee/src/melee/blight.ts +7 -7
- package/starters/melee/src/melee/cellLayers.json +3 -3
- package/starters/melee/src/melee/data.json +1 -18
- package/starters/melee/src/melee/game.ts +6 -4
- package/starters/melee/src/melee/heroes.ts +1025 -0
- package/starters/melee/src/melee/index.ts +64 -61
- package/starters/melee/src/melee/items.ts +15 -362
- package/starters/melee/src/melee/languages/he.json +14 -2
- package/starters/melee/src/melee/pings.ts +5 -6
- package/starters/melee/src/melee/saves.ts +1 -1
- package/starters/melee/src/melee/undead.ts +15 -230
- package/starters/melee/src/melee/units.ts +37 -171
- package/starters/melee/src/melee/view/attacks.ts +19 -0
- package/starters/melee/src/melee/view/heroSpellLooks.ts +39 -8
- package/starters/melee/src/melee/view/index.ts +56 -52
- package/starters/melee/src/melee/view/looks.ts +86 -63
- package/starters/melee/src/melee/view/undeadLooks.ts +70 -31
- package/starters/melee/src/melee/view/walls.ts +1 -1
- package/starters.mjs +6 -0
- package/v12.mjs +14 -15
- package/starters/campaign/src/rules.ts +0 -20
- package/starters/empty/src/maps.ts +0 -44
- package/starters/empty/src/tiles.ts +0 -12
- package/starters/melee/src/melee/heroSpells.ts +0 -38
- package/starters/melee/src/rules.ts +0 -24
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AbilityDef, BuffDef, UnitTypeDef, UpgradeDef } from '@v12-engine/engine'
|
|
2
|
+
import { HOLLOW_HEROES } from './heroes'
|
|
2
3
|
import { catalogue } from './items'
|
|
3
4
|
|
|
4
5
|
/*
|
|
@@ -12,19 +13,18 @@ const RACE = 'undead'
|
|
|
12
13
|
|
|
13
14
|
export const acolyte: UnitTypeDef = {
|
|
14
15
|
id: 'acolyte',
|
|
15
|
-
armourType: 'medium',
|
|
16
16
|
race: RACE,
|
|
17
17
|
name: 'Acolyte',
|
|
18
18
|
kind: 'unit',
|
|
19
19
|
radius: 0.4,
|
|
20
20
|
stats: { health: 220, attackDamage: 8, attackSpeed: 0.6, attackRange: 0.4, moveSpeed: 4.05 },
|
|
21
21
|
sight: 8,
|
|
22
|
-
attacks: [{
|
|
22
|
+
attacks: [{ damagePoint: 0.4, acquisitionRange: 0, targets: ['unit', 'building'] }],
|
|
23
23
|
cost: { gold: 75 },
|
|
24
24
|
supply: 1,
|
|
25
25
|
buildTime: 10,
|
|
26
26
|
// gold, and only at a cursed mine: round it, handed in on the spot (`undeadHooks`)
|
|
27
|
-
harvester: { capacity: 10, gatherTime: 2,
|
|
27
|
+
harvester: { capacity: 10, gatherTime: 2, ids: ['gold'] },
|
|
28
28
|
builds: ['gravehold', 'cursedMine', 'boneSpire', 'crypt', 'graveyard', 'darkAltar', 'slaughterhouse', 'temple', 'spiritTower', 'tomb'],
|
|
29
29
|
hotkey: 'C',
|
|
30
30
|
threat: 1
|
|
@@ -32,7 +32,6 @@ export const acolyte: UnitTypeDef = {
|
|
|
32
32
|
|
|
33
33
|
export const ghoul: UnitTypeDef = {
|
|
34
34
|
id: 'ghoul',
|
|
35
|
-
armourType: 'medium',
|
|
36
35
|
race: RACE,
|
|
37
36
|
name: 'Ghoul',
|
|
38
37
|
kind: 'unit',
|
|
@@ -40,9 +39,9 @@ export const ghoul: UnitTypeDef = {
|
|
|
40
39
|
// fast and cheap, in numbers
|
|
41
40
|
stats: { health: 340, attackDamage: 13, attackSpeed: 1.4, attackRange: 0.5, armor: 0, moveSpeed: 4.6 },
|
|
42
41
|
sight: 10,
|
|
43
|
-
attacks: [{
|
|
42
|
+
attacks: [{ damagePoint: 0.35, acquisitionRange: 8 }],
|
|
44
43
|
// the Restless' lumber: a ghoul carries twice what a peasant does
|
|
45
|
-
harvester: { capacity: 20, gatherTime: 1.5,
|
|
44
|
+
harvester: { capacity: 20, gatherTime: 1.5, ids: ['lumber'] },
|
|
46
45
|
// to the computer player, both at once: it chops, and it fights (what the kit would infer too; said, so that a
|
|
47
46
|
// change to the kit's rules never makes it one or the other)
|
|
48
47
|
ai: { role: ['gatherer', 'soldier'] },
|
|
@@ -54,14 +53,13 @@ export const ghoul: UnitTypeDef = {
|
|
|
54
53
|
|
|
55
54
|
export const cryptCrawler: UnitTypeDef = {
|
|
56
55
|
id: 'cryptCrawler',
|
|
57
|
-
armourType: 'medium',
|
|
58
56
|
race: RACE,
|
|
59
57
|
name: 'Crypt Crawler',
|
|
60
58
|
kind: 'unit',
|
|
61
59
|
radius: 0.45,
|
|
62
60
|
stats: { health: 550, attackDamage: 26, attackSpeed: 0.5, attackRange: 5.5, armor: 5, moveSpeed: 3.8 },
|
|
63
61
|
sight: 11,
|
|
64
|
-
attacks: [{
|
|
62
|
+
attacks: [{ damagePoint: 0.35, acquisitionRange: 8, projectileSpeed: 20, targets: ['ground', 'air'] }],
|
|
65
63
|
abilities: ['web'],
|
|
66
64
|
cost: { gold: 215, lumber: 40 },
|
|
67
65
|
supply: 3,
|
|
@@ -72,14 +70,13 @@ export const cryptCrawler: UnitTypeDef = {
|
|
|
72
70
|
|
|
73
71
|
export const abomination: UnitTypeDef = {
|
|
74
72
|
id: 'abomination',
|
|
75
|
-
armourType: 'heavy',
|
|
76
73
|
race: RACE,
|
|
77
74
|
name: 'Abomination',
|
|
78
75
|
kind: 'unit',
|
|
79
76
|
radius: 0.65,
|
|
80
77
|
stats: { health: 1080, healthRegen: 1, attackDamage: 34, attackSpeed: 0.55, attackRange: 0.6, armor: 20, moveSpeed: 3.6 },
|
|
81
78
|
sight: 10,
|
|
82
|
-
attacks: [{
|
|
79
|
+
attacks: [{ damagePoint: 0.5, acquisitionRange: 8 }],
|
|
83
80
|
cost: { gold: 240, lumber: 70 },
|
|
84
81
|
supply: 4,
|
|
85
82
|
buildTime: 30,
|
|
@@ -89,7 +86,6 @@ export const abomination: UnitTypeDef = {
|
|
|
89
86
|
|
|
90
87
|
export const necromancer: UnitTypeDef = {
|
|
91
88
|
id: 'necromancer',
|
|
92
|
-
armourType: 'light',
|
|
93
89
|
race: RACE,
|
|
94
90
|
name: 'Necromancer',
|
|
95
91
|
kind: 'unit',
|
|
@@ -97,7 +93,7 @@ export const necromancer: UnitTypeDef = {
|
|
|
97
93
|
stats: { health: 280, mana: 200, manaRegen: 0.7, attackDamage: 11, attackSpeed: 0.6, attackRange: 6, moveSpeed: 4.05 },
|
|
98
94
|
initialMana: 75,
|
|
99
95
|
sight: 10,
|
|
100
|
-
attacks: [{
|
|
96
|
+
attacks: [{ damageType: 'magic', damagePoint: 0.4, acquisitionRange: 7, projectileSpeed: 16, targets: ['ground', 'air'] }],
|
|
101
97
|
abilities: ['raiseDead', 'unholyFrenzy', 'cripple'],
|
|
102
98
|
cost: { gold: 145, lumber: 10 },
|
|
103
99
|
supply: 2,
|
|
@@ -108,7 +104,6 @@ export const necromancer: UnitTypeDef = {
|
|
|
108
104
|
|
|
109
105
|
export const gargoyle: UnitTypeDef = {
|
|
110
106
|
id: 'gargoyle',
|
|
111
|
-
armourType: 'light',
|
|
112
107
|
race: RACE,
|
|
113
108
|
name: 'Gargoyle',
|
|
114
109
|
kind: 'unit',
|
|
@@ -117,7 +112,7 @@ export const gargoyle: UnitTypeDef = {
|
|
|
117
112
|
stats: { health: 450, attackDamage: 30, attackSpeed: 0.6, attackRange: 3.5, armor: 15, magicResist: 15, moveSpeed: 5 },
|
|
118
113
|
sight: 12,
|
|
119
114
|
turnRate: 6,
|
|
120
|
-
attacks: [{
|
|
115
|
+
attacks: [{ damagePoint: 0.4, acquisitionRange: 8, projectileSpeed: 16, targets: ['ground', 'air'] }],
|
|
121
116
|
cost: { gold: 185, lumber: 30 },
|
|
122
117
|
supply: 2,
|
|
123
118
|
buildTime: 25,
|
|
@@ -125,91 +120,15 @@ export const gargoyle: UnitTypeDef = {
|
|
|
125
120
|
hotkey: 'R'
|
|
126
121
|
}
|
|
127
122
|
|
|
128
|
-
// ---- heroes
|
|
129
|
-
|
|
130
|
-
export const deathKnight: UnitTypeDef = {
|
|
131
|
-
id: 'deathKnight',
|
|
132
|
-
armourType: 'hero',
|
|
133
|
-
race: RACE,
|
|
134
|
-
name: 'Death Knight',
|
|
135
|
-
kind: 'unit',
|
|
136
|
-
radius: 0.5,
|
|
137
|
-
stats: {
|
|
138
|
-
health: 640,
|
|
139
|
-
healthRegen: 1.2,
|
|
140
|
-
mana: 280,
|
|
141
|
-
manaRegen: 1.6,
|
|
142
|
-
attackDamage: 54,
|
|
143
|
-
attackSpeed: 0.65,
|
|
144
|
-
attackRange: 0.6,
|
|
145
|
-
armor: 38,
|
|
146
|
-
magicResist: 32,
|
|
147
|
-
moveSpeed: 4.4
|
|
148
|
-
},
|
|
149
|
-
sight: 12,
|
|
150
|
-
attacks: [{ attackType: 'hero', damagePoint: 0.45, acquisitionRange: 8 }],
|
|
151
|
-
hero: {
|
|
152
|
-
growth: {
|
|
153
|
-
stats: { health: 96, healthRegen: 0.1, mana: 55, manaRegen: 0.2, attackDamage: 3.6, armor: 4.1, magicResist: 2.05 },
|
|
154
|
-
percent: { attackSpeed: 0.02 }
|
|
155
|
-
},
|
|
156
|
-
learns: ['deathCoil', 'unholyAura', 'darkCharge', 'animateDead'],
|
|
157
|
-
spells: ['barrier', 'flash']
|
|
158
|
-
},
|
|
159
|
-
inventory: 6,
|
|
160
|
-
cost: { gold: 425, lumber: 100 },
|
|
161
|
-
supply: 5,
|
|
162
|
-
buildTime: 45,
|
|
163
|
-
hotkey: 'D',
|
|
164
|
-
threat: 3
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
export const lich: UnitTypeDef = {
|
|
168
|
-
id: 'lich',
|
|
169
|
-
armourType: 'hero',
|
|
170
|
-
race: RACE,
|
|
171
|
-
name: 'Lich',
|
|
172
|
-
kind: 'unit',
|
|
173
|
-
radius: 0.5,
|
|
174
|
-
stats: {
|
|
175
|
-
health: 560,
|
|
176
|
-
healthRegen: 0.9,
|
|
177
|
-
mana: 400,
|
|
178
|
-
manaRegen: 2,
|
|
179
|
-
attackDamage: 44,
|
|
180
|
-
attackSpeed: 0.6,
|
|
181
|
-
attackRange: 6,
|
|
182
|
-
armor: 24,
|
|
183
|
-
magicResist: 30,
|
|
184
|
-
moveSpeed: 4.1
|
|
185
|
-
},
|
|
186
|
-
sight: 12,
|
|
187
|
-
attacks: [{ attackType: 'hero', damageType: 'magic', damagePoint: 0.4, acquisitionRange: 8, projectileSpeed: 18, targets: ['ground', 'air'] }],
|
|
188
|
-
hero: {
|
|
189
|
-
growth: {
|
|
190
|
-
stats: { health: 80, healthRegen: 0.08, mana: 75, manaRegen: 0.25, attackDamage: 3, armor: 3.5, magicResist: 2 },
|
|
191
|
-
percent: { attackSpeed: 0.015 }
|
|
192
|
-
},
|
|
193
|
-
learns: ['frostNova', 'frostArmor', 'darkAura', 'deathAndDecay'],
|
|
194
|
-
spells: ['barrier', 'flash']
|
|
195
|
-
},
|
|
196
|
-
inventory: 6,
|
|
197
|
-
cost: { gold: 425, lumber: 100 },
|
|
198
|
-
supply: 5,
|
|
199
|
-
buildTime: 45,
|
|
200
|
-
hotkey: 'L',
|
|
201
|
-
threat: 3
|
|
202
|
-
}
|
|
203
|
-
|
|
204
123
|
// ---- buildings
|
|
205
124
|
|
|
206
125
|
// gold is handed in at the cursed mine: a hall takes the lumber
|
|
207
|
-
const HALL: Pick<UnitTypeDef, 'kind' | 'radius' | 'footprint' | 'sight' | '
|
|
126
|
+
const HALL: Pick<UnitTypeDef, 'kind' | 'radius' | 'footprint' | 'sight' | 'supplyGiven' | 'trains' | 'dropOff' | 'buildsItself'> = {
|
|
208
127
|
kind: 'building',
|
|
209
128
|
radius: 2,
|
|
210
129
|
footprint: { w: 4, d: 4 },
|
|
211
130
|
sight: 12,
|
|
212
|
-
|
|
131
|
+
supplyGiven: 12,
|
|
213
132
|
trains: ['acolyte'],
|
|
214
133
|
dropOff: ['lumber'],
|
|
215
134
|
buildsItself: true
|
|
@@ -218,7 +137,6 @@ const HALL: Pick<UnitTypeDef, 'kind' | 'radius' | 'footprint' | 'sight' | 'suppl
|
|
|
218
137
|
export const gravehold: UnitTypeDef = {
|
|
219
138
|
...HALL,
|
|
220
139
|
id: 'gravehold',
|
|
221
|
-
armourType: 'fortified',
|
|
222
140
|
race: RACE,
|
|
223
141
|
name: 'Gravehold',
|
|
224
142
|
trains: ['acolyte'],
|
|
@@ -232,7 +150,6 @@ export const gravehold: UnitTypeDef = {
|
|
|
232
150
|
export const hallOfBones: UnitTypeDef = {
|
|
233
151
|
...HALL,
|
|
234
152
|
id: 'hallOfBones',
|
|
235
|
-
armourType: 'fortified',
|
|
236
153
|
race: RACE,
|
|
237
154
|
name: 'Hall of Bones',
|
|
238
155
|
trains: ['acolyte'],
|
|
@@ -247,7 +164,6 @@ export const hallOfBones: UnitTypeDef = {
|
|
|
247
164
|
export const duskCitadel: UnitTypeDef = {
|
|
248
165
|
...HALL,
|
|
249
166
|
id: 'duskCitadel',
|
|
250
|
-
armourType: 'fortified',
|
|
251
167
|
race: RACE,
|
|
252
168
|
name: 'Dusk Citadel',
|
|
253
169
|
trains: ['acolyte'],
|
|
@@ -260,7 +176,6 @@ export const duskCitadel: UnitTypeDef = {
|
|
|
260
176
|
|
|
261
177
|
export const cursedMine: UnitTypeDef = {
|
|
262
178
|
id: 'cursedMine',
|
|
263
|
-
armourType: 'fortified',
|
|
264
179
|
race: RACE,
|
|
265
180
|
buildsItself: true,
|
|
266
181
|
name: 'Cursed Mine',
|
|
@@ -280,7 +195,6 @@ export const cursedMine: UnitTypeDef = {
|
|
|
280
195
|
|
|
281
196
|
export const boneSpire: UnitTypeDef = {
|
|
282
197
|
id: 'boneSpire',
|
|
283
|
-
armourType: 'fortified',
|
|
284
198
|
race: RACE,
|
|
285
199
|
buildsItself: true,
|
|
286
200
|
name: 'Bone Spire',
|
|
@@ -292,13 +206,12 @@ export const boneSpire: UnitTypeDef = {
|
|
|
292
206
|
cost: { gold: 150 },
|
|
293
207
|
buildTime: 15,
|
|
294
208
|
// more food than a farm, for more gold and no lumber
|
|
295
|
-
|
|
209
|
+
supplyGiven: 8,
|
|
296
210
|
hotkey: 'Z'
|
|
297
211
|
}
|
|
298
212
|
|
|
299
213
|
export const crypt: UnitTypeDef = {
|
|
300
214
|
id: 'crypt',
|
|
301
|
-
armourType: 'fortified',
|
|
302
215
|
race: RACE,
|
|
303
216
|
buildsItself: true,
|
|
304
217
|
name: 'Crypt',
|
|
@@ -315,7 +228,6 @@ export const crypt: UnitTypeDef = {
|
|
|
315
228
|
|
|
316
229
|
export const graveyard: UnitTypeDef = {
|
|
317
230
|
id: 'graveyard',
|
|
318
|
-
armourType: 'fortified',
|
|
319
231
|
race: RACE,
|
|
320
232
|
buildsItself: true,
|
|
321
233
|
name: 'Graveyard',
|
|
@@ -335,7 +247,6 @@ export const graveyard: UnitTypeDef = {
|
|
|
335
247
|
|
|
336
248
|
export const darkAltar: UnitTypeDef = {
|
|
337
249
|
id: 'darkAltar',
|
|
338
|
-
armourType: 'fortified',
|
|
339
250
|
race: RACE,
|
|
340
251
|
buildsItself: true,
|
|
341
252
|
name: 'Dark Altar',
|
|
@@ -346,14 +257,14 @@ export const darkAltar: UnitTypeDef = {
|
|
|
346
257
|
sight: 9,
|
|
347
258
|
cost: { gold: 180, lumber: 50 },
|
|
348
259
|
buildTime: 30,
|
|
349
|
-
|
|
260
|
+
// the Restless' heroes (`heroes.ts`)
|
|
261
|
+
trains: HOLLOW_HEROES,
|
|
350
262
|
revives: true,
|
|
351
263
|
hotkey: 'A'
|
|
352
264
|
}
|
|
353
265
|
|
|
354
266
|
export const slaughterhouse: UnitTypeDef = {
|
|
355
267
|
id: 'slaughterhouse',
|
|
356
|
-
armourType: 'fortified',
|
|
357
268
|
race: RACE,
|
|
358
269
|
buildsItself: true,
|
|
359
270
|
name: 'Slaughterhouse',
|
|
@@ -371,7 +282,6 @@ export const slaughterhouse: UnitTypeDef = {
|
|
|
371
282
|
|
|
372
283
|
export const temple: UnitTypeDef = {
|
|
373
284
|
id: 'temple',
|
|
374
|
-
armourType: 'fortified',
|
|
375
285
|
race: RACE,
|
|
376
286
|
buildsItself: true,
|
|
377
287
|
name: 'Temple of Shades',
|
|
@@ -389,7 +299,6 @@ export const temple: UnitTypeDef = {
|
|
|
389
299
|
|
|
390
300
|
export const spiritTower: UnitTypeDef = {
|
|
391
301
|
id: 'spiritTower',
|
|
392
|
-
armourType: 'fortified',
|
|
393
302
|
race: RACE,
|
|
394
303
|
buildsItself: true,
|
|
395
304
|
name: 'Spirit Tower',
|
|
@@ -398,7 +307,7 @@ export const spiritTower: UnitTypeDef = {
|
|
|
398
307
|
footprint: { w: 2, d: 2 },
|
|
399
308
|
stats: { health: 1300, attackDamage: 55, attackSpeed: 0.9, attackRange: 8, armor: 40, magicResist: 40 },
|
|
400
309
|
sight: 12,
|
|
401
|
-
attacks: [{
|
|
310
|
+
attacks: [{ damageType: 'magic', damagePoint: 0.3, acquisitionRange: 8, projectileSpeed: 22, targets: ['ground', 'air'] }],
|
|
402
311
|
cost: { gold: 145, lumber: 40 },
|
|
403
312
|
buildTime: 20,
|
|
404
313
|
requires: ['crypt'],
|
|
@@ -407,7 +316,6 @@ export const spiritTower: UnitTypeDef = {
|
|
|
407
316
|
|
|
408
317
|
export const tomb: UnitTypeDef = {
|
|
409
318
|
id: 'tomb',
|
|
410
|
-
armourType: 'fortified',
|
|
411
319
|
race: RACE,
|
|
412
320
|
buildsItself: true,
|
|
413
321
|
name: 'Reliquary',
|
|
@@ -430,8 +338,6 @@ export const undeadUnits: UnitTypeDef[] = [
|
|
|
430
338
|
abomination,
|
|
431
339
|
necromancer,
|
|
432
340
|
gargoyle,
|
|
433
|
-
deathKnight,
|
|
434
|
-
lich,
|
|
435
341
|
gravehold,
|
|
436
342
|
hallOfBones,
|
|
437
343
|
duskCitadel,
|
|
@@ -493,31 +399,6 @@ export const undeadUpgrades: UpgradeDef[] = [
|
|
|
493
399
|
// ---- what they do
|
|
494
400
|
|
|
495
401
|
export const undeadBuffs: BuffDef[] = [
|
|
496
|
-
{
|
|
497
|
-
id: 'unholy',
|
|
498
|
-
name: 'Unholy Aura',
|
|
499
|
-
description: 'Moves faster and heals near a Death Knight',
|
|
500
|
-
percent: { moveSpeed: [0.1, 0.15, 0.2] },
|
|
501
|
-
stats: { healthRegen: [1, 2, 3] }
|
|
502
|
-
},
|
|
503
|
-
{ id: 'dark', name: 'Dark Aura', description: 'Mana comes back faster near a Lich', stats: { manaRegen: [0.75, 1.5, 2.25] } },
|
|
504
|
-
{
|
|
505
|
-
id: 'darkCharge',
|
|
506
|
-
name: 'Dark Charge',
|
|
507
|
-
description: 'Rides hard: faster, and harder to hurt',
|
|
508
|
-
duration: 6,
|
|
509
|
-
percent: { moveSpeed: 0.4 },
|
|
510
|
-
stats: { armor: [10, 20, 30] }
|
|
511
|
-
},
|
|
512
|
-
{ id: 'frostArmor', name: 'Frost Armor', description: 'Ice over it: more armor', duration: 30, stats: { armor: [15, 25, 35] } },
|
|
513
|
-
{
|
|
514
|
-
id: 'chilled',
|
|
515
|
-
name: 'Chilled',
|
|
516
|
-
description: 'Moves and attacks slower',
|
|
517
|
-
duration: 4,
|
|
518
|
-
harmful: true,
|
|
519
|
-
percent: { moveSpeed: -0.4, attackSpeed: -0.25 }
|
|
520
|
-
},
|
|
521
402
|
{
|
|
522
403
|
id: 'unholyFrenzy',
|
|
523
404
|
name: 'Unholy Frenzy',
|
|
@@ -545,102 +426,6 @@ export const undeadBuffs: BuffDef[] = [
|
|
|
545
426
|
]
|
|
546
427
|
|
|
547
428
|
export const undeadAbilities: AbilityDef[] = [
|
|
548
|
-
// ---- Death Knight
|
|
549
|
-
{
|
|
550
|
-
id: 'deathCoil',
|
|
551
|
-
name: 'Death Coil',
|
|
552
|
-
description: 'Hits an enemy for 100, 175 or 250 (+70% ability power)',
|
|
553
|
-
hotkey: 'C',
|
|
554
|
-
target: 'unit',
|
|
555
|
-
targets: { enemies: true },
|
|
556
|
-
manaCost: 75,
|
|
557
|
-
cooldown: 6,
|
|
558
|
-
range: 8,
|
|
559
|
-
castTime: 0.3,
|
|
560
|
-
effects: [{ type: 'damage', amount: [100, 175, 250], scaling: { abilityPower: 0.7 } }]
|
|
561
|
-
},
|
|
562
|
-
{
|
|
563
|
-
id: 'unholyAura',
|
|
564
|
-
name: 'Unholy Aura',
|
|
565
|
-
description: 'Friendly units nearby move 10, 15 or 20% faster and heal 1, 2 or 3 a second',
|
|
566
|
-
target: 'passive',
|
|
567
|
-
effects: [{ type: 'aura', buff: 'unholy', radius: 9 }]
|
|
568
|
-
},
|
|
569
|
-
{
|
|
570
|
-
id: 'darkCharge',
|
|
571
|
-
name: 'Dark Charge',
|
|
572
|
-
description: 'For 6 seconds: 40% faster and 10, 20 or 30 more armor',
|
|
573
|
-
hotkey: 'E',
|
|
574
|
-
target: 'none',
|
|
575
|
-
manaCost: 60,
|
|
576
|
-
cooldown: 14,
|
|
577
|
-
effects: [{ type: 'buff', buff: 'darkCharge', on: 'caster' }]
|
|
578
|
-
},
|
|
579
|
-
{
|
|
580
|
-
id: 'animateDead',
|
|
581
|
-
name: 'Animate Dead',
|
|
582
|
-
description: 'Raises six skeletons from the bodies around the hero, for 40 seconds',
|
|
583
|
-
hotkey: 'R',
|
|
584
|
-
target: 'none',
|
|
585
|
-
manaCost: 175,
|
|
586
|
-
cooldown: 120,
|
|
587
|
-
maxLevel: 1,
|
|
588
|
-
requiresLevel: 6,
|
|
589
|
-
effects: [{ type: 'raiseDead', unit: 'skeleton', count: 6, radius: 9, duration: 40 }]
|
|
590
|
-
},
|
|
591
|
-
|
|
592
|
-
// ---- Lich
|
|
593
|
-
{
|
|
594
|
-
id: 'frostNova',
|
|
595
|
-
name: 'Frost Nova',
|
|
596
|
-
description: 'Hits an enemy and those around it for 70, 120 or 170 (+60% ability power), and chills them for 4 seconds',
|
|
597
|
-
hotkey: 'Q',
|
|
598
|
-
target: 'unit',
|
|
599
|
-
targets: { enemies: true },
|
|
600
|
-
manaCost: 100,
|
|
601
|
-
cooldown: 8,
|
|
602
|
-
range: 8,
|
|
603
|
-
castTime: 0.3,
|
|
604
|
-
effects: [
|
|
605
|
-
{ type: 'damage', amount: [70, 120, 170], scaling: { abilityPower: 0.6 }, radius: 2.5 },
|
|
606
|
-
{ type: 'buff', buff: 'chilled', radius: 2.5 }
|
|
607
|
-
]
|
|
608
|
-
},
|
|
609
|
-
{
|
|
610
|
-
id: 'frostArmor',
|
|
611
|
-
name: 'Frost Armor',
|
|
612
|
-
description: 'Covers a friendly unit in ice: 15, 25 or 35 more armor for 30 seconds',
|
|
613
|
-
hotkey: 'W',
|
|
614
|
-
target: 'unit',
|
|
615
|
-
targets: { allies: true, self: true },
|
|
616
|
-
manaCost: 40,
|
|
617
|
-
cooldown: 2,
|
|
618
|
-
range: 8,
|
|
619
|
-
castTime: 0.3,
|
|
620
|
-
effects: [{ type: 'buff', buff: 'frostArmor' }]
|
|
621
|
-
},
|
|
622
|
-
{
|
|
623
|
-
id: 'darkAura',
|
|
624
|
-
name: 'Dark Aura',
|
|
625
|
-
description: 'Friendly units nearby regain 0.75, 1.5 or 2.25 more mana per second',
|
|
626
|
-
target: 'passive',
|
|
627
|
-
effects: [{ type: 'aura', buff: 'dark', radius: 9 }]
|
|
628
|
-
},
|
|
629
|
-
{
|
|
630
|
-
id: 'deathAndDecay',
|
|
631
|
-
name: 'Death and Decay',
|
|
632
|
-
description: 'Rots everything in an area for 300 (+90% ability power)',
|
|
633
|
-
hotkey: 'R',
|
|
634
|
-
target: 'point',
|
|
635
|
-
manaCost: 200,
|
|
636
|
-
cooldown: 90,
|
|
637
|
-
range: 9,
|
|
638
|
-
maxLevel: 1,
|
|
639
|
-
requiresLevel: 6,
|
|
640
|
-
castTime: 0.8,
|
|
641
|
-
effects: [{ type: 'damage', amount: 300, scaling: { abilityPower: 0.9 }, radius: 4.5 }]
|
|
642
|
-
},
|
|
643
|
-
|
|
644
429
|
// ---- the rest
|
|
645
430
|
{
|
|
646
431
|
id: 'unholyFrenzy',
|