mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 21:24:59 +00:00
Merge pull request #10 from jonisavo/additional-refactoring
Additional #isSpecies? and #hasItem? refactoring
This commit is contained in:
@@ -338,9 +338,9 @@ class PokemonEncounters
|
||||
end
|
||||
firstPkmn = $Trainer.firstPokemon
|
||||
if firstPkmn
|
||||
if isConst?(firstPkmn.item,PBItems,:CLEANSETAG)
|
||||
if firstPkmn.hasItem?(:CLEANSETAG)
|
||||
encount = encount*2/3
|
||||
elsif isConst?(firstPkmn.item,PBItems,:PUREINCENSE)
|
||||
elsif firstPkmn.hasItem?(:PUREINCENSE)
|
||||
encount = encount*2/3
|
||||
else # Ignore ability effects if an item effect applies
|
||||
if isConst?(firstPkmn.ability,PBAbilities,:STENCH)
|
||||
|
||||
@@ -220,7 +220,7 @@ def pbDayCareGenerateEgg
|
||||
isConst?(babyspecies,PBSpecies,:ROCKRUFF) ||
|
||||
isConst?(babyspecies,PBSpecies,:MINIOR)
|
||||
newForm = mother.form
|
||||
newForm = 0 if isConst?(mother.species,PBSpecies,:MOTHIM)
|
||||
newForm = 0 if mother.isSpecies?(:MOTHIM)
|
||||
egg.form = newForm
|
||||
end
|
||||
# Inheriting Alolan form
|
||||
@@ -280,13 +280,11 @@ def pbDayCareGenerateEgg
|
||||
end
|
||||
# Volt Tackle
|
||||
lightball = false
|
||||
if (isConst?(father.species,PBSpecies,:PIKACHU) ||
|
||||
isConst?(father.species,PBSpecies,:RAICHU)) &&
|
||||
if (father.isSpecies?(:PIKACHU) || father.isSpecies?(:RAICHU)) &&
|
||||
father.hasItem?(:LIGHTBALL)
|
||||
lightball = true
|
||||
end
|
||||
if (isConst?(mother.species,PBSpecies,:PIKACHU) ||
|
||||
isConst?(mother.species,PBSpecies,:RAICHU)) &&
|
||||
if (mother.isSpecies?(:PIKACHU) || mother.isSpecies?(:RAICHU)) &&
|
||||
mother.hasItem?(:LIGHTBALL)
|
||||
lightball = true
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user