intranacht 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/bin/intranacht +306 -0
- metadata +45 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 9d1a856d3858c9f27249f5f62fdde2545c7d3ff6
|
4
|
+
data.tar.gz: 46351c9cac6953bd68f0558fd95c6167d61282c4
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 252f559079a3a591e3e7eb2749418d022e8a85804ac5e8f45c06ff135f174f586dc8a61402eddd6dd941ac49de5ef9f02580ba960709f98ed428ea6df6371cb2
|
7
|
+
data.tar.gz: d93922bb38ebc7312d05a51fbf095cddb75fd2d75b6529db44e58566b329ad5a56a7d7addd4a61528c7c6f8ef0827497c554caf9d9c5afb7530368fd2ce6c522
|
data/bin/intranacht
ADDED
@@ -0,0 +1,306 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
#initialize character
|
4
|
+
gender = 3
|
5
|
+
weapon = 0
|
6
|
+
start = 0
|
7
|
+
health = 10
|
8
|
+
money = 1000
|
9
|
+
win = false
|
10
|
+
msc = "\n"
|
11
|
+
|
12
|
+
#define the ending of the game
|
13
|
+
def ending(money, health, win)
|
14
|
+
thanks = "Thanks for playing!"
|
15
|
+
if money <= 0 && win == false
|
16
|
+
puts "\n>You've lost all of your pecuniam and thus can't feed yourself. You lost with #{health} health points. #{thanks}"
|
17
|
+
abort
|
18
|
+
elsif health <= 0 && win == false
|
19
|
+
puts "\n>You've been killed. You passed on with #{money} pecuniam. #{thanks}"
|
20
|
+
abort
|
21
|
+
elsif health == 0 && win == true
|
22
|
+
puts "\n>You win! #{thanks}"
|
23
|
+
abort
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
until start == 1
|
28
|
+
puts ">To begin your adventure, enter begin."
|
29
|
+
start = gets.chomp.downcase
|
30
|
+
if start == "begin"
|
31
|
+
start = 1
|
32
|
+
genderct = 0
|
33
|
+
while genderct == 0
|
34
|
+
puts "#{msc}>Please enter your gender (male or female)."
|
35
|
+
boygirl = gets.chomp.downcase
|
36
|
+
if boygirl == "male"
|
37
|
+
formal = "sir"
|
38
|
+
relation = "boyfriend"
|
39
|
+
title = "hero"
|
40
|
+
prn = "he"
|
41
|
+
genderct = 1
|
42
|
+
elsif boygirl == "female"
|
43
|
+
formal = "madam"
|
44
|
+
relation = "girlfriend"
|
45
|
+
title = "heroine"
|
46
|
+
prn = "she"
|
47
|
+
genderct = 1
|
48
|
+
else
|
49
|
+
genderct = 0
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
|
54
|
+
else
|
55
|
+
start == 0
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
puts "#{msc}>You are a knight in the land called IntraNacht. Normally a peaceful place to live, an unknown evil lurks the country side. Your mission is to defeat this evil an its forces you encounter along the way. To help you along, you begin with 10 health points and 1000 pecuniam (roughly equivalent to 100 dollars). You will also be given you choice of weapon. Please say sword or axe."
|
60
|
+
until weapon != 0
|
61
|
+
sword = gets.chomp.downcase
|
62
|
+
if sword == "sword"
|
63
|
+
weapon = 1
|
64
|
+
puts "#{msc}>Nice! You've selected a sword. Hit enter."
|
65
|
+
elsif sword == "axe"
|
66
|
+
weapon = 2
|
67
|
+
puts "#{msc}>You've selected an axe. Meh. Hit enter I guess..."
|
68
|
+
else
|
69
|
+
weapon = 0
|
70
|
+
puts "#{msc}>Please select a weapon."
|
71
|
+
end
|
72
|
+
end
|
73
|
+
m = gets.chomp
|
74
|
+
|
75
|
+
ob1 = 1 + rand(3)
|
76
|
+
case ob1
|
77
|
+
when 1
|
78
|
+
puts"#{msc}>A monstrous troll blocks your path, would you like to fight or run?"
|
79
|
+
chtr1 = 0
|
80
|
+
until chtr1 == 1
|
81
|
+
tr1 = gets.chomp.downcase
|
82
|
+
if tr1 == "fight"
|
83
|
+
health -= 2
|
84
|
+
chtr1 = 1
|
85
|
+
puts "#{msc}>You defeat the troll but you suffer injuries. Your health is now down to #{health}."
|
86
|
+
elsif tr1 == "run"
|
87
|
+
money -= 500
|
88
|
+
chtr1 = 1
|
89
|
+
puts "#{msc}>You escape but the troll steals pecuniam from your back pocket. You now have #{money} pecuniam."
|
90
|
+
else
|
91
|
+
puts "#{msc}>Would you mind making a descision at some point in the foreseeable future."
|
92
|
+
end
|
93
|
+
end
|
94
|
+
when 2
|
95
|
+
puts"#{msc}>You come across a huge casm and an elderly man guarding the bridge. He asks you what the airspeed velocity of an unlaiden swallow is."
|
96
|
+
om1 = gets.chomp.downcase
|
97
|
+
if om1 == "what do you mean? african or european swallow?"
|
98
|
+
money += 750
|
99
|
+
puts "#{msc}Old man> What? I don't know that."
|
100
|
+
puts "#{msc}>The old man is thrown by some mysterious force into the casm. As he flies, his wallet falls to the ground which contains 750 pecuniam! You now have #{money} pecuniam."
|
101
|
+
else
|
102
|
+
health = 0
|
103
|
+
puts "#{msc}Old man>Incorrect!"
|
104
|
+
ending(money, health, win)
|
105
|
+
end
|
106
|
+
when 3
|
107
|
+
money += 200
|
108
|
+
health -= 1
|
109
|
+
puts "#{msc}>You find a chest under a tree. Upon opening it, you discover 200 pecuniam! You now have #{money} pecuniam. However, you slice you hand whilst opening the chest. Your health is down to #{health}"
|
110
|
+
else
|
111
|
+
puts "FATAL ERROR"
|
112
|
+
end
|
113
|
+
|
114
|
+
puts ">Hit enter."
|
115
|
+
m = gets.chomp
|
116
|
+
inptgenderct = 0
|
117
|
+
puts "#{msc}>While walking along, you encounter your long term love intrest? What is the gender of your partner?"
|
118
|
+
until inptgenderct != 0
|
119
|
+
inptgender = gets.chomp.downcase
|
120
|
+
if inptgender == "male"
|
121
|
+
ptpronoun = "He"
|
122
|
+
ptname = "Jack"
|
123
|
+
ptdo = "his"
|
124
|
+
pttitle = "hero"
|
125
|
+
ptselves = "himself"
|
126
|
+
|
127
|
+
inptgenderct = 1
|
128
|
+
elsif inptgender == "female"
|
129
|
+
ptpronoun = "She"
|
130
|
+
ptname = "Rose"
|
131
|
+
ptdo = "her"
|
132
|
+
pttitle = "heroine"
|
133
|
+
ptselves = "herself"
|
134
|
+
inptgenderct = 1
|
135
|
+
else
|
136
|
+
puts ">Ahem..."
|
137
|
+
end
|
138
|
+
end
|
139
|
+
puts msc
|
140
|
+
puts "#{msc}#{ptname}>Wow! Funny running into you here! Hey, I've heard that there's a castle around here that's said to hold the greatest treasure in IntraNacht. However, it's garded by an ancient evil that's slept for thousands of years."
|
141
|
+
puts "#{msc}>You decide to join them on their quest as you have a hunch that the 'ancient evil' is the enemy you seek. Hit enter."
|
142
|
+
m = gets.chomp
|
143
|
+
|
144
|
+
puts "#{msc}>You and #{ptname} stumble across an elderly sorceress. She offers to heal you in exchange for 300 pecuniam. Do you accept her offer?"
|
145
|
+
offct = 0
|
146
|
+
until offct == 1
|
147
|
+
offer = gets.chomp.downcase
|
148
|
+
if offer == "yes"
|
149
|
+
offct = 1
|
150
|
+
health +=1
|
151
|
+
money -= 300
|
152
|
+
puts "#{msc}Old sorceress>Thank you kind #{formal}."
|
153
|
+
puts ">Hit enter."
|
154
|
+
m = gets.chomp
|
155
|
+
ending(money, health, win)
|
156
|
+
elsif offer == "no"
|
157
|
+
offct = 1
|
158
|
+
puts "#{msc}Old sorceress>Pfft. Whatever."
|
159
|
+
puts ">Who do you think you are being rude to kindly sorceresses? Just hit enter, jerk!"
|
160
|
+
m = gets.chomp
|
161
|
+
else
|
162
|
+
puts ">Yes or no? Stop mubling!"
|
163
|
+
end
|
164
|
+
end
|
165
|
+
|
166
|
+
puts "#{msc}>You and #{ptname} reach the castle and encounter a drawbridge. At the drawbridge is a giant with an obvious drinking problem."
|
167
|
+
puts ">Between episodes of sluring and drooling all over himself, he threatens to kill both of you if you attempt to get into the castle. Would you like to fight or pay him off?"
|
168
|
+
gtct = 0
|
169
|
+
until gtct == 1
|
170
|
+
payorfight = gets.chomp.downcase
|
171
|
+
if payorfight == "pay"
|
172
|
+
gtct = 1
|
173
|
+
money -= 500
|
174
|
+
puts "#{msc}Guard>Oh, in that case I suppose I'll let you pass."
|
175
|
+
puts ">Hit enter."
|
176
|
+
m = gets.chomp
|
177
|
+
ending(money, health, win)
|
178
|
+
elsif payorfight == "fight"
|
179
|
+
gtct = 1
|
180
|
+
health -= 3
|
181
|
+
puts "#{msc}>Ouch! You beat the guard but barely. You are now at #{health} health points. Hit enter."
|
182
|
+
msc = gets.chomp
|
183
|
+
else
|
184
|
+
puts ">Oh my god, why do you do this to me?! Make a descision!"
|
185
|
+
end
|
186
|
+
end
|
187
|
+
|
188
|
+
|
189
|
+
ob2 = 1 + rand(3)
|
190
|
+
case ob2
|
191
|
+
when 1
|
192
|
+
puts"#{msc}>You enter a door in the central hallway. Upon walking into this room, a dragon wakes up who was previously obstruced by the mountains of gold surrounding him."
|
193
|
+
puts ">Would you like to attempt to fight or grab some gold and run?"
|
194
|
+
gld = gets.chomp.downcase
|
195
|
+
gldct = 0
|
196
|
+
until gldct == 1
|
197
|
+
if gld == "fight"
|
198
|
+
puts "#{msc}>Great idea.......................You just lost 5 health points. Hit enter."
|
199
|
+
health -=5
|
200
|
+
gldct = 1
|
201
|
+
ending(money, health, win)
|
202
|
+
m = gets.chomp
|
203
|
+
elsif gld == "run"
|
204
|
+
gldct = 1
|
205
|
+
money += 100
|
206
|
+
puts "#{msc}>Excelent choice! You excape unharmed and gain 100 pecuniam! You know have #{money} pecuniam. Hit enter."
|
207
|
+
m = gets.chomp
|
208
|
+
ending(money, health, win)
|
209
|
+
else
|
210
|
+
puts ">So....You...You gonna make a descision at some point?"
|
211
|
+
end
|
212
|
+
end
|
213
|
+
|
214
|
+
when 2
|
215
|
+
puts "#{msc}>You find an old man with a long beard who appears to be insane. He says he will give you 100 pecuniam in exchange for some health points. Accept or decline his offer."
|
216
|
+
om = gets.chomp.downcase
|
217
|
+
omct = 0
|
218
|
+
until omct == 1
|
219
|
+
if om == "accept"
|
220
|
+
puts "#{msc}Old man>Thanks for the health, kid."
|
221
|
+
puts "#{msc}>You now have #{money} pecuniam and #{health} health points. Hit enter."
|
222
|
+
m = gets.chomp
|
223
|
+
health -= 3
|
224
|
+
money += 100
|
225
|
+
omct = 1
|
226
|
+
ending(money, health, win)
|
227
|
+
elsif om == "decline"
|
228
|
+
omct = 1
|
229
|
+
puts "#{msc}>Rude! This nice man here is obviously mentally impared and you can't even have the heart to give him some heath!?! Hit enter."
|
230
|
+
ending(money, health, win)
|
231
|
+
else
|
232
|
+
puts "#{msc}>.........................................................."
|
233
|
+
end
|
234
|
+
end
|
235
|
+
|
236
|
+
when 3
|
237
|
+
money += 10
|
238
|
+
puts "#{msc}>You find a chest in the hallway containing a small amount of pecuniam. You now have #{money} pecuniam."
|
239
|
+
ending(money, health, win)
|
240
|
+
else
|
241
|
+
puts "FATAL ERROR"
|
242
|
+
end
|
243
|
+
|
244
|
+
|
245
|
+
#ending
|
246
|
+
ed = 1 + rand(3)
|
247
|
+
|
248
|
+
case ed
|
249
|
+
when 1
|
250
|
+
puts"#{msc}>WHAT?! Upon reaching the top of the tower which supposedly houses the mysterious evil, you and #{ptname} find only a room containing a mirror. \e[3mYou\e[0m are the darkness in the land! Hit enter."
|
251
|
+
m = gets.chomp
|
252
|
+
puts "#{msc}>You now play as #{ptname}. What do you want to do with your #{relation} (kill or save)?"
|
253
|
+
ks = gets.chomp.downcase
|
254
|
+
ksct = 0
|
255
|
+
until ksct == 1
|
256
|
+
if ks == "kill"
|
257
|
+
puts "#{msc}>So, you've decided to kill your #{relation}? Harsh. However, this was a smart move because you've just saved all of IntraNacht! Hit enter."
|
258
|
+
m = gets.chomp
|
259
|
+
health = 0
|
260
|
+
win = 1
|
261
|
+
ksct = 1
|
262
|
+
ending(money, health, win)
|
263
|
+
elsif ks == "save"
|
264
|
+
ksct = 1
|
265
|
+
health = 0
|
266
|
+
puts "#{msc}>A noble choice, but the incorrect one. Your #{relation}'s eyes turn black and #{prn} murders you. You've also unleahsed a deamon onto the land. Great going. Hit enter."
|
267
|
+
m = gets.chomp
|
268
|
+
ending(money, health, win)
|
269
|
+
else
|
270
|
+
puts ">I would say something reassuring here, but I can't be bothered. Just choose one or the other already."
|
271
|
+
end
|
272
|
+
end
|
273
|
+
|
274
|
+
when 2
|
275
|
+
puts "#{msc}>Upon reaching the top of the tower which supposedly houses the mysterious evil, #{ptname} reveles #{ptselves} to be the bringer of darkness! Hit enter."
|
276
|
+
m = gets.chomp
|
277
|
+
puts "#{msc}>Would you like to kill #{ptname} or try to reason with them."
|
278
|
+
kr = gets.chomp.downcase
|
279
|
+
krct = 0
|
280
|
+
until krct == 1
|
281
|
+
if kr == "kill"
|
282
|
+
puts "#{msc}>Wow. I mean this relationship probably wasn't going to work out anyway but I didn't expect it to end like this. However, by defeating #{ptdo}, you sort of become the #{title} of IntraNacht. Hit enter."
|
283
|
+
m = gets.chomp
|
284
|
+
health = 0
|
285
|
+
win = true
|
286
|
+
krct = 1
|
287
|
+
ending(money, health, win)
|
288
|
+
elsif kr == "reason"
|
289
|
+
krct = 1
|
290
|
+
health = 0
|
291
|
+
win = true
|
292
|
+
puts "#{msc}>Excelent choice! As your partner, #{ptname} agrees to stop terrorizing the country!"
|
293
|
+
ending(money, health, win)
|
294
|
+
else
|
295
|
+
puts ">I would say something reassuring here, but I can't be bothered. Just choose one or the other already."
|
296
|
+
end
|
297
|
+
end
|
298
|
+
|
299
|
+
when 3
|
300
|
+
health = 0
|
301
|
+
win = false
|
302
|
+
puts "#{msc}>You reach the highest tower in the castle only to find an empty room. #{ptname} remarks in horror that your eyes have turned black. A voice is heard stating that its vessel is now no longer secure. You colapse onto the ground."
|
303
|
+
ending(money, health, win)
|
304
|
+
else
|
305
|
+
puts "FATAL ERROR"
|
306
|
+
end
|
metadata
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: intranacht
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Logan Saunders
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-10-26 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: CLI RPG
|
14
|
+
email: timandmoby@gmail.com
|
15
|
+
executables:
|
16
|
+
- intranacht
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files: []
|
19
|
+
files:
|
20
|
+
- bin/intranacht
|
21
|
+
homepage: https://github.com/gigavinyl/intranacht
|
22
|
+
licenses:
|
23
|
+
- GPL
|
24
|
+
metadata: {}
|
25
|
+
post_install_message:
|
26
|
+
rdoc_options: []
|
27
|
+
require_paths:
|
28
|
+
- lib
|
29
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
35
|
+
requirements:
|
36
|
+
- - ">="
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: '0'
|
39
|
+
requirements: []
|
40
|
+
rubyforge_project:
|
41
|
+
rubygems_version: 2.4.5
|
42
|
+
signing_key:
|
43
|
+
specification_version: 4
|
44
|
+
summary: A text-based role-playing game.
|
45
|
+
test_files: []
|