Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
Binary file not shown.

This file was deleted.

68 changes: 34 additions & 34 deletions .bundle/ruby/3.2.0/gems/bcrypt-3.1.18/ext/mri/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,29 @@ NULLCMD = :
#### Start of system configuration section. ####

srcdir = .
topdir = /home/leeloo/.rbenv/versions/3.2.0/include/ruby-3.2.0
topdir = /usr/include/ruby-3.2.0
hdrdir = $(topdir)
arch_hdrdir = /home/leeloo/.rbenv/versions/3.2.0/include/ruby-3.2.0/x86_64-linux
arch_hdrdir = /usr/include/x86_64-linux-gnu/ruby-3.2.0
PATH_SEPARATOR = :
VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby
prefix = $(DESTDIR)/home/leeloo/.rbenv/versions/3.2.0
rubysitearchprefix = $(rubylibprefix)/$(sitearch)
rubyarchprefix = $(rubylibprefix)/$(arch)
prefix = $(DESTDIR)/usr
rubysitearchprefix = $(sitearchlibdir)/$(RUBY_BASE_NAME)
rubyarchprefix = $(archlibdir)/$(RUBY_BASE_NAME)
rubylibprefix = $(libdir)/$(RUBY_BASE_NAME)
exec_prefix = $(prefix)
vendorarchhdrdir = $(vendorhdrdir)/$(sitearch)
sitearchhdrdir = $(sitehdrdir)/$(sitearch)
rubyarchhdrdir = $(rubyhdrdir)/$(arch)
vendorarchhdrdir = $(sitearchincludedir)/$(RUBY_VERSION_NAME)/vendor_ruby
sitearchhdrdir = $(sitearchincludedir)/$(RUBY_VERSION_NAME)/site_ruby
rubyarchhdrdir = $(archincludedir)/$(RUBY_VERSION_NAME)
vendorhdrdir = $(rubyhdrdir)/vendor_ruby
sitehdrdir = $(rubyhdrdir)/site_ruby
rubyhdrdir = $(includedir)/$(RUBY_VERSION_NAME)
vendorarchdir = $(vendorlibdir)/$(sitearch)
vendorarchdir = $(rubysitearchprefix)/vendor_ruby/$(ruby_version)
vendorlibdir = $(vendordir)/$(ruby_version)
vendordir = $(rubylibprefix)/vendor_ruby
sitearchdir = $(sitelibdir)/$(sitearch)
sitearchdir = $(DESTDIR)/usr/local/lib/x86_64-linux-gnu/site_ruby
sitelibdir = $(sitedir)/$(ruby_version)
sitedir = $(rubylibprefix)/site_ruby
rubyarchdir = $(rubylibdir)/$(arch)
sitedir = $(DESTDIR)/usr/local/lib/site_ruby
rubyarchdir = $(rubyarchprefix)/$(ruby_version)
rubylibdir = $(rubylibprefix)/$(ruby_version)
sitearchincludedir = $(includedir)/$(sitearch)
archincludedir = $(includedir)/$(arch)
Expand All @@ -53,10 +53,10 @@ infodir = $(datarootdir)/info
docdir = $(datarootdir)/doc/$(PACKAGE)
oldincludedir = $(DESTDIR)/usr/include
includedir = $(prefix)/include
runstatedir = $(localstatedir)/run
localstatedir = $(prefix)/var
runstatedir = $(DESTDIR)/var/run
localstatedir = $(DESTDIR)/var
sharedstatedir = $(prefix)/com
sysconfdir = $(prefix)/etc
sysconfdir = $(DESTDIR)/etc
datadir = $(datarootdir)
datarootdir = $(prefix)/share
libexecdir = $(exec_prefix)/libexec
Expand All @@ -66,12 +66,12 @@ archdir = $(rubyarchdir)


