mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-10 22:54:59 +00:00
Merged species Type1/Type2 into Types, did the same for Pokemon and Battler
This commit is contained in:
@@ -6,8 +6,7 @@ class Battle::Battler
|
||||
attr_reader :pokemon
|
||||
attr_accessor :pokemonIndex
|
||||
attr_accessor :species
|
||||
attr_accessor :type1
|
||||
attr_accessor :type2
|
||||
attr_accessor :types
|
||||
attr_accessor :ability_id
|
||||
attr_accessor :item_id
|
||||
attr_accessor :moves
|
||||
@@ -304,8 +303,7 @@ class Battle::Battler
|
||||
# same type more than once, and should not include any invalid type numbers
|
||||
# (e.g. -1).
|
||||
def pbTypes(withType3=false)
|
||||
ret = [@type1]
|
||||
ret.push(@type2) if @type2!=@type1
|
||||
ret = @types.clone
|
||||
# Burn Up erases the Fire-type.
|
||||
ret.delete(:FIRE) if @effects[PBEffects::BurnUp]
|
||||
# Roost erases the Flying-type. If there are no types left, adds the Normal-
|
||||
|
||||
@@ -20,7 +20,7 @@ class Battle::Battler
|
||||
@form = 0
|
||||
@level = 0
|
||||
@hp = @totalhp = 0
|
||||
@type1 = @type2 = nil
|
||||
@types = []
|
||||
@ability_id = nil
|
||||
@item_id = nil
|
||||
@gender = 0
|
||||
@@ -44,8 +44,7 @@ class Battle::Battler
|
||||
@level = pkmn.level
|
||||
@hp = pkmn.hp
|
||||
@totalhp = pkmn.totalhp
|
||||
@type1 = pkmn.type1
|
||||
@type2 = pkmn.type2
|
||||
@types = pkmn.types
|
||||
# ability and item intentionally not copied across here
|
||||
@gender = pkmn.gender
|
||||
@attack = pkmn.attack
|
||||
@@ -78,8 +77,7 @@ class Battle::Battler
|
||||
@level = pkmn.level
|
||||
@hp = pkmn.hp
|
||||
@totalhp = pkmn.totalhp
|
||||
@type1 = pkmn.type1
|
||||
@type2 = pkmn.type2
|
||||
@types = pkmn.types
|
||||
@ability_id = pkmn.ability_id
|
||||
@item_id = pkmn.item_id
|
||||
@gender = pkmn.gender
|
||||
@@ -312,8 +310,7 @@ class Battle::Battler
|
||||
@spdef = @pokemon.spdef
|
||||
@speed = @pokemon.speed
|
||||
if fullChange
|
||||
@type1 = @pokemon.type1
|
||||
@type2 = @pokemon.type2
|
||||
@types = @pokemon.types
|
||||
@ability_id = @pokemon.ability_id
|
||||
end
|
||||
end
|
||||
|
||||
@@ -127,13 +127,11 @@ class Battle::Battler
|
||||
newTypes.push(:NORMAL) if newTypes.length == 0
|
||||
newType3 = newType.effects[PBEffects::Type3]
|
||||
newType3 = nil if newTypes.include?(newType3)
|
||||
@type1 = newTypes[0]
|
||||
@type2 = (newTypes.length == 1) ? newTypes[0] : newTypes[1]
|
||||
@types = newTypes.clone
|
||||
@effects[PBEffects::Type3] = newType3
|
||||
else
|
||||
newType = GameData::Type.get(newType).id
|
||||
@type1 = newType
|
||||
@type2 = newType
|
||||
@types = [newType]
|
||||
@effects[PBEffects::Type3] = nil
|
||||
end
|
||||
@effects[PBEffects::BurnUp] = false
|
||||
@@ -141,8 +139,7 @@ class Battle::Battler
|
||||
end
|
||||
|
||||
def pbResetTypes
|
||||
@type1 = @pokemon.type1
|
||||
@type2 = @pokemon.type2
|
||||
@types = @pokemon.types
|
||||
@effects[PBEffects::Type3] = nil
|
||||
@effects[PBEffects::BurnUp] = false
|
||||
@effects[PBEffects::Roost] = false
|
||||
|
||||
Reference in New Issue
Block a user