Class: Fools::DM::Mod

Inherits:
CARPS::DM::Mod
  • Object
show all
Includes:
Mod
Defined in:
lib/fools/dm/mod.rb

Overview

An implementation of the Mod class for DMing The Fools

Instance Method Summary collapse

Constructor Details

#initialize(resource) ⇒ Mod

Create the controller



29
30
31
32
# File 'lib/fools/dm/mod.rb', line 29

def initialize resource
   super
   load_verifiers
end

Instance Method Details

#drink(entity, quantity, target) ⇒ Object

Apply the drinking rule



49
50
51
52
53
# File 'lib/fools/dm/mod.rb', line 49

def drink entity, quantity, target
   with_entity entity do |drone|
      apply_drink drone, quantity, target
   end
end

#drink_odds(entity, quantity, target) ⇒ Object

See the drink odds



56
57
58
59
60
# File 'lib/fools/dm/mod.rb', line 56

def drink_odds entity, quantity, target
   with_entity entity do |drone|
      see_drink_odds drone, quantity, target
   end
end

#resist(person, lady) ⇒ Object

Apply the romantic resistance rule



63
64
65
66
67
# File 'lib/fools/dm/mod.rb', line 63

def resist person, lady
   with_entities person, lady do |drone, lady_sheet|
      apply_resist drone, lady_sheet
   end
end

#resist_odds(person, lady) ⇒ Object

See the odds on romantic resistance



70
71
72
73
74
# File 'lib/fools/dm/mod.rb', line 70

def resist_odds person, lady
   with_entities person, lady do |drone, lady_sheet|
      see_resist_odds drone, lady_sheet
   end
end

#sense(sap, lady, friend) ⇒ Object

Apply the sense rule



35
36
37
38
39
# File 'lib/fools/dm/mod.rb', line 35

def sense sap, lady, friend
   with_entities sap, lady, friend do |sap_sheet, lady_sheet, friend_sheet|
      apply_sense sap_sheet, lady_sheet, friend_sheet
   end
end

#sense_odds(sap, lady, friend) ⇒ Object

See the odds on talking sense



42
43
44
45
46
# File 'lib/fools/dm/mod.rb', line 42

def sense_odds sap, lady, friend
   with_entities sap, lady, friend do |sap_sheet, lady_sheet, friend_sheet| 
      see_sense_odds sap_sheet, lady_sheet, friend_sheet
   end
end

#tussle(attacker, defender, weapon) ⇒ Object

One Drone engages another in combat



77
78
79
80
81
# File 'lib/fools/dm/mod.rb', line 77

def tussle attacker, defender, weapon
   with_entities attacker, defender do |attacker_sheet, defender_sheet|
      apply_combat attacker_sheet, defender_sheet, weapon
   end
end

#tussle_odds(attacker, defender, weapon) ⇒ Object

See the odds of combat



84
85
86
87
88
# File 'lib/fools/dm/mod.rb', line 84

def tussle_odds attacker, defender, weapon
   with_entities attacker, defender do |attacker_sheet, defender_sheet|
      see_combat_odds attacker_sheet, defender_sheet, weapon
   end
end