Clone the Owner object in Pokemon#clone

This commit is contained in:
jonisavo
2020-10-16 19:49:47 +03:00
parent fc7e5fbfb4
commit 47a1cb5462

View File

@@ -1035,6 +1035,7 @@ class Pokemon
ret.ivMaxed = @ivMaxed.clone
ret.ev = @ev.clone
ret.moves = []
ret.owner = @owner.clone
@moves.each_with_index { |m, i| ret.moves[i] = m.clone }
ret.ribbons = @ribbons.clone if @ribbons
return ret