CC_WRAPPER =
CC = gcc
CXX = g++
CC = x86_64-linux-gnu-gcc
CXX = x86_64-linux-gnu-g++
LIBRUBY = $(LIBRUBY_SO)
LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
LIBRUBYARG_SHARED = -Wl,-rpath,$(libdir) -L$(libdir) -l$(RUBY_SO_NAME)
LIBRUBYARG_STATIC = -Wl,-rpath,$(libdir) -L$(libdir) -l$(RUBY_SO_NAME)-static $(MAINLIBS)
LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME)
LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static $(MAINLIBS)
empty =
OUTFLAG = -o $(empty)
COUTFLAG = -o $(empty)
Expand All @@ -85,39 +85,39 @@ debugflags = -ggdb3
warnflags = -Wall -Wextra -Wdeprecated-declarations -Wdiv-by-zero -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wwrite-strings -Wold-style-definition -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -Wundef
cppflags =
CCDLFLAGS = -fPIC
CFLAGS = $(CCDLFLAGS) $(cflags) -fPIC $(ARCH_FLAG)
CFLAGS = $(CCDLFLAGS) -g -O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffile-prefix-map=BUILDDIR=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -fdebug-prefix-map=BUILDDIR=/usr/src/ruby3.2-3.2.3-1ubuntu0.24.04.5 -fPIC $(ARCH_FLAG)
INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
DEFS =
CPPFLAGS = -D__SKIP_GNU -I/home/leeloo/.rbenv/versions/3.2.0/include $(DEFS) $(cppflags)
CXXFLAGS = $(CCDLFLAGS) $(ARCH_FLAG)
ldflags = -L. -L/home/leeloo/.rbenv/versions/3.2.0/lib -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed
dldflags = -L/home/leeloo/.rbenv/versions/3.2.0/lib -Wl,--compress-debug-sections=zlib
CPPFLAGS = -D__SKIP_GNU -Wdate-time -D_FORTIFY_SOURCE=3 $(DEFS) $(cppflags)
CXXFLAGS = $(CCDLFLAGS) -g -O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -ffile-prefix-map=BUILDDIR=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -fdebug-prefix-map=BUILDDIR=/usr/src/ruby3.2-3.2.3-1ubuntu0.24.04.5 $(ARCH_FLAG)
ldflags = -L. -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -fstack-protector-strong -rdynamic -Wl,-export-dynamic -Wl,--no-as-needed
dldflags = -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now
ARCH_FLAG =
DLDFLAGS = $(ldflags) $(dldflags) $(ARCH_FLAG)
LDSHARED = $(CC) -shared
LDSHAREDXX = $(CXX) -shared
AR = gcc-ar
AR = x86_64-linux-gnu-gcc-ar
EXEEXT =

RUBY_INSTALL_NAME = $(RUBY_BASE_NAME)
RUBY_SO_NAME = ruby
RUBY_INSTALL_NAME = $(RUBY_BASE_NAME)3.2
RUBY_SO_NAME = ruby-3.2
RUBYW_INSTALL_NAME =
RUBY_VERSION_NAME = $(RUBY_BASE_NAME)-$(ruby_version)
RUBYW_BASE_NAME = rubyw
RUBY_BASE_NAME = ruby

arch = x86_64-linux
arch = x86_64-linux-gnu
sitearch = $(arch)
ruby_version = 3.2.0
ruby = $(bindir)/$(RUBY_BASE_NAME)
ruby = $(bindir)/$(RUBY_BASE_NAME)3.2
RUBY = $(ruby)
BUILTRUBY = $(bindir)/$(RUBY_BASE_NAME)
BUILTRUBY = $(bindir)/$(RUBY_BASE_NAME)3.2
ruby_headers = $(hdrdir)/ruby.h $(hdrdir)/ruby/backward.h $(hdrdir)/ruby/ruby.h $(hdrdir)/ruby/defines.h $(hdrdir)/ruby/missing.h $(hdrdir)/ruby/intern.h $(hdrdir)/ruby/st.h $(hdrdir)/ruby/subst.h $(arch_hdrdir)/ruby/config.h

RM = rm -f
RM_RF = rm -fr
RMDIRS = rmdir --ignore-fail-on-non-empty -p
MAKEDIRS = /usr/bin/mkdir -p
MAKEDIRS = /bin/mkdir -p
INSTALL = /usr/bin/install -c
INSTALL_PROG = $(INSTALL) -m 0755
INSTALL_DATA = $(INSTALL) -m 644
Expand All @@ -127,8 +127,8 @@ TOUCH = exit >
#### End of system configuration section. ####

preload =
libpath = . $(libdir)
LIBPATH = -L. -L$(libdir) -Wl,-rpath,$(libdir)
libpath = . $(archlibdir)
LIBPATH = -L. -L$(archlibdir)
DEFFILE =

