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

Project1

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

[已经解决] 如何增加一项“幸运”属性,不是HP那个

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
21 小时
注册时间
2012-10-17
帖子
27
跳转到指定楼层
1
发表于 2012-12-20 15:48:33 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
本帖最后由 少林和尚 于 2012-12-20 16:20 编辑

RMVX里面除了HP和MP还有攻击力、防御力、精神力、敏捷性这四个属性,我想再添加一项“幸运”属性。不是这个“【教程】让汝的游戏多一个属性(类似于HP、SP)”教程里面说的
我知道要在脚本里面添加一个luck变量,但具体加在哪里和要怎样加还不清楚,希望能有高手来帮帮忙,小弟在此先行谢过了

我想要的效果具体如下图



Lv4.逐梦者

送快递的水表员

梦石
10
星屑
4852
在线时间
3303 小时
注册时间
2012-6-27
帖子
7160

开拓者贵宾

2
发表于 2012-12-20 16:26:39 | 只看该作者
最简单的办法……

你去下载RMVA来用吧……
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
21 小时
注册时间
2012-10-17
帖子
27
3
 楼主| 发表于 2012-12-20 16:32:40 | 只看该作者
Password 发表于 2012-12-20 16:26
最简单的办法……

你去下载RMVA来用吧……

RMVA能够直接添加?不用改脚本?

不过我还是想学一学如何添加,希望能教一下

点评

我就是想自己添加这样一个属性,但是我不知道在脚本哪里添加和如何添加,麻烦高手指点一下啊  发表于 2012-12-20 16:44
属性只有存在才可以添加!RMVX默认脚本没有幸运属性,除非你自己加  发表于 2012-12-20 16:41
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
48
在线时间
2459 小时
注册时间
2011-12-18
帖子
1484
4
发表于 2012-12-20 16:52:04 | 只看该作者
是只需要一个幸运属性吗?
这是一个深不见底的坑,这是一个广袤无边的坑,我才刚刚放上了一抔泥土……

《六道·陈国篇》开坑了……↓点我
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
21 小时
注册时间
2012-10-17
帖子
27
5
 楼主| 发表于 2012-12-20 16:53:27 | 只看该作者
a364774426 发表于 2012-12-20 16:52
是只需要一个幸运属性吗?

添加一个和添加多个方法不 一样吗?
我现在是想添加一个,以后的游戏可能需要添加多个
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
48
在线时间
2459 小时
注册时间
2011-12-18
帖子
1484
6
发表于 2012-12-20 17:00:32 | 只看该作者
如果是单纯的一个,我这就有一个现成的增加运气属性的脚本,如果是多个就另当别论了。有很多需要考虑的,如属性的成长,外物对属性的上限增加还有装备对属性的影响。
这是一个深不见底的坑,这是一个广袤无边的坑,我才刚刚放上了一抔泥土……

《六道·陈国篇》开坑了……↓点我
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
21 小时
注册时间
2012-10-17
帖子
27
7
 楼主| 发表于 2012-12-20 17:11:01 | 只看该作者
a364774426 发表于 2012-12-20 17:00
如果是单纯的一个,我这就有一个现成的增加运气属性的脚本,如果是多个就另当别论了。有很多需要考虑的,如 ...

