diff --git a/lib/flavor.js b/lib/flavor.js index 94dd6ba3..63918d8c 100644 --- a/lib/flavor.js +++ b/lib/flavor.js @@ -70,6 +70,7 @@ export const shopIcons = { cute: 'https://cloud-nfmmdwony-hack-club-bot.vercel.app/3003.png', tinfoil: 'https://cloud-nfmmdwony-hack-club-bot.vercel.app/4004.png', holdingEars: 'https://cloud-nfmmdwony-hack-club-bot.vercel.app/4004.png', // todo: draw this + notamused: 'https://cloud-nfmmdwony-hack-club-bot.vercel.app/4004.png', // todo: draw this woah: 'https://cloud-e9zuzn0u0-hack-club-bot.vercel.app/3003.png', thumbs: 'https://cloud-r04a8za6c-hack-club-bot.vercel.app/1001.png', fluster: diff --git a/lib/transcript.yml b/lib/transcript.yml index 51c2e97e..5d5f608b 100644 --- a/lib/transcript.yml +++ b/lib/transcript.yml @@ -107,6 +107,9 @@ greetings: - I have a feeling you're going to like what you see today. - Hey there! You look like you could use some help. - Oh, hello! How can I help you have a GARBAGE day? +lotsOfBells: + - icon:question|you... really like that bell, don't you? + - icon:holdingEars|ok, you can stop clicking that now... tooManyBells: - icon:freaking|Alright! |icon:threat|Enough with the |speed:4.1|BLOODY BELLS!~ - icon:holdingears|S-stop it! I got sensitive hear-holes over here! @@ -116,6 +119,7 @@ tooManyBells: - icon:threat|I didn't get |speed:4|MAROONED|speed:default| on this dog-forsaken island to listen to that! - S-stop taunting me with those infernal bells! - Go annoy some tanuki on another island with those bells! +bellClicker: icon:freaking|speed:3.5|you know what? |speed:4|just take the bell!|bellButton:true|speed:3.5| it's yours! go on! take it! take it and leave me be! pirateyThings: - bilge rat - salty dog diff --git a/src/app/harbor/shop/shopkeeper.js b/src/app/harbor/shop/shopkeeper.js index 7b935e66..b152d139 100644 --- a/src/app/harbor/shop/shopkeeper.js +++ b/src/app/harbor/shop/shopkeeper.js @@ -28,6 +28,7 @@ export const ShopkeeperComponent = ({ balance, cursed }) => { const [interactionBusy, setInteractionBusy] = useState(false) const { on, off } = useEventEmitter() const [buyButton, setBuyButton] = useState() + const [bellButton, setBellButton] = useState(false) useEffect(() => { const handleEvent = (event) => { @@ -57,6 +58,7 @@ export const ShopkeeperComponent = ({ balance, cursed }) => { setInteractionBusy(true) setShopkeeperMsg('') setBuyButton() + setBellButton(false) let speed console.log('handling interaction', interaction) for (const action of interaction.split('|')) { @@ -82,6 +84,12 @@ export const ShopkeeperComponent = ({ balance, cursed }) => { } else { await setBuyButton() } + case 'bellButton': + if (arg[0]) { + await setBellButton(arg[0]) + } else { + await setBellButton() + } case 'pause': if (arg[0]) { await new Promise((resolve) => @@ -116,8 +124,14 @@ export const ShopkeeperComponent = ({ balance, cursed }) => { bellSounds[bellIndex].play() setAtCounter(true) // await new Promise(r => setTimeout(r, 1000)) - if (continuousBellClicks > 5) { + if (continuousBellClicks > 7) { await handleInteraction(transcript('tooManyBells')) + } else if (continuousBellClicks == 7) { + await handleInteraction(transcript('bellClicker')) + } else if (continuousBellClicks > 5) { + await handleInteraction(transcript('tooManyBells')) + } else if (continuousBellClicks > 3) { + await handleInteraction(transcript('lotsOfBells')) } else if (cursed) { const greetingSliced = transcript('greetings') .split(' ') @@ -243,6 +257,7 @@ export const ShopkeeperComponent = ({ balance, cursed }) => {