Many more Rubocop-inspired code improvements

This commit is contained in:
Maruno17
2021-12-18 19:06:22 +00:00
parent d17fc40a47
commit 13a238cc6a
107 changed files with 651 additions and 652 deletions

View File

@@ -515,7 +515,7 @@ MultipleForms.register(:SILVALLY, {
MultipleForms.register(:MINIOR, {
"getFormOnCreation" => proc { |pkmn|
next 7 + rand(7) # Meteor forms are 0-6, Core forms are 7-13
next rand(7..13) # Meteor forms are 0-6, Core forms are 7-13
},
"getFormOnEnteringBattle" => proc { |pkmn, wild|
next pkmn.form - 7 if pkmn.form >= 7 && wild # Wild Minior always appear in Meteor form

View File

@@ -10,7 +10,7 @@ class Pokemon
attr_accessor :shadow_moves
attr_accessor :heart_gauge_step_counter
alias :__shadow_expeq :exp=
alias __shadow_expeq exp=
def exp=(value)
if shadowPokemon?
@saved_exp += value - @exp
@@ -19,7 +19,7 @@ class Pokemon
end
end
alias :__shadow_hpeq :hp=
alias __shadow_hpeq hp=
def hp=(value)
__shadow_hpeq(value)
@hyper_mode = false if @hp <= 0
@@ -212,7 +212,7 @@ class Pokemon
end
end
alias :__shadow_clone :clone
alias __shadow_clone clone
def clone
ret = __shadow_clone
if @saved_ev