赞 0
VIP 35
好人卡 32
积分 6
经验 37746
最后登录 2024-11-22
在线时间 924 小时
Lv2.观梦者
梦石 0
星屑 605
在线时间 924 小时
注册时间 2011-5-11
帖子 438
本帖最后由 345912390 于 2023-12-2 21:57 编辑
class Game_Enemy < Game_Battler
#前缀名
PREFIX_TABLE = [ '' ,'【金】•' ,'【木】•' ,'【火】•' ,'【水】•' ,'【土】•' ]
#前缀属性
PREFIX_PARAMS=[ [ 0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ] ,
[ 97 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ] ,
[ 75 ,200 ,0 ,0 ,0 ,0 ,0 ,0 ] ,
[ 43 ,0 ,70 ,0 ,0 ,0 ,0 ,0 ] ,
[ 28 ,0 ,0.5 ,0 ,0 ,0 ,0 ,0 ] ,
[ 39 ,0 ,0 ,0 ,0 ,0 ,0 ,20 ] ,]
#--------------------------------------------------------------------------
# ● 定义实例变量
#--------------------------------------------------------------------------
attr_accessor :prefix_index #前缀序号
alias old_initialize initialize
def initialize( index, enemy_id)
old_initialize( index, enemy_id)
@prefix_index =rand ( PREFIX_TABLE.size ) if @prefix_index ==nil
#p @prefix_index
end
#--------------------------------------------------------------------------
# ● 获取显示名称
#--------------------------------------------------------------------------
alias old_name name
def name
PREFIX_TABLE[ @prefix_index] +@original_name + ( @plural ? letter : "" )
end
#--------------------------------------------------------------------------
# ● 获取普通能力的基础值
#--------------------------------------------------------------------------
alias old_param_base param_base
def param_base( param_id)
@prefix_index =rand ( PREFIX_TABLE.size ) if @prefix_index ==nil
#return enemy.params[param_id]
if PREFIX_PARAMS[ @prefix_index] [ param_id] .abs <1 then #按百分比计算
return enemy.params [ param_id] *( 1 +PREFIX_PARAMS[ @prefix_index] [ param_id] )
else #按实际值计算
return enemy.params [ param_id] +PREFIX_PARAMS[ @prefix_index] [ param_id]
end
#return enemy.params[param_id]
end
end
class Game_Enemy < Game_Battler
#前缀名
PREFIX_TABLE = [ '' ,'【金】•' ,'【木】•' ,'【火】•' ,'【水】•' ,'【土】•' ]
#前缀属性
PREFIX_PARAMS=[ [ 0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ] ,
[ 97 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ] ,
[ 75 ,200 ,0 ,0 ,0 ,0 ,0 ,0 ] ,
[ 43 ,0 ,70 ,0 ,0 ,0 ,0 ,0 ] ,
[ 28 ,0 ,0.5 ,0 ,0 ,0 ,0 ,0 ] ,
[ 39 ,0 ,0 ,0 ,0 ,0 ,0 ,20 ] ,]
#--------------------------------------------------------------------------
# ● 定义实例变量
#--------------------------------------------------------------------------
attr_accessor :prefix_index #前缀序号
alias old_initialize initialize
def initialize( index, enemy_id)
old_initialize( index, enemy_id)
@prefix_index =rand ( PREFIX_TABLE.size ) if @prefix_index ==nil
#p @prefix_index
end
#--------------------------------------------------------------------------
# ● 获取显示名称
#--------------------------------------------------------------------------
alias old_name name
def name
PREFIX_TABLE[ @prefix_index] +@original_name + ( @plural ? letter : "" )
end
#--------------------------------------------------------------------------
# ● 获取普通能力的基础值
#--------------------------------------------------------------------------
alias old_param_base param_base
def param_base( param_id)
@prefix_index =rand ( PREFIX_TABLE.size ) if @prefix_index ==nil
#return enemy.params[param_id]
if PREFIX_PARAMS[ @prefix_index] [ param_id] .abs <1 then #按百分比计算
return enemy.params [ param_id] *( 1 +PREFIX_PARAMS[ @prefix_index] [ param_id] )
else #按实际值计算
return enemy.params [ param_id] +PREFIX_PARAMS[ @prefix_index] [ param_id]
end
#return enemy.params[param_id]
end
end