diff --git a/src/assets/assets.ts b/src/assets/assets.ts index 99f4c15..26f1722 100644 --- a/src/assets/assets.ts +++ b/src/assets/assets.ts @@ -65,16 +65,61 @@ const images: Image[] = [ image('characters/smallCWalk2', 'small_customer_walk2'), image('characters/smallCWalk3', 'small_customer_walk3'), image('characters/smallCSit1', 'small_customer_sit1'), + + image('characters/smallCWalk1_red', 'small_customer_walk1_red'), + image('characters/smallCWalk2_red', 'small_customer_walk2_red'), + image('characters/smallCWalk3_red', 'small_customer_walk3_red'), + image('characters/smallCSit1_red', 'small_customer_sit1_red'), + + image('characters/smallCWalk1_aqua', 'small_customer_walk1_aqua'), + image('characters/smallCWalk2_aqua', 'small_customer_walk2_aqua'), + image('characters/smallCWalk3_aqua', 'small_customer_walk3_aqua'), + image('characters/smallCSit1_aqua', 'small_customer_sit1_aqua'), + + image('characters/smallCWalk1_green', 'small_customer_walk1_green'), + image('characters/smallCWalk2_green', 'small_customer_walk2_green'), + image('characters/smallCWalk3_green', 'small_customer_walk3_green'), + image('characters/smallCSit1_green', 'small_customer_sit1_green'), // Medium size customers image('characters/medCWalk1', 'medium_customer_walk1'), image('characters/medCWalk2', 'medium_customer_walk2'), image('characters/medCWalk3', 'medium_customer_walk3'), image('characters/medCSit1', 'medium_customer_sit1'), + + image('characters/medCWalk1_red', 'med_customer_walk1_red'), + image('characters/medCWalk2_red', 'med_customer_walk2_red'), + image('characters/medCWalk3_red', 'med_customer_walk3_red'), + image('characters/medCSit1_red', 'med_customer_sit1_red'), + + image('characters/medCWalk1_aqua', 'med_customer_walk1_aqua'), + image('characters/medCWalk2_aqua', 'med_customer_walk2_aqua'), + image('characters/medCWalk3_aqua', 'med_customer_walk3_aqua'), + image('characters/medCSit1_aqua', 'med_customer_sit1_aqua'), + + image('characters/medCWalk1_green', 'med_customer_walk1_green'), + image('characters/medCWalk2_green', 'med_customer_walk2_green'), + image('characters/medCWalk3_green', 'med_customer_walk3_green'), + image('characters/medCSit1_green', 'med_customer_sit1_green'), // Large size customers image('characters/largeCWalk1', 'large_customer_walk1'), image('characters/largeCWalk2', 'large_customer_walk2'), image('characters/largeCWalk3', 'large_customer_walk3'), image('characters/largeCSit1', 'large_customer_sit1'), + + image('characters/largeCWalk1_red', 'large_customer_walk1_red'), + image('characters/largeCWalk2_red', 'large_customer_walk2_red'), + image('characters/largeCWalk3_red', 'large_customer_walk3_red'), + image('characters/largeCSit1_red', 'large_customer_sit1_red'), + + image('characters/largeCWalk1_aqua', 'large_customer_walk1_aqua'), + image('characters/largeCWalk2_aqua', 'large_customer_walk2_aqua'), + image('characters/largeCWalk3_aqua', 'large_customer_walk3_aqua'), + image('characters/largeCSit1_aqua', 'large_customer_sit1_aqua'), + + image('characters/largeCWalk1_green', 'large_customer_walk1_green'), + image('characters/largeCWalk2_green', 'large_customer_walk2_green'), + image('characters/largeCWalk3_green', 'large_customer_walk3_green'), + image('characters/largeCSit1_green', 'large_customer_sit1_green'), // Sprite image('characters/moneybagSprite', 'moneybag_sprite'), @@ -108,12 +153,18 @@ const images: Image[] = [ image('ui/sad', 'sad'), image('ui/timer', 'timer'), image('ui/plus', 'plus'), + image('ui/wax', 'wax'), + image('ui/nail', 'nail'), + image('ui/bath', 'bath'), // Titlescreen - image('titlescreen/sky', 'title_sky'), image('titlescreen/background', 'title_background'), - image('titlescreen/foreground', 'title_foreground'), - image('titlescreen/character', 'title_character'), + image('titlescreen/backgroundsitting', 'title_chairs'), + image('titlescreen/backgroundbath', 'title_bath'), + image('titlescreen/tail', 'title_tail'), + image('titlescreen/hand', 'title_hand'), + image('titlescreen/washbeartail', 'title_washbear_tail'), + image('titlescreen/washbearhand', 'title_washbear_hand'), //temp image('temp/invwindow', 'invwindow'), @@ -130,6 +181,7 @@ const images: Image[] = [ image('temp/h4', 'h4'), image('temp/h5', 'h5'), image('temp/h6', 'h6'), + image('temp/blanksq', 'blanksq'), ]; diff --git a/src/assets/images/characters/largeCSit1_aqua.png b/src/assets/images/characters/largeCSit1_aqua.png new file mode 100644 index 0000000..746e10c Binary files /dev/null and b/src/assets/images/characters/largeCSit1_aqua.png differ diff --git a/src/assets/images/characters/largeCSit1_green.png b/src/assets/images/characters/largeCSit1_green.png new file mode 100644 index 0000000..d98b583 Binary files /dev/null and b/src/assets/images/characters/largeCSit1_green.png differ diff --git a/src/assets/images/characters/largeCSit1_red.png b/src/assets/images/characters/largeCSit1_red.png new file mode 100644 index 0000000..23fcba1 Binary files /dev/null and b/src/assets/images/characters/largeCSit1_red.png differ diff --git a/src/assets/images/characters/largeCWalk1_aqua.png b/src/assets/images/characters/largeCWalk1_aqua.png new file mode 100644 index 0000000..f82f47f Binary files /dev/null and b/src/assets/images/characters/largeCWalk1_aqua.png differ diff --git a/src/assets/images/characters/largeCWalk1_green.png b/src/assets/images/characters/largeCWalk1_green.png new file mode 100644 index 0000000..69cfd32 Binary files /dev/null and b/src/assets/images/characters/largeCWalk1_green.png differ diff --git a/src/assets/images/characters/largeCWalk1_red.png b/src/assets/images/characters/largeCWalk1_red.png new file mode 100644 index 0000000..d2f9985 Binary files /dev/null and b/src/assets/images/characters/largeCWalk1_red.png differ diff --git a/src/assets/images/characters/largeCWalk2_aqua.png b/src/assets/images/characters/largeCWalk2_aqua.png new file mode 100644 index 0000000..2b2cd2d Binary files /dev/null and b/src/assets/images/characters/largeCWalk2_aqua.png differ diff --git a/src/assets/images/characters/largeCWalk2_green.png b/src/assets/images/characters/largeCWalk2_green.png new file mode 100644 index 0000000..9e5ca5d Binary files /dev/null and b/src/assets/images/characters/largeCWalk2_green.png differ diff --git a/src/assets/images/characters/largeCWalk2_red.png b/src/assets/images/characters/largeCWalk2_red.png new file mode 100644 index 0000000..c7fa157 Binary files /dev/null and b/src/assets/images/characters/largeCWalk2_red.png differ diff --git a/src/assets/images/characters/largeCWalk3_aqua.png b/src/assets/images/characters/largeCWalk3_aqua.png new file mode 100644 index 0000000..40fba54 Binary files /dev/null and b/src/assets/images/characters/largeCWalk3_aqua.png differ diff --git a/src/assets/images/characters/largeCWalk3_green.png b/src/assets/images/characters/largeCWalk3_green.png new file mode 100644 index 0000000..0a0260a Binary files /dev/null and b/src/assets/images/characters/largeCWalk3_green.png differ diff --git a/src/assets/images/characters/largeCWalk3_red.png b/src/assets/images/characters/largeCWalk3_red.png new file mode 100644 index 0000000..f974d8e Binary files /dev/null and b/src/assets/images/characters/largeCWalk3_red.png differ diff --git a/src/assets/images/characters/medCSit1.png b/src/assets/images/characters/medCSit1.png index 86058ee..5cd437d 100644 Binary files a/src/assets/images/characters/medCSit1.png and b/src/assets/images/characters/medCSit1.png differ diff --git a/src/assets/images/characters/medCSit1_aqua.png b/src/assets/images/characters/medCSit1_aqua.png new file mode 100644 index 0000000..1cbc2f4 Binary files /dev/null and b/src/assets/images/characters/medCSit1_aqua.png differ diff --git a/src/assets/images/characters/medCSit1_green.png b/src/assets/images/characters/medCSit1_green.png new file mode 100644 index 0000000..7b2d0fc Binary files /dev/null and b/src/assets/images/characters/medCSit1_green.png differ diff --git a/src/assets/images/characters/medCSit1_red.png b/src/assets/images/characters/medCSit1_red.png new file mode 100644 index 0000000..f0b1649 Binary files /dev/null and b/src/assets/images/characters/medCSit1_red.png differ diff --git a/src/assets/images/characters/medCWalk1.png b/src/assets/images/characters/medCWalk1.png index f31244a..3a7fac5 100644 Binary files a/src/assets/images/characters/medCWalk1.png and b/src/assets/images/characters/medCWalk1.png differ diff --git a/src/assets/images/characters/medCWalk1_aqua.png b/src/assets/images/characters/medCWalk1_aqua.png new file mode 100644 index 0000000..8f62fc4 Binary files /dev/null and b/src/assets/images/characters/medCWalk1_aqua.png differ diff --git a/src/assets/images/characters/medCWalk1_green.png b/src/assets/images/characters/medCWalk1_green.png new file mode 100644 index 0000000..367edf5 Binary files /dev/null and b/src/assets/images/characters/medCWalk1_green.png differ diff --git a/src/assets/images/characters/medCWalk1_red.png b/src/assets/images/characters/medCWalk1_red.png new file mode 100644 index 0000000..d8a7c44 Binary files /dev/null and b/src/assets/images/characters/medCWalk1_red.png differ diff --git a/src/assets/images/characters/medCWalk2.png b/src/assets/images/characters/medCWalk2.png index 47fcd04..bb62a14 100644 Binary files a/src/assets/images/characters/medCWalk2.png and b/src/assets/images/characters/medCWalk2.png differ diff --git a/src/assets/images/characters/medCWalk2_aqua.png b/src/assets/images/characters/medCWalk2_aqua.png new file mode 100644 index 0000000..bd5e245 Binary files /dev/null and b/src/assets/images/characters/medCWalk2_aqua.png differ diff --git a/src/assets/images/characters/medCWalk2_green.png b/src/assets/images/characters/medCWalk2_green.png new file mode 100644 index 0000000..064f781 Binary files /dev/null and b/src/assets/images/characters/medCWalk2_green.png differ diff --git a/src/assets/images/characters/medCWalk2_red.png b/src/assets/images/characters/medCWalk2_red.png new file mode 100644 index 0000000..8ac359b Binary files /dev/null and b/src/assets/images/characters/medCWalk2_red.png differ diff --git a/src/assets/images/characters/medCWalk3.png b/src/assets/images/characters/medCWalk3.png index 0ffccb7..4e29487 100644 Binary files a/src/assets/images/characters/medCWalk3.png and b/src/assets/images/characters/medCWalk3.png differ diff --git a/src/assets/images/characters/medCWalk3_aqua.png b/src/assets/images/characters/medCWalk3_aqua.png new file mode 100644 index 0000000..39e47dc Binary files /dev/null and b/src/assets/images/characters/medCWalk3_aqua.png differ diff --git a/src/assets/images/characters/medCWalk3_green.png b/src/assets/images/characters/medCWalk3_green.png new file mode 100644 index 0000000..5dc3af3 Binary files /dev/null and b/src/assets/images/characters/medCWalk3_green.png differ diff --git a/src/assets/images/characters/medCWalk3_red.png b/src/assets/images/characters/medCWalk3_red.png new file mode 100644 index 0000000..c3a3853 Binary files /dev/null and b/src/assets/images/characters/medCWalk3_red.png differ diff --git a/src/assets/images/characters/smallCSit1_aqua.png b/src/assets/images/characters/smallCSit1_aqua.png new file mode 100644 index 0000000..c4fe088 Binary files /dev/null and b/src/assets/images/characters/smallCSit1_aqua.png differ diff --git a/src/assets/images/characters/smallCSit1_green.png b/src/assets/images/characters/smallCSit1_green.png new file mode 100644 index 0000000..821752b Binary files /dev/null and b/src/assets/images/characters/smallCSit1_green.png differ diff --git a/src/assets/images/characters/smallCSit1_red.png b/src/assets/images/characters/smallCSit1_red.png new file mode 100644 index 0000000..11055d4 Binary files /dev/null and b/src/assets/images/characters/smallCSit1_red.png differ diff --git a/src/assets/images/characters/smallCWalk1_aqua.png b/src/assets/images/characters/smallCWalk1_aqua.png new file mode 100644 index 0000000..f8801f3 Binary files /dev/null and b/src/assets/images/characters/smallCWalk1_aqua.png differ diff --git a/src/assets/images/characters/smallCWalk1_green.png b/src/assets/images/characters/smallCWalk1_green.png new file mode 100644 index 0000000..8cc557f Binary files /dev/null and b/src/assets/images/characters/smallCWalk1_green.png differ diff --git a/src/assets/images/characters/smallCWalk1_red.png b/src/assets/images/characters/smallCWalk1_red.png new file mode 100644 index 0000000..15380ee Binary files /dev/null and b/src/assets/images/characters/smallCWalk1_red.png differ diff --git a/src/assets/images/characters/smallCWalk2_aqua.png b/src/assets/images/characters/smallCWalk2_aqua.png new file mode 100644 index 0000000..47ce6ae Binary files /dev/null and b/src/assets/images/characters/smallCWalk2_aqua.png differ diff --git a/src/assets/images/characters/smallCWalk2_green.png b/src/assets/images/characters/smallCWalk2_green.png new file mode 100644 index 0000000..d9f8883 Binary files /dev/null and b/src/assets/images/characters/smallCWalk2_green.png differ diff --git a/src/assets/images/characters/smallCWalk2_red.png b/src/assets/images/characters/smallCWalk2_red.png new file mode 100644 index 0000000..52e6f75 Binary files /dev/null and b/src/assets/images/characters/smallCWalk2_red.png differ diff --git a/src/assets/images/characters/smallCWalk3_aqua.png b/src/assets/images/characters/smallCWalk3_aqua.png new file mode 100644 index 0000000..19a5c5b Binary files /dev/null and b/src/assets/images/characters/smallCWalk3_aqua.png differ diff --git a/src/assets/images/characters/smallCWalk3_green.png b/src/assets/images/characters/smallCWalk3_green.png new file mode 100644 index 0000000..4927004 Binary files /dev/null and b/src/assets/images/characters/smallCWalk3_green.png differ diff --git a/src/assets/images/characters/smallCWalk3_red.png b/src/assets/images/characters/smallCWalk3_red.png new file mode 100644 index 0000000..70b4191 Binary files /dev/null and b/src/assets/images/characters/smallCWalk3_red.png differ diff --git a/src/assets/images/temp/blanksq.png b/src/assets/images/temp/blanksq.png new file mode 100644 index 0000000..9fc6d98 Binary files /dev/null and b/src/assets/images/temp/blanksq.png differ diff --git a/src/assets/images/temp/milk.png b/src/assets/images/temp/milk.png index 50dd6ea..cfc9a71 100644 Binary files a/src/assets/images/temp/milk.png and b/src/assets/images/temp/milk.png differ diff --git a/src/assets/images/temp/notmilk.png b/src/assets/images/temp/notmilk.png new file mode 100644 index 0000000..50dd6ea Binary files /dev/null and b/src/assets/images/temp/notmilk.png differ diff --git a/src/assets/images/titlescreen/background.png b/src/assets/images/titlescreen/background.png index e8e4aa0..dd8749c 100644 Binary files a/src/assets/images/titlescreen/background.png and b/src/assets/images/titlescreen/background.png differ diff --git a/src/assets/images/titlescreen/backgroundbath.png b/src/assets/images/titlescreen/backgroundbath.png new file mode 100644 index 0000000..0493e9d Binary files /dev/null and b/src/assets/images/titlescreen/backgroundbath.png differ diff --git a/src/assets/images/titlescreen/backgroundsitting.png b/src/assets/images/titlescreen/backgroundsitting.png new file mode 100644 index 0000000..17299ad Binary files /dev/null and b/src/assets/images/titlescreen/backgroundsitting.png differ diff --git a/src/assets/images/titlescreen/hand.png b/src/assets/images/titlescreen/hand.png new file mode 100644 index 0000000..0ffd48f Binary files /dev/null and b/src/assets/images/titlescreen/hand.png differ diff --git a/src/assets/images/titlescreen/tail.png b/src/assets/images/titlescreen/tail.png new file mode 100644 index 0000000..ba03416 Binary files /dev/null and b/src/assets/images/titlescreen/tail.png differ diff --git a/src/assets/images/titlescreen/temptitlescreen.clip b/src/assets/images/titlescreen/temptitlescreen.clip deleted file mode 100644 index b2cd996..0000000 Binary files a/src/assets/images/titlescreen/temptitlescreen.clip and /dev/null differ diff --git a/src/assets/images/titlescreen/titlescreen full.png b/src/assets/images/titlescreen/titlescreen full.png new file mode 100644 index 0000000..6347845 Binary files /dev/null and b/src/assets/images/titlescreen/titlescreen full.png differ diff --git a/src/assets/images/titlescreen/washbearhand.png b/src/assets/images/titlescreen/washbearhand.png new file mode 100644 index 0000000..7bc930b Binary files /dev/null and b/src/assets/images/titlescreen/washbearhand.png differ diff --git a/src/assets/images/titlescreen/washbeartail.png b/src/assets/images/titlescreen/washbeartail.png new file mode 100644 index 0000000..cbc4246 Binary files /dev/null and b/src/assets/images/titlescreen/washbeartail.png differ diff --git a/src/assets/images/ui/bath.png b/src/assets/images/ui/bath.png new file mode 100644 index 0000000..5ca80f4 Binary files /dev/null and b/src/assets/images/ui/bath.png differ diff --git a/src/assets/images/ui/nail.png b/src/assets/images/ui/nail.png new file mode 100644 index 0000000..25955e3 Binary files /dev/null and b/src/assets/images/ui/nail.png differ diff --git a/src/assets/images/ui/wax.png b/src/assets/images/ui/wax.png new file mode 100644 index 0000000..db7f2a9 Binary files /dev/null and b/src/assets/images/ui/wax.png differ diff --git a/src/assets/music/salonbase.mp3 b/src/assets/music/salonbase.mp3 new file mode 100644 index 0000000..35272d3 Binary files /dev/null and b/src/assets/music/salonbase.mp3 differ diff --git a/src/assets/music/saloncutscene.mp3 b/src/assets/music/saloncutscene.mp3 new file mode 100644 index 0000000..98001d8 Binary files /dev/null and b/src/assets/music/saloncutscene.mp3 differ diff --git a/src/assets/music/salondowntime.mp3 b/src/assets/music/salondowntime.mp3 new file mode 100644 index 0000000..e4a8f9a Binary files /dev/null and b/src/assets/music/salondowntime.mp3 differ diff --git a/src/components/Customer.ts b/src/components/Customer.ts index bf0e186..5687fbf 100644 --- a/src/components/Customer.ts +++ b/src/components/Customer.ts @@ -34,7 +34,6 @@ export class Customer extends Button { public itinerary: StationType[]; // List of stations to visit public requestedStation: StationType | null; public hasEnteredShop: boolean = false; - public hasCompleted: boolean = false; // Happiness variables @@ -69,6 +68,7 @@ export class Customer extends Button { private thoughtBubble: ThoughtBubble; private angryImage: Phaser.GameObjects.Sprite; private patienceTimer: Timer; + private spriteList: string[]; public itemList: number[]; public sprList: Phaser.GameObjects.Sprite[]; @@ -113,7 +113,7 @@ export class Customer extends Button { this.spriteCont = this.scene.add.container(0, this.spriteOffset); this.add(this.spriteCont); - this.sprite = this.scene.add.sprite(0, 0, this.spriteKeys.sit); + this.sprite = this.scene.add.sprite(0, 0, (this.spriteKeys.sit)); this.sprite.setOrigin(0.5, 1.0); this.sprite.setScale(this.spriteSize / this.sprite.width); this.spriteCont.add(this.sprite); @@ -189,7 +189,7 @@ export class Customer extends Button { this.setScale(1.0, squish - 0.2 * this.holdSmooth); this.sprite.setTint( - interpolateColor(0xff0000, this.customColor, 2 * this.patience) + interpolateColor(0xff0000, 0xFFFFFF, 2 * this.patience) ); if (this.isWaiting) { @@ -679,6 +679,14 @@ export class Customer extends Button { } } + getColorTags(){ + + } + + getColorAntiTags(){ + + } + /* Getters */ get isWaiting(): boolean { diff --git a/src/components/CustomerData.ts b/src/components/CustomerData.ts index d1637d9..9b9131b 100644 --- a/src/components/CustomerData.ts +++ b/src/components/CustomerData.ts @@ -11,9 +11,15 @@ export enum CustomerId { */ export enum CustomerId { - Small, - Medium, - Large, + SmallRed, + SmallAqua, + SmallGreen, + MediumRed, + MediumAqua, + MediumGreen, + LargeRed, + LargeAqua, + LargeGreen, } export interface CustomerInterface { @@ -115,60 +121,174 @@ export const CustomerData: { [key in CustomerId]: CustomerInterface } = { */ export const CustomerData: { [key in CustomerId]: CustomerInterface } = { - [CustomerId.Small]: { + [CustomerId.SmallRed]: { tier: 1, spriteKeys: { walk: [ - "small_customer_walk1", - "small_customer_walk2", - "small_customer_walk1", - "small_customer_walk3", + "small_customer_walk1_red", + "small_customer_walk2_red", + "small_customer_walk1_red", + "small_customer_walk3_red", ], - sit: "small_customer_sit1", + sit: "small_customer_sit1_red", }, spriteScale: 1.0, walkSpeed: 3, workMultiplier: 1, - tags: [], - antitags: [], + tags: ["red", "kobold"], + antitags: ["aqua", "green", "dino", "dragon"], budget: 100, baseTips: 10, }, - [CustomerId.Medium]: { + [CustomerId.SmallAqua]: { + tier: 1, + spriteKeys: { + walk: [ + "small_customer_walk1_aqua", + "small_customer_walk2_aqua", + "small_customer_walk1_aqua", + "small_customer_walk3_aqua", + ], + sit: "small_customer_sit1_aqua", + }, + spriteScale: 1.0, + walkSpeed: 3, + workMultiplier: 1, + tags: ["aqua", "kobold"], + antitags: ["red", "green", "dino", "dragon"], + budget: 100, + baseTips: 10, + }, + [CustomerId.SmallGreen]: { + tier: 1, + spriteKeys: { + walk: [ + "small_customer_walk1_green", + "small_customer_walk2_green", + "small_customer_walk1_green", + "small_customer_walk3_green", + ], + sit: "small_customer_sit1_green", + }, + spriteScale: 1.0, + walkSpeed: 3, + workMultiplier: 1, + tags: ["green", "kobold"], + antitags: ["red", "aqua", "dino", "dragon"], + budget: 100, + baseTips: 10, + }, + [CustomerId.MediumRed]: { + tier: 2, + spriteKeys: { + walk: [ + "medium_customer_walk1_red", + "medium_customer_walk2_red", + "medium_customer_walk1_red", + "medium_customer_walk3_red", + ], + sit: "medium_customer_sit1_red", + }, + spriteScale: 1.4, + walkSpeed: 2, + workMultiplier: 2, + tags: ["red", "dino"], + antitags: ["aqua", "green", "kobold", "dragon"], + budget: 100, + baseTips: 10, + }, + [CustomerId.MediumAqua]: { tier: 2, spriteKeys: { walk: [ - "medium_customer_walk1", - "medium_customer_walk2", - "medium_customer_walk1", - "medium_customer_walk3", + "medium_customer_walk1_aqua", + "medium_customer_walk2_aqua", + "medium_customer_walk1_aqua", + "medium_customer_walk3_aqua", ], - sit: "medium_customer_sit1", + sit: "medium_customer_sit1_aqua", }, spriteScale: 1.4, walkSpeed: 2, workMultiplier: 2, - tags: [], - antitags: [], + tags: ["aqua", "dino"], + antitags: ["red", "green", "kobold", "dragon"], + budget: 100, + baseTips: 10, + }, + [CustomerId.MediumGreen]: { + tier: 2, + spriteKeys: { + walk: [ + "medium_customer_walk1_green", + "medium_customer_walk2_green", + "medium_customer_walk1_green", + "medium_customer_walk3_green", + ], + sit: "medium_customer_sit1_green", + }, + spriteScale: 1.4, + walkSpeed: 2, + workMultiplier: 2, + tags: ["green", "dino"], + antitags: ["red", "aqua", "kobold", "dragon"], + budget: 100, + baseTips: 10, + }, + [CustomerId.LargeRed]: { + tier: 3, + spriteKeys: { + walk: [ + "large_customer_walk1_red", + "large_customer_walk2_red", + "large_customer_walk1_red", + "large_customer_walk3_red", + ], + sit: "large_customer_sit1_red", + }, + spriteScale: 1.7, + walkSpeed: 1.5, + workMultiplier: 3, + tags: ["red", "dragon"], + antitags: ["aqua", "green", "kobold", "dino"], + budget: 100, + baseTips: 10, + }, + [CustomerId.LargeAqua]: { + tier: 3, + spriteKeys: { + walk: [ + "large_customer_walk1_aqua", + "large_customer_walk2_aqua", + "large_customer_walk1_aqua", + "large_customer_walk3_aqua", + ], + sit: "large_customer_sit1_aqua", + }, + spriteScale: 1.7, + walkSpeed: 1.5, + workMultiplier: 3, + tags: ["aqua", "dragon"], + antitags: ["red", "green", "kobold", "dino"], budget: 100, baseTips: 10, }, - [CustomerId.Large]: { + [CustomerId.LargeGreen]: { tier: 3, spriteKeys: { walk: [ - "large_customer_walk1", - "large_customer_walk2", - "large_customer_walk1", - "large_customer_walk3", + "large_customer_walk1_green", + "large_customer_walk2_green", + "large_customer_walk1_green", + "large_customer_walk3_green", ], - sit: "large_customer_sit1", + sit: "large_customer_sit1_green", }, spriteScale: 1.7, walkSpeed: 1.5, workMultiplier: 3, - tags: [], - antitags: [], + tags: ["green", "dragon"], + antitags: ["red", "aqua", "kobold", "dino"], budget: 100, baseTips: 10, }, diff --git a/src/components/Inventory.ts b/src/components/Inventory.ts index b2ed58c..dec5009 100644 --- a/src/components/Inventory.ts +++ b/src/components/Inventory.ts @@ -22,12 +22,11 @@ export class Inventory extends Phaser.GameObjects.Container { [64,232], [148,232], [232,232], [64,316], [148,316], [232,316] ]; - constructor(scene:GameScene, x:number, y:number, stock:number[]){ - super(scene,x,y); - this.scene=scene; - this.itemList = [ + + /* + this.itemList = [ new Item(0,"rock",stock[0],1,["rock","cheap"],["cheap"],"Complimentary Pet Rock","A loving pet rock to cheer up any customer. Works modestly well.", SnapType.CUSTOMER, "doink"), - new Item(1,"coke",stock[1],50,["drug"],["illegal","cool"],"Sugar","A delicious white powder made from plants. Improves working speed a whole bunch!", SnapType.STATION, "chomp"), + new Item(1,"sugar",stock[1],50,["drug"],["illegal","cool"],"Sugar","A delicious white powder made from plants. Improves working speed a whole bunch!", SnapType.STATION, "chomp"), new Item(2,"hotdog",stock[2],25,["raptor","meat","bread","skeleton","ketchup","mustard","gay"],["meat","elitist","gay","gluten"],"Hot Dog","A big wiener with sauce, to satisfy any meat lover. You can also buy a bacon-wrapped cheesy version for 69 kr.", SnapType.CUSTOMER, "chomp"), new Item(3,"brocc",stock[3],12,["triceratops","veggie","healthy","stinky"],["veggie","healthy","stinky"],"Broccoli","This large stalk of free-range broccoli is perfect for vegans and herbivorous animals.", SnapType.CUSTOMER, "chomp"), new Item(4,"usb",stock[4],30,["protogen","tech","metal","nerd"],["nerd","tech"],"Mini USB Drive", "Additional storage space in a compact unit. I wonder who would want this?", SnapType.CUSTOMER, "doink"), @@ -40,6 +39,25 @@ export class Inventory extends Phaser.GameObjects.Container { new Item(11,"pillowtalk",stock[11],50,["horny","soft","cringe"],["horny","cringe"],"Pillow Talk","Instruct a station to talk to a customer alluringly and have them use more services. Good telemarketing is vital!", SnapType.STATION, "slurp"), new Item(12,"shuriken",stock[12],75,["sharp","weeb","ninja","cringe","cool"],["cool","cringe","weeb","sharp"],"Shuriken","Equip a station to allow the stylists to critically strike when grooming! It's some type of mysterious fidget spinner that sharpens mental capabilites. ", SnapType.STATION, "meme_explosion_sound"), ]; + */ + constructor(scene:GameScene, x:number, y:number, stock:number[]){ + super(scene,x,y); + this.scene=scene; + this.itemList = [ + new Item(0,"rock",stock[0],1,["rock","cheap"],["cheap"],"Complimentary Pet Rock","A loving pet rock to cheer up any customer. Works modestly well.", SnapType.CUSTOMER, "doink"), + new Item(1,"sugar",stock[1],20,["drug"],["illegal","cool"],"Sugar","A delicious white powder made from plants. Improves working speed a whole bunch!", SnapType.STATION, "chomp"), + new Item(2,"hotdog",stock[2],25,["red"],["red"],"Hot Dog","A thick wiener with condiments. This savory snack is great for hot-headed customers.", SnapType.CUSTOMER, "chomp"), + new Item(3,"brocc",stock[3],12,["green"],["green"],"Broccoli","Verdant customers will be overjoyed to have this stalk of organic free-range broccoli.", SnapType.CUSTOMER, "chomp"), + new Item(4,"snowglobe",stock[4],30,["blue"],["blue"],"Snowglobe", "A cute little snowglobe that appeals to frosty-looking customers.", SnapType.CUSTOMER, "doink"), + new Item(5,"usb",stock[5],40,["kobold"],["kobold"],"Mini USB","A small piece of technology. A pleasant distraction for small kobolds.", SnapType.CUSTOMER, "doink"), + new Item(6,"pocky",stock[6],35,["dino"],["dino"],"Pöcky","Sweet snack made of edible sticks. Dinosaurs love these.", SnapType.CUSTOMER, "chomp"), + new Item(7,"milk",stock[7],30,["dragon"],["dragon"],"Fresh Milk","Warm, creamy milk. Grows strong bones. Essential for big dragons.", SnapType.CUSTOMER, "slurp"), + new Item(8,"hourglass",stock[8],110,["time","physics","glass"],["physics"],"Hourglass","Place on a workstation to fully turn back the time on a customer's patience. Might make it hard to work though...", SnapType.STATION, "doink"), + new Item(9,"hypnosis",stock[9],90,["hypno","horny","kinky","weird","psychic"],["horny","kinky","weird"],"Hypnosis","Uses a state of hypnosis to keep a customer's patience constant. You can't increase it any more either though.", SnapType.CUSTOMER, "doink"), + new Item(10,"polish",stock[10],80,["expensive","creamy","musky"],["expensive","musky"],"Extra-Premium Polish","Put this on a station to give scales a wonderful gloss and unique scent. Most customers love it and will give you generous tips!", SnapType.STATION, "slurp"), + new Item(11,"pillowtalk",stock[11],50,["horny","soft","cringe"],["horny","cringe"],"Pillow Talk","Instruct a station to talk to a customer alluringly and have them use more services. Good telemarketing is vital!", SnapType.STATION, "slurp"), + new Item(12,"shuriken",stock[12],75,["sharp","weeb","ninja","cringe","cool"],["cool","cringe","weeb","sharp"],"Shuriken","Equip a station to allow the stylists to critically strike when grooming! It's some type of mysterious fidget spinner that sharpens mental capabilites. ", SnapType.STATION, "meme_explosion_sound"), + ]; this.display = []; this.window = new Phaser.GameObjects.Image(this.scene,x,y,"invwindow"); this.window.setAlpha(0.85); diff --git a/src/components/ItemHandler.ts b/src/components/ItemHandler.ts index 55559f6..09a03f8 100644 --- a/src/components/ItemHandler.ts +++ b/src/components/ItemHandler.ts @@ -68,15 +68,17 @@ export class ItemHandler { return; } } case 11: { - let r = Math.random()*3; + this.scene.refreshStationIDArray(); + let rs = Math.trunc(Math.random()*this.scene.tArray.length); + //console.log(ct.itinerary); - if(r < 1) { + if(this.scene.tArray[rs] == 0) { ct.itinerary.push(StationType.HornAndNails); this.scene.addEffect(new TextEffect(this.scene, ct.x-60+(Math.random()*120), ct.y-30+(Math.random()*120), "+⬤", "red", 60, false, "red", 1200, 100, 0.7, 0)); - } else if (r < 2) { + } else if (this.scene.tArray[rs] == 1) { ct.itinerary.push(StationType.ScalePolish); this.scene.addEffect(new TextEffect(this.scene, ct.x-60+(Math.random()*120), ct.y-30+(Math.random()*120), "+⬤", "yellow", 60, false, "red", 1200, 100, 0.7, 0)); - } else if (r < 3) { + } else if (this.scene.tArray[rs] == 2) { ct.itinerary.push(StationType.GoldBath); this.scene.addEffect(new TextEffect(this.scene, ct.x-60+(Math.random()*120), ct.y-40, "+⬤", "blue", 60, false, "red", 1200, 100, 0.7, 0)); } @@ -118,7 +120,6 @@ export class ItemHandler { this.parseCustomerPreferredItem(i,ct); break; } case 9: { - ct.lockPatience = true; break; } break; diff --git a/src/components/ShopInventory.ts b/src/components/ShopInventory.ts index 6397301..a471e7f 100644 --- a/src/components/ShopInventory.ts +++ b/src/components/ShopInventory.ts @@ -34,18 +34,36 @@ export class ShopInventory extends Phaser.GameObjects.Container { constructor(scene:GameScene, x:number, y:number, stock:number[]){ super(scene,x,y); this.scene=scene; + + /* + this.itemList = [ + new Item(0,"rock",stock[0],1,["rock","cheap"],["cheap"],"Complimentary Pet Rock","A loving pet rock to cheer up any customer. Works modestly well.", SnapType.CUSTOMER, "doink"), + new Item(1,"sugar",stock[1],20,["drug"],["illegal","cool"],"Sugar","A delicious white powder made from plants. Improves working speed a whole bunch!", SnapType.STATION, "chomp"), + new Item(2,"hotdog",stock[2],25,["red"],["red"],"Hot Dog","A thick wiener with condiments. This savory snack is great for hot-headed customers.", SnapType.CUSTOMER, "chomp"), + new Item(3,"brocc",stock[3],12,["green"],["green"],"Broccoli","Verdant customers will be overjoyed to have this stalk of organic free-range broccoli.", SnapType.CUSTOMER, "chomp"), + new Item(4,"snowglobe",stock[4],30,["blue"],["blue"],"Snowglobe", "A cute little snowglobe that appeals to frosty-looking customers.", SnapType.CUSTOMER, "doink"), + new Item(5,"usb",stock[5],40,["kobold"],["kobold"],"Mini USB","A small piece of technology. A pleasant distraction for small kobolds.", SnapType.CUSTOMER, "doink"), + new Item(6,"pocky",stock[6],35,["dino"],["dino"],"Packy","Sweet snack made of edible sticks. Dinosaurs love these.", SnapType.CUSTOMER, "chomp"), + new Item(7,"milk",stock[7],30,["dragon"],["dragon"],"Fresh Milk","Warm, creamy milk. Grows strong bones. Essential for big dragons.", SnapType.CUSTOMER, "slurp"), + new Item(8,"hourglass",stock[8],110,["time","physics","glass"],["physics"],"Hourglass","Place on a workstation to fully turn back the time on a customer's patience. Might make it hard to work though...", SnapType.STATION, "doink"), + new Item(9,"hypnosis",stock[9],90,["hypno","horny","kinky","weird","psychic"],["horny","kinky","weird"],"Hypnosis","Uses a state of hypnosis to keep a customer's patience constant. You can't increase it any more either though.", SnapType.CUSTOMER, "doink"), + new Item(10,"polish",stock[10],80,["expensive","creamy","musky"],["expensive","musky"],"Extra-Premium Polish","Put this on a station to give scales a wonderful gloss and unique scent. Most customers love it and will give you generous tips!", SnapType.STATION, "slurp"), + new Item(11,"pillowtalk",stock[11],50,["horny","soft","cringe"],["horny","cringe"],"Pillow Talk","Instruct a station to talk to a customer alluringly and have them use more services. Good telemarketing is vital!", SnapType.STATION, "slurp"), + new Item(12,"shuriken",stock[12],75,["sharp","weeb","ninja","cringe","cool"],["cool","cringe","weeb","sharp"],"Shuriken","Equip a station to allow the stylists to critically strike when grooming! It's some type of mysterious fidget spinner that sharpens mental capabilites. ", SnapType.STATION, "meme_explosion_sound"), + ]; + */ this.itemList = [ new Item(0,"rock",stock[0],1,["rock","cheap"],["cheap"],"Complimentary Pet Rock","A loving pet rock to cheer up any customer. Works modestly well.", SnapType.CUSTOMER, "doink"), new Item(1,"coke",stock[1],10,["drug"],["illegal","cool"],"Sugar","A delicious white powder made from plants. Improves working speed a whole bunch!", SnapType.STATION, "chomp"), - new Item(2,"hotdog",stock[2],12,["raptor","meat","bread","skeleton","ketchup","mustard","gay"],["meat","elitist","gay","gluten"],"Hot Dog","A big wiener with sauce, to satisfy any meat lover. You can also buy a bacon-wrapped cheesy version for 69 kr.", SnapType.CUSTOMER, "chomp"), - new Item(3,"brocc",stock[3],12,["triceratops","veggie","healthy","stinky"],["veggie","healthy","stinky"],"Broccoli","This large stalk of free-range broccoli is perfect for vegans and herbivorous animals.", SnapType.CUSTOMER, "chomp"), - new Item(4,"usb",stock[4],15,["protogen","tech","metal","nerd"],["nerd","tech"],"Mini USB Drive", "Additional storage space in a compact unit. I wonder who would want this?", SnapType.CUSTOMER, "doink"), - new Item(5,"milk",stock[5],15,["dragon","horny","creamy","lactose","gay"],["horny","creamy","lactose","gay"],"Fresh Milk","Fresh, creamy milk for dragons to grow strong bones. Still warm and thick.", SnapType.CUSTOMER, "slurp"), - new Item(6,"snowglobe",stock[6],20,["lugia","kitsch","cold","ball"],["kitsch","cold","ball"],"Snowglobe","A cute little snowglobe. A certain type of customer might want this.", SnapType.CUSTOMER, "doink"), - new Item(7,"pocky",stock[7],20,["boykisser","weeb","cringe","sweet","chocolate"],["weeb","cringe","sweet"],"P*cky","Sweet snack made of edible sticks. There's a traditional game where you kiss while biting them. A favorite of virgins.", SnapType.CUSTOMER, "chomp"), + new Item(2,"hotdog",stock[2],15,["red"],["red"],"Hot Dog","A thick wiener with condiments. This savory snack is great for hot-headed customers.", SnapType.CUSTOMER, "chomp"), + new Item(3,"brocc",stock[3],15,["green"],["green"],"Broccoli","Verdant customers will be overjoyed to have this stalk of organic free-range broccoli.", SnapType.CUSTOMER, "chomp"), + new Item(4,"snowglobe",stock[4],15,["blue"],["blue"],"Snowglobe", "A cute little snowglobe that appeals to frosty-looking customers.", SnapType.CUSTOMER, "doink"), + new Item(5,"usb",stock[5],15,["kobold"],["kobold"],"Mini USB","A small piece of technology. A pleasant distraction for small kobolds.", SnapType.CUSTOMER, "doink"), + new Item(6,"pocky",stock[6],20,["dino"],["dino"],"Pöcky","Sweet snack made of edible sticks. Dinosaurs love these.", SnapType.CUSTOMER, "chomp"), + new Item(7,"milk",stock[7],30,["dragon"],["dragon"],"Fresh Milk","Warm, creamy milk. Grows strong bones. Essential for big dragons.", SnapType.CUSTOMER, "slurp"), new Item(8,"hourglass",stock[8],30,["time","physics","glass"],["physics"],"Hourglass","Place on a workstation to fully turn back the time on a customer's patience. Might make it hard to work though...", SnapType.STATION, "doink"), new Item(9,"hypnosis",stock[9],30,["hypno","horny","kinky","weird","psychic"],["horny","kinky","weird"],"Hypnosis","Uses a state of hypnosis to keep a customer's patience constant. You can't increase it any more either though.", SnapType.CUSTOMER, "doink"), - new Item(10,"polish",stock[10],50,["expensive","creamy","musky"],["expensive","musky"],"Extra-Premium Polish","Put this on a station to give scales a wonderful gloss and unique scent. Most customers love it, but comes at a premium.", SnapType.STATION, "slurp"), + new Item(10,"polish",stock[10],50,["expensive","creamy","musky"],["expensive","musky"],"Extra-Premium Polish","Put this on a station to give scales a wonderful gloss and unique scent. Most customers love it and will give you generous tips!", SnapType.STATION, "slurp"), new Item(11,"pillowtalk",stock[11],40,["horny","soft","cringe"],["horny","cringe"],"Pillow Talk","Instruct a station to talk to a customer alluringly and have them use more services. Good telemarketing is vital!", SnapType.STATION, "slurp"), new Item(12,"shuriken",stock[12],25,["sharp","weeb","ninja","cringe","cool"],["cool","cringe","weeb","sharp"],"Shuriken","Equip a station to allow the stylists to critically strike when grooming! It's some type of mysterious fidget spinner that sharpens mental capabilites. ", SnapType.STATION, "meme_explosion_sound"), ]; diff --git a/src/components/ThoughtBubble.ts b/src/components/ThoughtBubble.ts index 661f300..5ef3b8e 100644 --- a/src/components/ThoughtBubble.ts +++ b/src/components/ThoughtBubble.ts @@ -3,7 +3,7 @@ import { StationType, StationTypeData } from "./StationData"; export class ThoughtBubble extends Phaser.GameObjects.Container { private background: Phaser.GameObjects.Image; - private image: Phaser.GameObjects.Ellipse; + private image: Phaser.GameObjects.Image; private symbol: Phaser.GameObjects.Image; constructor(scene: GameScene, x: number, y: number, size: number) { @@ -16,8 +16,9 @@ export class ThoughtBubble extends Phaser.GameObjects.Container { this.background.setVisible(false); this.add(this.background); - this.image = this.scene.add.ellipse(0, -0.05 * size, 40, 40, 0); + this.image = this.scene.add.image(0, -0.02*size, "blanksq"); this.image.setVisible(false); + this.image.setScale(0.1); this.add(this.image); this.symbol = this.scene.add.image(0, -0.02 * size, "exclamation"); @@ -38,7 +39,19 @@ export class ThoughtBubble extends Phaser.GameObjects.Container { this.symbol.setVisible(false); if (type !== null) { - this.image.fillColor = StationTypeData[type].color; + switch(StationTypeData[type].color) { + case 0xff0000: { + this.image.setTexture("nail"); + break; + } case 0xffff00: { + this.image.setTexture("wax"); + break; + } case 0x0000ff: { + this.image.setTexture("bath"); + break; + } + } + //this.image.fillColor = StationTypeData[type].color; } if (type === StationType.CashRegister) { diff --git a/src/scenes/GameScene.ts b/src/scenes/GameScene.ts index ef30bf7..98e3b59 100644 --- a/src/scenes/GameScene.ts +++ b/src/scenes/GameScene.ts @@ -53,6 +53,8 @@ export class GameScene extends BaseScene { private invButton: ToggleButton; private iHandler: ItemHandler; public activeItem: ItemButton; + + public tArray: number[]; private shopClicker: Button; private ownerImage: Phaser.GameObjects.Sprite; @@ -202,14 +204,14 @@ export class GameScene extends BaseScene { this, -650, 0, - [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10] + [99, 5, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0] ); this.shopinventory = new ShopInventory( this, -650, 0, - [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10] + [99, 5, 5, 5, 5, 5, 5, 5, 1, 1, 1, 1, 1] ); this.shopinventory.setDepth(2500); @@ -315,7 +317,7 @@ export class GameScene extends BaseScene { this.setState(GameState.Shopping); // this.startDay(); // this.intermission.fadeToGame(); // Comment this out to see cutscenes - + this.tArray = []; this.pauseInvButton(); } @@ -483,6 +485,10 @@ export class GameScene extends BaseScene { this.beginShopTutorial(0); return; } + } else { + if(this.shopinventory.isOpen){ + this.toggleShop(); + } } this.setState(GameState.Day); this.day += 1; @@ -573,9 +579,21 @@ export class GameScene extends BaseScene { this.stations.forEach((s) => { if (s.hasBeenPurchased) { - if (s.stationTier >= 1) this.customerSpawnPool.push(CustomerId.Small); - if (s.stationTier >= 2) this.customerSpawnPool.push(CustomerId.Medium); - if (s.stationTier >= 3) this.customerSpawnPool.push(CustomerId.Large); + if (s.stationTier >= 1) { + this.customerSpawnPool.push(CustomerId.SmallRed); + this.customerSpawnPool.push(CustomerId.SmallAqua); + this.customerSpawnPool.push(CustomerId.SmallGreen); + } + if (s.stationTier >= 2) { + this.customerSpawnPool.push(CustomerId.MediumRed); + this.customerSpawnPool.push(CustomerId.MediumAqua); + this.customerSpawnPool.push(CustomerId.MediumGreen); + } + if (s.stationTier >= 3) { + this.customerSpawnPool.push(CustomerId.LargeRed); + this.customerSpawnPool.push(CustomerId.LargeAqua); + this.customerSpawnPool.push(CustomerId.LargeGreen); + } } }); @@ -673,6 +691,8 @@ export class GameScene extends BaseScene { const customer = new Customer(this, 0, 0, id, this.board.size); this.customers.push(customer); + + // Place in available waiting seat const seat = this.getAvailableWaitingSeat(id); if (seat) { @@ -1334,4 +1354,18 @@ export class GameScene extends BaseScene { this.employees.forEach((e) => e.setDepth(e.y / 50 + 1)); this.customers.forEach((c) => c.setDepth(c.y / 50 + (c.dragged ? 100 : 1))); } + + refreshStationIDArray(){ + this.tArray = []; + this.stations.forEach((st) => { + if(st.stationType == StationType.HornAndNails) { + this.tArray.push(0); + } else if (st.stationType == StationType.ScalePolish) { + this.tArray.push(1); + } else if (st.stationType == StationType.GoldBath) { + this.tArray.push(2); + } + } + ); + } }