diff --git a/index.html b/index.html index 4528b2a..51830cf 100644 --- a/index.html +++ b/index.html @@ -6,6 +6,18 @@ Bastion: The Watcher's Lament + + + + + + diff --git a/public/aclonica.woff2 b/public/aclonica.woff2 deleted file mode 100644 index ac9c610..0000000 Binary files a/public/aclonica.woff2 and /dev/null differ diff --git a/public/assets/creeps/basic/0.png b/public/assets/creeps/basic/0.png deleted file mode 100644 index 05b90b7..0000000 Binary files a/public/assets/creeps/basic/0.png and /dev/null differ diff --git a/public/assets/creeps/basic/1.png b/public/assets/creeps/basic/1.png deleted file mode 100644 index d978a9a..0000000 Binary files a/public/assets/creeps/basic/1.png and /dev/null differ diff --git a/public/assets/creeps/basic/10.png b/public/assets/creeps/basic/10.png deleted file mode 100644 index 48b4f7d..0000000 Binary files a/public/assets/creeps/basic/10.png and /dev/null differ diff --git a/public/assets/creeps/basic/11.png b/public/assets/creeps/basic/11.png deleted file mode 100644 index d978a9a..0000000 Binary files a/public/assets/creeps/basic/11.png and /dev/null differ diff --git a/public/assets/creeps/basic/2.png b/public/assets/creeps/basic/2.png deleted file mode 100644 index 48b4f7d..0000000 Binary files a/public/assets/creeps/basic/2.png and /dev/null differ diff --git a/public/assets/creeps/basic/3.png b/public/assets/creeps/basic/3.png deleted file mode 100644 index 06a46df..0000000 Binary files a/public/assets/creeps/basic/3.png and /dev/null differ diff --git a/public/assets/creeps/basic/4.png b/public/assets/creeps/basic/4.png deleted file mode 100644 index 139737c..0000000 Binary files a/public/assets/creeps/basic/4.png and /dev/null differ diff --git a/public/assets/creeps/basic/5.png b/public/assets/creeps/basic/5.png deleted file mode 100644 index fac6dd7..0000000 Binary files a/public/assets/creeps/basic/5.png and /dev/null differ diff --git a/public/assets/creeps/basic/6.png b/public/assets/creeps/basic/6.png deleted file mode 100644 index db9bc87..0000000 Binary files a/public/assets/creeps/basic/6.png and /dev/null differ diff --git a/public/assets/creeps/basic/7.png b/public/assets/creeps/basic/7.png deleted file mode 100644 index fac6dd7..0000000 Binary files a/public/assets/creeps/basic/7.png and /dev/null differ diff --git a/public/assets/creeps/basic/8.png b/public/assets/creeps/basic/8.png deleted file mode 100644 index 139737c..0000000 Binary files a/public/assets/creeps/basic/8.png and /dev/null differ diff --git a/public/assets/creeps/basic/9.png b/public/assets/creeps/basic/9.png deleted file mode 100644 index 06a46df..0000000 Binary files a/public/assets/creeps/basic/9.png and /dev/null differ diff --git a/public/assets/creeps/cloaker/0.png b/public/assets/creeps/cloaker/0.png deleted file mode 100644 index bcbc3af..0000000 Binary files a/public/assets/creeps/cloaker/0.png and /dev/null differ diff --git a/public/assets/creeps/cloaker/1.png b/public/assets/creeps/cloaker/1.png deleted file mode 100644 index 200bc9e..0000000 Binary files a/public/assets/creeps/cloaker/1.png and /dev/null differ diff --git a/public/assets/creeps/cloaker/10.png b/public/assets/creeps/cloaker/10.png deleted file mode 100644 index 3df93f8..0000000 Binary files a/public/assets/creeps/cloaker/10.png and /dev/null differ diff --git a/public/assets/creeps/cloaker/11.png b/public/assets/creeps/cloaker/11.png deleted file mode 100644 index 2512c1c..0000000 Binary files a/public/assets/creeps/cloaker/11.png and /dev/null differ diff --git a/public/assets/creeps/cloaker/2.png b/public/assets/creeps/cloaker/2.png deleted file mode 100644 index 5e0d41c..0000000 Binary files a/public/assets/creeps/cloaker/2.png and /dev/null differ diff --git a/public/assets/creeps/cloaker/3.png b/public/assets/creeps/cloaker/3.png deleted file mode 100644 index 779efea..0000000 Binary files a/public/assets/creeps/cloaker/3.png and /dev/null differ diff --git a/public/assets/creeps/cloaker/4.png b/public/assets/creeps/cloaker/4.png deleted file mode 100644 index 95924e0..0000000 Binary files a/public/assets/creeps/cloaker/4.png and /dev/null differ diff --git a/public/assets/creeps/cloaker/5.png b/public/assets/creeps/cloaker/5.png deleted file mode 100644 index 56ce34e..0000000 Binary files a/public/assets/creeps/cloaker/5.png and /dev/null differ diff --git a/public/assets/creeps/cloaker/6.png b/public/assets/creeps/cloaker/6.png deleted file mode 100644 index da52a20..0000000 Binary files a/public/assets/creeps/cloaker/6.png and /dev/null differ diff --git a/public/assets/creeps/cloaker/7.png b/public/assets/creeps/cloaker/7.png deleted file mode 100644 index 4baad15..0000000 Binary files a/public/assets/creeps/cloaker/7.png and /dev/null differ diff --git a/public/assets/creeps/cloaker/8.png b/public/assets/creeps/cloaker/8.png deleted file mode 100644 index 5030dca..0000000 Binary files a/public/assets/creeps/cloaker/8.png and /dev/null differ diff --git a/public/assets/creeps/cloaker/9.png b/public/assets/creeps/cloaker/9.png deleted file mode 100644 index 4ac8690..0000000 Binary files a/public/assets/creeps/cloaker/9.png and /dev/null differ diff --git a/public/assets/creeps/demon/0.png b/public/assets/creeps/demon/0.png deleted file mode 100644 index 4981186..0000000 Binary files a/public/assets/creeps/demon/0.png and /dev/null differ diff --git a/public/assets/creeps/demon/1.png b/public/assets/creeps/demon/1.png deleted file mode 100644 index c082f4d..0000000 Binary files a/public/assets/creeps/demon/1.png and /dev/null differ diff --git a/public/assets/creeps/demon/2.png b/public/assets/creeps/demon/2.png deleted file mode 100644 index 284d170..0000000 Binary files a/public/assets/creeps/demon/2.png and /dev/null differ diff --git a/public/assets/creeps/demon/3.png b/public/assets/creeps/demon/3.png deleted file mode 100644 index 22e9cc8..0000000 Binary files a/public/assets/creeps/demon/3.png and /dev/null differ diff --git a/public/assets/creeps/demon/4.png b/public/assets/creeps/demon/4.png deleted file mode 100644 index 14e592a..0000000 Binary files a/public/assets/creeps/demon/4.png and /dev/null differ diff --git a/public/assets/creeps/demon/5.png b/public/assets/creeps/demon/5.png deleted file mode 100644 index 0590e06..0000000 Binary files a/public/assets/creeps/demon/5.png and /dev/null differ diff --git a/public/assets/creeps/demon/6.png b/public/assets/creeps/demon/6.png deleted file mode 100644 index d59ee3e..0000000 Binary files a/public/assets/creeps/demon/6.png and /dev/null differ diff --git a/public/assets/creeps/demon/7.png b/public/assets/creeps/demon/7.png deleted file mode 100644 index f40d8ab..0000000 Binary files a/public/assets/creeps/demon/7.png and /dev/null differ diff --git a/public/assets/creeps/demon_spritesheet.png b/public/assets/creeps/demon_spritesheet.png new file mode 100644 index 0000000..7e85eeb Binary files /dev/null and b/public/assets/creeps/demon_spritesheet.png differ diff --git a/public/assets/creeps/hood_spritesheet.png b/public/assets/creeps/hood_spritesheet.png new file mode 100644 index 0000000..0ed174f Binary files /dev/null and b/public/assets/creeps/hood_spritesheet.png differ diff --git a/public/assets/creeps/maker/0.png b/public/assets/creeps/maker/0.png deleted file mode 100644 index 042a582..0000000 Binary files a/public/assets/creeps/maker/0.png and /dev/null differ diff --git a/public/assets/creeps/maker/1.png b/public/assets/creeps/maker/1.png deleted file mode 100644 index 042a582..0000000 Binary files a/public/assets/creeps/maker/1.png and /dev/null differ diff --git a/public/assets/creeps/maker/10.png b/public/assets/creeps/maker/10.png deleted file mode 100644 index 55fa573..0000000 Binary files a/public/assets/creeps/maker/10.png and /dev/null differ diff --git a/public/assets/creeps/maker/2.png b/public/assets/creeps/maker/2.png deleted file mode 100644 index 55fa573..0000000 Binary files a/public/assets/creeps/maker/2.png and /dev/null differ diff --git a/public/assets/creeps/maker/3.png b/public/assets/creeps/maker/3.png deleted file mode 100644 index 59275bc..0000000 Binary files a/public/assets/creeps/maker/3.png and /dev/null differ diff --git a/public/assets/creeps/maker/4.png b/public/assets/creeps/maker/4.png deleted file mode 100644 index e120c5c..0000000 Binary files a/public/assets/creeps/maker/4.png and /dev/null differ diff --git a/public/assets/creeps/maker/5.png b/public/assets/creeps/maker/5.png deleted file mode 100644 index 510cbc1..0000000 Binary files a/public/assets/creeps/maker/5.png and /dev/null differ diff --git a/public/assets/creeps/maker/6.png b/public/assets/creeps/maker/6.png deleted file mode 100644 index 3ded504..0000000 Binary files a/public/assets/creeps/maker/6.png and /dev/null differ diff --git a/public/assets/creeps/maker/7.png b/public/assets/creeps/maker/7.png deleted file mode 100644 index 510cbc1..0000000 Binary files a/public/assets/creeps/maker/7.png and /dev/null differ diff --git a/public/assets/creeps/maker/8.png b/public/assets/creeps/maker/8.png deleted file mode 100644 index e120c5c..0000000 Binary files a/public/assets/creeps/maker/8.png and /dev/null differ diff --git a/public/assets/creeps/maker/9.png b/public/assets/creeps/maker/9.png deleted file mode 100644 index 59275bc..0000000 Binary files a/public/assets/creeps/maker/9.png and /dev/null differ diff --git a/public/assets/creeps/optimize.cjs b/public/assets/creeps/optimize.cjs index 110dbf5..cea9e1c 100644 --- a/public/assets/creeps/optimize.cjs +++ b/public/assets/creeps/optimize.cjs @@ -1,18 +1,20 @@ + const fs = require('fs'); const { exec, execSync } = require('child_process'); let dir = fs.readdirSync('.'); -dir.forEach((item) => { - const itemPath = `./${item}`; - if (fs.lstatSync(itemPath).isDirectory()) { - let subDir = fs.readdirSync(itemPath); - subDir.forEach(async (subItem) => { - const subItemPath = `${itemPath}/${subItem}`; - if (fs.lstatSync(subItemPath).isFile() && subItem.endsWith('.png')) { - const outputFilePath = `${itemPath}/${subItem.replace('.png', 's.png')}`; - await execSync(`convert -resize 128x128 -quality 80 ${subItemPath} ${outputFilePath}`); - fs.unlinkSync(subItemPath); - fs.renameSync(outputFilePath, subItemPath); - } - }); - } -}); +// dir.forEach((item) => { +// const itemPath = `./${item}`; +// if (fs.lstatSync(itemPath).isDirectory()) { +// let subDir = fs.readdirSync(itemPath); +// subDir.forEach(async (subItem) => { +// const subItemPath = `${itemPath}/${subItem}`; +// if (fs.lstatSync(subItemPath).isFile() && subItem.endsWith('.png')) { +// const outputFilePath = `${itemPath}/${subItem.replace('.png', 's.png')}`; +// await execSync(`convert -resize 128x128 -quality 80 ${subItemPath} ${outputFilePath}`); +// fs.unlinkSync(subItemPath); +// fs.renameSync(outputFilePath, subItemPath); +// } +// }); +// } +// }); +// Disabled for now, dont need to optimize assets. diff --git a/public/assets/creeps/pumpkin_spritesheet.png b/public/assets/creeps/pumpkin_spritesheet.png new file mode 100644 index 0000000..1e0a57f Binary files /dev/null and b/public/assets/creeps/pumpkin_spritesheet.png differ diff --git a/public/assets/creeps/quick/0.png b/public/assets/creeps/quick/0.png deleted file mode 100644 index 516c3c1..0000000 Binary files a/public/assets/creeps/quick/0.png and /dev/null differ diff --git a/public/assets/creeps/quick/1.png b/public/assets/creeps/quick/1.png deleted file mode 100644 index 409cd58..0000000 Binary files a/public/assets/creeps/quick/1.png and /dev/null differ diff --git a/public/assets/creeps/quick/2.png b/public/assets/creeps/quick/2.png deleted file mode 100644 index 90d2e95..0000000 Binary files a/public/assets/creeps/quick/2.png and /dev/null differ diff --git a/public/assets/creeps/quick/3.png b/public/assets/creeps/quick/3.png deleted file mode 100644 index 83250d4..0000000 Binary files a/public/assets/creeps/quick/3.png and /dev/null differ diff --git a/public/assets/creeps/quick/4.png b/public/assets/creeps/quick/4.png deleted file mode 100644 index f3f6d65..0000000 Binary files a/public/assets/creeps/quick/4.png and /dev/null differ diff --git a/public/assets/creeps/quick/5.png b/public/assets/creeps/quick/5.png deleted file mode 100644 index 046d3a4..0000000 Binary files a/public/assets/creeps/quick/5.png and /dev/null differ diff --git a/public/assets/creeps/quick/6.png b/public/assets/creeps/quick/6.png deleted file mode 100644 index 8038456..0000000 Binary files a/public/assets/creeps/quick/6.png and /dev/null differ diff --git a/public/assets/creeps/quick/7.png b/public/assets/creeps/quick/7.png deleted file mode 100644 index 65f4bbe..0000000 Binary files a/public/assets/creeps/quick/7.png and /dev/null differ diff --git a/public/assets/creeps/skeleton_spritesheet.png b/public/assets/creeps/skeleton_spritesheet.png new file mode 100644 index 0000000..f011c85 Binary files /dev/null and b/public/assets/creeps/skeleton_spritesheet.png differ diff --git a/public/assets/creeps/tank/0.png b/public/assets/creeps/tank/0.png deleted file mode 100644 index f409430..0000000 Binary files a/public/assets/creeps/tank/0.png and /dev/null differ diff --git a/public/assets/creeps/tank/1.png b/public/assets/creeps/tank/1.png deleted file mode 100644 index 469e13d..0000000 Binary files a/public/assets/creeps/tank/1.png and /dev/null differ diff --git a/public/assets/creeps/tank/10.png b/public/assets/creeps/tank/10.png deleted file mode 100644 index c67f03f..0000000 Binary files a/public/assets/creeps/tank/10.png and /dev/null differ diff --git a/public/assets/creeps/tank/11.png b/public/assets/creeps/tank/11.png deleted file mode 100644 index 469e13d..0000000 Binary files a/public/assets/creeps/tank/11.png and /dev/null differ diff --git a/public/assets/creeps/tank/2.png b/public/assets/creeps/tank/2.png deleted file mode 100644 index c67f03f..0000000 Binary files a/public/assets/creeps/tank/2.png and /dev/null differ diff --git a/public/assets/creeps/tank/3.png b/public/assets/creeps/tank/3.png deleted file mode 100644 index ea50556..0000000 Binary files a/public/assets/creeps/tank/3.png and /dev/null differ diff --git a/public/assets/creeps/tank/4.png b/public/assets/creeps/tank/4.png deleted file mode 100644 index ee42532..0000000 Binary files a/public/assets/creeps/tank/4.png and /dev/null differ diff --git a/public/assets/creeps/tank/5.png b/public/assets/creeps/tank/5.png deleted file mode 100644 index 88404b0..0000000 Binary files a/public/assets/creeps/tank/5.png and /dev/null differ diff --git a/public/assets/creeps/tank/6.png b/public/assets/creeps/tank/6.png deleted file mode 100644 index 1e04a28..0000000 Binary files a/public/assets/creeps/tank/6.png and /dev/null differ diff --git a/public/assets/creeps/tank/7.png b/public/assets/creeps/tank/7.png deleted file mode 100644 index 88404b0..0000000 Binary files a/public/assets/creeps/tank/7.png and /dev/null differ diff --git a/public/assets/creeps/tank/8.png b/public/assets/creeps/tank/8.png deleted file mode 100644 index ee42532..0000000 Binary files a/public/assets/creeps/tank/8.png and /dev/null differ diff --git a/public/assets/creeps/tank/9.png b/public/assets/creeps/tank/9.png deleted file mode 100644 index 6531367..0000000 Binary files a/public/assets/creeps/tank/9.png and /dev/null differ diff --git a/public/assets/creeps/wood_spritesheet.png b/public/assets/creeps/wood_spritesheet.png new file mode 100644 index 0000000..d9e183a Binary files /dev/null and b/public/assets/creeps/wood_spritesheet.png differ diff --git a/public/assets/creeps/zombie_spritesheet.png b/public/assets/creeps/zombie_spritesheet.png new file mode 100644 index 0000000..35e6d09 Binary files /dev/null and b/public/assets/creeps/zombie_spritesheet.png differ diff --git a/public/assets/gems/Artifact_spritesheet.png b/public/assets/gems/Artifact_spritesheet.png new file mode 100644 index 0000000..bb0066e Binary files /dev/null and b/public/assets/gems/Artifact_spritesheet.png differ diff --git a/public/assets/gems/Fire/1.png b/public/assets/gems/Fire/1.png deleted file mode 100644 index 64c4c3e..0000000 Binary files a/public/assets/gems/Fire/1.png and /dev/null differ diff --git a/public/assets/gems/Fire/2.png b/public/assets/gems/Fire/2.png deleted file mode 100644 index a5d4666..0000000 Binary files a/public/assets/gems/Fire/2.png and /dev/null differ diff --git a/public/assets/gems/Fire/3.png b/public/assets/gems/Fire/3.png deleted file mode 100644 index 4736ff3..0000000 Binary files a/public/assets/gems/Fire/3.png and /dev/null differ diff --git a/public/assets/gems/Fire/4.png b/public/assets/gems/Fire/4.png deleted file mode 100644 index 25a9f06..0000000 Binary files a/public/assets/gems/Fire/4.png and /dev/null differ diff --git a/public/assets/gems/Fire/5.png b/public/assets/gems/Fire/5.png deleted file mode 100644 index f40d840..0000000 Binary files a/public/assets/gems/Fire/5.png and /dev/null differ diff --git a/public/assets/gems/Fire/6.png b/public/assets/gems/Fire/6.png deleted file mode 100644 index ad0e01b..0000000 Binary files a/public/assets/gems/Fire/6.png and /dev/null differ diff --git a/public/assets/gems/Fire/7.png b/public/assets/gems/Fire/7.png deleted file mode 100644 index 3879e55..0000000 Binary files a/public/assets/gems/Fire/7.png and /dev/null differ diff --git a/public/assets/gems/Fire/8.png b/public/assets/gems/Fire/8.png deleted file mode 100644 index 5c2f95c..0000000 Binary files a/public/assets/gems/Fire/8.png and /dev/null differ diff --git a/public/assets/gems/Fire/9.png b/public/assets/gems/Fire/9.png deleted file mode 100644 index e8f5448..0000000 Binary files a/public/assets/gems/Fire/9.png and /dev/null differ diff --git a/public/assets/gems/Fire_spritesheet.png b/public/assets/gems/Fire_spritesheet.png new file mode 100644 index 0000000..55783eb Binary files /dev/null and b/public/assets/gems/Fire_spritesheet.png differ diff --git a/public/assets/gems/Gold_spritesheet.png b/public/assets/gems/Gold_spritesheet.png new file mode 100644 index 0000000..670b9af Binary files /dev/null and b/public/assets/gems/Gold_spritesheet.png differ diff --git a/public/assets/gems/Soulforge/1.png b/public/assets/gems/Soulforge/1.png deleted file mode 100644 index add5555..0000000 Binary files a/public/assets/gems/Soulforge/1.png and /dev/null differ diff --git a/public/assets/gems/Soulforge/2.png b/public/assets/gems/Soulforge/2.png deleted file mode 100644 index 8da6be4..0000000 Binary files a/public/assets/gems/Soulforge/2.png and /dev/null differ diff --git a/public/assets/gems/Soulforge_spritesheet.png b/public/assets/gems/Soulforge_spritesheet.png new file mode 100644 index 0000000..d4eea29 Binary files /dev/null and b/public/assets/gems/Soulforge_spritesheet.png differ diff --git a/public/assets/gems/Titalium/1.png b/public/assets/gems/Titalium/1.png deleted file mode 100644 index d9a9b42..0000000 Binary files a/public/assets/gems/Titalium/1.png and /dev/null differ diff --git a/public/assets/gems/Titalium/2.png b/public/assets/gems/Titalium/2.png deleted file mode 100644 index e8df315..0000000 Binary files a/public/assets/gems/Titalium/2.png and /dev/null differ diff --git a/public/assets/gems/Titalium/3.png b/public/assets/gems/Titalium/3.png deleted file mode 100644 index c014b53..0000000 Binary files a/public/assets/gems/Titalium/3.png and /dev/null differ diff --git a/public/assets/gems/Titalium_spritesheet.png b/public/assets/gems/Titalium_spritesheet.png new file mode 100644 index 0000000..a09059d Binary files /dev/null and b/public/assets/gems/Titalium_spritesheet.png differ diff --git a/public/assets/gems/Yeti/1.png b/public/assets/gems/Yeti/1.png deleted file mode 100644 index 4dbf7c1..0000000 Binary files a/public/assets/gems/Yeti/1.png and /dev/null differ diff --git a/public/assets/gems/Yeti/2.png b/public/assets/gems/Yeti/2.png deleted file mode 100644 index e6b3b07..0000000 Binary files a/public/assets/gems/Yeti/2.png and /dev/null differ diff --git a/public/assets/gems/Yeti_spritesheet.png b/public/assets/gems/Yeti_spritesheet.png new file mode 100644 index 0000000..78c834d Binary files /dev/null and b/public/assets/gems/Yeti_spritesheet.png differ diff --git a/public/assets/gui/background_01.png b/public/assets/gui/background_01.png deleted file mode 100755 index 3fa5d9b..0000000 Binary files a/public/assets/gui/background_01.png and /dev/null differ diff --git a/public/assets/gui/banner_03.png b/public/assets/gui/banner_03.png deleted file mode 100755 index 63258b3..0000000 Binary files a/public/assets/gui/banner_03.png and /dev/null differ diff --git a/public/assets/gui/frame_c2_02.png b/public/assets/gui/frame_c2_02.png deleted file mode 100755 index 1adb74d..0000000 Binary files a/public/assets/gui/frame_c2_02.png and /dev/null differ diff --git a/public/assets/gui/gem_frame.png b/public/assets/gui/gem_frame.png deleted file mode 100755 index d3d7f42..0000000 Binary files a/public/assets/gui/gem_frame.png and /dev/null differ diff --git a/public/assets/gui/inventory.png b/public/assets/gui/inventory.png deleted file mode 100755 index ab93a6a..0000000 Binary files a/public/assets/gui/inventory.png and /dev/null differ diff --git a/public/assets/gui/plank_14.png b/public/assets/gui/plank_14.png deleted file mode 100755 index 3a1152d..0000000 Binary files a/public/assets/gui/plank_14.png and /dev/null differ diff --git a/public/assets/gui/shield_01.png b/public/assets/gui/shield_01.png deleted file mode 100755 index 57969ac..0000000 Binary files a/public/assets/gui/shield_01.png and /dev/null differ diff --git a/public/assets/gui/shield_02.png b/public/assets/gui/shield_02.png deleted file mode 100755 index 618adb8..0000000 Binary files a/public/assets/gui/shield_02.png and /dev/null differ diff --git a/public/assets/gui/skull_01.png b/public/assets/gui/skull_01.png deleted file mode 100755 index aeb97cd..0000000 Binary files a/public/assets/gui/skull_01.png and /dev/null differ diff --git a/public/assets/gui/star.png b/public/assets/gui/star.png deleted file mode 100755 index 20ce16c..0000000 Binary files a/public/assets/gui/star.png and /dev/null differ diff --git a/public/assets/gui/star_empty.png b/public/assets/gui/star_empty.png deleted file mode 100755 index 2682b22..0000000 Binary files a/public/assets/gui/star_empty.png and /dev/null differ diff --git a/public/assets/gui/title.png b/public/assets/gui/title.png deleted file mode 100755 index a34a831..0000000 Binary files a/public/assets/gui/title.png and /dev/null differ diff --git a/public/assets/json/Creeps.json b/public/assets/json/Creeps.json index 90b9153..d1ad5fc 100644 --- a/public/assets/json/Creeps.json +++ b/public/assets/json/Creeps.json @@ -1,6 +1,7 @@ [ { "name": "basic", + "sprite": "wood", "textures": [], "textureArrayLength": 12, "stats": { @@ -18,6 +19,7 @@ }, { "name": "quick", + "sprite": "zombie", "textures": [], "textureArrayLength": 8, "stats": { @@ -35,6 +37,7 @@ }, { "name": "tank", + "sprite": "skeleton", "textures": [], "textureArrayLength": 12, "stats": { @@ -52,6 +55,7 @@ }, { "name": "cloaker", + "sprite": "hood", "textures": [], "textureArrayLength": 12, "stats": { @@ -69,6 +73,7 @@ }, { "name": "demon", + "sprite": "demon", "textures": [], "textureArrayLength": 8, "stats": { @@ -86,6 +91,7 @@ }, { "name": "maker", + "sprite": "pumpkin", "textures": [], "textureArrayLength": 11, "stats": { diff --git a/public/assets/json/Gems.json b/public/assets/json/Gems.json index 1407ee7..685f8f6 100644 --- a/public/assets/json/Gems.json +++ b/public/assets/json/Gems.json @@ -1,22 +1,22 @@ [ { "name": "Fire Gem", - "description": "Forged from molten lava, the Fire Gem imbues your tower's attacks and adds 50% extra fire damage. It can be merged with any gem and is common.", + "description": "Forged from molten lava, the Fire Gem imbues your tower's attacks and add extra fire damage. Well researched and common.", "color": "red", "type": "Fire", - "totalLevels": 2, + "totalLevels": 9, "textures": [], "cantCombineWith": [], "specialCombine": [], - "initialGemValue": 100, + "initialGemValue": 50, "genericImprovements": [ { - "damageUp": 2, + "damageUp": 1, "attackSpeedUp": 0, "rangeUp": 0, "timeToLiveUp": 0, - "pierceUp": 1, - "gemValueUp": 50 + "pierceUp": 0, + "gemValueUp": 100 }, { "damageUp": 2, @@ -24,10 +24,73 @@ "rangeUp": 0, "timeToLiveUp": 0, "pierceUp": 1, - "gemValueUp": 100 + "gemValueUp": 150 + }, + { + "damageUp": 2, + "attackSpeedUp": 0, + "rangeUp": 0, + "timeToLiveUp": 0, + "pierceUp": 1, + "gemValueUp": 250 + }, + { + "damageUp": 2, + "attackSpeedUp": 0, + "rangeUp": 0, + "timeToLiveUp": 0, + "pierceUp": 1, + "gemValueUp": 400 + }, + { + "damageUp": 2, + "attackSpeedUp": 0, + "rangeUp": 0, + "timeToLiveUp": 0, + "pierceUp": 1, + "gemValueUp": 650 + }, + { + "damageUp": 2, + "attackSpeedUp": 0, + "rangeUp": 0, + "timeToLiveUp": 0, + "pierceUp": 1, + "gemValueUp": 750 + }, + { + "damageUp": 2, + "attackSpeedUp": 0, + "rangeUp": 0, + "timeToLiveUp": 0, + "pierceUp": 1, + "gemValueUp": 900 + }, + { + "damageUp": 2, + "attackSpeedUp": 0, + "rangeUp": 0, + "timeToLiveUp": 0, + "pierceUp": 1, + "gemValueUp": 1000 + }, + { + "damageUp": 2, + "attackSpeedUp": 0, + "rangeUp": 0, + "timeToLiveUp": 0, + "pierceUp": 1, + "gemValueUp": 1200 } ], "gemResistanceModifications": [ + { + "physical": 0, + "divine": 0, + "fire": 0.05, + "ice": 0, + "frostfire": 0 + }, { "physical": 0, "divine": 0, @@ -35,26 +98,116 @@ "ice": 0, "frostfire": 0 }, + { + "physical": 0, + "divine": 0, + "fire": 0.15, + "ice": 0, + "frostfire": 0 + }, + { + "physical": 0, + "divine": 0, + "fire": 0.2, + "ice": 0, + "frostfire": 0 + }, { "physical": 0, "divine": 0, "fire": 0.25, "ice": 0, "frostfire": 0 + }, + { + "physical": 0, + "divine": 0, + "fire": 0.3, + "ice": 0, + "frostfire": 0 + }, + { + "physical": 0, + "divine": 0, + "fire": 0.35, + "ice": 0, + "frostfire": 0 + }, + { + "physical": 0, + "divine": 0, + "fire": 0.4, + "ice": 0, + "frostfire": 0 + }, + { + "physical": 0, + "divine": 0, + "fire": 0.45, + "ice": 0, + "frostfire": 0 } ] }, { "name": "Yeti Gem", - "description": "Yeti gem description. Something something, write this while drunk or something.", + "description": "Crafted from the essence of the frozen bears, the Yeti Gem enhances your tower's attacks with the chilling power of ice. It gives ice damage and is known for its rarity.", "color": "#32e4fc", "type": "Yeti", - "totalLevels": 2, + "totalLevels": 8, "textures": [], "cantCombineWith": [], "specialCombine": [], "initialGemValue": 10, "genericImprovements": [ + { + "damageUp": 2, + "attackSpeedUp": 10, + "rangeUp": 0, + "timeToLiveUp": 0, + "pierceUp": 1, + "gemValueUp": 0 + }, + { + "damageUp": 2, + "attackSpeedUp": 10, + "rangeUp": 0, + "timeToLiveUp": 0, + "pierceUp": 1, + "gemValueUp": 10 + }, + { + "damageUp": 2, + "attackSpeedUp": 10, + "rangeUp": 0, + "timeToLiveUp": 0, + "pierceUp": 1, + "gemValueUp": 0 + }, + { + "damageUp": 2, + "attackSpeedUp": 10, + "rangeUp": 0, + "timeToLiveUp": 0, + "pierceUp": 1, + "gemValueUp": 10 + }, + { + "damageUp": 2, + "attackSpeedUp": 10, + "rangeUp": 0, + "timeToLiveUp": 0, + "pierceUp": 1, + "gemValueUp": 0 + }, + { + "damageUp": 2, + "attackSpeedUp": 10, + "rangeUp": 0, + "timeToLiveUp": 0, + "pierceUp": 1, + "gemValueUp": 10 + }, { "damageUp": 2, "attackSpeedUp": 10, @@ -73,6 +226,48 @@ } ], "gemResistanceModifications": [ + { + "physical": 0, + "divine": 0, + "fire": 0, + "ice": 0.1, + "frostfire": 0 + }, + { + "physical": 0, + "divine": 0, + "fire": 0, + "ice": 0.2, + "frostfire": 0 + }, + { + "physical": 0, + "divine": 0, + "fire": 0, + "ice": 0.1, + "frostfire": 0 + }, + { + "physical": 0, + "divine": 0, + "fire": 0, + "ice": 0.2, + "frostfire": 0 + }, + { + "physical": 0, + "divine": 0, + "fire": 0, + "ice": 0.1, + "frostfire": 0 + }, + { + "physical": 0, + "divine": 0, + "fire": 0, + "ice": 0.2, + "frostfire": 0 + }, { "physical": 0, "divine": 0, @@ -91,10 +286,10 @@ }, { "name": "Titalium Gem", - "description": "Titalium gem description. Something something zombie creeps working for you something something.", + "description": "Created from distilled creep eyes, the Titalium gem is known for boosting tower range, at the sacrifice for other stats.", "color": "pink", "type": "Titalium", - "totalLevels": 3, + "totalLevels": 7, "textures": [], "cantCombineWith": [], "specialCombine": [], @@ -116,6 +311,14 @@ "pierceUp": 1, "gemValueUp": 10 }, + { + "damageUp": 2, + "attackSpeedUp": 10, + "rangeUp": 0, + "timeToLiveUp": 0, + "pierceUp": 1, + "gemValueUp": 0 + }, { "damageUp": 2, "attackSpeedUp": 10, @@ -123,35 +326,87 @@ "timeToLiveUp": 0, "pierceUp": 1, "gemValueUp": 10 + }, + { + "damageUp": 2, + "attackSpeedUp": 10, + "rangeUp": 0, + "timeToLiveUp": 0, + "pierceUp": 1, + "gemValueUp": 0 + }, + { + "damageUp": 2, + "attackSpeedUp": 10, + "rangeUp": 0, + "timeToLiveUp": 0, + "pierceUp": 1, + "gemValueUp": 10 + }, + { + "damageUp": 2, + "attackSpeedUp": 10, + "rangeUp": 0, + "timeToLiveUp": 0, + "pierceUp": 1, + "gemValueUp": 0 } ], "gemResistanceModifications": [ { - "physical": 0.1, + "physical": 0, "divine": 0, "fire": 0, - "ice": 0, + "ice": 0.1, "frostfire": 0 }, { - "physical": 0.1, + "physical": 0, "divine": 0, "fire": 0, - "ice": 0, + "ice": 0.2, "frostfire": 0 }, { - "physical": 0.25, + "physical": 0, "divine": 0, "fire": 0, - "ice": 0, + "ice": 0.1, + "frostfire": 0 + }, + { + "physical": 0, + "divine": 0, + "fire": 0, + "ice": 0.2, + "frostfire": 0 + }, + { + "physical": 0, + "divine": 0, + "fire": 0, + "ice": 0.1, + "frostfire": 0 + }, + { + "physical": 0, + "divine": 0, + "fire": 0, + "ice": 0.2, + "frostfire": 0 + }, + { + "physical": 0, + "divine": 0, + "fire": 0, + "ice": 0.1, "frostfire": 0 } ] }, { "name": "Soulforge Gem", - "description": "Soulforge gem description, have to write later.", + "description": "Made from the wandering souls of the damned, the Soulforge gem accelerates your towers cooldowns and acts as a repellant for all things unholy.", "color": "gray", "type": "Soulforge", "totalLevels": 2, @@ -160,6 +415,54 @@ "specialCombine": [], "initialGemValue": 10, "genericImprovements": [ + { + "damageUp": 2, + "attackSpeedUp": 10, + "rangeUp": 0, + "timeToLiveUp": 0, + "pierceUp": 1, + "gemValueUp": 0 + }, + { + "damageUp": 2, + "attackSpeedUp": 10, + "rangeUp": 0, + "timeToLiveUp": 0, + "pierceUp": 1, + "gemValueUp": 10 + }, + { + "damageUp": 2, + "attackSpeedUp": 10, + "rangeUp": 0, + "timeToLiveUp": 0, + "pierceUp": 1, + "gemValueUp": 0 + }, + { + "damageUp": 2, + "attackSpeedUp": 10, + "rangeUp": 0, + "timeToLiveUp": 0, + "pierceUp": 1, + "gemValueUp": 10 + }, + { + "damageUp": 2, + "attackSpeedUp": 10, + "rangeUp": 0, + "timeToLiveUp": 0, + "pierceUp": 1, + "gemValueUp": 0 + }, + { + "damageUp": 2, + "attackSpeedUp": 10, + "rangeUp": 0, + "timeToLiveUp": 0, + "pierceUp": 1, + "gemValueUp": 10 + }, { "damageUp": 2, "attackSpeedUp": 10, @@ -179,18 +482,120 @@ ], "gemResistanceModifications": [ { - "physical": 0.05, - "divine": 0.05, - "fire": 0.05, - "ice": 0.05, - "frostfire": 0.05 + "physical": 0, + "divine": 0, + "fire": 0, + "ice": 0.1, + "frostfire": 0 }, { - "physical": 0.05, - "divine": 0.05, - "fire": 0.05, - "ice": 0.05, - "frostfire": 0.05 + "physical": 0, + "divine": 0, + "fire": 0, + "ice": 0.2, + "frostfire": 0 + }, + { + "physical": 0, + "divine": 0, + "fire": 0, + "ice": 0.1, + "frostfire": 0 + }, + { + "physical": 0, + "divine": 0, + "fire": 0, + "ice": 0.2, + "frostfire": 0 + }, + { + "physical": 0, + "divine": 0, + "fire": 0, + "ice": 0.1, + "frostfire": 0 + }, + { + "physical": 0, + "divine": 0, + "fire": 0, + "ice": 0.2, + "frostfire": 0 + }, + { + "physical": 0, + "divine": 0, + "fire": 0, + "ice": 0.1, + "frostfire": 0 + }, + { + "physical": 0, + "divine": 0, + "fire": 0, + "ice": 0.2, + "frostfire": 0 + } + ] + }, + { + "name": "Golden Gem", + "description": "An inherently useless gem, providing no tower buffs, but high in monetary value. Highly sought after by all rich people.", + "color": "gold", + "type": "Gold", + "totalLevels": 1, + "textures": [], + "cantCombineWith": [], + "specialCombine": [], + "initialGemValue": 250, + "genericImprovements": [ + { + "damageUp": 0, + "attackSpeedUp": 0, + "rangeUp": 0, + "timeToLiveUp": 0, + "pierceUp": 0, + "gemValueUp": 0 + } + ], + "gemResistanceModifications": [ + { + "physical": 0, + "divine": 0, + "fire": 0, + "ice": 0, + "frostfire": 0 + } + ] + }, + { + "name": "Artifact", + "description": "An insanely rare gem of unknown origin, packed with power. No one knows how it works, yet your towers oddly resonate stronger with it.", + "color": "blue", + "type": "Artifact", + "totalLevels": 1, + "textures": [], + "cantCombineWith": [], + "specialCombine": [], + "initialGemValue": 1000, + "genericImprovements": [ + { + "damageUp": 10, + "attackSpeedUp": 100, + "rangeUp": 2, + "timeToLiveUp": 200, + "pierceUp": 20, + "gemValueUp": 0 + } + ], + "gemResistanceModifications": [ + { + "physical": 0.25, + "divine": 0.25, + "fire": 0.25, + "ice": 0.25, + "frostfire": 0.25 } ] } diff --git a/public/assets/json/Towers.json b/public/assets/json/Towers.json index e69c100..2d4b497 100644 --- a/public/assets/json/Towers.json +++ b/public/assets/json/Towers.json @@ -26,7 +26,7 @@ "projectile": "blue", "projectileTextures": [], "projectileTexturesArrayLength": 4, - "description": "If you feel a little circular.", + "description": "If you feel like shooting in a circle around you, projectiles may miss.", "stats": { "damage": 3, "cooldown": 4000, @@ -45,7 +45,7 @@ "projectile": "yellow", "projectileTextures": [], "projectileTexturesArrayLength": 4, - "description": "Zap zap zap!", + "description": "Zap zap zap! This towers shots connect to other enemies!", "stats": { "damage": 3, "cooldown": 3500, @@ -64,7 +64,7 @@ "projectile": "blue", "projectileTextures": [], "projectileTexturesArrayLength": 4, - "description": "", + "description": "Doesn't shoot, instead buffs other towers with 50% of its power.", "stats": { "damage": 4, "cooldown": 1000, @@ -83,7 +83,7 @@ "projectile": "white", "projectileTextures": [], "projectileTexturesArrayLength": 5, - "description": "", + "description": "Like a regular tower, just slows down creeps.", "stats": { "damage": 2, "cooldown": 2000, @@ -102,7 +102,7 @@ "projectile": "red", "projectileTextures": [], "projectileTexturesArrayLength": 4, - "description": "If you feel a little circular.", + "description": "Shoots a quick, high pierce rail projectile at creeps.", "stats": { "damage": 2, "cooldown": 2000, @@ -121,7 +121,7 @@ "projectile": "stone", "projectileTextures": [], "projectileTexturesArrayLength": 1, - "description": "If you feel a little circular.", + "description": "Randomly places traps on the track, instead of attacking creeps.", "stats": { "damage": 2, "cooldown": 2000, @@ -140,7 +140,7 @@ "projectile": "red", "projectileTextures": [], "projectileTexturesArrayLength": 4, - "description": "If you feel a little circular.", + "description": "On top of a regular attack, this tower gives creeps a debuff, making them take more damage.", "stats": { "damage": 2, "cooldown": 2000, diff --git a/src/classes/Assets.ts b/src/classes/Assets.ts index 3eede0d..2da0b83 100644 --- a/src/classes/Assets.ts +++ b/src/classes/Assets.ts @@ -10,17 +10,13 @@ export default class GameAssets { public static Frame03Texture: PIXI.Texture; public static Frame04Texture: PIXI.Texture; public static Frame05Texture: PIXI.Texture; - public static FrameInventory: PIXI.Texture; - public static FrameBackground: PIXI.Texture; public static FrameTowerTab: PIXI.Texture; - public static VioletBackground: PIXI.Texture; public static RedBackground: PIXI.Texture; public static GreenBackground: PIXI.Texture; public static BlueBackground: PIXI.Texture; public static YellowBackground: PIXI.Texture; public static Button01Texture: PIXI.Texture; public static Button02Texture: PIXI.Texture; - public static ButtonSmallTexture: PIXI.Texture; public static HealthTexture: PIXI.Texture; public static GoldTexture: PIXI.Texture; public static WaveTexture: PIXI.Texture; @@ -40,8 +36,6 @@ export default class GameAssets { public static PauseIconTexture: PIXI.Texture; public static ExclamationIconTexture: PIXI.Texture; public static FastForwardIconTexture: PIXI.Texture; - public static HomeIconTexture: PIXI.Texture; - public static HammerIconTexture: PIXI.Texture; public static XIconTexture: PIXI.Texture; public static PlusIconTexture: PIXI.Texture; public static GemAmountIcons: PIXI.Texture[] = []; @@ -53,8 +47,10 @@ export default class GameAssets { public static Gems: GemDefinition[]; private static text; + private static counter = 0; private static async Load(src) { - this.text.text = 'Loading asset: ' + src; + this.text.text = `Loading asset: ${src} (${this.counter}/99)`; + this.counter++; return await PIXI.Assets.load({ src: src, }); @@ -91,19 +87,14 @@ export default class GameAssets { Engine.app.stage.addChild(this.text); await Promise.all([ - this.Load('./aclonica.woff2'), this.Load('./assets/gui/button_01.png').then((texture) => (this.Button01Texture = texture)), this.Load('./assets/gui/button_02.png').then((texture) => (this.Button02Texture = texture)), - this.Load('./assets/gui/button_small.png').then((texture) => (this.ButtonSmallTexture = texture)), this.Load('./assets/gui/frame_01.png').then((texture) => (this.Frame01Texture = texture)), this.Load('./assets/gui/frame_02.png').then((texture) => (this.Frame02Texture = texture)), this.Load('./assets/gui/frame_03.png').then((texture) => (this.Frame03Texture = texture)), this.Load('./assets/gui/frame_04.png').then((texture) => (this.Frame04Texture = texture)), this.Load('./assets/gui/frame_05.png').then((texture) => (this.Frame05Texture = texture)), - this.Load('./assets/gui/frame_inv.png').then((texture) => (this.FrameInventory = texture)), - this.Load('./assets/gui/background_01.png').then((texture) => (this.FrameBackground = texture)), this.Load('./assets/gui/background_02.png').then((texture) => (this.FrameTowerTab = texture)), - this.Load('./assets/gui/frame_violet.png').then((texture) => (this.VioletBackground = texture)), this.Load('./assets/gui/frame_red.png').then((texture) => (this.RedBackground = texture)), this.Load('./assets/gui/frame_green.png').then((texture) => (this.GreenBackground = texture)), this.Load('./assets/gui/frame_blue.png').then((texture) => (this.BlueBackground = texture)), @@ -125,10 +116,7 @@ export default class GameAssets { this.Load('./assets/gui/title01.png').then((texture) => (this.TitleTexture = texture)), this.Load('./assets/gui/icons/play.png').then((texture) => (this.PlayIconTexture = texture)), this.Load('./assets/gui/icons/pause.png').then((texture) => (this.PauseIconTexture = texture)), - this.Load('./assets/gui/icons/pause.png').then((texture) => (this.PauseIconTexture = texture)), this.Load('./assets/gui/icons/fastforward.png').then((texture) => (this.FastForwardIconTexture = texture)), - this.Load('./assets/gui/icons/home.png').then((texture) => (this.HomeIconTexture = texture)), - this.Load('./assets/gui/icons/hammer.png').then((texture) => (this.HammerIconTexture = texture)), this.Load('./assets/gui/icons/cross.png').then((texture) => (this.XIconTexture = texture)), this.Load('./assets/gui/icons/plus.png').then((texture) => (this.PlusIconTexture = texture)), this.LoadMissions(), @@ -148,9 +136,27 @@ export default class GameAssets { for (let idx = 0; idx < gems.length; idx++) { const gem = this.Gems[idx]; + const texture = await this.Load(`./assets/gems/${gem.type}_spritesheet.png`); for (let i = 1; i <= gem.totalLevels; i++) { - const texture = await this.Load(`./assets/gems/${gem.type}/${i}.png`); - gem.textures[i - 1] = texture; + const spritesheet = new PIXI.Spritesheet(texture, { + frames: { + [`${gem.type}_${i}.png`]: { + frame: { x: (i - 1) * 64, y: 0, w: 64, h: 64 }, + rotated: false, + trimmed: false, + spriteSourceSize: { x: 0, y: 0, w: 64, h: 64 }, + sourceSize: { w: 64, h: 64 }, + }, + }, + meta: { + image: `./assets/gems/${gem.type}_spritesheet.png`, + format: 'RGBA8888', + size: { w: 64 * gem.totalLevels, h: 64 }, + scale: '1', + }, + }); + await spritesheet.parse(); + gem.textures[i - 1] = spritesheet.textures[`${gem.type}_${i}.png`]; } } for (let i = 0; i < 7; i++) { @@ -164,9 +170,27 @@ export default class GameAssets { this.Creeps = creeps; for (let idx = 0; idx < this.Creeps.length; idx++) { const creep = this.Creeps[idx]; + const texture = await this.Load(`./assets/creeps/${creep.sprite}_spritesheet.png`); for (let i = 0; i < creep.textureArrayLength; i++) { - const texture = await this.Load(`./assets/creeps/${creep.name}/${i}.png`); - creep.textures[i] = texture; + const spritesheet = new PIXI.Spritesheet(texture, { + frames: { + [`${creep.sprite}_${i}.png`]: { + frame: { x: i * 128, y: 0, w: 128, h: 128 }, + rotated: false, + trimmed: false, + spriteSourceSize: { x: 0, y: 0, w: 128, h: 128 }, + sourceSize: { w: 128, h: 128 }, + }, + }, + meta: { + image: `./assets/creeps/${creep.sprite}/spritesheet.png`, + format: 'RGBA8888', + size: { w: 128 * creep.textureArrayLength, h: 128 }, + scale: '1', + }, + }); + await spritesheet.parse(); + creep.textures[i] = spritesheet.textures[`${creep.sprite}_${i}.png`]; } } } @@ -189,6 +213,8 @@ export default class GameAssets { for (let idx = 0; idx < this.Towers.length; idx++) { const tower = this.Towers[idx]; for (let i = 0; i < tower.projectileTexturesArrayLength; i++) { + // My only grievance is that projectiles have to load like this, not like a spritesheet + // due to them not being a fixed w/h. const projTexture = await this.Load(`./assets/projectiles/${tower.projectile}/${i}.png`); tower.projectileTextures[i] = projTexture; } @@ -202,7 +228,7 @@ export default class GameAssets { private static async LoadMission(missionUrl: string) { const res = await fetch(missionUrl); const mission = await res.json(); - console.log(`Loading mission: ${missionUrl} [${mission.name} / ${mission.mapImage.url}]`); + // console.log(`Loading mission: ${missionUrl} [${mission.name} / ${mission.mapImage.url}]`); GameAssets.Missions.push(mission); GameAssets.MissionBackgrounds.push(await this.Load(mission.mapImage.url)); } diff --git a/src/classes/Bastion.ts b/src/classes/Bastion.ts index 9957f7a..b3bd4cf 100644 --- a/src/classes/Bastion.ts +++ b/src/classes/Bastion.ts @@ -39,7 +39,7 @@ export class Engine { Engine.TowerManager.ToggleChoosingTowerLocation('RESET'); Engine.TowerManager.PlaceTower(tower, 6, 10, tower.behaviour, true); for (let i = 0; i < 29; i++) { - this.GameScene.MissionStats.giveGem(new Gem(i % 4), true); + this.GameScene.MissionStats.giveGem(new Gem(i % 6), true); } } } diff --git a/src/classes/Definitions.ts b/src/classes/Definitions.ts index 7e64e71..b411dcb 100644 --- a/src/classes/Definitions.ts +++ b/src/classes/Definitions.ts @@ -31,6 +31,7 @@ export type WaveDefinition = { export type CreepDefinition = { name: string; + sprite: string; textures: PIXI.Texture[]; textureArrayLength: number; stats: CreepStatsDefinition; diff --git a/src/classes/game/Projectile.ts b/src/classes/game/Projectile.ts index 52ee524..24cb619 100644 --- a/src/classes/game/Projectile.ts +++ b/src/classes/game/Projectile.ts @@ -177,6 +177,7 @@ export class TrapProjectile extends Projectile { ) { super(x, y, textures, angle, damage, tint, timeToLive, pierce, gemResistanceModifications); this.sprite.scale = 0.5; + this.sprite.rotation = Math.random() * Math.PI * 2; this.goalX = goalX; this.goalY = goalY; } diff --git a/src/classes/game/TowerBehaviours.ts b/src/classes/game/TowerBehaviours.ts index 16bf6b4..0dcd6a6 100644 --- a/src/classes/game/TowerBehaviours.ts +++ b/src/classes/game/TowerBehaviours.ts @@ -62,11 +62,11 @@ export function computeGemImprovements(tower: Tower) { gemPierceUp += improvements.pierceUp; let resistances = gem.currentGemResistanceModifications(); - tower.totalGemResistanceModifications.physical += resistances.physical; - tower.totalGemResistanceModifications.ice += resistances.ice; - tower.totalGemResistanceModifications.fire += resistances.fire; - tower.totalGemResistanceModifications.divine += resistances.divine; - tower.totalGemResistanceModifications.frostfire += resistances.frostfire; + tower.totalGemResistanceModifications.physical += Number(resistances.physical.toFixed(2)); + tower.totalGemResistanceModifications.ice += Number(resistances.ice.toFixed(2)); + tower.totalGemResistanceModifications.fire += Number(resistances.fire.toFixed(2)); + tower.totalGemResistanceModifications.divine += Number(resistances.divine.toFixed(2)); + tower.totalGemResistanceModifications.frostfire += Number(resistances.frostfire.toFixed(2)); }); tower.computedDamageToDeal = tower.definition.stats.damage + gemDamage; @@ -84,14 +84,21 @@ export function computeGemImprovements(tower: Tower) { tower.computedTimeToLive += Number((buffedBy.computedTimeToLive / 5).toFixed(1)); tower.computedPierce += Number((buffedBy.computedPierce / 4).toFixed(1)); - tower.totalGemResistanceModifications.physical += - (buffedBy.totalGemResistanceModifications.physical * 100) / 2 / 100; - tower.totalGemResistanceModifications.ice += (buffedBy.totalGemResistanceModifications.ice * 100) / 2 / 100; - tower.totalGemResistanceModifications.fire += (buffedBy.totalGemResistanceModifications.fire * 100) / 2 / 100; - tower.totalGemResistanceModifications.divine += - (buffedBy.totalGemResistanceModifications.divine * 100) / 2 / 100; - tower.totalGemResistanceModifications.frostfire += - (buffedBy.totalGemResistanceModifications.frostfire * 100) / 2 / 100; + tower.totalGemResistanceModifications.physical += Number( + (buffedBy.totalGemResistanceModifications.physical / 2).toFixed(2) + ); + tower.totalGemResistanceModifications.ice += Number( + (buffedBy.totalGemResistanceModifications.ice / 2).toFixed(2) + ); + tower.totalGemResistanceModifications.fire += Number( + (buffedBy.totalGemResistanceModifications.fire / 2).toFixed(2) + ); + tower.totalGemResistanceModifications.divine += Number( + (buffedBy.totalGemResistanceModifications.divine / 2).toFixed(2) + ); + tower.totalGemResistanceModifications.frostfire += Number( + (buffedBy.totalGemResistanceModifications.frostfire / 2).toFixed(2) + ); } } diff --git a/src/classes/gui/EndGameDialog.ts b/src/classes/gui/EndGameDialog.ts index b0d0c52..99aa631 100644 --- a/src/classes/gui/EndGameDialog.ts +++ b/src/classes/gui/EndGameDialog.ts @@ -119,7 +119,9 @@ export default class EndGameDialog extends ModalDialogBase { override close(button?: string): void { if (button === EndGameDialogButtons.Confirm) { if (this.playerNameTextInput.getText().length == 0) { - MessageBox.show('Please enter your name.', ['OK']); + MessageBox.show('Please enter your name.\n(Just start typing, input bar is automatically selected.)', [ + 'OK', + ]); } else { this.highScore.addScore({ playerName: this.playerNameTextInput.getText(), diff --git a/src/scenes/Game.ts b/src/scenes/Game.ts index eba63bb..94c6484 100644 --- a/src/scenes/Game.ts +++ b/src/scenes/Game.ts @@ -116,13 +116,12 @@ export class GameScene extends Scene { } return; } - if (this.isGameOver) return Engine.NotificationManager.Notify('No more waves.', 'danger'); if (this.roundMode == RoundMode.Misc) return; this.setRoundMode(RoundMode.Combat); this.changeRoundButton.buttonIcon.texture = GameAssets.FastForwardIconTexture; this.events.emit(WaveManagerEvents.NewWave, `${this.currentRound + 1}`); }; - this.MissionStats = new MissionStats(125, 450); + this.MissionStats = new MissionStats(100, 250); this.events.on(GemEvents.TowerPanelSelectGem, (gem, index, tower) => { if (gem == null) { if (!this.MissionStats.checkIfPlayerHasAnyGems()) @@ -192,7 +191,6 @@ export class GameScene extends Scene { ); if (this.currentRound + 1 == this.mission.rounds.length) { Engine.NotificationManager.Notify(`Mission victory!!`, 'reward'); - this.changeRoundButton.buttonIcon.texture = GameAssets.HomeIconTexture; this.playerWon = true; } else { this.OfferPlayerGems(); diff --git a/src/scenes/Main.ts b/src/scenes/Main.ts index 4373421..bf5688e 100644 --- a/src/scenes/Main.ts +++ b/src/scenes/Main.ts @@ -14,7 +14,7 @@ export class MainScene extends Scene { this.addMainBackground(); const NewGameButton = { - caption: 'New Game', + caption: 'Play', rect: new PIXI.Rectangle(Engine.app.canvas.width / 2 - 300 / 2, 400 + 0 * 70, 300, 60), texture: ButtonTexture.Button01,