module Fy #下面填职业增加的属性对应数值,职业ID=>[四项属性增加值] , 四项属性依次是: #[力量,灵巧,速度,魔力] , 下面只有楼主所说的战士(职业ID:1)法师(职业ID:2), #其他就照格式添加。 Class_additions = {1=>[10,0,0,0], 2=>[0,0,0,10]} end class Game_Actor < Game_Battler #-------------------------------------------------------------------------- # ● 获取基本力量 #-------------------------------------------------------------------------- alias additions_str base_str def base_str return [[additions_str+Fy::Class_additions[@class_id][0], 1].max, 999].min end #-------------------------------------------------------------------------- # ● 获取基本灵巧 #-------------------------------------------------------------------------- alias additions_dex base_dex def base_dex return [[additions_dex+Fy::Class_additions[@class_id][1], 1].max, 999].min end #-------------------------------------------------------------------------- # ● 获取基本速度 #-------------------------------------------------------------------------- alias additions_agi base_agi def base_agi return [[additions_agi+Fy::Class_additions[@class_id][2], 1].max, 999].min end #-------------------------------------------------------------------------- # ● 获取基本魔力 #-------------------------------------------------------------------------- alias additions_int base_int def base_int return [[additions_int+Fy::Class_additions[@class_id][3], 1].max, 999].min end end
职业位置.png (5.84 KB, 下载次数: 14)
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |