查看: 3929|回复: 4

[转载] 【来地球村逛逛】守护精灵之神降系统

[复制链接]
梦石
0
星屑
67
在线时间
140 小时
注册时间
2012-2-6
回帖
351
发表于 2012-3-16 10:29:29 | 显示全部楼层 |阅读模式

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

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

×
本帖最后由 杂兵天下 于 2012-3-16 14:33 编辑

来源yamiworld.wordpress.com
  1. #==============================================================================
  2. #
  3. # ¥ Yami Engine Ace - Basic Module
  4. # -- Last Updated: 2012.03.13
  5. # -- Level: Nothing
  6. # -- Requires: n/a
  7. #
  8. #==============================================================================

  9. $imported = {} if $imported.nil?
  10. $imported["YSE-BasicModule"] = true

  11. #==============================================================================
  12. # ¥ Updates
  13. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  14. # 2012.03.13 - Remove requirements mechanic.
  15. # 2012.03.11 - Change in requirements mechanic.
  16. # 2012.03.02 - Added Message Box.
  17. # 2012.03.01 - Started and Finished Script.
  18. #
  19. #==============================================================================
  20. # ¥ Introduction
  21. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  22. # This script provides many methods for Yami Engine Ace.
  23. #
  24. # * Feature:
  25. #   - Save and Load data files. (2012.03.01)
  26. #
  27. # * Misc:
  28. #   - Make random string.       (2012.03.01)
  29. #   - Make hash.                (2012.03.01)
  30. #   - Win32API Message Box.     (2012.03.02)
  31. #
  32. #==============================================================================
  33. # ¥ Instructions
  34. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  35. # To install this script, open up your script editor and copy/paste this script
  36. # to an open slot below ¥ Materials/‘fÞ but above ¥ Main. Remember to save.
  37. #
  38. #==============================================================================
  39. # ¥ Compatibility
  40. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  41. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  42. # it will run with RPG Maker VX without adjusting.
  43. #
  44. #==============================================================================

  45. #==============================================================================
  46. # ¥ Configuration
  47. #==============================================================================

  48. module YSE
  49.   
  50.   #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  51.   # - External Data Configuration -
  52.   #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  53.   DATA_CONFIGURATION = { # Start here.
  54.     :ext        =>  "rvdata2",  # Data File Extension.
  55.     :salt       =>  "D6*&wg7O",# Salt. Make an unique phrase here.
  56.                                  # Must be at least 2 characters.
  57.     :comp_level =>  9,           # Level from 1 to 9. Best Speed at 1, Best
  58.                                  # Compress at 9.
  59.   } # Do not delete this.
  60.   
  61. end

  62. #==============================================================================
  63. # ¥ Editting anything past this point may potentially result in causing
  64. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  65. # halitosis so edit at your own risk.
  66. #==============================================================================

  67. #==============================================================================
  68. # ¡ YSE - Basic Module
  69. #==============================================================================

  70. module YSE
  71.   
  72.   #--------------------------------------------------------------------------
  73.   # message_box
  74.   #--------------------------------------------------------------------------
  75.   def self.message_box(title, message)
  76.     api = Win32API.new('user32','MessageBox',['L', 'P', 'P', 'L'],'I')  
  77.     api.call(0,message,title,0)  
  78.   end
  79.   
  80.   #--------------------------------------------------------------------------
  81.   # charset
  82.   #--------------------------------------------------------------------------
  83.   def self.charset
  84.     result = "abcdefghjkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ23456789"
  85.     result
  86.   end
  87.   
  88.   #--------------------------------------------------------------------------
  89.   # make_random_string
  90.   #--------------------------------------------------------------------------
  91.   def self.make_random_string(length = 6)
  92.     result = ""
  93.     while result.size < length
  94.       result << charset[rand(charset.size)]
  95.     end
  96.     result
  97.   end
  98.   
  99.   #--------------------------------------------------------------------------
  100.   # make_filename
  101.   #--------------------------------------------------------------------------
  102.   def self.make_filename(filename, dir = "")
  103.     ext = DATA_CONFIGURATION[:ext]
  104.     result = "#{dir}/#{filename}.#{ext}"
  105.     result
  106.   end
  107.   
  108.   #--------------------------------------------------------------------------
  109.   # compress_data
  110.   #--------------------------------------------------------------------------
  111.   def self.compress_data(data, comp_level = nil)
  112.     compress_level = comp_level.nil? ? DATA_CONFIGURATION[:comp_level] : comp_level
  113.     result = Zlib::Deflate.deflate(Marshal.dump(data), compress_level)
  114.     result
  115.   end
  116.   
  117.   #--------------------------------------------------------------------------
  118.   # decompress_data
  119.   #--------------------------------------------------------------------------
  120.   def self.decompress_data(data)
  121.     result = Zlib::Inflate.inflate(Marshal.load(data))
  122.     result
  123.   end
  124.   
  125.   #--------------------------------------------------------------------------
  126.   # make_hash
  127.   #--------------------------------------------------------------------------
  128.   def self.make_hash(string = "")
  129.     salt = DATA_CONFIGURATION[:salt]
  130.     if salt.size < 2; salt = make_random_string(8); end
  131.     result = string.crypt(salt)
  132.     result
  133.   end
  134.   
  135.   #--------------------------------------------------------------------------
  136.   # save_data
  137.   #--------------------------------------------------------------------------
  138.   def self.save_data(filename, data_hash)
  139.     File.open(filename, "wb") do |file|
  140.       Marshal.dump(compress_data(data_hash), file)
  141.     end
  142.     return true
  143.   end
  144.   
  145.   #--------------------------------------------------------------------------
  146.   # save_data
  147.   #--------------------------------------------------------------------------
  148.   def self.load_data(filename, method, index = 0)
  149.     File.open(filename, "rb") do |file|
  150.       index.times { Marshal.load(file) }
  151.       method.call(Marshal.load(decompress_data(file)))
  152.     end
  153.     return true
  154.   end
  155.   
  156.   #--------------------------------------------------------------------------
  157.   # save_data
  158.   #--------------------------------------------------------------------------
  159.   def self.patch_start
  160.     return unless $imported["YSE-PatchSystem"]
  161.     SceneManager.call(Scene_Patch_YSE)
  162.   end
  163.   
  164. end # YSE - Basic Module

  165. #==============================================================================
  166. # ¡ System Errors
  167. #==============================================================================

  168. if YSE::DATA_CONFIGURATION[:salt].size < 2
  169.   YSE.message_box("YSE - Basic Module", "Salt must have at least 2 characters.")
  170.   exit
  171. end

  172. #==============================================================================
  173. #
  174. # ¥ End of File
  175. #
  176. #==============================================================================
