mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 13:44:59 +00:00
Merged species Type1/Type2 into Types, did the same for Pokemon and Battler
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
#===============================================================================
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user