mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 21:24:59 +00:00
Fixed using pkmn.species= with a form's internal name not setting the actual species. Fixed Shadow Pokémon not being able to have different Shadow Moves for particular forms.
This commit is contained in:
@@ -629,7 +629,7 @@ class PokeBattle_Pokemon
|
||||
#=============================================================================
|
||||
def species=(value)
|
||||
hasNickname = nicknamed?
|
||||
@species = value
|
||||
@species, @form = pbGetSpeciesFromFSpecies(value)
|
||||
@name = PBSpecies.getName(@species) unless hasNickname
|
||||
@level = nil # In case growth rate is different for the new species
|
||||
@forcedForm = nil
|
||||
|
||||
@@ -290,12 +290,14 @@ class PokeBattle_Pokemon
|
||||
self.savedev = [0,0,0,0,0,0]
|
||||
self.shadowmoves = [0,0,0,0,0,0,0,0]
|
||||
# Retrieve shadow moves
|
||||
moves = pbLoadShadowMovesets
|
||||
if moves[self.species] && moves[self.species].length>0
|
||||
for i in 0...[4,moves[self.species].length].min
|
||||
self.shadowmoves[i] = moves[self.species][i]
|
||||
shadow_movesets = pbLoadShadowMovesets
|
||||
shadow_moves = shadow_movesets[self.fSpecies]
|
||||
shadow_moves = shadow_movesets[self.species] if !shadow_moves || shadow_moves.length == 0
|
||||
if shadow_moves && shadow_moves.length > 0
|
||||
for i in 0...[4,shadow_moves.length].min
|
||||
self.shadowmoves[i] = shadow_moves[i]
|
||||
end
|
||||
self.shadowmovenum = moves[self.species].length
|
||||
self.shadowmovenum = shadow_moves.length
|
||||
else
|
||||
# No special shadow moves
|
||||
self.shadowmoves[0] = getConst(PBMoves,:SHADOWRUSH) || 0
|
||||
|
||||
Reference in New Issue
Block a user