CLEANFILES = mkmf.log
Expand All @@ -142,7 +142,7 @@ LOCAL_LIBS =
LIBS = $(LIBRUBYARG_SHARED) -lm -lpthread -lc
ORIG_SRCS = bcrypt_ext.c crypt.c crypt_blowfish.c crypt_gensalt.c wrapper.c
SRCS = $(ORIG_SRCS) bcrypt_ext.c crypt_blowfish.c x86.c crypt_gensalt.c wrapper.c
OBJS = bcrypt_ext.o crypt_blowfish.o x86.o crypt_gensalt.o wrapper.o
OBJS = bcrypt_ext.o crypt_blowfish.o crypt_gensalt.o wrapper.o x86.o
HDRS = $(srcdir)/crypt.h $(srcdir)/crypt_blowfish.h $(srcdir)/crypt_gensalt.h $(srcdir)/ow-crypt.h
LOCAL_HDRS =
TARGET = bcrypt_ext
Expand Down
Binary file modified .bundle/ruby/3.2.0/gems/bcrypt-3.1.18/lib/bcrypt_ext.so
100644 → 100755
Binary file not shown.
4 changes: 2 additions & 2 deletions .bundle/ruby/3.2.0/specifications/bcrypt-3.1.18.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ Gem::Specification.new do |s|
s.homepage = "https://github.com/bcrypt-ruby/bcrypt-ruby".freeze
s.licenses = ["MIT".freeze]
s.rdoc_options = ["--title".freeze, "bcrypt-ruby".freeze, "--line-numbers".freeze, "--inline-source".freeze, "--main".freeze, "README.md".freeze]
s.rubygems_version = "3.4.3".freeze
s.rubygems_version = "3.4.20".freeze
s.summary = "OpenBSD's bcrypt() password hashing algorithm.".freeze

s.installed_by_version = "3.4.3" if s.respond_to? :installed_by_version
s.installed_by_version = "3.4.20" if s.respond_to? :installed_by_version

s.specification_version = 4

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
.DS_Store
*.env
.bundle
saves/
2 changes: 0 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,3 @@ gemspec
gem "rake", "~> 13.0"

gem "rubocop", "~> 1.21"

gem "bcrypt"
151 changes: 148 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,149 @@
# Ruby Kingdom
A simple text based game built in Ruby
# Ruby Kingdom - Enhanced Text Adventure

# [Play it on Replit!](https://replit.com/@CrystalCampbell/Ruby-Text-Game?v=1)
A mystical text-based adventure game built in Ruby, where code and magic intertwine! Explore the Ruby Kingdom, complete quests, battle monsters, and seek the legendary Ruby Castle where the Heart of Ruby awaits.

## ✨ New Features

### 🛡️ Local Save System
- **Unlimited save slots** - Create as many saves as you want
- **Named saves** - Give your saves custom names or use auto-generated ones
- **Complete character persistence** - All progress, items, stats, and location saved
- **Load/Delete management** - Easy save file management from main menu
- **No authentication required** - Removed Firebase dependency for local-only saves

### 📜 Quest System
- **Starter quests** automatically given to new characters
- **Quest tracking** with progress indicators
- **Multiple quest types**: Kill enemies, explore locations, find special areas
- **Rewards** including gold and experience points
- **Quest log** accessible anytime during gameplay

### 🗺️ Enhanced Exploration
- **Rich location descriptions** with Ruby Kingdom lore
- **9 unique biomes**: Ruby Forest, Crystal Lake, Cursed Tarpit, Ancient Ruins, and more
- **Location tracking** for quest progression
- **Visual map** showing your current position
- **Discovery rewards** for visiting new areas

### ⚔️ Improved Combat
- **Enhanced battle feedback** with emojis and better descriptions
- **Quest integration** - battles contribute to quest progress
- **Balanced enemy scaling** based on player level
- **Victory rewards** with gold and experience

### 🏪 Advanced Shop System
- **Ruby Kingdom Blacksmith** with immersive dialogue
- **6 item categories**: Weapons, potions, shields, magic items
- **Magical effects**: Ruby-touched items with special powers
- **Stat upgrades**: Permanent improvements to attack, HP, and more
- **Lore integration**: Shop items tied to Ruby Kingdom mythology

### 🎒 Enhanced Character System
- **Detailed inventory** showing equipped items and stats
- **Character progression** with leveling and stat growth
- **Three classes**: Warrior, Mage, Programmer (each with unique starting equipment)
- **Comprehensive stats tracking**: HP, Attack, Gold, EXP, Level

