diff --git a/public/colourway1.png b/public/colourway1.png new file mode 100644 index 0000000..99bc5a3 Binary files /dev/null and b/public/colourway1.png differ diff --git a/public/colourway2.png b/public/colourway2.png new file mode 100644 index 0000000..a4cd00a Binary files /dev/null and b/public/colourway2.png differ diff --git a/public/colourway3.png b/public/colourway3.png new file mode 100644 index 0000000..89f67ba Binary files /dev/null and b/public/colourway3.png differ diff --git a/public/index.css b/public/index.css index d2808c5..cb31372 100644 --- a/public/index.css +++ b/public/index.css @@ -1,6 +1,13 @@ body { - font-family: "VT323", monospace; - background: #fff; + font-size: 16px; + font-family: 'VT323', monospace; + background-image: url(colourway1.png); + /* background-image: url(colourway2.png); */ + /* background-image: url(colourway3.png); */ +} + +p { + color: #000 !important; } #root { @@ -20,13 +27,14 @@ body { #game-container { height: 667px; width: 350px; - background: white; - padding: 30px; + padding: 15px 30px; + margin: 0; + border: 3px solid #002145; } #player-stat-box { - margin-top: 35px; - height: 85px; + margin-top: 30px; + height: 90px; } #gameplay-container { @@ -66,21 +74,315 @@ body { text-decoration: underline; } +#bottom-menu { + border: 4px solid #e6e6e6; + background-color: #f6f6f6; + padding: 5px; + z-index: 1; + position: relative; +} + +#faculty-badge { + height: 60px; + width: 60px; + border: 1px solid black; + border-radius: 5px; +} + .hide { display: none; } .nes-container { + border: 3px solid black; + background: white; border-width: 2px; + padding: 4px; + background-color: #0B1164; } -.nes-container.is-rounded { - border-image-width: 2; +.nes-container.has-box-shadow { + -webkit-box-shadow: 11px 11px 14px -8px rgba(128, 128, 128, 1); + -moz-box-shadow: 11px 11px 14px -8px rgba(128, 128, 128, 1); + box-shadow: 11px 11px 14px -8px rgba(128, 128, 128, 1); +} + +/* Main */ +:root { + --btn-main-colour: #242CA3; + --btn-shadow-colour: #0B1164; + --btn-hover-colour: #222a99; + + --btn-arts-main-colour: #674d94; + --btn-arts-shadow-colour: #522E91; + --btn-arts-hover-colour: #62419c; + + --btn-apsc-main-colour: #c42135; + --btn-apsc-shadow-colour: #B20E22; + --btn-apsc-hover-colour: #b81f32; + + --btn-comm-main-colour: #a3a3a3; + --btn-comm-shadow-colour: #8D8D8D; + --btn-comm-hover-colour: #9c9c9c; + + --btn-fore-main-colour: #315e00; + --btn-fore-shadow-colour: #162A00; + --btn-fore-hover-colour: #2a4f01; + + --btn-kin-main-colour: #2d912d; + --btn-kin-shadow-colour: #1e7d1e; + --btn-kin-hover-colour: #228B22; + + --btn-lfs-main-colour: #2e2e2e; + --btn-lfs-shadow-colour: #1f1f1f; + --btn-lfs-hover-colour: #242424; + + --btn-scie-main-colour: #3498DB; + --btn-scie-shadow-colour: #2a7eb8; + --btn-scie-hover-colour: #3091d1; + + --btn-vanier-main-colour: #4287F5; + --btn-vanier-shadow-colour: #326bc7; + --btn-vanier-hover-colour: #3f81eb; + + --btn-totem-main-colour: #F26E40; + --btn-totem-shadow-colour: #d95223; + --btn-totem-hover-colour: #eb6536; + + --btn-orchard-main-colour: #FFCC00; + --btn-orchard-shadow-colour: #e0b400; + --btn-orchard-hover-colour: #fac902; } .nes-btn { - margin: 10px; - padding: 3px 4px; + color: #fff; + background-color: var(--btn-main-colour); + padding: 0px 4px; + margin-bottom: 10px; +} + +.nes-btn.arts { + background-color: var(--btn-arts-main-colour); +} + +.nes-btn.apsc { + background-color: var(--btn-apsc-main-colour); +} + +.nes-btn.comm { + background-color: var(--btn-comm-main-colour); +} + +.nes-btn.fore { + background-color: var(--btn-fore-main-colour); +} + +.nes-btn.kin { + background-color: var(--btn-kin-main-colour); +} + +.nes-btn.lfs { + background-color: var(--btn-lfs-main-colour); +} + +.nes-btn.scie { + background-color: var(--btn-scie-main-colour); +} + +.nes-btn.totem { + background-color: var(--btn-totem-main-colour); +} + +.nes-btn.vanier { + background-color: var(--btn-vanier-main-colour); +} + +.nes-btn.orchard { + color: #000; + background-color: var(--btn-orchard-main-colour); +} + +.nes-btn::after { + box-shadow: inset -4px -4px var(--btn-shadow-colour); +} + +.nes-btn.arts::after { + box-shadow: inset -4px -4px var(--btn-arts-shadow-colour); +} + +.nes-btn.apsc::after { + box-shadow: inset -4px -4px var(--btn-apsc-shadow-colour); +} + +.nes-btn.comm::after { + box-shadow: inset -4px -4px var(--btn-comm-shadow-colour); +} + +.nes-btn.fore::after { + box-shadow: inset -4px -4px var(--btn-fore-shadow-colour); +} + +.nes-btn.kin::after { + box-shadow: inset -4px -4px var(--btn-kin-shadow-colour); +} + +.nes-btn.lfs::after { + box-shadow: inset -4px -4px var(--btn-lfs-shadow-colour); +} + +.nes-btn.scie::after { + box-shadow: inset -4px -4px var(--btn-scie-shadow-colour); +} + +.nes-btn.totem::after { + box-shadow: inset -4px -4px var(--btn-totem-shadow-colour); +} + +.nes-btn.vanier::after { + box-shadow: inset -4px -4px var(--btn-vanier-shadow-colour); +} + +.nes-btn.orchard::after { + box-shadow: inset -4px -4px var(--btn-orchard-shadow-colour); +} + +.nes-btn:hover { + color: #fff; + text-decoration: none; + background-color: var(--btn-hover-colour); +} + +.nes-btn.arts:hover { + background-color: var(--btn-arts-hover-colour); +} + +.nes-btn.apsc:hover { + background-color: var(--btn-apsc-hover-colour); +} + +.nes-btn.comm:hover { + background-color: var(--btn-comm-hover-colour); +} + +.nes-btn.fore:hover { + background-color: var(--btn-fore-hover-colour); +} + +.nes-btn.kin:hover { + background-color: var(--btn-kin-hover-colour); +} + +.nes-btn.lfs:hover { + background-color: var(--btn-lfs-hover-colour); +} + +.nes-btn.scie:hover { + background-color: var(--btn-scie-hover-colour); +} + +.nes-btn.totem:hover { + background-color: var(--btn-totem-hover-colour); +} + +.nes-btn.vanier:hover { + background-color: var(--btn-vanier-hover-colour); +} + +.nes-btn.orchard:hover { + color: #000; + background-color: var(--btn-orchard-hover-colour); +} + +.nes-btn:hover::after { + box-shadow: inset -5px -5px var(--btn-shadow-colour); +} + +.nes-btn.arts:hover::after { + box-shadow: inset -5px -5px var(--btn-arts-shadow-colour); +} + +.nes-btn.apsc:hover::after { + box-shadow: inset -5px -5px var(--btn-apsc-shadow-colour); +} + +.nes-btn.comm:hover::after { + box-shadow: inset -5px -5px var(--btn-comm-shadow-colour); +} + +.nes-btn.fore:hover::after { + box-shadow: inset -5px -5px var(--btn-fore-shadow-colour); +} + +.nes-btn.kin:hover::after { + box-shadow: inset -5px -5px var(--btn-kin-shadow-colour); +} + +.nes-btn.lfs:hover::after { + box-shadow: inset -5px -5px var(--btn-lfs-shadow-colour); +} + +.nes-btn.scie:hover::after { + box-shadow: inset -5px -5px var(--btn-scie-shadow-colour); +} + +.nes-btn.totem:hover::after { + box-shadow: inset -5px -5px var(--btn-totem-shadow-colour); +} + +.nes-btn.vanier:hover::after { + box-shadow: inset -5px -5px var(--btn-vanier-shadow-colour); +} + +.nes-btn.orchard:hover::after { + box-shadow: inset -5px -5px var(--btn-orchard-shadow-colour); +} + +.nes-btn:active:not(.is-disabled)::after { + box-shadow: inset 4px 4px var(--btn-shadow-colour); +} + +.nes-btn.arts:active:not(.is-disabled)::after { + box-shadow: inset 4px 4px var(--btn-arts-shadow-colour); +} + +.nes-btn.apsc:active:not(.is-disabled)::after { + box-shadow: inset 4px 4px var(--btn-apsc-shadow-colour); +} + +.nes-btn.comm:active:not(.is-disabled)::after { + box-shadow: inset 4px 4px var(--btn-comm-shadow-colour); +} + +.nes-btn.fore:active:not(.is-disabled)::after { + box-shadow: inset 4px 4px var(--btn-fore-shadow-colour); +} + +.nes-btn.kin:active:not(.is-disabled)::after { + box-shadow: inset 4px 4px var(--btn-kin-shadow-colour); +} + +.nes-btn.lfs:active:not(.is-disabled)::after { + box-shadow: inset 4px 4px var(--btn-lfs-shadow-colour); +} + +.nes-btn.scie:active:not(.is-disabled)::after { + box-shadow: inset 4px 4px var(--btn-scie-shadow-colour); +} + +.nes-btn.totem:active:not(.is-disabled)::after { + box-shadow: inset 4px 4px var(--btn-totem-shadow-colour); +} + +.nes-btn.vanier:active:not(.is-disabled)::after { + box-shadow: inset 4px 4px var(--btn-vanier-shadow-colour); +} + +.nes-btn.orchard:active:not(.is-disabled)::after { + box-shadow: inset 4px 4px var(--btn-orchard-shadow-colour); +} + +.is-ubc-alt-blue { + background-color: #97D4E9; } .row { @@ -128,6 +430,22 @@ body { margin-right: 10px; } +.padding-top-7 { + padding-top: 7px; +} + +.this-margin-bottom-5 { + margin-bottom: 5px; +} + +.acceptance-letter { + height: auto !important; + border: 1px solid black; + background: white; + padding-top: 30px; + padding: 10px; +} + .stat { display: block; height: 20px; @@ -145,20 +463,54 @@ body { width: 100% } -.greenIn{ - animation: greenIn 1s; +.greenIn { + animation: greenIn 0.4s; } -.redIn{ - animation: redIn 1s; +.redIn { + animation: redIn 0.4s; } -@keyframes greenIn{ - 0%{ color: green; font-size: 20px; } - 100%{ color: #000; font-size: 16px; } +@keyframes greenIn { + 0% { + color: #94CB4B; + font-size: 20px; + } + + 20% { + color: #94CB4B; + font-size: 16px; + } + + 85% { + color: #94CB4B; + font-size: 16px; + } + + 100% { + color: #000; + font-size: 16px; + } } -@keyframes redIn{ - 0%{ color: red; font-size: 20px; } - 100%{ color: #000; font-size: 16px; } +@keyframes redIn { + 0% { + color: #ce372b; + font-size: 20px; + } + + 20% { + color: #ce372b; + font-size: 16px; + } + + 85% { + color: #ce372b; + font-size: 16px; + } + + 100% { + color: #000; + font-size: 16px; + } } \ No newline at end of file diff --git a/public/index.html b/public/index.html index 820966b..da582d4 100644 --- a/public/index.html +++ b/public/index.html @@ -1,20 +1,23 @@ - - - - - UBC Simulator 2 - - - + + + + + UBC Simulator 2 - - - - -
- - - + + + + + + + + + +
+ + + + \ No newline at end of file diff --git a/src/App.tsx b/src/App.tsx index 6be7aff..67fcdea 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -117,6 +117,7 @@ export default class App extends React.Component { "imgPath": "", "choices": [], "hasBottomBoxBorder": false, + "hasInnerFill": false, "gamePlayMode": GamePlayMode.Minigame }; @@ -148,9 +149,27 @@ export default class App extends React.Component { render() { let currentEvent: IEvent = this.state.currentEvent; + + // some screen resizing things... + const height = 667; + const width = 350; + let scale = (Math.min( + window.innerHeight / height, + window.innerWidth / width + )); + scale = Math.floor(scale) >= 1 ? Math.floor(scale) : 1; + + let topMargin = (window.innerHeight - 667) / 2; + topMargin = topMargin > 0 ? topMargin : 0; + + var style = { + marginTop: topMargin + "px", + transform: "scale(" + scale + ")", + }; + return ( -
-
+
+
{ />
-
+

{currentEvent.prompt}

@@ -178,7 +197,7 @@ export default class App extends React.Component {
-
+
); } } \ No newline at end of file diff --git a/src/choices.json b/src/choices.json index 69f057d..e5d1e5f 100644 --- a/src/choices.json +++ b/src/choices.json @@ -1,195 +1,198 @@ { - "TrustNaturalRecursion": - { - "answer":"Trust the natural recursion", - "followUp":"", - "statChanges":[10, 0.5, -15], - "minigame": "" - }, - "OkBoomer": - { - "answer":"Ok, Boomer", - "followUp":"", - "statChanges":[60, -0.02, -8], - "minigame": "" - }, - "FiveverAlone": - { - "answer":"5ever alone", - "followUp":"", - "statChanges":[-50, -1.5, -15], - "minigame": "" - }, - "RunAway": - { - "answer":"meep merp. run away", - "followUp":"", - "statChanges":[-25, 0, -15], - "minigame": "" - }, - "ShowFilas": - { - "answer":"Show her your Filas", - "followUp":"", - "statChanges":[35, 0.5, 0], - "minigame": "" - }, - "BuyTheTix": - { - "answer":"Buy her EDC (Electronic Daisy Carnival) tickets", - "followUp":"CuteGirlTixEvent", - "statChanges":[5, -0.01, 0], - "minigame": "" - }, - "ComplimentFilas": - { - "answer":"Compliment her Filas", - "followUp":"CuteFilasEvent", - "statChanges":[1, 0, 0], - "minigame": "" - }, - "StalkInstagram": - { - "answer":"Stalk her on Instagram", - "followUp":"", - "statChanges":[-50, -1.5, -35], - "minigame": "" - }, - "OhYes": - { - "answer":"OH YES", - "followUp":"HasBoyfriendEvent", - "statChanges":[20, -0.02, -3], - "minigame": "" - }, - "Nope": - { - "answer":"no...", - "followUp":"NoVIPTixEvent", - "statChanges":[-5, 0, 0], - "minigame": "" - }, - "GrossFrats": - { - "answer":"Ew! Frats are gross!", - "followUp":"", - "statChanges":[-20, 0.5, 5], - "minigame": "" - }, - "YayBedsheets": - { - "answer":"I love wearing my bedsheets!", - "followUp":"", - "statChanges":[40, -1.0, -50], - "minigame": "" - }, - "GiveUpMidterm": - { - "answer":"*walks out*", - "followUp":"", - "statChanges":[0, -1.0, 0], - "minigame": "" - }, - "LoremIpsum": - { - "answer":"Stop thinking start writing", - "followUp":"", - "statChanges":[0, 2, 0], - "minigame": "EssayWrite" - }, - "UseWheels": - { - "answer":"*Puts on helmet*", - "followUp":"", - "statChanges":[10, 0.5, 0], - "minigame": "SquirrelJump" - }, - "SquirrelPictures": - { - "answer":"I gotta get pictures!", - "followUp":"", - "statChanges":[20, -0.5, 0], - "minigame": "" - }, - "Start": - { - "answer":"Accept Offer", - "followUp":"", - "statChanges":[0, 0, 0], - "minigame": "" - }, - "Arts": - { - "answer":"Arts", - "followUp":"", - "statChanges":[50, 2.0, 100], - "minigame": "", - "dlogo": "ARTS.png" - }, - "ApScience": - { - "answer":"Applied Science", - "followUp":"", - "statChanges":[0, 4.0, 100], - "minigame": "", - "dlogo": "APSC.png" - }, - "Science": - { - "answer":"Science", - "followUp":"", - "statChanges":[50, 3.0, 100], - "minigame": "", - "dlogo": "SCIE.png" - }, - "Forestry": - { - "answer":"Forestry", - "followUp":"", - "statChanges":[100, 2.0, 100], - "minigame": "", - "dlogo": "FORE.png" - }, - "Commerce": - { - "answer":"Commerce", - "followUp":"", - "statChanges":[100, 2.0, 100], - "minigame": "", - "dlogo": "COMM.png" - }, - "Kinesiology": - { - "answer":"Kinesiology", - "followUp":"", - "statChanges":[100, 2.0, 100], - "minigame": "", - "dlogo": "KIN.png" - }, - "LFS": - { - "answer":"Land and Food Systems", - "followUp":"", - "statChanges":[100, 2.0, 100], - "minigame": "", - "dlogo": "LFS.png" + "TrustNaturalRecursion": { + "answer": "Trust the natural recursion", + "followUp": "", + "statChanges": [10, 0.5, -15], + "minigame": "", + "btnStyle": "" + }, + "OkBoomer": { + "answer": "Ok, Boomer", + "followUp": "", + "statChanges": [60, -0.02, -8], + "minigame": "", + "btnStyle": "" + }, + "FiveverAlone": { + "answer": "5ever alone", + "followUp": "", + "statChanges": [-50, -1.5, -15], + "minigame": "", + "btnStyle": "" + }, + "RunAway": { + "answer": "meep merp. run away", + "followUp": "", + "statChanges": [-25, 0, -15], + "minigame": "", + "btnStyle": "" + }, + "ShowFilas": { + "answer": "Show her your Filas", + "followUp": "", + "statChanges": [35, 0.5, 0], + "minigame": "", + "btnStyle": "" + }, + "BuyTheTix": { + "answer": "Buy her EDC (Electronic Daisy Carnival) tickets", + "followUp": "CuteGirlTixEvent", + "statChanges": [5, -0.01, 0], + "minigame": "", + "btnStyle": "" + }, + "ComplimentFilas": { + "answer": "Compliment her Filas", + "followUp": "CuteFilasEvent", + "statChanges": [1, 0, 0], + "minigame": "", + "btnStyle": "" + }, + "StalkInstagram": { + "answer": "Stalk her on Instagram", + "followUp": "", + "statChanges": [-50, -1.5, -35], + "minigame": "", + "btnStyle": "" + }, + "OhYes": { + "answer": "OH YES", + "followUp": "HasBoyfriendEvent", + "statChanges": [20, -0.02, -3], + "minigame": "", + "btnStyle": "" + }, + "Nope": { + "answer": "no...", + "followUp": "NoVIPTixEvent", + "statChanges": [-5, 0, 0], + "minigame": "", + "btnStyle": "" + }, + "GrossFrats": { + "answer": "Ew! Frats are gross!", + "followUp": "", + "statChanges": [-20, 0.5, 5], + "minigame": "", + "btnStyle": "" + }, + "YayBedsheets": { + "answer": "I love wearing my bedsheets!", + "followUp": "", + "statChanges": [40, -1.0, -50], + "minigame": "", + "btnStyle": "" + }, + "GiveUpMidterm": { + "answer": "*walks out*", + "followUp": "", + "statChanges": [0, -1.0, 0], + "minigame": "", + "btnStyle": "" + }, + "LoremIpsum": { + "answer": "Stop thinking start writing", + "followUp": "", + "statChanges": [0, 2, 0], + "minigame": "EssayWrite", + "btnStyle": "" + }, + "UseWheels": { + "answer": "*Puts on helmet*", + "followUp": "", + "statChanges": [10, 0.5, 0], + "minigame": "SquirrelJump", + "btnStyle": "" + }, + "SquirrelPictures": { + "answer": "I gotta get pictures!", + "followUp": "", + "statChanges": [20, -0.5, 0], + "minigame": "", + "btnStyle": "" + }, + "Start": { + "answer": "Accept Offer", + "followUp": "", + "statChanges": [0, 0, 0], + "minigame": "", + "btnStyle": "" + }, + "Arts": { + "answer": "Arts", + "followUp": "", + "statChanges": [50, 2.0, 100], + "minigame": "", + "dlogo": "ARTS.png", + "btnStyle": "arts" + }, + "ApScience": { + "answer": "Applied Science", + "followUp": "", + "statChanges": [0, 4.0, 100], + "minigame": "", + "dlogo": "APSC.png", + "btnStyle": "apsc" + }, + "Science": { + "answer": "Science", + "followUp": "", + "statChanges": [50, 3.0, 100], + "minigame": "", + "dlogo": "SCIE.png", + "btnStyle": "scie" + }, + "Forestry": { + "answer": "Forestry", + "followUp": "", + "statChanges": [100, 2.0, 100], + "minigame": "", + "dlogo": "FORE.png", + "btnStyle": "fore" + }, + "Commerce": { + "answer": "Commerce", + "followUp": "", + "statChanges": [100, 2.0, 100], + "minigame": "", + "dlogo": "COMM.png", + "btnStyle": "comm" + }, + "Kinesiology": { + "answer": "Kinesiology", + "followUp": "", + "statChanges": [100, 2.0, 100], + "minigame": "", + "dlogo": "KIN.png", + "btnStyle": "kin" + }, + "LFS": { + "answer": "Land and Food Systems", + "followUp": "", + "statChanges": [100, 2.0, 100], + "minigame": "", + "dlogo": "LFS.png", + "btnStyle": "lfs" }, "TotemPark": { "answer": "Totem Park", "followUp": "", "statChanges": [0, 0, 0], - "minigame": "" + "minigame": "", + "btnStyle": "totem" }, "PlaceVanier": { "answer": "Place Vanier", "followUp": "", "statChanges": [0, 0, 0], - "minigame": "" + "minigame": "", + "btnStyle": "vanier" }, "OrchardCommons": { "answer": "Orchard Commons", "followUp": "", "statChanges": [0, 0, 0], - "minigame": "" + "minigame": "", + "btnStyle": "orchard" } } \ No newline at end of file diff --git a/src/components/choices/ChoiceButton.tsx b/src/components/choices/ChoiceButton.tsx index 4d5b27c..fb939a5 100644 --- a/src/components/choices/ChoiceButton.tsx +++ b/src/components/choices/ChoiceButton.tsx @@ -10,10 +10,11 @@ interface IProps { export default function ChoiceButton(props: IProps) { return ( ); -} +} \ No newline at end of file diff --git a/src/components/gamePlayConsole/GamePlayConsole.tsx b/src/components/gamePlayConsole/GamePlayConsole.tsx index f116cb4..f2cdb2b 100644 --- a/src/components/gamePlayConsole/GamePlayConsole.tsx +++ b/src/components/gamePlayConsole/GamePlayConsole.tsx @@ -15,11 +15,12 @@ const generateAcceptanceLetter = () => { return (
-

Dear, Enter Name -

-

Congratulations!
Please accept this offer of admission to UBC.

+

Dear, Enter Name

+

Congratulations!
+ Please accept this offer of admission to UBC.


+

Survive the school year by balancing your social life, grades, and sleep!

); }; @@ -53,7 +54,7 @@ const generateMiniGame = (minigame: IMinigame, finishMinigame: Function) => { return (
@@ -61,16 +62,13 @@ const generateMiniGame = (minigame: IMinigame, finishMinigame: Function) => { }; const generateConsole = (props: IProps) => { - if (props.mode === GamePlayMode.AcceptanceLetter) - { + if (props.mode === GamePlayMode.AcceptanceLetter) { return generateAcceptanceLetter(); } - else if (props.mode === GamePlayMode.Minigame) - { + else if (props.mode === GamePlayMode.Minigame) { return generateMiniGame(props.minigame, props.finishMinigame); } - else - { + else { return generateComic(props.imgPath); } }; diff --git a/src/components/hud/Hud.tsx b/src/components/hud/Hud.tsx index 36a15ae..ba8cef7 100644 --- a/src/components/hud/Hud.tsx +++ b/src/components/hud/Hud.tsx @@ -1,40 +1,38 @@ -import React from "react"; - -import Scores from "./scores/Scores"; -import NameIndicator from "./NameIndicator"; -import TimeIndicator from "./TimeIndicator"; -import ProgressBar from "./ProgressBar"; -import PlayerStats from "./../../trackers/PlayerStats"; - -interface IProps { - playerStats: PlayerStats; - week: number; - name: string; -} - -export default function Hud(props: IProps) { - - return ( -
-
- - -
-
- - - Blank Faculty Logo - - - - - - - {/* TODO: need to discuss how process should be defined */} - {/* and make the progress bar meaningful. */} - - -
-
- ); +import React from "react"; + +import Scores from "./scores/Scores"; +import NameIndicator from "./NameIndicator"; +import TimeIndicator from "./TimeIndicator"; +import ProgressBar from "./ProgressBar"; +import PlayerStats from "./../../trackers/PlayerStats"; + +interface IProps { + playerStats: PlayerStats; + week: number; + name: string; +} + +export default function Hud(props: IProps) { + + return ( +
+
+ + +
+
+ + + Blank Faculty Logo + + + + + + + + +
+
+ ); } \ No newline at end of file diff --git a/src/components/hud/NameIndicator.tsx b/src/components/hud/NameIndicator.tsx index 3df8707..a3d5e87 100644 --- a/src/components/hud/NameIndicator.tsx +++ b/src/components/hud/NameIndicator.tsx @@ -5,5 +5,5 @@ interface IProps { } export default function NameIndicator(props: IProps) { - return Name: {props.name}; + return Name: {props.name}; } diff --git a/src/components/hud/TimeIndicator.tsx b/src/components/hud/TimeIndicator.tsx index d5a1991..ed62eea 100644 --- a/src/components/hud/TimeIndicator.tsx +++ b/src/components/hud/TimeIndicator.tsx @@ -5,5 +5,5 @@ interface IProps { } export default function TimeIndicator(props: IProps) { - return Week: {props.week}; + return Week: {props.week}; } \ No newline at end of file diff --git a/src/events.json b/src/events.json index 66f102e..7beb710 100644 --- a/src/events.json +++ b/src/events.json @@ -1,113 +1,112 @@ { - "BoomerGregorEvent": - { + "BoomerGregorEvent": { "prompt": "Dr. Gregor tells the class to start studying for CPSC 110 early!", "imgPath": "Gregor.png", "choices": [ "TrustNaturalRecursion", "OkBoomer" ], - "hasBottomBoxBorder" : false, + "hasBottomBoxBorder": true, + "hasInnerFill": true, "gamePlayMode": "Comics" }, - "CuteGirlEvent": - { + "CuteGirlEvent": { "prompt": "You see a cute girl in the Life Building, what do you do?", "imgPath": "abg_normal.png", "choices": [ "BuyTheTix", "ComplimentFilas" ], - "hasBottomBoxBorder" : false, + "hasBottomBoxBorder": true, + "hasInnerFill": true, "gamePlayMode": "Comics" }, - "CuteFilasEvent": - { + "CuteFilasEvent": { "prompt": "She takes out her AirPods.\n\"What did you say?\"", "imgPath": "abg_no_airpods.png", "choices": [ "RunAway", "ShowFilas" ], - "hasBottomBoxBorder" : false, + "hasBottomBoxBorder": true, + "hasInnerFill": true, "gamePlayMode": "Comics" }, - "CuteGirlTixEvent": - { + "CuteGirlTixEvent": { "prompt": "The cute girl from the Life Building asked if you got the VIP tickets for EDC. Did you?", "imgPath": "abg_sad.png", "choices": [ "OhYes", "Nope" ], - "hasBottomBoxBorder" : false, + "hasBottomBoxBorder": true, + "hasInnerFill": true, "gamePlayMode": "Comics" }, - "NoVIPTixEvent": - { + "NoVIPTixEvent": { "prompt": "The cute girl from the Life Building doesn't like you anymore because you're poor ):", "imgPath": "abg_sad.png", "choices": [ "StalkInstagram" ], - "hasBottomBoxBorder" : false, + "hasBottomBoxBorder": true, + "hasInnerFill": true, "gamePlayMode": "Comics" }, - "HasBoyfriendEvent": - { + "HasBoyfriendEvent": { "prompt": "The cute girl from the Life Building just posted a photo of her and her boyfriend at EDC.", "imgPath": "abg_boyfriend.png", "choices": [ "FiveverAlone" ], - "hasBottomBoxBorder" : false, + "hasBottomBoxBorder": true, + "hasInnerFill": true, "gamePlayMode": "Comics" }, - "FratPartyEvent": - { - "prompt": "You have been asked to go to a toga party! Are you going to go?", + "FratPartyEvent": { + "prompt": "You are invited to a toga party! Are you going to go?", "imgPath": "", "choices": [ "GrossFrats", "YayBedsheets" ], - "hasBottomBoxBorder" : false, + "hasBottomBoxBorder": true, + "hasInnerFill": true, "gamePlayMode": "Comics" - }, - "SquirrelEvent": - { - "prompt": "You have a lecture across campus but there are squirrels in the way!", - "imgPath": "", - "choices": [ - "UseWheels", - "SquirrelPictures" - ], - "hasBottomBoxBorder": false, - "gamePlayMode": "Comics" - }, - "MidtermEvent": - { - "prompt": "This midterm has an essay component ;_;", - "imgPath": "", - "choices": [ - "GiveUpMidterm", - "LoremIpsum" - ], - "hasBottomBoxBorder": false, - "gamePlayMode": "Comics" - }, - "LandingEvent": - { + }, + "SquirrelEvent": { + "prompt": "You have a lecture across campus but there are squirrels in the way!", + "imgPath": "", + "choices": [ + "UseWheels", + "SquirrelPictures" + ], + "hasBottomBoxBorder": true, + "hasInnerFill": true, + "gamePlayMode": "Comics" + }, + "MidtermEvent": { + "prompt": "This midterm has an essay component ;_;", + "imgPath": "", + "choices": [ + "GiveUpMidterm", + "LoremIpsum" + ], + "hasBottomBoxBorder": true, + "hasInnerFill": true, + "gamePlayMode": "Comics" + }, + "LandingEvent": { "prompt": "This is going to be the best 4 years of my life!", "imgPath": "", "choices": [ "Start" ], - "hasBottomBoxBorder" : true, + "hasBottomBoxBorder": true, + "hasInnerFill": true, "gamePlayMode": "AcceptanceLetter" }, - "PickFacultyEvent": - { + "PickFacultyEvent": { "prompt": "Choose your faculty!", "imgPath": "", "choices": [ @@ -119,15 +118,16 @@ "LFS", "Science" ], - "hasBottomBoxBorder" : false, + "hasBottomBoxBorder": false, + "hasInnerFill": false, "gamePlayMode": "Hide" }, - "NoMoreEventsEvent": - { + "NoMoreEventsEvent": { "prompt": "Oops! No more events!", "imgPath": "", "choices": [], - "hasBottomBoxBorder" : true, + "hasBottomBoxBorder": true, + "hasInnerFill": true, "gamePlayMode": "Hide" }, "PickResidenceEvent": { @@ -139,20 +139,23 @@ "OrchardCommons" ], "hasBottomBoxBorder": false, + "hasInnerFill": false, "gamePlayMode": "Hide" }, "WinEvent": { "prompt": "You win! You have survived!", "imgPath": "", "choices": [], - "hasBottomBoxBorder": false, + "hasBottomBoxBorder": true, + "hasInnerFill": true, "gamePlayMode": "GameOver" }, "LoseEvent": { "prompt": "Game over. You lose.", "imgPath": "", "choices": [], - "hasBottomBoxBorder": false, + "hasBottomBoxBorder": true, + "hasInnerFill": true, "gamePlayMode": "GameOver" } -} +} \ No newline at end of file diff --git a/src/events/core.ts b/src/events/core.ts index 8d2b13d..0bdd41a 100644 --- a/src/events/core.ts +++ b/src/events/core.ts @@ -11,6 +11,7 @@ export interface IEvent { choices: string[]; gamePlayMode: string; hasBottomBoxBorder: boolean; + hasInnerFill: boolean; } export interface IChoice { @@ -19,6 +20,7 @@ export interface IChoice { statChanges: number[]; dlogo?: string; minigame: string; + btnStyle: string; } export interface IMinigame { diff --git a/src/trackers/EventTracker.ts b/src/trackers/EventTracker.ts index 29acd38..a93709e 100644 --- a/src/trackers/EventTracker.ts +++ b/src/trackers/EventTracker.ts @@ -16,12 +16,12 @@ export default class EventTracker { public removeMobiles(cm: ChoicesManager) { this.pool = this.pool.filter(evt => - evt.choices.map(cm.get.bind(cm)) - .every(c => c.minigame === "")); + evt.choices.map(cm.get.bind(cm)) + .every(c => c.minigame === "")); for (let i = 0; i < this.seasonal.length; ++i) { this.seasonal[i] = this.seasonal[i].filter(evt => - evt.choices.map(cm.get.bind(cm)) - .every(c => c.minigame === "")); + evt.choices.map(cm.get.bind(cm)) + .every(c => c.minigame === "")); } } @@ -35,7 +35,7 @@ export default class EventTracker { // 0 to 11 const month = (Math.floor(week / 4) + 8) % 12; if (this.pool.length > 0 && - (r > this.SEASONAL_CHANCE || this.seasonal[month].length === 0)) { + (r > this.SEASONAL_CHANCE || this.seasonal[month].length === 0)) { // If we roll a normal pool or if there are no seasonal events then // use the normal pool (given that there are still things in the // normal pool) @@ -55,6 +55,7 @@ export default class EventTracker { "imgPath": "", "choices": [], "hasBottomBoxBorder": true, + "hasInnerFill": true, "gamePlayMode": GamePlayMode.Hide }; }