查看: 3748|回复: 25

[有事请教] [以解决]如何通过角色的名字获得角色的id

[复制链接]
梦石
0
星屑
7296
在线时间
1244 小时
注册时间
2015-8-15
回帖
473
发表于 2023-8-15 08:34:11 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
本帖最后由 金芒芒 于 2023-8-15 19:55 编辑

模型角色data
data_id = 1
CHARACTER_NAME[data_id]= =  "甲"
#---------------------------------------------
模型角色data
data_id = 2
CHARACTER_NAME[data_id]= =  "乙"
#---------------------------------------------
模型角色data
data_id = 3
CHARACTER_NAME[data_id]= =  "丙"
#---------------------------------------------
模型角色data
data_id = 4
CHARACTER_NAME[data_id]= =  "丁"
#---------------------------------------------
模型角色data
data_id = 5
CHARACTER_NAME[data_id]= =  "戊"
#---------------------------------------------
模型角色data
data_id = 6
CHARACTER_NAME[data_id]= =  "己"
#---------------------------------------------
模型角色data
data_id = 7
CHARACTER_NAME[data_id]= =  "庚"
#---------------------------------------------
模型角色data
data_id = 8
CHARACTER_NAME[data_id]= =  "辛"
#---------------------------------------------
模型角色data
data_id = 9
CHARACTER_NAME[data_id]= =  "壬"
#---------------------------------------------
模型角色data
data_id = 10
CHARACTER_NAME[data_id]= =  "癸"
#---------------------------------------------

@all_fighters = a
a=[1,2,3,4,5,6,7,8,9,10]#所有角色的id 1名称=甲  2名称=乙 3名称=丙 4名称=丁 5名称=戊 6名称=己 7名称=庚 8名称=辛 9名称=壬 10名称=癸
team_selected_troops = b
b[[乙],[丙],[丁],[戊],[己]] # b 索引( index) a中 的名称 且b=5个小数组   
如何当c= b[[乙],[丙],[丁],[戊],[己]]  且c= [[a],[a],[a],[a],[a]]       c=a(id)       #c= [[2,[3],[4],[5],[6]]     


for i in 0...@all_fighters.size
name = Figter_data::CHARACTER_NAME[@all_fighters [ i ]  ]
end


        
梦石
0
星屑
7296
在线时间
1244 小时
注册时间
2015-8-15
回帖
473
 楼主| 发表于 2023-8-15 11:24:03 | 显示全部楼层
a是所有角色的id,b是所有角色的名字的出战小队,c=b出战小队名字相关的aID
c=a
回复

使用道具 举报

梦石
0
星屑
39236
在线时间
11155 小时
注册时间
2009-3-15
回帖
4768
发表于 2023-8-15 13:20:49 | 显示全部楼层
本帖最后由 soulsaga 于 2023-8-15 14:01 编辑

你怎么问问题的..?
标题连问题都不是
别连问题都省略了
还有我不知道你为什么要用二维数组..
没必要的话用一维数组就行
回复

使用道具 举报

梦石
0
星屑
7296
在线时间
1244 小时
注册时间
2015-8-15
回帖
473
 楼主| 发表于 2023-8-15 13:52:34 | 显示全部楼层
soulsaga 发表于 2023-8-15 13:20
你怎么问问题的..?
标题连问题都不是
别连问题都省略了

如何通过角色的名字获得角色的id
回复

使用道具 举报

梦石
0
星屑
39236
在线时间
11155 小时
注册时间
2009-3-15
回帖
4768
发表于 2023-8-15 14:02:47 | 显示全部楼层
金芒芒 发表于 2023-8-15 13:52
如何通过角色的名字获得角色的id


你得发完整脚本..这样没法判断
发脚本用高级回复右边的双向箭头那添加代码文字发
回复

使用道具 举报

梦石
0
星屑
7296
在线时间
1244 小时
注册时间
2015-8-15
回帖
473
 楼主| 发表于 2023-8-15 14:24:10 | 显示全部楼层
soulsaga 发表于 2023-8-15 14:02
你得发完整脚本..这样没法判断
发脚本用高级回复右边的双向箭头那添加代码文字发 ...

链接: https://pan.baidu.com/s/1KJn_NAhSX7Nx5LnkL2w1zA?pwd=727z 提取码: 727z 复制这段内容后打开百度网盘手机App,操作更方便哦
回复

使用道具 举报

梦石
0
星屑
7296
在线时间
1244 小时
注册时间
2015-8-15
回帖
473
 楼主| 发表于 2023-8-15 14:30:34 | 显示全部楼层
soulsaga 发表于 2023-8-15 14:02
你得发完整脚本..这样没法判断
发脚本用高级回复右边的双向箭头那添加代码文字发 ...

没有完整脚本,多是问过来自己写的
回复

使用道具 举报

梦石
0
星屑
7296
在线时间
1244 小时
注册时间
2015-8-15
回帖
473
 楼主| 发表于 2023-8-15 14:32:52 | 显示全部楼层
本帖最后由 金芒芒 于 2023-8-15 14:36 编辑
soulsaga 发表于 2023-8-15 14:02
你得发完整脚本..这样没法判断
发脚本用高级回复右边的双向箭头那添加代码文字发 ...


你下在过去了吗被下载了3次了我晕 我q 343152012
回复

使用道具 举报

梦石
0
星屑
39236
在线时间
11155 小时
注册时间
2009-3-15
回帖
4768
发表于 2023-8-15 15:05:46 | 显示全部楼层
本帖最后由 soulsaga 于 2023-8-15 15:08 编辑
金芒芒 发表于 2023-8-15 14:24
链接: https://pan.baidu.com/s/1KJn_NAhSX7Nx5LnkL2w1zA?pwd=727z 提取码: 727z 复制这段内容后打开百度 ...


假设甲的ID是2
甲是CHARACTER_NAME数组里第3个单元
这样写
[pre lang="ruby"]p Figter_data::CHARACTER_NAME.index("甲")#==>2[/pre]
回复

使用道具 举报

梦石
0
星屑
7296
在线时间
1244 小时
注册时间
2015-8-15
回帖
473
 楼主| 发表于 2023-8-15 15:55:29 | 显示全部楼层
本帖最后由 金芒芒 于 2023-8-15 16:42 编辑
soulsaga 发表于 2023-8-15 15:05
假设甲的ID是2
甲是CHARACTER_NAME数组里第3个单元
这样写


我就想team_selected_troops = @selected_units
team_selected_troops = [[],[].[],[],[]]这[]里面的参数第三个脚本的20行
@selected_units是第2个脚本向第一脚本@all_fighters参数内容索引过去的(名称=图片=name = Figter_data::THE_NAME[item])[item=图片]item
第一个脚本86行@all_fighters = Figter_data::ALL_SOLDIER # 所有士兵=Figter_data::ALL_SOLDIER
  @all_fighters这个是第4个脚本里面的参数[5,4,3,13,2,9,11,15,26,23,32,35,36,28,30,33,34,7,8,19,12,31,38,17, 27,6,10,14,16,18,21,22,29,39]
[5,4,3,13,2,9,11,15,26,23,32,35,36,28,30,33,34,7,8,19,12,31,38,17, 27,6,10,14,16,18,21,22,29,39]#所有英雄是第5个脚本的data_id(截图脚本)


  1. #==============================================================================
  2. # ■ Window_Item
  3. #------------------------------------------------------------------------------
  4. #  显示可以装备的回路。
  5. #==============================================================================
  6. class Window_Troops_List< Window_Base
  7.   def blue_color
  8.     return Color.new(141,157,180)
  9.   end
  10.   #--------------------------------------------------------------------------
  11.   # ● 定义实例变量
  12.   #--------------------------------------------------------------------------
  13.   attr_reader   :index                    # 光标位置
  14.   attr_reader   :help_window              # 帮助窗口
  15.   attr_reader   :type                     # 种类
  16.   attr_reader   :able                     # 暗色
  17.   
  18.   def type=(type)  # 定义类型=(类型)
  19.     @type = type   # @类型 = 类型
  20.   end
  21.   def type         # 定义 类型
  22.     return @type   # 返回 @类型
  23.   end
  24.   #--------------------------------------------------------------------------
  25.   # ● 设置光标的位置
  26.   #     index : 新的光标位置
  27.   #--------------------------------------------------------------------------
  28.   def index=(index) # 定义 索引 = (索引)
  29.     @index = index  # @索引 = 索引
  30.     @column_max = 4 # 纵最大值 = 4
  31.     # 刷新帮助文本 (update_help 定义了继承目标)
  32.     #如果是自己。活动和@帮助窗口!=无
  33.     if self.active and @help_window != nil
  34.       update_help  # 跟新帮组
  35.     end
  36.     # 刷新光标矩形
  37.     update_cursor_rect
  38.   end
  39. #--------------------------------------------------------------------------
  40.   # ● 获取行数
  41.   #--------------------------------------------------------------------------
  42.   def row_max #定义行的最大值
  43.     # 由项目数和列数计算出行数
  44.     return @item_max #返回@项目最大值
  45.   end
  46.   #--------------------------------------------------------------------------
  47.   # ● 获取开头行
  48.   #--------------------------------------------------------------------------
  49.   def top_row # 定义 开头行
  50.     # 将窗口内容的传送源 Y 坐标、1 行的高 32 等分
  51.     return self.oy / 120 #返回自己原点y/120 (每行的间隔是120)
  52.   end
  53.   #--------------------------------------------------------------------------
  54.   # ● 设置开头行
  55.   #     row : 显示开头的行
  56.   #--------------------------------------------------------------------------
  57.   def top_row=(row)  # 定义 开头行=(行)
  58.     # row 未满 0 的场合更正为 0
  59.     if row < 0 #如果行< 0
  60.       row = 0  #行=0
  61.     end
  62.     # row 超过 row_max - 1 的情况下更正为 row_max - 1
  63.     if row > row_max - 1 # 如果 行 > 行 最大值 - 1
  64.       row = row_max - 1  # 行 = 行 最大值 - 1
  65.     end
  66.     # row 1 行高的 32 倍、窗口内容的传送源 Y 坐标
  67.     self.oy = row * 120
  68.   end
  69.   #--------------------------------------------------------------------------
  70.   # ● 获取 1 页可以显示的行数
  71.   #--------------------------------------------------------------------------
  72.   def page_row_max #定义页面行最大值
  73.     # 窗口的高度,设置画面的高度减去 32 ,除以 1 行的高度 32
  74.     return 3 #返回 3
  75.   end  
  76.   #--------------------------------------------------------------------------
  77.   # ● 初始化对像
  78.   #     actor : 角色
  79.   #--------------------------------------------------------------------------
  80.   #定义初始化(类型=0,玩家或敌军=0)
  81.   def initialize(type = 0,player_or_enermy = 0)
  82. #    @all_fighters = [1]
  83. #    if $game_switches[19] == true#(开关 开)
  84. #   @all_fighters.push(2)  
  85. #    end  
  86.     @all_fighters = Figter_data::ALL_SOLDIER # 所有士兵=Figter_data::ALL_SOLDIER
  87.    
  88.     #右侧滚动条
  89.     @right_back = Bar_Right.new("right_back", origin_x+344, origin_y+12, 120*3)
  90.     @right_back.visible = false
  91.     @right = Bar_Right.new("right", origin_x+342, origin_y+12, 0)
  92.     @right.visible = false
  93.     #变量更新
  94.     @type = 0 #@类型= 0
  95.     @index = 0 # 索引=0
  96.     #背景
  97.     @back = Sprite.new #@背景 = 新的精灵
  98.     #背景位图 = RPG::Cache.menu("troopList-base")
  99.     @back.bitmap = RPG::Cache.menu("troopList-base")
  100.   #  @back.x = origin_x
  101.    # @back.y = origin_y
  102.     #帮助窗口    = Window_Troop_Info.new #属性窗口
  103.     @help_window = Window_Troop_Info.new #属性窗口
  104.    
  105.    
  106.     @item_icon = [] #项目图标 = []
  107.     @item_icon[0] = Sprite.new #@项目图标[0] = Sprite.new
  108.     #初始化
  109.     super(origin_x,origin_y,344+32,3*120+120)
  110.     self.windowskin  = RPG::Cache.menu("Blue") #自己窗花=RPG::缓存.菜单(“蓝色”)
  111.     self.opacity = 0    #自己不透明度 =0
  112.     self.active = false #自己活动=错误
  113.     #刷新
  114.     refresh(type) #刷新(类型)
  115.     refresh(type) #刷新(类型)
  116.     update_help   #更新帮助
  117.   end
  118.   #--------------------------------------------------------------------------
  119.   # ● 活动窗口用原始x y坐标
  120.   #--------------------------------------------------------------------------  
  121.   def origin_x
  122.     return 25
  123.   end
  124.   def origin_y
  125.     return 100
  126.   end
  127.   #--------------------------------------------------------------------------
  128.   # ● 定义用选择状态决定窗口颜色
  129.   #--------------------------------------------------------------------------  
  130.   def able=(able)
  131.     @able=able
  132.     @right_back.able = able
  133.     @right.able = able
  134.     if active
  135.       @back.color = Color.new(255,255,255,0)
  136.     else
  137.       @back.color = Color.new(0,0,0,128)
  138.     end
  139.     refresh
  140.   end
  141.   #--------------------------------------------------------------------------
  142.   # ● 一些方法的重载
  143.   #--------------------------------------------------------------------------  
  144.   def active=(active)      # 定义活动 =(活动)
  145.     if active              # 如果活动
  146.       if @item_max <= 0    # 如果@项目最大值<= 0
  147.         self.index = -1    # 自己索引=-1
  148.       else                 # 否则
  149.         self.index = 0     # 自己索引= 0
  150.       end                  
  151.     else                   # 否则
  152.       self.index = -1      # 自己索引=-1
  153.     end
  154.     @ajsdgfshfajklshfa = nil #@阿拉伯联合酋长国=零
  155.     #@帮助窗口。如果@帮助窗口!=设置文本(nil)无
  156.     @help_window.set_text( nil ) if @help_window != nil
  157.     super(active) #超级(活动)
  158.   end
  159.   def dispose #定义释放
  160.     @back.dispose  #@背景释放
  161.     @right_back.dispose # 滚条背景释放
  162.     @right.dispose      # 滚条释放
  163.     for i in 0...@item_icon.size #对于0中的i…@项目图标。大小
  164.       @item_icon[i].dispose # @项目图标[i].释放
  165.     end
  166.     @help_window.dispose    # 帮助窗口释放
  167.    
  168.     super
  169.   end
  170.   def x=(x)
  171.     @back.x = x-origin_x #+ 15
  172.     @right_back.x = x+344 #+30
  173.     @right.x = x+342 #+30
  174.     for i in 0...@item_icon.size
  175.       @item_icon[i].x = 5+ i%4 *86 #  +60        #14
  176.     end
  177.     super(x-16)
  178.   end
  179.   def x
  180.     return super+16
  181.   end
  182.   def y=(y)
  183.     @back.y = y-origin_y# + 60
  184.     @right_back.y = y+12 #+ origin_y
  185.     @right.y = y+12 #+ origin_y
  186.     for i in 0...@item_icon.size
  187.       @item_icon[i].y=  y+16+ i/ 4 * 122 # + origin_y #+ 25   #14
  188.     end
  189.     super(y)
  190.   end
  191.   def z=(z)
  192.     @back.z=z-5
  193.     @right_back.z=z+3
  194.     @right.z=z+4
  195.     for i in 0...@item_icon.size
  196.       @item_icon[i].z=z+2
  197.     end
  198.     super(z)
  199.   end
  200.   def visible=(visible)  #def-visible=(可见)
  201.     @back.visible=visible
  202.     @right_back.visible=visible
  203.     @right.visible=visible
  204.   #  @help_window.visible=visible
  205.     super(visible)
  206.   end
  207.   def contents_opacity=(opacity) #def内容不透明度=(不透明度)
  208.     @back.opacity=opacity
  209.     @right_back.opacity=opacity
  210.     @right.opacity=opacity
  211.    # @help_window.opacity=opacity
  212.     super(opacity)
  213.   end
  214.   def oy=(oy)
  215.     #缩放图标时只显示当前页的项目
  216.     for i in 0...@item_icon.size
  217.       @item_icon[i].x= 25+i%4 *84
  218.      # @item_icon[i].y = i/4*120
  219.       @item_icon[i].y = i/ 4 * 120+self.y-oy+16#120*i+self.y-oy+16
  220.       if @item_icon[i].y < self.y or @item_icon[i].y > self.y+120*self.page_row_max
  221.         @item_icon[i].visible = false
  222.       else
  223.         @item_icon[i].visible = true
  224.       end
  225.     end
  226.     super(oy)
  227.   end
  228.   #--------------------------------------------------------------------------
  229.   # ● 获取物品
  230.   #--------------------------------------------------------------------------  
  231.   def item #定义项目
  232.     return @all_fighters[self.index] #返回 @所有士兵[自己索引]
  233.   end
  234.   #--------------------------------------------------------------------------
  235.   # ● 刷新
  236.   #--------------------------------------------------------------------------  
  237.   def refresh(type=@type)   # 定义刷新(类型=@类型)       #all,1,2,3,4,5,6,7 RPPG::ARMOR_BEGIN
  238.     if self.contents != nil # 如果是自己。内容!=无
  239.       self.contents.dispose # 自己内容释放
  240.       self.contents = nil   # 自己内容=无
  241.     end
  242.    
  243.     for i in 0...@item_icon.size  # 对于0中的i…@项目图标。大小
  244.       @item_icon[i].dispose       # @项目图标[i].释放
  245.     end
  246.     @item_icon = []               # @项目图标 = []
  247.     @item_icon[0] = Sprite.new    # @项目图标[0] = 精灵新的

  248.    

  249.     for i in 0...@all_fighters.size # 对于0中的i…@所有士兵。大小
  250.      @item_icon[i] = Sprite.new     # @项目图标[0] = 精灵新的
  251.      #名称= Figter_data::CHARACTER_NAME[@所有士兵[i]]
  252.      name = Figter_data::CHARACTER_NAME[@all_fighters[i]]
  253.      #@项目图标[i].位图= RPG::Cache.icon(名称) 如果名称 != 无
  254.      @item_icon[i].bitmap = RPG::Cache.icon(name) if name != nil
  255.      
  256.     end
  257.     #@项目最大值 = @所有士兵大小
  258.     @item_max = @all_fighters.size
  259.     #下标超过范围的时候往回退一格
  260.     #如果是自己。最上面一行>@项目最大自我。最大页数
  261.     if self.top_row > @item_max-self.page_row_max
  262.       #自己。最上面一行=@项目最大自我。最大页数
  263.       self.top_row = @item_max-self.page_row_max
  264.           end
  265.     if self.index >= @item_max
  266.       self.index = @item_max-1
  267.     end
  268.       
  269.     #右侧滚动条显示
  270.     if @item_max > self.page_row_max
  271.       @right_back.visible = true
  272.       @right.visible = true
  273.     else
  274.       @right_back.visible = false
  275.       @right.visible = false
  276.     end
  277.     #滚动条的更新
  278.     if @right.visible
  279.       @right.height = (3*120)*(3*120)/(@item_max.to_f*120)-24.0 > 0 ? (3*120)*(3*120)/(@item_max.to_f*120)-24.0 : 0
  280.     end
  281.    
  282.     # 如果项目数不是 0 就生成位图、描绘全部项目
  283.     if @item_max > 0
  284.       self.contents = Bitmap.new(width - 32, @item_max*20)
  285.       for i in 0...@item_max
  286.         draw_item(i, 12, i*120)
  287.       end
  288.     else
  289.       self.contents = Bitmap.new(width - 32, 20)
  290.     end
  291.     #缩放图标时只显示当前页的项目
  292.     for i in 0...@item_icon.size
  293.       @item_icon[i].x = 25+ i%4 *84
  294.       @item_icon[i].y =  i/ 4 * 120+self.y-oy+16#120*i+self.y-oy+16
  295.       
  296.     #  @item_icon[i].y = i/4*120
  297.       if @item_icon[i].y < self.y or @item_icon[i].y > self.y+120*self.page_row_max
  298.         @item_icon[i].visible = false
  299.       else
  300.         @item_icon[i].visible = true
  301.       end
  302.     end
  303.    #update_help
  304.   end
  305.   #--------------------------------------------------------------------------
  306.   # ● 描绘物品
  307.   #--------------------------------------------------------------------------  
  308.   def draw_item(index, x, y)

  309.     item = @all_fighters[index]
  310.    
  311.    
  312.    
  313.    
  314.     self.contents.font.size = 12
  315.      
  316.       
  317.     #图标缩放显示专用
  318.     icon_size = 100#图片缩放大小self.index%4 * (66 + 5)
  319.     @item_icon[index].x = self.index%4 *86
  320.     @item_icon[index].y = self.index/ 4 * 120
  321. #   @item_icon[index].zoom_x = icon_size.to_f/@item_icon[index].bitmap.width
  322.   #  @item_icon[index].zoom_y = icon_size.to_f/@item_icon[index].bitmap.height
  323.     @item_icon[index].z = self.z+2
  324.     @item_icon[index].color = self.contents.font.color==normal_color ? Color.new(255,255,255,0):Color.new(0,0,0,128)
  325.     #self.contents.font.color = Color.new(128,193,125,0)
  326.     name = Figter_data::THE_NAME[item]#name=图形数据::名称[项目]
  327.     self.contents.draw_text(x + icon_size.to_f, y + 4, 184, self.contents.font.size, name)
  328.       
  329.    
  330.   end
  331.   #--------------------------------------------------------------------------
  332.   # ● 帮助窗口的设置
  333.   #     help_window : 新的帮助窗口
  334.   #--------------------------------------------------------------------------
  335.   def help_window=(help_window)
  336.     @help_window = help_window
  337.     # 刷新帮助文本 (update_help 定义了继承目标)
  338.     if self.active and @help_window != nil
  339.       update_help
  340.     end
  341.   end


  342.   #--------------------------------------------------------------------------
  343.   # ● 更新光标矩形
  344.   #--------------------------------------------------------------------------
  345.   def update_cursor_rect
  346.     #@back.bitmap = RPG::Cache.menu("item_command"+type.to_s)
  347.     # 光标位置不满 0 的情况下
  348.     if @index < 0
  349.       self.cursor_rect.empty
  350.       return
  351.     end
  352.    
  353.     # 获取当前的行
  354.     row = @index/@column_max
  355.     # 当前行被显示开头行前面的情况下
  356.     if row < self.top_row
  357.       # 从当前行向开头行滚动
  358.       self.top_row = row
  359.     end
  360.     # 当前行被显示末尾行之后的情况下
  361.     if row > self.top_row + (self.page_row_max - 1)
  362.       # 从当前行向末尾滚动
  363.       self.top_row = row - (self.page_row_max - 1)
  364.     end
  365.    
  366.     @right.y = self.y+12+self.top_row.to_f*120.0*(3*120)/(@item_max.to_f*120)
  367.    
  368.     # 计算光标的宽度
  369.     cursor_width = 240
  370.     # 计算光标坐标
  371.     x = @index%4*86+2
  372.     y = @index/4-self.oy/120
  373.     # 更新光标矩形
  374.     self.cursor_rect.set(@index%4*84+2,(@index/4-self.oy/120)*120-1,85,120)
  375.     #self.cursor_rect.set(x, y, 86, 120)
  376.   end
  377. #--------------------------------------------------------------------------
  378.   # ● 刷新画面
  379.   #--------------------------------------------------------------------------
  380.   def update
  381.     super

  382.     # 可以移动光标的情况下
  383.     if self.active and @item_max >= 0 and @index >= 0
  384.       # 方向键下被按下的情况下
  385.       if Input.repeat?(Input::LEFT)#DOWN上
  386.         # 光标向下移动
  387.         $game_system.se_play($data_system.cursor_se)
  388.         @index = (@index-1+@item_max) % @item_max if @item_max != 0
  389.         update_help
  390.       end
  391.       # 方向键上被按下的情况下
  392.       if Input.repeat?(Input::RIGHT)#UP下
  393.         # 光标向上移动
  394.         $game_system.se_play($data_system.cursor_se)
  395.         @index = (@index+1+@item_max) % @item_max if @item_max != 0
  396.         update_help
  397.       end
  398.       
  399.       end
  400.     # 可以移动光标的情况下
  401.      if self.active and @item_max > 0 and @item_max <= 40 #and @index >= 0
  402.       # 方向键下被按下的情况下
  403.       if Input.repeat?(Input::DOWN)#DOWN上
  404.         # 光标向下移动
  405.         $game_system.se_play($data_system.cursor_se)
  406.         @index +=4 #(@index+1+@item_max) % @item_max if @item_max != 0
  407.         update_help
  408.       end
  409.     end
  410.       # 方向键上被按下的情况下
  411.       if self.active and @item_max <= 43 and @index<=40#@item_max
  412.       if Input.repeat?(Input::UP)#UP下
  413.         # 光标向上移动
  414.         $game_system.se_play($data_system.cursor_se)
  415.         @index -=4 #(@index-1+@item_max) % @item_max if @item_max != 0
  416.         update_help
  417.       end
  418.       
  419.     end
  420.   #  --------------------------------------------------------------------------
  421.     # 刷新帮助文本 (update_help 定义了继承目标)
  422.   
  423.    
  424.   #  def update_lrb
  425.   #  if RInput.trigger?(RInput::LEFT) and @caret_pos > 0
  426.   #    @caret_pos -= 1
  427.   #    return
  428.   #  end
  429.    # if RInput.trigger?(RInput::RIGHT) and @caret_pos < @text.size
  430.   #    @caret_pos += 1
  431.   #    return
  432. #   end
  433. # end
  434.   #------------------------------------------------------------------------------  
  435.    
  436.     if @help_window != nil and @ajsdgfshfajklshfa == nil
  437.       update_help
  438.       update_help
  439.       @ajsdgfshfajklshfa = true
  440.     end

  441.     # 刷新光标矩形
  442.     update_cursor_rect
  443.   end
  444.   

  445.   
  446.   def now_selected_troop
  447.     return @all_fighters[@index]
  448.   end
  449.   
  450.   #--------------------------------------------------------------------------
  451.   # ● 刷新帮助文本
  452.   #--------------------------------------------------------------------------
  453.   def update_help
  454.     #鲜辣煎鱼
  455.     @help_window.set_text( @index>-1 ? self.item : nil )
  456.    
  457.   end
  458. end
复制代码

[pre lang="ruby"]#==============================================================================
# ■ Window_Title_Command
#------------------------------------------------------------------------------
#  标题的主菜单。
#==============================================================================
#类窗口自定义战斗<基础窗口
class Window_CustomBattle < Window_Base  #
  attr_reader   :index           #属性读取器:索引
  attr_reader   :v_index         #属性读取器:v_索引
  attr_reader   :slide_over      #属性读取器:#滚动结束
  attr_reader   :item_max        #属性阅读器:项目最大值
  attr_reader   :second_index    #属性阅读器: 第二个索引
  #start load option exit
  #--------------------------------------------------------------------------
  # ● 初始化对像
  #     actor : 角色
  #--------------------------------------------------------------------------
  #定义初始化(索引=0,团队编号=5,点编号=10,玩家或敌人=0)
  def initialize(index=0,team_num = 5,spots_num = 10,player_or_enermy = 0)
    @index = index #@索引=索引
    @v_index = 0   #@v_索引=0
    #@玩家或敌人 = 玩家或敌人
    @player_or_enermy = player_or_enermy
   
    #@file_name
   
    #选项背景
    @button_base = Sprite.new #@按钮_底座=新的精灵
      if player_or_enermy == 0
       #@按钮_底座位图 = RPG::Cache.title("绿色背景图")
       @button_base.bitmap = RPG::Cache.title("selected-unites-base")
     else
       #@按钮_底座位图 = RPG::Cache.title("红色背景图")
      @button_base.bitmap = RPG::Cache.title("selected-unites-e-base")
      end        
   
    @button_base.x = origin_x
    @button_base.y = origin_y
   
    @finish_button = Sprite.new #@完成按钮=精灵.new
      #if player_or_enermy == 0
    #@完成按钮位图= RPG::Cache.title("完成")
    @finish_button.bitmap = RPG::Cache.title("bottom-button-1-basic")
     # else
    #  @finish_button.bitmap = RPG::Cache.title("bottom-button-1-basic-e")
     # end        
   
    @finish_button.x = origin_x + 16
    @finish_button.y = origin_y + 187
   
    @able = []#@表=[]
   
    @max_row = 2 #@最大行=2
    @bottom_buttons = [] #@底部按钮=[]
    @max_item_row_2 = 3 #@最大项目行2=3
    @delete_button = Sprite.new #@删除按钮=精灵新
    #@删除按钮位图=RPG::Cache.title("删除按钮")
    @delete_button.bitmap = RPG::Cache.title("bottom-button-2-basic")
    @delete_button.x = origin_x
    @delete_button.y = origin_y
    # @清空按钮=精灵.new
    @empty_button = Sprite.new
    # @清空按钮位图=  RPG::Cache.title("清空按钮")
    @empty_button.bitmap = RPG::Cache.title("bottom-button-3-basic")
    @empty_button.x = origin_x
    @empty_button.y = origin_y
   
    @bottom_buttons.push @finish_button# @底部按钮。按下完成按钮
    @bottom_buttons.push @delete_button# @底部按钮。按下删除按钮
    @bottom_buttons.push @empty_button # @底部按钮。按下清空按钮
   
    @second_index = @index #@第二个索引=@索引
   
    @cur_back = []                  #选项背景 = []
    @text_list = []                 #@文本列表=[]

    @groups = []                    #@组s=[]
    @group_text = []                #@组文本=[]
   
    @icons = []                     #@图标 = []
    @selected_units = []            #@选定的单位=[]
    for i in 0..team_num-1          #对于0中的我..团队编号-1
      @selected_units=[]         #@选定单位=[]
    end
   
    adj_x = 0                       # 调整_x=0
    adj_y = 0                       # 调整_y=0
    #光标
   
    @group_max = 5                  # @组最大值=5
    @item_max = spots_num           # @项目最大值=点数量 #=========================================
    for i in 0...@item_max          # 对于0中的i…@项目最大值
      @icons = Sprite.new        # @图标=精灵.new
      @cur_back = Sprite.new     #@选项背景= 精灵.new
      #if player_or_enermy == 0                小兵头像背景
      #@选项背景.位图 = RPG::Cache.title("黑色小方块")
       @cur_back.bitmap = RPG::Cache.title("unit-base-highlight")#+i.to_s)
      #else
      # @cur_back.bitmap = RPG::Cache.title("unit-base-highlight")#+i.to_s)
      #end
      if i == 100  # 如果 i == 10
      adj_y = 43  # 调整_x=0
      adj_x = -10 # 调整_y=0
    end
        #@选项背景.x = 原始_x+56+43*(i+调整_x)
        @cur_back.x = origin_x + 56+43*(i+adj_x)
        #@选项背景.y = 原始_y+98+调整_y
        @cur_back.y = origin_y + 98 + adj_y
        #@图标.x = 原始_x + 56+43*(i+调整_x)
        @icons.x = origin_x + 156+187*(i+adj_x)
        #@图标.y = 原始_y   + 98 + 调整_y
        @icons.y = origin_y + 98 + adj_y
      end
     for i in 0...@item_max        # 对于0中的i…@项目最大值         
      @icons = Sprite.new       # @图标=精灵.new
      @cur_back = Sprite.new    #@选项背景= 精灵.new
      #if player_or_enermy == 0                小兵头像背景
       #@选项背景.位图 = RPG::Cache.title("黑色小方块")
       @cur_back.bitmap = RPG::Cache.title("unit-base-highlight")#+i.to_s)
   
      if i == 10  # 如果 i == 10
      adj_y = 86  # 调整_x=0
      adj_x = -10 # 调整_y=0
    end
        #@选项背景.x = 原点_x + 56+43*(i+调整_x)
        @cur_back.x = origin_x + 56+43*(i+adj_x)
        #@选项背景.y = 原点_y + 141 + 调整_y
        @cur_back.y = origin_y + 141 + adj_y
        #@图标.x = 原点_x + 56+43*(i+调整_x)
        @icons.x = origin_x + 56+43*(i+adj_x)
        #@图标.y = 原点_y + 141 +    调整_y
        @icons.y = origin_y + 141 + adj_y
      end
      
      #teams
    for i in 0..@group_max-1 #对于0中的i..@组最大值-1
    @groups= Sprite.new   #@组s=精灵.new
      if @player_or_enermy == 0 #如果 @ 玩家 或 敌军 ==0
       #@组s位图 = RPG::Cache.title("小组按键绿底图")
       @groups.bitmap = RPG::Cache.title("team-basic")#+i.to_s)
     else#否则
      #@组s位图 = RPG::Cache.title("小组按键红底图")
       @groups.bitmap = RPG::Cache.title("enermy-basic")#+i.to_s)
      end   
    ##@组s.x = 原点_x + 16 + i*(56+3)
    @groups.x = origin_x + 16 + i*(56+3)
    #@组s.y = 原点_y + 120
    @groups.y = origin_y + 120
    @group_text= Sprite.new #组文本= 新的精灵
    # 组文本 位图 = RPG::Cache.title("队伍1---5"+(i+1).to_s)
    @group_text.bitmap = RPG::Cache.title("group"+(i+1).to_s)
     # 组文本 .x = 原点_x + 16 + i*(56+3)
    @group_text.x = origin_x + 16 + i*(56+3)
    # 组文本 .y = 原点_y + 120
    @group_text.y = origin_y + 120
    #@暗色 = 真
    @able = true
    end  
   
    #对于我在团队编号..@组最大值-1
    for i in team_num..@group_max-1
      disable_item(i) #禁用项目(i)
    end  
      
    super(0, 0, 0, 0)  #色调
    self.opacity = 0   #自己不透明度=0
    self.active = true #自己活动=真
  end
  def origin_x        # 定义原点x
    return 271
  end
  def origin_y
    return 205
  end
  #--------------------------------------------------------------------------
  # ● 一些方法的重载
  #--------------------------------------------------------------------------  
  def dispose #定义释放
    @button_base.dispose       # @按钮底座。释放
    @delete_button.dispose     # @删除_按钮.dispose
    @empty_button.dispose      # @清空按钮丢弃
    @finish_button.dispose     # @完成按钮.展开
    for i in 0...@item_max     # 对于0中的i…@项目最大值
      @cur_back.dispose     # @选页背景.dispose
      @icons.dispose        # @icons.dispose
    end
    for i in 0..@group_max-1   # 对于0中的i…@队组最大值
    @groups.dispose         # @队组s.释放
    @group_text.dispose     # @group_text.dispose
    end
    super
  end
  
  def z=(z)
    super(z)
    @delete_button.z=z+1
    @empty_button.z=z+1
    @button_base.z=z
    @finish_button.z=z+5
    for i in 0...@item_max
      @cur_back.z=z+1
      @icons.z=z+4
    end
    for i in 0..@group_max-1
    @groups.z=z+1
    @group_text.z=z+2
    end  
  end
  def x=(x)
    super(x)
    adj_x = 0
    @button_base.x=x+origin_x
    @delete_button.x=x+origin_x
    @empty_button.x=x+origin_x
    @finish_button.x=x+origin_x+15
    for i in 0...@item_max
      #@cur_back.x=x+origin_x
      if i == 5
      #adj_y = 43
      adj_x = -5
      end
        @cur_back.x = origin_x + 56+43*(i+adj_x) + x
        @icons.x = origin_x + 56+87*(i+adj_x) + x + 5
        #
    end
    for i in 0..@group_max-1
    @groups.x=x + 16 + i*(56+3) + origin_x
    @group_text.x=x + 16 + i*(56+3) + origin_x
    end  
  end #
  
  def y=(y)
    super(y)
    adj_y = 0
    @button_base.y=y
    @delete_button.y=y
    @empty_button.y=y
    @finish_button.y=y+origin_y-15 #+190
    for i in 0...@item_max
      if i == 5
      adj_y = 43
      #adj_x = -5
      end
        @cur_back.y = 98 + adj_y + y
        @icons.y = 98 + adj_y + y + 5
    end
    for i in 0..@group_max-1
      
    @groups.y=y + 49
    @group_text.y=y + 49
    end  
  end  
  def visible=(visible)
    super(visible)
    @button_base.visible = visible
    @delete_button.visible = visible
    @empty_button.visible = visible
    @finish_button.visible = visible
    for i in 0...@item_max
      @cur_back.visible = visible
       @icons.visible = visible
    end
    for i in 0..@group_max-1
    @groups.visible = visible
    @group_text.visible = visible
    end  
  end
  def contents_opacity=(opacity)
    super(opacity)
    @button_base.opacity = opacity
    @delete_button.opacity = opacity
    @empty_button.opacity = opacity
    @finish_button.opacity = opacity
    for i in 0...@item_max
      @cur_back.opacity = opacity
      @icons.opacity = opacity
    end
    for i in 0..@group_max-1
    @groups.opacity = opacity
    @group_text.opacity = opacity
    end  
  end
  def index=(index)
    @index=index
  end
  def disable_item(i)
    @able = false
      if @player_or_enermy == 0
       @groups.bitmap = RPG::Cache.title("team-disable")#+i.to_s)
      else
       @groups.bitmap = RPG::Cache.title("enermy-disable")#+i.to_s)
      end      
   
    @group_text.bitmap = RPG::Cache.title("group"+(i+1).to_s+"-d")
  end

  def back_normal(index)
    #p index
   if @v_index == 0
      if index != -1
        if @player_or_enermy == 0
         @groups[index].bitmap = RPG::Cache.title("team-basic")#+i.to_s)
        else
         @groups[index].bitmap = RPG::Cache.title("enermy-basic")#+i.to_s)
        end              
      
       @group_text[index].bitmap = RPG::Cache.title("group"+(index+1).to_s)
      end
     @second_index = -1
     for i in 0..@max_item_row_2-1
        @bottom_buttons.bitmap = RPG::Cache.title("bottom-button-"+(i+1).to_s+"-basic")#+i.to_s)
     end
    else
     @bottom_buttons[index].bitmap = RPG::Cache.title("bottom-button-"+(index+1).to_s+"-basic")#+i.to_s)
    end
  end
  #--------------------------------------------------------------------------
  # ● 更新光标矩形
  #--------------------------------------------------------------------------
  def update_cursor_rect
    if @v_index == 0
      # 光标位置不满 0 的情况下
      if @index < 0
        for i in 0...@item_max
          back_normal(i)
        end
        return
      end
        if @player_or_enermy == 0
         @groups[@index].bitmap = RPG::Cache.title("team-highlight")#+i.to_s)
        else
         @groups[@index].bitmap = RPG::Cache.title("enermy-highlight")#+i.to_s)
        end        
      
      @group_text[@index].bitmap = RPG::Cache.title("group"+(index+1).to_s+"-l")
    else #level 2
      
      if @second_index < 0
        for i in 0..@max_item_row_2-1
          back_normal(i)
        end
        return
      end
      #p @index,@second_index                                 
     # @second_index%=2                                            完成
      @bottom_buttons[@second_index].bitmap = RPG::Cache.title("bottom-button-"+(@second_index+1).to_s+"-l")#+i.to_s)

      
      
      
      
    end
  end
  #--------------------------------------------------------------------------
  # ● 刷新画面
  #--------------------------------------------------------------------------
  def update
    if self.active
      if Input.repeat?(Input::DOWN)
        $game_system.se_play($data_system.cursor_se)
      
        @v_index = (@v_index+1)%@max_row
        #@last_index = @index
        if @v_index == 0
           #back_normal(@second_index)
          @second_index = -1
          for i in 0..@max_item_row_2-1
          back_normal(i)
          end
        else
          #back_normal(@index)
          @second_index = 1
          #@index%=@max_item_row_2
           if @player_or_enermy == 0
           @groups[@index].bitmap = RPG::Cache.title("team-basic")#+i.to_s)
          else
           @groups[@index].bitmap = RPG::Cache.title("enermy-basic")#+i.to_s)
          end         
        end  
        refresh
      end
      
      if Input.repeat?(Input::UP)
        $game_system.se_play($data_system.cursor_se)
        #back_normal(@index)
        @v_index = (@v_index-1)%@max_row
       # @last_index = @index
        if @v_index == 0
           #back_normal(@second_index)
          @second_index = -1
          for i in 0..@max_item_row_2-1
          back_normal(i)
          end
        else
          #back_normal(@index)
          @second_index = 1
          #@index%=@max_item_row_2
           if @player_or_enermy == 0               #队伍1-5背景
           @groups[@index].bitmap = RPG::Cache.title("team-basic")#+i.to_s)
          else                                    # 敌人队伍1-5背景
           @groups[@index].bitmap = RPG::Cache.title("enermy-basic")#+i.to_s)
          end              
        end  
        refresh
      end
    if @v_index == 0
      # 方向键左被按下的情况下
      if Input.repeat?(Input::RIGHT)
        $game_system.se_play($data_system.cursor_se)
        back_normal(@index)
        @index = (@index+1)%@group_max
        until @able[@index]
          @index = (@index+1)%@group_max
        end
        refresh
      end
      # 方向键右被按下的情况下
      if Input.repeat?(Input::LEFT)
        $game_system.se_play($data_system.cursor_se)
        back_normal(@index)
        @index = (@index+@item_max-1)%@group_max
        until @able[@index]
          @index = (@index+@item_max-1)%@group_max
        end
        refresh
      end
    else # level 2
      # 方向键左被按下的情况下
      if Input.repeat?(Input::RIGHT)
        $game_system.se_play($data_system.cursor_se)
        back_normal(@second_index)
        @second_index = (@second_index+1)%@max_item_row_2
        #p @second_index
        refresh
      end
      # 方向键右被按下的情况下
      if Input.repeat?(Input::LEFT)
        $game_system.se_play($data_system.cursor_se)
        back_normal(@second_index)
        @second_index = (@second_index-1)%@max_item_row_2
        refresh
      end
    end   # @v_index == 0
      
      

      
      
      
    end   
   
      update_cursor_rect #if @slide_over
  end
  #--------------------------------------------------------------------------
  # ● 获取东西
  #--------------------------------------------------------------------------
  def item_num(index = @index) # 定义项目 (索引=@索引)
    return @selected_units[@index].size
  end
  def set_units(a)
    @selected_units = a
  end  
  #--------------------------------------------------------------------------
  # ● 更新内容
  #--------------------------------------------------------------------------
  def refresh
    for i in 0...@item_max
      @icons.bitmap = nil
    end
    #对于i,单位为0..@选定的单位[@索引]。大小-1
    for i in 0..@selected_units[@index].size-1
      @icons.bitmap = RPG::Cache.icon(Figter_data::CHARACTER_NAME[@selected_units[@index]])
      #p Figter_data::CHARACTER_NAME[twoArray[@index]]
    end
   
  end
  
  #--------------------------------------------------------------------------
  # ● 删除士兵
  #--------------------------------------------------------------------------
  def delete_last_troop
    @selected_units[@index].pop
    refresh
  end
  #--------------------------------------------------------------------------
  # ● 清空士兵
  #--------------------------------------------------------------------------  
  def empty_troops
    @selected_units[@index]=[]
    refresh
  end
  

  
end[/pre]
[pre lang="ruby"] class Scene_Map
def command_custom_battle#定义命令_自定义战斗
    # 演奏确定 SE
    $game_system.se_play($data_system.decision_se)
     #$游戏系统。se播放($数据系统。未指定文件或目录
   
    choose_map_main#选择主地图
# map_info = $custom_battle_next_map_id#@map_info#地图信息=@地图信息
  #如果选择随机地图随机士兵
# if ! @force_back and map_info[0] == -1#如果!@强制返回并地图信息[0]==-1
#   make_random_efs_game#生成随机efs_game
#   return
# end
#---------------------------------------------------- ↑↓   
    #如果@强制后退或@强制后退==无
    if ! @force_back or @force_back == nil
    #自定义主战场(0,@地图信息[1],@地图信息[2])
    custom_battle_main(0,@map_info[1],@map_info[2])
    #团队选定部队=@选定部队
    team_selected_troops = @selected_units

    #如果@强制后退或@强制后退==无
    if ! @force_back or @force_back == nil
      #自定义主战场(1,@地图信息[1],@地图信息[2])
      custom_battle_main(1,@map_info[1],@map_info[2])
      #敌人选定部队=@选定部队
      if $game_switches[18] == true
      #true是打开,false是关闭
      #敌军enermy精选部队
      
      enermy_selected_troops =[[5,21],[18,21,21],[19,21],[21,21,21],[16,21,21,21,21] ] #@selected_units

      
      # @group_one.x = 928
     
    #  @group_one.y = 544
    #  @group_two.x = 1248
    #  @group_two.y = 640
     
      end
      if $game_switches[19] == true
      enermy_selected_troops =[ [5,5],[5,5,5],[5,5],[5,5,5],[5,5,5,5,5] ]
      end
      #如果@强制后退或@强制后退==无
      if ! @force_back or @force_back == nil
        choose_hero_main#选择英雄主
        selected_hero = nil
        #selected_hero = @selected_hero#选定的英雄=@选定的英雄
        #如果@强制后退或@强制后退==无
        if ! @force_back or @force_back == nil
         
        team_army = Game_Army_Slg.new(0)
        #enermy军队
        enermy_army = Game_Army_Slg.new(1)
        team_army.create_empty_army
        enermy_army.create_empty_army
        #team_army.load_twoD_Array(team_selected_troops,selected_hero)
        team_army.load_twoD_Array(team_selected_troops,selected_hero)
        enermy_army.load_twoD_Array(enermy_selected_troops)
       # 切换地图画面
      #
        team_army.set_groups_name#团队军队。设置团队名称
        
        #$自定义战斗下一个战斗者团队=团队军队
        $custom_battle_next_fighter_team = team_army
        #$自定义战斗下一个战斗者敌军=敌军军队
        $custom_battle_next_fighter_enermy = enermy_army
        #$自定义战斗下一个地图ID=16
        $custom_battle_next_map_id = 16#map_info[0]
       #if $game_switches[19] == true
       # a = [1, 2, 3, 5, 8]
       # $custom_battle_next_map_id  = a[rand(a.size)]
       # end
        $game_party.setup_starting_members#游戏部分设置启动成员
        
        
        
    # 设置初期位置的地图##############1356622
       $game_map.setup(5)
    # 主角向初期位置移动
        $game_player.moveto(0, 0)
        
        
    # 刷新主角
        $game_player.refresh
    # 执行地图设置的 BGM 与 BGS 的自动切换
        $game_map.autoplay
        
        
        
        
    # 刷新地图 (执行并行事件)
        $game_map.update
    # 切换地图画面
        $scene = Scene_Map.new
      
         # $scene = Scene_Map.new
          #efs_title_main
         
         else # fourth
        @force_back = false#@强制后退=错误
        Graphics.update #图形更新
        efs_title_update#EFS标题更新
        end   
         
           
      else # third
      @force_back = false#@强制后退=错误
      Graphics.update#图形更新
      efs_title_update#EFS标题更新
      end   
    else # second
    @force_back = false#@强制后退=错误
    Graphics.update#图形更新
    efs_title_update#EFS标题更新
    end
  
   else #1st
     @force_back = false#@强制后退=错误
     Graphics.update#图形更新
     efs_title_update#EFS标题更新
   end

  end
