#______________________________________________________________________________
# * 此脚本归66RPG - Idiot Script Association(ISA)所有,谢绝任何形式转载。
#______________________________________________________________________________
#==============================================================================
# ■ 接入包 - Access Package
#------------------------------------------------------------------------------
# 遵守协议:66RPG - Idiot Script Association(ISA)
# 当前版本:1.0.0.0
#------------------------------------------------------------------------------
# 更新日记:忧雪の伤(2011.3.11)
# - 初始化
#==============================================================================
#--------------------------------------------------------------------------
# ● Start
#--------------------------------------------------------------------------
module ISA
Use = {}
System = {}
Switch = {}
Actor = load_data("Data/Actors.rvdata")
end
#--------------------------------------------------------------------------
# ● 资料记录
#--------------------------------------------------------------------------
module ISA
Use["接入包"] = [true, "1.0.0.0"]
end
#_____________________________________________________________________________
# * 此脚本归66RPG - Idiot Script Association(ISA)及坏人协会所有,谢绝任何形式转载。
#-----------------------------------------------------------------------------
#==============================================================================
# ■ 主角当怪物属性战斗 - Actor Change Enemy
#------------------------------------------------------------------------------
# 遵守协议:66RPG - Idiot Script Association(ISA)
# 66RPG - 坏人协会
# 初始脚本:退屈无聊
# 更新优化:无
# 当前版本:1.0.0.1
#------------------------------------------------------------------------------
# 更新日记:退屈无聊(2011.3.26)
# - 初始化
# 退屈无聊(2011.3.26)
# - 修正level2计算时的BUG
# 退屈无聊(2011.3.27)
# - 修正获取actor等级的BUG
#==============================================================================
#--------------------------------------------------------------------------
# ● 资料记录
#--------------------------------------------------------------------------
module ISA
Use["主角当怪物战斗"] = [true, "1.0.0.1"]
System["主角当怪物战斗"] = {}
end
#--------------------------------------------------------------------------
# ● 设定部分
#--------------------------------------------------------------------------
module ISA
System["主角当怪物战斗"]["难度"] = 10
System["主角当怪物战斗"]["怪物名改为角色名"] = false
System["主角当怪物战斗"]["显示怪物等级"] = true
end
class Game_Enemy < Game_Battler
attr_accessor :level # 怪物等级
include ISA
def initialize(index, enemy_id)
super()
@index = index
@enemy_id = enemy_id
enemy = $data_enemies[@enemy_id]
@original_name = enemy.name
@letter = ''
@plural = false
@screen_x = 0
@screen_y = 0
@battler_name = enemy.battler_name
@battler_hue = enemy.battler_hue
@original_name, @enemy_actor_id, set_level = *enemy.name.split("_")
if set_level
level1 = 0
level2 = 10000
for i in 1..$game_party.members.size
actor = $game_party.members[i-1]
level1 = actor.level if level1 < actor.level
level2 = actor.level if level2 > actor.level
end
@level = level2.to_i + rand(level2 - level1) + System["主角当怪物战斗"]["难度"]
@level = [@level.to_i, 99].min
else
@level = set_level.to_i
end
@cp = 65535
#~ # @exp_list = Array.new(101) #
#~ # make_exp_list #
@hp = maxhp
@mp = maxmp
end
def name
return @original_name unless @enemy_actor_id
if System["主角当怪物战斗"]["怪物名改为角色名"]
if System["主角当怪物战斗"]["显示怪物等级"]
return $data_actors[@enemy_actor_id.to_i].name + @level.to_s + "级"
else
return $data_actors[@enemy_actor_id.to_i].name
end
else
if System["主角当怪物战斗"]["显示怪物等级"]
return @original_name + @level.to_s + "级"
else
return @original_name
end
end
end
def base_maxhp
return enemy.maxhp unless @enemy_actor_id
return $data_actors[@enemy_actor_id.to_i].parameters[0, @level].to_i * 1.5
end
def base_maxmp
return enemy.maxmp unless @enemy_actor_id
return $data_actors[@enemy_actor_id.to_i].parameters[1, @level].to_i * 1
end
def base_atk # 获取基本攻击力
return enemy.atk unless @enemy_actor_id
return $data_actors[@enemy_actor_id.to_i].parameters[2, @level].to_i * 1
end
def base_def # 获取基本防御力
return enemy.def unless @enemy_actor_id
return $data_actors[@enemy_actor_id.to_i].parameters[3, @level].to_i * 3
end
def base_spi # 获取基本魔力
return enemy.spi unless @enemy_actor_id
return $data_actors[@enemy_actor_id.to_i].parameters[4, @level].to_i * 1
end
def base_agi # 获取基本敏捷
return enemy.agi unless @enemy_actor_id
return $data_actors[@enemy_actor_id.to_i].parameters[5, @level].to_i * 2
end
#--------------------------------------------------------------------------
# 命中率、会心一击率、闪躲率、受伤率、属性修正、状态有效需要自己在怪物界面写
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
# ● 计算经验值
#--------------------------------------------------------------------------
#~ # def make_exp_list
#~ # return unless @enemy_actor_id
#~ # @exp_list[1] = @exp_list[100] = 0
#~ # m = $data_actors[@enemy_actor_id.to_i].exp_basis
#~ # n = 0.75 + $data_actors[@enemy_actor_id.to_i].exp_inflation / 200.0;
#~ # for i in 2..99
#~ # @exp_list[i] = @exp_list[i-1] + Integer(m)
#~ # m *= 1 + n;
#~ # n *= 0.9;
#~ # end
#~ # end
#--------------------------------------------------------------------------
# ● 获取经验值
#--------------------------------------------------------------------------
#~ #def exp
#~ # return enemy.exp unless @enemy_actor_id
#~ # return (@exp_list[@level+1] / 7).to_i
#~ # end
#--------------------------------------------------------------------------
# ● 获取金钱
#--------------------------------------------------------------------------
#~ #def gold
#~ # return enemy.gold unless @enemy_actor_id
#~ # return rand(@level + 1) + rand(10) + 10
#~ # end
#--------------------------------------------------------------------------
# 掉落物品也在怪物界面设置
#--------------------------------------------------------------------------
end