Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development #110

Open
wants to merge 58 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
e53f004
level one work
Fezz-xiii Dec 30, 2020
cb59f8b
changes and tweaks to stageOne & framework for stageOneTwo
Fezz-xiii Jan 1, 2021
e1d1312
more tweaks to dmg | fixed reference errors
Fezz-xiii Jan 3, 2021
821a78e
changes to enDmg
Fezz-xiii Jan 4, 2021
a01de7b
general update
Fezz-xiii Jan 6, 2021
27a97b5
implemented objects in place of arrays as function arguments
Fezz-xiii Jan 6, 2021
86dcbe2
more changes to implement objects
Fezz-xiii Jan 6, 2021
dab1c0c
refactoring
Fezz-xiii Jan 25, 2021
642a139
minor tweaks and bug fixes, loop is running kinda
Fezz-xiii Jan 25, 2021
4bb85d5
heroStats obj now to host character stats
Fezz-xiii Mar 21, 2021
7ec55dd
constitutionRoll replaces addHealth and minusHealth
Fezz-xiii Mar 21, 2021
e6ca280
savepoint
Fezz-xiii Mar 21, 2021
e8b2f35
dmg() runs as expected
Fezz-xiii Apr 2, 2021
cd29ba1
tweaks to dmg
Fezz-xiii Apr 4, 2021
c215c9a
fix dmg, endmg, dodge, working on constitution roll
Fezz-xiii Apr 5, 2021
d18bdbb
testing
Fezz-xiii Apr 16, 2021
78a47c6
combine hero and ememy stats into a singular workable object
Fezz-xiii Jun 15, 2021
a5e1da3
refactor fight function pt 1
Fezz-xiii Jun 15, 2021
5343019
housekeeping
Fezz-xiii Jun 25, 2021
d1174c1
updated readme.md
Rvndyr Jun 25, 2021
350bc26
Merge pull request #1 from Rvndyr/master
jonnicwolf Jun 25, 2021
30926fe
updated readme with instructions on how to install and run
Rvndyr Jun 25, 2021
57a02a7
fixed the 'project setup' in readme
Rvndyr Jun 25, 2021
2e2d783
Merge pull request #2 from Rvndyr/master
jonnicwolf Jun 25, 2021
a4b9bb5
dmg is now attack
Fezz-xiii Jun 26, 2021
bef96ea
bug fixes on dmg.js
Fezz-xiii Jun 26, 2021
5b82471
enDmg refactor
Fezz-xiii Jun 27, 2021
4e8031c
comment out some lines im working on
Fezz-xiii Jun 27, 2021
0fa2ea1
Merge branch 'master' of github.com:jonnicwolf/FSW-Text-Based-Adventure
Fezz-xiii Jun 27, 2021
ee783ee
dmg.js working as expected
Fezz-xiii Jun 27, 2021
6a88680
enemyDmg.js working as expected
Fezz-xiii Jun 27, 2021
7d76525
change ln18+ options[i] to options[index]
Fezz-xiii Jun 28, 2021
0f9ee51
fight.js attack option runs
Fezz-xiii Jun 28, 2021
49c8ead
display cleanup
Fezz-xiii Jun 28, 2021
3fdbed6
housekeeping
Fezz-xiii Jun 28, 2021
fb598fa
reassign character health value ln28 & ln37 @fight.js
Fezz-xiii Jun 29, 2021
fce910c
dmg div constant 150 -> 50 to curb excessive high damage rolls
Fezz-xiii Jul 3, 2021
8c449a3
testing display algo for dialogue + housekeeping
Fezz-xiii Jul 20, 2021
bd88044
start-dialogue @test.js works
Fezz-xiii Aug 19, 2021
235cd80
pickYes/No fixed
Fezz-xiii Aug 19, 2021
de97ac1
minor bug fixes
Fezz-xiii Aug 19, 2021
4bc61ff
delay quest start until showDialogue runs
Fezz-xiii Aug 19, 2021
337006f
place all dialogues in arrays to organise them
Fezz-xiii Aug 19, 2021
73f048e
work on stageOne dialogue && more
Fezz-xiii Aug 26, 2021
11ac98c
levelOne dialogues cleanup
Fezz-xiii Aug 26, 2021
19599d0
aggregate corefunctions for easier imports
Fezz-xiii Aug 27, 2021
e3c0963
dodge refactored
jonnicwolf Oct 7, 2021
ab76865
start working
jonnicwolf Oct 8, 2021
01e1c6a
ln 16 -> switch statement
jonnicwolf Oct 8, 2021
5628e60
connect nameInput to levelone dialogue
jonnicwolf Oct 10, 2021
0da757c
bug fix: hero was undefined
jonnicwolf Oct 10, 2021
19366ef
start working, timing issues fixed
jonnicwolf Oct 11, 2021
e596a1a
file and readme cleanup
jonnicwolf Dec 8, 2021
23b855a
testing on start
jonnicwolf Dec 8, 2021
fca45bb
package.json updates
jonnicwolf Dec 8, 2021
c13dba8
start module now runs
jonnicwolf Dec 8, 2021
ee0bd43
nameInput moved to corefunctions library
jonnicwolf Dec 8, 2021
ba1e47f
typo levelOne lb 17
jonnicwolf Dec 9, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
place all dialogues in arrays to organise them
  • Loading branch information