## 🎮 How to Play

### Starting the Game
1. Run `ruby main.rb`
2. Choose from the main menu:
- **Load Game** - Continue from a saved adventure
- **New Game** - Create a new character
- **Delete Save** - Remove unwanted save files
- **Exit** - Close the game

### Character Creation
1. Choose your character name
2. Select your class:
- **Warrior** - Master of blade and battle
- **Mage** - Wielder of arcane mysteries
- **Programmer** - Hacker of reality's code

### Gameplay Commands
- **Move** - Travel between locations (North, South, East, West)
- **Fight** - Battle enemies for gold and experience
- **Check Inventory** - View items, stats, and equipment
- **Quest Log** - Track active and completed quests
- **Save Game** - Save your progress at any time
- **Shop** - Purchase weapons, potions, and magical items (when available)

### Quest System
- New characters receive starter quests automatically
- Complete quests by killing enemies, exploring locations, or finding special places
- Check your Quest Log regularly to track progress
- Completed quests provide gold and experience rewards

## 🌟 Game Features

### Save System
- Saves stored in `saves/` directory as JSON files
- Automatic backup of all character data
- Unlimited save slots with custom naming
- Easy save management from main menu

### Combat
- Turn-based battle system
- Enemy difficulty scales with player level
- Creative combat input (shout battle cries!)
- Quest progress tracking for victories

### Exploration
- 3x3 grid world with 9 unique locations
- Each location features rich descriptions and unique atmosphere
- Random enemy encounters and special locations
- Castle and shop locations for advanced gameplay

### Character Progression
- Experience points and leveling system
- Gold economy for purchasing upgrades
- Equipment system with weapon upgrades
- Stat improvements through items and leveling

## 🔧 Technical Details

### Dependencies
- Ruby (no external gems required)
- JSON support for save system
- File system access for save storage

### Installation
1. Clone the repository
2. Navigate to the game directory
3. Run `ruby main.rb`

### File Structure
```
lib/
├── auth.rb (legacy - can be removed)
├── character.rb - Character class and stats
├── enemy.rb - Enemy generation and combat
├── game.rb - Main game loop and combat system
├── intro.rb - Game initialization
├── items.rb - Item definitions
├── location.rb - Location generation and descriptions
├── main_menu.rb - Main menu and character creation
├── map.rb - World map and navigation
├── menu.rb - In-game menu system
├── quest_system.rb - Quest management and tracking
├── save_system.rb - Save/load functionality
└── [other support files]
saves/ - Save game files (auto-created)
```

## 🎯 Ruby Kingdom Lore

In the mystical Ruby Kingdom, ancient magic flows through crystalline formations scattered across the land. The legendary Ruby Castle holds the Heart of Ruby - the source of all magical power in the realm. As an adventurer, you must explore diverse biomes, from the Enchanted Ruby Forest to the Cursed Tarpit, seeking the castle while growing stronger through quests and battles.

Each location tells part of the kingdom's story:
- **Ruby Mountain** - Ancient runes tell of brave adventurers
- **Crystal Lake** - Blessed waters that sparkle with ruby energy
- **Ancient Ruins** - Remnants of the first Ruby Mages
- **Forbidden Wasteland** - Cursed lands where dark magic failed

The Ruby Kingdom Blacksmith forges legendary weapons infused with the land's magical power, helping adventurers prepare for the challenges ahead.

---

*Find the Ruby Castle. Claim your destiny. The Heart of Ruby awaits...*
13 changes: 10 additions & 3 deletions lib/character.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def initialize
@next_level_exp = 10
@alive = true
@equipped_weapon = "Sword"
@location = 0
@location = 5 # Start at center of map

end

Expand Down Expand Up @@ -76,7 +76,7 @@ def get_status
def revive
@gold = 0
@alive = true
@hp = @_hp_max
@hp = @hp_max
end

def check_status
Expand Down Expand Up @@ -121,7 +121,7 @@ def get_weapon
end

def set_gold(gold_amt, add_gold)
if add_gold == false && gold_amt > @_gold
if add_gold == false && gold_amt > @gold
@gold = 0
elsif add_gold == true
@gold = @gold + gold_amt
Expand Down Expand Up @@ -182,5 +182,12 @@ def get_atk
end

## Map Location
def get_location
@location
end

def set_location(location)
@location = location
end

end
Loading