加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
module Figter_data # ...(保留你已有的代码) data_id = 0 #=====基本、模型信息========== CHARACTER_NAME = [] AMMO_NAME = [] AMMO_D_NAME = [] ATK_SE = [] ATK_SE_NUM = [] DEF_SE = [] DEF_SE_NUM = [] S_ATK_SE = [] S_ATK_SE_NUM = [] S_SHOOT_SE = [] S_SHOOT_SE_NUM = [] S_PASSBY_SE = [] S_PASSBY_SE_NUM = [] S_DROP_SE = [] S_DROP_SE_NUM = [] DEAD_ANIMATION_ID = [] S_FLY_TYPE = [] #=======类别================= THE_NAME = [] IS_CAL = [] IS_ARC = [] IS_OBJ= [] HEAVY = [] LABEL =[] DESCRIPTION = [] #1 light infan #2 heavy infan #3 light cav #4 heavy cav #5 missle_inf #6 missle_cav #7 elite #8 special #==========属性============== HP_MAX = [] AMMOR_HP = [] SHD_HP = [] BASE_ATK = [] BRO_ATK = [] S_BASE_ATK = [] S_BRO_ATK = [] ATK_SKILL = [] DEF_SKILL = [] ANTI_CAV = [] ANTI_INF = [] CHARGE_BOUN = [] MORALE = [] CRITICAL_HIT = [] EXPLOSION_SETTINGS = [] JINGONG_SETTINGS = [] ATK_FR = [] ATK_RANGE = [] ENGAGE_RANGE = [] ENGAGE_RANGE_MIN = [] MOVEMENT_SPEED = [] ACCURATCY = [] AMMO_MAX = [] LIVE_CHANCE = [] ATK_CODE = [] #===========战略用============= EXP = [] PRICE = [] EXP_NEED = [] NEXT_LEVEL = [] CAPTAIN_SKILL = [] #==========Hero's only============== SP_MAX = [] #加速量 ACC_VALUE = [] #防御减少量 GUARD_VALUE = [] #加速消耗体力(每帧) ACC_COST_SP = [] #跳越消耗体力 JUMP_COST_SP = [] #大跳越消耗体力 BIG_JUMP_COST_SP = [] #恢复体力没帧(每帧) SP_REGAINED = [] #攻击体力消耗 ATK_COST_SP = [] #英雄攻击呻吟 HERO_ATK_SE = [] HERO_ATK_SE_NUM = [] #英雄死亡呻吟 HERO_DEAD_SE = [] HERO_DEAD_SE_NUM = [] #英雄受伤呻吟 HERO_GET_HIT_SE = [] HERO_GET_HIT_SE_NUM = [] # 装备位置定义 # 装备位置定义 WEAPON_SLOT = 0 HELMET_SLOT = 1 ARMOR_SLOT = 2 BOOTS_SLOT = 3 BOOK_SLOTS = (4..12).to_a # 书籍占据9个位置,从索引4开始 # 装备数组,用于存储角色的装备 equipment = [] # 初始化装备数组 def initialize_equipment equipment.clear equipment.fill(nil, 0, equipment.size) end # 添加装备的方法 def add_equipment(slot, item) equipment[slot] = item end # 获取装备的方法 def get_equipment(slot) equipment[slot] end # 检查装备位置是否为空 def equipment_slot_empty?(slot) equipment[slot].nil? end # 示例:给角色添加武器、防具和书籍 def equip_character(weapon, helmet, armor, boots, books) add_equipment(WEAPON_SLOT, weapon) add_equipment(HELMET_SLOT, helmet) add_equipment(ARMOR_SLOT, armor) add_equipment(BOOTS_SLOT, boots) books.each_with_index do |book, index| add_equipment(BOOK_SLOTS[index], book) end end # ...(其他代码) end
module Figter_data
# ...(保留你已有的代码)
data_id = 0
#=====基本、模型信息==========
CHARACTER_NAME = []
AMMO_NAME = []
AMMO_D_NAME = []
ATK_SE = []
ATK_SE_NUM = []
DEF_SE = []
DEF_SE_NUM = []
S_ATK_SE = []
S_ATK_SE_NUM = []
S_SHOOT_SE = []
S_SHOOT_SE_NUM = []
S_PASSBY_SE = []
S_PASSBY_SE_NUM = []
S_DROP_SE = []
S_DROP_SE_NUM = []
DEAD_ANIMATION_ID = []
S_FLY_TYPE = []
#=======类别=================
THE_NAME = []
IS_CAL = []
IS_ARC = []
IS_OBJ= []
HEAVY = []
LABEL =[]
DESCRIPTION = []
#1 light infan #2 heavy infan #3 light cav #4 heavy cav
#5 missle_inf #6 missle_cav #7 elite #8 special
#==========属性==============
HP_MAX = []
AMMOR_HP = []
SHD_HP = []
BASE_ATK = []
BRO_ATK = []
S_BASE_ATK = []
S_BRO_ATK = []
ATK_SKILL = []
DEF_SKILL = []
ANTI_CAV = []
ANTI_INF = []
CHARGE_BOUN = []
MORALE = []
CRITICAL_HIT = []
EXPLOSION_SETTINGS = []
JINGONG_SETTINGS = []
ATK_FR = []
ATK_RANGE = []
ENGAGE_RANGE = []
ENGAGE_RANGE_MIN = []
MOVEMENT_SPEED = []
ACCURATCY = []
AMMO_MAX = []
LIVE_CHANCE = []
ATK_CODE = []
#===========战略用=============
EXP = []
PRICE = []
EXP_NEED = []
NEXT_LEVEL = []
CAPTAIN_SKILL = []
#==========Hero's only==============
SP_MAX = []
#加速量
ACC_VALUE = []
#防御减少量
GUARD_VALUE = []
#加速消耗体力(每帧)
ACC_COST_SP = []
#跳越消耗体力
JUMP_COST_SP = []
#大跳越消耗体力
BIG_JUMP_COST_SP = []
#恢复体力没帧(每帧)
SP_REGAINED = []
#攻击体力消耗
ATK_COST_SP = []
#英雄攻击呻吟
HERO_ATK_SE = []
HERO_ATK_SE_NUM = []
#英雄死亡呻吟
HERO_DEAD_SE = []
HERO_DEAD_SE_NUM = []
#英雄受伤呻吟
HERO_GET_HIT_SE = []
HERO_GET_HIT_SE_NUM = []
# 装备位置定义
# 装备位置定义
WEAPON_SLOT = 0
HELMET_SLOT = 1
ARMOR_SLOT = 2
BOOTS_SLOT = 3
BOOK_SLOTS = (4..12).to_a # 书籍占据9个位置,从索引4开始
# 装备数组,用于存储角色的装备
equipment = []
# 初始化装备数组
def initialize_equipment
equipment.clear
equipment.fill(nil, 0, equipment.size)
end
# 添加装备的方法
def add_equipment(slot, item)
equipment[slot] = item
end
# 获取装备的方法
def get_equipment(slot)
equipment[slot]
end
# 检查装备位置是否为空
def equipment_slot_empty?(slot)
equipment[slot].nil?
end
# 示例:给角色添加武器、防具和书籍
def equip_character(weapon, helmet, armor, boots, books)
add_equipment(WEAPON_SLOT, weapon)
add_equipment(HELMET_SLOT, helmet)
add_equipment(ARMOR_SLOT, armor)
add_equipment(BOOTS_SLOT, boots)
books.each_with_index do |book, index|
add_equipment(BOOK_SLOTS[index], book)
end
end
# ...(其他代码)
end
原来的脚本module Figter_data # data_id = 0 #=====基本、模型信息========== CHARACTER_NAME = [] AMMO_NAME = [] AMMO_D_NAME = [] ATK_SE = [] ATK_SE_NUM = [] DEF_SE = [] DEF_SE_NUM = [] S_ATK_SE = [] S_ATK_SE_NUM = [] S_SHOOT_SE = [] S_SHOOT_SE_NUM = [] S_PASSBY_SE = [] S_PASSBY_SE_NUM = [] S_DROP_SE = [] S_DROP_SE_NUM = [] DEAD_ANIMATION_ID = [] S_FLY_TYPE = [] #=======类别================= THE_NAME = [] IS_CAL = [] IS_ARC = [] IS_OBJ= [] HEAVY = [] LABEL =[] DESCRIPTION = [] #1 light infan #2 heavy infan #3 light cav #4 heavy cav #5 missle_inf #6 missle_cav #7 elite #8 special #==========属性============== HP_MAX = [] AMMOR_HP = [] SHD_HP = [] BASE_ATK = [] BRO_ATK = [] S_BASE_ATK = [] S_BRO_ATK = [] ATK_SKILL = [] DEF_SKILL = [] ANTI_CAV = [] ANTI_INF = [] CHARGE_BOUN = [] MORALE = [] CRITICAL_HIT = [] EXPLOSION_SETTINGS = [] JINGONG_SETTINGS = [] ATK_FR = [] ATK_RANGE = [] ENGAGE_RANGE = [] ENGAGE_RANGE_MIN = [] MOVEMENT_SPEED = [] ACCURATCY = [] AMMO_MAX = [] LIVE_CHANCE = [] ATK_CODE = [] #===========战略用============= EXP = [] PRICE = [] EXP_NEED = [] NEXT_LEVEL = [] CAPTAIN_SKILL = [] #==========Hero's only============== SP_MAX = [] #加速量 ACC_VALUE = [] #防御减少量 GUARD_VALUE = [] #加速消耗体力(每帧) ACC_COST_SP = [] #跳越消耗体力 JUMP_COST_SP = [] #大跳越消耗体力 BIG_JUMP_COST_SP = [] #恢复体力没帧(每帧) SP_REGAINED = [] #攻击体力消耗 ATK_COST_SP = [] #英雄攻击呻吟 HERO_ATK_SE = [] HERO_ATK_SE_NUM = [] #英雄死亡呻吟 HERO_DEAD_SE = [] HERO_DEAD_SE_NUM = [] #英雄受伤呻吟 HERO_GET_HIT_SE = [] HERO_GET_HIT_SE_NUM = [] end
module Figter_data
#
data_id = 0
#=====基本、模型信息==========
CHARACTER_NAME = []
AMMO_NAME = []
AMMO_D_NAME = []
ATK_SE = []
ATK_SE_NUM = []
DEF_SE = []
DEF_SE_NUM = []
S_ATK_SE = []
S_ATK_SE_NUM = []
S_SHOOT_SE = []
S_SHOOT_SE_NUM = []
S_PASSBY_SE = []
S_PASSBY_SE_NUM = []
S_DROP_SE = []
S_DROP_SE_NUM = []
DEAD_ANIMATION_ID = []
S_FLY_TYPE = []
#=======类别=================
THE_NAME = []
IS_CAL = []
IS_ARC = []
IS_OBJ= []
HEAVY = []
LABEL =[]
DESCRIPTION = []
#1 light infan #2 heavy infan #3 light cav #4 heavy cav
#5 missle_inf #6 missle_cav #7 elite #8 special
#==========属性==============
HP_MAX = []
AMMOR_HP = []
SHD_HP = []
BASE_ATK = []
BRO_ATK = []
S_BASE_ATK = []
S_BRO_ATK = []
ATK_SKILL = []
DEF_SKILL = []
ANTI_CAV = []
ANTI_INF = []
CHARGE_BOUN = []
MORALE = []
CRITICAL_HIT = []
EXPLOSION_SETTINGS = []
JINGONG_SETTINGS = []
ATK_FR = []
ATK_RANGE = []
ENGAGE_RANGE = []
ENGAGE_RANGE_MIN = []
MOVEMENT_SPEED = []
ACCURATCY = []
AMMO_MAX = []
LIVE_CHANCE = []
ATK_CODE = []
#===========战略用=============
EXP = []
PRICE = []
EXP_NEED = []
NEXT_LEVEL = []
CAPTAIN_SKILL = []
#==========Hero's only==============
SP_MAX = []
#加速量
ACC_VALUE = []
#防御减少量
GUARD_VALUE = []
#加速消耗体力(每帧)
ACC_COST_SP = []
#跳越消耗体力
JUMP_COST_SP = []
#大跳越消耗体力
BIG_JUMP_COST_SP = []
#恢复体力没帧(每帧)
SP_REGAINED = []
#攻击体力消耗
ATK_COST_SP = []
#英雄攻击呻吟
HERO_ATK_SE = []
HERO_ATK_SE_NUM = []
#英雄死亡呻吟
HERO_DEAD_SE = []
HERO_DEAD_SE_NUM = []
#英雄受伤呻吟
HERO_GET_HIT_SE = []
HERO_GET_HIT_SE_NUM = []
end
|