mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-02-03 11:51:03 +00:00
pokemon preview window + bugfixes
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -24,8 +24,6 @@ class Scene_Map
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
class Scene_Battle
|
||||
def updatemini
|
||||
if self.respond_to?("update_basic")
|
||||
@@ -59,8 +57,6 @@ class Scene_Battle
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
def pbMapInterpreter
|
||||
if $game_map.respond_to?("interpreter")
|
||||
return $game_map.interpreter
|
||||
@@ -131,8 +127,6 @@ def pbCurrentEventCommentInput(elements,trigger)
|
||||
return pbEventCommentInput(event, elements, trigger)
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
@@ -251,8 +245,6 @@ class ChooseNumberParams
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
def pbChooseNumber(msgwindow, params)
|
||||
return 0 if !params
|
||||
ret = 0
|
||||
@@ -295,8 +287,6 @@ def pbChooseNumber(msgwindow,params)
|
||||
return ret
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
@@ -335,8 +325,6 @@ class FaceWindowVX < SpriteWindow_Base
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
@@ -399,8 +387,6 @@ def pbCsvPosInt!(str)
|
||||
return ret.to_i
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Money and coins windows
|
||||
#===============================================================================
|
||||
@@ -498,8 +484,6 @@ def pbDisplayBattlePointsWindow(msgwindow)
|
||||
return pointswindow
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
@@ -540,8 +524,6 @@ def pbDisposeMessageWindow(msgwindow)
|
||||
msgwindow.dispose
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Main message-displaying function
|
||||
#===============================================================================
|
||||
@@ -719,8 +701,12 @@ def pbMessageDisplay(msgwindow,message,letterbyletter=true,commandProc=nil)
|
||||
param = controls[i][1]
|
||||
case control
|
||||
when "f"
|
||||
isFusion = param.to_i > NB_POKEMON
|
||||
head = getBasePokemonID(param.to_i, false)
|
||||
body = getBasePokemonID(param.to_i, true)
|
||||
facewindow.dispose if facewindow
|
||||
facewindow = PictureWindow.new("Graphics/Pictures/#{param}")
|
||||
path = obtainPokemonSpritePath(body, head, $game_variables[CUSTOM_SPRITES_ENABLED] == 0)
|
||||
facewindow = isFusion ? PictureWindow.new(path) : PictureWindow.new("Graphics/Battlers/#{head}/#{head}.png")
|
||||
pbPositionNearMsgWindow(facewindow, msgwindow, :left)
|
||||
facewindow.viewport = msgwindow.viewport
|
||||
facewindow.z = msgwindow.z
|
||||
@@ -837,8 +823,6 @@ def pbMessageDisplay(msgwindow,message,letterbyletter=true,commandProc=nil)
|
||||
return ret
|
||||
end
|
||||
|
||||
|
||||
|
||||
#===============================================================================
|
||||
# Message-displaying functions
|
||||
#===============================================================================
|
||||
|
||||
@@ -115,7 +115,7 @@ def pbAddToPartySilent(pkmn, level = nil, see_form = true)
|
||||
end
|
||||
|
||||
def pbAddForeignPokemon(pkmn, level = 1, owner_name = nil, nickname = nil, owner_gender = 0, see_form = true)
|
||||
return false if !pkmn || $Trainer.party_full?
|
||||
return false if !pkmn
|
||||
pkmn = Pokemon.new(pkmn, level) if !pkmn.is_a?(Pokemon)
|
||||
# Set original trainer to a foreign one
|
||||
pkmn.owner = Pokemon::Owner.new_foreign(owner_name || "", owner_gender)
|
||||
|
||||
@@ -24,7 +24,7 @@ GOT_BADGE_16 = 50
|
||||
DEFAULT_BATTLE_TYPE = 242
|
||||
BATTLE_FACTORY_TOKENS = 243
|
||||
NB_GYM_REMATCHES = 162
|
||||
|
||||
CUSTOM_SPRITES_ENABLED= 196
|
||||
#Settings
|
||||
# This is for settings that are used in scripts since it's a chore to change them everywhere to include the module name
|
||||
NUM_BADGES = Settings::NB_BADGES
|
||||
|
||||
@@ -298,3 +298,25 @@ def getGenericPokemonCryText(pokemonSpecies)
|
||||
end
|
||||
end
|
||||
|
||||
def obtainPokemonSpritePath(id,includeCustoms=true)
|
||||
head=getBasePokemonID(param.to_i,false)
|
||||
body=getBasePokemonID(param.to_i,true)
|
||||
return obtainPokemonSpritePath(body,head,includeCustoms)
|
||||
end
|
||||
|
||||
def obtainPokemonSpritePath(bodyId, headId,include_customs=true)
|
||||
hasCustom=false
|
||||
picturePath = _INTL("Graphics/Battlers/{1}/{1}.{2}.png", headId, bodyId)
|
||||
|
||||
if include_customs
|
||||
pathCustom = _INTL("Graphics/CustomBattlers/{1}.{2}.png", headId, bodyId)
|
||||
if (pbResolveBitmap(pathCustom))
|
||||
picturePath = pathCustom
|
||||
hasCustom = true
|
||||
end
|
||||
end
|
||||
return picturePath
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -134,6 +134,7 @@ def evolveRematchPokemon(nbRematch, speciesSymbol)
|
||||
end
|
||||
|
||||
def getEvolution(species)
|
||||
begin
|
||||
if species >= Settings::NB_POKEMON
|
||||
body = getBasePokemonID(species)
|
||||
head = getBasePokemonID(species, false)
|
||||
@@ -162,6 +163,9 @@ def getEvolution(species)
|
||||
newSpecies = evo[rand(evo.length - 1)][0]
|
||||
return evo.any? ? getDexNumberForSpecies(newSpecies) : -1
|
||||
end
|
||||
rescue
|
||||
return -1
|
||||
end
|
||||
end
|
||||
|
||||
def getFusionSpecies(body, head)
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user