Fezz-xiii committed Aug 19, 2021
commit 337006f444cd19b057a4f7bc49a2c761d593af5f
153 changes: 153 additions & 0 deletions Levels/levelOne/levelOne.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
function levelOne() {
const arr = [
"+ Winged Light => Hero! Qeldrin, Eater Of All has taken nest in the great bastion of +",
"+ Heldana VII Crown, Castle Ironbark. Fight your way to Ironbark and +",
"+ slay the beast! +",
"+ By what name shall I address thee? => +\n",
"+--------------------------------------------------------------------------------------+",
"+ <= My name is " + nameInput + " +\n",
"+ The light brightens to a dazzling glare, then vanishes. +",
"+ A small owl like any but somehow none other comes to rest on a nearby branch. +\n",
"+ Qaspiel => I wilt beest thy companion then. I cannot assist thee on thy journey yet +",
"+ I shall keep thee privy to all things proper and true. Qaspiel is mine +",
"+ name, PUKUKUKUKUKUKUKUKUKUKUKUU! => +\n"
]

const rls1 = require("readline-sync");
classPick = ["Sword", "Wand", "Rifle"];
index = rls1.keyInSelect(classPick, "What weapon should I take?");
if (classPick[index] === classPick[0]) {
const arr = [
"+ You grab your sword! +",
"+ Qaspiel => How nice another warrior (>_>), can I drop the mystic accent noweth? => +\n",
"+ You gawk at the insolent bird with annoyance and slight contempt. +",
'+ description says "bE mYsTiCaLlllLLlL qASpiEllLL" as if "Be Not Afraid" isn\'t +',
"+ soooooo overdone. Blame Gabriel. Don't even get me started on that guy. 200% a tool.+"
]
} else if (classPick[index] === classPick[1]) {
const arr = [
"+ You grab your wand! +",
"+--------------------------------------------------------------------------------------+",
"+ You gawk at the insolent bird with annoyance and slight contempt. +\n",
"+ => Awesome, it was annoying to talk like that but the job (~REDACTED~)damn job +",
'+ description says "bE mYsTiCaLlllLLlL qASpiEllLL" as if "Be Not Afraid" isn\'t +',
"+ soooooo overdone. Blame Gabriel. Don't even get me started on that guy. 200% total +",
"+ toolbag. Remember you didn't hear that from me! => +\n"
]
stageOne();
} else if (classPick[index] === classPick[2]) {
const arr = [
"+ You grab your rifle! \n +",
"+ Qaspiel => A mage?? In these parts? I thought only the university could train mages! +",
"+ Watch where you point those Fireballs! => +\n",
"+ You gawk at the insolent bird with annoyance and slight contempt. +\n",
"+ Qaspiel => Awesome, it was annoying to talk like that but the job (~REDACTED~)damn +",
'+ job description says "bE mYsTiCaLlllLLlL qASpiEllLL" as if "Be Not Afraid"+',
"+ isn't soooooo overdone. Blame Gabriel. Don't even get me started on that +",
"+ guy. 200% total toolbag. Remember you didn't hear that from me! => +\n"
]
stageOne();
} else {
quitGame();
}

function stageOne() {
const arr = [
"+--------------------------------------------------------------------------------------+",
"+ " + nameInput + " => Shut up bird brain, lets kick some lizard booty! +",
"+ " + nameInput + " darts down the dirt path of the front garden and through the village to +",
"+ the village center where a gaping pit wide enough to host four wagon abreast at its +",
"+ diameter. " + nameInput + " the hero stops right at its edge and Qaspien perches on your +",
"+ shoulder. +"
]

let help = keyInYN(
"+ Qaspiel => ~Psssssssst pssst pssssssst~ <=+\n"
);
if (help === true) {
const arr = [
"+--------------------------------------------------------------------------------------+",
"+ Qaspiel => If you let me help you down into the tunnel you could gain some wisdown & +",
"+ wisdom is healthy for the body! +",
"+--------------------------------------------------------------------------------------+"
]
let lift = keyInYN(
"+ Do you let Qaspiel assist you down, " +
nameInput +
"? +\n"
);
if (lift === true) {
console.log(
"+ Qaspiel hops on your shoulders and flaps their little wings as you decend. +"
);
constitutionRoll(3, 10, 2);
stageOneTwo();
} else {
console.log(
"+--------------------------------------------------------------------------------------+"
);
console.log(
"+ Qaspiel => Ahh tough luck buddy... +"
);
constitutionRoll(2, 2);
console.log("+ Your health is now " + heroStat[0] + "! + ");
stageOneTwo();
}
} else {
console.log(
"+--------------------------------------------------------------------------------------+"
);
console.log(
"+ Qaspiel => (<_<) (>_>) (;_;) k then... +"
);
console.log("+ You fall down the hole and take some damage +");
console.log(`+ Your health is now ${heroStat[0]}! + `);
stageOneTwo();
}
}

function stageOneTwo() {
console.log(
"+--------------------------------------------------------------------------------------+"
);
console.log(
"+ You find yourself in a dark tunnel. A faint glint pierces the darkness to your left. +"
);
const rls2 = require("readline-sync");
investigate = ["Go left!", "Go right!"];
index = rls2.keyInSelect(investigate, "Left or Right?");

if (investigate[index] === investigate[0]) {
const arr = [
"+--------------------------------------------------------------------------------------+",
"+ You went left! +",
"+ Upon closer inspection, you find that the glint is reflecting off a metal surface as +",
"+ Qaspiel's light dimly illuminates the tunnel. +\n",
`+ ${nameInput} => Aha! A mining cart! Its in great condition! +\n`,
"+ Qaspiel => I don't trust this rust bucket not one bit but hey I can fly so suit +",
"+ yourself! PUKUKUKUKUKUUU! +\n"
]

stageOneThree()
} else if (investigate[index] === investigate[1]) {
const arr =[
"+--------------------------------------------------------------------------------------+",
"+ You went right! +",
"+ As you approach the dripping, the air thickens with malice and the smell of iron +",
"+ permeates the darkness and dread. +",
"+ ????????? => Feed? Feed! CATCH AND FEED!!!!! +\n",
"+ Qaspiel => Watch it kid! Close your eyeballs! +\n",
"+ The angel to takes to wing and air, their small but mighty wings growing brighter with+",
"+ each wingbeat. +",
"+ The sconces of the tunnel wall blaze to life and cast an ugly orange aura on a bloody +",
"+ mouthed Troll and the few remains of a villager that hung from the ceiling. How could +",
"+ one have gotten this far to the surface? No matter, let's RUMBLE!! +"
]
}
}

function stageOneThree() {
console.log("you made it!");
quitGame();
}
}