复制代码
必须以上脚本的支持才能运行!!!!
  1. #==============================================================================
  2. #
  3. # ▼ Yami Engine Ace - Guardian Series
  4. # -- Script: Guardian Basic
  5. # -- Last Updated: 2012.03.11
  6. # -- Level: Easy
  7. # -- Requires: n/a
  8. #
  9. #==============================================================================

  10. $imported = {} if $imported.nil?
  11. $imported["YSE-GuardianBasic"] = true

  12. #==============================================================================
  13. # ▼ Updates
  14. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  15. # 2012.03.11 - Finished Script.
  16. # 2012.03.05 - Started Script.
  17. #
  18. #==============================================================================
  19. # ▼ Introduction
  20. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  21. # This script gives you a notetag for Actors to make them be guardians. An actor
  22. # marked as guardian is not shown in default menu, battle, but will be available
  23. # for other scripts in Guardian Series.
  24. #
  25. # This script also contains two basic windows for Guardians:
  26. #   - Window Guardians List. Class Window_MenuGuardian
  27. #   - Window Guardian Small Status. Class Window_StatusGuardian
  28. #
  29. # -----------------------------------------------------------------------------
  30. # Actor Notetags - These notetags go in the actor notebox in the database.
  31. # -----------------------------------------------------------------------------
  32. # <guardian>
  33. # This notetag marks an actor as a guardian.
  34. #
  35. #==============================================================================
  36. # ▼ Instructions
  37. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  38. # To install this script, open up your script editor and copy/paste this script
  39. # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
  40. #
  41. #==============================================================================
  42. # ▼ Compatibility
  43. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  44. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  45. # it will run with RPG Maker VX without adjusting.
  46. #
  47. #==============================================================================

  48. module YSE
  49.   module GUARDIAN
  50.    
  51.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  52.     # - Mechanic Settings -
  53.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  54.     ALL_GUARDIAN_GAIN_EXP     = false
  55.    
  56.   end
  57. end

  58. #==============================================================================
  59. # ▼ Editting anything past this point may potentially result in causing
  60. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  61. # halitosis so edit at your own risk.
  62. #==============================================================================

  63. #==============================================================================
  64. # ■ Regular Expression
  65. #==============================================================================

  66. module YSE
  67.   module REGEXP
  68.     module ACTOR
  69.       GUARDIAN = /<(?:GUARDIAN)>/i
  70.     end # ACTOR
  71.   end # REGEXP
  72. end # YSE

  73. #==============================================================================
  74. # ■ BattleManager
  75. #==============================================================================

  76. module BattleManager
  77.   
  78.   #--------------------------------------------------------------------------
  79.   # alias method: gain_exp
  80.   #--------------------------------------------------------------------------
  81.   class <<self; alias yse_gain_exp_gb gain_exp; end
  82.   def self.gain_exp
  83.     $game_party.guardians.each do |guardian|
  84.       guardian.gain_exp($game_troop.exp_total) if YSE::GUARDIAN::ALL_GUARDIAN_GAIN_EXP
  85.     end
  86.     yse_gain_exp_gb
  87.   end
  88.   
  89. end # BattleManager

  90. #==============================================================================
  91. # ■ Game_Temp
  92. #==============================================================================

  93. class Game_Temp
  94.   
  95.   #--------------------------------------------------------------------------
  96.   # public instance variables
  97.   #--------------------------------------------------------------------------
  98.   attr_accessor :scene_gmenu_id
  99.   
  100.   #--------------------------------------------------------------------------
  101.   # alias method: initialize
  102.   #--------------------------------------------------------------------------
  103.   alias yse_initialize_gb initialize
  104.   def initialize
  105.     yse_initialize_gb
  106.     @scene_gmenu_id = 0
  107.   end
  108.   
  109. end # Game_Temp

  110. #==============================================================================
  111. # ■ DataManager
  112. #==============================================================================

  113. module DataManager
  114.   
  115.   #--------------------------------------------------------------------------
  116.   # alias method: load_database
  117.   #--------------------------------------------------------------------------
  118.   class <<self; alias load_database_ysegb load_database; end
  119.   def self.load_database
  120.     load_database_ysegb
  121.     load_notetags_ysegb
  122.   end
  123.   
  124.   #--------------------------------------------------------------------------
  125.   # new method: load_notetags_ysegb
  126.   #--------------------------------------------------------------------------
  127.   def self.load_notetags_ysegb
  128.     group = $data_actors
  129.     for obj in group
  130.       next if obj.nil?
  131.       obj.load_notetags_ysegb
  132.     end
  133.   end
  134.   
  135. end # DataManager

  136. #==============================================================================
  137. # ■ RPG::Actor
  138. #==============================================================================

  139. class RPG::Actor < RPG::BaseItem
  140.   
  141.   #--------------------------------------------------------------------------
  142.   # public instance variables
  143.   #--------------------------------------------------------------------------
  144.   attr_accessor :is_guardian

  145.   #--------------------------------------------------------------------------
  146.   # new method: load_notetags_ysegb
  147.   #--------------------------------------------------------------------------
  148.   def load_notetags_ysegb
  149.     @is_guardian = false
  150.     #---
  151.     self.note.split(/[\r\n]+/).each { |line|
  152.       case line
  153.       #---
  154.       when YSE::REGEXP::ACTOR::GUARDIAN
  155.         @is_guardian = true
  156.       end
  157.     } # self.note.split
  158.     #---
  159.   end
  160.   
  161. end # RPG::Actor

  162. #==============================================================================
  163. # ■ Game_Actor
  164. #==============================================================================

  165. class Game_Actor < Game_Battler
  166.   
  167.   #--------------------------------------------------------------------------
  168.   # new method: guardian?
  169.   #--------------------------------------------------------------------------
  170.   def guardian?
  171.     return actor.is_guardian
  172.   end
  173.   
  174.   #--------------------------------------------------------------------------
  175.   # new method: guardian_index
  176.   #--------------------------------------------------------------------------
  177.   def guardian_index
  178.     $game_party.guardians.index(self)
  179.   end
  180.   
  181. end # Game_Actor

  182. #==============================================================================
  183. # ■ Game_Party
  184. #==============================================================================

  185. class Game_Party < Game_Unit
  186.   
  187.   #--------------------------------------------------------------------------
  188.   # alias method: initialize
  189.   #--------------------------------------------------------------------------  
  190.   alias yse_initialize_gb initialize
  191.   def initialize
  192.     yse_initialize_gb
  193.     @guardians = []
  194.   end
  195.   
  196.   #--------------------------------------------------------------------------
  197.   # alias method: all_members
  198.   #--------------------------------------------------------------------------
  199.   alias yse_all_members_gb all_members
  200.   def all_members
  201.     @actors.each {|id|
  202.       if $game_actors[id].guardian?; @actors.delete(id); add_actor(id); end
  203.     }
  204.     yse_all_members_gb
  205.   end
  206.   
  207.   #--------------------------------------------------------------------------
  208.   # new method: guardians
  209.   #--------------------------------------------------------------------------  
  210.   def guardians
  211.     @guardians.collect {|id| $game_actors[id] }
  212.   end
  213.   
  214.   #--------------------------------------------------------------------------
  215.   # alias method: add_actor
  216.   #--------------------------------------------------------------------------  
  217.   alias yse_add_actor_gb add_actor
  218.   def add_actor(actor_id)
  219.     if $game_actors[actor_id].guardian?
  220.       @guardians.push(actor_id) unless @guardians.include?(actor_id)
  221.       return
  222.     end
  223.     yse_add_actor_gb(actor_id)
  224.   end
  225.   
  226.   #--------------------------------------------------------------------------
  227.   # new method: menu_guardian
  228.   #--------------------------------------------------------------------------  
  229.   def menu_guardian
  230.     $game_actors[$game_temp.scene_gmenu_id].nil? ? guardians[0] : $game_actors[$game_temp.scene_gmenu_id]
  231.   end
  232.   
  233.   #--------------------------------------------------------------------------
  234.   # new method: menu_guardian_next
  235.   #--------------------------------------------------------------------------  
  236.   def menu_guardian_next
  237.     index = guardians.index(menu_actor) || -1
  238.     index = (index + 1) % guardians.size
  239.     self.menu_actor = guardians[index]
  240.   end
  241.   
  242.   #--------------------------------------------------------------------------
  243.   # new method: menu_guardian_prev
  244.   #--------------------------------------------------------------------------  
  245.   def menu_guardian_prev
  246.     index = guardians.index(menu_actor) || 1
  247.     index = (index + guardians.size - 1) % guardians.size
  248.     self.menu_actor = guardians[index]
  249.   end
  250.   
  251.   #--------------------------------------------------------------------------
  252.   # alias method: menu_actor_next
  253.   #--------------------------------------------------------------------------
  254.   alias yse_menu_actor_next_gb menu_actor_next
  255.   def menu_actor_next
  256.     if @guardians.include?(menu_actor.id)
  257.       menu_guardian_next
  258.     else
  259.       yse_menu_actor_next_gb
  260.     end
  261.   end
  262.   
  263.   #--------------------------------------------------------------------------
  264.   # alias method: menu_actor_prev
  265.   #--------------------------------------------------------------------------
  266.   alias yse_menu_actor_prev_gb menu_actor_prev
  267.   def menu_actor_prev
  268.     if @guardians.include?(menu_actor.id)
  269.       menu_guardian_prev
  270.     else
  271.       yse_menu_actor_prev_gb
  272.     end
  273.   end
  274.   
  275. end # Game_Party

  276. #==============================================================================
  277. # ■ Window_MenuGuardian
  278. #==============================================================================

  279. class Window_MenuGuardian < Window_Selectable
  280.   
  281.   #--------------------------------------------------------------------------
  282.   # initialize
  283.   #--------------------------------------------------------------------------
  284.   def initialize(x, y)
  285.     super(x, y, window_width, Graphics.height - y)
  286.     refresh
  287.   end
  288.   
  289.   #--------------------------------------------------------------------------
  290.   # window_width
  291.   #--------------------------------------------------------------------------
  292.   def window_width
  293.     Graphics.width
  294.   end
  295.   
  296.   #--------------------------------------------------------------------------
  297.   # item_max
  298.   #--------------------------------------------------------------------------
  299.   def item_max
  300.     $game_party.guardians.size
  301.   end
  302.   
  303.   #--------------------------------------------------------------------------
  304.   # col_max
  305.   #--------------------------------------------------------------------------
  306.   def col_max
  307.     2
  308.   end
  309.   
  310.   #--------------------------------------------------------------------------
  311.   # process_ok
  312.   #--------------------------------------------------------------------------
  313.   def process_ok
  314.     $game_party.menu_actor = $game_party.guardians[index]
  315.     $game_temp.scene_gmenu_id = $game_party.guardians[index].id
  316.     super
  317.   end
  318.   
  319.   #--------------------------------------------------------------------------
  320.   # draw_item
  321.   #--------------------------------------------------------------------------
  322.   def draw_item(index)
  323.     guardian = $game_party.guardians[index]
  324.     rect = item_rect(index)
  325.     face_rect = Rect.new(rect.x + 1, rect.y + 1, item_height - 2, item_height - 2)
  326.     draw_guardian_name(guardian, rect.x, rect.y, rect.width)
  327.     draw_thumb_face(guardian, face_rect)
  328.     draw_guardian_status(guardian, rect.x, rect.y, rect.width)
  329.   end
  330.   
  331.   #--------------------------------------------------------------------------
  332.   # draw_thumb_face
  333.   #--------------------------------------------------------------------------
  334.   def draw_thumb_face(actor, dest_rect)
  335.     bitmap = Cache.face(actor.face_name)
  336.     rect = Rect.new(actor.face_index % 4 * 96, actor.face_index / 4 * 96, 96, 96)
  337.     bitmap.blur
  338.     contents.stretch_blt(dest_rect, bitmap, rect, enable?(actor) ? 255 : translucent_alpha)
  339.     bitmap.dispose
  340.   end
  341.   
  342.   #--------------------------------------------------------------------------
  343.   # draw_guardian_name
  344.   #--------------------------------------------------------------------------
  345.   def draw_guardian_name(actor, dx, dy, dw)
  346.     colour = Color.new(0, 0, 0, translucent_alpha/2)
  347.     rect = Rect.new(dx+1, dy+1, dw-2, line_height-2)
  348.     contents.fill_rect(rect, colour)
  349.     change_color(system_color, enable?(actor))
  350.     draw_text(dx + item_height + 2, dy, dw, line_height, actor.name)
  351.   end
  352.   
  353.   #--------------------------------------------------------------------------
  354.   # draw_guardian_status
  355.   #--------------------------------------------------------------------------
  356.   def draw_guardian_status(actor, dx, dy, dw)
  357.     change_color(normal_color, enable?(actor))
  358.     draw_text(dx, dy, dw, line_height, Vocab::level_a + actor.level.to_s, 2)
  359.   end
  360.   
  361.   #--------------------------------------------------------------------------
  362.   # enabled
  363.   #--------------------------------------------------------------------------
  364.   def enable?(actor = nil)
  365.     return true
  366.   end
  367.   
  368.   #--------------------------------------------------------------------------
  369.   # update_help
  370.   #--------------------------------------------------------------------------
  371.   alias yse_call_update_help_gb call_update_help
  372.   def call_update_help
  373.     yse_call_update_help_gb
  374.     return if @status_window.nil?
  375.     return if $game_party.guardians.size == 0
  376.     item = index < 0 ? $game_party.menu_guardian : $game_party.guardians[index]
  377.     @status_window.guardian = item
  378.   end
  379.   
  380.   #--------------------------------------------------------------------------
  381.   # update_help
  382.   #--------------------------------------------------------------------------
  383.   def update_help
  384.     @help_window.clear
  385.     item = index < 0 ? $game_party.menu_guardian : $game_party.guardians[index]
  386.     @help_window.set_item(item)
  387.   end
  388.   
  389.   #--------------------------------------------------------------------------
  390.   # select_last
  391.   #--------------------------------------------------------------------------
  392.   def select_last
  393.     select($game_party.menu_guardian.guardian_index)
  394.   end
  395.   
  396.   #--------------------------------------------------------------------------
  397.   # status_window=
  398.   #--------------------------------------------------------------------------
  399.   def status_window=(status_window)
  400.     @status_window = status_window
  401.     item = index < 0 ? $game_party.menu_guardian : $game_party.guardians[index]
  402.     @status_window.guardian = item
  403.   end
  404.   
  405. end # Window_MenuGuardian

  406. #==============================================================================
  407. # ■ Window_StatusGuardian
  408. #==============================================================================

  409. class Window_StatusGuardian < Window_Base
  410.   
  411.   #--------------------------------------------------------------------------
  412.   # initialize
  413.   #--------------------------------------------------------------------------
  414.   def initialize(dx, dy)
  415.     @guardian = $game_party.menu_guardian
  416.     super(dx, dy, window_width, fitting_height(4))
  417.     refresh
  418.   end
  419.   
  420.   #--------------------------------------------------------------------------
  421.   # window_width
  422.   #--------------------------------------------------------------------------
  423.   def window_width; return Graphics.width - 160; end
  424.   
  425.   #--------------------------------------------------------------------------
  426.   # guardian=
  427.   #--------------------------------------------------------------------------
  428.   def guardian=(guardian)
  429.     return if @guardian == guardian
  430.     @guardian = guardian
  431.     refresh
  432.   end
  433.   
  434.   #--------------------------------------------------------------------------
  435.   # refresh
  436.   #--------------------------------------------------------------------------
  437.   def refresh
  438.     contents.clear
  439.     return unless @guardian
  440.     draw_actor_face(@guardian, 0, 0)
  441.     colour = Color.new(0, 0, 0, translucent_alpha / 2)
  442.     rect = Rect.new(0, line_height * 3 + 2, 106, line_height-2)
  443.     contents.fill_rect(rect, colour)
  444.     draw_actor_name(@guardian, 0, line_height * 3 + 1, 108)
  445.     dw = (contents.width - 108) / 2
  446.     dx = 108
  447.     draw_actor_param(0, dx, line_height * 0, dw)
  448.     draw_actor_param(1, dx + dw, line_height * 0, dw)
  449.     draw_actor_param(2, dx, line_height * 1, dw)
  450.     draw_actor_param(3, dx + dw, line_height * 1, dw)
  451.     draw_actor_param(4, dx, line_height * 2, dw)
  452.     draw_actor_param(5, dx + dw, line_height * 2, dw)
  453.     draw_actor_param(6, dx, line_height * 3, dw)
  454.     draw_actor_param(7, dx + dw, line_height * 3, dw)
  455.   end
  456.   
  457.   #--------------------------------------------------------------------------
  458.   # draw_actor_param
  459.   #--------------------------------------------------------------------------
  460.   def draw_actor_param(param_id, dx, dy, dw)
  461.     colour = Color.new(0, 0, 0, translucent_alpha/2)
  462.     rect = Rect.new(dx+1, dy+1, dw-2, line_height-2)
  463.     contents.fill_rect(rect, colour)
  464.     change_color(system_color)
  465.     draw_text(dx+4, dy, dw-8, line_height, Vocab::param(param_id))
  466.     change_color(normal_color)
  467.     draw_text(dx+4, dy, dw-8, line_height, @guardian.param(param_id).to_s, 2)
  468.   end
  469.   
  470. end # Window_StatusGuardian

  471. #==============================================================================
  472. #
  473. # ▼ End of File
  474. #
  475. #==============================================================================
  476. #==============================================================================
  477. #
  478. # ▼ Yami Engine Ace - Guardian Series
  479. # -- Script: Guardian Menu
  480. # -- Last Updated: 2012.03.13
  481. # -- Level: Easy
  482. # -- Requires: YSE - Guardian Basic
  483. #
  484. #==============================================================================

  485. $imported = {} if $imported.nil?
  486. $imported["YSE-GuardianMenu"] = true

  487. #==============================================================================
  488. # ▼ Updates
  489. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  490. # 2012.03.13 - Finished Script.
  491. # 2012.03.11 - Started Script.
  492. #
  493. #==============================================================================
  494. # ▼ Introduction
  495. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  496. # Manages menu commands for Guardian. This Menu will be separate with Main Menu
  497. # for actor. Can be called by Main Menu.
  498. # If you have Yanfly Engine Ace - Menu Engine, You must add a custom command
  499. # which calls Handler Method :command_guardian.
  500. #
  501. #==============================================================================
  502. # ▼ Instructions
  503. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  504. # To install this script, open up your script editor and copy/paste this script
  505. # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
  506. #
  507. #==============================================================================
  508. # ▼ Compatibility
  509. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  510. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  511. # it will run with RPG Maker VX without adjusting.
  512. #
  513. #==============================================================================

  514. module YSE
  515.   module GUARDIAN_MENU
  516.    
  517.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  518.     # - Command Window Settings -
  519.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  520.     # This section adjusts the commands that appear in the command window used
  521.     # for the status screen. Rearrange the commands, add new ones, remove them
  522.     # as you see fit.
  523.     #
  524.     # -------------------------------------------------------------------------
  525.     # :command         Description
  526.     # -------------------------------------------------------------------------
  527.     # :status          Calls Scene_Status scene.
  528.     # :skill           Calls Scene_Skill scene.
  529.     # :equip           Calls Scene_Equip scene.
  530.     #
  531.     # :gpair           Calls Guardian Pairing.
  532.     #                  Require YSE - Guardian Pairing.
  533.     #
  534.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  535.     COMMANDS = [ # The order at which the menu items are shown.
  536.     # [    :command,    "Display"],
  537.       [    :status,      "状态"],
  538.       [    :skill,       "技能"],
  539.       [    :equip,       "装备"],
  540.       [    :gpair,       "神之降临"],
  541.     # [    :custom1,     "Custom"],
  542.     # [    :custom2,     "motsuC"],
  543.     ] # Do not remove this.
  544.    
  545.     #--------------------------------------------------------------------------
  546.     # - Menu Custom Commands -
  547.     # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  548.     # For those who use scripts to that may produce unique effects for the
  549.     # status menu, use this hash to manage the custom commands for the Status
  550.     # Command Window. You can disable certain commands or prevent them from
  551.     # appearing by using switches. If you don't wish to bind them to a switch,
  552.     # set the proper switch to 0 for it to have no impact.
  553.     #--------------------------------------------------------------------------
  554.     CUSTOM_STATUS_COMMANDS = {
  555.     # :command => [EnableSwitch, ShowSwitch, Handler Method],
  556.       :custom1 => [           0,          0, :command_name1],
  557.       :custom2 => [           0,          0, :command_name2],
  558.     } # Do not remove this.
  559.    
  560.     # These Configurations contain visual and vocab things.
  561.     VOCAB_MENU = "守护神"    # Command Display in Main Menu.
  562.     MENU_ENABLE_SWITCH = 0      # Set to 0 if don't wanna use this function.
  563.    
  564.   end
  565. end

  566. #==============================================================================
  567. # ▼ Editting anything past this point may potentially result in causing
  568. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  569. # halitosis so edit at your own risk.
  570. #==============================================================================

  571. #==============================================================================
  572. # ■ Vocab
  573. #==============================================================================

  574. module Vocab
  575.   GuardianMenu = YSE::GUARDIAN_MENU::VOCAB_MENU
  576. end

  577. #==============================================================================
  578. # ■ Game_Temp
  579. #==============================================================================

  580. class Game_Temp
  581.   
  582.   #--------------------------------------------------------------------------
  583.   # public instance variables
  584.   #--------------------------------------------------------------------------
  585.   attr_accessor :guardian_menu_command
  586.   
  587. end # Game_Temp

  588. #==============================================================================
  589. # ■ Window_MenuCommand
  590. #==============================================================================

  591. class Window_MenuCommand < Window_Command
  592.   
  593.   #--------------------------------------------------------------------------
  594.   # alias method: make_command_list
  595.   #--------------------------------------------------------------------------
  596.   alias yse_add_main_commands_gm add_main_commands
  597.   def add_main_commands
  598.     yse_add_main_commands_gm
  599.     add_guardian_commands unless $imported["YEA-AceMenuEngine"]
  600.   end
  601.   
  602.   #--------------------------------------------------------------------------
  603.   # new method: guardian_command_enabled
  604.   #--------------------------------------------------------------------------
  605.   def guardian_command_enabled
  606.     return false if $game_party.guardians.size == 0
  607.     return true if YSE::GUARDIAN_MENU::MENU_ENABLE_SWITCH <= 0
  608.     return $game_switches[YSE::GUARDIAN_MENU::MENU_ENABLE_SWITCH]
  609.   end

  610.   #--------------------------------------------------------------------------
  611.   # new method: add_guardian_commands
  612.   #--------------------------------------------------------------------------
  613.   def add_guardian_commands
  614.     add_command(Vocab::GuardianMenu,   :guardian,   guardian_command_enabled)
  615.   end
  616.   
  617. end # Window_MenuCommand

  618. #==============================================================================
  619. # ■ Scene_Menu
  620. #==============================================================================

  621. class Scene_Menu < Scene_MenuBase
  622.   
  623.   #--------------------------------------------------------------------------
  624.   # alias method: create_command_window
  625.   #--------------------------------------------------------------------------
  626.   alias yse_create_command_window_gm create_command_window
  627.   def create_command_window
  628.     yse_create_command_window_gm
  629.     @command_window.set_handler(:guardian, method(:command_guardian))
  630.   end
  631.   
  632.   #--------------------------------------------------------------------------
  633.   # new method: command_guardian
  634.   #--------------------------------------------------------------------------
  635.   def command_guardian
  636.     SceneManager.call(Scene_GuardianMenu)
  637.   end
  638.   
  639. end # Scene_Menu

  640. #==============================================================================
  641. # ■ Window_GuardianMenuCommand
  642. #==============================================================================

  643. class Window_GuardianMenuCommand < Window_Command
  644.   
  645.   #--------------------------------------------------------------------------
  646.   # initialize
  647.   #--------------------------------------------------------------------------
  648.   def initialize(dx, dy)
  649.     super(dx, dy)
  650.   end
  651.   
  652.   #--------------------------------------------------------------------------
  653.   # window_width
  654.   #--------------------------------------------------------------------------
  655.   def window_width; return 160; end
  656.   
  657.   #--------------------------------------------------------------------------
  658.   # visible_line_number
  659.   #--------------------------------------------------------------------------
  660.   def visible_line_number; return 4; end
  661.    
  662.   #--------------------------------------------------------------------------
  663.   # alignment
  664.   #--------------------------------------------------------------------------
  665.   def alignment; return 1; end
  666.   
  667.   #--------------------------------------------------------------------------
  668.   # ok_enabled?
  669.   #--------------------------------------------------------------------------
  670.   def ok_enabled?
  671.     return handle?(current_symbol)
  672.   end
  673.   
  674.   #--------------------------------------------------------------------------
  675.   # process_ok
  676.   #--------------------------------------------------------------------------
  677.   def process_ok
  678.     $game_temp.guardian_menu_command = self.index
  679.     super
  680.   end
  681.   
  682.   #--------------------------------------------------------------------------
  683.   # make_command_list
  684.   #--------------------------------------------------------------------------
  685.   def make_command_list
  686.     for command in YSE::GUARDIAN_MENU::COMMANDS
  687.       case command[0]
  688.       #--- Default ---
  689.       when :status, :items, :skill, :equip
  690.         add_command(command[1], command[0], $game_party.guardians.size > 0)
  691.       #--- Imported ---
  692.       when :gpair
  693.         add_command(command[1], command[0], $game_party.guardians.size > 0)
  694.       #--- Custom Commands ---
  695.       else
  696.         process_custom_command(command)
  697.       end
  698.     end
  699.   end
  700.   
  701.   #--------------------------------------------------------------------------
  702.   # process_custom_command
  703.   #--------------------------------------------------------------------------
  704.   def process_custom_command(command)
  705.     return unless YSE::GUARDIAN_MENU::CUSTOM_STATUS_COMMANDS.include?(command[0])
  706.     show = YSE::GUARDIAN_MENU::CUSTOM_STATUS_COMMANDS[command[0]][1]
  707.     continue = show <= 0 ? true : $game_switches[show]
  708.     return unless continue
  709.     text = command[1]
  710.     switch = YSE::GUARDIAN_MENU::CUSTOM_STATUS_COMMANDS[command[0]][0]
  711.     enabled = switch <= 0 ? true : $game_switches[switch]
  712.     add_command(text, command[0], enabled)
  713.   end
  714.   
  715. end # Window_GuardianMenuCommand

  716. #==============================================================================
  717. # ■ Scene_GuardianMenu
  718. #==============================================================================

  719. class Scene_GuardianMenu < Scene_MenuBase
  720.   
  721.   #--------------------------------------------------------------------------
  722.   # start
  723.   #--------------------------------------------------------------------------
  724.   def start
  725.     super
  726.     create_help_window
  727.     create_command_window
  728.     create_status_window
  729.     create_guardian_window
  730.     create_actor_window
  731.   end
  732.   
  733.   #--------------------------------------------------------------------------
  734.   # create_command_window
  735.   #--------------------------------------------------------------------------
  736.   def create_command_window
  737.     wy = @help_window.height
  738.     @command_window = Window_GuardianMenuCommand.new(0, wy)
  739.     @command_window.viewport = @viewport
  740.     @command_window.set_handler(:cancel,   method(:return_scene))
  741.     @command_window.set_handler(:skill,     method(:command_personal))
  742.     @command_window.set_handler(:equip,     method(:command_personal))
  743.     @command_window.set_handler(:status,    method(:command_personal))
  744.     if $imported["YSE-GuardianPairing"]
  745.       @command_window.set_handler(:gpair, method(:command_personal_actor))
  746.     end
  747.     process_custom_status_commands
  748.     if $game_temp.guardian_menu_command
  749.       @command_window.index = $game_temp.guardian_menu_command
  750.       $game_temp.guardian_menu_command = nil
  751.     end
  752.   end
  753.    
  754.   #--------------------------------------------------------------------------
  755.   # create_status_window
  756.   #--------------------------------------------------------------------------
  757.   def create_status_window
  758.     wy = @help_window.height
  759.     @status_window = Window_StatusGuardian.new(@command_window.width, wy)
  760.     @status_window.viewport = @viewport
  761.   end
  762.   
  763.   #--------------------------------------------------------------------------
  764.   # create_guardian_window
  765.   #--------------------------------------------------------------------------
  766.   def create_guardian_window
  767.     wy = @command_window.height + @command_window.y
  768.     @guardian_window = Window_MenuGuardian.new(0, wy)
  769.     @guardian_window.viewport = @viewport
  770.     @guardian_window.help_window = @help_window
  771.     @guardian_window.update_help
  772.     @guardian_window.status_window = @status_window
  773.   end
  774.   
  775.   #--------------------------------------------------------------------------
  776.   # create_actor_window
  777.   #--------------------------------------------------------------------------
  778.   def create_actor_window
  779.     @actor_window = Window_MenuActor.new
  780.     @actor_window.viewport = @viewport
  781.     @actor_window.set_handler(:ok,     method(:on_actor_ok))
  782.     @actor_window.set_handler(:cancel, method(:on_actor_cancel))
  783.   end
  784.   
  785.   #--------------------------------------------------------------------------
  786.   # command_personal
  787.   #--------------------------------------------------------------------------
  788.   def command_personal
  789.     @guardian_window.activate
  790.     @guardian_window.select_last
  791.     @guardian_window.set_handler(:ok,     method(:on_personal_ok))
  792.     @guardian_window.set_handler(:cancel, method(:on_personal_cancel))
  793.   end
  794.   
  795.   #--------------------------------------------------------------------------
  796.   # command_personal_actor
  797.   #--------------------------------------------------------------------------
  798.   def command_personal_actor
  799.     @actor_window.x = Graphics.width - @actor_window.width
  800.     @actor_window.show.activate
  801.     @actor_window.select_last
  802.   end
  803.   
  804.   #--------------------------------------------------------------------------
  805.   # on_personal_ok
  806.   #--------------------------------------------------------------------------
  807.   def on_personal_ok
  808.     case @command_window.current_symbol
  809.     when :skill
  810.       SceneManager.call(Scene_Skill)
  811.     when :equip
  812.       SceneManager.call(Scene_Equip)
  813.     when :status
  814.       SceneManager.call(Scene_Status)
  815.     end
  816.   end
  817.   
  818.   #--------------------------------------------------------------------------
  819.   # on_personal_cancel
  820.   #--------------------------------------------------------------------------
  821.   def on_personal_cancel
  822.     @guardian_window.unselect
  823.     @command_window.activate
  824.   end
  825.   
  826.   #--------------------------------------------------------------------------
  827.   # on_actor_ok
  828.   #--------------------------------------------------------------------------
  829.   def on_actor_ok
  830.     case @command_window.current_symbol
  831.     #--- Imported ---
  832.     when :gpair
  833.       SceneManager.call(Scene_GuardianPairing)
  834.     end
  835.   end
  836.   
  837.   #--------------------------------------------------------------------------
  838.   # on_actor_cancel
  839.   #--------------------------------------------------------------------------
  840.   def on_actor_cancel
  841.     @actor_window.hide.deactivate
  842.     @command_window.activate
  843.   end
  844.   
  845.   #--------------------------------------------------------------------------
  846.   # process_custom_status_commands
  847.   #--------------------------------------------------------------------------
  848.   def process_custom_status_commands
  849.     commands = YSE::GUARDIAN_MENU::COMMANDS
  850.     custom_commands = YSE::GUARDIAN_MENU::CUSTOM_STATUS_COMMANDS
  851.     for command in commands
  852.       next unless custom_commands.include?(command[0])
  853.       called_method = custom_commands[command[0]][2]
  854.       @command_window.set_handler(command[0], method(called_method))
  855.     end
  856.   end
  857.   
  858.   #--------------------------------------------------------------------------
  859.   # new method: command_guardian_pairing
  860.   #--------------------------------------------------------------------------
  861.   def command_guardian_pairing
  862.     SceneManager.call(Scene_GuardianPairing)
  863.   end
  864.   
  865.   #--------------------------------------------------------------------------
  866.   # command_name1
  867.   #--------------------------------------------------------------------------
  868.   def command_name1
  869.     # Do nothing
  870.   end
  871.   
  872.   #--------------------------------------------------------------------------
  873.   # command_name2
  874.   #--------------------------------------------------------------------------
  875.   def command_name2
  876.     # Do nothing
  877.   end
  878.   
  879. end # Scene_GuardianMenu

  880. #==============================================================================
  881. #
  882. # ▼ End of File
  883. #
  884. #==============================================================================
  885. #==============================================================================
  886. #
  887. # ▼ Yami Engine Ace - Guardian Series
  888. # -- Script: Guardian Pairing
  889. # -- Last Updated: 2012.03.15
  890. # -- Level: Easy
  891. # -- Requires: YSE - Guardian Basic
  892. #
  893. #==============================================================================

  894. $imported = {} if $imported.nil?
  895. $imported["YSE-GuardianPairing"] = true

  896. #==============================================================================
  897. # ▼ Updates
  898. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  899. # 2012.03.15 - Separated Boosting Attributes feature.
  900. #            - Changed a little in visuals.
  901. # 2012.03.14 - Finished Script.
  902. # 2012.03.13 - Started Script.
  903. #
  904. #==============================================================================
  905. # ▼ Introduction
  906. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  907. # This scripts provides "Equip Guardian to Actor" Feature for Guardians.
  908. # If you have YSE - Guardian Menu in scripts list, You must add :gpair to
  909. # Guardian Menu commands to show Pairing Menu.
  910. #
  911. #==============================================================================
  912. # ▼ Instructions
  913. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  914. # To install this script, open up your script editor and copy/paste this script
  915. # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
  916. #
  917. #==============================================================================
  918. # ▼ Compatibility
  919. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  920. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  921. # it will run with RPG Maker VX without adjusting.
  922. #
  923. #==============================================================================

  924. module YSE
  925.   module GUARDIAN_PAIRING
  926.    
  927.     # These Configurations contain visual and vocab things.
  928.     PAIRED_GUARDIAN = "%s"
  929.     NON_PAIRED = "没有神降"
  930.     VOCAB_MENU = "神之降临"    # Command Display in Main Menu.
  931.     MENU_ENABLE_SWITCH = 0      # Set to 0 if don't wanna use this function.
  932.    
  933.     COMMANDS = [ # The order at which the menu items are shown.
  934.       [    :pair,            "准备神降"], # Pairing command.
  935.       [    :unpair,       "解除神降"], # Un-Pairing command
  936.     ] # Do not remove this.
  937.    
  938.   end
  939. end

  940. #==============================================================================
  941. # ▼ Editting anything past this point may potentially result in causing
  942. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  943. # halitosis so edit at your own risk.
  944. #==============================================================================

  945. #==============================================================================
  946. # ■ Vocab
  947. #==============================================================================

  948. module Vocab
  949.   GuardianPairingMenu = YSE::GUARDIAN_PAIRING::VOCAB_MENU
  950.   PairedGuardian = YSE::GUARDIAN_PAIRING::PAIRED_GUARDIAN
  951.   NonPaired = YSE::GUARDIAN_PAIRING::NON_PAIRED
  952. end

  953. #==============================================================================
  954. # ■ Game_Temp
  955. #==============================================================================

  956. class Game_Temp
  957.   
  958.   #--------------------------------------------------------------------------
  959.   # public instance variables
  960.   #--------------------------------------------------------------------------
  961.   attr_accessor :guardian_pairing_menu_command
  962.   
  963. end # Game_Temp

  964. #==============================================================================
  965. # ■ Window_MenuCommand
  966. #==============================================================================

  967. class Window_MenuCommand < Window_Command
  968.   
  969.   #--------------------------------------------------------------------------
  970.   # alias method: make_command_list
  971.   #--------------------------------------------------------------------------
  972.   alias yse_add_main_commands_gp add_main_commands
  973.   def add_main_commands
  974.     yse_add_main_commands_gp
  975.     add_guardian_pairing_commands unless $imported["YEA-AceMenuEngine"]
  976.   end
  977.   
  978.   #--------------------------------------------------------------------------
  979.   # new method: guardian_command_enabled
  980.   #--------------------------------------------------------------------------
  981.   def guardian_pairing_command_enabled
  982.     return false if $game_party.guardians.size == 0
  983.     return true if YSE::GUARDIAN_PAIRING::MENU_ENABLE_SWITCH <= 0
  984.     return $game_switches[YSE::GUARDIAN_PAIRING::MENU_ENABLE_SWITCH]
  985.   end

  986.   #--------------------------------------------------------------------------
  987.   # new method: add_guardian_pairing_commands
  988.   #--------------------------------------------------------------------------
  989.   def add_guardian_pairing_commands
  990.     return if $imported["YSE-GuardianMenu"]
  991.     add_command(Vocab::GuardianPairingMenu,   :gpair,   guardian_pairing_command_enabled)
  992.   end
  993.   
  994. end # Window_MenuCommand

  995. #==============================================================================
  996. # ■ Scene_Menu
  997. #==============================================================================

  998. class Scene_Menu < Scene_MenuBase
  999.   
  1000.   #--------------------------------------------------------------------------
  1001.   # alias method: create_command_window
  1002.   #--------------------------------------------------------------------------
  1003.   alias yse_create_command_window_gp create_command_window
  1004.   def create_command_window
  1005.     yse_create_command_window_gp
  1006.     @command_window.set_handler(:gpair, method(:command_personal))
  1007.   end
  1008.   
  1009.   #--------------------------------------------------------------------------
  1010.   # alias method: on_personal_ok
  1011.   #--------------------------------------------------------------------------
  1012.   alias yse_on_personal_ok_gp on_personal_ok
  1013.   def on_personal_ok
  1014.     case @command_window.current_symbol
  1015.     when :gpair
  1016.       $game_party.target_actor = $game_party.members[@status_window.index]
  1017.       SceneManager.call(Scene_GuardianPairing)
  1018.     else
  1019.       yse_on_personal_ok_gp
  1020.     end
  1021.   end
  1022.   
  1023. end # Scene_Menu

  1024. #==============================================================================
  1025. # ■ Game_Actor
  1026. #==============================================================================

  1027. class Game_Actor < Game_Battler
  1028.   
  1029.   #--------------------------------------------------------------------------
  1030.   # public instance variables
  1031.   #--------------------------------------------------------------------------
  1032.   attr_accessor :pair_actor

  1033.   #--------------------------------------------------------------------------
  1034.   # alias method: setup
  1035.   #--------------------------------------------------------------------------
  1036.   alias yse_setup_gp setup
  1037.   def setup(actor_id)
  1038.     @guardians = []
  1039.     @pair_actor = nil
  1040.     yse_setup_gp(actor_id)
  1041.     clear_guardians
  1042.   end
  1043.   
  1044.   #--------------------------------------------------------------------------
  1045.   # new method: guardians
  1046.   #--------------------------------------------------------------------------
  1047.   def guardians
  1048.     @guardians.collect {|id| $game_actors[id] }
  1049.   end

  1050.   #--------------------------------------------------------------------------
  1051.   # new method: paired_actor
  1052.   #--------------------------------------------------------------------------
  1053.   def paired_actor
  1054.     @pair_actor.nil? ? nil : $game_actors[@pair_actor]
  1055.   end
  1056.   
  1057.   #--------------------------------------------------------------------------
  1058.   # new method: first_guardian
  1059.   #--------------------------------------------------------------------------
  1060.   def first_guardian
  1061.     guardians[0]
  1062.   end
  1063.   
  1064.   #--------------------------------------------------------------------------
  1065.   # new method: is_pair?
  1066.   #--------------------------------------------------------------------------
  1067.   def is_pair?
  1068.     guardian? ? !@pair_actor.nil? : guardians.size > 0
  1069.   end
  1070.   
  1071.   #--------------------------------------------------------------------------
  1072.   # new method: is_pair?
  1073.   #--------------------------------------------------------------------------
  1074.   def force_pair(guardian)
  1075.     @guardians.clear
  1076.     @guardians.push(guardian.id) if guardian
  1077.     @guardians.compact!
  1078.     refresh
  1079.   end
  1080.   
  1081.   #--------------------------------------------------------------------------
  1082.   # new method: is_pair?
  1083.   #--------------------------------------------------------------------------
  1084.   def pair(guardian)
  1085.     return if guardians.include?(guardian)
  1086.     clear_guardians
  1087.     @guardians.push(guardian.id)
  1088.     guardian.pair_actor = self.id
  1089.     refresh
  1090.   end
  1091.   
  1092.   #--------------------------------------------------------------------------
  1093.   # new method: clear_guardians
  1094.   #--------------------------------------------------------------------------
  1095.   def clear_guardians
  1096.     guardians.each { |g| g.pair_actor = nil }
  1097.     @guardians.clear
  1098.   end
  1099.    
  1100.   #--------------------------------------------------------------------------
  1101.   # alias method: gain_exp
  1102.   #--------------------------------------------------------------------------
  1103.   alias yse_gain_exp_gp gain_exp
  1104.   def gain_exp(exp)
  1105.     yse_gain_exp_gp(exp)
  1106.     return if guardian?
  1107.     guardians.each { |guardian|
  1108.       guardian.gain_guardian_exp(guardian, exp)
  1109.     }
  1110.   end
  1111.   
  1112.   #--------------------------------------------------------------------------
  1113.   # new method: gain_guardian_exp
  1114.   #--------------------------------------------------------------------------
  1115.   def gain_guardian_exp(guardian,exp)
  1116.     return if YSE::GUARDIAN::ALL_GUARDIAN_GAIN_EXP
  1117.     guardian.gain_exp(exp)
  1118.   end
  1119.   
  1120. end # Game_Actor

  1121. #==============================================================================
  1122. # ■ Window_Base
  1123. #==============================================================================

  1124. class Window_Base < Window
  1125.   
  1126.   #--------------------------------------------------------------------------
  1127.   # new method: draw_actor_guardian
  1128.   #--------------------------------------------------------------------------
  1129.   def draw_actor_guardian(actor, x, y, width = 180)
  1130.     change_color(normal_color)
  1131.     str = Vocab::PairedGuardian
  1132.     if actor.guardian?
  1133.       name = actor.paired_actor.nil? ? Vocab::NonPaired : actor.paired_actor.name
  1134.     else
  1135.       name = actor.first_guardian.nil? ? Vocab::NonPaired : actor.first_guardian.name
  1136.     end
  1137.     str =  sprintf(str, name)
  1138.     draw_text(x, y, width, line_height, str, 2)
  1139.   end
  1140.   
  1141. end # Window_Base
  1142.   
  1143. #==============================================================================
  1144. # ■ Window_GuardianPairingMenuCommand
  1145. #==============================================================================

  1146. class Window_GuardianPairingMenuCommand < Window_Command
  1147.   
  1148.   #--------------------------------------------------------------------------
  1149.   # initialize
  1150.   #--------------------------------------------------------------------------
  1151.   def initialize(dx, dy)
  1152.     super(dx, dy)
  1153.   end
  1154.   
  1155.   #--------------------------------------------------------------------------
  1156.   # window_width
  1157.   #--------------------------------------------------------------------------
  1158.   def window_width; return 160; end
  1159.   
  1160.   #--------------------------------------------------------------------------
  1161.   # visible_line_number
  1162.   #--------------------------------------------------------------------------
  1163.   def visible_line_number; return 4; end
  1164.    
  1165.   #--------------------------------------------------------------------------
  1166.   # alignment
  1167.   #--------------------------------------------------------------------------
  1168.   def alignment; return 1; end
  1169.   
  1170.   #--------------------------------------------------------------------------
  1171.   # ok_enabled?
  1172.   #--------------------------------------------------------------------------
  1173.   def ok_enabled?
  1174.     return handle?(current_symbol)
  1175.   end
  1176.   
  1177.   #--------------------------------------------------------------------------
  1178.   # process_ok
  1179.   #--------------------------------------------------------------------------
  1180.   def process_ok
  1181.     $game_temp.guardian_pairing_menu_command = self.index
  1182.     super
  1183.   end
  1184.   
  1185.   #--------------------------------------------------------------------------
  1186.   # make_command_list
  1187.   #--------------------------------------------------------------------------
  1188.   def make_command_list
  1189.     for command in YSE::GUARDIAN_PAIRING::COMMANDS
  1190.       enable = command[0] == :pair ? $game_party.guardians.size > 0 : $game_party.target_actor.is_pair?
  1191.       add_command(command[1], command[0], enable)
  1192.     end
  1193.   end
  1194.   
  1195. end # Window_GuardianPairingMenuCommand

  1196. #==============================================================================
  1197. # ■ Window_MenuGuardianPair
  1198. #==============================================================================

  1199. class Window_MenuGuardianPair < Window_MenuGuardian
  1200.   
  1201.   #--------------------------------------------------------------------------
  1202.   # window_width
  1203.   #--------------------------------------------------------------------------
  1204.   def window_width
  1205.     Graphics.width
  1206.   end
  1207.   
  1208.   #--------------------------------------------------------------------------
  1209.   # col_max
  1210.   #--------------------------------------------------------------------------
  1211.   def col_max
  1212.     2
  1213.   end
  1214.   
  1215.   #--------------------------------------------------------------------------
  1216.   # unpair=
  1217.   #--------------------------------------------------------------------------
  1218.   def unpair=(flag)
  1219.     @unpair = flag
  1220.     refresh
  1221.   end
  1222.   
  1223.   #--------------------------------------------------------------------------
  1224.   # enable?
  1225.   #--------------------------------------------------------------------------
  1226.   def enable?(actor)
  1227.     @unpair ? actor.is_pair? : !actor.is_pair?
  1228.   end
  1229.   
  1230.   #--------------------------------------------------------------------------
  1231.   # current_item_enabled?
  1232.   #--------------------------------------------------------------------------
  1233.   def current_item_enabled?
  1234.     enable?($game_party.guardians[index])
  1235.   end
  1236.   
  1237.   #--------------------------------------------------------------------------
  1238.   # draw_guardian_status
  1239.   #--------------------------------------------------------------------------
  1240.   def draw_guardian_status(actor, dx, dy, dw)
  1241.     change_color(normal_color)
  1242.     draw_actor_guardian(actor, dx, dy, dw)
  1243.   end
  1244.   
  1245. end # Window_MenuGuardianPair

  1246. #==============================================================================
  1247. # ■ Window_PairingStatus
  1248. #==============================================================================

  1249. class Window_PairingStatus < Window_SkillStatus
  1250.   
  1251.   #--------------------------------------------------------------------------
  1252.   # draw_actor_simple_status
  1253.   #--------------------------------------------------------------------------
  1254.   def draw_actor_simple_status(actor, dx, dy)
  1255.     draw_actor_name(actor, dx, dy)
  1256.     draw_actor_level(actor, dx, dy + line_height * 1)
  1257.     dw = contents.width - dx - 124
  1258.     draw_actor_guardian(actor, dx + 120, dy, dw)
  1259.     draw_actor_hp(actor, dx + 120, dy + line_height * 1, dw)
  1260.     draw_actor_mp(actor, dx + 120, dy + line_height * 2, dw)
  1261.   end
  1262.   
  1263. end # Window_PairingStatus

  1264. #==============================================================================
  1265. # ■ Scene_GuardianPairing
  1266. #==============================================================================

  1267. class Scene_GuardianPairing < Scene_MenuBase
  1268.   
  1269.   #--------------------------------------------------------------------------
  1270.   # start
  1271.   #--------------------------------------------------------------------------
  1272.   def start
  1273.     super
  1274.     create_help_window
  1275.     create_command_window
  1276.     create_status_window
  1277.     create_guardian_window
  1278.   end
  1279.   
  1280.   #--------------------------------------------------------------------------
  1281.   # create_command_window
  1282.   #--------------------------------------------------------------------------
  1283.   def create_command_window
  1284.     wy = @help_window.height
  1285.     @command_window = Window_GuardianPairingMenuCommand.new(0, wy)
  1286.     @command_window.viewport = @viewport
  1287.     @command_window.set_handler(:cancel,   method(:return_scene))
  1288.     @command_window.set_handler(:pair,   method(:command_pair))
  1289.     @command_window.set_handler(:unpair,   method(:command_unpair))
  1290.     if $game_temp.guardian_pairing_menu_command
  1291.       @command_window.index = $game_temp.guardian_pairing_menu_command
  1292.       $game_temp.guardian_pairing_menu_command = nil
  1293.     end
  1294.   end
  1295.   
  1296.   #--------------------------------------------------------------------------
  1297.   # create_status_window
  1298.   #--------------------------------------------------------------------------
  1299.   def create_status_window
  1300.     wy = @help_window.height
  1301.     @status_window = Window_PairingStatus.new(@command_window.width, wy)
  1302.     @status_window.viewport = @viewport
  1303.     @status_window.actor = $game_party.target_actor
  1304.   end
  1305.   
  1306.   #--------------------------------------------------------------------------
  1307.   # create_guardian_window
  1308.   #--------------------------------------------------------------------------
  1309.   def create_guardian_window
  1310.     wx = $imported["YSE-GuardianBoostStats"] ? 232 : 0
  1311.     wy = @command_window.height + @command_window.y
  1312.     @guardian_window = Window_MenuGuardianPair.new(wx, wy)
  1313.     @guardian_window.viewport = @viewport
  1314.     @guardian_window.help_window = @help_window
  1315.     @guardian_window.update_help
  1316.   end
  1317.   
  1318.   #--------------------------------------------------------------------------
  1319.   # command_actor
  1320.   #--------------------------------------------------------------------------
  1321.   def command_unpair
  1322.     process_unpair
  1323.   end
  1324.   
  1325.   #--------------------------------------------------------------------------
  1326.   # command_pair
  1327.   #--------------------------------------------------------------------------
  1328.   def command_pair
  1329.     @guardian_window.activate
  1330.     @guardian_window.select_last
  1331.     @guardian_window.set_handler(:ok,     method(:on_guardian_ok))
  1332.     @guardian_window.set_handler(:cancel, method(:on_guardian_cancel))
  1333.   end
  1334.   
  1335.   #--------------------------------------------------------------------------
  1336.   # on_guardian_ok
  1337.   #--------------------------------------------------------------------------
  1338.   def on_guardian_ok
  1339.     case @command_window.current_symbol
  1340.     when :pair
  1341.       if not $game_party.menu_actor.is_pair?
  1342.         process_pair
  1343.       else
  1344.         Sound.play_buzzer
  1345.       end
  1346.     when :unpair
  1347.       if $game_party.target_actor.is_pair?
  1348.         process_unpair
  1349.       else
  1350.         Sound.play_buzzer
  1351.       end
  1352.     end
  1353.     @guardian_window.unpair = false
  1354.   end
  1355.   
  1356.   #--------------------------------------------------------------------------
  1357.   # on_guardian_cancel
  1358.   #--------------------------------------------------------------------------
  1359.   def on_guardian_cancel
  1360.     @guardian_window.unselect
  1361.     @guardian_window.unpair = false
  1362.     @command_window.activate
  1363.   end
  1364.   
  1365.   #--------------------------------------------------------------------------
  1366.   # process_pair
  1367.   #--------------------------------------------------------------------------
  1368.   def process_pair
  1369.     $game_party.target_actor.pair($game_party.menu_actor)
  1370.     @command_window.refresh
  1371.     @guardian_window.activate
  1372.     @guardian_window.select_last
  1373.     @status_window.refresh
  1374.   end
  1375.   
  1376.   #--------------------------------------------------------------------------
  1377.   # process_unpair
  1378.   #--------------------------------------------------------------------------
  1379.   def process_unpair
  1380.     $game_party.target_actor.clear_guardians
  1381.     @command_window.refresh
  1382.     @command_window.activate
  1383.     @guardian_window.refresh
  1384.     @status_window.refresh
  1385.   end
  1386.   
  1387. end # Scene_GuardianPairing

  1388. #==============================================================================
  1389. #
  1390. # ▼ End of File
  1391. #
  1392. #==============================================================================
  1393. #==============================================================================
  1394. #
  1395. # ¥ Yami Engine Ace - Guardian Series
  1396. # -- Script: Guardian Boost Stats
  1397. # -- Last Updated: 2012.03.15
  1398. # -- Level: Easy
  1399. # -- Requires: YSE - Guardian Pairing
  1400. #
  1401. #==============================================================================

  1402. $imported = {} if $imported.nil?
  1403. $imported["YSE-GuardianBoostStats"] = true

  1404. #==============================================================================
  1405. # ¥ Updates
  1406. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  1407. # 2012.03.15 - Started and Finished Script.
  1408. #
  1409. #==============================================================================
  1410. # ¥ Introduction
  1411. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  1412. # This script provides a new feature for YSE - Guardian Pairing, which boost
  1413. # stats for an actor by Guardian's attributes.
  1414. #
  1415. #==============================================================================
  1416. # ¥ Instructions
  1417. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  1418. # To install this script, open up your script editor and copy/paste this script
  1419. # to an open slot below ¥ Materials/‘fÞ but above ¥ Main. Remember to save.
  1420. #
  1421. #==============================================================================
  1422. # ¥ Compatibility
  1423. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  1424. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  1425. # it will run with RPG Maker VX without adjusting.
  1426. #
  1427. #==============================================================================

  1428. module YSE
  1429.   module GUARDIAN_PAIRING
  1430.    
  1431.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  1432.     # - Attributes Settings -
  1433.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  1434.     # This section adjusts the stats plus and traits plus of actor who paired
  1435.     # with a guardian.
  1436.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  1437.     ATTRIBUTES = { # Start.
  1438.       :stats      =>  true, # Stats injection
  1439.       :traits     =>  true, # Traits injection
  1440.       :skills     =>  true, # Skills injection
  1441.     } # Done.
  1442.     PARAMVAR = 0.2
  1443.   end
  1444. end  

  1445. #==============================================================================
  1446. # ¥ Editting anything past this point may potentially result in causing
  1447. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  1448. # halitosis so edit at your own risk.
  1449. #==============================================================================

  1450. #==============================================================================
  1451. # ¡ Game_Actor
  1452. #==============================================================================

  1453. class Game_Actor < Game_Battler
  1454.   
  1455.   #--------------------------------------------------------------------------
  1456.   # alias method: param_plus
  1457.   #--------------------------------------------------------------------------
  1458.   alias yse_param_plus_gbs param_plus
  1459.   def param_plus(param_id)
  1460.     return yse_param_plus_gbs(param_id) unless YSE::GUARDIAN_PAIRING::ATTRIBUTES[:stats]
  1461.     return yse_param_plus_gbs(param_id) if guardian?
  1462.     guardians.compact.inject(yse_param_plus_gbs(param_id)) {|r, item| r += item.param(param_id)*YSE::GUARDIAN_PAIRING::PARAMVAR }
  1463.   end
  1464.   
  1465.   #--------------------------------------------------------------------------
  1466.   # alias method: feature_objects
  1467.   #--------------------------------------------------------------------------
  1468.   alias yse_feature_objects_gbs feature_objects
  1469.   def feature_objects
  1470.     return yse_feature_objects_gbs unless YSE::GUARDIAN_PAIRING::ATTRIBUTES[:traits]
  1471.     return yse_feature_objects_gbs if guardian?
  1472.     result = yse_feature_objects_gbs
  1473.     guardians.each { |g| result += g.feature_objects }
  1474.     result
  1475.   end
  1476.   
  1477.   #--------------------------------------------------------------------------
  1478.   # alias method: skills
  1479.   #--------------------------------------------------------------------------
  1480.   alias yse_skills_gbs skills
  1481.   def skills
  1482.     return yse_skills_gbs unless YSE::GUARDIAN_PAIRING::ATTRIBUTES[:skills]
  1483.     return yse_skills_gbs if guardian?
  1484.     result = yse_skills_gbs
  1485.     guardians.each { |g| result = result | g.skills }
  1486.     result
  1487.   end
  1488.   
  1489. end # Game_Actor

  1490. #==============================================================================
  1491. # ¡ Window_MenuGuardianPair
  1492. #==============================================================================

  1493. class Window_MenuGuardianPair < Window_MenuGuardian
  1494.   
  1495.   #--------------------------------------------------------------------------
  1496.   # window_width
  1497.   #--------------------------------------------------------------------------
  1498.   def window_width
  1499.     Graphics.width - 232
  1500.   end
  1501.   
  1502.   #--------------------------------------------------------------------------
  1503.   # col_max
  1504.   #--------------------------------------------------------------------------
  1505.   def col_max
  1506.     1
  1507.   end
  1508.   
  1509.   #--------------------------------------------------------------------------
  1510.   # actor_status=
  1511.   #--------------------------------------------------------------------------
  1512.   def actor_status=(actor_status)
  1513.     @actor_status = actor_status
  1514.   end
  1515.   
  1516.   #--------------------------------------------------------------------------
  1517.   # update
  1518.   #--------------------------------------------------------------------------
  1519.   def update
  1520.     super
  1521.     update_actor_status
  1522.   end
  1523.   
  1524.   #--------------------------------------------------------------------------
  1525.   # update_actor_status
  1526.   #--------------------------------------------------------------------------
  1527.   def update_actor_status
  1528.     return unless @actor_status
  1529.     return unless $game_party.guardians[index]
  1530.     return @actor_status.clear_temp if index < 0
  1531.     item = $game_party.guardians[index]
  1532.     @actor_status.set_temp_actor(item)
  1533.   end
  1534.   
  1535. end # Window_MenuGuardianPair

  1536. #==============================================================================
  1537. # ¡ Window_GuardianPairStatus
  1538. #==============================================================================

  1539. class Window_GuardianPairStatus < Window_Base
  1540.   
  1541.   #--------------------------------------------------------------------------
  1542.   # initialize
  1543.   #--------------------------------------------------------------------------
  1544.   def initialize(x, y)
  1545.     super(x, y, window_width, Graphics.height - y)
  1546.     @actor = $game_party.target_actor
  1547.     temp_actor = Marshal.load(Marshal.dump(@actor))
  1548.     @temp_actor = temp_actor
  1549.     refresh
  1550.   end
  1551.   
  1552.   #--------------------------------------------------------------------------
  1553.   # window_width
  1554.   #--------------------------------------------------------------------------
  1555.   def window_width
  1556.     232
  1557.   end

  1558.   #--------------------------------------------------------------------------
  1559.   # visible_line_number
  1560.   #--------------------------------------------------------------------------
  1561.   def visible_line_number
  1562.     return 8
  1563.   end
  1564.   
  1565.   #--------------------------------------------------------------------------
  1566.   # actor
  1567.   #--------------------------------------------------------------------------
  1568.   def actor
  1569.     @actor
  1570.   end
  1571.   
  1572.   #--------------------------------------------------------------------------
  1573.   # set_temp_actor
  1574.   #--------------------------------------------------------------------------
  1575.   def set_temp_actor(guardian)
  1576.     return unless @temp_actor
  1577.     return if @temp_actor.guardians.include?(guardian)
  1578.     @temp_actor.force_pair(guardian)
  1579.     refresh
  1580.   end
  1581.   
  1582.   #--------------------------------------------------------------------------
  1583.   # clear_temp
  1584.   #--------------------------------------------------------------------------
  1585.   def clear_temp
  1586.     temp_actor = Marshal.load(Marshal.dump(@actor))
  1587.     @temp_actor = temp_actor
  1588.     refresh
  1589.   end
  1590.   
  1591.   #--------------------------------------------------------------------------
  1592.   # refresh
  1593.   #--------------------------------------------------------------------------
  1594.   def refresh
  1595.     contents.clear
  1596.     8.times { |i| draw_actor_param(i, 0, line_height * i, contents_width) }
  1597.   end
  1598.   
  1599.   #--------------------------------------------------------------------------
  1600.   # draw_actor_param
  1601.   #--------------------------------------------------------------------------
  1602.   def draw_actor_param(param_id, dx, dy, dw)
  1603.     colour = Color.new(0, 0, 0, translucent_alpha/2)
  1604.     rect = Rect.new(dx+1, dy+1, dw-2, line_height-2)
  1605.     contents.fill_rect(rect, colour)
  1606.     change_color(system_color)
  1607.     draw_text(dx+4, dy, dw-8, line_height, Vocab::param(param_id))
  1608.     change_color(normal_color)
  1609.     draw_text(dx+4, dy, dw-8, line_height, changed_param(param_id), 2)
  1610.   end
  1611.   
  1612.   #--------------------------------------------------------------------------
  1613.   # changed_param
  1614.   #--------------------------------------------------------------------------
  1615.   def changed_param(param_id)
  1616.     result = ""
  1617.     result += @actor.param(param_id).to_s
  1618.     return result if @temp_actor.nil?
  1619.     return result if @temp_actor.guardians == @actor.guardians
  1620.     result += "¨ " + @temp_actor.param(param_id).to_s
  1621.     return result
  1622.   end

  1623. end # Window_GuardianPairStatus

  1624. #==============================================================================
  1625. # ¡ Scene_GuardianPairing
  1626. #==============================================================================

  1627. class Scene_GuardianPairing < Scene_MenuBase
  1628.   
  1629.   #--------------------------------------------------------------------------
  1630.   # alias method: start
  1631.   #--------------------------------------------------------------------------
  1632.   alias yse_start_gbs start
  1633.   def start
  1634.     yse_start_gbs
  1635.     create_actor_status_window
  1636.   end

  1637.   #--------------------------------------------------------------------------
  1638.   # new method: create_actor_status_window
  1639.   #--------------------------------------------------------------------------
  1640.   def create_actor_status_window
  1641.     wx = 0
  1642.     wy = @command_window.height + @command_window.y
  1643.     @actor_status_window = Window_GuardianPairStatus.new(wx, wy)
  1644.     @actor_status_window.viewport = @viewport
  1645.     @guardian_window.actor_status = @actor_status_window
  1646.   end
  1647.   
  1648.   #--------------------------------------------------------------------------
  1649.   # alias method: process_pair
  1650.   #--------------------------------------------------------------------------
  1651.   alias yse_process_pair_gbs process_pair
  1652.   def process_pair
  1653.     yse_process_pair_gbs
  1654.     @actor_status_window.refresh
  1655.   end
  1656.   
  1657.   #--------------------------------------------------------------------------
  1658.   # alias method: process_unpair
  1659.   #--------------------------------------------------------------------------
  1660.   alias yse_process_unpair_gbs process_unpair
  1661.   def process_unpair
  1662.     yse_process_unpair_gbs
  1663.     @actor_status_window.refresh
  1664.   end
  1665.   
  1666. end # Scene_GuardianPairing

  1667. #==============================================================================
  1668. #
  1669. # ¥ End of File
  1670. #
  1671. #==============================================================================
