class Equip attr_accessor :data_id # attr_accessor :icon # attr_accessor :name attr_accessor :discription attr_accessor :price attr_accessor :type attr_accessor :limit attr_accessor :hp_max attr_accessor :armor_hp attr_accessor :shd_hp attr_accessor :live_chance attr_accessor :movement_speed attr_accessor :critical attr_accessor :base_atk attr_accessor :bro_atk attr_accessor :s_base_atk attr_accessor :s_bro_atk attr_accessor :anti_cav attr_accessor :anti_inf attr_accessor :atk_fr attr_accessor :accuracy attr_accessor :engage_range attr_accessor :ammo_max attr_accessor :morale def initialize(data_id) @data_id = data_id @icon = Equips_data::ICON[@data_id] @name = Equips_data::NAME[@data_id] @discription = Equips_data::DISCRIPTION[@data_id] @price = Equips_data::PRICE[@data_id] @type = Equips_data::TYPE[@data_id] @limit = Equips_data::LIMIT[@data_id] # @hp_max = Equips_data::HP_MAX[@data_id] @armor_hp = Equips_data::AMMOR_HP[@data_id] @shd_hp = Equips_data::SHD_HP[@data_id] @live_chance = Equips_data::LIVE_CHANCE[@data_id] @movement_speed = Equips_data::MOVEMENT_SPEED[@data_id] @critical = Equips_data::CRITICAL[@data_id] @base_atk = Equips_data::BASE_ATK[@data_id] @bro_atk = Equips_data::BRO_ATK[@data_id] @s_base_atk = Equips_data::S_BASE_ATK[@data_id] @s_bro_atk = Equips_data::S_BRO_ATK[@data_id] @anti_cav = Equips_data::ANTI_CAV[@data_id] @anti_inf = Equips_data::ANTI_INF[@data_id] @atk_fr = Equips_data::ATK_FR[@data_id] @accuracy = Equips_data::ACCURATCY[@data_id] @engage_range = Equips_data::ENGAGE_RANGE[@data_id] @ammo_max = Equips_data::AMMO_MAX[@data_id] @morale = Equips_data::MORALE[@data_id] end end
module Equips_data @data_id = 0 ICON = [] NAME = [] DISCRIPTION = [] PRICE = [] TYPE = [] LIMIT = [] AMMOR_HP = [] SHD_HP = [] LIVE_CHANCE = [] MOVEMENT_SPEED = [] CRITICAL = [] BASE_ATK = [] BRO_ATK = [] S_BASE_ATK = [] S_BRO_ATK = [] ANTI_CAV = [] ANTI_INF = [] ATK_FR = [] ACCURATCY = [] ENGAGE_RANGE = [] AMMO_MAX = [] MORALE = [] def self.get_num_equips #定义自我。获得号码装备 return @data_id #返回@data_id end
module Equips_data @data_id = 1 ICON[@data_id] = "icon_1280" NAME[@data_id] = "测试盾" DISCRIPTION[@data_id] = "测试用的盾,非常坚固,非常" PRICE[@data_id] = 999 #价格[@data_id] #类型: 1.甲 2.盾 3.近战武器 4.远程武器 5.马 TYPE[@data_id] = 2 #限制:只有特定兵种才能装,nil都能装 LIMIT[@data_id] = nil #防具类, 都是加成 AMMOR_HP[@data_id] = 0 SHD_HP[@data_id] = 45 LIVE_CHANCE[@data_id] = 0 MOVEMENT_SPEED[@data_id] = 0 CRITICAL[@data_id] = 0 BASE_ATK[@data_id] = 0 BRO_ATK[@data_id] = 0 S_BASE_ATK[@data_id] = 0 S_BRO_ATK[@data_id] = 0 ANTI_CAV[@data_id] = 0 ANTI_INF[@data_id] = 0 ATK_FR[@data_id] = 0 ACCURATCY[@data_id] = 0 ENGAGE_RANGE[@data_id] = 0 AMMO_MAX[@data_id] = 0 MORALE[@data_id] = 0
module Equips_data @data_id = 2 ICON[@data_id] = "icon_1280" NAME[@data_id] = "测试刀" DISCRIPTION[@data_id] = "测试用的刀,非常坚固,非常OP" PRICE[@data_id] = 999 #类型: 1.甲 2.盾 3.近战武器 4.远程武器 5.马 TYPE[@data_id] = 3 #限制:只有特定兵种才能装,nil都能装 LIMIT[@data_id] = nil #防具类, 都是加成 AMMOR_HP[@data_id] = 0 SHD_HP[@data_id] = 0 LIVE_CHANCE[@data_id] = 0 MOVEMENT_SPEED[@data_id] = 0 CRITICAL[@data_id] = 0 BASE_ATK[@data_id] = 9999 BRO_ATK[@data_id] = 0 S_BASE_ATK[@data_id] = 0 S_BRO_ATK[@data_id] = 0 ANTI_CAV[@data_id] = 0 ANTI_INF[@data_id] = 0 ATK_FR[@data_id] = 0 ACCURATCY[@data_id] = 0 ENGAGE_RANGE[@data_id] = 0 AMMO_MAX[@data_id] = 0 MORALE[@data_id] = 0 end
类.png (13.97 KB, 下载次数: 2)
事件类.png (39.11 KB, 下载次数: 1)
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |