设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 477|回复: 0
打印 上一主题 下一主题

[讨论] ai给我写的脚本 强大

[复制链接]

Lv4.逐梦者

梦石
0
星屑
7927
在线时间
1358 小时
注册时间
2015-8-15
帖子
755
跳转到指定楼层
1
发表于 2024-8-18 11:29:36 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
RUBY 代码复制
  1. module Figter_data
  2.   # ...(‌保留你已有的代码)‌
  3. data_id = 0
  4. #=====基本、模型信息==========
  5. CHARACTER_NAME = []  
  6. AMMO_NAME = []
  7. AMMO_D_NAME = []
  8. ATK_SE = []
  9. ATK_SE_NUM = []
  10. DEF_SE = []
  11. DEF_SE_NUM = []
  12. S_ATK_SE = []
  13. S_ATK_SE_NUM = []
  14. S_SHOOT_SE = []
  15. S_SHOOT_SE_NUM = []
  16. S_PASSBY_SE = []
  17. S_PASSBY_SE_NUM = []
  18. S_DROP_SE = []
  19. S_DROP_SE_NUM = []
  20.  
  21. DEAD_ANIMATION_ID = []
  22. S_FLY_TYPE = []
  23. #=======类别=================
  24. THE_NAME = []
  25. IS_CAL = []
  26. IS_ARC = []
  27. IS_OBJ= []
  28. HEAVY = []
  29. LABEL =[]
  30. DESCRIPTION = []
  31. #1 light infan #2 heavy infan #3 light cav #4 heavy cav
  32. #5 missle_inf  #6 missle_cav  #7 elite  #8 special
  33. #==========属性==============
  34. HP_MAX = []
  35. AMMOR_HP = []
  36. SHD_HP = []
  37. BASE_ATK = []
  38. BRO_ATK = []
  39. S_BASE_ATK = []
  40. S_BRO_ATK = []
  41. ATK_SKILL = []
  42. DEF_SKILL = []
  43. ANTI_CAV = []
  44. ANTI_INF = []
  45. CHARGE_BOUN = []
  46. MORALE = []
  47. CRITICAL_HIT = []
  48.  
  49. EXPLOSION_SETTINGS = []
  50.  
  51. JINGONG_SETTINGS = []
  52.  
  53.  
  54. ATK_FR = []
  55. ATK_RANGE = []         
  56. ENGAGE_RANGE = []     
  57. ENGAGE_RANGE_MIN = []
  58. MOVEMENT_SPEED = []
  59. ACCURATCY = []
  60. AMMO_MAX = []
  61.  
  62. LIVE_CHANCE = []
  63.  
  64. ATK_CODE = []
  65.  
  66.  
  67. #===========战略用=============
  68. EXP = []
  69. PRICE = []
  70. EXP_NEED = []
  71. NEXT_LEVEL = []
  72. CAPTAIN_SKILL = []
  73. #==========Hero's only==============
  74. SP_MAX = []
  75. #加速量
  76. ACC_VALUE = []
  77. #防御减少量
  78. GUARD_VALUE = []
  79. #加速消耗体力(每帧)
  80. ACC_COST_SP = []
  81. #跳越消耗体力
  82. JUMP_COST_SP = []
  83. #大跳越消耗体力
  84. BIG_JUMP_COST_SP = []
  85. #恢复体力没帧(每帧)
  86. SP_REGAINED = []
  87. #攻击体力消耗
  88. ATK_COST_SP = []
  89. #英雄攻击呻吟
  90. HERO_ATK_SE = []
  91. HERO_ATK_SE_NUM = []
  92. #英雄死亡呻吟
  93. HERO_DEAD_SE = []
  94. HERO_DEAD_SE_NUM = []
  95. #英雄受伤呻吟
  96. HERO_GET_HIT_SE = []
  97. HERO_GET_HIT_SE_NUM = []
  98.   # 装备位置定义
  99.  
  100.  
  101.   # 装备位置定义
  102.   WEAPON_SLOT = 0
  103.   HELMET_SLOT = 1
  104.   ARMOR_SLOT = 2
  105.   BOOTS_SLOT = 3
  106.   BOOK_SLOTS = (4..12).to_a # 书籍占据9个位置,‌从索引4开始
  107.  
  108.   # 装备数组,‌用于存储角色的装备
  109.   equipment = []
  110.  
  111.   # 初始化装备数组
  112.   def initialize_equipment
  113.     equipment.clear
  114.     equipment.fill(nil, 0, equipment.size)
  115.   end
  116.  
  117.   # 添加装备的方法
  118.   def add_equipment(slot, item)
  119.     equipment[slot] = item
  120.   end
  121.  
  122.   # 获取装备的方法
  123.   def get_equipment(slot)
  124.     equipment[slot]
  125.   end
  126.  
  127.   # 检查装备位置是否为空
  128.   def equipment_slot_empty?(slot)
  129.     equipment[slot].nil?
  130.   end
  131.  
  132.   # 示例:‌给角色添加武器、‌防具和书籍
  133.   def equip_character(weapon, helmet, armor, boots, books)
  134.     add_equipment(WEAPON_SLOT, weapon)
  135.     add_equipment(HELMET_SLOT, helmet)
  136.     add_equipment(ARMOR_SLOT, armor)
  137.     add_equipment(BOOTS_SLOT, boots)
  138.     books.each_with_index do |book, index|
  139.       add_equipment(BOOK_SLOTS[index], book)
  140.     end
  141.   end
  142.  
  143.   # ...(‌其他代码)‌
  144. end


