mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-09 22:24:58 +00:00
Added Aura Wheel's visible type change in battle, added "display" methods for several move properties and examples of their use
This commit is contained in:
@@ -144,4 +144,49 @@ class Battle::Move
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
def display_type(battler)
|
||||
case @function
|
||||
when "TypeDependsOnUserMorpekoFormRaiseUserSpeed1"
|
||||
if battler.isSpecies?(:MORPEKO) || battler.effects[PBEffects::TransformSpecies] == :MORPEKO
|
||||
return pbBaseType(battler)
|
||||
end
|
||||
=begin
|
||||
when "TypeDependsOnUserPlate", "TypeDependsOnUserMemory",
|
||||
"TypeDependsOnUserDrive", "TypeAndPowerDependOnUserBerry",
|
||||
"TypeIsUserFirstType", "TypeAndPowerDependOnWeather",
|
||||
"TypeAndPowerDependOnTerrain"
|
||||
return pbBaseType(battler)
|
||||
=end
|
||||
end
|
||||
return @realMove.display_type(battler.pokemon)
|
||||
end
|
||||
|
||||
def display_damage(battler)
|
||||
=begin
|
||||
case @function
|
||||
when "TypeAndPowerDependOnUserBerry"
|
||||
return pbNaturalGiftBaseDamage(battler.item_id)
|
||||
when "TypeAndPowerDependOnWeather", "TypeAndPowerDependOnTerrain",
|
||||
"PowerHigherWithUserHP", "PowerLowerWithUserHP",
|
||||
"PowerHigherWithUserHappiness", "PowerLowerWithUserHappiness",
|
||||
"PowerHigherWithUserPositiveStatStages", "PowerDependsOnUserStockpile"
|
||||
return pbBaseType(@baseDamage, battler, nil)
|
||||
end
|
||||
=end
|
||||
return @realMove.display_damage(battler.pokemon)
|
||||
end
|
||||
|
||||
def display_category(battler)
|
||||
=begin
|
||||
case @function
|
||||
when "CategoryDependsOnHigherDamageIgnoreTargetAbility"
|
||||
pbOnStartUse(user, nil)
|
||||
return @calcCategory
|
||||
end
|
||||
=end
|
||||
return @realMove.display_category(battler.pokemon)
|
||||
end
|
||||
|
||||
def display_accuracy(battler); return @realMove.display_accuracy(battler.pokemon); end
|
||||
end
|
||||
|
||||
@@ -1310,7 +1310,7 @@ end
|
||||
class Battle::Move::TypeIsUserFirstType < Battle::Move
|
||||
def pbBaseType(user)
|
||||
userTypes = user.pbTypes(true)
|
||||
return userTypes[0]
|
||||
return userTypes[0] || @type
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -350,7 +350,7 @@ class Battle::Scene::FightMenu < Battle::Scene::MenuBase
|
||||
x = button.x-self.x+button.src_rect.width/2
|
||||
y = button.y-self.y+2
|
||||
moveNameBase = TEXT_BASE_COLOR
|
||||
if moves[i].type
|
||||
if moves[i].display_type(@battler)
|
||||
# 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 Battle::Scene::FightMenu < Battle::Scene::MenuBase
|
||||
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).icon_position * BUTTON_HEIGHT
|
||||
button.src_rect.y = GameData::Type.get(moves[i].display_type(@battler)).icon_position * BUTTON_HEIGHT
|
||||
button.z = self.z + ((i==@index) ? 4 : 3)
|
||||
end
|
||||
end
|
||||
@@ -384,7 +384,7 @@ class Battle::Scene::FightMenu < Battle::Scene::MenuBase
|
||||
def refreshMoveData(move)
|
||||
# Write PP and type of the selected move
|
||||
if !USE_GRAPHICS
|
||||
moveType = GameData::Type.get(move.type).name
|
||||
moveType = GameData::Type.get(move.display_type(@battler)).name
|
||||
if move.total_pp<=0
|
||||
@msgBox.text = _INTL("PP: ---<br>TYPE/{1}",moveType)
|
||||
else
|
||||
@@ -400,7 +400,7 @@ class Battle::Scene::FightMenu < Battle::Scene::MenuBase
|
||||
end
|
||||
@visibility["typeIcon"] = true
|
||||
# Type icon
|
||||
type_number = GameData::Type.get(move.type).icon_position
|
||||
type_number = GameData::Type.get(move.display_type(@battler)).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