Module: GamesAndRpgParadise::ShakesAndFidgets
- Includes:
- Colours::E, Esystem, Colours
- Included in:
- Stadtwache
- Defined in:
- lib/games_and_rpg_paradise/games/shakes_and_fidgets/shared/shared.rb,
lib/games_and_rpg_paradise/games/shakes_and_fidgets/game.rb,
lib/games_and_rpg_paradise/games/shakes_and_fidgets/menu/menu.rb,
lib/games_and_rpg_paradise/games/shakes_and_fidgets/arena/arena.rb,
lib/games_and_rpg_paradise/games/shakes_and_fidgets/armour/armour.rb,
lib/games_and_rpg_paradise/games/shakes_and_fidgets/misc/opponents.rb,
lib/games_and_rpg_paradise/games/shakes_and_fidgets/project/project.rb,
lib/games_and_rpg_paradise/games/shakes_and_fidgets/adventure/adventure.rb,
lib/games_and_rpg_paradise/games/shakes_and_fidgets/character/character.rb,
lib/games_and_rpg_paradise/games/shakes_and_fidgets/constants/constants.rb,
lib/games_and_rpg_paradise/games/shakes_and_fidgets/stadtwache/stadtwache.rb,
lib/games_and_rpg_paradise/games/shakes_and_fidgets/user_input/user_input.rb,
lib/games_and_rpg_paradise/games/shakes_and_fidgets/post_office/post_office.rb,
lib/games_and_rpg_paradise/games/shakes_and_fidgets/waffenladen/waffenladen.rb,
lib/games_and_rpg_paradise/games/shakes_and_fidgets/zauberladen/zauberladen.rb,
lib/games_and_rpg_paradise/games/shakes_and_fidgets/hall_of_fame/hall_of_fame.rb,
lib/games_and_rpg_paradise/games/shakes_and_fidgets/module_methods/files_and_directories.rb
Overview
GamesAndRpgParadise::ShakesAndFidgets
Defined Under Namespace
Modules: Shared Classes: Adventure, Arena, Armour, Character, Game, HallofFame, Menu, Opponent, PostOffice, Stadtwache, UserInput, Waffenladen, Zauberladen
Constant Summary collapse
- PROJECT_BASE_DIRECTORY =
#
PROJECT_BASE_DIRECTORY
#
RbConfig::CONFIG['sitelibdir']+'/games_and_rpg_paradise/games/shakes_and_fidgets/'
- BASE_DIR =
PROJECT_BASE_DIRECTORY
- NAMESPACE =
#
NAMESPACE
#
'GamesAndRpgParadise::ShakesAndFidgets'
- PROJECT_BASE_DIR =
#
PROJECT_BASE_DIR
#
RbConfig::CONFIG['sitelibdir']+'/shakes_and_fidgets/'
- ENCODING_ISO =
#
ENCODING_ISO
#
'ISO-8859-1'
- PROJECT_YAML_DIR =
#
PROJECT_YAML_DIR
#
PROJECT_BASE_DIR+'yaml/'
- YAML_DIR =
Just an alias to the above.
PROJECT_YAML_DIR
- ARMOURS =
#
ARMOURS
#
YAML_DIR+'armours.yml'
- SAVED_CHARACTERS =
#
SAVED_CHARACTERS
#
YAML_DIR+'saved_characters/'
- STORE_WHERE =
#
STORE_WHERE
This constant lateron be modified when we want to store something.
#
SAVED_CHARACTERS+'.yml'
- BASE_STATS_FOR_THE_CLASSES =
#
BASE_STATS_FOR_THE_CLASSES
#
YAML_DIR+'base_stats_for_the_classes.yml'
- PADDING_TO_USE =
#
PADDING_TO_USE
#
3
- MAIN_EDITOR =
#
MAIN_EDITOR
#
'bluefish'
- FILE_XP_LEVELS =
#
FILE_XP_LEVELS
#
BASE_DIR+'yaml/xp_levels.yml'
- XP_LEVELS_AS_ARRAY =
#
XP_LEVELS_AS_ARRAY
#
File.readlines(FILE_XP_LEVELS)
- XP_LEVELS =
#
XP_LEVELS
#
YAML.load_file(FILE_XP_LEVELS)
- INVERTED_XP_LEVELS =
#
INVERTED_XP_LEVELS
#
XP_LEVELS.invert
- PROMPT =
#
PROMPT
#
'> '
- N =
#
N
#
"\n"
- R =
#
R
#
"\r"
- AVAILABLE_ATTRIBUTES =
#
AVAILABLE_ATTRIBUTES
#
[ 'Ausdauer', 'Glück','Intelligenz','Stärke','Geschick' ]
- FORMEL_VERTEIDIGUNG =
#
Now let’s get some formulas here.
#
'Stärke / 2'
- SCHADEN =
#
SCHADEN
#
'Waffenschaden * (1 + Geschick / 10)'
- WIDERSTAND =
#
WIDERSTAND
#
'Intelligenz / 2'
- LEBEN =
#
LEBEN
#
'Ausdauer * 4 * (Stufe + 1)'
- KRITISCHE_TREFFER =
#
KRITISCHE_TREFFER
#
'Glück * 5 / (Gegnerstufe * 2)'
- ONE_GOLD =
#
ONE_GOLD
#
'100 Silver Coins.'
Constants included from Colours
Class Method Summary collapse
-
.ensure_that_the_saved_characters_directory_exists ⇒ Object
# === GamesAndRpgParadise::ShakesAndFidgets.ensure_that_the_saved_characters_directory_exists ========================================================================= #.
-
.project_base_dir? ⇒ Boolean
# === GamesAndRpgParadise::ShakesAndFidgets.project_base_dir? ========================================================================= #.
Instance Method Summary collapse
-
#is_an_attribute?(i) ⇒ Boolean
# === is_an_attribute?.
-
#show_directory_content ⇒ Object
# === show_directory_content ========================================================================= #.
Methods included from Colours
#brown, #cfile, #convert_colour, convert_colour, #fancy, #normal, #pink, #red, #yel
Class Method Details
.ensure_that_the_saved_characters_directory_exists ⇒ Object
#
GamesAndRpgParadise::ShakesAndFidgets.ensure_that_the_saved_characters_directory_exists
#
16 17 18 19 20 |
# File 'lib/games_and_rpg_paradise/games/shakes_and_fidgets/module_methods/files_and_directories.rb', line 16 def self.ensure_that_the_saved_characters_directory_exists unless File.exist? SAVED_CHARACTERS FileUtils.mkdir_p(SAVED_CHARACTERS) end end |
.project_base_dir? ⇒ Boolean
#
GamesAndRpgParadise::ShakesAndFidgets.project_base_dir?
#
20 21 22 |
# File 'lib/games_and_rpg_paradise/games/shakes_and_fidgets/project/project.rb', line 20 def self.project_base_dir? PROJECT_BASE_DIRECTORY end |
Instance Method Details
#is_an_attribute?(i) ⇒ Boolean
#
is_an_attribute?
Returns true if the input is an attribute, otherwise it returns false. Remember there are only 5 Attributes in this game.
#
59 60 61 62 63 64 65 |
# File 'lib/games_and_rpg_paradise/games/shakes_and_fidgets/shared/shared.rb', line 59 def is_an_attribute?(i) downcased = AVAILABLE_ATTRIBUTES.map(&:downcase) i = i.to_s.dup i = i.force_encoding('ISO-8859-1') i = i.downcase downcased.include?(i) end |
#show_directory_content ⇒ Object
#
show_directory_content
#
70 71 72 73 74 |
# File 'lib/games_and_rpg_paradise/games/shakes_and_fidgets/shared/shared.rb', line 70 def show_directory_content ddc = DirectoryContent.new(nil, true, false) ddc.run ddc.display end |