Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 696a1cc

Browse files
authored
Add desription data in questData.ts file (#78)
1 parent 91efea5 commit 696a1cc

File tree

3 files changed

+182
-7
lines changed

3 files changed

+182
-7
lines changed

src/app/components/StoryModeModal.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { faArrowRight, faStar, faTimes } from '@fortawesome/free-solid-svg-icons';
22
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
3+
import 'app/styles/StoryModeModal.css';
34
import * as StoryModalPropType from 'app/types/StoryModeModal';
45
import * as React from 'react';
56
import { Button, Modal } from 'react-bootstrap';
@@ -9,9 +10,9 @@ export class StoryModeModal extends React.Component<StoryModalPropType.Props, {}
910
const { description, level, stars, toggleStoryModeModal, startMatch, isCompleted } = this.props;
1011
return (
1112
<Modal.Dialog
13+
className="story-modal"
1214
style={{
13-
marginTop: '10%',
14-
zIndex: 10,
15+
zIndex: 100,
1516
}}
1617
>
1718
<Modal.Header>

src/app/data/questData.ts

+156-5
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,173 @@
1+
const urlToDocs = 'https://delta.nitt.edu/codecharacter-docs/';
2+
13
export const levels = [
24
{
3-
description: '',
5+
description: `
6+
<div>
7+
<p> Still sleepy after drinking 2 cups of black coffee, only to enter your own nightmare - a tool to virtual reality. This is the 2070's where once in a dream, you can choose your own adventurous "nightmares". You have been mentally teleported back in the history of Mayan Civilization! Sadly, now disintegrated due to civil war. Each kingdom is forced to replace their soldiers with bots, that they can control from the safety of their forts. You have volunteered to help your kingdom control its army to claim as many treasures as possible. But first, you must train.
8+
</p>
9+
<h6>
10+
<b>
11+
Challenge:
12+
</b>
13+
</h6>
14+
<p>Move your bots to occupy all the flags.
15+
</p>
16+
<h6>
17+
<b>
18+
Inventory:
19+
</b>
20+
</h6>
21+
<p>Bots are accessed by traversing through the vector/array called ‘state.bots’, To use the first bot:
22+
<p><code> Bot bot = state.bots[0]</code></p>
23+
</p>
24+
<p>To traverse through all:</p>
25+
<p><code> for (auto &bot : state.bots)</code>
26+
<p style="text-align: center"> or </p>
27+
<code>for ( size_t i=0; i < state.bots.size(); i++) </code></p>
28+
<p>Each bot can be move to a particular destination using </p>
29+
<p><code>bot.move(&ltdestination>)</code></p>
30+
<p> Here the destination is flag locations, which can be taken from the vector/array called:</p>
31+
<p> <code>state.flag_offsets</code></p>
32+
<p>For more details, check out <b> <a href=${urlToDocs} target="_blank" rel="noopener noreferrer">Docs</a> </b></p>
33+
</div>
34+
`,
435
level: 1,
536
},
637
{
7-
description: '',
38+
description: `
39+
<div>
40+
<p> Excellent! Completing that task gave you a gush of dopamine release in your brain right!? At this point you try to go back to your real world, but you fail to teleport yourself back. You are wondering why and set to try again- but just then a piercing sonorous siren rings in your kingdom, there has been an attack laid on your kingdom and you immediately are sent on an assignment to help fight against a local rival group. This is your chance to stand out among other trainees and be chosen to battle.
41+
</p>
42+
<h6>
43+
<b>
44+
Challenge:
45+
</b>
46+
</h6>
47+
<p>Transform your bots to towers at the flag locations.
48+
</p>
49+
<h6>
50+
<b>
51+
Inventory:
52+
</b>
53+
</h6>
54+
<p>A bot can be transformed into a tower:</p>
55+
<p><code>bot.transform()</code></p>
56+
<p>To transform a bot at a specific destination:</p>
57+
<p><code>bot.transform(&ltdestination>)</code></p>
58+
<p>Towers are accessed by traversing through the vector/array called:</p>
59+
<p><code>state.towers</code></p>
60+
<p>To use the first tower:</p>
61+
<p><code>Tower tower = state.towers[0]</code></p>
62+
<p>To traverse through all</p>
63+
<p><code>for (auto &tower : state.towers)</code></p>
64+
<p style="text-align: center">or</p>
65+
<p><code>for (size_t i=0; i < state.towers.size(); i++)</code></p>
66+
<p>Like before the destination is flag locations, which can be taken from the vector/array called:</p>
67+
<p><code>state.flag_offsets</code></p>
68+
<p>For more details, check out <b> <a href=${urlToDocs} target="_blank" rel="noopener noreferrer">Docs</a> </b></p>
69+
</div>
70+
`,
871
level: 2,
972
},
1073
{
11-
description: '',
74+
description: `
75+
<div>
76+
<p> Your body is feeling much better and try teleporting back to the real world only to find out that your brain has been hacked. Hacked by a strange VIRUS. This virus attack has taken over your network of neurons and frozen the network in your brain. You have no choice but to find the solution. Meanwhile you noticed that the bot has learned how to move to the correct place, but you cannot win the battle just by that. You must destroy the enemy also, and for that you need to train your bot to blast at the right position.
77+
</p>
78+
<h6>
79+
<b>
80+
Challenge:
81+
</b>
82+
</h6>
83+
<p>Blast your bots at flag locations to claim the flags.
84+
</p>
85+
<h6>
86+
<b>
87+
Inventory:
88+
</b>
89+
</h6>
90+
<p>You can blast a bot at its current location with:</p>
91+
<p><code>bot.blast()</code></p>
92+
<p>To blast a bot at a specific destination:</p>
93+
<p><code>bot.move(&ltdestination>)</code></p>
94+
<p>and when it reaches the position:</p>
95+
<p><code>bot.blast()</code></p>
96+
<p>or directly use:</p>
97+
<p><code>bot.blast(&ltdestination>)</code></p>
98+
<p>Like before the destination is flag locations, which can be taken from the vector/array called:</p>
99+
<p><code>state.flag_offsets</code></p>
100+
<p>For more details, check out <b> <a href=${urlToDocs} target="_blank" rel="noopener noreferrer">Docs</a> </b></p>
101+
</div>
102+
`,
12103
level: 3,
13104
},
14105
{
15-
description: '',
106+
description: `
107+
<div>
108+
<p> After completion you realize that you are slowly regaining consciousness in the real world. Completing each level successfully releases fiery hormones in your body which fires up your neurons which helps regain some part of your consciousness to the real world. In every battle, one saves his best troops for the perfect time, which can turn the result of the battle for them any time. The enemy has increased their power too. You have been granted time to become stronger. To learn and improvise against the wrong doers.
109+
</p>
110+
<h6>
111+
<b>
112+
Challenge:
113+
</b>
114+
</h6>
115+
<p>Transform to towers and blast them.</p>
116+
<h6>
117+
<b>
118+
Inventory:
119+
</b>
120+
</h6>
121+
<p>To transform bot into tower:</p>
122+
<p><code> bot.transform()</code></p>
123+
<p style="text-align: center">or</p>
124+
<p><code>bot.transform(&ltdestination>)</code></p>
125+
<p>To access all towers:</p>
126+
<p><code> for (auto &tower : state.towers)</code></p>
127+
<p style="text-align: center">or</p>
128+
<p><code>for (size_t i=0; i < state.towers.size(); i++)</code></p>
129+
<p>To blast a tower:</p>
130+
<p><code>bot.blast()</code></p>
131+
<p>Like before the destination is flag locations, which can be taken from the vector/array called: </p>
132+
<p><code>state.flag_offsets</code></p>
133+
<p>For more details, check out <b> <a href=${urlToDocs} target="_blank" rel="noopener noreferrer">Docs</a> </b></p>
134+
</div>
135+
`,
16136
level: 4,
17137
},
18138
{
19-
description: '',
139+
description: `
140+
<div>
141+
<p>You have arrived at the final stage. Once done you will be let loose of this mental state of captive. This task is where you must do some unlearning and relearning. Analyse opponents’ tactics and carefully apply the skills that you have learned up until now to finally defeat the brat once and for all!
142+
</p>
143+
<h6>
144+
<b>
145+
Challenge:
146+
</b>
147+
</h6>
148+
<p>Claim all the flags with everything you got!</p>
149+
<h6>
150+
<b>
151+
Inventory:
152+
</b>
153+
</h6>
154+
<p>To move your bot:</p>
155+
<p><code>bot.move(&ltdestination>)</code></p>
156+
<p>To transform bot into tower:</p>
157+
<p><code>bot.transform()</code></p>
158+
<p style="text-align: center">or</p>
159+
<p><code>bot.transform(&ltdestination>)</code></p>
160+
<p>To access all towers:</p>
161+
<p><code>for (auto &tower : state.towers)</code></p>
162+
<p style="text-align: center">or</p>
163+
<p><code>for (size_t i=0; i < state.towers.size(); i++)</code></p>
164+
<p>To blast a tower:</p>
165+
<p><code>bot.blast()</code></p>
166+
<p>Like before the destination is flag locations, which can be taken from the vector/array called:</p>
167+
<p><code>state.flag_offsets</code></p>
168+
<p>For more details, check out <b> <a href=${urlToDocs} target="_blank" rel="noopener noreferrer">Docs</a> </b></p>
169+
</div>
170+
`,
20171
level: 5,
21172
},
22173
];

src/app/styles/StoryModeModal.css

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
.story-modal .modal-dialog {
2+
max-width: 700px;
3+
position: absolute;
4+
top: 50%;
5+
left: 50%;
6+
transform: translate(-50%, -50%);
7+
}
8+
9+
.story-modal .modal-body {
10+
overflow-y: scroll;
11+
max-height: 500px;
12+
}
13+
14+
code {
15+
color: white;
16+
background-color: #444;
17+
padding: 5px 10px;
18+
position: relative;
19+
left: 50%;
20+
transform: translate(-50%);
21+
display: inline-block;
22+
border-radius: 5px;
23+
}

0 commit comments

Comments
 (0)