好的,我想看看你写的单个属性的。另外你是自己从新编写一个,还是修改VX里面的脚本的呢?
我在脚本里面找过actor和battler这两个类,都没有找到原始的变量所在
另外,你在写单个“幸运”属性的时候没有把你说的哪些因素考虑进去吗?
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
48
在线时间
2459 小时
注册时间
2011-12-18
帖子
1484
8
发表于 2012-12-20 17:18:28 | 只看该作者
不是我写的,我从外站扒来的
  1. #==============================================================================
  2. #    Luck Stat
  3. #    Version: 1.0a
  4. #    Author: modern algebra (rmrk.net)
  5. #    Date: Easter Sunday, 2011
  6. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  7. #  Description:
  8. #
  9. #   Chances are you've never thought about this, but there are a lot of random
  10. #  things going on in RMVX. Which items drop when you kill monsters; if states
  11. #  are applied or released; whether you hit or miss or evade or land a critical
  12. #  hit, all of these things are random. This script adds a new statistic which
  13. #  is intended to modify the chances of these various things happening: Luck!
  14. #  It also makes gold drop amounts random and affects that as well.
  15. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  16. #  Instructions:
  17. #
  18. #   In order to add this script to your game, simply paste it into it its own
  19. #   slot in the Script Editor (F11) above Main but below other custom scripts.
  20. #
  21. #   Roll on down to line 77 for more detailed configuration, but in brief:
  22. #  line 79 is where you change the label for the stat. You can set whether it
  23. #  is shown in the Status scene at line 80 (and where at lines 81 and 83). To
  24. #  see it in the Equip scene, you can set line 88 to true. The most important
  25. #  one is at line 91, where you set the growth for the luck stat of each actor.
  26. #
  27. #   There are also a number of note tags you can use. For any item or state,
  28. #  you can use the following codes (where x and y are integers):
  29. #        \luck[x]
  30. #        \luck[y%]
  31. #  The first adds x directly to the actor's luck, while the second adds that
  32. #  percentage of the actor's total current luck to itself. For weapons and
  33. #  armors, this will happen immediately and only for as long as the armor is
  34. #  equipped. They can also be combined and then the equipment will add (y% + x)
  35. #  luck to the actor when it is equipped. For items, the luck will be added
  36. #  permanently once the item us used, just like for the regular stats. For
  37. #  states, the luck changes will only apply so long as the state is applied. As
  38. #  well for states, you can set a tag to identify whether the state has a
  39. #  positive or negative effect. This is so your luck stat can make it more
  40. #  likely to contract the positive states and less likely to contract the
  41. #  negative ones. In order to identify a state as positive, use this:
  42. #        \positive
  43. #  If not identified as positive, it will assume the state is negative.
  44. #
  45. #   In terms of how this stat should affect how you plan out the game, the stat
  46. #  is intended to be used at lower values - it can work for higher values as
  47. #  well, but it will generally become less effective. The easiest way to think
  48. #  of the stat is as the chance to get more chances. So, if an actor has 50
  49. #  luck and a 4% chance to critical, the Luck stat is a 50% chance to get
  50. #  another 4% chance to critical if you miss the first time. When your luck
  51. #  goes over 100, then you will automatically get a second chance and the
  52. #  remainder is the chance to have a third chance (or fourth, fifth, etc...).
  53. #  So if luck is 225, then it would be three chances at 4% and a 25% chance to
  54. #  have a fourth chance. It affects gold differently. For that, it simply takes
  55. #  the mean average of the party's luck and you randomly get somewhere between
  56. #  0 and that percentage extra gold. So if the gold drop would be 70 and your
  57. #  party has an average luck of 50, then you would get anywhere between 70 and
  58. #  105 gold.
  59. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  60. #  Compatibility:
  61. #    TDS Weapon Unleash - This script should function and modify the chance to
  62. #      unleash. Must place Luck below Weapon Unleash though
  63. #    MA Note Editor - this will work with the Note Editor as long as you have
  64. #      the note editor's general compatibility patch and it's above this script
  65. #    MA FSCMS - The Luck Stat will show up in the Status window
  66. #    YEM Status Menu - You can set the icon at line 124 and the stat should
  67. #     show up in the scene, but it will be cut off if there isn't room for it.
  68. #    YEM Equipment Overhaul - You can set the icon at line 124 and the luck
  69. #     stat should show up, but it will be cut off if there isn't room for it.
  70. #    Others - There shouldn't be errors as long as the Luck script is below
  71. #      them, but it might not function exactly as expected if those scripts
  72. #      vastly alter battles or change the status or equip scenes. If you notice
  73. #      anything odd, please post in my topic and I will try to help.
  74. #==============================================================================

  75. #\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
  76. #    EDITABLE REGION
  77. #||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
  78. MALS_VOCAB_LUCK = "运气" # The label to identify the stat in Status and Equip
  79. MALS_STATUS_SHOW = false # Whether to show Luck in Status
  80. MALS_STATUS_X = -1       #  The x position of luck in the status window. When -1,
  81.                          # it will be at the same x as the other parameters
  82. MALS_STATUS_Y = -1       #  The y position of luck in the status window. When -1,
  83.                          # it will be just below other stats. If more negative,
  84.                          # it will be below the other stats + the absolute value
  85.                          # of this. This is so you can reposition it if you have
  86.                          # other added stats.
  87. MALS_EQUIP_SHOW = false  #  Whether to show Luck in the Equip Scene. This will
  88.                          # likely not work with anything but the default scene
  89.                          # and YEM Equip Menu
  90. MALS_LUCK_GROWTH = { # <- Do not touch
  91. #  MALS_LUCK_GROWTH - this is where you can set the level growth of the luck
  92. # for every actor. You can do it in a few ways: either by an array where you
  93. # set it individually for each level, or by a formula encapsulated in quotation
  94. # marks. The 0 => line will be the default growth if you don't set a specific
  95. # one for the actor, while each subsequent line (1 =>; 2 =>) will be the growth
  96. # for the actor with that ID. Remember to put a comma at the end of each.
  97. #   EXAMPLES:
  98. #     0 => "4 * level / 3",
  99. #       This is the default growth and it will mean the actor gains 1 luck
  100. #      every level and 2 every third level.
  101. #     8 => "3 + (level*2)",
  102. #       This would be the growth for Actor 8 and he or she would start out with
  103. #      5 luck and gain 2 more every level.
  104. #     5 => [5, 6, 8, 9, 10, 12, 13, 14, 16, 17, 18, 20, 22, 23, 25, 26, 28, 29,
  105. #           30, 32, 33, 35, 36, 38, 39, 41, 42, 44, 45, 47, 47, 48, 50, 51, 52,
  106. #           54, 55, 56, 58, 59, 61, 62, 64, 65, 67, 68, 69, 71, 73, 74, 75, 76,
  107. #           77, 79, 80, 81, 82, 84, 86, 87, 88, 90, 91, 92, 94, 95, 96, 98, 100,
  108. #           101, 102, 104, 105, 107, 110, 111, 112, 114, 116, 117, 118, 120,
  109. #           121, 121, 124, 126, 127, 128, 129, 131, 132, 134, 136, 139, 140,
  110. #           142, 143, 145, 148],
  111. #       This would be the growth for actor 5 and he or she would start with 5
  112. #      luck at level 1 and would have the set amount at each level (so 6 at
  113. #      level 2, 8 at level 3, 9 at level 4, etc...)
  114.   0 => "1*0",
  115.   2 => "1*0",
  116.   8 => "1*0",
  117. } # <- DO not touch
  118. MALS_LUCK_ICON = 103    # This is icon for Luck if you are using YEM scripts
  119. #||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
  120. #    END EDITABLE REGION
  121. #//////////////////////////////////////////////////////////////////////////////
  122. MALS_LUCK_GROWTH.default = MALS_LUCK_GROWTH[0] # <- Do not touch

  123. $imported = {} unless $imported
  124. $imported["LuckStat"] = true

  125. #==============================================================================
  126. # *** RPG
  127. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  128. #  Summary of Changes:
  129. #    modified classes - BaseItem; State; Actor; Enemy
  130. #==============================================================================

  131. module RPG

  132. #============================================================================
  133. # ** BaseItem
  134. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  135. #  Summary of Changes:
  136. #    new method - luck; luck_rate
  137. #============================================================================

  138. class BaseItem
  139.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  140.   # * Luck
  141.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  142.   def luck
  143.     [url=home.php?mod=space&uid=213401]@luck[/url] = (self.note[/\\LUCK\[(-?\d+)\]/i] != nil ? $1.to_i : 0) if !@luck
  144.     return @luck
  145.   end
  146.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  147.   # * Luck Rate
  148.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  149.   def luck_rate
  150.     @luck_rate = (self.note[/\\LUCK\[(-?\d+)%\]/i] != nil ? $1.to_f / 100.0 : 0) if !@luck_rate
  151.     return @luck_rate
  152.   end
  153.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  154.   # * Compatibility with Note Editor
  155.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  156.   if self.method_defined? (:ma_reset_note_values)
  157.     alias mlg_luk_rstnotes_4rf2 ma_reset_note_values
  158.     def ma_reset_note_values (*args)
  159.       mlg_luk_rstnotes_4rf2 (*args)
  160.       @luck = nil
  161.       @luck_rate = nil
  162.     end
  163.   end
  164. end

  165. #============================================================================
  166. # ** State
  167. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  168. #  Summary of Changes:
  169. #    new method - luck; luck_rate
  170. #    aliased method - auto_release_prob
  171. #============================================================================

  172. class State
  173.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  174.   # * Luck
  175.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  176.   def luck
  177.     @luck = (self.note[/\\LUCK\[(-?\d+)\]/i] != nil ? $1.to_i : 0) if !@luck
  178.     return @luck
  179.   end
  180.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  181.   # * Luck Rate
  182.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  183.   def luck_rate
  184.     @luck_rate = (self.note[/\\LUCK\[(-?\d+)%\]/i] != nil ? $1.to_f / 100.0 : 0) if !@luck_rate
  185.     return @luck_rate
  186.   end
  187.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  188.   # * Positive State?
  189.   #    This allows you to specify some states as positive, thus meaning luck
  190.   #   will favourably influence its application instead of unfavourably
  191.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  192.   def positive_state?
  193.     @positivity = self.note[/\\POSITIVE/i] != nil if @positivity == nil
  194.     return @positivity
  195.   end
  196.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  197.   # * Auto Release Probability
  198.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  199.   alias ma_lk_autorel_5tc7 auto_release_prob unless self.method_defined? (:ma_lk_autorel_5tc7)
  200.   def auto_release_prob (*args)
  201.     prob = ma_lk_autorel_5tc7 (*args)
  202.     if $game_temp && positive_state?
  203.       prob = 2*prob - $game_temp.luck_prob (prob)
  204.     else
  205.       prob = $game_temp.luck_prob (prob)
  206.     end
  207.     return prob
  208.   end
  209.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  210.   # * Compatibility with Note Editor
  211.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  212.   if self.method_defined? (:ma_reset_note_values)
  213.     alias mlg_luk_rstnotes_4rf2 ma_reset_note_values
  214.     def ma_reset_note_values (*args)
  215.       mlg_luk_rstnotes_4rf2 (*args)
  216.       @luck = nil
  217.       @luck_rate = nil
  218.       @positivity = nil
  219.     end
  220.   end
  221. end

  222. #==============================================================================
  223. # ** Actor
  224. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  225. #  Summary of Changes:
  226. #    new method - luck
  227. #==============================================================================

  228. class Actor
  229.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  230.   # * Luck
  231.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  232.   def luck (level)
  233.     @luck_base = [] if !@luck_base
  234.     if @luck_base[level] == nil
  235.       growth = MALS_LUCK_GROWTH[self.id]
  236.       if growth.is_a? (Array)
  237.         @luck_base[level] = growth[[level - 1, growth.size - 1].min]
  238.       else
  239.         eval ("@luck_base[level] = #{growth}")
  240.       end
  241.     end
  242.     return @luck_base[level]
  243.   end
  244. end

  245. #==============================================================================
  246. # ** Enemy
  247. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  248. #  Summary of Changes:
  249. #    new method - luck
  250. #    modified class - DropItem
  251. #==============================================================================

  252. class Enemy
  253.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  254.   # * Luck
  255.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  256.   def luck
  257.     @luck = (self.note[/\\LUCK\[(-?\d+)\]/i] != nil ? $1.to_i : 0) if @luck == nil
  258.     return @luck
  259.   end
  260.   
  261.   #==========================================================================
  262.   # ** DropItem
  263.   #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  264.   #  Summary of Changes:
  265.   #    aliased method - denominator
  266.   #==========================================================================
  267.   
  268.   class DropItem
  269.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  270.     # * Denominator
  271.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  272.     alias mlgb_luk_denmn_4rt2 denominator unless self.method_defined? (:mlgb_luk_denmn_4rt2)
  273.     def denominator (*args)
  274.       denom = mlgb_luk_denmn_4rt2 (*args) # Run Original Method
  275.       percent = $game_temp.luck_prob (100 / denom)
  276.       return (100.0 / percent).round
  277.     end
  278.   end
  279.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  280.   # * Compatibility with Note Editor
  281.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  282.   if self.method_defined? (:ma_reset_note_values)
  283.     alias mlg_luk_rstnotes_4rf2 ma_reset_note_values
  284.     def ma_reset_note_values (*args)
  285.       mlg_luk_rstnotes_4rf2 (*args)
  286.       @luck_base = []
  287.     end
  288.   end
  289. end

  290. #==============================================================================
  291. #  TDS Weapon Unleash Compatibility
  292. #==============================================================================
  293. class Weapon
  294.   if self.method_defined? (:unleash_info)
  295.     alias ma_luk_com_wpnunls_8ib3 unleash_info
  296.     def unleash_info (*args)
  297.       array = ma_luk_com_wpnunls_8ib3 (*args)
  298.       array[1] = $game_temp.luck_prob (array[1]) if array && $game_temp
  299.       return array
  300.     end
  301.   end
  302. end

  303. end

  304. #==============================================================================
  305. # *** Vocab
  306. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  307. #  Summary of Changes:
  308. #    new method - luck
  309. #==============================================================================

  310. module Vocab
  311.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  312.   # * Luck
  313.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  314.   def self.luck
  315.     return MALS_VOCAB_LUCK
  316.   end
  317. end

  318. #==============================================================================
  319. # ** Game_Temp
  320. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  321. #  Summary of Changes:
  322. #    new accessor - luck_mod
  323. #    aliased method - initialize
  324. #==============================================================================

  325. class Game_Temp
  326.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  327.   # * Public Instance Variables
  328.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  329.   attr_accessor :luck_mod
  330.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  331.   # * Object Initialization
  332.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  333.   alias mrgb_lc_iniz_1wd9 initialize
  334.   def initialize (*args)
  335.     mrgb_lc_iniz_1wd9 (*args) # Run Original Method
  336.     @luck_mod = 0
  337.   end
  338.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  339.   # * Luck Probability
  340.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  341.   def luck_prob (prob, luck = @luck_mod)
  342.     return prob if prob == 100 || luck <= 0
  343.     t = luck / 100
  344.     t += 1 if rand (100) < (luck % 100)
  345.     return t == 0 ? prob : ((1.0 - (((100 - prob).to_f / 100.0)**(t + 1))) * 100).to_i
  346.   end
  347. end

  348. #==============================================================================
  349. # ** Game_Battler
  350. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  351. #  Summary of Changes:
  352. #    aliased methods - clear_extra_values; item_growth_effect; item_test;
  353. #      remove_states_auto; make_attack_damage_value; calc_hit; calc_eva
  354. #    new method - luck; luck=
  355. #==============================================================================

  356. class Game_Battler
  357.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  358.   # * Object Initialization
  359.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  360.   alias malg_luck_clrexvals_5yq1 clear_extra_values
  361.   def clear_extra_values (*args)
  362.     malg_luck_clrexvals_5yq1 (*args) # Run Original Method
  363.     @luck_plus = 0
  364.   end
  365.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  366.   # * Item Growth Effect Application
  367.   #     user : Item user
  368.   #     item : item
  369.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  370.   alias modrna_itmgrowth_eff_6yh4 item_growth_effect
  371.   def item_growth_effect(user, item, *args)
  372.     modrna_itmgrowth_eff_6yh4 (user, item, *args)
  373.     @luck_plus += item.luck + (item.luck_rate*self.luck)
  374.   end
  375.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  376.   # * Item Test
  377.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  378.   alias mdlg_luc_itmtst_5rx2 item_test
  379.   def item_test(user, item, *args)
  380.     return true if item.luck != 0 || item.luck_rate != 0
  381.     return mdlg_luc_itmtst_5rx2 (user, item, *args)
  382.   end
  383.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  384.   # * Auto Remove States
  385.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  386.   alias odagb_lck_rmvautostt_6jn2 remove_states_auto
  387.   def remove_states_auto (*args)
  388.     $game_temp.luck_mod = self.luck
  389.     odagb_lck_rmvautostt_6jn2 (*args) # Auto Remove States
  390.     $game_temp.luck_mod = 0
  391.   end
  392.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  393.   # * Make Attack Damage Value
  394.   #    do luck_mod here instead of cri so as not to corrupt the general stat
  395.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  396.   alias mlg_luck_dmg_atk_9uc4 make_attack_damage_value
  397.   def make_attack_damage_value (attacker, *args)
  398.     $game_temp.luck_mod = attacker.luck
  399.     mlg_luck_dmg_atk_9uc4 (attacker, *args) # Run Original Method
  400.     $game_temp.luck_mod = 0
  401.   end
  402.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  403.   # * Calculation of Final Hit Ratio
  404.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  405.   alias maba_luk_htclc_7uz3 calc_hit
  406.   def calc_hit (user, *args)
  407.     hit = maba_luk_htclc_7uz3 (user, *args)
  408.     return $game_temp.luck_prob (hit, user.luck)
  409.   end
  410.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  411.   # * Calculate Final Evasion Rate
  412.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  413.   alias malgbr_lck_clceva_3da7 calc_eva
  414.   def calc_eva(user, *args)
  415.     eva = malgbr_lck_clceva_3da7 (user, *args)
  416.     return $game_temp.luck_prob (eva, self.luck)
  417.   end
  418.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  419.   # * Luck
  420.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  421.   def luck
  422.     n = [[base_luck + @luck_plus, 1].max, 9999].min
  423.     floats = 1.0
  424.     for state in states
  425.       floats += state.luck_rate
  426.       n += state.luck_rate
  427.     end
  428.     n *= floats
  429.     n = [[Integer(n), 1].max, 9999].min
  430.     return n
  431.   end
  432.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  433.   # * Set Luck
  434.   #    new_luck : the new value of luck
  435.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  436.   def luck= (new_luck)
  437.     @luck_plus += new_luck - self.luck
  438.     @luck_plus = [[@luck_plus, -9999].max, 9999].min
  439.   end
  440.   #==========================================================================
  441.   #  TDS Weapon Unleash Compatibility
  442.   #==========================================================================
  443.   if self.method_defined? (:weapon_unleash?)
  444.     alias ma_lk_cmp_tdswu_5th1 weapon_unleash?
  445.     def weapon_unleash? (*args)
  446.       $game_temp.luck_mod = luck
  447.       v = ma_lk_cmp_tdswu_5th1 (*args)
  448.       $game_temp.luck_mod = 0
  449.       return v
  450.     end
  451.   end
  452. end

  453. #==============================================================================
  454. # ** Game_Actor
  455. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  456. #  Summary of Changes:
  457. #    aliased method - state_probability; cri
  458. #    new method - base_luck
  459. #==============================================================================

  460. class Game_Actor
  461.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  462.   # * Get Basic Luck
  463.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  464.   def base_luck
  465.     n = actor.luck (@level)
  466.     floats = 1.0
  467.     for equip in equips.compact
  468. #      floats += equip.luck_rate
  469.       n += equip.luck
  470.     end
  471.     n = (n*floats).to_i
  472.     return n
  473.   end
  474.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  475.   # * State Probability
  476.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  477.   alias mag_luck_probstate_8id2 state_probability
  478.   def state_probability (state_id, *args)
  479.     default = mag_luck_probstate_8id2 (state_id, *args)
  480.     $game_temp.luck_mod = luck
  481.     if $data_states[state_id].positive_state?
  482.       return $game_temp.luck_prob (default)
  483.     else
  484.       return 2*default - ($game_temp.luck_prob (default))
  485.     end
  486.     $game_temp.luck_mod = 0
  487.   end
  488.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  489.   # * Critical
  490.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  491. # alias malg_luk_cri_7uk9 cri
  492.   #def cri (*args)
  493.    # return $game_temp.luck_prob (malg_luk_cri_7uk9 (*args))
  494.   #end
  495. end

  496. #==============================================================================
  497. # ** Game_Enemy
  498. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  499. #  Summary of Changes:
  500. #    aliased method - state_probability
  501. #    new method - base_luck
  502. #==============================================================================
  503. class Game_Enemy
  504.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  505.   # * Get Basic Luck
  506.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  507.   def base_luck
  508.     return enemy.luck
  509.   end
  510. end

  511. =begin
  512. class Game_Enemy
  513.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  514.   # * Get Basic Luck
  515.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  516.   def base_luck
  517.     return enemy.luck
  518.   end
  519.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  520.   # * State Probability
  521.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  522.   alias mag_luck_stateprob_4tg2 state_probability
  523.   def state_probability (state_id, *args)
  524.     default = mag_luck_stateprob_4tg2 (state_id, *args)
  525.     $game_temp.luck_mod = luck
  526.     if $data_states[state_id].positive_state?
  527.       return $game_temp.luck_prob (default)
  528.     else
  529.       return 2*default - ($game_temp.luck_prob (default))
  530.     end
  531.     $game_temp.luck_mod = 0
  532.   end
  533.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  534.   # * Critical
  535.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  536.   alias malg_lck_crit_2wq1 cri
  537.   def cri (*args)
  538.     return $game_temp.luck_prob (malg_lck_crit_2wq1 (*args))
  539.   end
  540. end
  541. =end

  542. #==============================================================================
  543. # ** Game_Unit
  544. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  545. #  Summary of Changes:
  546. #    new method - luck_average
  547. #==============================================================================

  548. class Game_Unit
  549.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  550.   # * Average Luck
  551.   #    This takes the mean of the party member's luck for gold & item drop %
  552.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  553.   def luck_average
  554.     luck = 0
  555.     existing_members.each { |actor| luck += actor.luck }
  556.     return (luck / [1, existing_members.size].max)
  557.   end
  558. end

  559. #==============================================================================
  560. # ** Game Troop
  561. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  562. #  Summary of Changes:
  563. #    aliased methods - gold_total; make_drop_items
  564. #==============================================================================

  565. class Game_Troop
  566.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  567.   # * Gold Total
  568.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  569.   alias mrgba_luk_glddrop_7uj1 gold_total
  570.   def gold_total (*args)
  571.     total = mrgba_luk_glddrop_7uj1 (*args)
  572.     total += rand (1 + (total * ($game_party.luck_average / 100.0)).to_i)
  573.     return total
  574.   end
  575.   
  576.   alias mrgba_luk_glddrop_9uj1 exp_total
  577.   def exp_total (*args)
  578.     total = mrgba_luk_glddrop_9uj1 (*args)
  579.     total += rand (1 + (total * ($game_party.luck_average / 100.0)).to_i)
  580.     return total
  581.   end
  582.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  583.   # * Make Drop Items
  584.   #    luck_mod done here to avoid corrupting denominator
  585.   #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  586.   alias mgba_luk_dropitms_8fv2 make_drop_items
  587.   def make_drop_items (*args)
  588.     $game_temp.luck_mod = $game_party.luck_average
  589.     v = mgba_luk_dropitms_8fv2 (*args)
  590.     $game_temp.luck_mod = 0
  591.     return v
  592.   end
  593. end

  594. #==============================================================================
  595. # ** Window_Status
  596. #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  597. #  Summary of Changes:
  598. #    aliased method - draw_parameters
  599. #==============================================================================
  600. if MALS_STATUS_SHOW
  601.   class Window_Status
  602.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  603.     # * Draw Parameters
  604.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  605.     alias ma_luk_drwparams_2fg4 draw_parameters
  606.     def draw_parameters (x, y, *args)
  607.       ma_luk_drwparams_2fg4 (x, y, *args)
  608.       x = MALS_STATUS_X if MALS_STATUS_X != -1
  609.       y = (MALS_STATUS_Y != -1 ? MALS_STATUS_Y : y + WLH*4 + MALS_STATUS_Y.abs - 1)
  610.       self.contents.font.color = system_color
  611.       self.contents.draw_text(x, y, 120, WLH, Vocab::luck)
  612.       self.contents.font.color = normal_color
  613.       self.contents.draw_text(x + 120, y, 36, WLH, @actor.luck, 2)
  614.     end
  615.   end
  616. end

  617. if MALS_EQUIP_SHOW
  618.   #============================================================================
  619.   # ** Window_EquipStatus
  620.   #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  621.   #  Summary of Changes:
  622.   #    modified_constant - WLH
  623.   #    aliased method - refresh
  624.   #    new method - set_luck
  625.   #============================================================================
  626.   class Window_EquipStatus
  627.     WLH = 20
  628.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  629.     # * Set Luck
  630.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  631.     def set_luck (new_luck)
  632.       if @new_luck != new_luck
  633.         @new_luck = new_luck
  634.         refresh
  635.       end
  636.     end
  637.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  638.     # * Refresh
  639.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  640.     alias mdrn_luk_eqpref_7us6 refresh
  641.     def refresh (*args)
  642.       if self.contents.height < 120
  643.         self.height = 152
  644.         create_contents
  645.       end
  646.       mdrn_luk_eqpref_7us6 (*args)
  647.       self.contents.font.color = system_color
  648.       self.contents.draw_text(4, WLH*5, 80, WLH, Vocab::luck)
  649.       self.contents.font.color = normal_color
  650.       self.contents.draw_text(90, WLH*5, 30, WLH, @actor.luck, 2)
  651.       self.contents.font.color = system_color
  652.       self.contents.draw_text(122, WLH*5, 20, WLH, ">", 1)
  653.       if @new_luck != nil
  654.         self.contents.font.color = new_parameter_color(@actor.luck, @new_luck)
  655.         self.contents.draw_text(142, WLH*5, 30, WLH, @new_luck, 2)
  656.       end
  657.     end
  658.   end
  659.   
  660.   #============================================================================
  661.   # ** Scene Equip
  662.   #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  663.   #  Summary of Changes:
  664.   #    aliased method
  665.   #============================================================================
  666.   
  667.   class Scene_Equip
  668.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  669.     # * Update Status Window
  670.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  671.     alias malg_luck_updstatwin_6yh3 update_status_window
  672.     def update_status_window (*args)
  673.       if @equip_window.active
  674.         @status_window.set_luck (nil)
  675.       elsif @item_window.active
  676.         temp_actor = @actor.clone
  677.         temp_actor.change_equip(@equip_window.index, @item_window.item, true)
  678.         @status_window.set_luck (temp_actor.luck)
  679.       end
  680.       malg_luck_updstatwin_6yh3 (*args)
  681.     end
  682.   end
  683. end

  684. #==============================================================================
  685. # YEM COMPATIBILITY
  686. #==============================================================================

  687. #  Status Menu Melody
  688. if $imported["StatusMenuMelody"] && MALS_STATUS_SHOW
  689.   #==========================================================================
  690.   # ** Window Status General
  691.   #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  692.   #  Summary of Changes:
  693.   #    aliased method - draw_parameters
  694.   #==========================================================================
  695.   class Window_Status_General
  696.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  697.     # * Draw Parameters
  698.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  699.     alias mlgb_luk_drwparams_6yv2 draw_parameters
  700.     def draw_parameters (x, y, *args)
  701.       mlgb_luk_drwparams_6yv2 (x, y, *args)
  702.       x += 24
  703.       x = MALS_STATUS_X if MALS_STATUS_X != -1
  704.       y = (MALS_STATUS_Y != -1 ? MALS_STATUS_Y : y + (WLH*(2 + YEM::STATUS::SHOWN_STATS.size)) + MALS_STATUS_Y.abs - 1)
  705.       draw_icon(MALS_LUCK_ICON, x, y)
  706.       self.contents.font.color = system_color
  707.       self.contents.draw_text(x + 24, y, 48, WLH, Vocab::luck)
  708.       self.contents.font.color = normal_color
  709.       self.contents.draw_text(x + 72, y, 84, WLH, @actor.luck, 2)
  710.     end
  711.   end
  712. end
  713. #  Equipment Overhaul
  714. if $imported["EquipmentOverhaul"] && MALS_EQUIP_SHOW
  715.   #==========================================================================
  716.   # ** Window EquipStat
  717.   #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  718.   #  Summary of Changes:
  719.   #    aliased methods - draw_actor_stats; draw_clone_stats
  720.   #==========================================================================
  721.   class Window_EquipStat
  722.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  723.     # * Draw Actor Stats
  724.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  725.     alias modrn_yemequip_drwactrstats_8uf2 draw_actor_stats
  726.     def draw_actor_stats (*args)
  727.       modrn_yemequip_drwactrstats_8uf2 (*args) # Run Original Method
  728.       dy = WLH*YEM::EQUIP::SHOWN_STATS.size
  729.       draw_icon(MALS_LUCK_ICON, 0, dy)
  730.       self.contents.font.size = YEM::EQUIP::STAT_FONT_SIZE
  731.       self.contents.font.color = system_color
  732.       self.contents.draw_text(24, dy, 60, WLH, Vocab.luck, 0)
  733.       self.contents.font.color = normal_color
  734.       self.contents.draw_text(84, dy, 45, WLH, @actor.luck, 2)
  735.       self.contents.font.color = system_color
  736.       self.contents.font.size = Font.default_size
  737.       self.contents.draw_text(129, dy, 30, WLH, YEM::EQUIP::VOCAB[:arrow], 1)
  738.       if @equip_index == nil or (@equip != nil and [email protected]?(@equip))
  739.         self.contents.font.size = YEM::EQUIP::STAT_FONT_SIZE
  740.         self.contents.font.color = normal_color
  741.         self.contents.draw_text(159, dy, 45, WLH, @actor.luck, 2)
  742.       end
  743.     end
  744.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  745.     # * Draw Clone Stats
  746.     #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  747.     alias modrn_yemequip_luk_clnst_5tb9 draw_clone_stats
  748.     def draw_clone_stats (*args)
  749.       modrn_yemequip_luk_clnst_5tb9 (*args) # Run Original Method
  750.       dy = WLH*YEM::EQUIP::SHOWN_STATS.size
  751.       if @clone.luck > @actor.luck
  752.         self.contents.font.color = power_up_color
  753.       elsif @clone.luck < @actor.luck
  754.         self.contents.font.color = power_down_color
  755.       else
  756.         self.contents.font.color = normal_color
  757.       end
  758.       self.contents.font.size = YEM::EQUIP::STAT_FONT_SIZE
  759.       self.contents.draw_text(159, dy, 45, WLH, @clone.luck, 2)
  760.     end
  761.   end
  762. end
