class Game_Enemy
ENEMYLIMITBREAK={
# EnemyID=>[MaxHP,MaxSP,Str,Dex,Agi,Int,Atk,Pdef,Mdef,Eva]
1=>[20000,20000,20000,20000,20000,20000,20000,20000,20000,20000],
300=>[10,20,30,40,50,60,70,80,90,10]
}
def statToIndex(stat)
hash={
:maxhp=>0,:maxsp=>1,:str=>2,:dex=>3,
:agi=>4,:int=>5,:atk=>6,:pdef=>7,
:mdef=>8,:eva=>9
}
if stat.is_a?(Symbol)
return hash[stat]
else
return stat
end
end
def limits
@limits=[] if !@limits
return @limits
end
def addLimitBreak(*stats)
if stats.length==0
10.times {|i| self.limits[i]=true }
else
for stat in stats
self.limits[statToIndex(stat)]=true
end
end
end
def removeLimitBreak(*stats)
if stats.length==0
self.limits.clear
else
for stat in stats
self.limits[statToIndex(stat)]=false
end
end
end
def hasLimit?(stat)
return false if !limitStat(stat)
return (self.limits[statToIndex(stat)]) ? true : false
end
def limitStat(stat)
breaks=ENEMYLIMITBREAK[@enemy_id]
return nil if !breaks
return breaks[statToIndex(stat)]
end
def base_maxhp
return limitStat(:maxhp) if hasLimit?(:maxhp)
return $data_enemies[@enemy_id].maxhp
end
def base_maxsp
return limitStat(:maxsp) if hasLimit?(:maxsp)
return $data_enemies[@enemy_id].maxsp
end
def base_str
return limitStat(:str) if hasLimit?(:str)
return $data_enemies[@enemy_id].str
end
def base_dex
return limitStat(:dex) if hasLimit?(:dex)
return $data_enemies[@enemy_id].dex
end
def base_agi
return limitStat(:agi) if hasLimit?(:agi)
return $data_enemies[@enemy_id].agi
end
def base_int
return limitStat(:int) if hasLimit?(:int)
return $data_enemies[@enemy_id].int
end
def base_atk
return limitStat(:atk) if hasLimit?(:atk)
return $data_enemies[@enemy_id].atk
end
def base_pdef
return limitStat(:pdef) if hasLimit?(:pdef)
return $data_enemies[@enemy_id].pdef
end
def base_mdef
return limitStat(:mdef) if hasLimit?(:mdef)
return $data_enemies[@enemy_id].mdef
end
def base_eva
return limitStat(:eva) if hasLimit?(:eva)
return $data_enemies[@enemy_id].eva
end
end