Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
arena, and path to it, added; arena_door and arena_master added; will…
… implement actual arena mechanic later
- Loading branch information
1 parent
2541c84
commit ae526e8
Showing
18 changed files
with
150 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# lib/gemwarrior/entities/items/arena_door.rb | ||
# Item::ArenaDoor | ||
|
||
require_relative '../item' | ||
|
||
module Gemwarrior | ||
class ArenaDoor < Item | ||
def initialize | ||
self.name = 'arena_door' | ||
self.description = 'The Arena is massive, with its numerous columns and stone walls stretching to the sky, but its entrance door is no slouch, keeping apace. Made of reinforced granite and impossible to break down, it nevertheless opens for you while battles are in session.' | ||
self.atk_lo = nil | ||
self.atk_hi = nil | ||
self.takeable = false | ||
self.useable = false | ||
self.equippable = false | ||
self.equipped = false | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# lib/gemwarrior/entities/items/arena_master.rb | ||
# Item::ArenaMaster | ||
|
||
require_relative '../item' | ||
|
||
module Gemwarrior | ||
class ArenaMaster < Item | ||
# CONSTANTS | ||
ARENA_FEE = 50 | ||
|
||
def initialize | ||
self.name = 'arena_master' | ||
self.description = 'She wears simple clothing, but carries herself with an air of authority. You think she may be the person to talk with if you want to engage in battle.' | ||
self.atk_lo = nil | ||
self.atk_hi = nil | ||
self.takeable = false | ||
self.useable = true | ||
self.equippable = false | ||
self.equipped = false | ||
end | ||
|
||
def use(player = nil) | ||
puts 'You approach the Arena Master and ask to fight. She snickers to herself, but sees you have a good spirit about you.' | ||
puts | ||
|
||
if player.rox >= 50 | ||
puts "She asks for the requisite payment: #{ARENA_FEE} rox. Do you pay up? (Y/N)" | ||
answer = gets.chomp.downcase | ||
case answer | ||
when 'y', 'yes' | ||
puts 'She pockets the money and motions toward the center of the arena. She reminds you that you will be facing an ever-worsening onslaught of monsters. Each one you dispatch nets you a bonus cache of rox in addition to whatever the monster gives you. You will also become more experienced the longer you last. Finally, you can give up at any time between battles.' | ||
puts | ||
puts 'She finishes by wishing you good luck!' | ||
|
||
return {:type => 'arena', :data => nil} | ||
else | ||
puts 'She gives you a dirty look, as you have obviously wasted her time. You are told not to mess around with her anymore, and she turns away from you.' | ||
puts | ||
return {:type => nil, :data => nil} | ||
end | ||
else | ||
puts 'She can tell you seem particularly poor today and says to come back when that has changed.' | ||
puts | ||
return {:type => nil, :data => nil} | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,5 @@ | |
# Version of Gem Warrior | ||
|
||
module Gemwarrior | ||
VERSION = "0.7.8" | ||
VERSION = "0.7.9" | ||
end |