mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-03-22 07:40:24 +00:00
Applied most Rubocop-suggested layout fixes
This commit is contained in:
@@ -9,16 +9,14 @@ module PBDebug
|
||||
PBDebug.log("**Exception: #{$!.message}")
|
||||
PBDebug.log("#{$!.backtrace.inspect}")
|
||||
PBDebug.log("")
|
||||
# if $INTERNAL
|
||||
pbPrintException($!)
|
||||
# end
|
||||
pbPrintException($!) # if $INTERNAL
|
||||
PBDebug.flush
|
||||
end
|
||||
end
|
||||
|
||||
def self.flush
|
||||
if $DEBUG && $INTERNAL && @@log.length>0
|
||||
File.open("Data/debuglog.txt", "a+b") { |f| f.write("#{@@log}") }
|
||||
File.open("Data/debuglog.txt", "a+b") { |f| f.write(@@log.to_s) }
|
||||
end
|
||||
@@log.clear
|
||||
end
|
||||
@@ -26,9 +24,7 @@ module PBDebug
|
||||
def self.log(msg)
|
||||
if $DEBUG && $INTERNAL
|
||||
@@log.push("#{msg}\r\n")
|
||||
# if @@log.length>1024
|
||||
PBDebug.flush
|
||||
# end
|
||||
PBDebug.flush # if @@log.length > 1024
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ class Game_Screen
|
||||
attr_reader :weather_type # weather type
|
||||
attr_reader :weather_max # max number of weather sprites
|
||||
attr_accessor :weather_duration # ticks in which the weather should fade in
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# * Object Initialization
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
@@ -20,6 +20,7 @@ class Game_Picture
|
||||
attr_reader :blend_type # blend method
|
||||
attr_reader :tone # color tone
|
||||
attr_reader :angle # rotation angle
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# * Object Initialization
|
||||
# number : picture number
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
class Spriteset_Global
|
||||
attr_reader :playersprite
|
||||
|
||||
@@viewport2 = Viewport.new(0, 0, Settings::SCREEN_WIDTH, Settings::SCREEN_HEIGHT)
|
||||
@@viewport2.z = 200
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ end
|
||||
|
||||
class Spriteset_Map
|
||||
attr_reader :map
|
||||
|
||||
@@viewport0 = Viewport.new(0, 0, Settings::SCREEN_WIDTH, Settings::SCREEN_HEIGHT) # Panorama
|
||||
@@viewport0.z = -100
|
||||
@@viewport1 = Viewport.new(0, 0, Settings::SCREEN_WIDTH, Settings::SCREEN_HEIGHT) # Map, events, player, fog
|
||||
|
||||
@@ -38,12 +38,11 @@ class Interpolator
|
||||
when OPACITY
|
||||
@tweensteps[item[0]] = [sprite.opacity,item[1]-sprite.opacity]
|
||||
when COLOR
|
||||
@tweensteps[item[0]] = [sprite.color.clone,Color.new(
|
||||
item[1].red-sprite.color.red,
|
||||
@tweensteps[item[0]] = [sprite.color.clone,
|
||||
Color.new(item[1].red - sprite.color.red,
|
||||
item[1].green - sprite.color.green,
|
||||
item[1].blue - sprite.color.blue,
|
||||
item[1].alpha-sprite.color.alpha
|
||||
)]
|
||||
item[1].alpha - sprite.color.alpha)]
|
||||
end
|
||||
end
|
||||
@tweening = true
|
||||
@@ -68,12 +67,10 @@ class Interpolator
|
||||
when OPACITY
|
||||
@sprite.opacity = item[0]+item[1]*t
|
||||
when COLOR
|
||||
@sprite.color = Color.new(
|
||||
item[0].red+item[1].red*t,
|
||||
@sprite.color = Color.new(item[0].red + item[1].red * t,
|
||||
item[0].green + item[1].green * t,
|
||||
item[0].blue + item[1].blue * t,
|
||||
item[0].alpha+item[1].alpha*t
|
||||
)
|
||||
item[0].alpha + item[1].alpha * t)
|
||||
end
|
||||
end
|
||||
@step += 1
|
||||
|
||||
@@ -458,15 +458,14 @@ class Window
|
||||
trimX + 32, trimY + 64,
|
||||
trimX + 48, trimY + 64,
|
||||
trimX + 32, trimY + 80,
|
||||
trimX+48,trimY+80,
|
||||
trimX + 48, trimY + 80
|
||||
]
|
||||
pauseWidth=16
|
||||
pauseHeight=16
|
||||
@sprites["pause"].src_rect.set(
|
||||
pauseRects[@pauseframe*2],
|
||||
@sprites["pause"].src_rect.set(pauseRects[@pauseframe * 2],
|
||||
pauseRects[@pauseframe * 2 + 1],
|
||||
pauseWidth,pauseHeight
|
||||
)
|
||||
pauseWidth,
|
||||
pauseHeight)
|
||||
@sprites["pause"].x=@x+(@width/2)-(pauseWidth/2)
|
||||
@sprites["pause"].y=@y+@height-16 # 16 refers to skin margin
|
||||
@sprites["contents"].x=@x+16
|
||||
@@ -547,8 +546,8 @@ class Window
|
||||
@sprites["cursor"].src_rect.set(0,0,0,0)
|
||||
end
|
||||
for i in 0...4
|
||||
dwidth = (i==0 || i==3) ? @width-32 : 16
|
||||
dheight = (i==0 || i==3) ? 16 : @height-32
|
||||
dwidth = [0, 3].include?(i) ? @width - 32 : 16
|
||||
dheight = [0, 3].include?(i) ? 16 : @height - 32
|
||||
@sidebitmaps[i]=ensureBitmap(@sidebitmaps[i],dwidth,dheight)
|
||||
@sprites["side#{i}"].bitmap=@sidebitmaps[i]
|
||||
@sprites["side#{i}"].src_rect.set(0,0,dwidth,dheight)
|
||||
|
||||
@@ -134,7 +134,7 @@ class Window_AdvancedTextPokemon < SpriteWindow_Base
|
||||
@lastDrawnChar = -1
|
||||
@fmtchars = []
|
||||
@frameskipChanged = false
|
||||
@frameskip = MessageConfig.pbGetTextSpeed()
|
||||
@frameskip = MessageConfig.pbGetTextSpeed
|
||||
super(0,0,33,33)
|
||||
@pausesprite = nil
|
||||
@text = ""
|
||||
@@ -679,7 +679,7 @@ class Window_InputNumberPokemon < SpriteWindow_Base
|
||||
refresh if @frame%15==0
|
||||
if self.active
|
||||
if Input.repeat?(Input::UP) || Input.repeat?(Input::DOWN)
|
||||
pbPlayCursorSE()
|
||||
pbPlayCursorSE
|
||||
if @index==0 && @sign
|
||||
@negative=!@negative
|
||||
else
|
||||
@@ -696,14 +696,14 @@ class Window_InputNumberPokemon < SpriteWindow_Base
|
||||
refresh
|
||||
elsif Input.repeat?(Input::RIGHT)
|
||||
if digits >= 2
|
||||
pbPlayCursorSE()
|
||||
pbPlayCursorSE
|
||||
@index = (@index + 1) % digits
|
||||
@frame=0
|
||||
refresh
|
||||
end
|
||||
elsif Input.repeat?(Input::LEFT)
|
||||
if digits >= 2
|
||||
pbPlayCursorSE()
|
||||
pbPlayCursorSE
|
||||
@index = (@index + digits - 1) % digits
|
||||
@frame=0
|
||||
refresh
|
||||
@@ -847,7 +847,7 @@ class SpriteWindow_Selectable < SpriteWindow_Base
|
||||
oldindex = @index
|
||||
@index = (@index - @column_max + @item_max) % @item_max
|
||||
if @index!=oldindex
|
||||
pbPlayCursorSE()
|
||||
pbPlayCursorSE
|
||||
update_cursor_rect
|
||||
end
|
||||
end
|
||||
@@ -857,7 +857,7 @@ class SpriteWindow_Selectable < SpriteWindow_Base
|
||||
oldindex = @index
|
||||
@index = (@index + @column_max) % @item_max
|
||||
if @index!=oldindex
|
||||
pbPlayCursorSE()
|
||||
pbPlayCursorSE
|
||||
update_cursor_rect
|
||||
end
|
||||
end
|
||||
@@ -866,7 +866,7 @@ class SpriteWindow_Selectable < SpriteWindow_Base
|
||||
oldindex = @index
|
||||
@index -= 1
|
||||
if @index!=oldindex
|
||||
pbPlayCursorSE()
|
||||
pbPlayCursorSE
|
||||
update_cursor_rect
|
||||
end
|
||||
end
|
||||
@@ -875,7 +875,7 @@ class SpriteWindow_Selectable < SpriteWindow_Base
|
||||
oldindex = @index
|
||||
@index += 1
|
||||
if @index!=oldindex
|
||||
pbPlayCursorSE()
|
||||
pbPlayCursorSE
|
||||
update_cursor_rect
|
||||
end
|
||||
end
|
||||
@@ -884,7 +884,7 @@ class SpriteWindow_Selectable < SpriteWindow_Base
|
||||
oldindex = @index
|
||||
@index = [self.index-self.page_item_max, 0].max
|
||||
if @index!=oldindex
|
||||
pbPlayCursorSE()
|
||||
pbPlayCursorSE
|
||||
self.top_row -= self.page_row_max
|
||||
update_cursor_rect
|
||||
end
|
||||
@@ -894,7 +894,7 @@ class SpriteWindow_Selectable < SpriteWindow_Base
|
||||
oldindex = @index
|
||||
@index = [self.index+self.page_item_max, @item_max-1].min
|
||||
if @index!=oldindex
|
||||
pbPlayCursorSE()
|
||||
pbPlayCursorSE
|
||||
self.top_row += self.page_row_max
|
||||
update_cursor_rect
|
||||
end
|
||||
@@ -1092,8 +1092,8 @@ class Window_DrawableCommand < SpriteWindow_SelectableEx
|
||||
tmpbitmap.dispose
|
||||
end
|
||||
# Store suggested width and height of window
|
||||
dims[0] = [self.borderX+1,(width*self.columns)+self.borderX+
|
||||
(self.columns-1)*self.columnSpacing].max
|
||||
dims[0] = [self.borderX + 1,
|
||||
(width * self.columns) + self.borderX + (self.columns - 1) * self.columnSpacing].max
|
||||
dims[1] = [self.borderY+1,windowheight].max
|
||||
dims[1] = [dims[1],Graphics.height].min
|
||||
end
|
||||
@@ -1117,11 +1117,10 @@ class Window_DrawableCommand < SpriteWindow_SelectableEx
|
||||
return 0
|
||||
end
|
||||
|
||||
def drawItem(index,count,rect) # to be implemented by derived classes
|
||||
end
|
||||
def drawItem(index, count, rect); end # to be implemented by derived classes
|
||||
|
||||
def refresh
|
||||
@item_max = itemCount()
|
||||
@item_max = itemCount
|
||||
dwidth = self.width-self.borderX
|
||||
dheight = self.height-self.borderY
|
||||
self.contents = pbDoEnsureBitmap(self.contents,dwidth,dheight)
|
||||
|
||||
@@ -228,7 +228,8 @@ def getFormattedTextFast(bitmap,xDst,yDst,widthDst,heightDst,text,lineheight,
|
||||
textchars[position],
|
||||
x+xStart,texty,width+2,lineheight,
|
||||
false,bold,italic,colorclone,nil,false,false,
|
||||
defaultfontname,bitmap.font.size,position,nil,0])
|
||||
defaultfontname,bitmap.font.size,position,nil,0
|
||||
])
|
||||
end
|
||||
x+=width
|
||||
if !explicitBreaksOnly && x+2>widthDst && lastword[1]!=0 &&
|
||||
@@ -306,10 +307,10 @@ def getLastColors(colorstack,opacitystack,defaultcolors)
|
||||
colors=getLastParam(colorstack,defaultcolors)
|
||||
opacity=getLastParam(opacitystack,255)
|
||||
if opacity!=255
|
||||
colors=[Color.new(colors[0].red,colors[0].green,colors[0].blue,
|
||||
colors[0].alpha*opacity/255),
|
||||
colors[1] ? Color.new(colors[1].red,colors[1].green,colors[1].blue,
|
||||
colors[1].alpha*opacity/255) : nil]
|
||||
colors = [
|
||||
Color.new(colors[0].red, colors[0].green, colors[0].blue, colors[0].alpha * opacity / 255),
|
||||
colors[1] ? Color.new(colors[1].red, colors[1].green, colors[1].blue, colors[1].alpha * opacity / 255) : nil
|
||||
]
|
||||
end
|
||||
return colors
|
||||
end
|
||||
@@ -692,9 +693,10 @@ def getFormattedText(bitmap,xDst,yDst,widthDst,heightDst,text,lineheight=32,
|
||||
if !explicitBreaksOnly && x+2>widthDst && lastword[1]!=0 &&
|
||||
(!hadnonspace || !hadspace)
|
||||
havenl=true
|
||||
characters.insert(lastword[0],["\n",x,y*lineheight+yDst,0,lineheight,false,
|
||||
false,false,defaultcolors[0],defaultcolors[1],false,false,"",8,position,
|
||||
nil])
|
||||
characters.insert(lastword[0], ["\n", x, y * lineheight + yDst, 0, lineheight,
|
||||
false, false, false,
|
||||
defaultcolors[0], defaultcolors[1],
|
||||
false, false, "", 8, position, nil])
|
||||
charactersInternal.insert(lastword[0],[alignment,y,0])
|
||||
lastword[0]+=1
|
||||
y+=1
|
||||
|
||||
@@ -55,7 +55,8 @@ class Battle::Battler
|
||||
arrStatTexts = [
|
||||
_INTL("{1}'s {2} rose!",pbThis,GameData::Stat.get(stat).name),
|
||||
_INTL("{1}'s {2} rose sharply!",pbThis,GameData::Stat.get(stat).name),
|
||||
_INTL("{1}'s {2} rose drastically!",pbThis,GameData::Stat.get(stat).name)]
|
||||
_INTL("{1}'s {2} rose drastically!",pbThis,GameData::Stat.get(stat).name)
|
||||
]
|
||||
@battle.pbDisplay(arrStatTexts[[increment-1,2].min])
|
||||
# Trigger abilities upon stat gain
|
||||
if abilityActive?
|
||||
@@ -78,12 +79,14 @@ class Battle::Battler
|
||||
arrStatTexts = [
|
||||
_INTL("{1}'s {2} raised its {3}!",pbThis,cause,GameData::Stat.get(stat).name),
|
||||
_INTL("{1}'s {2} sharply raised its {3}!",pbThis,cause,GameData::Stat.get(stat).name),
|
||||
_INTL("{1}'s {2} drastically raised its {3}!",pbThis,cause,GameData::Stat.get(stat).name)]
|
||||
_INTL("{1}'s {2} drastically raised its {3}!",pbThis,cause,GameData::Stat.get(stat).name)
|
||||
]
|
||||
else
|
||||
arrStatTexts = [
|
||||
_INTL("{1}'s {2} raised {3}'s {4}!",user.pbThis,cause,pbThis(true),GameData::Stat.get(stat).name),
|
||||
_INTL("{1}'s {2} sharply raised {3}'s {4}!",user.pbThis,cause,pbThis(true),GameData::Stat.get(stat).name),
|
||||
_INTL("{1}'s {2} drastically raised {3}'s {4}!",user.pbThis,cause,pbThis(true),GameData::Stat.get(stat).name)]
|
||||
_INTL("{1}'s {2} drastically raised {3}'s {4}!",user.pbThis,cause,pbThis(true),GameData::Stat.get(stat).name)
|
||||
]
|
||||
end
|
||||
@battle.pbDisplay(arrStatTexts[[increment-1,2].min])
|
||||
# Trigger abilities upon stat gain
|
||||
@@ -214,7 +217,8 @@ class Battle::Battler
|
||||
arrStatTexts = [
|
||||
_INTL("{1}'s {2} fell!",pbThis,GameData::Stat.get(stat).name),
|
||||
_INTL("{1}'s {2} harshly fell!",pbThis,GameData::Stat.get(stat).name),
|
||||
_INTL("{1}'s {2} severely fell!",pbThis,GameData::Stat.get(stat).name)]
|
||||
_INTL("{1}'s {2} severely fell!",pbThis,GameData::Stat.get(stat).name)
|
||||
]
|
||||
@battle.pbDisplay(arrStatTexts[[increment-1,2].min])
|
||||
# Trigger abilities upon stat loss
|
||||
if abilityActive?
|
||||
@@ -254,12 +258,14 @@ class Battle::Battler
|
||||
arrStatTexts = [
|
||||
_INTL("{1}'s {2} lowered its {3}!",pbThis,cause,GameData::Stat.get(stat).name),
|
||||
_INTL("{1}'s {2} harshly lowered its {3}!",pbThis,cause,GameData::Stat.get(stat).name),
|
||||
_INTL("{1}'s {2} severely lowered its {3}!",pbThis,cause,GameData::Stat.get(stat).name)]
|
||||
_INTL("{1}'s {2} severely lowered its {3}!",pbThis,cause,GameData::Stat.get(stat).name)
|
||||
]
|
||||
else
|
||||
arrStatTexts = [
|
||||
_INTL("{1}'s {2} lowered {3}'s {4}!",user.pbThis,cause,pbThis(true),GameData::Stat.get(stat).name),
|
||||
_INTL("{1}'s {2} harshly lowered {3}'s {4}!",user.pbThis,cause,pbThis(true),GameData::Stat.get(stat).name),
|
||||
_INTL("{1}'s {2} severely lowered {3}'s {4}!",user.pbThis,cause,pbThis(true),GameData::Stat.get(stat).name)]
|
||||
_INTL("{1}'s {2} severely lowered {3}'s {4}!",user.pbThis,cause,pbThis(true),GameData::Stat.get(stat).name)
|
||||
]
|
||||
end
|
||||
@battle.pbDisplay(arrStatTexts[[increment-1,2].min])
|
||||
# Trigger abilities upon stat loss
|
||||
|
||||
@@ -60,7 +60,8 @@ class Battle::Move
|
||||
def pbCalcTypeMod(moveType,user,target)
|
||||
return Effectiveness::NORMAL_EFFECTIVE if !moveType
|
||||
return Effectiveness::NORMAL_EFFECTIVE if moveType == :GROUND &&
|
||||
target.pbHasType?(:FLYING) && target.hasActiveItem?(:IRONBALL)
|
||||
target.pbHasType?(:FLYING) &&
|
||||
target.hasActiveItem?(:IRONBALL)
|
||||
# Determine types
|
||||
tTypes = target.pbTypes(true)
|
||||
# Get effectivenesses
|
||||
|
||||
@@ -144,7 +144,8 @@ class Battle::Move::HitTwoToFiveTimesRaiseUserSpd1LowerUserDef1 < Battle::Move
|
||||
2, 2, 2, 2, 2, 2, 2,
|
||||
3, 3, 3, 3, 3, 3, 3,
|
||||
4, 4, 4,
|
||||
5, 5, 5]
|
||||
5, 5, 5
|
||||
]
|
||||
r = @battle.pbRandom(hitChances.length)
|
||||
r = hitChances.length - 1 if user.hasActiveAbility?(:SKILLLINK)
|
||||
return hitChances[r]
|
||||
|
||||
@@ -396,45 +396,37 @@ class Battle::Move::ThrowUserItemAtTarget < Battle::Move
|
||||
# 80 => all Mega Stones
|
||||
# 10 => all Berries
|
||||
@flingPowers = {
|
||||
130 => [:IRONBALL
|
||||
],
|
||||
130 => [:IRONBALL],
|
||||
100 => [:HARDSTONE,:RAREBONE,
|
||||
# Fossils
|
||||
:ARMORFOSSIL,:CLAWFOSSIL,:COVERFOSSIL,:DOMEFOSSIL,:HELIXFOSSIL,
|
||||
:JAWFOSSIL,:OLDAMBER,:PLUMEFOSSIL,:ROOTFOSSIL,:SAILFOSSIL,
|
||||
:SKULLFOSSIL
|
||||
],
|
||||
:SKULLFOSSIL],
|
||||
90 => [:DEEPSEATOOTH,:GRIPCLAW,:THICKCLUB,
|
||||
# Plates
|
||||
:DRACOPLATE,:DREADPLATE,:EARTHPLATE,:FISTPLATE,:FLAMEPLATE,
|
||||
:ICICLEPLATE,:INSECTPLATE,:IRONPLATE,:MEADOWPLATE,:MINDPLATE,
|
||||
:PIXIEPLATE,:SKYPLATE,:SPLASHPLATE,:SPOOKYPLATE,:STONEPLATE,
|
||||
:TOXICPLATE,:ZAPPLATE
|
||||
],
|
||||
:TOXICPLATE,:ZAPPLATE],
|
||||
80 => [:ASSAULTVEST,:CHIPPEDPOT,:CRACKEDPOT,:DAWNSTONE,:DUSKSTONE,
|
||||
:ELECTIRIZER,:HEAVYDUTYBOOTS,:MAGMARIZER,:ODDKEYSTONE,:OVALSTONE,
|
||||
:PROTECTOR,:QUICKCLAW,:RAZORCLAW,:SACHET,:SAFETYGOGGLES,
|
||||
:SHINYSTONE,:STICKYBARB,:WEAKNESSPOLICY,:WHIPPEDDREAM
|
||||
],
|
||||
:SHINYSTONE,:STICKYBARB,:WEAKNESSPOLICY,:WHIPPEDDREAM],
|
||||
70 => [:DRAGONFANG,:POISONBARB,
|
||||
# EV-training items (Macho Brace is 60)
|
||||
:POWERANKLET,:POWERBAND,:POWERBELT,:POWERBRACER,:POWERLENS,
|
||||
:POWERWEIGHT,
|
||||
# Drives
|
||||
:BURNDRIVE,:CHILLDRIVE,:DOUSEDRIVE,:SHOCKDRIVE
|
||||
],
|
||||
:BURNDRIVE,:CHILLDRIVE,:DOUSEDRIVE,:SHOCKDRIVE],
|
||||
60 => [:ADAMANTORB,:DAMPROCK,:GRISEOUSORB,:HEATROCK,:LEEK,:LUSTROUSORB,
|
||||
:MACHOBRACE,:ROCKYHELMET,:STICK,:TERRAINEXTENDER
|
||||
],
|
||||
:MACHOBRACE,:ROCKYHELMET,:STICK,:TERRAINEXTENDER],
|
||||
50 => [:DUBIOUSDISC,:SHARPBEAK,
|
||||
# Memories
|
||||
:BUGMEMORY,:DARKMEMORY,:DRAGONMEMORY,:ELECTRICMEMORY,:FAIRYMEMORY,
|
||||
:FIGHTINGMEMORY,:FIREMEMORY,:FLYINGMEMORY,:GHOSTMEMORY,
|
||||
:GRASSMEMORY,:GROUNDMEMORY,:ICEMEMORY,:POISONMEMORY,
|
||||
:PSYCHICMEMORY,:ROCKMEMORY,:STEELMEMORY,:WATERMEMORY
|
||||
],
|
||||
40 => [:EVIOLITE,:ICYROCK,:LUCKYPUNCH
|
||||
],
|
||||
:PSYCHICMEMORY,:ROCKMEMORY,:STEELMEMORY,:WATERMEMORY],
|
||||
40 => [:EVIOLITE,:ICYROCK,:LUCKYPUNCH],
|
||||
30 => [:ABSORBBULB,:ADRENALINEORB,:AMULETCOIN,:BINDINGBAND,:BLACKBELT,
|
||||
:BLACKGLASSES,:BLACKSLUDGE,:BOTTLECAP,:CELLBATTERY,:CHARCOAL,
|
||||
:CLEANSETAG,:DEEPSEASCALE,:DRAGONSCALE,:EJECTBUTTON,:ESCAPEROPE,
|
||||
@@ -486,15 +478,12 @@ class Battle::Move::ThrowUserItemAtTarget < Battle::Move
|
||||
:RELICGOLD,:RELICSILVER,:RELICSTATUE,:RELICVASE,:STARDUST,
|
||||
:STARPIECE,:STRANGESOUVENIR,:TINYMUSHROOM,
|
||||
# Exp Candies
|
||||
:EXPCANDYXS, :EXPCANDYS, :EXPCANDYM, :EXPCANDYL, :EXPCANDYXL
|
||||
],
|
||||
20 => [
|
||||
# Feathers
|
||||
:EXPCANDYXS, :EXPCANDYS, :EXPCANDYM, :EXPCANDYL, :EXPCANDYXL],
|
||||
20 => [ # Feathers
|
||||
:CLEVERFEATHER,:GENIUSFEATHER,:HEALTHFEATHER,:MUSCLEFEATHER,
|
||||
:PRETTYFEATHER,:RESISTFEATHER,:SWIFTFEATHER,
|
||||
:CLEVERWING,:GENIUSWING,:HEALTHWING,:MUSCLEWING,:PRETTYWING,
|
||||
:RESISTWING,:SWIFTWING
|
||||
],
|
||||
:RESISTWING,:SWIFTWING],
|
||||
10 => [:AIRBALLOON,:BIGROOT,:BRIGHTPOWDER,:CHOICEBAND,:CHOICESCARF,
|
||||
:CHOICESPECS,:DESTINYKNOT,:DISCOUNTCOUPON,:EXPERTBELT,:FOCUSBAND,
|
||||
:FOCUSSASH,:LAGGINGTAIL,:LEFTOVERS,:MENTALHERB,:METALPOWDER,
|
||||
@@ -518,8 +507,7 @@ class Battle::Move::ThrowUserItemAtTarget < Battle::Move
|
||||
:SERIOUSMINT,
|
||||
# Sweets
|
||||
:STRAWBERRYSWEET, :LOVESWEET, :BERRYSWEET, :CLOVERSWEET,
|
||||
:FLOWERSWEET, :STARSWEET, :RIBBONSWEET
|
||||
]
|
||||
:FLOWERSWEET, :STARSWEET, :RIBBONSWEET]
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ class Battle::Scene::MenuBase
|
||||
attr_reader :color
|
||||
attr_reader :index
|
||||
attr_reader :mode
|
||||
|
||||
# NOTE: Button width is half the width of the graphic containing them all.
|
||||
BUTTON_HEIGHT = 46
|
||||
TEXT_BASE_COLOR = Battle::Scene::MESSAGE_BASE_COLOR
|
||||
@@ -202,6 +203,7 @@ end
|
||||
class Battle::Scene::FightMenu < Battle::Scene::MenuBase
|
||||
attr_reader :battler
|
||||
attr_reader :shiftMode
|
||||
|
||||
GET_MOVE_TEXT_COLOR_FROM_MOVE_BUTTON = true
|
||||
|
||||
# If true, displays graphics from Graphics/Pictures/Battle/overlay_fight.png
|
||||
|
||||
@@ -57,7 +57,8 @@ class Battle::AI
|
||||
def pbCalcTypeMod(moveType,user,target)
|
||||
return Effectiveness::NORMAL_EFFECTIVE if !moveType
|
||||
return Effectiveness::NORMAL_EFFECTIVE if moveType == :GROUND &&
|
||||
target.pbHasType?(:FLYING) && target.hasActiveItem?(:IRONBALL)
|
||||
target.pbHasType?(:FLYING) &&
|
||||
target.hasActiveItem?(:IRONBALL)
|
||||
# Determine types
|
||||
tTypes = target.pbTypes(true)
|
||||
# Get effectivenesses
|
||||
|
||||
@@ -426,6 +426,7 @@ class PBAnimation < Array
|
||||
attr_writer :speed
|
||||
attr_reader :array
|
||||
attr_reader :timing
|
||||
|
||||
MAX_SPRITES = 60
|
||||
|
||||
def speed
|
||||
@@ -698,6 +699,7 @@ end
|
||||
#===============================================================================
|
||||
class PBAnimationPlayerX
|
||||
attr_accessor :looping
|
||||
|
||||
MAX_SPRITES = 60
|
||||
|
||||
def initialize(animation,user,target,scene=nil,oppMove=false,inEditor=false)
|
||||
|
||||
@@ -7,6 +7,7 @@ module RPG
|
||||
attr_reader :max
|
||||
attr_reader :ox
|
||||
attr_reader :oy
|
||||
|
||||
MAX_SPRITES = 60
|
||||
FADE_OLD_TILES_START = 0
|
||||
FADE_OLD_TILES_END = 1
|
||||
|
||||
@@ -147,7 +147,8 @@ def moonphase(time=nil) # in UTC
|
||||
16.6109562298125,
|
||||
20.3022798364375,
|
||||
23.9936034430625,
|
||||
27.6849270496875]
|
||||
27.6849270496875
|
||||
]
|
||||
yy = time.year-((12-time.mon)/10.0).floor
|
||||
j = (365.25*(4712+yy)).floor + (((time.mon+9)%12)*30.6+0.5).floor + time.day+59
|
||||
j -= (((yy/100.0)+49).floor*0.75).floor-38 if j>2299160
|
||||
@@ -219,7 +220,8 @@ def pbIsWeekday(wdayVariable,*arg)
|
||||
_INTL("Wednesday"),
|
||||
_INTL("Thursday"),
|
||||
_INTL("Friday"),
|
||||
_INTL("Saturday")][wday]
|
||||
_INTL("Saturday")
|
||||
][wday]
|
||||
$game_map.need_refresh = true if $game_map
|
||||
end
|
||||
return ret
|
||||
@@ -291,7 +293,8 @@ def pbIsSeason(seasonVariable,*arg)
|
||||
_INTL("Spring"),
|
||||
_INTL("Summer"),
|
||||
_INTL("Autumn"),
|
||||
_INTL("Winter")][thisseason]
|
||||
_INTL("Winter")
|
||||
][thisseason]
|
||||
$game_map.need_refresh = true if $game_map
|
||||
end
|
||||
return ret
|
||||
|
||||
@@ -375,8 +375,8 @@ def pbBerryPlant
|
||||
if berry_plant.mulch_id
|
||||
pbMessage(_INTL("{1} has been laid down.\1", GameData::Item.get(berry_plant.mulch_id).name))
|
||||
else
|
||||
case pbMessage(_INTL("It's soft, earthy soil."), [
|
||||
_INTL("Fertilize"), _INTL("Plant Berry"), _INTL("Exit")], -1)
|
||||
case pbMessage(_INTL("It's soft, earthy soil."),
|
||||
[_INTL("Fertilize"), _INTL("Plant Berry"), _INTL("Exit")], -1)
|
||||
when 0 # Fertilize
|
||||
mulch = nil
|
||||
pbFadeOutIn {
|
||||
|
||||
@@ -224,6 +224,7 @@ module RandomDungeonGenerator
|
||||
#=============================================================================
|
||||
class Maze
|
||||
attr_accessor :cellWidth, :cellHeight, :nodeWidth, :nodeHeight
|
||||
|
||||
DIRECTIONS = [EdgeMasks::North, EdgeMasks::South, EdgeMasks::East, EdgeMasks::West]
|
||||
|
||||
def initialize(cw, ch)
|
||||
@@ -452,6 +453,7 @@ module RandomDungeonGenerator
|
||||
end
|
||||
|
||||
attr_accessor :width, :height
|
||||
|
||||
BUFFER_X = 8
|
||||
BUFFER_Y = 6
|
||||
|
||||
@@ -532,10 +534,10 @@ module RandomDungeonGenerator
|
||||
def isWall?(x, y)
|
||||
if value(x, y) == DungeonTile::VOID
|
||||
v1 = value(x, y + 1)
|
||||
return true if v1 == DungeonTile::ROOM || v1 == DungeonTile::CORRIDOR
|
||||
return true if [DungeonTile::ROOM, DungeonTile::CORRIDOR].include?(v1)
|
||||
if v1 == DungeonTile::VOID # The tile below is void
|
||||
v1 = value(x, y + 2)
|
||||
return true if v1 == DungeonTile::ROOM || v1 == DungeonTile::CORRIDOR
|
||||
return true if [DungeonTile::ROOM, DungeonTile::CORRIDOR].include?(v1)
|
||||
end
|
||||
end
|
||||
return false
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#===============================================================================
|
||||
class ItemIconSprite < SpriteWrapper
|
||||
attr_reader :item
|
||||
|
||||
ANIM_ICON_SIZE = 48
|
||||
FRAMES_PER_CYCLE = Graphics.frame_rate
|
||||
|
||||
|
||||
@@ -57,6 +57,7 @@ class PokemonStorage
|
||||
attr_reader :boxes
|
||||
attr_accessor :currentBox
|
||||
attr_writer :unlockedWallpapers
|
||||
|
||||
BASICWALLPAPERQTY = 16
|
||||
|
||||
def initialize(maxBoxes = Settings::NUM_STORAGE_BOXES, maxPokemon = PokemonBox::BOX_SIZE)
|
||||
|
||||
@@ -405,15 +405,17 @@ class PokemonPartyPanel < SpriteWrapper
|
||||
end
|
||||
# Draw shiny icon
|
||||
if @pokemon.shiny?
|
||||
pbDrawImagePositions(@overlaysprite.bitmap,[[
|
||||
"Graphics/Pictures/shiny",80,48,0,0,16,16]])
|
||||
pbDrawImagePositions(@overlaysprite.bitmap,
|
||||
[["Graphics/Pictures/shiny", 80, 48, 0, 0, 16, 16]]
|
||||
)
|
||||
end
|
||||
end
|
||||
pbDrawTextPositions(@overlaysprite.bitmap,textpos)
|
||||
# Draw level text
|
||||
if !@pokemon.egg?
|
||||
pbDrawImagePositions(@overlaysprite.bitmap,[[
|
||||
"Graphics/Pictures/Party/overlay_lv",20,70,0,0,22,14]])
|
||||
pbDrawImagePositions(@overlaysprite.bitmap,
|
||||
[["Graphics/Pictures/Party/overlay_lv", 20, 70, 0, 0, 22, 14]]
|
||||
)
|
||||
pbSetSmallFont(@overlaysprite.bitmap)
|
||||
pbDrawTextPositions(@overlaysprite.bitmap,[
|
||||
[@pokemon.level.to_s,42,57,0,basecolor,shadowcolor]
|
||||
|
||||
@@ -556,8 +556,7 @@ class PokemonSummary_Scene
|
||||
_INTL("Egg received."),
|
||||
_INTL("Traded at Lv. {1}.",@pokemon.obtain_level),
|
||||
"",
|
||||
_INTL("Had a fateful encounter at Lv. {1}.",@pokemon.obtain_level)
|
||||
][@pokemon.obtain_method]
|
||||
_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
|
||||
if @pokemon.obtain_method == 1
|
||||
|
||||
@@ -99,7 +99,7 @@ class Window_PokemonBag < Window_DrawableCommand
|
||||
end
|
||||
|
||||
def refresh
|
||||
@item_max = itemCount()
|
||||
@item_max = itemCount
|
||||
self.update_cursor_rect
|
||||
dwidth = self.width-self.borderX
|
||||
dheight = self.height-self.borderY
|
||||
|
||||
@@ -564,6 +564,7 @@ end
|
||||
#===============================================================================
|
||||
class PokemonStorageScene
|
||||
attr_reader :quickswap
|
||||
|
||||
MARK_WIDTH = 16
|
||||
MARK_HEIGHT = 16
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ class PokemonGlobalMetadata
|
||||
attr_writer :purifyChamber
|
||||
|
||||
def purifyChamber
|
||||
@purifyChamber = PurifyChamber.new() if !@purifyChamber
|
||||
@purifyChamber = PurifyChamber.new if !@purifyChamber
|
||||
return @purifyChamber
|
||||
end
|
||||
end
|
||||
@@ -157,10 +157,11 @@ end
|
||||
class PurifyChamber
|
||||
attr_reader :sets
|
||||
attr_reader :currentSet
|
||||
|
||||
NUMSETS = 9
|
||||
SETSIZE = 4
|
||||
|
||||
def self.maximumTempo() # Calculates the maximum possible tempo
|
||||
def self.maximumTempo # Calculates the maximum possible tempo
|
||||
x=SETSIZE+1
|
||||
return ((x*x+x)/2)-1
|
||||
end
|
||||
@@ -233,7 +234,7 @@ class PurifyChamber
|
||||
return false if shadow.heart_gauge != 0
|
||||
# Define an exception for Lugia
|
||||
if shadow.isSpecies?(:LUGIA)
|
||||
maxtempo=PurifyChamber.maximumTempo()
|
||||
maxtempo=PurifyChamber.maximumTempo
|
||||
for i in 0...NUMSETS
|
||||
return false if @sets[i].tempo!=maxtempo
|
||||
end
|
||||
@@ -423,7 +424,7 @@ class PurifyChamberScreen
|
||||
# array[0]==0 - a position was chosen
|
||||
# array[0]==1 - a new set was chosen
|
||||
# array[0]==2 - choose Pokemon command
|
||||
cmd=@scene.pbSetScreen()
|
||||
cmd=@scene.pbSetScreen
|
||||
if cmd[0]==0
|
||||
# Place Pokemon in the set
|
||||
curpkmn=PurifyChamberHelper.pbGetPokemon(@chamber,cmd[1])
|
||||
@@ -519,7 +520,7 @@ class PurifyChamberScreen
|
||||
@scene.pbChangeSet(cmd[1])
|
||||
chamber.currentSet=cmd[1]
|
||||
elsif cmd[0]==2 # Choose a Pokemon
|
||||
pos=@scene.pbChoosePokemon()
|
||||
pos=@scene.pbChoosePokemon
|
||||
pkmn=pos ? $PokemonStorage[pos[0],pos[1]] : nil
|
||||
heldpkmn=pkmn if pkmn
|
||||
else # cancel
|
||||
@@ -532,13 +533,13 @@ class PurifyChamberScreen
|
||||
end
|
||||
end
|
||||
end
|
||||
if pbCheckPurify()
|
||||
if pbCheckPurify
|
||||
@scene.pbDisplay(_INTL("There is a Pokémon that is ready to open its heart!\1"))
|
||||
@scene.pbCloseSetDetail()
|
||||
pbDoPurify()
|
||||
@scene.pbCloseSetDetail
|
||||
pbDoPurify
|
||||
return false
|
||||
else
|
||||
@scene.pbCloseSetDetail()
|
||||
@scene.pbCloseSetDetail
|
||||
return true
|
||||
end
|
||||
end
|
||||
@@ -576,27 +577,27 @@ class PurifyChamberScreen
|
||||
set=purifiables[i]
|
||||
@chamber.currentSet=set
|
||||
@scene.pbOpenSet(set)
|
||||
@scene.pbPurify()
|
||||
@scene.pbPurify
|
||||
pbPurify(@chamber[set].shadow,self)
|
||||
pbStorePokemon(@chamber[set].shadow)
|
||||
@chamber.setShadow(set,nil) # Remove shadow Pokemon from set
|
||||
if (i+1)!=purifiables.length
|
||||
@scene.pbDisplay(_INTL("There is another Pokémon that is ready to open its heart!"))
|
||||
if !@scene.pbConfirm("Would you like to switch sets?")
|
||||
@scene.pbCloseSet()
|
||||
@scene.pbCloseSet
|
||||
break
|
||||
end
|
||||
end
|
||||
@scene.pbCloseSet()
|
||||
@scene.pbCloseSet
|
||||
end
|
||||
end
|
||||
|
||||
def pbStartPurify
|
||||
chamber=@chamber
|
||||
@scene.pbStart(chamber)
|
||||
if pbCheckPurify()
|
||||
pbDoPurify()
|
||||
@scene.pbEnd()
|
||||
if pbCheckPurify
|
||||
pbDoPurify
|
||||
@scene.pbEnd
|
||||
return
|
||||
end
|
||||
@scene.pbOpenSet(chamber.currentSet)
|
||||
@@ -609,10 +610,11 @@ class PurifyChamberScreen
|
||||
else
|
||||
chamber.currentSet=set
|
||||
cmd=@scene.pbShowCommands(
|
||||
_INTL("What do you want to do?"),[
|
||||
_INTL("EDIT"),_INTL("SWITCH"),_INTL("CANCEL")])
|
||||
_INTL("What do you want to do?"),
|
||||
[_INTL("EDIT"), _INTL("SWITCH"), _INTL("CANCEL")]
|
||||
)
|
||||
if cmd==0 # edit
|
||||
if !pbOpenSetDetail()
|
||||
if !pbOpenSetDetail
|
||||
break
|
||||
end
|
||||
elsif cmd==1 # switch
|
||||
@@ -620,12 +622,12 @@ class PurifyChamberScreen
|
||||
newSet=@scene.pbSwitch(set)
|
||||
chamber.switch(set,newSet)
|
||||
chamber.currentSet=newSet
|
||||
@scene.pbRefresh()
|
||||
@scene.pbRefresh
|
||||
end
|
||||
end
|
||||
end
|
||||
@scene.pbCloseSet()
|
||||
@scene.pbEnd()
|
||||
@scene.pbCloseSet
|
||||
@scene.pbEnd
|
||||
end
|
||||
end
|
||||
|
||||
@@ -662,7 +664,7 @@ class Window_PurifyChamberSets < Window_DrawableCommand
|
||||
end
|
||||
if @chamber.setCount(index)>0
|
||||
pbDrawGauge(self.contents,Rect.new(rect.x+16,rect.y+6,48,8),
|
||||
Color.new(0,0,256),@chamber[index].tempo,PurifyChamber.maximumTempo())
|
||||
Color.new(0,0,256),@chamber[index].tempo,PurifyChamber.maximumTempo)
|
||||
end
|
||||
if @chamber.getShadow(index)
|
||||
pbDrawGauge(self.contents, Rect.new(rect.x+16,rect.y+18,48,8),
|
||||
@@ -867,7 +869,7 @@ class PurifyChamberSetView < SpriteWrapper
|
||||
refresh
|
||||
end
|
||||
|
||||
def refreshFlows()
|
||||
def refreshFlows
|
||||
for flow in @flows
|
||||
flow.setFlowStrength(0)
|
||||
end
|
||||
@@ -969,7 +971,7 @@ class PurifyChamberSetView < SpriteWrapper
|
||||
# draw tempo gauge
|
||||
pbDrawGauge(@info.bitmap,Rect.new(@info.bitmap.width*1/4,24+8,@info.bitmap.width*1/4,8),
|
||||
Color.new(0,0,248),@chamber[@set].tempo,
|
||||
PurifyChamber.maximumTempo())
|
||||
PurifyChamber.maximumTempo)
|
||||
end
|
||||
pbDrawTextPositions(@info.bitmap,textpos)
|
||||
@info.x=Graphics.width-@info.bitmap.width
|
||||
@@ -983,7 +985,7 @@ class PurifyChamberSetView < SpriteWrapper
|
||||
checkCursor(0)
|
||||
points=[@chamber.setCount(@set)*2,1].max
|
||||
setList=@chamber.setList(@set)
|
||||
refreshFlows()
|
||||
refreshFlows
|
||||
for i in 0...PurifyChamber::SETSIZE*2
|
||||
pkmn=(i%2==1 || i>=points) ? nil : setList[i/2]
|
||||
angle=360-(i*360/points)
|
||||
@@ -1083,11 +1085,11 @@ end
|
||||
#
|
||||
#===============================================================================
|
||||
class PurifyChamberScene
|
||||
def pbUpdate()
|
||||
def pbUpdate
|
||||
pbUpdateSpriteHash(@sprites)
|
||||
end
|
||||
|
||||
def pbRefresh()
|
||||
def pbRefresh
|
||||
if @sprites["setview"]
|
||||
@sprites["setview"].refresh
|
||||
@sprites["setwindow"].refresh
|
||||
@@ -1098,7 +1100,7 @@ class PurifyChamberScene
|
||||
@chamber=chamber
|
||||
end
|
||||
|
||||
def pbEnd()
|
||||
def pbEnd
|
||||
end
|
||||
|
||||
def pbOpenSet(set)
|
||||
@@ -1120,7 +1122,7 @@ class PurifyChamberScene
|
||||
pbFadeInAndShow(@sprites) { pbUpdate }
|
||||
end
|
||||
|
||||
def pbCloseSet()
|
||||
def pbCloseSet
|
||||
pbFadeOutAndHide(@sprites) { pbUpdate }
|
||||
pbDisposeSpriteHash(@sprites)
|
||||
@viewport.dispose
|
||||
@@ -1133,20 +1135,20 @@ class PurifyChamberScene
|
||||
@sprites["setview"].cursor=0
|
||||
end
|
||||
|
||||
def pbCloseSetDetail()
|
||||
def pbCloseSetDetail
|
||||
end
|
||||
|
||||
def pbPurify()
|
||||
def pbPurify
|
||||
pbRefresh
|
||||
end
|
||||
|
||||
def pbMove(_pos)
|
||||
@sprites["setview"].heldpkmn=@sprites["setview"].getCurrent()
|
||||
@sprites["setview"].heldpkmn=@sprites["setview"].getCurrent
|
||||
pbRefresh
|
||||
end
|
||||
|
||||
def pbShift(_pos,_heldpoke)
|
||||
@sprites["setview"].heldpkmn=@sprites["setview"].getCurrent()
|
||||
@sprites["setview"].heldpkmn=@sprites["setview"].getCurrent
|
||||
pbRefresh
|
||||
end
|
||||
|
||||
@@ -1191,29 +1193,29 @@ class PurifyChamberScene
|
||||
btn=Input::RIGHT if Input.repeat?(Input::RIGHT)
|
||||
btn=Input::LEFT if Input.repeat?(Input::LEFT)
|
||||
if btn!=0
|
||||
pbPlayCursorSE()
|
||||
pbPlayCursorSE
|
||||
@sprites["setview"].moveCursor(btn)
|
||||
end
|
||||
if Input.repeat?(Input::JUMPUP)
|
||||
nextset=(@sprites["setview"].set==0) ? PurifyChamber::NUMSETS-1 : @sprites["setview"].set-1
|
||||
pbPlayCursorSE()
|
||||
pbPlayCursorSE
|
||||
return [1,nextset]
|
||||
elsif Input.repeat?(Input::JUMPDOWN)
|
||||
nextset=(@sprites["setview"].set==PurifyChamber::NUMSETS-1) ? 0 : @sprites["setview"].set+1
|
||||
pbPlayCursorSE()
|
||||
pbPlayCursorSE
|
||||
return [1,nextset]
|
||||
elsif Input.trigger?(Input::USE)
|
||||
pbPlayDecisionSE()
|
||||
pbPlayDecisionSE
|
||||
return [0,@sprites["setview"].cursor]
|
||||
elsif Input.trigger?(Input::BACK)
|
||||
pbPlayCancelSE()
|
||||
pbPlayCancelSE
|
||||
return [3,0]
|
||||
end
|
||||
end
|
||||
}
|
||||
end
|
||||
|
||||
def pbChooseSet()
|
||||
def pbChooseSet
|
||||
pbActivateWindow(@sprites,"setwindow") {
|
||||
oldindex=@sprites["setwindow"].index
|
||||
loop do
|
||||
@@ -1225,11 +1227,11 @@ class PurifyChamberScene
|
||||
Input.update
|
||||
pbUpdate
|
||||
if Input.trigger?(Input::USE)
|
||||
pbPlayDecisionSE()
|
||||
pbPlayDecisionSE
|
||||
return @sprites["setwindow"].index
|
||||
end
|
||||
if Input.trigger?(Input::BACK)
|
||||
pbPlayCancelSE()
|
||||
pbPlayCancelSE
|
||||
return -1
|
||||
end
|
||||
end
|
||||
@@ -1238,7 +1240,7 @@ class PurifyChamberScene
|
||||
|
||||
def pbSwitch(set)
|
||||
@sprites["setwindow"].switching=set
|
||||
ret=pbChooseSet()
|
||||
ret=pbChooseSet
|
||||
@sprites["setwindow"].switching=-1
|
||||
return ret<0 ? set : ret
|
||||
end
|
||||
@@ -1285,11 +1287,11 @@ class PurifyChamberScene
|
||||
pbRefresh
|
||||
end
|
||||
|
||||
def pbChoosePokemon()
|
||||
def pbChoosePokemon
|
||||
visible=pbFadeOutAndHide(@sprites)
|
||||
scene=PokemonStorageScene.new()
|
||||
scene=PokemonStorageScene.new
|
||||
screen=PokemonStorageScreen.new(scene,$PokemonStorage)
|
||||
pos=screen.pbChoosePokemon()
|
||||
pos=screen.pbChoosePokemon
|
||||
pbRefresh
|
||||
pbFadeInAndShow(@sprites,visible)
|
||||
return pos
|
||||
@@ -1322,7 +1324,7 @@ class PurifyChamberPC
|
||||
|
||||
def access
|
||||
pbMessage(_INTL("\\se[PC access]Accessed the Purify Chamber."))
|
||||
pbPurifyChamber()
|
||||
pbPurifyChamber
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -73,10 +73,12 @@ class PokemonDuel
|
||||
@oldeventspeed = event.move_speed
|
||||
pbMoveRoute($game_player, [
|
||||
PBMoveRoute::ChangeSpeed, 2,
|
||||
PBMoveRoute::DirectionFixOn])
|
||||
PBMoveRoute::DirectionFixOn
|
||||
])
|
||||
pbMoveRoute(event, [
|
||||
PBMoveRoute::ChangeSpeed, 2,
|
||||
PBMoveRoute::DirectionFixOn])
|
||||
PBMoveRoute::DirectionFixOn
|
||||
])
|
||||
pbWait(Graphics.frame_rate * 3 / 4)
|
||||
end
|
||||
|
||||
@@ -129,84 +131,101 @@ class PokemonDuel
|
||||
PBMoveRoute::ScriptAsync, "moveRight90",
|
||||
PBMoveRoute::ScriptAsync, "moveLeft90",
|
||||
PBMoveRoute::ScriptAsync, "moveLeft90",
|
||||
PBMoveRoute::ScriptAsync, "moveRight90"])
|
||||
PBMoveRoute::ScriptAsync, "moveRight90"
|
||||
])
|
||||
pbMoveRoute(event, [
|
||||
PBMoveRoute::ScriptAsync, "moveLeft90",
|
||||
PBMoveRoute::ScriptAsync, "moveRight90",
|
||||
PBMoveRoute::ScriptAsync, "moveRight90",
|
||||
PBMoveRoute::ScriptAsync, "moveLeft90"])
|
||||
PBMoveRoute::ScriptAsync, "moveLeft90"
|
||||
])
|
||||
pbWait(Graphics.frame_rate / 2)
|
||||
pbMessage(_INTL("You study each other's movements..."))
|
||||
elsif action == 0 && command == 1
|
||||
pbMoveRoute($game_player, [
|
||||
PBMoveRoute::ChangeSpeed, 4,
|
||||
PBMoveRoute::Forward])
|
||||
PBMoveRoute::Forward
|
||||
])
|
||||
pbWait(Graphics.frame_rate * 4 / 10)
|
||||
pbShake(9, 9, 8)
|
||||
pbFlashScreens(false, true)
|
||||
pbMoveRoute($game_player, [
|
||||
PBMoveRoute::ChangeSpeed, 2,
|
||||
PBMoveRoute::Backward])
|
||||
PBMoveRoute::Backward
|
||||
])
|
||||
@hp[1] -= 1
|
||||
pbMessage(_INTL("Your attack was not blocked!"))
|
||||
elsif action == 0 && command == 2
|
||||
pbMoveRoute($game_player, [
|
||||
PBMoveRoute::ChangeSpeed, 4,
|
||||
PBMoveRoute::ScriptAsync, "jumpForward"])
|
||||
PBMoveRoute::ScriptAsync, "jumpForward"
|
||||
])
|
||||
pbMoveRoute(event, [
|
||||
PBMoveRoute::ChangeSpeed, 4,
|
||||
PBMoveRoute::Backward])
|
||||
PBMoveRoute::Backward
|
||||
])
|
||||
pbWait(Graphics.frame_rate)
|
||||
pbMoveRoute($game_player, [
|
||||
PBMoveRoute::ChangeSpeed, 2,
|
||||
PBMoveRoute::Backward])
|
||||
PBMoveRoute::Backward
|
||||
])
|
||||
pbMoveRoute(event, [
|
||||
PBMoveRoute::ChangeSpeed, 2,
|
||||
PBMoveRoute::Forward])
|
||||
PBMoveRoute::Forward
|
||||
])
|
||||
pbMessage(_INTL("Your attack was evaded!"))
|
||||
elsif (action == 0 || action == 1 || action == 2) && command == 3
|
||||
pbMoveRoute($game_player, [
|
||||
PBMoveRoute::ChangeSpeed, 4,
|
||||
PBMoveRoute::ScriptAsync, "jumpForward"])
|
||||
PBMoveRoute::ScriptAsync, "jumpForward"
|
||||
])
|
||||
pbWait(Graphics.frame_rate * 4 / 10)
|
||||
pbMoveRoute(event, [
|
||||
PBMoveRoute::ChangeSpeed, 5,
|
||||
PBMoveRoute::Backward,
|
||||
PBMoveRoute::ChangeSpeed, 2])
|
||||
PBMoveRoute::ChangeSpeed, 2
|
||||
])
|
||||
pbWait(Graphics.frame_rate / 2)
|
||||
pbShake(9, 9, 8)
|
||||
pbFlashScreens(false, true)
|
||||
pbMoveRoute($game_player, [
|
||||
PBMoveRoute::ChangeSpeed, 2,
|
||||
PBMoveRoute::Backward])
|
||||
PBMoveRoute::Backward
|
||||
])
|
||||
pbMoveRoute(event, [
|
||||
PBMoveRoute::ChangeSpeed, 2,
|
||||
PBMoveRoute::Forward])
|
||||
PBMoveRoute::Forward
|
||||
])
|
||||
@hp[1] -= 3
|
||||
pbMessage(_INTL("You pierce through the opponent's defenses!"))
|
||||
elsif action == 1 && command == 0
|
||||
pbMoveRoute(event, [
|
||||
PBMoveRoute::ChangeSpeed, 4,
|
||||
PBMoveRoute::Forward])
|
||||
PBMoveRoute::Forward
|
||||
])
|
||||
pbWait(Graphics.frame_rate * 4 / 10)
|
||||
pbShake(9, 9, 8)
|
||||
pbFlashScreens(true, false)
|
||||
pbMoveRoute(event, [
|
||||
PBMoveRoute::ChangeSpeed, 2,
|
||||
PBMoveRoute::Backward])
|
||||
PBMoveRoute::Backward
|
||||
])
|
||||
@hp[0] -= 1
|
||||
pbMessage(_INTL("You fail to block the opponent's attack!"))
|
||||
elsif action == 1 && command == 1
|
||||
pbMoveRoute($game_player, [
|
||||
PBMoveRoute::ChangeSpeed, 4,
|
||||
PBMoveRoute::Forward])
|
||||
PBMoveRoute::Forward
|
||||
])
|
||||
pbWait(Graphics.frame_rate * 6 / 10)
|
||||
pbMoveRoute($game_player, [
|
||||
PBMoveRoute::ChangeSpeed, 2,
|
||||
PBMoveRoute::Backward])
|
||||
PBMoveRoute::Backward
|
||||
])
|
||||
pbMoveRoute(event, [
|
||||
PBMoveRoute::ChangeSpeed, 2,
|
||||
PBMoveRoute::Forward])
|
||||
PBMoveRoute::Forward
|
||||
])
|
||||
pbWait(Graphics.frame_rate * 6 / 10)
|
||||
pbMoveRoute(event, [PBMoveRoute::Backward])
|
||||
pbMoveRoute($game_player, [PBMoveRoute::Forward])
|
||||
@@ -219,21 +238,25 @@ class PokemonDuel
|
||||
pbMoveRoute($game_player, [
|
||||
PBMoveRoute::Backward,
|
||||
PBMoveRoute::ChangeSpeed, 4,
|
||||
PBMoveRoute::ScriptAsync, "jumpForward"])
|
||||
PBMoveRoute::ScriptAsync, "jumpForward"
|
||||
])
|
||||
pbWait(Graphics.frame_rate * 8 / 10)
|
||||
pbMoveRoute(event, [
|
||||
PBMoveRoute::ChangeSpeed, 4,
|
||||
PBMoveRoute::Forward])
|
||||
PBMoveRoute::Forward
|
||||
])
|
||||
pbWait(Graphics.frame_rate * 9 / 10)
|
||||
pbShake(9, 9, 8)
|
||||
pbFlashScreens(true, true)
|
||||
pbMoveRoute($game_player, [
|
||||
PBMoveRoute::Backward,
|
||||
PBMoveRoute::ChangeSpeed, 2])
|
||||
PBMoveRoute::ChangeSpeed, 2
|
||||
])
|
||||
pbMoveRoute(event, [
|
||||
PBMoveRoute::Backward,
|
||||
PBMoveRoute::Backward,
|
||||
PBMoveRoute::ChangeSpeed, 2])
|
||||
PBMoveRoute::ChangeSpeed, 2
|
||||
])
|
||||
pbWait(Graphics.frame_rate)
|
||||
pbMoveRoute(event, [PBMoveRoute::Forward])
|
||||
pbMoveRoute($game_player, [PBMoveRoute::Forward])
|
||||
@@ -243,56 +266,68 @@ class PokemonDuel
|
||||
elsif action == 2 && command == 0
|
||||
pbMoveRoute(event, [
|
||||
PBMoveRoute::ChangeSpeed, 4,
|
||||
PBMoveRoute::Forward])
|
||||
PBMoveRoute::Forward
|
||||
])
|
||||
pbMoveRoute($game_player, [
|
||||
PBMoveRoute::ChangeSpeed, 4,
|
||||
PBMoveRoute::ScriptAsync, "jumpBackward"])
|
||||
PBMoveRoute::ScriptAsync, "jumpBackward"
|
||||
])
|
||||
pbWait(Graphics.frame_rate)
|
||||
pbMoveRoute($game_player, [
|
||||
PBMoveRoute::ChangeSpeed, 2,
|
||||
PBMoveRoute::Forward])
|
||||
PBMoveRoute::Forward
|
||||
])
|
||||
pbMoveRoute(event, [
|
||||
PBMoveRoute::ChangeSpeed, 2,
|
||||
PBMoveRoute::Backward])
|
||||
PBMoveRoute::Backward
|
||||
])
|
||||
pbMessage(_INTL("You evade the opponent's attack!"))
|
||||
elsif action == 3 && (command == 0 || command == 1 || command == 2)
|
||||
pbMoveRoute(event, [
|
||||
PBMoveRoute::ChangeSpeed, 4,
|
||||
PBMoveRoute::ScriptAsync, "jumpForward"])
|
||||
PBMoveRoute::ScriptAsync, "jumpForward"
|
||||
])
|
||||
pbWait(Graphics.frame_rate * 4 / 10)
|
||||
pbMoveRoute($game_player, [
|
||||
PBMoveRoute::ChangeSpeed, 5,
|
||||
PBMoveRoute::Backward,
|
||||
PBMoveRoute::ChangeSpeed, 2])
|
||||
PBMoveRoute::ChangeSpeed, 2
|
||||
])
|
||||
pbWait(Graphics.frame_rate / 2)
|
||||
pbShake(9, 9, 8)
|
||||
pbFlashScreens(true, false)
|
||||
pbMoveRoute($game_player, [
|
||||
PBMoveRoute::ChangeSpeed, 2,
|
||||
PBMoveRoute::Forward])
|
||||
PBMoveRoute::Forward
|
||||
])
|
||||
pbMoveRoute(event, [
|
||||
PBMoveRoute::ChangeSpeed, 2,
|
||||
PBMoveRoute::Backward])
|
||||
PBMoveRoute::Backward
|
||||
])
|
||||
@hp[0] -= 3
|
||||
pbMessage(_INTL("The opponent pierces through your defenses!"))
|
||||
elsif action == 3 && command == 3
|
||||
pbMoveRoute($game_player, [PBMoveRoute::Backward])
|
||||
pbMoveRoute($game_player, [
|
||||
PBMoveRoute::ChangeSpeed, 4,
|
||||
PBMoveRoute::ScriptAsync, "jumpForward"])
|
||||
PBMoveRoute::ScriptAsync, "jumpForward"
|
||||
])
|
||||
pbMoveRoute(event, [
|
||||
PBMoveRoute::Wait, 15,
|
||||
PBMoveRoute::ChangeSpeed, 4,
|
||||
PBMoveRoute::ScriptAsync, "jumpForward"])
|
||||
PBMoveRoute::ScriptAsync, "jumpForward"
|
||||
])
|
||||
pbWait(Graphics.frame_rate)
|
||||
pbMoveRoute(event, [
|
||||
PBMoveRoute::ChangeSpeed, 5,
|
||||
PBMoveRoute::Backward,
|
||||
PBMoveRoute::ChangeSpeed, 2])
|
||||
PBMoveRoute::ChangeSpeed, 2
|
||||
])
|
||||
pbMoveRoute($game_player, [
|
||||
PBMoveRoute::ChangeSpeed, 5,
|
||||
PBMoveRoute::Backward,
|
||||
PBMoveRoute::ChangeSpeed, 2])
|
||||
PBMoveRoute::ChangeSpeed, 2
|
||||
])
|
||||
pbShake(9, 9, 8)
|
||||
pbFlash(Color.new(255, 255, 255, 255), 20)
|
||||
pbFlashScreens(true, true)
|
||||
@@ -310,10 +345,12 @@ class PokemonDuel
|
||||
pbWait(Graphics.frame_rate * 3 / 4)
|
||||
pbMoveRoute($game_player, [
|
||||
PBMoveRoute::DirectionFixOff,
|
||||
PBMoveRoute::ChangeSpeed, @oldmovespeed])
|
||||
PBMoveRoute::ChangeSpeed, @oldmovespeed
|
||||
])
|
||||
pbMoveRoute(@event, [
|
||||
PBMoveRoute::DirectionFixOff,
|
||||
PBMoveRoute::ChangeSpeed, @oldeventspeed])
|
||||
PBMoveRoute::ChangeSpeed, @oldeventspeed
|
||||
])
|
||||
fade_time = Graphics.frame_rate * 4 / 10
|
||||
alpha_diff = (255.0 / fade_time).ceil
|
||||
fade_time.times do
|
||||
|
||||
@@ -11,11 +11,11 @@ class SlotMachineReel < BitmapSprite
|
||||
attr_accessor :spinning
|
||||
attr_accessor :stopping
|
||||
attr_accessor :slipping
|
||||
|
||||
SCROLLSPEED = 16 # Must be a divisor of 48
|
||||
ICONSPOOL = [[0,0,0,0,1,1,2,2,3,3,3,4,4,4,5,5,6,6,7], # 0 - Easy
|
||||
[0,0,0,0,1,1,1,2,2,2,3,3,4,4,5,6,7], # 1 - Medium (default)
|
||||
[0,0,1,1,1,2,2,2,3,3,4,4,5,6,7] # 2 - Hard
|
||||
]
|
||||
[0,0,1,1,1,2,2,2,3,3,4,4,5,6,7]] # 2 - Hard
|
||||
SLIPPING = [0,0,0,0,0,0,1,1,1,2,2,3]
|
||||
|
||||
def initialize(x,y,difficulty=1)
|
||||
@@ -132,8 +132,7 @@ class SlotMachineScene
|
||||
[reel1[0],reel2[0],reel3[0]], # Top row
|
||||
[reel1[2],reel2[2],reel3[2]], # Bottom row
|
||||
[reel1[0],reel2[1],reel3[2]], # Diagonal top left -> bottom right
|
||||
[reel1[2],reel2[1],reel3[0]], # Diagonal bottom left -> top right
|
||||
]
|
||||
[reel1[2],reel2[1],reel3[0]]] # Diagonal bottom left -> top right
|
||||
for i in 0...combinations.length
|
||||
break if i>=1 && @wager<=1 # One coin = centre row only
|
||||
break if i>=3 && @wager<=2 # Two coins = three rows only
|
||||
|
||||
@@ -77,6 +77,7 @@ class MiningGameCursor < BitmapSprite
|
||||
attr_accessor :position
|
||||
attr_accessor :hit
|
||||
attr_accessor :counter
|
||||
|
||||
ToolPositions = [[1,0],[1,1],[1,1],[0,0],[0,0],
|
||||
[0,2],[0,2],[0,0],[0,0],[0,2],[0,2]] # Graphic, position
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ class BugContestState
|
||||
attr_accessor :decision
|
||||
attr_accessor :lastPokemon
|
||||
attr_reader :timer
|
||||
|
||||
ContestantNames = [
|
||||
_INTL("Bug Catcher Ed"),
|
||||
_INTL("Bug Catcher Benny"),
|
||||
|
||||
@@ -134,6 +134,7 @@ end
|
||||
#===============================================================================
|
||||
class PlayerRatingElo
|
||||
attr_reader :rating
|
||||
|
||||
K_VALUE = 16
|
||||
|
||||
def initialize
|
||||
|
||||
@@ -271,57 +271,57 @@ def getRandomNameEx(type,variable,upper,maxLength=100)
|
||||
name = ""
|
||||
formats = []
|
||||
case type
|
||||
when 0 then formats = %w( F5 BvE FE FE5 FEvE ) # Names for males
|
||||
when 1 then formats = %w( vE6 vEvE6 BvE6 B4 v3 vEv3 Bv3 ) # Names for females
|
||||
when 2 then formats = %w( WE WEU WEvE BvE BvEU BvEvE ) # Neutral gender names
|
||||
when 0 then formats = %w[F5 BvE FE FE5 FEvE] # Names for males
|
||||
when 1 then formats = %w[vE6 vEvE6 BvE6 B4 v3 vEv3 Bv3] # Names for females
|
||||
when 2 then formats = %w[WE WEU WEvE BvE BvEU BvEvE] # Neutral gender names
|
||||
else return ""
|
||||
end
|
||||
format = formats[rand(formats.length)]
|
||||
format.scan(/./) { |c|
|
||||
case c
|
||||
when "c" # consonant
|
||||
set = %w( b c d f g h j k l m n p r s t v w x z )
|
||||
set = %w[b c d f g h j k l m n p r s t v w x z]
|
||||
name += set[rand(set.length)]
|
||||
when "v" # vowel
|
||||
set = %w( a a a e e e i i i o o o u u u )
|
||||
set = %w[a a a e e e i i i o o o u u u]
|
||||
name += set[rand(set.length)]
|
||||
when "W" # beginning vowel
|
||||
set = %w( a a a e e e i i i o o o u u u au au ay ay ea ea ee ee oo oo ou ou )
|
||||
set = %w[a a a e e e i i i o o o u u u au au ay ay ea ea ee ee oo oo ou ou]
|
||||
name += set[rand(set.length)]
|
||||
when "U" # ending vowel
|
||||
set = %w( a a a a a e e e i i i o o o o o u u ay ay ie ie ee ue oo )
|
||||
set = %w[a a a a a e e e i i i o o o o o u u ay ay ie ie ee ue oo]
|
||||
name += set[rand(set.length)]
|
||||
when "B" # beginning consonant
|
||||
set1 = %w( b c d f g h j k l l m n n p r r s s t t v w y z )
|
||||
set2 = %w( bl br ch cl cr dr fr fl gl gr kh kl kr ph pl pr sc sk sl
|
||||
sm sn sp st sw th tr tw vl zh )
|
||||
set1 = %w[b c d f g h j k l l m n n p r r s s t t v w y z]
|
||||
set2 = %w[bl br ch cl cr dr fr fl gl gr kh kl kr ph pl pr sc sk sl
|
||||
sm sn sp st sw th tr tw vl zh]
|
||||
name += (rand(3)>0) ? set1[rand(set1.length)] : set2[rand(set2.length)]
|
||||
when "E" # ending consonant
|
||||
set1 = %w( b c d f g h j k k l l m n n p r r s s t t v z )
|
||||
set2 = %w( bb bs ch cs ds fs ft gs gg ld ls nd ng nk rn kt ks
|
||||
ms ns ph pt ps sk sh sp ss st rd rn rp rm rt rk ns th zh)
|
||||
set1 = %w[b c d f g h j k k l l m n n p r r s s t t v z]
|
||||
set2 = %w[bb bs ch cs ds fs ft gs gg ld ls nd ng nk rn kt ks
|
||||
ms ns ph pt ps sk sh sp ss st rd rn rp rm rt rk ns th zh]
|
||||
name += (rand(3)>0) ? set1[rand(set1.length)] : set2[rand(set2.length)]
|
||||
when "f" # consonant and vowel
|
||||
set = %w( iz us or )
|
||||
set = %w[iz us or]
|
||||
name += set[rand(set.length)]
|
||||
when "F" # consonant and vowel
|
||||
set = %w( bo ba be bu re ro si mi zho se nya gru gruu glee gra glo ra do zo ri
|
||||
di ze go ga pree pro po pa ka ki ku de da ma mo le la li )
|
||||
set = %w[bo ba be bu re ro si mi zho se nya gru gruu glee gra glo ra do zo ri
|
||||
di ze go ga pree pro po pa ka ki ku de da ma mo le la li]
|
||||
name += set[rand(set.length)]
|
||||
when "2"
|
||||
set = %w( c f g k l p r s t )
|
||||
set = %w[c f g k l p r s t]
|
||||
name += set[rand(set.length)]
|
||||
when "3"
|
||||
set = %w( nka nda la li ndra sta cha chie )
|
||||
set = %w[nka nda la li ndra sta cha chie]
|
||||
name += set[rand(set.length)]
|
||||
when "4"
|
||||
set = %w( una ona ina ita ila ala ana ia iana )
|
||||
set = %w[una ona ina ita ila ala ana ia iana]
|
||||
name += set[rand(set.length)]
|
||||
when "5"
|
||||
set = %w( e e o o ius io u u ito io ius us )
|
||||
set = %w[e e o o ius io u u ito io ius us]
|
||||
name += set[rand(set.length)]
|
||||
when "6"
|
||||
set = %w( a a a elle ine ika ina ita ila ala ana )
|
||||
set = %w[a a a elle ine ika ina ita ila ala ana]
|
||||
name += set[rand(set.length)]
|
||||
end
|
||||
}
|
||||
|
||||
@@ -435,8 +435,8 @@ def pbTrainerTypeEditorNew(default_name)
|
||||
return nil
|
||||
end
|
||||
# Choose a gender
|
||||
gender = pbMessage(_INTL("Is the Trainer male, female or unknown?"), [
|
||||
_INTL("Male"), _INTL("Female"), _INTL("Unknown")], 0)
|
||||
gender = pbMessage(_INTL("Is the Trainer male, female or unknown?"),
|
||||
[_INTL("Male"), _INTL("Female"), _INTL("Unknown")], 0)
|
||||
# Choose a base money value
|
||||
params = ChooseNumberParams.new
|
||||
params.setRange(0, 255)
|
||||
@@ -564,7 +564,8 @@ def pbTrainerBattleEditor
|
||||
ret = pbMessage(_INTL("First, define the new trainer's type."), [
|
||||
_INTL("Use existing type"),
|
||||
_INTL("Create new type"),
|
||||
_INTL("Cancel")], 3)
|
||||
_INTL("Cancel")
|
||||
], 3)
|
||||
case ret
|
||||
when 0
|
||||
tr_type = pbListScreen(_INTL("TRAINER TYPE"), TrainerTypeLister.new(0, false))
|
||||
|
||||
@@ -167,6 +167,7 @@ class AnimationWindow < SpriteWrapper
|
||||
attr_reader :animbitmap
|
||||
attr_reader :start
|
||||
attr_reader :selected
|
||||
|
||||
NUMFRAMES=5
|
||||
|
||||
def initialize(x,y,width,height,viewport=nil)
|
||||
@@ -358,6 +359,7 @@ class SpriteFrame < InvalidatableSprite
|
||||
attr_reader :locked
|
||||
attr_reader :selected
|
||||
attr_reader :sprite
|
||||
|
||||
NUM_ROWS = (PBAnimation::MAX_SPRITES.to_f/10).ceil # 10 frame number icons in each row
|
||||
|
||||
def initialize(id,sprite,viewport,previous=false)
|
||||
@@ -431,6 +433,7 @@ class AnimationCanvas < Sprite
|
||||
attr_reader :animation # Currently selected animation
|
||||
attr_reader :animbitmap # Currently selected animation bitmap
|
||||
attr_accessor :pattern # Currently selected pattern
|
||||
|
||||
BORDERSIZE=64
|
||||
|
||||
def initialize(animation,viewport=nil)
|
||||
|
||||
@@ -251,8 +251,8 @@ def pbDebugDayCare
|
||||
msg = _INTL("Pokémon can breed (compatibility = {1}).", compat)
|
||||
# Show compatibility
|
||||
if day_care.egg_generated
|
||||
case pbMessage("\\ts[]" + msg, [
|
||||
_INTL("Collect egg"), _INTL("Clear egg"), _INTL("Cancel")], 3)
|
||||
case pbMessage("\\ts[]" + msg,
|
||||
[_INTL("Collect egg"), _INTL("Clear egg"), _INTL("Cancel")], 3)
|
||||
when 0 # Collect egg
|
||||
if $player.party_full?
|
||||
pbMessage(_INTL("Party is full, can't collect the egg."))
|
||||
@@ -274,8 +274,8 @@ def pbDebugDayCare
|
||||
end
|
||||
end
|
||||
elsif cmd == commands.length - 1 # Steps to next cycle
|
||||
case pbMessage("\\ts[]" + _INTL("Change number of steps to next cycle?"), [
|
||||
_INTL("Set to 1"), _INTL("Set to 256"), _INTL("Set to other value"), _INTL("Cancel")], 4)
|
||||
case pbMessage("\\ts[]" + _INTL("Change number of steps to next cycle?"),
|
||||
[_INTL("Set to 1"), _INTL("Set to 256"), _INTL("Set to other value"), _INTL("Cancel")], 4)
|
||||
when 0 # Set to 1
|
||||
day_care.step_counter = 255
|
||||
need_refresh = true
|
||||
@@ -302,8 +302,8 @@ def pbDebugDayCare
|
||||
msg += "\\n" + _INTL("Steps to next level: {1}", end_exp - pkmn.exp)
|
||||
end
|
||||
# Show level change and cost
|
||||
case pbMessage("\\ts[]" + msg, [
|
||||
_INTL("Summary"), _INTL("Withdraw"), _INTL("Cancel")], 3)
|
||||
case pbMessage("\\ts[]" + msg,
|
||||
[_INTL("Summary"), _INTL("Withdraw"), _INTL("Cancel")], 3)
|
||||
when 0 # Summary
|
||||
pbFadeOutIn {
|
||||
scene = PokemonSummary_Scene.new
|
||||
@@ -322,8 +322,8 @@ def pbDebugDayCare
|
||||
end
|
||||
end
|
||||
else
|
||||
case pbMessage("\\ts[]" + _INTL("This slot is empty."), [
|
||||
_INTL("Deposit"), _INTL("Cancel")], 2)
|
||||
case pbMessage("\\ts[]" + _INTL("This slot is empty."),
|
||||
[_INTL("Deposit"), _INTL("Cancel")], 2)
|
||||
when 0 # Deposit
|
||||
if $player.party.empty?
|
||||
pbMessage(_INTL("Party is empty, can't deposit Pokémon."))
|
||||
@@ -449,7 +449,6 @@ def pbDebugRoamers
|
||||
else
|
||||
$PokemonGlobal.roamPosition[cmdwindow.index] = pbDefaultMap
|
||||
end
|
||||
cmdwindow.refresh
|
||||
else # Roam to a random other map
|
||||
oldmap = $PokemonGlobal.roamPosition[cmdwindow.index]
|
||||
pbRoamPokemonOne(cmdwindow.index)
|
||||
@@ -458,8 +457,8 @@ def pbDebugRoamers
|
||||
pbRoamPokemonOne(cmdwindow.index)
|
||||
end
|
||||
$PokemonGlobal.roamedAlready = false
|
||||
cmdwindow.refresh
|
||||
end
|
||||
cmdwindow.refresh
|
||||
elsif Input.trigger?(Input::BACK)
|
||||
pbPlayCancelSE
|
||||
break
|
||||
@@ -614,7 +613,7 @@ def pbImportAllAnimations
|
||||
Graphics.update
|
||||
audios = []
|
||||
files = Dir.glob(folder+"/*.*")
|
||||
%w( wav ogg mid wma ).each { |ext| # mp3
|
||||
%w[wav ogg mid wma].each { |ext| # mp3
|
||||
upext = ext.upcase
|
||||
audios.concat(files.find_all { |f| f[f.length-3,3]==ext })
|
||||
audios.concat(files.find_all { |f| f[f.length-3,3]==upext })
|
||||
@@ -623,7 +622,7 @@ def pbImportAllAnimations
|
||||
pbSafeCopyFile(audio,RTP.getAudioPath("Audio/SE/Anim/"+File.basename(audio)),"Audio/SE/Anim/"+File.basename(audio))
|
||||
end
|
||||
images = []
|
||||
%w( png gif ).each { |ext| # jpg jpeg bmp
|
||||
%w[png gif].each { |ext| # jpg jpeg bmp
|
||||
upext = ext.upcase
|
||||
images.concat(files.find_all { |f| f[f.length-3,3]==ext })
|
||||
images.concat(files.find_all { |f| f[f.length-3,3]==upext })
|
||||
|
||||
@@ -163,8 +163,8 @@ PokemonDebugMenuCommands.register("setpokerus", {
|
||||
msg = [_INTL("{1} doesn't have Pokérus.", pkmn.name),
|
||||
_INTL("Has strain {1}, infectious for {2} more days.", pokerus / 16, pokerus % 16),
|
||||
_INTL("Has strain {1}, not infectious.", pokerus / 16)][pkmn.pokerusStage]
|
||||
cmd = screen.pbShowCommands(msg, [
|
||||
_INTL("Give random strain"),
|
||||
cmd = screen.pbShowCommands(msg,
|
||||
[_INTL("Give random strain"),
|
||||
_INTL("Make not infectious"),
|
||||
_INTL("Clear Pokérus")], cmd)
|
||||
break if cmd < 0
|
||||
@@ -257,8 +257,8 @@ PokemonDebugMenuCommands.register("hiddenvalues", {
|
||||
cmd = 0
|
||||
loop do
|
||||
persid = sprintf("0x%08X", pkmn.personalID)
|
||||
cmd = screen.pbShowCommands(_INTL("Personal ID is {1}.", persid), [
|
||||
_INTL("Set EVs"),
|
||||
cmd = screen.pbShowCommands(_INTL("Personal ID is {1}.", persid),
|
||||
[_INTL("Set EVs"),
|
||||
_INTL("Set IVs"),
|
||||
_INTL("Randomise pID")], cmd)
|
||||
break if cmd < 0
|
||||
@@ -574,8 +574,8 @@ PokemonDebugMenuCommands.register("setmovepp", {
|
||||
cmd2 = 0
|
||||
loop do
|
||||
msg = _INTL("{1}: PP {2}/{3} (PP Up {4}/3)", movename, move.pp, move.total_pp, move.ppup)
|
||||
cmd2 = screen.pbShowCommands(msg, [
|
||||
_INTL("Set PP"),
|
||||
cmd2 = screen.pbShowCommands(msg,
|
||||
[_INTL("Set PP"),
|
||||
_INTL("Full PP"),
|
||||
_INTL("Set PP Up")], cmd2)
|
||||
break if cmd2 < 0
|
||||
@@ -764,8 +764,8 @@ PokemonDebugMenuCommands.register("setgender", {
|
||||
cmd = 0
|
||||
loop do
|
||||
msg = [_INTL("Gender is male."), _INTL("Gender is female.")][pkmn.male? ? 0 : 1]
|
||||
cmd = screen.pbShowCommands(msg, [
|
||||
_INTL("Make male"),
|
||||
cmd = screen.pbShowCommands(msg,
|
||||
[_INTL("Make male"),
|
||||
_INTL("Make female"),
|
||||
_INTL("Reset")], cmd)
|
||||
break if cmd < 0
|
||||
@@ -800,8 +800,8 @@ PokemonDebugMenuCommands.register("speciesform", {
|
||||
loop do
|
||||
msg = [_INTL("Species {1}, form {2}.", pkmn.speciesName, pkmn.form),
|
||||
_INTL("Species {1}, form {2} (forced).", pkmn.speciesName, pkmn.form)][(pkmn.forced_form.nil?) ? 0 : 1]
|
||||
cmd = screen.pbShowCommands(msg, [
|
||||
_INTL("Set species"),
|
||||
cmd = screen.pbShowCommands(msg,
|
||||
[_INTL("Set species"),
|
||||
_INTL("Set form"),
|
||||
_INTL("Remove form override")], cmd)
|
||||
break if cmd < 0
|
||||
@@ -869,8 +869,8 @@ PokemonDebugMenuCommands.register("setshininess", {
|
||||
loop do
|
||||
msg_idx = pkmn.shiny? ? (pkmn.super_shiny? ? 1 : 0) : 2
|
||||
msg = [_INTL("Is shiny."), _INTL("Is super shiny."), _INTL("Is normal (not shiny).")][msg_idx]
|
||||
cmd = screen.pbShowCommands(msg, [
|
||||
_INTL("Make shiny"),
|
||||
cmd = screen.pbShowCommands(msg,
|
||||
[_INTL("Make shiny"),
|
||||
_INTL("Make super shiny"),
|
||||
_INTL("Make normal"),
|
||||
_INTL("Reset")], cmd)
|
||||
@@ -969,9 +969,7 @@ PokemonDebugMenuCommands.register("setnickname", {
|
||||
speciesname = pkmn.speciesName
|
||||
msg = [_INTL("{1} has the nickname {2}.", speciesname, pkmn.name),
|
||||
_INTL("{1} has no nickname.", speciesname)][pkmn.nicknamed? ? 0 : 1]
|
||||
cmd = screen.pbShowCommands(msg, [
|
||||
_INTL("Rename"),
|
||||
_INTL("Erase name")], cmd)
|
||||
cmd = screen.pbShowCommands(msg, [_INTL("Rename"), _INTL("Erase name")], cmd)
|
||||
break if cmd < 0
|
||||
case cmd
|
||||
when 0 # Rename
|
||||
@@ -997,11 +995,12 @@ PokemonDebugMenuCommands.register("ownership", {
|
||||
cmd = 0
|
||||
loop do
|
||||
gender = [_INTL("Male"), _INTL("Female"), _INTL("Unknown")][pkmn.owner.gender]
|
||||
msg = [_INTL("Player's Pokémon\n{1}\n{2}\n{3} ({4})", pkmn.owner.name, gender, pkmn.owner.public_id, pkmn.owner.id),
|
||||
_INTL("Foreign Pokémon\n{1}\n{2}\n{3} ({4})", pkmn.owner.name, gender, pkmn.owner.public_id, pkmn.owner.id)
|
||||
][pkmn.foreign?($player) ? 1 : 0]
|
||||
cmd = screen.pbShowCommands(msg, [
|
||||
_INTL("Make player's"),
|
||||
msg = [_INTL("Player's Pokémon\n{1}\n{2}\n{3} ({4})",
|
||||
pkmn.owner.name, gender, pkmn.owner.public_id, pkmn.owner.id),
|
||||
_INTL("Foreign Pokémon\n{1}\n{2}\n{3} ({4})",
|
||||
pkmn.owner.name, gender, pkmn.owner.public_id, pkmn.owner.id)][pkmn.foreign?($player) ? 1 : 0]
|
||||
cmd = screen.pbShowCommands(msg,
|
||||
[_INTL("Make player's"),
|
||||
_INTL("Set OT's name"),
|
||||
_INTL("Set OT's gender"),
|
||||
_INTL("Random foreign ID"),
|
||||
@@ -1073,8 +1072,8 @@ PokemonDebugMenuCommands.register("setegg", {
|
||||
loop do
|
||||
msg = [_INTL("Not an egg"),
|
||||
_INTL("Egg (hatches in {1} steps).", pkmn.steps_to_hatch)][pkmn.egg? ? 1 : 0]
|
||||
cmd = screen.pbShowCommands(msg, [
|
||||
_INTL("Make egg"),
|
||||
cmd = screen.pbShowCommands(msg,
|
||||
[_INTL("Make egg"),
|
||||
_INTL("Make Pokémon"),
|
||||
_INTL("Set steps left to 1")], cmd)
|
||||
break if cmd < 0
|
||||
@@ -1114,11 +1113,8 @@ PokemonDebugMenuCommands.register("shadowpkmn", {
|
||||
cmd = 0
|
||||
loop do
|
||||
msg = [_INTL("Not a Shadow Pokémon."),
|
||||
_INTL("Heart gauge is {1} (stage {2}).", pkmn.heart_gauge, pkmn.heartStage)
|
||||
][pkmn.shadowPokemon? ? 1 : 0]
|
||||
cmd = screen.pbShowCommands(msg, [
|
||||
_INTL("Make Shadow"),
|
||||
_INTL("Set heart gauge")], cmd)
|
||||
_INTL("Heart gauge is {1} (stage {2}).", pkmn.heart_gauge, pkmn.heartStage)][pkmn.shadowPokemon? ? 1 : 0]
|
||||
cmd = screen.pbShowCommands(msg, [_INTL("Make Shadow"), _INTL("Set heart gauge")], cmd)
|
||||
break if cmd < 0
|
||||
case cmd
|
||||
when 0 # Make Shadow
|
||||
|
||||
@@ -347,10 +347,11 @@ module Compiler
|
||||
GameData::Move.register(move_hash)
|
||||
end
|
||||
# Parse move
|
||||
line = pbGetCsvRecord(line, line_no, [0, "snssueeuuueiss",
|
||||
line = pbGetCsvRecord(line, line_no,
|
||||
[0, "snssueeuuueiss",
|
||||
nil, nil, nil, nil, nil, :Type, ["Physical", "Special", "Status"],
|
||||
nil, nil, nil, :Target, nil, nil, nil
|
||||
])
|
||||
nil, nil, nil, :Target, nil, nil, nil]
|
||||
)
|
||||
move_id = line[1].to_sym
|
||||
if GameData::Move::DATA[move_id]
|
||||
raise _INTL("Move ID '{1}' is used twice.\r\n{2}", move_id, FileLineData.linereport)
|
||||
@@ -467,8 +468,10 @@ module Compiler
|
||||
# Add previous item's data to records
|
||||
GameData::Item.register(item_hash) if item_hash
|
||||
# Parse item
|
||||
line = pbGetCsvRecord(line, line_no, [0, "snssvusuuUE", nil, nil, nil,
|
||||
nil, nil, nil, nil, nil, nil, nil, :Move])
|
||||
line = pbGetCsvRecord(line, line_no,
|
||||
[0, "snssvusuuUE", nil, nil, nil,
|
||||
nil, nil, nil, nil, nil, nil, nil, :Move]
|
||||
)
|
||||
item_id = line[1].to_sym
|
||||
if GameData::Item.exists?(item_id)
|
||||
raise _INTL("Item ID '{1}' is used twice.\r\n{2}", item_id, FileLineData.linereport)
|
||||
@@ -1337,12 +1340,14 @@ module Compiler
|
||||
# Add previous trainer type's data to records
|
||||
GameData::TrainerType.register(tr_type_hash) if tr_type_hash
|
||||
# Parse trainer type
|
||||
line = pbGetCsvRecord(line, line_no, [0, "snsUSSSeUS",
|
||||
nil, nil, nil, nil, nil, nil, nil, {
|
||||
"Male" => 0, "M" => 0, "0" => 0,
|
||||
line = pbGetCsvRecord(line, line_no,
|
||||
[0, "snsUSSSeUS",
|
||||
nil, nil, nil, nil, nil, nil, nil,
|
||||
{ "Male" => 0, "M" => 0, "0" => 0,
|
||||
"Female" => 1, "F" => 1, "1" => 1,
|
||||
"Mixed" => 2, "X" => 2, "2" => 2, "" => 2
|
||||
}, nil, nil])
|
||||
"Mixed" => 2, "X" => 2, "2" => 2, "" => 2 },
|
||||
nil, nil]
|
||||
)
|
||||
tr_type_id = line[1].to_sym
|
||||
if GameData::TrainerType.exists?(tr_type_id)
|
||||
raise _INTL("Trainer Type ID '{1}' is used twice.\r\n{2}", tr_type_id, FileLineData.linereport)
|
||||
|
||||
@@ -786,9 +786,11 @@ module Compiler
|
||||
PBMoveRoute::PlaySE,RPG::AudioFile.new("Door enter"),PBMoveRoute::Wait,2,
|
||||
PBMoveRoute::TurnLeft,PBMoveRoute::Wait,2,
|
||||
PBMoveRoute::TurnRight,PBMoveRoute::Wait,2,
|
||||
PBMoveRoute::TurnUp,PBMoveRoute::Wait,2])
|
||||
PBMoveRoute::TurnUp,PBMoveRoute::Wait,2
|
||||
])
|
||||
push_move_route_and_wait(list,-1,[ # Move Route for player entering door
|
||||
PBMoveRoute::ThroughOn,PBMoveRoute::Up,PBMoveRoute::ThroughOff])
|
||||
PBMoveRoute::ThroughOn,PBMoveRoute::Up,PBMoveRoute::ThroughOff
|
||||
])
|
||||
push_event(list,208,[0]) # Change Transparent Flag (invisible)
|
||||
push_script(list, "Followers.follow_into_door")
|
||||
push_event(list, 210, [], indent) # Wait for Move's Completion
|
||||
@@ -809,14 +811,16 @@ module Compiler
|
||||
push_event(list,208,[0],1) # Change Transparent Flag (invisible)
|
||||
push_script(list, "Followers.hide_followers", 1)
|
||||
push_move_route_and_wait(list,0,[ # Move Route for setting door to open
|
||||
PBMoveRoute::TurnLeft,PBMoveRoute::Wait,6],1)
|
||||
PBMoveRoute::TurnLeft,PBMoveRoute::Wait,6
|
||||
],1)
|
||||
push_event(list,208,[1],1) # Change Transparent Flag (visible)
|
||||
push_move_route_and_wait(list,-1,[PBMoveRoute::Down],1) # Move Route for player exiting door
|
||||
push_script(list, "Followers.put_followers_on_player", 1)
|
||||
push_move_route_and_wait(list,0,[ # Move Route for door closing
|
||||
PBMoveRoute::TurnUp,PBMoveRoute::Wait,2,
|
||||
PBMoveRoute::TurnRight,PBMoveRoute::Wait,2,
|
||||
PBMoveRoute::TurnDown,PBMoveRoute::Wait,2],1)
|
||||
PBMoveRoute::TurnDown,PBMoveRoute::Wait,2
|
||||
],1)
|
||||
push_branch_end(list,1)
|
||||
push_script(list,"setTempSwitchOn(\"A\")")
|
||||
push_end(list)
|
||||
@@ -973,7 +977,6 @@ module Compiler
|
||||
push_script(newEvents,"pbReceiveItem(:#{itemname})",oldIndent+1)
|
||||
push_else(newEvents,oldIndent+1)
|
||||
push_text(newEvents,_INTL("You have no room left in the Bag."),oldIndent+1)
|
||||
push_branch_end(newEvents,oldIndent+1)
|
||||
else
|
||||
push_event(newEvents,111,[7,cost,0],oldIndent)
|
||||
push_branch(newEvents,"$bag.can_add?(:#{itemname})",oldIndent+1)
|
||||
@@ -985,8 +988,8 @@ module Compiler
|
||||
push_branch_end(newEvents,oldIndent+2)
|
||||
push_else(newEvents,oldIndent+1)
|
||||
push_text(newEvents,_INTL("\\GYou don't have enough money."),oldIndent+1)
|
||||
push_branch_end(newEvents,oldIndent+1)
|
||||
end
|
||||
push_branch_end(newEvents,oldIndent+1)
|
||||
list[i,0] = newEvents # insert 'newEvents' at index 'i'
|
||||
changed = true
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user