Code:
#========================================
# Monster status OVERLIMIT
# by angelix
#
#========================================
module EXTRA_STAT
EXTRA_KW = "[exs]"
end
class Game_Enemy < Game_Battler
def extra_status?
name = $data_enemies[@enemy_id].name.clone
if name.include?(EXTRA_STAT::EXTRA_KW)
return true
else
return false
end
end
def have_status?(status)
name = $data_enemies[@enemy_id].name.clone
if name =~ /\[#{status}([0-9]+)\]/
return true
else
return false
end
end
def base_maxhp
if extra_status? and have_status?("h")
name = $data_enemies[@enemy_id].name.clone
text = name.scan(/\[h([0-9]+)\]/)
@get_status = $1
return @get_status.to_i
else
return $data_enemies[@enemy_id].maxhp
end
end
def base_maxsp
if extra_status? and have_status?("s")
name = $data_enemies[@enemy_id].name.clone
text = name.scan(/\[s([0-9]+)\]/)
@get_status = $1
return @get_status.to_i
else
return $data_enemies[@enemy_id].maxsp
end
end
def base_str
if extra_status? and have_status?("str")
name = $data_enemies[@enemy_id].name.clone
text = name.scan(/\[str([0-9]+)\]/)
@get_status = $1
return @get_status.to_i
else
return $data_enemies[@enemy_id].str
end
end
def base_dex
if extra_status? and have_status?("dex")
name = $data_enemies[@enemy_id].name.clone
text = name.scan(/\[dex([0-9]+)\]/)
@get_status = $1
return @get_status.to_i
else
return $data_enemies[@enemy_id].dex
end
end
def base_agi
if extra_status? and have_status?("agi")
name = $data_enemies[@enemy_id].name.clone
text = name.scan(/\[agi([0-9]+)\]/)
@get_status = $1
return @get_status.to_i
else
return $data_enemies[@enemy_id].agi
end
end
def base_int
if extra_status? and have_status?("int")
name = $data_enemies[@enemy_id].name.clone
text = name.scan(/\[int([0-9]+)\]/)
@get_status = $1
return @get_status.to_i
else
return $data_enemies[@enemy_id].int
end
end
def base_atk
if extra_status? and have_status?("a")
name = $data_enemies[@enemy_id].name.clone
text = name.scan(/\[a([0-9]+)\]/)
@get_status = $1
return @get_status.to_i
else
return $data_enemies[@enemy_id].atk
end
end
def base_pdef
if extra_status? and have_status?("p")
name = $data_enemies[@enemy_id].name.clone
text = name.scan(/\[p([0-9]+)\]/)
@get_status = $1
return @get_status.to_i
else
return $data_enemies[@enemy_id].pdef
end
end
def base_mdef
if extra_status? and have_status?("m")
name = $data_enemies[@enemy_id].name.clone
text = name.scan(/\[m([0-9]+)\]/)
@get_status = $1
return @get_status.to_i
else
return $data_enemies[@enemy_id].mdef
end
end
end
class Window_Help < Window_Base
def set_enemy(enemy)
text = enemy.name.clone
if text.include?(EXTRA_STAT::EXTRA_KW)
text = text.scan(/(\S+)(\[exs\])(\S+)/)
monst = $1
while monst.clone =~ /_/
monst[/_/] = " "
end
text = monst
end
state_text = make_battler_state_text(enemy, 112, false)
if state_text != ""
text += " " + state_text
end
set_text(text, 1)
end
end