Project1

标题: XP探查技能移植到VA 10VIP [打印本页]

作者: j296196585    时间: 2017-7-1 15:15
标题: XP探查技能移植到VA 10VIP
RUBY 代码复制
  1. #==============================================================================
  2. #   探查技能  BY绿发的Eclair
  3. #------------------------------------------------------------------------------  
  4. #   使用方法:在数据库中设定一个叫“探查”的状态(想要用别的名字在下面改啦~)
  5. #   然后把想要做成有探查效果的特技或物品附加这个状态。就这样简单~~
  6. #   修改自然属性的个数在第16行。
  7. #==============================================================================
  8. #   探查技能加强  BY snstar2006
  9. #------------------------------------------------------------------------------  
  10. #   加强部分:
  11. #   1. 敌人的属性为[王]的话,HP和SP不会显示,直到HP少於一半才会显示。
  12. #      [王]的属性ID为夹在自然属性和种族属性中间的属性
  13. #   2. 用变数做技能等级,可以直接用事件升级、降级。
  14. #   3. 可以设置不同能力所需要的等级。等级不够时显示为????。
  15. #==============================================================================
  16. $探查状态名 = "探查"         # 探查状态的名字
  17. $eye_level = 1               # 探查技能等级的变数ID
  18.  
  19. # 探查能力的等级
  20. $eye_level_ability = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
  21. # 依次为:
  22. # 0->名称 、1->HP+SP、2->HP+SP Max、3->种族、
  23. # 4->经验 、5->金钱 、6->掉落物   、7->攻击、
  24. # 8->物防 、9->魔防 、10->力量    、11->灵巧、
  25. # 12->速度、13->魔力、14->属性有效度
  26.  
  27. $text_4_unknown = "????" # 未知时的文字
  28.  
  29. class Window_cateyes < Window_Base
  30.   def initialize
  31.     super(120,40,400,400)
  32.     self.contents = Bitmap.new(width - 32, height - 32)
  33.     self.visible = false
  34.     self.z = 9999
  35.     self.back_opacity = 160  #信息窗口的透明度
  36.     [url=home.php?mod=space&uid=12971]@element[/url]          = 8    #自然属性个数
  37.   end
  38.   def set_target(target)
  39.     self.contents.clear
  40.     self.visible = true
  41.     @target = target
  42.  
  43.     # 检验是否显示HP/SP
  44.     if @target.element_rate(@element+1) > 100
  45.       if (@target.hp)<=(@target.maxhp/2)
  46.         @show_hsp = true
  47.       else
  48.         @show_hsp = false
  49.       end
  50.     else
  51.       @show_hsp = true
  52.     end
  53.  
  54.     if $game_variables[$eye_level] >= $eye_level_ability[0]
  55.       self.contents.draw_text(10,10,360-32,32,"#{@target.name}",0)
  56.     else
  57.       self.contents.draw_text(10,10,360-32,32,$text_4_unknown,0)
  58.     end
  59.  
  60.     # 描绘HP
  61.     draw_actor_hp(@target,10,100 - 32 - 25,160)
  62.     # 描绘SP
  63.     draw_actor_sp(@target,10,100 - 32,160)
  64.  
  65.     # 描绘种族
  66.     self.contents.font.color = system_color
  67.     self.contents.draw_text(10,100,180,32,"种族",0)
  68.     self.contents.font.color = normal_color
  69.     for i in [url=home.php?mod=space&uid=12971]@element[/url] + 2..$data_system.elements.size - 1
  70.       if @target.element_rate(i) > 100
  71.         race = $data_system.elements[i]
  72.         break
  73.       end
  74.     end
  75.     if $game_variables[$eye_level] >= $eye_level_ability[3]
  76.       self.contents.draw_text(70,100,100,32,race,2)
  77.     else
  78.       self.contents.draw_text(70,100,100,32,$text_4_unknown,2)
  79.     end
  80.  
  81.     # 目标是敌方角色的场合
  82.     if @target.is_a?(Game_Enemy)
  83.       # 描绘经验
  84.       self.contents.font.color = system_color  
  85.       self.contents.draw_text(190,100 - 32 - 25,180-32,32,"经验",0)
  86.       self.contents.font.color = normal_color
  87.       if $game_variables[$eye_level] >= $eye_level_ability[4]
  88.         self.contents.draw_text(190,100 - 32 - 25,180 - 32,32,"#{@target.exp}",2)
  89.       else
  90.         self.contents.draw_text(190,100 - 32 - 25,180 - 32,32,$text_4_unknown,2)
  91.       end
  92.       # 描绘金钱
  93.       self.contents.font.color = system_color  
  94.       self.contents.draw_text(190,100 - 32 ,180-32,32,$data_system.words.gold,0)
  95.       self.contents.font.color = normal_color
  96.       if $game_variables[$eye_level] >= $eye_level_ability[5]
  97.         self.contents.draw_text(190,100 - 32,180-32,32,"#{@target.gold}",2)
  98.       else
  99.         self.contents.draw_text(190,100 - 32,180-32,32,$text_4_unknown,2)
  100.       end
  101.       # 描绘掉落物
  102.       self.contents.font.color = system_color  
  103.       self.contents.draw_text(190,100 ,180,32,"掉落",0)
  104.       self.contents.font.color = normal_color
  105.       if $game_variables[$eye_level] >= $eye_level_ability[6]
  106.         draw_item_name($data_items[@target.item_id],197,57 + 25 + 25 + 25) if @target.item_id > 0
  107.         draw_item_name($data_weapons[@target.weapon_id],197,57 + 25 + 25 + 25) if @target.weapon_id > 0
  108.         draw_item_name($data_armors[@target.armor_id],197,57 + 25 + 25 + 25) if @target.armor_id > 0
  109.       else
  110.         self.contents.draw_text(197,57 + 75,180-32,32,$text_4_unknown,2)
  111.       end
  112.     end
  113.  
  114.     # 描绘攻击
  115.     if $game_variables[$eye_level] >= $eye_level_ability[7]
  116.       draw_actor_parameter(@target, 10, 112 + 20, 0)
  117.     else
  118.       draw_actor_parameter_u(10, 112 + 20, 0)
  119.     end
  120.     # 描绘物理防御
  121.     if $game_variables[$eye_level] >= $eye_level_ability[8]
  122.       draw_actor_parameter(@target, 10, 144 + 20, 1)
  123.     else
  124.       draw_actor_parameter_u(10, 144 + 20, 1)
  125.     end
  126.     # 描绘魔法防御
  127.     if $game_variables[$eye_level] >= $eye_level_ability[9]
  128.       draw_actor_parameter(@target, 10, 176 + 20, 2)
  129.     else
  130.       draw_actor_parameter_u(10, 176 + 20, 2)
  131.     end
  132.     # 描绘力量
  133.     if $game_variables[$eye_level] >= $eye_level_ability[10]
  134.       draw_actor_parameter(@target, 10, 208 + 20, 3)
  135.     else
  136.       draw_actor_parameter_u(10, 208 + 20, 3)
  137.     end
  138.     # 描绘灵巧
  139.     if $game_variables[$eye_level] >= $eye_level_ability[11]
  140.       draw_actor_parameter(@target, 10, 240 + 20, 4)
  141.     else
  142.       draw_actor_parameter_u(10, 240 + 20, 4)
  143.     end
  144.     # 描绘速度
  145.     if $game_variables[$eye_level] >= $eye_level_ability[12]
  146.       draw_actor_parameter(@target, 10, 272 + 20, 5)
  147.     else
  148.       draw_actor_parameter_u(10, 272 + 20, 5)
  149.     end
  150.     # 描绘魔力
  151.     if $game_variables[$eye_level] >= $eye_level_ability[13]
  152.       draw_actor_parameter(@target, 10, 304 + 20, 6)
  153.     else
  154.       draw_actor_parameter_u(10, 304 + 20, 6)
  155.     end
  156.  
  157.     # 描绘属性抵抗度
  158.     self.contents.font.color = system_color
  159.     self.contents.draw_text(190,153 + 12,180,32,"属性抵抗",0)
  160.     self.contents.font.color = normal_color
  161.     num = @element_max == 0 ? $data_system.elements.size : @element_max
  162.     y = 0
  163.     weaker = ""
  164.     weak = ""
  165.     resist = ""
  166.     guard = ""
  167.     recover = ""
  168.     race = ""
  169.     for i in 1..@element
  170.       case @target.element_rate(i)
  171.       when 151..200
  172.         weaker += $data_system.elements[i]
  173.       when 101..150
  174.         weak +=   $data_system.elements[i]
  175.       when 1..99
  176.         resist += $data_system.elements[i]
  177.       when 0
  178.         guard += $data_system.elements[i]
  179.       when -200..-1
  180.         recover += $data_system.elements[i]
  181.       end
  182.     end
  183.     if $game_variables[$eye_level] >= $eye_level_ability[14]
  184.       if weaker != ""
  185.         weaker += "超弱"
  186.         self.contents.draw_text(190,153 + 32+ 12,180,32,weaker,0)
  187.         y += 1
  188.       end
  189.       if weak != ""
  190.         weak += "弱点"
  191.         self.contents.draw_text(190,153 + 32+ 12 + 32 * y,180,32,weak,0)
  192.         y += 1
  193.       end
  194.       if resist != ""
  195.         resist += "抵抗"
  196.         self.contents.draw_text(190,153 + 32+ 12 + 32 * y,180,32,resist,0)
  197.         y += 1
  198.       end
  199.       if guard != ""
  200.         guard += "无效"
  201.         self.contents.draw_text(190,153 + 32+ 12 + 32 * y,180,32,guard,0)
  202.         y += 1
  203.       end
  204.       if recover != ""
  205.         recover += "吸收"
  206.         self.contents.draw_text(190,153 + 32+ 12 + 32 * y,180,32,recover,0)
  207.       end
  208.     else
  209.       self.contents.draw_text(190,153 + 32+ 12 + 32 * y,180,32,$text_4_unknown,0)
  210.     end
  211.  
  212.   end
  213.   def draw_item_name(item, x, y)
  214.     if item == nil
  215.       return
  216.     end
  217.     bitmap = RPG::Cache.icon(item.icon_name)
  218.     self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
  219.     self.contents.font.color = normal_color
  220.     self.contents.draw_text(x + 28, y, 150, 32, item.name)
  221.   end
  222.  
  223.   def draw_actor_parameter_u(x, y, type)
  224.     case type
  225.     when 0
  226.       parameter_name = $data_system.words.atk
  227.     when 1
  228.       parameter_name = $data_system.words.pdef
  229.     when 2
  230.       parameter_name = $data_system.words.mdef
  231.     when 3
  232.       parameter_name = $data_system.words.str
  233.     when 4
  234.       parameter_name = $data_system.words.dex
  235.     when 5
  236.       parameter_name = $data_system.words.agi
  237.     when 6
  238.       parameter_name = $data_system.words.int
  239.     end
  240.     self.contents.font.color = system_color
  241.     self.contents.draw_text(x, y, 120, 32, parameter_name)
  242.     self.contents.font.color = normal_color
  243.     self.contents.draw_text(x + 120, y, 36, 32, $text_4_unknown, 2)
  244.   end
  245.   def draw_actor_hp(actor, x, y, width = 144)
  246.     # Draw "HP" text string
  247.     self.contents.font.color = system_color
  248.     self.contents.draw_text(x, y, 32, 32, $data_system.words.hp)
  249.     # Calculate if there is draw space for MaxHP
  250.     if width - 32 >= 108
  251.       hp_x = x + width - 108
  252.       flag = true
  253.     elsif width - 32 >= 48
  254.       hp_x = x + width - 48
  255.       flag = false
  256.     end
  257.     # Draw HP
  258.     self.contents.font.color = actor.hp == 0 ? knockout_color :
  259.       actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
  260.     if $game_variables[$eye_level] >= $eye_level_ability[1] and @show_hsp
  261.       self.contents.draw_text(hp_x, y, 48, 32, actor.hp.to_s, 2)
  262.     else
  263.       self.contents.draw_text(hp_x, y, 48, 32, $text_4_unknown, 2)
  264.     end
  265.     # Draw MaxHP
  266.     if flag
  267.       self.contents.font.color = normal_color
  268.       self.contents.draw_text(hp_x + 48, y, 12, 32, "/", 1)
  269.       if $game_variables[$eye_level] >= $eye_level_ability[2] and @show_hsp
  270.         self.contents.draw_text(hp_x + 60, y, 48, 32, actor.maxhp.to_s)
  271.       else
  272.         self.contents.draw_text(hp_x + 60, y, 48, 32, $text_4_unknown)
  273.       end
  274.     end
  275.   end
  276.   def draw_actor_sp(actor, x, y, width = 144)
  277.     # Draw "SP" text string
  278.     self.contents.font.color = system_color
  279.     self.contents.draw_text(x, y, 32, 32, $data_system.words.sp)
  280.     # Calculate if there is draw space for MaxHP
  281.     if width - 32 >= 108
  282.       sp_x = x + width - 108
  283.       flag = true
  284.     elsif width - 32 >= 48
  285.       sp_x = x + width - 48
  286.       flag = false
  287.     end
  288.     # Draw SP
  289.     self.contents.font.color = actor.sp == 0 ? knockout_color :
  290.     actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
  291.     if $game_variables[$eye_level] >= $eye_level_ability[1] and @show_hsp
  292.       self.contents.draw_text(sp_x, y, 48, 32, actor.sp.to_s, 2)
  293.     else
  294.       self.contents.draw_text(sp_x, y, 48, 32, $text_4_unknown, 2)
  295.     end
  296.     # Draw MaxSP
  297.     if flag
  298.       self.contents.font.color = normal_color
  299.       self.contents.draw_text(sp_x + 48, y, 12, 32, "/", 1)
  300.       if $game_variables[$eye_level] >= $eye_level_ability[2] and @show_hsp
  301.         self.contents.draw_text(sp_x + 60, y, 48, 32, actor.maxsp.to_s)
  302.       else
  303.         self.contents.draw_text(sp_x + 60, y, 48, 32, $text_4_unknown)
  304.       end
  305.     end
  306.   end
  307. end
  308. class Scene_Battle
  309.   alias update_phase4_step5_eclair2 :update_phase4_step5
  310.   def update_phase4_step5
  311.     for i in 1..$data_states.size - 1
  312.       if $data_states[i].name == $探查状态名
  313.         $探查状态ID = i
  314.         break
  315.       end
  316.     end
  317.     if (@active_battler.current_action.kind == 1 and $data_skills[@active_battler.current_action.skill_id].plus_state_set.include?($探查状态ID)) or (@active_battler.current_action.kind == 2 and $data_items[@active_battler.current_action.skill_id].plus_state_set.include?($探查状态ID))
  318.       @eye_window = Window_cateyes.new
  319.     for target in @target_battlers
  320.     target.damage = ""
  321.     @eye_window.set_target(target)
  322.     for i in 0...120
  323.     Input.update
  324.     @eye_window.update
  325.     Graphics.update
  326.     @spriteset.update
  327.     if Input.trigger?(Input::C) or Input.trigger?(Input::B)
  328.     $game_system.se_play($data_system.decision_se)
  329.     break  
  330.     end
  331.     end
  332.   end
  333.     @eye_window.dispose
  334.     @eye_window = nil
  335. end
  336.     update_phase4_step5_eclair2
  337.   end
  338. end  
  339. #==============================================================================
  340. #   探查技能  BY绿发的Eclair
  341. #   加強      BY snstar2006
  342. #==============================================================================