end  [/pre]
[pre lang="ruby"]module Figter_data#::ALL_SOLDIER
  
  #所有士兵
  ALL_SOLDIER =[5,4,3,13,2,9,11,15,26,23,   #帝国
  
  32,35,36,28,30,33,34, #诺尔森人
  
  7,8,19,12,31,38,17, #雇佣兵
  27,6,10,14,16,18,21,22,29,39] #野怪
  #所有英雄
  ALL_HERO = [ 20,24,25,37]
  
  
  
  
  
end  [/pre]
[pre lang="ruby"]module Figter_data
  
data_id = 4
#=====基本、模型信息==========
CHARACTER_NAME[data_id]  =  "E_ManAtArm"    #头像模型名字
ATK_SE[data_id]  = "spearbasic_0"     #攻击音效 (击中)
ATK_SE_NUM[data_id]  = 9              #攻击音效数量
DEF_SE[data_id] = "shield_wood_wood_0"
DEF_SE_NUM[data_id] = 9
S_ATK_SE[data_id]  = nil              #远程攻击音效 (击中)
S_ATK_SE_NUM[data_id]  = nil          #远程攻击音效数量
AMMO_NAME[data_id]  =    nil          #弹药模型名字
AMMO_D_NAME[data_id]  = nil           #落地后的弹药模型名字
S_SHOOT_SE[data_id] = nil             #射击音效
S_SHOOT_SE_NUM[data_id] = nil         #射击音效数量
S_PASSBY_SE[data_id] = nil
S_PASSBY_SE_NUM[data_id] = nil
S_DROP_SE[data_id] = nil
S_DROP_SE_NUM[data_id] = nil
S_FLY_TYPE[data_id] = nil
#=======类别=================
THE_NAME[data_id]  = "帝国军士"       #显示名字
IS_CAL[data_id]  =   false            #是骑兵吗
IS_ARC[data_id]  =   false            #是远程兵吗
HEAVY[data_id]  =    false            #是重装兵吗
LABEL[data_id] = 1                    #兵种标签
DESCRIPTION[data_id] = "赫西帝国步兵,中装步兵,配有克制骑兵的长矛,制式盾牌"
#==========属性==============
HP_MAX[data_id]  =   375              #血量上限
AMMOR_HP[data_id]  = 30               #护甲值
SHD_HP[data_id]  =   25               #盾甲值
BASE_ATK[data_id]  = 65               #基本攻击力
BRO_ATK[data_id]  =  10               #破甲攻击力
S_BASE_ATK[data_id] = 0               #远程基本攻击力
S_BRO_ATK[data_id]  = 0               #远程破甲攻击力
ATK_SKILL[data_id] = 25               #攻击技巧
DEF_SKILL[data_id] = 35               #防御技巧
ANTI_CAV[data_id]  = 75               #反骑兵伤害加成
ANTI_INF[data_id]  = 0                #反步兵伤害加成
CHARGE_BOUN[data_id]=30               #冲锋加成
MORALE[data_id]  =   50               #士气 (100max)
CRITICAL_HIT[data_id] = 10            #暴击率
EXPLOSION_SETTINGS[data_id] = nil     #伤害是否有爆破特效,若有则设置
                                      #(中心X,中心Y,中心伤害,范围,施放者,队伍不受(0是所有人受)是否留垃圾
ATK_FR[data_id] = 30                  #攻击频率
ATK_RANGE[data_id]  =  1              #攻击范围
ENGAGE_RANGE[data_id]  =  1           #交战范围
ENGAGE_RANGE_MIN[data_id]  =  1
MOVEMENT_SPEED[data_id]  =  3         #移动速度
ACCURATCY[data_id]  = 100             #精确度

LIVE_CHANCE[data_id]  = 20            #生还几率
AMMO_MAX[data_id] = 0                 #弹药上线

ATK_CODE[data_id] = nil               #特殊代码(攻击后执行)

#===========战略用=============
EXP[data_id]  =      2                #击杀获得经验
PRICE[data_id]  =    100              #价格
EXP_NEED[data_id]  = 10               #升级所需经验
NEXT_LEVEL[data_id]  = [9]            #下一阶兵种
CAPTAIN_SKILL[data_id]  = nil

end
[/pre]
人物模型.png
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部