复制代码
有些我不用的功能被我注释掉了,你需要就自己改回来吧。
唔,用法很简单的

评分

参与人数 1星屑 +80 收起 理由
咕噜 + 80 认可答案

查看全部评分

这是一个深不见底的坑,这是一个广袤无边的坑,我才刚刚放上了一抔泥土……

《六道·陈国篇》开坑了……↓点我
回复 支持 反对

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
50
在线时间
21 小时
注册时间
2012-10-17
帖子
27
9
 楼主| 发表于 2012-12-20 17:24:04 | 只看该作者
a364774426 发表于 2012-12-20 17:18
不是我写的,我从外站扒来的有些我不用的功能被我注释掉了,你需要就自己改回来吧。
唔,用法很简单的  ...

好的,谢谢了
是新建一个新的脚本,然后把这些代码粘贴进去吗?
回复 支持 反对

使用道具 举报

Lv2.观梦者

梦石
0
星屑
483
在线时间
750 小时
注册时间
2012-11-10
帖子
924
10
发表于 2012-12-21 19:00:48 | 只看该作者
少林和尚 发表于 2012-12-20 17:24
好的,谢谢了
是新建一个新的脚本,然后把这些代码粘贴进去吗?

注意要黏贴在Main之前

评分

参与人数 1星屑 +30 收起 理由
咕噜 + 30 认可答案

查看全部评分

有本事就来阻止我啊,主体单元『天照』!
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-11-16 03:01

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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