复制代码

以上是主模块!角色如果要设置为守护精灵,备注里写<guardian>
然后就可以进行神降了

点评

请问那个备注在哪里啊?  发表于 2012-3-20 17:52

评分

参与人数 1星屑 +40 收起 理由
无双sxa + 40 感谢分享。

查看全部评分

梦石
0
星屑
64
在线时间
294 小时
注册时间
2011-7-31
回帖
647
发表于 2012-3-24 15:35:56 | 显示全部楼层
什么意思= =不明白

点评

就是召唤精灵或是神兽伙伴一起战斗吧。  发表于 2012-3-24 16:01
如果繁华被摧毁,就让我好好地睡.....
回复

使用道具 举报

梦石
0
星屑
45
在线时间
138 小时
注册时间
2011-11-15
回帖
210
发表于 2012-3-26 20:15:53 | 显示全部楼层
太狠了吧,这么长,看着就崩
具体能做点什么尼,英文看不懂
回复

使用道具 举报

梦石
0
星屑
77
在线时间
12 小时
注册时间
2012-10-19
回帖
11
发表于 2013-3-16 11:33:25 | 显示全部楼层
不明白,是召唤伙伴吗???
不用这么费劲吧…………

点评

你挖坟了。  发表于 2013-3-17 09:29
回复

使用道具 举报

彭格列I世

梦石
0
星屑
168
在线时间
566 小时
注册时间
2012-8-17
回帖
1539
发表于 2013-4-3 12:45:50 | 显示全部楼层
完全用事件就可以了吧?

赏金猎人 -- Bounty Hunter 预告贴(点击图片或者这里进入)
交流群组:321810846

小刀的论坛!!点击这里!
小刀的论坛!!点击这里!
小刀的论坛!!点击这里!
小刀的论坛!!点击这里!
小刀的论坛!!点击这里!
小刀的论坛!!点击这里!
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部