#作者BY:SOULSAGA
#使用方法:设定一个属性名称为HP突破0后在敌人数据库设定这属性为有效后
#该敌人的HP值便会在后面补0 写00就补两个0 多个属性可以叠加 即使不写0写其他数字也可以..大概吧
#例子
#HP突破0
#SP突破0
#力量突破0
#灵巧突破00
#速度突破000
#魔力突破00
#攻击力突破0
#物防突破00
#魔防突破000
#破限开关设定
HP突破=true
SP突破=true
STR突破=true
DEX突破=true
AGI突破=true
INT突破=true
ATK突破=true
PDEF突破=true
MDEF突破=true
class Game_Enemy < Game_Battler
#--------------------------------------------------------------------------
# ● 获取基本 MaxHP
#--------------------------------------------------------------------------
if HP突破
def base_maxhp
能力=$data_enemies[@enemy_id].maxhp.to_s
突破=""
for e in 1..$data_system.elements.size
if $data_enemies[@enemy_id].element_ranks[e] != 3 and $data_system.elements[e] =~ /HP突破(\d+)/
突破+=$1
能力+=突破
end
end
return 能力.to_i
end
end
#--------------------------------------------------------------------------
# ● 获取基本 MaxSP
#--------------------------------------------------------------------------
if SP突破
def base_maxsp
能力=$data_enemies[@enemy_id].maxsp.to_s
突破=""
for e in 1..$data_system.elements.size
if $data_enemies[@enemy_id].element_ranks[e] != 3 and $data_system.elements[e] =~ /SP突破(\d+)/
突破+=$1
能力+=突破
end
end
return 能力.to_i
end
end
#--------------------------------------------------------------------------
# ● 获取基本力量
#--------------------------------------------------------------------------
if STR突破
def base_str
能力=$data_enemies[@enemy_id].str.to_s
突破=""
for e in 1..$data_system.elements.size
if $data_enemies[@enemy_id].element_ranks[e] != 3 and $data_system.elements[e] =~ /力量突破(\d+)/
突破+=$1
能力+=突破
end
end
return 能力.to_i
end
end
#--------------------------------------------------------------------------
# ● 获取基本灵巧
#--------------------------------------------------------------------------
if DEX突破
def base_dex
能力=$data_enemies[@enemy_id].dex.to_s
突破=""
for e in 1..$data_system.elements.size
if $data_enemies[@enemy_id].element_ranks[e] != 3 and $data_system.elements[e] =~ /灵巧突破(\d+)/
突破+=$1
能力+=突破
end
end
return 能力.to_i
end
end
#--------------------------------------------------------------------------
# ● 获取基本速度
#--------------------------------------------------------------------------
if AGI突破
def base_agi
能力=$data_enemies[@enemy_id].agi.to_s
突破=""
for e in 1..$data_system.elements.size
if $data_enemies[@enemy_id].element_ranks[e] != 3 and $data_system.elements[e] =~ /速度突破(\d+)/
突破+=$1
能力+=突破
end
end
return 能力.to_i
end
end
#--------------------------------------------------------------------------
# ● 获取基本魔力
#--------------------------------------------------------------------------
if INT突破
def base_int
能力=$data_enemies[@enemy_id].int.to_s
突破=""
for e in 1..$data_system.elements.size
if $data_enemies[@enemy_id].element_ranks[e] != 3 and $data_system.elements[e] =~ /魔力突破(\d+)/
突破+=$1
能力+=突破
end
end
return 能力.to_i
end
end
#--------------------------------------------------------------------------
# ● 获取基本攻击力
#--------------------------------------------------------------------------
if ATK突破
def base_atk
能力=$data_enemies[@enemy_id].atk.to_s
突破=""
for e in 1..$data_system.elements.size
if $data_enemies[@enemy_id].element_ranks[e] != 3 and $data_system.elements[e] =~ /攻击力突破(\d+)/
突破+=$1
能力+=突破
end
end
return 能力.to_i
end
end
#--------------------------------------------------------------------------
# ● 获取基本物理防御
#--------------------------------------------------------------------------
if PDEF突破
def base_pdef
能力=$data_enemies[@enemy_id].pdef.to_s
突破=""
for e in 1..$data_system.elements.size
if $data_enemies[@enemy_id].element_ranks[e] != 3 and $data_system.elements[e] =~ /物防突破(\d+)/
突破+=$1
能力+=突破
end
end
return 能力.to_i
end
end
#--------------------------------------------------------------------------
# ● 获取基本魔法防御
#--------------------------------------------------------------------------
if MDEF突破
def base_mdef
能力=$data_enemies[@enemy_id].mdef.to_s
突破=""
for e in 1..$data_system.elements.size
if $data_enemies[@enemy_id].element_ranks[e] != 3 and $data_system.elements[e] =~ /魔防突破(\d+)/
突破+=$1
能力+=突破
end
end
return 能力.to_i
end
end
end
class Game_Battler
#--------------------------------------------------------------------------
# ● 获取 MaxHP
#--------------------------------------------------------------------------
def maxhp
n = [[base_maxhp + @maxhp_plus, 1].max, 999999].min
for i in @states
n *= $data_states[i].maxhp_rate / 100.0
end
n = [[Integer(n), 1].max, 999999].min
return n
end
#--------------------------------------------------------------------------
# ● 获取 MaxSP
#--------------------------------------------------------------------------
def maxsp
n = [[base_maxsp + @maxsp_plus, 0].max, 999999].min
for i in @states
n *= $data_states[i].maxsp_rate / 100.0
end
n = [[Integer(n), 0].max, 999999].min
return n
end
end