mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Removed all uses of ID numbers for types, Shape property in pokemon.txt must now be a name and not a number
This commit is contained in:
@@ -262,8 +262,11 @@ def pbHiddenPower(pkmn)
|
||||
iv = pkmn.iv
|
||||
idxType = 0; power = 60
|
||||
types = []
|
||||
GameData::Type.each { |t| types.push(t.id) if !t.pseudo_type && ![:NORMAL, :SHADOW].include?(t.id)}
|
||||
types.sort! { |a, b| GameData::Type.get(a).id_number <=> GameData::Type.get(b).id_number }
|
||||
GameData::Type.each do |t|
|
||||
types[t.icon_position] ||= []
|
||||
types[t.icon_position].push(t.id) if !t.pseudo_type && ![:NORMAL, :SHADOW].include?(t.id)
|
||||
end
|
||||
types.flatten!.compact!
|
||||
idxType |= (iv[:HP]&1)
|
||||
idxType |= (iv[:ATTACK]&1)<<1
|
||||
idxType |= (iv[:DEFENSE]&1)<<2
|
||||
|
||||
@@ -374,7 +374,7 @@ class FightMenuDisplay < BattleMenuBase
|
||||
end
|
||||
@visibility["button_#{i}"] = true
|
||||
button.src_rect.x = (i==@index) ? @buttonBitmap.width/2 : 0
|
||||
button.src_rect.y = GameData::Type.get(moves[i].type).id_number * BUTTON_HEIGHT
|
||||
button.src_rect.y = GameData::Type.get(moves[i].type).icon_position * BUTTON_HEIGHT
|
||||
button.z = self.z + ((i==@index) ? 4 : 3)
|
||||
end
|
||||
end
|
||||
@@ -400,7 +400,7 @@ class FightMenuDisplay < BattleMenuBase
|
||||
end
|
||||
@visibility["typeIcon"] = true
|
||||
# Type icon
|
||||
type_number = GameData::Type.get(move.type).id_number
|
||||
type_number = GameData::Type.get(move.type).icon_position
|
||||
@typeIcon.src_rect.y = type_number * TYPE_ICON_HEIGHT
|
||||
# PP text
|
||||
if move.total_pp>0
|
||||
|
||||
Reference in New Issue
Block a user