module RPG class BaseItem def voredigest(pred,prey) bob = ["0","0"] res = self.note.match(//i) bob[0] = res[1].to_s if res bob[0] = eval_digest(bob[0], pred, prey).to_i res2 = self.note.match(//i) bob[1] = res2[1].to_s if res2 bob[1] = eval_digest(bob[1], pred, prey).to_i return bob end def digestadjust(pred,prey) bob = ["0","0"] res = self.note.match(//i) bob[0] = res[1].to_s if res bob[0] = eval_digest(bob[0], pred, prey).to_i res2 = self.note.match(//i) bob[1] = res2[1].to_s if res2 bob[1] = eval_digest(bob[1], pred, prey).to_i return bob end def eval_digest(formula, a, b, p=$game_party, t=$game_troop, v=$game_variables, s=$game_switches) bob = eval(formula) end end end class Game_Battler < Game_BattlerBase def vore_digest(prey) sam = actor? ? actor.voredigest(self, prey) : enemy.voredigest(self, prey) sam[0] += prey.digest_adjust(true)[0] sam[1] += prey.digest_adjust(true)[1] bob = prey.digest_adjust @states.each do |i| bob[0] += $data_states[i].voredigest(self, prey)[0] bob[1] += $data_states[i].voredigest(self, prey)[1] end if actor? armors.each do |a| bob[0] += a.voredigest(self, prey)[0] bob[1] += a.voredigest(self, prey)[1] end weapons.each do |w| bob[0] += w.voredigest(self, prey)[0] bob[1] += w.voredigest(self, prey)[1] end sam[0] += self.class.voredigest(self, prey)[0] sam[1] += self.class.voredigest(self, prey)[1] end bob[0] = (sam[0] > 0 ? [sam[0] + bob[0], 0].max : [sam[0] + bob[0], 0].min) bob[1] = (sam[1] > 0 ? [sam[1] + bob[1], 0].max : [sam[1] + bob[1], 0].min) return bob end def digest_adjust(initial = false) pred = (state?(DL::VORE::VORESTATE) ? state_casters[DL::VORE::VORESTATE] : self) sam = actor? ? actor.digestadjust(pred,self) : enemy.digestadjust(pred,self) bob = [0,0] @states.each do |i| bob[0] += $data_states[i].digestadjust(pred,self)[0] bob[1] += $data_states[i].digestadjust(pred,self)[1] end if actor? armors.each do |a| bob[0] += a.digestadjust(pred,self)[0] bob[1] += a.digestadjust(pred,self)[1] end weapons.each do |w| bob[0] += w.digestadjust(pred,self)[0] bob[1] += w.digestadjust(pred,self)[1] end sam[0] += self.class.digestadjust(pred,self)[0] sam[1] += self.class.digestadjust(pred,self)[1] end return (initial ? sam : bob) end end