mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-09 22:24:58 +00:00
More revamping and rearranging
This commit is contained in:
@@ -664,7 +664,7 @@ class PokemonParty_Scene
|
||||
next false if !pbCanUseOnPokemon?(itm)
|
||||
if itm.is_machine?
|
||||
move = itm.move
|
||||
next false if pokemon.hasMove?(move) || !pokemon.compatibleWithMove?(move)
|
||||
next false if pokemon.hasMove?(move) || !pokemon.compatible_with_move?(move)
|
||||
end
|
||||
next true
|
||||
})
|
||||
|
||||
@@ -302,7 +302,10 @@ class PokemonSummary_Scene
|
||||
@sprites["background"].setBitmap("Graphics/Pictures/Summary/bg_#{page}")
|
||||
imagepos=[]
|
||||
# Show the Poké Ball containing the Pokémon
|
||||
ballimage = sprintf("Graphics/Pictures/Summary/icon_ball_%02d",@pokemon.ballused)
|
||||
ballimage = sprintf("Graphics/Pictures/Summary/icon_ball_%s", @pokemon.poke_ball)
|
||||
if !pbResolveBitmap(ballimage)
|
||||
ballimage = sprintf("Graphics/Pictures/Summary/icon_ball_%02d", pbGetBallType(@pokemon.poke_ball))
|
||||
end
|
||||
imagepos.push([ballimage,14,60])
|
||||
# Show status/fainted/Pokérus infected icon
|
||||
status = -1
|
||||
@@ -368,7 +371,7 @@ class PokemonSummary_Scene
|
||||
dexNumShadow = (@pokemon.shiny?) ? Color.new(224,152,144) : Color.new(176,176,176)
|
||||
# If a Shadow Pokémon, draw the heart gauge area and bar
|
||||
if @pokemon.shadowPokemon?
|
||||
shadowfract = @pokemon.heartgauge*1.0/Pokemon::HEARTGAUGESIZE
|
||||
shadowfract = @pokemon.heart_gauge.to_f / Pokemon::HEART_GAUGE_SIZE
|
||||
imagepos = [
|
||||
["Graphics/Pictures/Summary/overlay_shadow",224,240],
|
||||
["Graphics/Pictures/Summary/overlay_shadowbar",242,280,0,0,(shadowfract*248).floor,-1]
|
||||
@@ -457,7 +460,7 @@ class PokemonSummary_Scene
|
||||
end
|
||||
# Draw Exp bar
|
||||
if @pokemon.level<PBExperience.maxLevel
|
||||
w = @pokemon.expFraction*128
|
||||
w = @pokemon.exp_fraction * 128
|
||||
w = ((w/2).round)*2
|
||||
pbDrawImagePositions(overlay,[
|
||||
["Graphics/Pictures/Summary/overlay_exp",362,372,0,0,w,6]
|
||||
@@ -475,7 +478,10 @@ class PokemonSummary_Scene
|
||||
@sprites["background"].setBitmap("Graphics/Pictures/Summary/bg_egg")
|
||||
imagepos = []
|
||||
# Show the Poké Ball containing the Pokémon
|
||||
ballimage = sprintf("Graphics/Pictures/Summary/icon_ball_%02d",@pokemon.ballused)
|
||||
ballimage = sprintf("Graphics/Pictures/Summary/icon_ball_%s", @pokemon.poke_ball)
|
||||
if !pbResolveBitmap(ballimage)
|
||||
ballimage = sprintf("Graphics/Pictures/Summary/icon_ball_%02d", pbGetBallType(@pokemon.poke_ball))
|
||||
end
|
||||
imagepos.push([ballimage,14,60])
|
||||
# Draw all images
|
||||
pbDrawImagePositions(overlay,imagepos)
|
||||
@@ -502,11 +508,9 @@ class PokemonSummary_Scene
|
||||
memo += _INTL("<c3=404040,B0B0B0>{1} {2}, {3}\n",date,month,year)
|
||||
end
|
||||
# Write map name egg was received on
|
||||
mapname = pbGetMapNameFromId(@pokemon.obtainMap)
|
||||
if (@pokemon.obtainText rescue false) && @pokemon.obtainText!=""
|
||||
mapname = @pokemon.obtainText
|
||||
end
|
||||
if mapname && mapname!=""
|
||||
mapname = pbGetMapNameFromId(@pokemon.obtain_map)
|
||||
mapname = @pokemon.obtain_text if @pokemon.obtain_text && !@pokemon.obtain_text.empty?
|
||||
if mapname && mapname != ""
|
||||
memo += _INTL("<c3=404040,B0B0B0>A mysterious Pokémon Egg received from <c3=F83820,E09890>{1}<c3=404040,B0B0B0>.\n",mapname)
|
||||
else
|
||||
memo += _INTL("<c3=404040,B0B0B0>A mysterious Pokémon Egg.\n",mapname)
|
||||
@@ -515,9 +519,9 @@ class PokemonSummary_Scene
|
||||
# Write Egg Watch blurb
|
||||
memo += _INTL("<c3=404040,B0B0B0>\"The Egg Watch\"\n")
|
||||
eggstate = _INTL("It looks like this Egg will take a long time to hatch.")
|
||||
eggstate = _INTL("What will hatch from this? It doesn't seem close to hatching.") if @pokemon.eggsteps<10200
|
||||
eggstate = _INTL("It appears to move occasionally. It may be close to hatching.") if @pokemon.eggsteps<2550
|
||||
eggstate = _INTL("Sounds can be heard coming from inside! It will hatch soon!") if @pokemon.eggsteps<1275
|
||||
eggstate = _INTL("What will hatch from this? It doesn't seem close to hatching.") if @pokemon.steps_to_hatch < 10200
|
||||
eggstate = _INTL("It appears to move occasionally. It may be close to hatching.") if @pokemon.steps_to_hatch < 2550
|
||||
eggstate = _INTL("Sounds can be heard coming from inside! It will hatch soon!") if @pokemon.steps_to_hatch < 1275
|
||||
memo += sprintf("<c3=404040,B0B0B0>%s\n",eggstate)
|
||||
# Draw all text
|
||||
drawFormattedTextEx(overlay,232,78,268,memo)
|
||||
@@ -542,18 +546,16 @@ class PokemonSummary_Scene
|
||||
memo += _INTL("<c3=404040,B0B0B0>{1} {2}, {3}\n",date,month,year)
|
||||
end
|
||||
# Write map name Pokémon was received on
|
||||
mapname = pbGetMapNameFromId(@pokemon.obtainMap)
|
||||
if (@pokemon.obtainText rescue false) && @pokemon.obtainText!=""
|
||||
mapname = @pokemon.obtainText
|
||||
end
|
||||
mapname = pbGetMapNameFromId(@pokemon.obtain_map)
|
||||
mapname = @pokemon.obtain_text if @pokemon.obtain_text && !@pokemon.obtain_text.empty?
|
||||
mapname = _INTL("Faraway place") if !mapname || mapname==""
|
||||
memo += sprintf("<c3=F83820,E09890>%s\n",mapname)
|
||||
# Write how Pokémon was obtained
|
||||
mettext = [_INTL("Met at Lv. {1}.",@pokemon.obtainLevel),
|
||||
mettext = [_INTL("Met at Lv. {1}.",@pokemon.obtain_level),
|
||||
_INTL("Egg received."),
|
||||
_INTL("Traded at Lv. {1}.",@pokemon.obtainLevel),
|
||||
_INTL("Traded at Lv. {1}.",@pokemon.obtain_level),
|
||||
"",
|
||||
_INTL("Had a fateful encounter at Lv. {1}.",@pokemon.obtainLevel)
|
||||
_INTL("Had a fateful encounter at Lv. {1}.",@pokemon.obtain_level)
|
||||
][@pokemon.obtain_method]
|
||||
memo += sprintf("<c3=404040,B0B0B0>%s\n",mettext) if mettext && mettext!=""
|
||||
# If Pokémon was hatched, write when and where it hatched
|
||||
@@ -564,7 +566,7 @@ class PokemonSummary_Scene
|
||||
year = @pokemon.timeEggHatched.year
|
||||
memo += _INTL("<c3=404040,B0B0B0>{1} {2}, {3}\n",date,month,year)
|
||||
end
|
||||
mapname = pbGetMapNameFromId(@pokemon.hatchedMap)
|
||||
mapname = pbGetMapNameFromId(@pokemon.hatched_map)
|
||||
mapname = _INTL("Faraway place") if !mapname || mapname==""
|
||||
memo += sprintf("<c3=F83820,E09890>%s\n",mapname)
|
||||
memo += _INTL("<c3=404040,B0B0B0>Egg hatched.\n")
|
||||
@@ -829,7 +831,7 @@ class PokemonSummary_Scene
|
||||
# Write various bits of text
|
||||
textpos = [
|
||||
[_INTL("No. of Ribbons:"),234,332,0,Color.new(64,64,64),Color.new(176,176,176)],
|
||||
[@pokemon.ribbonCount.to_s,450,332,1,Color.new(64,64,64),Color.new(176,176,176)],
|
||||
[@pokemon.numRibbons.to_s,450,332,1,Color.new(64,64,64),Color.new(176,176,176)],
|
||||
]
|
||||
# Draw all text
|
||||
pbDrawTextPositions(overlay,textpos)
|
||||
|
||||
@@ -1720,8 +1720,8 @@ class PokemonStorageScreen
|
||||
end
|
||||
if heldpoke || selected[0]==-1
|
||||
p = (heldpoke) ? heldpoke : @storage[-1,index]
|
||||
p.formTime = nil if p.respond_to?("formTime")
|
||||
p.form = 0 if p.isSpecies?(:SHAYMIN)
|
||||
p.time_form_set = nil
|
||||
p.form = 0 if p.isSpecies?(:SHAYMIN)
|
||||
p.heal
|
||||
end
|
||||
@scene.pbStore(selected,heldpoke,destbox,firstfree)
|
||||
@@ -1767,8 +1767,8 @@ class PokemonStorageScreen
|
||||
return
|
||||
end
|
||||
if box>=0
|
||||
@heldpkmn.formTime = nil if @heldpkmn.respond_to?("formTime")
|
||||
@heldpkmn.form = 0 if @heldpkmn.isSpecies?(:SHAYMIN)
|
||||
@heldpkmn.time_form_set = nil
|
||||
@heldpkmn.form = 0 if @heldpkmn.isSpecies?(:SHAYMIN)
|
||||
@heldpkmn.heal
|
||||
end
|
||||
@scene.pbPlace(selected,@heldpkmn)
|
||||
@@ -1796,8 +1796,8 @@ class PokemonStorageScreen
|
||||
return false
|
||||
end
|
||||
if box>=0
|
||||
@heldpkmn.formTime = nil if @heldpkmn.respond_to?("formTime")
|
||||
@heldpkmn.form = 0 if @heldpkmn.isSpecies?(:SHAYMIN)
|
||||
@heldpkmn.time_form_set = nil
|
||||
@heldpkmn.form = 0 if @heldpkmn.isSpecies?(:SHAYMIN)
|
||||
@heldpkmn.heal
|
||||
end
|
||||
@scene.pbSwap(selected,@heldpkmn)
|
||||
|
||||
@@ -198,11 +198,11 @@ def pbHatch(pokemon)
|
||||
pokemon.happiness = 120
|
||||
pokemon.timeEggHatched = pbGetTimeNow
|
||||
pokemon.obtain_method = 1 # hatched from egg
|
||||
pokemon.hatchedMap = $game_map.map_id
|
||||
pokemon.hatched_map = $game_map.map_id
|
||||
$Trainer.seen[pokemon.species] = true
|
||||
$Trainer.owned[pokemon.species] = true
|
||||
pbSeenForm(pokemon)
|
||||
pokemon.pbRecordFirstMoves
|
||||
pokemon.record_first_moves
|
||||
if !pbHatchAnimation(pokemon)
|
||||
pbMessage(_INTL("Huh?\1"))
|
||||
pbMessage(_INTL("...\1"))
|
||||
@@ -218,15 +218,15 @@ end
|
||||
|
||||
Events.onStepTaken += proc { |_sender,_e|
|
||||
for egg in $Trainer.party
|
||||
next if egg.eggsteps<=0
|
||||
egg.eggsteps -= 1
|
||||
next if egg.steps_to_hatch <= 0
|
||||
egg.steps_to_hatch -= 1
|
||||
for i in $Trainer.pokemonParty
|
||||
next if !i.hasAbility?(:FLAMEBODY) && !i.hasAbility?(:MAGMAARMOR)
|
||||
egg.eggsteps -= 1
|
||||
egg.steps_to_hatch -= 1
|
||||
break
|
||||
end
|
||||
if egg.eggsteps<=0
|
||||
egg.eggsteps = 0
|
||||
if egg.steps_to_hatch <= 0
|
||||
egg.steps_to_hatch = 0
|
||||
pbHatch(egg)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -608,11 +608,11 @@ class PokemonEvolutionScene
|
||||
|
||||
def self.pbDuplicatePokemon(pkmn, new_species)
|
||||
new_pkmn = pkmn.clone
|
||||
new_pkmn.species = new_species
|
||||
new_pkmn.name = nil
|
||||
new_pkmn.markings = 0
|
||||
new_pkmn.ballused = 0
|
||||
new_pkmn.item = nil
|
||||
new_pkmn.species = new_species
|
||||
new_pkmn.name = nil
|
||||
new_pkmn.markings = 0
|
||||
new_pkmn.poke_ball = :POKEBALL
|
||||
new_pkmn.item = nil
|
||||
new_pkmn.clearAllRibbons
|
||||
new_pkmn.calcStats
|
||||
new_pkmn.heal
|
||||
|
||||
@@ -61,9 +61,17 @@ class PokemonTrade_Scene
|
||||
spriteBall = IconSprite.new(0,0,@viewport)
|
||||
pictureBall = PictureEx.new(0)
|
||||
picturePoke = PictureEx.new(0)
|
||||
ballimage = sprintf("Graphics/Battle animations/ball_%s", @pokemon.poke_ball)
|
||||
if !pbResolveBitmap(ballimage)
|
||||
ballimage = sprintf("Graphics/Battle animations/ball_%02d", pbGetBallType(@pokemon.poke_ball))
|
||||
end
|
||||
ballopenimage = sprintf("Graphics/Battle animations/ball_%s_open", @pokemon.poke_ball)
|
||||
if !pbResolveBitmap(ballimage)
|
||||
ballopenimage = sprintf("Graphics/Battle animations/ball_%02d_open", pbGetBallType(@pokemon.poke_ball))
|
||||
end
|
||||
# Starting position of ball
|
||||
pictureBall.setXY(0,Graphics.width/2,48)
|
||||
pictureBall.setName(0,sprintf("Graphics/Battle animations/ball_%02d",@pokemon.ballused))
|
||||
pictureBall.setName(0,ballimage)
|
||||
pictureBall.setSrcSize(0,32,64)
|
||||
pictureBall.setOrigin(0,PictureOrigin::Center)
|
||||
pictureBall.setVisible(0,true)
|
||||
@@ -76,7 +84,7 @@ class PokemonTrade_Scene
|
||||
# Recall
|
||||
delay = picturePoke.totalDuration
|
||||
picturePoke.setSE(delay,"Battle recall")
|
||||
pictureBall.setName(delay,sprintf("Graphics/Battle animations/ball_%02d_open",@pokemon.ballused))
|
||||
pictureBall.setName(delay,ballopenimage)
|
||||
pictureBall.setSrcSize(delay,32,64)
|
||||
# Move sprite to ball
|
||||
picturePoke.moveZoom(delay,8,0)
|
||||
@@ -84,7 +92,7 @@ class PokemonTrade_Scene
|
||||
picturePoke.setSE(delay+5,"Battle jump to ball")
|
||||
picturePoke.setVisible(delay+8,false)
|
||||
delay = picturePoke.totalDuration+1
|
||||
pictureBall.setName(delay,sprintf("Graphics/Battle animations/ball_%02d",@pokemon.ballused))
|
||||
pictureBall.setName(delay,ballimage)
|
||||
pictureBall.setSrcSize(delay,32,64)
|
||||
# Make Poké Ball go off the top of the screen
|
||||
delay = picturePoke.totalDuration+10
|
||||
@@ -101,9 +109,17 @@ class PokemonTrade_Scene
|
||||
spriteBall = IconSprite.new(0,0,@viewport)
|
||||
pictureBall = PictureEx.new(0)
|
||||
picturePoke = PictureEx.new(0)
|
||||
ballimage = sprintf("Graphics/Battle animations/ball_%s", @pokemon2.poke_ball)
|
||||
if !pbResolveBitmap(ballimage)
|
||||
ballimage = sprintf("Graphics/Battle animations/ball_%02d", pbGetBallType(@pokemon2.poke_ball))
|
||||
end
|
||||
ballopenimage = sprintf("Graphics/Battle animations/ball_%s_open", @pokemon2.poke_ball)
|
||||
if !pbResolveBitmap(ballimage)
|
||||
ballopenimage = sprintf("Graphics/Battle animations/ball_%02d_open", pbGetBallType(@pokemon2.poke_ball))
|
||||
end
|
||||
# Starting position of ball
|
||||
pictureBall.setXY(0,Graphics.width/2,-32)
|
||||
pictureBall.setName(0,sprintf("Graphics/Battle animations/ball_%02d",@pokemon2.ballused))
|
||||
pictureBall.setName(0,ballimage)
|
||||
pictureBall.setSrcSize(0,32,64)
|
||||
pictureBall.setOrigin(0,PictureOrigin::Center)
|
||||
pictureBall.setVisible(0,true)
|
||||
@@ -132,7 +148,7 @@ class PokemonTrade_Scene
|
||||
# Open Poké Ball
|
||||
delay = pictureBall.totalDuration+15
|
||||
pictureBall.setSE(delay,"Battle recall")
|
||||
pictureBall.setName(delay,sprintf("Graphics/Battle animations/ball_%02d_open",@pokemon2.ballused))
|
||||
pictureBall.setName(delay,ballopenimage)
|
||||
pictureBall.setSrcSize(delay,32,64)
|
||||
pictureBall.setVisible(delay+5,false)
|
||||
# Pokémon appears and enlarges
|
||||
@@ -211,7 +227,7 @@ def pbStartTrade(pokemonIndex,newpoke,nickname,trainerName,trainerGender=0)
|
||||
yourPokemon.name = nickname
|
||||
yourPokemon.obtain_method = 2 # traded
|
||||
yourPokemon.resetMoves if resetmoves
|
||||
yourPokemon.pbRecordFirstMoves
|
||||
yourPokemon.record_first_moves
|
||||
$Trainer.seen[yourPokemon.species] = true
|
||||
$Trainer.owned[yourPokemon.species] = true
|
||||
pbSeenForm(yourPokemon)
|
||||
|
||||
@@ -160,8 +160,8 @@ class MoveRelearnerScreen
|
||||
moves.push(m[1]) if !moves.include?(m[1])
|
||||
end
|
||||
tmoves = []
|
||||
if pkmn.firstmoves
|
||||
for i in pkmn.firstmoves
|
||||
if pkmn.first_moves
|
||||
for i in pkmn.first_moves
|
||||
tmoves.push(i) if !pkmn.hasMove?(i) && !moves.include?(i)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -218,7 +218,7 @@ class PurifyChamber
|
||||
def isPurifiableIgnoreRegular?(set)
|
||||
shadow=getShadow(set)
|
||||
return false if !shadow
|
||||
return false if shadow.heartgauge!=0
|
||||
return false if shadow.heart_gauge != 0
|
||||
# Define an exception for Lugia
|
||||
if shadow.isSpecies?(:LUGIA)
|
||||
maxtempo=PurifyChamber.maximumTempo()
|
||||
@@ -237,7 +237,7 @@ class PurifyChamber
|
||||
for set in 0...NUMSETS
|
||||
# If a shadow Pokemon and a regular Pokemon are on the same set
|
||||
if @sets[set].shadow
|
||||
if @sets[set].shadow.heartgauge>0
|
||||
if @sets[set].shadow.heart_gauge > 0
|
||||
flow=self.chamberFlow(set)
|
||||
@sets[set].shadow.adjustHeart(-flow)
|
||||
if isPurifiable?(set)
|
||||
@@ -337,7 +337,7 @@ class PurifyChamberScreen
|
||||
@chamber=$PokemonGlobal.purifyChamber
|
||||
# for j in 0...PurifyChamber::NUMSETS
|
||||
# @chamber.debugAddShadow(j,rand(100)+1)
|
||||
# @chamber[j].shadow.heartgauge=0
|
||||
# @chamber[j].shadow.heart_gauge = 0
|
||||
# for i in 0...PurifyChamber::SETSIZE
|
||||
# @chamber.debugAddNormal(j,rand(100)+1)
|
||||
# end
|
||||
@@ -654,8 +654,8 @@ class Window_PurifyChamberSets < Window_DrawableCommand
|
||||
end
|
||||
if @chamber.getShadow(index)
|
||||
pbDrawGauge(self.contents, Rect.new(rect.x+16,rect.y+18,48,8),
|
||||
Color.new(192,0,256), @chamber.getShadow(index).heartgauge,
|
||||
Pokemon::HEARTGAUGESIZE)
|
||||
Color.new(192,0,256), @chamber.getShadow(index).heart_gauge,
|
||||
Pokemon::HEART_GAUGE_SIZE)
|
||||
end
|
||||
pbDrawTextPositions(self.contents,textpos)
|
||||
end
|
||||
@@ -945,8 +945,7 @@ class PurifyChamberSetView < SpriteWrapper
|
||||
Color.new(248,248,248),Color.new(128,128,128)])
|
||||
# draw heart gauge
|
||||
pbDrawGauge(@info.bitmap, Rect.new(@info.bitmap.width*3/4,8,@info.bitmap.width*1/4,8),
|
||||
Color.new(192,0,256), pkmn.heartgauge,
|
||||
Pokemon::HEARTGAUGESIZE)
|
||||
Color.new(192,0,256), pkmn.heart_gauge, Pokemon::HEART_GAUGE_SIZE)
|
||||
# draw flow gauge
|
||||
pbDrawGauge(@info.bitmap,Rect.new(@info.bitmap.width*3/4,24+8,@info.bitmap.width*1/4,8),
|
||||
Color.new(0,0,248),@chamber.chamberFlow(@set),6)
|
||||
|
||||
@@ -35,7 +35,7 @@ def pbEditMysteryGift(type,item,id=0,giftname="")
|
||||
if type==0 # Pokémon
|
||||
commands=[_INTL("Mystery Gift"),
|
||||
_INTL("Faraway place")]
|
||||
commands.push(item.obtainText) if item.obtainText && item.obtainText!=""
|
||||
commands.push(item.obtain_text) if item.obtain_text && !item.obtain_text.empty?
|
||||
commands.push(_INTL("[Custom]"))
|
||||
loop do
|
||||
command=pbMessage(
|
||||
@@ -43,12 +43,12 @@ def pbEditMysteryGift(type,item,id=0,giftname="")
|
||||
if command<0
|
||||
return nil if pbConfirmMessage(_INTL("Stop editing this gift?"))
|
||||
elsif command<commands.length-1
|
||||
item.obtainText=commands[command]
|
||||
item.obtain_text = commands[command]
|
||||
break
|
||||
elsif command==commands.length-1
|
||||
obtainname=pbMessageFreeText(_INTL("Enter a phrase."),"",false,30)
|
||||
if obtainname!=""
|
||||
item.obtainText=obtainname
|
||||
item.obtain_text = obtainname
|
||||
break
|
||||
end
|
||||
return nil if pbConfirmMessage(_INTL("Stop editing this gift?"))
|
||||
@@ -384,13 +384,13 @@ def pbReceiveMysteryGift(id)
|
||||
time=pbGetTimeNow
|
||||
gift[2].timeReceived=time.getgm.to_i
|
||||
gift[2].obtain_method = 4 # Fateful encounter
|
||||
gift[2].pbRecordFirstMoves
|
||||
gift[2].record_first_moves
|
||||
if $game_map
|
||||
gift[2].obtainMap=$game_map.map_id
|
||||
gift[2].obtainLevel=gift[2].level
|
||||
gift[2].obtain_map=$game_map.map_id
|
||||
gift[2].obtain_level=gift[2].level
|
||||
else
|
||||
gift[2].obtainMap=0
|
||||
gift[2].obtainLevel=gift[2].level
|
||||
gift[2].obtain_map=0
|
||||
gift[2].obtain_level=gift[2].level
|
||||
end
|
||||
if pbAddPokemonSilent(gift[2])
|
||||
pbMessage(_INTL("\\me[Pkmn get]{1} received {2}!",$Trainer.name,gift[2].name))
|
||||
|
||||
Reference in New Issue
Block a user