From 76053826e03d3456e9b91000c63acce081fdefa4 Mon Sep 17 00:00:00 2001 From: Nyeogmi Date: Mon, 17 Feb 2025 15:46:48 -0800 Subject: [PATCH] Add thrall art --- src/art/thralls/thrall_bat.png | Bin 0 -> 468 bytes src/art/thralls/thrall_charm.png | Bin 0 -> 535 bytes src/art/thralls/thrall_lore.png | Bin 0 -> 536 bytes src/art/thralls/thrall_party.png | Bin 0 -> 503 bytes src/art/thralls/thrall_stare.png | Bin 0 -> 523 bytes src/art/thralls/thrall_stealth.png | Bin 0 -> 503 bytes src/gridart.ts | 5 ++-- src/hud.ts | 4 +-- src/huntmode.ts | 16 ++++++++---- src/pickups.ts | 5 ++-- src/sprites.ts | 40 ++++++++++++----------------- src/thralls.ts | 22 +++++++++++++--- 12 files changed, 54 insertions(+), 38 deletions(-) create mode 100644 src/art/thralls/thrall_bat.png create mode 100644 src/art/thralls/thrall_charm.png create mode 100644 src/art/thralls/thrall_lore.png create mode 100644 src/art/thralls/thrall_party.png create mode 100644 src/art/thralls/thrall_stare.png create mode 100644 src/art/thralls/thrall_stealth.png diff --git a/src/art/thralls/thrall_bat.png b/src/art/thralls/thrall_bat.png new file mode 100644 index 0000000000000000000000000000000000000000..7ad992ac5e65ce2653b8ca3a78e078e59f99a589 GIT binary patch literal 468 zcmeAS@N?(olHy`uVBq!ia0vp^20$#q!3-q3mHXZSDaPU;cPEB*=VV?2IR^rKLR{I{ zI79@5t;JP~#dWtRXx+C{{*}e`bFuXQtB(KwI9&UbGUv8))oa9x0fV;xish2gIAk(UhJN{KDV^jDhOM}*H#ucOXrnuU-h3eZPP0c8TM-)x`sjCb&ula&H0ilX|P*QR6&$IhJC_r zhnDtdJ0E`Jym+%P!t~j+1CO%2R~+MP-@bg4ZvLTXt@8hwLfHjfSN)Zj0=j^~)78&q Iol`;+0Q9cxH2?qr literal 0 HcmV?d00001 diff --git a/src/art/thralls/thrall_charm.png b/src/art/thralls/thrall_charm.png new file mode 100644 index 0000000000000000000000000000000000000000..9985dbda6c5b6d42fc58f598f5cb3818850c68ee GIT binary patch literal 535 zcmeAS@N?(olHy`uVBq!ia0vp^20$#q!3-q3mHXZSDaPU;cPEB*=VV?2IR^rKLR{I{ zI79@5t;JP~#dWtRXx+C{{*}e`bFuXQtB(KwI9&UbGUv8))oa9x0fV;xish2gIAk(UhJN{KDV^jD1{|7+L`;}@!&6R17<>3Zoy;m=#cYK$IeY-$KdVQktg%%5Okt+;lh{n&b7PctFruj9Q+*Q57e=! zU0S$f+0JwKPR=?dks=;n<5_e1)1m(<(?VuAcrrZmW{O~{sQb}iC|_G&a_{B6b@sb1 b|7R#*(tEG?Wc^v7Cm1|k{an^LB{Ts5{dWwd literal 0 HcmV?d00001 diff --git a/src/art/thralls/thrall_lore.png b/src/art/thralls/thrall_lore.png new file mode 100644 index 0000000000000000000000000000000000000000..6df0f53b73b0d6b78d4223db5bdfcc8b5ae38dc8 GIT binary patch literal 536 zcmeAS@N?(olHy`uVBq!ia0vp^20$#q!3-q3mHXZSDaPU;cPEB*=VV?2IR^rKLR{I{ zI79@5t;JP~#dWtRXx+C{{*}e`bFuXQtB(KwI9&UbGUv8))oa9x0fV;xish2gIAk(UhJN{KDV^jD7mo4+mou1{FuZ{2AO zN3XLx={(K1PhIuviNEq9_4N(A&uw8;G6`lXiDJr#s++ucPt~PB*`6ngciu}+ESdP) zDaFBh!PaMd3>vSKovRp5&3M2vMQBU^pKF%=IUQmb%jWKXkrftYf5Wfi=aSi4Hu467 zHm|K1mT+udTEjj;X~uRwvpr$aC3ocFURTN6TD6{id;0b1hs}0p_PYO*QnKxff9!L@ bYY)T6pBfMQek@!7^aX>btDnm{r-UW|_FM{# literal 0 HcmV?d00001 diff --git a/src/art/thralls/thrall_party.png b/src/art/thralls/thrall_party.png new file mode 100644 index 0000000000000000000000000000000000000000..f5ed25dd7b5ae950e01377e0454bce0203ae1434 GIT binary patch literal 503 zcmeAS@N?(olHy`uVBq!ia0vp^20$#q!3-q3mHXZSDaPU;cPEB*=VV?2IR^rKLR{I{ zI79@5t;JP~#dWtRXx+C{{*}e`bFuXQtB(KwI9&UbGUv8))oa9x0fV;xish2gIAk(UhJN{KDV^jDj)tgVCu$K!GQPJ(IJ`N9WGQ6Cqda(rTaoc6hK>kYmr4oF}_yubMOa zZQiOoXC80}2F$5ac(uoHlhWzhucim~8NQDE$L{bicXIu0@iUU&SiAQ!wEbh^%FF!y ssny}VsP5M0Dcm_8=gtQ<94&6)=YK34qOyCXF3^z-p00i_>zopr06u^DM*si- literal 0 HcmV?d00001 diff --git a/src/art/thralls/thrall_stare.png b/src/art/thralls/thrall_stare.png new file mode 100644 index 0000000000000000000000000000000000000000..cc40e25acf46776e35b46d1faac89779fb41fe4c GIT binary patch literal 523 zcmeAS@N?(olHy`uVBq!ia0vp^20$#q!3-q3mHXZSDaPU;cPEB*=VV?2IR^rKLR{I{ zI79@5t;JP~#dWtRXx+C{{*}e`bFuXQtB(KwI9&UbGUv8))oa9x0fV;xish2gIAk(UhJN{KDV^jD0kKUp^Xby-e*< zP3i`r+DIYMSISz9Yog3US>8x8?rz<;CqI_4@N?AbHbwU!l{vO+2xOzNrZg$;Q>0F N!PC{xWt~$(698da1$F=c literal 0 HcmV?d00001 diff --git a/src/art/thralls/thrall_stealth.png b/src/art/thralls/thrall_stealth.png new file mode 100644 index 0000000000000000000000000000000000000000..cdc55b7a80a4a4ee0d110d66b599dc0c6e1d966c GIT binary patch literal 503 zcmeAS@N?(olHy`uVBq!ia0vp^20$#q!3-q3mHXZSDaPU;cPEB*=VV?2IR^rKLR{I{ zI79@5t;JP~#dWtRXx+C{{*}e`bFuXQtB(KwI9&UbGUv8))oa9x0fV;xish2gIAk(UhJN{KDV^jDolKlTanmugR4AoPyr5+}m zdkok9&0kr>7jpSb$IDX}UZ@;AE_jqjm*>i{$|~W<7JI&btmFKy+YozbpK6caKGC+1 z`D-t}+d5Zpa+;aW+`u_^Pi>BU$)&bv tb#bHbOV&Oxjla2lPsPeR3a&-Z { D.drawSprite( - sprRaccoonWalking, - cellOffset.offset(new Point(0, 22)), - 0, { - xScale: 2, + sprThrallLore, + cellOffset, + 1, { + xScale: this.faceLeft ? -2 : 2, yScale: 2 } ) diff --git a/src/pickups.ts b/src/pickups.ts index 75d51b7..2c5cb87 100644 --- a/src/pickups.ts +++ b/src/pickups.ts @@ -5,7 +5,7 @@ import {getHuntMode, HuntMode, initHuntMode} from "./huntmode.ts"; import {generateMap} from "./mapgen.ts"; import {ALL_STATS, Stat} from "./datatypes.ts"; import {D} from "./engine/public.ts"; -import {sprLadder, sprLock, sprRaccoonWalking, sprResourcePickup, sprStatPickup} from "./sprites.ts"; +import {sprLadder, sprLock, sprResourcePickup, sprStatPickup} from "./sprites.ts"; import {GridArt} from "./gridart.ts"; import {getCheckModal} from "./checkmodal.ts"; import {Point} from "./engine/datatypes.ts"; @@ -136,7 +136,8 @@ export class ThrallPickup { drawFloor() { } drawInAir(gridArt: GridArt) { - D.drawSprite(sprRaccoonWalking, gridArt.project(0.0), 0, { + let data = getThralls().get(this.thrall); + D.drawSprite(data.sprite, gridArt.project(0.0), 0, { xScale: 2.0, yScale: 2.0, }) diff --git a/src/sprites.ts b/src/sprites.ts index b1a016b..c4c763f 100644 --- a/src/sprites.ts +++ b/src/sprites.ts @@ -1,36 +1,25 @@ import {Sprite} from "./engine/internal/sprite.ts"; -/* -import imgBat from "./art/characters/bat.png"; -import imgKobold from "./art/characters/kobold.png"; -import imgRobot from "./art/characters/robot.png"; -import imgSnake from "./art/characters/snake.png"; - */ + import imgRaccoon from "./art/characters/raccoon.png"; -import imgRaccoonWalking from "./art/characters/raccoon_walking.png"; import imgResourcePickup from "./art/pickups/resources.png"; import imgStatPickup from "./art/pickups/stats.png"; import imgLadder from "./art/pickups/ladder.png"; import imgLock from "./art/pickups/lock.png"; -import imgDrips from "./art/tilesets/drips.png"; import {Point, Size} from "./engine/datatypes.ts"; -/* -export let sprBat = new Sprite(imgBat, 64, 64, 32, 32, 1, 1, 1); -export let sprKobold = new Sprite(imgKobold, 64, 64, 32, 32, 1, 1, 1); -export let sprRobot = new Sprite(imgRobot, 64, 64, 32, 32, 1, 1, 1); -export let sprSnake = new Sprite(imgSnake, 64, 64, 32, 32, 1, 1, 1); - */ +import imgThrallBat from "./art/thralls/thrall_bat.png"; +import imgThrallCharm from "./art/thralls/thrall_charm.png"; +import imgThrallLore from "./art/thralls/thrall_lore.png"; +import imgThrallParty from "./art/thralls/thrall_party.png"; +import imgThrallStare from "./art/thralls/thrall_stare.png"; +import imgThrallStealth from "./art/thralls/thrall_stealth.png"; + export let sprRaccoon = new Sprite( imgRaccoon, new Size(64, 64), new Point(32, 32), new Size(1, 1), 1 ); -export let sprRaccoonWalking = new Sprite( - imgRaccoonWalking, - new Size(64, 64), new Point(32, 32), new Size(8, 1), - 8 -); export let sprResourcePickup = new Sprite( imgResourcePickup, new Size(32, 32), new Point(16, 16), new Size(1, 1), 1 @@ -41,11 +30,6 @@ export let sprStatPickup = new Sprite( new Size(4, 1), 4 ); -export let sprDrips = new Sprite( - imgDrips, new Size(32, 16), new Point(16, 0), - new Size(2, 1), 2 -); - export let sprLadder = new Sprite( imgLadder, new Size(16, 16), new Point(8, 8), new Size(1, 1), 1 @@ -55,3 +39,11 @@ export let sprLock = new Sprite( imgLock, new Size(16, 16), new Point(8, 8), new Size(1, 1), 1 ); + + +export let sprThrallBat = new Sprite(imgThrallBat, new Size(24, 24), new Point(12, 12), new Size(2, 1), 2); +export let sprThrallCharm = new Sprite(imgThrallCharm, new Size(24, 24), new Point(12, 12), new Size(2, 1), 2); +export let sprThrallLore = new Sprite(imgThrallLore, new Size(24, 24), new Point(12, 12), new Size(2, 1), 2); +export let sprThrallParty = new Sprite(imgThrallParty, new Size(24, 24), new Point(12, 12), new Size(2, 1), 2); +export let sprThrallStare = new Sprite(imgThrallStare, new Size(24, 24), new Point(12, 12), new Size(2, 1), 2); +export let sprThrallStealth = new Sprite(imgThrallStealth, new Size(24, 24), new Point(12, 12), new Size(2, 1), 2); diff --git a/src/thralls.ts b/src/thralls.ts index 1a6b50c..bf1930e 100644 --- a/src/thralls.ts +++ b/src/thralls.ts @@ -13,6 +13,15 @@ import { stealth0, stealth1 } from "./skills.ts"; +import { + sprThrallBat, + sprThrallCharm, + sprThrallLore, + sprThrallParty, + sprThrallStare, + sprThrallStealth +} from "./sprites.ts"; +import {Sprite} from "./engine/internal/sprite.ts"; export type Thrall = { id: number @@ -36,8 +45,9 @@ class ThrallsTable { } } export type ThrallData = { - label: string - initialCheck: CheckData + label: string, + sprite: Sprite, + initialCheck: CheckData, } let table = new ThrallsTable(); @@ -52,6 +62,7 @@ export function getThralls() { // or Lore) export let thrallParty = table.add({ label: "Garrett", + sprite: sprThrallParty, initialCheck: { label: "That's Garrett. He plays poker, but he goes to the zoo to cool down after he's lost a lot of chips. His ice cream cone has melted.", options: [ @@ -75,8 +86,9 @@ export let thrallParty = table.add({ export let thrallLore = table.add({ label: "Lupin", + sprite: sprThrallLore, initialCheck: { - label: "That's Lupin. He's a Wolf Scout, but hardcore about it. He's a packleader.", + label: "That's Lupin. He's a Wolf Scout, but hardcore about it. I'm not sure he knows he's a raccoon.", options: [ { skill: () => stare1, // Hypnotize @@ -98,6 +110,7 @@ export let thrallLore = table.add({ export let thrallBat = table.add({ label: "Monica", + sprite: sprThrallBat, initialCheck: { label: "That's Monica. You've seen her cook on TV! Looks like she's enjoying a kiwi flan.", options: [ @@ -121,6 +134,7 @@ export let thrallBat = table.add({ export let thrallCharm = table.add({ label: "Renfield", + sprite: sprThrallCharm, initialCheck: { label: "Doesn't this guy seem a little creepy? His nametag says Renfield. Not sure you should trust him...", options: [ @@ -144,6 +158,7 @@ export let thrallCharm = table.add({ export let thrallStealth = table.add({ label: "Narthyss", + sprite: sprThrallStealth, initialCheck: { label: "Narthyss (dragon, heiress) actually owns the club, so she probably wouldn't talk to you... Would she?", options: [ @@ -167,6 +182,7 @@ export let thrallStealth = table.add({ export let thrallStare = table.add({ label: "Ridley", + sprite: sprThrallStare, initialCheck: { label: "Ridley is the library's catalogue system. It can give you an incorrect answer to any question. (It has a couple gears loose.)", options: [