Module: GamesAndRpgParadise::Mud::FallDownAction
- Defined in:
- lib/games_and_rpg_paradise/mud/actions/fall_down_action.rb
Overview
RpgParadise::Mud::FallDownAction
Constant Summary
collapse
- FALL_DOWN_ACTION_SLOT =
#
FALL_DOWN_ACTION_SLOT
#
[ AS_MOVE, 0 ]
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.fall_down(array_rooms = nil, target = nil) ⇒ Object
#
RpgParadise::MUD::FallDownAction.fall_down
#
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
# File 'lib/games_and_rpg_paradise/mud/actions/fall_down_action.rb', line 29
def self.fall_down(
array_rooms = nil,
target = nil )
final_destination = array_rooms.last if array_rooms
if array_rooms
target << 'Argh! You suddenly slip on the ground and fall down. '\
'You begin to roll down uncontrollably.'
room << target+' slips on the ground and falls down. HE/SHE(tp) '\
'begins to roll down uncontrollably.'
array_rooms.each { |room, direction|
target << 'Ouch ... you roll down and fall into '+room.description?+'.'
room << target+' rolls into the room from '+direction
unless target.head.wears_platemail?
target.add_wounds 'random(10)+10'
target.add_fatigue 'random(10)+30'
else
target << 'Some bruises are on your face.'
target.add_wounds 'random(50)+50'
target.add_fatigue 'random(20)+50'
end
}
target << 'You finally stop rolling down, landing on your back.'
target.move final_destination
target.glance final_destination
target.restore_action_slots
target.delayed_action(:stand_up, 3+random(3))
end
end
|
Instance Method Details
#fall_down_slots ⇒ Object
62
63
|
# File 'lib/games_and_rpg_paradise/mud/actions/fall_down_action.rb', line 62
def fall_down_slots
end
|
#restore_action_slots ⇒ Object
68
69
70
|
# File 'lib/games_and_rpg_paradise/mud/actions/fall_down_action.rb', line 68
def restore_action_slots
reset_action_slots('fall_down_action_slots')
end
|