Merged species Type1/Type2 into Types, did the same for Pokemon and Battler

This commit is contained in:
Maruno17
2021-11-22 23:55:28 +00:00
parent a5f91f62ea
commit 00c2df5772
33 changed files with 3756 additions and 5552 deletions

View File

@@ -344,9 +344,8 @@ def pbRandomPokemonFromRule(rules, trainer)
item = :LEFTOVERS
end
if item == :BLACKSLUDGE
type1 = GameData::Species.get(species).type1
type2 = GameData::Species.get(species).type2 || type1
item = :LEFTOVERS if type1 != :POISON && type2 != :POISON
types = GameData::Species.get(species).types
item = :LEFTOVERS if !types.include?(:POISON)
end
if item == :HEATROCK && !moves.any? { |m| m == :SUNNYDAY }
item = :LEFTOVERS

View File

@@ -3,9 +3,7 @@
#===============================================================================
def getTypes(species)
species_data = GameData::Species.get(species)
type1 = species_data.type1
type2 = species_data.type2
return (type1 == type2) ? [type1] : [type1, type2]
return species_data.types.clone
end
#===============================================================================

View File

@@ -333,8 +333,8 @@ def pbDecideWinnerScore(party0, party1, rating)
types2 = []
abilities = []
for j in 0...party1.length
types1.push(party1[j].type1)
types2.push(party1[j].type2)
types1.push(party1[j].types[0])
types2.push(party1[j].types[1] || party1[j].types[0])
abilities.push(party1[j].ability_id)
end
for i in 0...party0.length