module RPG
class Enemy
def rand_maxhp;return @rand_maxhp != nil ? @rand_maxhp : 0;end
def rand_maxsp;return @rand_maxsp != nil ? @rand_maxsp : 0;end
def rand_str;return @rand_str != nil ? @rand_str : 0;end
def rand_dex;return @rand_dex != nil ? @rand_dex : 0;end
def rand_agi;return @rand_agi != nil ? @rand_agi : 0;end
def rand_int;return @rand_int != nil ? @rand_int : 0;end
def rand_atk;return @rand_atk != nil ? @rand_atk : 0;end
def rand_pdef;return @rand_pdef != nil ? @rand_pdef : 0;end
def rand_mdef;return @rand_mdef != nil ? @rand_mdef : 0;end
def rand_eva;return @rand_eva != nil ? @rand_eva : 0;end
end
end
class Game_Enemy < Game_Battler
#--------------------------------------------------------------------------
# ● 获取基本 MaxHP
#--------------------------------------------------------------------------
def base_maxhp
return @base_maxhp if @base_maxhp != nil
rn = $data_enemies[@enemy_id].rand_maxhp
return @base_maxhp = $data_enemies[@enemy_id].maxhp + rn - rand(2 * rn)
end
#--------------------------------------------------------------------------
# ● 获取基本 MaxSP
#--------------------------------------------------------------------------
def base_maxsp
return @base_maxsp if @base_maxsp != nil
rn = $data_enemies[@enemy_id].rand_maxsp
return @base_maxsp = $data_enemies[@enemy_id].maxsp + rn - rand(2 * rn)
end
#--------------------------------------------------------------------------
# ● 获取基本力量
#--------------------------------------------------------------------------
def base_str
return @base_str if @base_str != nil
rn = $data_enemies[@enemy_id].rand_str
return @base_str = $data_enemies[@enemy_id].str + rn - rand(2 * rn)
end
#--------------------------------------------------------------------------
# ● 获取基本灵巧
#--------------------------------------------------------------------------
def base_dex
return @base_dex if @base_dex != nil
rn = $data_enemies[@enemy_id].rand_dex
return @base_dex = $data_enemies[@enemy_id].dex + rn - rand(2 * rn)
end
#--------------------------------------------------------------------------
# ● 获取基本速度
#--------------------------------------------------------------------------
def base_agi
return @base_agi if @base_agi != nil
rn = $data_enemies[@enemy_id].rand_agi
return @base_agi = $data_enemies[@enemy_id].agi + rn - rand(2 * rn)
end
#--------------------------------------------------------------------------
# ● 获取基本魔力
#--------------------------------------------------------------------------
def base_int
return @base_int if @base_int != nil
rn = $data_enemies[@enemy_id].rand_int
return @base_int = $data_enemies[@enemy_id].int + rn - rand(2 * rn)
end
#--------------------------------------------------------------------------
# ● 获取基本攻击力
#--------------------------------------------------------------------------
def base_atk
return @base_atk if @base_atk != nil
rn = $data_enemies[@enemy_id].rand_atk
return @base_atk = $data_enemies[@enemy_id].atk + rn - rand(2 * rn)
end
#--------------------------------------------------------------------------
# ● 获取基本物理防御
#--------------------------------------------------------------------------
def base_pdef
return @base_pdef if @base_pdef != nil
rn = $data_enemies[@enemy_id].rand_pdef
return @base_pdef = $data_enemies[@enemy_id].pdef + rn - rand(2 * rn)
end
#--------------------------------------------------------------------------
# ● 获取基本魔法防御
#--------------------------------------------------------------------------
def base_mdef
return @base_mdef if @base_mdef != nil
rn = $data_enemies[@enemy_id].rand_mdef
return @base_mdef = $data_enemies[@enemy_id].mdef + rn - rand(2 * rn)
end
#--------------------------------------------------------------------------
# ● 获取基本回避修正
#--------------------------------------------------------------------------
def base_eva
return @base_eva if @base_eva != nil
rn = $data_enemies[@enemy_id].rand_eva
return @base_eva = $data_enemies[@enemy_id].eva + rn - rand(2 * rn)
end
end
module RPG
class Enemy
def rand_maxhp;return @rand_maxhp != nil ? @rand_maxhp : 0;end
def rand_maxsp;return @rand_maxsp != nil ? @rand_maxsp : 0;end
def rand_str;return @rand_str != nil ? @rand_str : 0;end
def rand_dex;return @rand_dex != nil ? @rand_dex : 0;end
def rand_agi;return @rand_agi != nil ? @rand_agi : 0;end
def rand_int;return @rand_int != nil ? @rand_int : 0;end
def rand_atk;return @rand_atk != nil ? @rand_atk : 0;end
def rand_pdef;return @rand_pdef != nil ? @rand_pdef : 0;end
def rand_mdef;return @rand_mdef != nil ? @rand_mdef : 0;end
def rand_eva;return @rand_eva != nil ? @rand_eva : 0;end
end
end
class Game_Enemy < Game_Battler
#--------------------------------------------------------------------------
# ● 获取基本 MaxHP
#--------------------------------------------------------------------------
def base_maxhp
return @base_maxhp if @base_maxhp != nil
rn = $data_enemies[@enemy_id].rand_maxhp
return @base_maxhp = $data_enemies[@enemy_id].maxhp + rn - rand(2 * rn)
end
#--------------------------------------------------------------------------
# ● 获取基本 MaxSP
#--------------------------------------------------------------------------
def base_maxsp
return @base_maxsp if @base_maxsp != nil
rn = $data_enemies[@enemy_id].rand_maxsp
return @base_maxsp = $data_enemies[@enemy_id].maxsp + rn - rand(2 * rn)
end
#--------------------------------------------------------------------------
# ● 获取基本力量
#--------------------------------------------------------------------------
def base_str
return @base_str if @base_str != nil
rn = $data_enemies[@enemy_id].rand_str
return @base_str = $data_enemies[@enemy_id].str + rn - rand(2 * rn)
end
#--------------------------------------------------------------------------
# ● 获取基本灵巧
#--------------------------------------------------------------------------
def base_dex
return @base_dex if @base_dex != nil
rn = $data_enemies[@enemy_id].rand_dex
return @base_dex = $data_enemies[@enemy_id].dex + rn - rand(2 * rn)
end
#--------------------------------------------------------------------------
# ● 获取基本速度
#--------------------------------------------------------------------------
def base_agi
return @base_agi if @base_agi != nil
rn = $data_enemies[@enemy_id].rand_agi
return @base_agi = $data_enemies[@enemy_id].agi + rn - rand(2 * rn)
end
#--------------------------------------------------------------------------
# ● 获取基本魔力
#--------------------------------------------------------------------------
def base_int
return @base_int if @base_int != nil
rn = $data_enemies[@enemy_id].rand_int
return @base_int = $data_enemies[@enemy_id].int + rn - rand(2 * rn)
end
#--------------------------------------------------------------------------
# ● 获取基本攻击力
#--------------------------------------------------------------------------
def base_atk
return @base_atk if @base_atk != nil
rn = $data_enemies[@enemy_id].rand_atk
return @base_atk = $data_enemies[@enemy_id].atk + rn - rand(2 * rn)
end
#--------------------------------------------------------------------------
# ● 获取基本物理防御
#--------------------------------------------------------------------------
def base_pdef
return @base_pdef if @base_pdef != nil
rn = $data_enemies[@enemy_id].rand_pdef
return @base_pdef = $data_enemies[@enemy_id].pdef + rn - rand(2 * rn)
end
#--------------------------------------------------------------------------
# ● 获取基本魔法防御
#--------------------------------------------------------------------------
def base_mdef
return @base_mdef if @base_mdef != nil
rn = $data_enemies[@enemy_id].rand_mdef
return @base_mdef = $data_enemies[@enemy_id].mdef + rn - rand(2 * rn)
end
#--------------------------------------------------------------------------
# ● 获取基本回避修正
#--------------------------------------------------------------------------
def base_eva
return @base_eva if @base_eva != nil
rn = $data_enemies[@enemy_id].rand_eva
return @base_eva = $data_enemies[@enemy_id].eva + rn - rand(2 * rn)
end
end
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |