From c7a78a13ae406fdc7ac80d9c15dc0e53798d8550 Mon Sep 17 00:00:00 2001 From: Cheuk Yin Ng Date: Sat, 28 Mar 2020 15:46:20 -0700 Subject: [PATCH 1/6] Fix weeks variable and make weeks not pass for followup events --- src/App.tsx | 30 +++++++++++++++++------------- src/choices.json | 16 ++++++++-------- src/components/hud/ProgressBar.tsx | 3 ++- src/game-config.json | 2 +- 4 files changed, 28 insertions(+), 23 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 497a525..da4b29f 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -36,6 +36,7 @@ const emptyMinigame: IMinigame = { }; export default class App extends React.Component { + static readonly maxWeeks: number = 5; private choiceManager: ChoicesManager; private eventManager: EventsManager; private minigameManager: MinigamesManager; @@ -77,16 +78,18 @@ export default class App extends React.Component { if (choice.minigame === "") { this.state.playerStats.applyStatChanges(choice.statChanges, choice.dlogo); - if (this.state.week >= 2 && this.state.playerStats.getGpa() < 1.0) { - // Losing condition - this.state.eventTracker.queueFollowUpEvent( - this.eventManager.get("LoseEvent") - ); - } else if (this.state.week > 5) { - // Winning condition if not losing - this.state.eventTracker.queueFollowUpEvent( - this.eventManager.get("WinEvent") - ); + if (this.state.week > App.maxWeeks) { + if (this.state.playerStats.getGpa() >= 1.0) { + // Winning condition + this.state.eventTracker.queueFollowUpEvent( + this.eventManager.get("WinEvent") + ); + } else { + // Lose condition is everything else + this.state.eventTracker.queueFollowUpEvent( + this.eventManager.get("LoseEvent") + ); + } } else if (choice.followUp !== "") { // The game isn't ending and there is a follow up event this.state.eventTracker.queueFollowUpEvent( @@ -94,11 +97,12 @@ export default class App extends React.Component { ); } - let nextEvent = this.state.eventTracker.getNextEvent(this.state.week + 1); + let weekDelta = (choice.followUp !== "" ? 0 : 1); + let nextEvent = this.state.eventTracker.getNextEvent(weekDelta + this.state.week); this.setState(prevState => { return { - week: prevState.week + 1, + week: prevState.week + weekDelta, playerStats: prevState.playerStats, currentEvent: nextEvent, eventTracker: prevState.eventTracker, @@ -204,4 +208,4 @@ export default class App extends React.Component { ); } -} \ No newline at end of file +} diff --git a/src/choices.json b/src/choices.json index b1acb80..5689a9a 100644 --- a/src/choices.json +++ b/src/choices.json @@ -120,7 +120,7 @@ }, "Arts": { "answer": "Arts", - "followUp": "", + "followUp": "PickResidenceEvent", "statChanges": [50, 2.0, 100], "minigame": "", "dlogo": ["ARTS", "#522E91", "#FFFFFF"], @@ -129,7 +129,7 @@ "Forestry": { "answer":"Forestry", - "followUp":"", + "followUp":"PickResidenceEvent", "statChanges":[100, 2.0, 100], "minigame": "", "dlogo": ["FORE", "#162A00", "#FFFFFF"], @@ -138,7 +138,7 @@ "Commerce": { "answer":"Commerce", - "followUp":"", + "followUp":"PickResidenceEvent", "statChanges":[100, 2.0, 100], "minigame": "", "dlogo": ["COMM", "#8D8D8D", "#FFFFFF"], @@ -147,7 +147,7 @@ "Kinesiology": { "answer":"Kinesiology", - "followUp":"", + "followUp":"PickResidenceEvent", "statChanges":[100, 2.0, 100], "minigame": "", "dlogo": ["KIN", "#228B22", "#FFFFFF"], @@ -156,7 +156,7 @@ "ApScience": { "answer": "Applied Science", - "followUp": "", + "followUp": "PickResidenceEvent", "statChanges": [0, 4.0, 100], "minigame": "", "dlogo": ["APSC", "#B20E22", "#FFFFFF"], @@ -164,7 +164,7 @@ }, "Science": { "answer": "Science", - "followUp": "", + "followUp": "PickResidenceEvent", "statChanges": [50, 3.0, 100], "minigame": "", "dlogo": ["SCIE", "#3498DB", "#FFFFFF"], @@ -172,7 +172,7 @@ }, "LFS": { "answer": "Land and Food Systems", - "followUp": "", + "followUp": "PickResidenceEvent", "statChanges": [100, 2.0, 100], "minigame": "", "dlogo": ["LFS", "#000000", "#FFFFFF"], @@ -199,4 +199,4 @@ "minigame": "", "btnStyle": "orchard" } -} \ No newline at end of file +} diff --git a/src/components/hud/ProgressBar.tsx b/src/components/hud/ProgressBar.tsx index ec2d6b5..f56a583 100644 --- a/src/components/hud/ProgressBar.tsx +++ b/src/components/hud/ProgressBar.tsx @@ -1,9 +1,10 @@ import React from "react"; +import App from "../../App"; interface IProps { week: number; } export default function ProgressBar(props: IProps) { - return ; + return ; } diff --git a/src/game-config.json b/src/game-config.json index e0eb040..d7afe68 100644 --- a/src/game-config.json +++ b/src/game-config.json @@ -4,7 +4,7 @@ "BoomerGregorEvent", "CuteGirlEvent", "FratPartyEvent", "MidtermEvent", "SquirrelEvent" ], "followUp": [ - "LandingEvent", "PickFacultyEvent", "PickResidenceEvent" + "LandingEvent", "PickFacultyEvent" ], "seasonal": [ [], From 7da56dae15b14cfa9ad2c2b5eb231a2b0b4b2fda Mon Sep 17 00:00:00 2001 From: Cheuk Yin Ng Date: Sat, 28 Mar 2020 15:50:39 -0700 Subject: [PATCH 2/6] Fix if we have followups don't end the game yet --- src/App.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.tsx b/src/App.tsx index da4b29f..6eeda1d 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -78,7 +78,7 @@ export default class App extends React.Component { if (choice.minigame === "") { this.state.playerStats.applyStatChanges(choice.statChanges, choice.dlogo); - if (this.state.week > App.maxWeeks) { + if (choice.followUp === "" && this.state.week > App.maxWeeks) { if (this.state.playerStats.getGpa() >= 1.0) { // Winning condition this.state.eventTracker.queueFollowUpEvent( From 3fb91680d1056530619a071c2fed98f8307d913e Mon Sep 17 00:00:00 2001 From: Cheuk Yin Ng Date: Mon, 30 Mar 2020 22:33:12 -0700 Subject: [PATCH 3/6] Add gg butt --- src/App.tsx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/App.tsx b/src/App.tsx index 6eeda1d..15ec42e 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -22,6 +22,7 @@ export interface IProps { } export interface IState { week: number; name: string; + gameOver: boolean; playerStats: PlayerStats; currentEvent: IEvent; eventTracker: EventTracker; @@ -67,6 +68,7 @@ export default class App extends React.Component { this.state = { week: 0, name: "P1", + gameOver: false, playerStats: playerStats, currentEvent: firstEvent, eventTracker: eventTracker, @@ -76,6 +78,7 @@ export default class App extends React.Component { makeChoice = (choice: IChoice) => { if (choice.minigame === "") { + let gameOver = false; this.state.playerStats.applyStatChanges(choice.statChanges, choice.dlogo); if (choice.followUp === "" && this.state.week > App.maxWeeks) { @@ -90,6 +93,7 @@ export default class App extends React.Component { this.eventManager.get("LoseEvent") ); } + gameOver = true; } else if (choice.followUp !== "") { // The game isn't ending and there is a follow up event this.state.eventTracker.queueFollowUpEvent( @@ -103,6 +107,7 @@ export default class App extends React.Component { this.setState(prevState => { return { week: prevState.week + weekDelta, + gameOver: gameOver, playerStats: prevState.playerStats, currentEvent: nextEvent, eventTracker: prevState.eventTracker, @@ -124,6 +129,7 @@ export default class App extends React.Component { this.setState(prevState => { return { week: prevState.week, + gameOver: false, playerStats: prevState.playerStats, currentEvent: minigameEvent, eventTracker: prevState.eventTracker, @@ -139,6 +145,7 @@ export default class App extends React.Component { this.setState(prevState => { return { week: prevState.week + 1, + gameOver: false, playerStats: prevState.playerStats, currentEvent: nextEvent, eventTracker: prevState.eventTracker, @@ -172,6 +179,15 @@ export default class App extends React.Component { transform: "scale(" + scale + ")", }; + const ggButt = this.state.gameOver && ( + + ); + return (
@@ -196,6 +212,8 @@ export default class App extends React.Component {

{currentEvent.prompt}

+ + {ggButt} Date: Fri, 3 Apr 2020 22:49:24 -0700 Subject: [PATCH 4/6] Added the winning/losing pictures --- src/assets/losing.png | Bin 0 -> 18461 bytes src/assets/winning.png | Bin 0 -> 3511 bytes src/events.json | 6 +++--- 3 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 src/assets/losing.png create mode 100644 src/assets/winning.png diff --git a/src/assets/losing.png b/src/assets/losing.png new file mode 100644 index 0000000000000000000000000000000000000000..c1d5955d91a66042242098c200e54fdcaf34aa99 GIT binary patch literal 18461 zcmeHNYgAKb)_wy@wPLZ;3iUFgooYK(zzY&6kZ4;*`%!9ZE66oefk@>l280ljO06BK zVrxr;7^Ag#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Y&fP5wx2V+la*idWW}LS)C>p4q{b-Rdf7 z%O}JnSIJcCqg@HD)47c&2|^diR3@&@eWS16gm?`md-+9ik#KZqpun}a*BagwKr(Fm zb@%Nvw*85RR>N)7MR#2!Dg||-X#Gcft$14V2kTvYiFvR)Rs(bnP2A9LWYTlRv zyT1p?SBpmtpFrt7(G>KR>l2}ZA97)|+5QrkZp;LGG69LgW4`Rv#;Och5f8BKK9fKZ|$5UAb76Zx`A+%S6V|7m`p;X^17Le`Tv#WEsXUhL)cwmvW;0(qPi` zoic;msm~mmdK~Y&IyQDVN3Rs?3!d) z-$s}7CrGvzD zoByJxc$y8>(|E0^DO((EYzwL)v;}nJ;TU8l)PK&id!SjB?><4l*n?z!07RNj-#uhp zAl!Y{cYMC#9P&565hF57CIxm3o7jm@rI4=Gt}}yV?K`y^*VBAT!ej8(6IElKL8aa} zNZ*sH$;Jk}*$g}f>;{cV>OnT7_67N>#bdwH$Dk!<;lA1w)fbgPMNkTvylMs-1ZBw) zxO9$GV}Q*&!G6*-KHEO~`D;zp>bDhw7TEZ}>_*~KW?eU)sX$wTJ5yCw_@z7|0vvxpF=SXk)T~-v;RC z4tnmO=kf8JH5#*EzNS^b1A~kME-028js9kyxsrs8x_thTe`@FT45K|CczyJK(Yv9? F{{>a7OQ!$; literal 0 HcmV?d00001 diff --git a/src/assets/winning.png b/src/assets/winning.png new file mode 100644 index 0000000000000000000000000000000000000000..f98781efd9523164e69d15165c5b43dab17111b9 GIT binary patch literal 3511 zcmai02~-p37M`$$MGclpQ4mpIwNDli1pzYwm5Nj_0zr17fKrJO1T-duO=y++0BuDU zD-l6No@~W{YzYPnl`SHYU|3@1K!~!1kU&Bp4L;Pt_nw_|=FIu$pSjET-}~J!`N(0% zm741`0RUL(bkM;K0AN=aZ*?`rn|Qiao8qAne$YD-0JL-#Zy1pMtDfQ|EYi(!A5hX^ zz*j6(LiW1s1%UE2E!lBZg(YVvhrO5!u(5vh>HHJx;geOr!4X?-h{}RBjP1}+F>l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lK>Tw9snq{Vu}#z#ewpwe*)-CdR;qxBl2^y1$sd=-dg;sm zyhrEG%whv1XuNDjOWrqgL5Lcu7=G&s89USVnMG%#jq;GwT;uLt^TQRC(pCErNoHM; zff8tU)h6;RKMGHd5c+kWXwP|4nDfW}xVgxA308j6vO|)E_n(^|mvVxa7o%g5q%Puibsli_zqV{lZCUE)zORytHtPY2>PVFN3T{>$Go!5dWW_f}h_FL`T^UVJGUm zsi)>{wR&WHV3GD;ibY*ifgn9{jiVz3MO~DHvzGQw1{FNDbP-4Pm-mJa>eIvbTOLBq z&Rn7j9%AjxUE0}skb*LhAhkinmisUB^iHryCg!b>att14Gin}TD3>B4+|dQhY~ikK z3J$(ZBMsBwcX%*%Wo5mOKE)g9`xx3^Jvz6ttU?Ex9$2AHs#|cs0_pk$k&&NMv>!;sbtRVi>AAp zBLz+~-?T$2{0@9yN{)KCDOA!a>dabu*$n7KJVB~SgK_hUP9P8YsaEV;<`nkI9;z}w zDY56Z)UtT7mv8DkG%RYF!ihroe2`C{sK;_$-N+N~CzO%}q`nm*HeRFpQB;i;s+w5x z#sX@jQ#p6>h;g)L&zhL_41Vas!Y)aStA7e69fE z>r#Lgj#bL%Cjbu{eY`#@?NPW=LjqKAeuCKNmoF<6+SVWm(hf4jclwv{OcMS$ptzjA MJ?v1j@7Tq^0OultzW@LL literal 0 HcmV?d00001 diff --git a/src/events.json b/src/events.json index 7beb710..c08f06c 100644 --- a/src/events.json +++ b/src/events.json @@ -144,7 +144,7 @@ }, "WinEvent": { "prompt": "You win! You have survived!", - "imgPath": "", + "imgPath": "winning.png", "choices": [], "hasBottomBoxBorder": true, "hasInnerFill": true, @@ -152,10 +152,10 @@ }, "LoseEvent": { "prompt": "Game over. You lose.", - "imgPath": "", + "imgPath": "losing.png", "choices": [], "hasBottomBoxBorder": true, "hasInnerFill": true, "gamePlayMode": "GameOver" } -} \ No newline at end of file +} From 4b8c68bea8deca828f3b8e670008975a5e58ede0 Mon Sep 17 00:00:00 2001 From: Eloise Peng Date: Sat, 4 Apr 2020 05:08:39 -0700 Subject: [PATCH 5/6] fix enter tag prob --- src/App.tsx | 8 +++--- src/components/choices/ChoiceButton.tsx | 5 ++-- src/components/choices/Choices.tsx | 4 +-- .../gamePlayConsole/GamePlayConsole.tsx | 26 ++++++++++++++++--- 4 files changed, 32 insertions(+), 11 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 497a525..6cae1f6 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -39,13 +39,13 @@ export default class App extends React.Component { private choiceManager: ChoicesManager; private eventManager: EventsManager; private minigameManager: MinigamesManager; - private acceptOfferEvent: string; + private acceptOfferLabel: string; constructor(props: IProps) { super(props); const playerStats = new PlayerStats(); const isMobile = window.matchMedia("only screen and (max-width: 760px)").matches; - this.acceptOfferEvent = "accept-offer"; + this.acceptOfferLabel = "accept-offer"; this.choiceManager = new ChoicesManager(choices); this.eventManager = new EventsManager(events); @@ -182,7 +182,7 @@ export default class App extends React.Component { minigame={this.state.currentMinigame} finishMinigame={this.finishMinigame} handleNameChange={this.handleNameChange} - acceptOfferEvent={this.acceptOfferEvent} + acceptOfferLabel={this.acceptOfferLabel} />
{ choices={currentEvent.choices} mgr={this.choiceManager} makeChoice={this.makeChoice} - acceptOfferEvent={this.acceptOfferEvent} + acceptOfferLabel={this.acceptOfferLabel} />
diff --git a/src/components/choices/ChoiceButton.tsx b/src/components/choices/ChoiceButton.tsx index b48eec4..0a6988e 100644 --- a/src/components/choices/ChoiceButton.tsx +++ b/src/components/choices/ChoiceButton.tsx @@ -4,7 +4,7 @@ import { IChoice } from "./../../events/core"; interface IProps { choice: IChoice; - acceptOfferEvent: string; + acceptOfferLabel: string; makeChoice(choice: IChoice): void; } @@ -12,11 +12,12 @@ export default function ChoiceButton(props: IProps) { return (