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