原来的脚本
RUBY 代码复制
  1. module Figter_data
  2.   #
  3. data_id = 0
  4. #=====基本、模型信息==========
  5. CHARACTER_NAME = []  
  6. AMMO_NAME = []
  7. AMMO_D_NAME = []
  8. ATK_SE = []
  9. ATK_SE_NUM = []
  10. DEF_SE = []
  11. DEF_SE_NUM = []
  12. S_ATK_SE = []
  13. S_ATK_SE_NUM = []
  14. S_SHOOT_SE = []
  15. S_SHOOT_SE_NUM = []
  16. S_PASSBY_SE = []
  17. S_PASSBY_SE_NUM = []
  18. S_DROP_SE = []
  19. S_DROP_SE_NUM = []
  20.  
  21. DEAD_ANIMATION_ID = []
  22. S_FLY_TYPE = []
  23. #=======类别=================
  24. THE_NAME = []
  25. IS_CAL = []
  26. IS_ARC = []
  27. IS_OBJ= []
  28. HEAVY = []
  29. LABEL =[]
  30. DESCRIPTION = []
  31. #1 light infan #2 heavy infan #3 light cav #4 heavy cav
  32. #5 missle_inf  #6 missle_cav  #7 elite  #8 special
  33. #==========属性==============
  34. HP_MAX = []
  35. AMMOR_HP = []
  36. SHD_HP = []
  37. BASE_ATK = []
  38. BRO_ATK = []
  39. S_BASE_ATK = []
  40. S_BRO_ATK = []
  41. ATK_SKILL = []
  42. DEF_SKILL = []
  43. ANTI_CAV = []
  44. ANTI_INF = []
  45. CHARGE_BOUN = []
  46. MORALE = []
  47. CRITICAL_HIT = []
  48.  
  49. EXPLOSION_SETTINGS = []
  50.  
  51. JINGONG_SETTINGS = []
  52.  
  53.  
  54. ATK_FR = []
  55. ATK_RANGE = []         
  56. ENGAGE_RANGE = []     
  57. ENGAGE_RANGE_MIN = []
  58. MOVEMENT_SPEED = []
  59. ACCURATCY = []
  60. AMMO_MAX = []
  61.  
  62. LIVE_CHANCE = []
  63.  
  64. ATK_CODE = []
  65.  
  66.  
  67. #===========战略用=============
  68. EXP = []
  69. PRICE = []
  70. EXP_NEED = []
  71. NEXT_LEVEL = []
  72. CAPTAIN_SKILL = []
  73. #==========Hero's only==============
  74. SP_MAX = []
  75. #加速量
  76. ACC_VALUE = []
  77. #防御减少量
  78. GUARD_VALUE = []
  79. #加速消耗体力(每帧)
  80. ACC_COST_SP = []
  81. #跳越消耗体力
  82. JUMP_COST_SP = []
  83. #大跳越消耗体力
  84. BIG_JUMP_COST_SP = []
  85. #恢复体力没帧(每帧)
  86. SP_REGAINED = []
  87. #攻击体力消耗
  88. ATK_COST_SP = []
  89. #英雄攻击呻吟
  90. HERO_ATK_SE = []
  91. HERO_ATK_SE_NUM = []
  92. #英雄死亡呻吟
  93. HERO_DEAD_SE = []
  94. HERO_DEAD_SE_NUM = []
  95. #英雄受伤呻吟
  96. HERO_GET_HIT_SE = []
  97. HERO_GET_HIT_SE_NUM = []
  98.  
  99.  
  100.  
  101. end
您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-12-23 00:39

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表