This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ArmorTier < ActiveRecord::Base | |
attr_accessible :agility, :deviation, :intellect, :level, :name, :stamina, :strength | |
belongs_to :armor_material | |
def agility | |
self.agility + rand(deviation) | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ArmorTier < ActiveRecord::Base | |
attr_accessible :agility, :deviation, :intellect, :level, :name, :stamina, :strength | |
belongs_to :armor_material | |
def agility | |
self.agility + rand(deviation) | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ArmorTier < ActiveRecord::Base | |
attr_accessible :agility, :deviation, :intellect, :level, :name, :stamina, :strength | |
belongs_to :armor_material | |
def agility | |
agility + rand(deviation) | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ArmorTier < ActiveRecord::Base | |
attr_accessible :agility, :deviation, :intellect, :level, :name, :stamina, :strength | |
belongs_to :armor_material | |
def agility | |
value + 5 | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ArmorTier < ActiveRecord::Base | |
attr_accessible :agility, :deviation, :intellect, :level, :name, :stamina, :strength | |
belongs_to :armor_material | |
def agility | |
value + 5 | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ArmorTier < ActiveRecord::Base | |
attr_accessible :agility, :deviation, :intellect, :level, :name, :stamina, :strength | |
belongs_to :armor_material | |
def agility | |
value + 5 | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Armor < ActiveRecord::Base | |
attr_accessible :back_id, :character_id, :chest_id, :feet_id, :hand_id, :head_id, :legs_id, :shoulder_id, :waist_id | |
belongs_to :character | |
belongs_to :back, :class_name => 'ArmorItem' | |
belongs_to :chest, :class_name => 'ArmorItem' | |
belongs_to :feet, :class_name => 'ArmorItem' | |
belongs_to :hand, :class_name => 'ArmorItem' | |
belongs_to :head, :class_name => 'ArmorItem' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class StatSet < ActiveRecord::Base | |
attr_accessible :agility, :intellect, :stamina, :strength | |
has_many :enchants | |
has_many :bonuses | |
has_many :armor_items | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Armor < ActiveRecord::Base | |
attr_accessible :back_id, :character_id, :chest_id, :feet_id, :hand_id, :head_id, :legs_id, :shoulder_id, :waist_id | |
belongs_to :character | |
belongs_to :back, :class_name => 'ArmorItem' | |
belongs_to :chest, :class_name => 'ArmorItem' | |
belongs_to :feet, :class_name => 'ArmorItem' | |
belongs_to :hand, :class_name => 'ArmorItem' | |
belongs_to :head, :class_name => 'ArmorItem' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Armor < ActiveRecord::Base | |
attr_accessible :back_id, :character_id, :chest_id, :feet_id, :hands_id, :head_id, :legs_id, :shoulder_id, :waist_id, :finger_id | |
belongs_to :character | |
attr_reader :back, :chest, :feet, :hands, :head, :legs, :shoulder, :waist, :finger | |
## This isn't very dry, perhaps there is a better method? | |
def hands | |
ArmorItem.find(hands_id).name |