赞 | 671 |
VIP | 62 |
好人卡 | 144 |
积分 | 335 |
经验 | 110435 |
最后登录 | 2024-11-1 |
在线时间 | 5108 小时 |
Lv5.捕梦者
- 梦石
- 0
- 星屑
- 33480
- 在线时间
- 5108 小时
- 注册时间
- 2012-11-19
- 帖子
- 4878
|
简单的改一下还是行得通的
- #==============================================================================
- module XdRs
- #--------------------------------------------------------------------------
- #每升一级,角色增加的攻击力,物防和魔防。格式:角色ID => [攻击力,物防,魔防]
- Level_add_data = {1=>[5,3,3],2=>[2,3,3]}
- #--------------------------------------------------------------------------
- #攻击以4项属性的百分比附加。
- #格式:[力量百分比,敏捷百分比,速度百分比,智力百分比]
- Properties_atk_rate = [50,0,0,0]
- #--------------------------------------------------------------------------
- #物防以4项属性的百分比附加。
- Properties_pdef_rate = [0,30,0,0]
- #--------------------------------------------------------------------------
- #魔防以4项属性的百分比附加。
- Properties_mdef_rate = [0,0,0,30]
- #--------------------------------------------------------------------------
- #未装备武器时攻击方动画ID。(格式:角色ID=>动画ID)
- Eh_anm_id1 = {1=>10,2=>12}
- #--------------------------------------------------------------------------
- #未装备武器时对象方动画ID。(格式:角色ID=>动画ID)
- Eh_anm_id2 = {1=>20,2=>21}
- #==============================================================================
- #--------------------------------------------------------------------------
- def self.ar_rate(type)
- return [Properties_atk_rate,Properties_pdef_rate,Properties_mdef_rate][type]
- end
- #--------------------------------------------------------------------------
- def self.level_add(actor_id)
- return Level_add_data[actor_id] || [0,0,0]
- end
- #--------------------------------------------------------------------------
- def self.eh_anm1(actor_id)
- return Eh_anm_id1[actor_id] || 0
- end
- #--------------------------------------------------------------------------
- def self.eh_anm2(actor_id)
- return Eh_anm_id2[actor_id] || 0
- end
- end
- #==============================================================================
- class Game_Actor < Game_Battler
- #--------------------------------------------------------------------------
- def level_increase(type)
- return XdRs.level_add(@actor_id)[type] * @level
- end
- #--------------------------------------------------------------------------
- def attribute_increase(type)
- data = [str,dex,agi,int]
- rate = XdRs.ar_rate(type)
- 4.times{|i| data[i] = data[i] * rate[i] / 100}
- return eval(data.join("+")) + level_increase(type)
- end
- #--------------------------------------------------------------------------
- def has_weapon?
- return !!$data_weapons[@weapon_id]
- end
- #--------------------------------------------------------------------------
- alias xr_aia_base_atk base_atk
- def base_atk
- return xr_aia_base_atk + attribute_increase(0)
- end
- #--------------------------------------------------------------------------
- alias xr_aia_base_pdef base_pdef
- def base_pdef
- return xr_aia_base_pdef + attribute_increase(1)
- end
- #--------------------------------------------------------------------------
- alias xr_aia_base_mdef base_mdef
- def base_mdef
- return xr_aia_base_mdef + attribute_increase(2)
- end
- #--------------------------------------------------------------------------
- alias xr_aia_animation1_id animation1_id
- def animation1_id
- return has_weapon? ? xr_aia_animation1_id : XdRs.eh_anm1(@actor_id)
- end
- #--------------------------------------------------------------------------
- alias xr_aia_animation2_id animation2_id
- def animation2_id
- return has_weapon? ? xr_aia_animation2_id : XdRs.eh_anm2(@actor_id)
- end
- end
- #==============================================================================
复制代码 |
|