作者: soulsaga    时间: 2017-7-1 15:15
本帖最后由 soulsaga 于 2017-8-17 18:45 编辑

RUBY 代码复制
  1. #==============================================================================
  2. #   探查技能  BY绿发的Eclair 移植到VABY:SOULSAGA
  3. #------------------------------------------------------------------------------  
  4. #   然后把想要做成有探查效果的特技或物品备注填探查。就这样简单~~
  5. #   修改自然属性的个数在第16行。
  6. #==============================================================================
  7. #   探查技能加强  BY snstar2006
  8. #------------------------------------------------------------------------------  
  9. #   加强部分:
  10. #   1. 敌人的属性为[王]的话,HP和SP不会显示,直到HP少於一半才会显示。
  11. #      [王]的属性ID为夹在自然属性和种族属性中间的属性
  12. #   2. 用变数做技能等级,可以直接用事件升级、降级。
  13. #   3. 可以设置不同能力所需要的等级。等级不够时显示为????。
  14. #==============================================================================
  15. $探查状态名 = "探查"         # 探查状态的名字
  16. $eye_level = 1               # 探查技能等级的变数ID
  17.  
  18. # 探查能力的等级
  19. $eye_level_ability = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]
  20. # 依次为:
  21. # 0->名称 、1->HP+MP、2->HP+MP Max、3->种族、
  22. # 4->经验 、5->金钱 、6->掉落物   、7->攻击、
  23. # 8->物防 、9->魔防 、10->力量    、11->灵巧、
  24. # 12->速度、13->魔力、14->属性有效度
  25.  
  26. $text_4_unknown = "????" # 未知时的文字
  27.  
  28.  
  29. class Window_cateyes < Window_Base
  30.   def initialize
  31.     super(120,40,400,400)
  32.     self.contents = Bitmap.new(width - 32, height - 32)
  33.     self.visible = false
  34.     self.z = 9999
  35.     self.back_opacity = 160  #信息窗口的透明度
  36.     [url=home.php?mod=space&uid=12971]@element[/url]          = 8    #自然属性个数
  37.   end
  38.   def set_target(target)
  39.     self.contents.clear
  40.     self.visible = true
  41.     @target = target
  42.  
  43.     # 检验是否显示HP/SP
  44.     if @target.element_rate(@element+1) > 100
  45.       if (@target.hp)<=(@target.mhp/2)
  46.         @show_hsp = true
  47.       else
  48.         @show_hsp = false
  49.       end
  50.     else
  51.       @show_hsp = true
  52.     end
  53.  
  54.     if $game_variables[$eye_level] >= $eye_level_ability[0]
  55.       self.contents.draw_text(10,10,360-32,32,"#{@target.name}",0)
  56.     else
  57.       self.contents.draw_text(10,10,360-32,32,$text_4_unknown,0)
  58.     end
  59.  
  60.     # 描绘HP
  61.     draw_actor_hp(@target,10,100 - 32 - 25,160)
  62.     # 描绘MP
  63.     draw_actor_sp(@target,10,100 - 32,160)
  64.  
  65.     # 描绘种族
  66.     self.contents.font.color = system_color
  67.     self.contents.draw_text(10,100,180,32,"种族",0)
  68.     self.contents.font.color = normal_color
  69.     for i in @element + 2..$data_system.elements.size - 1
  70.       if @target.element_rate(i) > 100
  71.         race = $data_system.elements[i]
  72.         break
  73.       end
  74.     end
  75.     if $game_variables[$eye_level] >= $eye_level_ability[3]
  76.       self.contents.draw_text(70,100,100,32,race,2)
  77.     else
  78.       self.contents.draw_text(70,100,100,32,$text_4_unknown,2)
  79.     end
  80.  
  81.     # 目标是敌方角色的场合
  82.     if @target.is_a?(Game_Enemy)
  83.       # 描绘经验
  84.       self.contents.font.color = system_color  
  85.       self.contents.draw_text(190,100 - 32 - 25,180-32,32,"经验",0)
  86.       self.contents.font.color = normal_color
  87.       if $game_variables[$eye_level] >= $eye_level_ability[4]
  88.         self.contents.draw_text(190,100 - 32 - 25,180 - 32,32,"#{@target.exp}",2)
  89.       else
  90.         self.contents.draw_text(190,100 - 32 - 25,180 - 32,32,$text_4_unknown,2)
  91.       end
  92.       # 描绘金钱
  93.       self.contents.font.color = system_color  
  94.       self.contents.draw_text(190,100 - 32 ,180-32,32,$data_system.currency_unit.to_s,0)
  95.       self.contents.font.color = normal_color
  96.       if $game_variables[$eye_level] >= $eye_level_ability[5]
  97.         self.contents.draw_text(190,100 - 32,180-32,32,"#{@target.gold}",2)
  98.       else
  99.         self.contents.draw_text(190,100 - 32,180-32,32,$text_4_unknown,2)
  100.       end
  101.       # 描绘掉落物
  102.       self.contents.font.color = system_color  
  103.       self.contents.draw_text(190,100 ,180,32,"掉落",0)
  104.       self.contents.font.color = normal_color
  105.       if $game_variables[$eye_level] >= $eye_level_ability[6]
  106.         for i in 0..2
  107.         case $data_enemies[@target.enemy_id].drop_items[i].kind
  108.     when 1
  109.         draw_item_name($data_items[$data_enemies[@target.enemy_id].drop_items[i].data_id],197,57 + 25 + 25 + 25) if $data_enemies[@target.enemy_id].drop_items[i].data_id > 0
  110.     when 2
  111.         draw_item_name($data_items[$data_enemies[@target.enemy_id].drop_items[i].data_id],197,57 + 25 + 25 + 25) if $data_enemies[@target.enemy_id].drop_items[i].data_id > 0
  112.     when 3
  113.         draw_item_name($data_items[$data_enemies[@target.enemy_id].drop_items[i].data_id],197,57 + 25 + 25 + 25) if $data_enemies[@target.enemy_id].drop_items[i].data_id > 0
  114.       end
  115.       end
  116.       else
  117.         self.contents.draw_text(197,57 + 75,180-32,32,$text_4_unknown,2)
  118.       end
  119.     end
  120.  
  121.     # 描绘攻击
  122.     if $game_variables[$eye_level] >= $eye_level_ability[7]
  123.       draw_actor_param(@target, 10, 112 + 20, 0)
  124.     else
  125.       draw_actor_parameter_u(10, 112 + 20, 0)
  126.     end
  127.     # 描绘物理防御
  128.     if $game_variables[$eye_level] >= $eye_level_ability[8]
  129.       draw_actor_param(@target, 10, 144 + 20, 1)
  130.     else
  131.       draw_actor_parameter_u(10, 144 + 20, 1)
  132.     end
  133.     # 描绘魔法防御
  134.     if $game_variables[$eye_level] >= $eye_level_ability[9]
  135.       draw_actor_param(@target, 10, 176 + 20, 2)
  136.     else
  137.       draw_actor_parameter_u(10, 176 + 20, 2)
  138.     end
  139.     # 描绘力量
  140.     if $game_variables[$eye_level] >= $eye_level_ability[10]
  141.       draw_actor_param(@target, 10, 208 + 20, 3)
  142.     else
  143.       draw_actor_parameter_u(10, 208 + 20, 3)
  144.     end
  145.     # 描绘灵巧
  146.     if $game_variables[$eye_level] >= $eye_level_ability[11]
  147.       draw_actor_param(@target, 10, 240 + 20, 4)
  148.     else
  149.       draw_actor_parameter_u(10, 240 + 20, 4)
  150.     end
  151.     # 描绘速度
  152.     if $game_variables[$eye_level] >= $eye_level_ability[12]
  153.       draw_actor_param(@target, 10, 272 + 20, 5)
  154.     else
  155.       draw_actor_parameter_u(10, 272 + 20, 5)
  156.     end
  157.     # 描绘魔力
  158.     if $game_variables[$eye_level] >= $eye_level_ability[13]
  159.       draw_actor_param(@target, 10, 304 + 20, 6)
  160.     else
  161.       draw_actor_parameter_u(10, 304 + 20, 6)
  162.     end
  163.  
  164.     # 描绘属性抵抗度
  165.     self.contents.font.color = system_color
  166.     self.contents.draw_text(190,153 + 12,180,32,"属性抵抗",0)
  167.     self.contents.font.color = normal_color
  168.     num = @element_max == 0 ? $data_system.elements.size : @element_max
  169.     y = 0
  170.     weaker = ""
  171.     weak = ""
  172.     resist = ""
  173.     guard = ""
  174.     recover = ""
  175.     race = ""
  176.     for i in 1..@element
  177.       case @target.element_rate(i)
  178.       when 151..200
  179.         weaker += $data_system.elements[i]
  180.       when 101..150
  181.         weak +=   $data_system.elements[i]
  182.       when 1..99
  183.         resist += $data_system.elements[i]
  184.       when 0
  185.         guard += $data_system.elements[i]
  186.       when -200..-1
  187.         recover += $data_system.elements[i]
  188.       end
  189.     end
  190.     if $game_variables[$eye_level] >= $eye_level_ability[14]
  191.       if weaker != ""
  192.         weaker += "超弱"
  193.         self.contents.draw_text(190,153 + 32+ 12,180,32,weaker,0)
  194.         y += 1
  195.       end
  196.       if weak != ""
  197.         weak += "弱点"
  198.         self.contents.draw_text(190,153 + 32+ 12 + 32 * y,180,32,weak,0)
  199.         y += 1
  200.       end
  201.       if resist != ""
  202.         resist += "抵抗"
  203.         self.contents.draw_text(190,153 + 32+ 12 + 32 * y,180,32,resist,0)
  204.         y += 1
  205.       end
  206.       if guard != ""
  207.         guard += "无效"
  208.         self.contents.draw_text(190,153 + 32+ 12 + 32 * y,180,32,guard,0)
  209.         y += 1
  210.       end
  211.       if recover != ""
  212.         recover += "吸收"
  213.         self.contents.draw_text(190,153 + 32+ 12 + 32 * y,180,32,recover,0)
  214.       end
  215.     else
  216.       self.contents.draw_text(190,153 + 32+ 12 + 32 * y,180,32,$text_4_unknown,0)
  217.     end
  218.  
  219.   end
  220.   def draw_item_name(item, x, y)
  221.     if item == nil
  222.       return
  223.     end
  224.     #bitmap = RPG::Cache.icon(item.icon_name)
  225.     #self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
  226.     self.contents.font.color = normal_color
  227.     self.contents.draw_text(x + 28, y, 150, 32, item.name)
  228.   end
  229.  
  230.   def draw_actor_parameter_u(x, y, type)
  231.     case type
  232.     when 0
  233.       parameter_name = $data_system.terms.params[2]
  234.     when 1
  235.       parameter_name = $data_system.terms.params[3]
  236.     when 2
  237.       parameter_name = $data_system.terms.params[5]
  238.     when 3
  239.       parameter_name = "力量"
  240.     when 4
  241.       parameter_name = "灵巧"
  242.     when 5
  243.       parameter_name = "敏捷"
  244.     when 6
  245.       parameter_name = "智力"
  246.     end
  247.     self.contents.font.color = system_color
  248.     self.contents.draw_text(x, y, 120, 32, parameter_name)
  249.     self.contents.font.color = normal_color
  250.     self.contents.draw_text(x + 120, y, 36, 32, $text_4_unknown, 2)
  251.   end
  252.   def draw_actor_hp(actor, x, y, width = 144)
  253.     # Draw "HP" text string
  254.     self.contents.font.color = system_color
  255.     self.contents.draw_text(x, y, 32, 32, $data_system.terms.basic[2])
  256.     # Calculate if there is draw space for MaxHP
  257.     if width - 32 >= 108
  258.       hp_x = x + width - 108
  259.       flag = true
  260.     elsif width - 32 >= 48
  261.       hp_x = x + width - 48
  262.       flag = false
  263.     end
  264.     # Draw HP
  265.     self.contents.font.color = actor.hp == 0 ? knockout_color :
  266.       actor.hp <= actor.mhp / 4 ? crisis_color : normal_color
  267.     if $game_variables[$eye_level] >= $eye_level_ability[1] and @show_hsp
  268.       self.contents.draw_text(hp_x, y, 48, 32, actor.hp.to_s, 2)
  269.     else
  270.       self.contents.draw_text(hp_x, y, 48, 32, $text_4_unknown, 2)
  271.     end
  272.     # Draw MaxHP
  273.     if flag
  274.       self.contents.font.color = normal_color
  275.       self.contents.draw_text(hp_x + 48, y, 12, 32, "/", 1)
  276.       if $game_variables[$eye_level] >= $eye_level_ability[2] and @show_hsp
  277.         self.contents.draw_text(hp_x + 60, y, 48, 32, actor.mhp.to_s)
  278.       else
  279.         self.contents.draw_text(hp_x + 60, y, 48, 32, $text_4_unknown)
  280.       end
  281.     end
  282.   end
  283.   def draw_actor_sp(actor, x, y, width = 144)
  284.     # Draw "MP" text string
  285.     self.contents.font.color = system_color
  286.     self.contents.draw_text(x, y, 32, 32, $data_system.terms.basic[4])
  287.     # Calculate if there is draw space for MaxHP
  288.     if width - 32 >= 108
  289.       sp_x = x + width - 108
  290.       flag = true
  291.     elsif width - 32 >= 48
  292.       sp_x = x + width - 48
  293.       flag = false
  294.     end
  295.     # Draw MP
  296.     self.contents.font.color = actor.mp == 0 ? knockout_color :
  297.     actor.mp <= actor.mmp / 4 ? crisis_color : normal_color
  298.     if $game_variables[$eye_level] >= $eye_level_ability[1] and @show_hsp
  299.       self.contents.draw_text(sp_x, y, 48, 32, actor.mp.to_s, 2)
  300.     else
  301.       self.contents.draw_text(sp_x, y, 48, 32, $text_4_unknown, 2)
  302.     end
  303.     # Draw MaxMP
  304.     if flag
  305.       self.contents.font.color = normal_color
  306.       self.contents.draw_text(sp_x + 48, y, 12, 32, "/", 1)
  307.       if $game_variables[$eye_level] >= $eye_level_ability[2] and @show_hsp
  308.         self.contents.draw_text(sp_x + 60, y, 48, 32, actor.mmp.to_s)
  309.       else
  310.         self.contents.draw_text(sp_x + 60, y, 48, 32, $text_4_unknown)
  311.       end
  312.     end
  313.   end
  314. end
  315. class Scene_Battle < Scene_Base
  316.   alias apply_item_effects_SOULSAGA apply_item_effects
  317.   def apply_item_effects(target, item)
  318.     #$game_message.add(item.note.to_s)
  319.     #@target_battlers = target
  320.     #for i in 1..$data_states.size - 1
  321.      # if $data_states[i].name == $探查状态名
  322.       #  $探查状态ID = i
  323.        # break
  324.       #end
  325.     #end
  326.     item_id = 1
  327.     item_id = item.id if item.is_a?(RPG::Item)
  328.     if item.is_a?(RPG::Skill) and $data_skills[item.id].note.include?($探查状态名) or item.is_a?(RPG::Item) and $data_items[item_id].note.include?($探查状态名)
  329.       @eye_window = Window_cateyes.new
  330.     #for target in @target_battlers
  331.     #target.damage = ""
  332.     @eye_window.set_target(target)
  333.     for i in 0...120
  334.     Input.update
  335.     @eye_window.update
  336.     Graphics.update
  337.     @spriteset.update
  338.     if Input.trigger?(Input::C) or Input.trigger?(Input::B)
  339.     Audio.se_play('Audio/SE/decision3')
  340.     break  
  341.     end
  342.     end
  343.     @eye_window.dispose
  344.     @eye_window = nil
  345. end
  346.     apply_item_effects_SOULSAGA(target, item)
  347.   end
  348. end  
  349. #==============================================================================
  350. #   探查技能  BY绿发的Eclair
  351. #   加強      BY snstar2006
  352. #==============================================================================


移植完成..改了一下用法..
不懂脚本..第一次做移植..实在不容易..
作者: 铅笔描绘的思念    时间: 2017-7-1 22:20
有定制需求去招募接单区啊。。水区都行。。无聊逛逛提问区的人很少了现在
作者: xing~~    时间: 2017-8-18 09:01
像我每天都去提问区逛逛
作者: xing~~    时间: 2017-8-18 09:17
这句报错了怎么办。

报错.png (3.82 KB, 下载次数: 30)

报错.png

作者: xing~~    时间: 2017-8-19 09:15
问题解决了,多谢大佬




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1