mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 13:15:01 +00:00
Some bug fixes
This commit is contained in:
@@ -56,7 +56,7 @@ class PokeBattle_AI
|
||||
end
|
||||
|
||||
def pbCalcTypeMod(moveType,user,target)
|
||||
return PBTypeEffectiveness::NORMAL_EFFECTIVE if moveType<0
|
||||
return PBTypeEffectiveness::NORMAL_EFFECTIVE if !moveType
|
||||
return PBTypeEffectiveness::NORMAL_EFFECTIVE if moveType == :GROUND &&
|
||||
target.pbHasType?(:FLYING) && target.hasActiveItem?(:IRONBALL)
|
||||
# Determine types
|
||||
@@ -93,7 +93,7 @@ class PokeBattle_AI
|
||||
return true if PBTypeEffectiveness.ineffective?(typeMod) || score<=0
|
||||
# Immunity due to ability/item/other effects
|
||||
if skill>=PBTrainerAI.mediumSkill
|
||||
case move.type
|
||||
case type
|
||||
when :GROUND
|
||||
return true if target.airborne? && !move.hitsFlyingTargets?
|
||||
when :FIRE
|
||||
|
||||
@@ -350,7 +350,7 @@ class FightMenuDisplay < BattleMenuBase
|
||||
x = button.x-self.x+button.src_rect.width/2
|
||||
y = button.y-self.y+8
|
||||
moveNameBase = TEXT_BASE_COLOR
|
||||
if moves[i].type>=0
|
||||
if moves[i].type
|
||||
# NOTE: This takes a colour from a particular pixel in the button
|
||||
# graphic and makes the move name's base colour that same colour.
|
||||
# The pixel is at coordinates 10,34 in the button box. If you
|
||||
@@ -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 = moves[i].type*BUTTON_HEIGHT
|
||||
button.src_rect.y = GameData::Type.get(moves[i].type).id_number * BUTTON_HEIGHT
|
||||
button.z = self.z + ((i==@index) ? 4 : 3)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user