Class: GamesAndRpgParadise::Mud::Unicorn
- Inherits:
-
Object
- Object
- GamesAndRpgParadise::Mud::Unicorn
- Includes:
- Animal
- Defined in:
- lib/games_and_rpg_paradise/mud/animals/unicorn.rb
Overview
GamesAndRpgParadise::Mud::Unicorn
Constant Summary
Constants included from Living
Constants included from Adverbs
Adverbs::ADVERBS_ABBREVIATED, Adverbs::ARRAY_ADVERBS
Instance Method Summary collapse
-
#admin_debug ⇒ Object
# === admin_debug.
-
#initialize ⇒ Unicorn
constructor
# === initialize ========================================================================= #.
-
#pweight? ⇒ Boolean
# === pweight? ========================================================================= #.
-
#reset ⇒ Object
# === reset ========================================================================= #.
-
#special_features ⇒ Object
# === special_features ========================================================================= #.
Methods included from Animal
#can_talk?, #e, #height?, #is_animal?, #set_description, #weight?
Methods included from Living
#can_breathe?, #can_talk?, #do_die, #do_resurrect, #is_alive?, #is_dead?, #is_poisoned?, #my_race?, #race?, #report_race, #return_default_hp, #return_race, #run, #set_stats_packages, #skills?
Methods included from Talk
#can_speak?, included, #say, #set_how
Methods included from Adverbs
all?, file?, find_adverb_for, keys, n_adverbs?, original_adverbs
Methods included from Hitpoints
#deduct_hp, #hp?, #max_hp?, #modify_health, #sync_hp
Methods included from Gender
#female?, #gender?, #has_gender?, #male?, #neuter?, #set_female, #set_male, #set_neuter, #subjective_case?
Constructor Details
#initialize ⇒ Unicorn
#
initialize
#
24 25 26 27 28 29 |
# File 'lib/games_and_rpg_paradise/mud/animals/unicorn.rb', line 24 def initialize reset set_description( LOADED_MONSTERS['unicorn']['description'] ) end |
Instance Method Details
#admin_debug ⇒ Object
#
admin_debug
Admin uses this.
#
58 59 60 61 62 63 64 |
# File 'lib/games_and_rpg_paradise/mud/animals/unicorn.rb', line 58 def admin_debug e 'Race '+@race.to_s e 'height '+@height.to_s e 'weight '+@weight.to_s e 'Hp '+@hp.to_s e 'Strength '+@strength.to_s end |
#pweight? ⇒ Boolean
#
pweight?
#
69 70 71 |
# File 'lib/games_and_rpg_paradise/mud/animals/unicorn.rb', line 69 def pweight? e "My weight is #{weight?} kg" end |
#reset ⇒ Object
#
reset
#
34 35 36 37 38 39 40 41 42 |
# File 'lib/games_and_rpg_paradise/mud/animals/unicorn.rb', line 34 def reset @race = 'unicorn' @name = GamesAndRpgParadise::Mud::NameGenerator.new('unicorn',1).generate_name_string @strength = 320+rand(80) # 3x the human strength. @height = 170+rand(30) @weight = 50+rand(39)+@height/2+rand(44).to_f @hp = 400+rand(150) @base_attack_chance = 80+rand(21) # end |
#special_features ⇒ Object
#
special_features
#
47 48 49 50 51 |
# File 'lib/games_and_rpg_paradise/mud/animals/unicorn.rb', line 47 def special_features e ' - can see through most illusions.' e ' - can dispel magic if it has his unicorn.' e ' - can cure with its horn. But this requires time.' end |