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("#{$!.backtrace.inspect}")
|
||||
PBDebug.log("")
|
||||
# if $INTERNAL
|
||||
pbPrintException($!)
|
||||
# end
|
||||
pbPrintException($!) # if $INTERNAL
|
||||
PBDebug.flush
|
||||
end
|
||||
end
|
||||
|
||||
def self.flush
|
||||
if $DEBUG && $INTERNAL && @@log.length>0
|
||||
File.open("Data/debuglog.txt", "a+b") { |f| f.write("#{@@log}") }
|
||||
File.open("Data/debuglog.txt", "a+b") { |f| f.write(@@log.to_s) }
|
||||
end
|
||||
@@log.clear
|
||||
end
|
||||
@@ -26,9 +24,7 @@ module PBDebug
|
||||
def self.log(msg)
|
||||
if $DEBUG && $INTERNAL
|
||||
@@log.push("#{msg}\r\n")
|
||||
# if @@log.length>1024
|
||||
PBDebug.flush
|
||||
# end
|
||||
PBDebug.flush # if @@log.length > 1024
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ class Dir
|
||||
filters = [filters] if !filters.is_a?(Array)
|
||||
self.chdir(dir) do
|
||||
for filter in filters
|
||||
self.glob(filter){ |f| files.push(full ? (dir + "/" + f) : f) }
|
||||
self.glob(filter) { |f| files.push(full ? (dir + "/" + f) : f) }
|
||||
end
|
||||
end
|
||||
return files.sort
|
||||
@@ -294,7 +294,7 @@ end
|
||||
# NOTE: load_data checks anything added in MKXP's RTP setting,
|
||||
# and matching mount points added through System.mount
|
||||
def pbRgssOpen(file,mode=nil)
|
||||
#File.open("debug.txt","ab") { |fw| fw.write([file,mode,Time.now.to_f].inspect+"\r\n") }
|
||||
# File.open("debug.txt","ab") { |fw| fw.write([file,mode,Time.now.to_f].inspect+"\r\n") }
|
||||
if !safeExists?("./Game.rgssad")
|
||||
if block_given?
|
||||
File.open(file,mode) { |f| yield f }
|
||||
@@ -374,7 +374,7 @@ class StringInput
|
||||
include Enumerable
|
||||
|
||||
class << self
|
||||
def new( str )
|
||||
def new(str)
|
||||
if block_given?
|
||||
begin
|
||||
f = super
|
||||
@@ -389,7 +389,7 @@ class StringInput
|
||||
alias open new
|
||||
end
|
||||
|
||||
def initialize( str )
|
||||
def initialize(str)
|
||||
@string = str
|
||||
@pos = 0
|
||||
@closed = false
|
||||
@@ -440,7 +440,7 @@ class StringInput
|
||||
@pos > @string.size
|
||||
end
|
||||
|
||||
def each( &block )
|
||||
def each(&block)
|
||||
raise IOError, 'closed stream' if @closed
|
||||
begin
|
||||
@string.each(&block)
|
||||
@@ -453,11 +453,11 @@ class StringInput
|
||||
raise IOError, 'closed stream' if @closed
|
||||
if idx = @string.index(?\n, @pos)
|
||||
idx += 1 # "\n".size
|
||||
line = @string[ @pos ... idx ]
|
||||
line = @string[@pos...idx]
|
||||
@pos = idx
|
||||
@pos += 1 if @pos == @string.size
|
||||
else
|
||||
line = @string[ @pos .. -1 ]
|
||||
line = @string[@pos..-1]
|
||||
@pos = @string.size + 1
|
||||
end
|
||||
@lineno += 1
|
||||
@@ -472,11 +472,11 @@ class StringInput
|
||||
ch
|
||||
end
|
||||
|
||||
def read( len = nil )
|
||||
def read(len = nil)
|
||||
raise IOError, 'closed stream' if @closed
|
||||
if !len
|
||||
return nil if eof?
|
||||
rest = @string[@pos ... @string.size]
|
||||
rest = @string[@pos...@string.size]
|
||||
@pos = @string.size + 1
|
||||
return rest
|
||||
end
|
||||
|
||||
@@ -373,10 +373,10 @@ class Messages
|
||||
|
||||
def self.stringToKey(str)
|
||||
if str && str[/[\r\n\t\1]|^\s+|\s+$|\s{2,}/]
|
||||
key=str.clone
|
||||
key.gsub!(/^\s+/,"")
|
||||
key.gsub!(/\s+$/,"")
|
||||
key.gsub!(/\s{2,}/," ")
|
||||
key = str.clone
|
||||
key.gsub!(/^\s+/, "")
|
||||
key.gsub!(/\s+$/, "")
|
||||
key.gsub!(/\s{2,}/, " ")
|
||||
return key
|
||||
end
|
||||
return str
|
||||
|
||||
@@ -17,6 +17,7 @@ class Game_Screen
|
||||
attr_reader :weather_type # weather type
|
||||
attr_reader :weather_max # max number of weather sprites
|
||||
attr_accessor :weather_duration # ticks in which the weather should fade in
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# * Object Initialization
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
@@ -20,6 +20,7 @@ class Game_Picture
|
||||
attr_reader :blend_type # blend method
|
||||
attr_reader :tone # color tone
|
||||
attr_reader :angle # rotation angle
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# * Object Initialization
|
||||
# number : picture number
|
||||
|
||||
@@ -138,11 +138,11 @@ class Game_Map
|
||||
end
|
||||
|
||||
def valid?(x, y)
|
||||
return x>=0 && x<width && y>=0 && y<height
|
||||
return x >= 0 && x < width && y >= 0 && y < height
|
||||
end
|
||||
|
||||
def validLax?(x, y)
|
||||
return x>=-10 && x<=width+10 && y>=-10 && y<=height+10
|
||||
return x >= -10 && x <= width + 10 && y >= -10 && y <= height + 10
|
||||
end
|
||||
|
||||
def passable?(x, y, d, self_event = nil)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
class Spriteset_Global
|
||||
attr_reader :playersprite
|
||||
|
||||
@@viewport2 = Viewport.new(0, 0, Settings::SCREEN_WIDTH, Settings::SCREEN_HEIGHT)
|
||||
@@viewport2.z = 200
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@ end
|
||||
|
||||
class Spriteset_Map
|
||||
attr_reader :map
|
||||
|
||||
@@viewport0 = Viewport.new(0, 0, Settings::SCREEN_WIDTH, Settings::SCREEN_HEIGHT) # Panorama
|
||||
@@viewport0.z = -100
|
||||
@@viewport1 = Viewport.new(0, 0, Settings::SCREEN_WIDTH, Settings::SCREEN_HEIGHT) # Map, events, player, fog
|
||||
|
||||
@@ -38,12 +38,11 @@ class Interpolator
|
||||
when OPACITY
|
||||
@tweensteps[item[0]] = [sprite.opacity,item[1]-sprite.opacity]
|
||||
when COLOR
|
||||
@tweensteps[item[0]] = [sprite.color.clone,Color.new(
|
||||
item[1].red-sprite.color.red,
|
||||
item[1].green-sprite.color.green,
|
||||
item[1].blue-sprite.color.blue,
|
||||
item[1].alpha-sprite.color.alpha
|
||||
)]
|
||||
@tweensteps[item[0]] = [sprite.color.clone,
|
||||
Color.new(item[1].red - sprite.color.red,
|
||||
item[1].green - sprite.color.green,
|
||||
item[1].blue - sprite.color.blue,
|
||||
item[1].alpha - sprite.color.alpha)]
|
||||
end
|
||||
end
|
||||
@tweening = true
|
||||
@@ -68,12 +67,10 @@ class Interpolator
|
||||
when OPACITY
|
||||
@sprite.opacity = item[0]+item[1]*t
|
||||
when COLOR
|
||||
@sprite.color = Color.new(
|
||||
item[0].red+item[1].red*t,
|
||||
item[0].green+item[1].green*t,
|
||||
item[0].blue+item[1].blue*t,
|
||||
item[0].alpha+item[1].alpha*t
|
||||
)
|
||||
@sprite.color = Color.new(item[0].red + item[1].red * t,
|
||||
item[0].green + item[1].green * t,
|
||||
item[0].blue + item[1].blue * t,
|
||||
item[0].alpha + item[1].alpha * t)
|
||||
end
|
||||
end
|
||||
@step += 1
|
||||
|
||||
@@ -3,18 +3,18 @@ class TileDrawingHelper
|
||||
attr_accessor :autotiles
|
||||
|
||||
AUTOTILE_PATTERNS = [
|
||||
[ [27, 28, 33, 34], [ 5, 28, 33, 34], [27, 6, 33, 34], [ 5, 6, 33, 34],
|
||||
[27, 28, 33, 12], [ 5, 28, 33, 12], [27, 6, 33, 12], [ 5, 6, 33, 12] ],
|
||||
[ [27, 28, 11, 34], [ 5, 28, 11, 34], [27, 6, 11, 34], [ 5, 6, 11, 34],
|
||||
[27, 28, 11, 12], [ 5, 28, 11, 12], [27, 6, 11, 12], [ 5, 6, 11, 12] ],
|
||||
[ [25, 26, 31, 32], [25, 6, 31, 32], [25, 26, 31, 12], [25, 6, 31, 12],
|
||||
[15, 16, 21, 22], [15, 16, 21, 12], [15, 16, 11, 22], [15, 16, 11, 12] ],
|
||||
[ [29, 30, 35, 36], [29, 30, 11, 36], [ 5, 30, 35, 36], [ 5, 30, 11, 36],
|
||||
[39, 40, 45, 46], [ 5, 40, 45, 46], [39, 6, 45, 46], [ 5, 6, 45, 46] ],
|
||||
[ [25, 30, 31, 36], [15, 16, 45, 46], [13, 14, 19, 20], [13, 14, 19, 12],
|
||||
[17, 18, 23, 24], [17, 18, 11, 24], [41, 42, 47, 48], [ 5, 42, 47, 48] ],
|
||||
[ [37, 38, 43, 44], [37, 6, 43, 44], [13, 18, 19, 24], [13, 14, 43, 44],
|
||||
[37, 42, 43, 48], [17, 18, 47, 48], [13, 18, 43, 48], [ 1, 2, 7, 8] ]
|
||||
[[27, 28, 33, 34], [5, 28, 33, 34], [27, 6, 33, 34], [5, 6, 33, 34],
|
||||
[27, 28, 33, 12], [5, 28, 33, 12], [27, 6, 33, 12], [5, 6, 33, 12]],
|
||||
[[27, 28, 11, 34], [5, 28, 11, 34], [27, 6, 11, 34], [5, 6, 11, 34],
|
||||
[27, 28, 11, 12], [5, 28, 11, 12], [27, 6, 11, 12], [5, 6, 11, 12]],
|
||||
[[25, 26, 31, 32], [25, 6, 31, 32], [25, 26, 31, 12], [25, 6, 31, 12],
|
||||
[15, 16, 21, 22], [15, 16, 21, 12], [15, 16, 11, 22], [15, 16, 11, 12]],
|
||||
[[29, 30, 35, 36], [29, 30, 11, 36], [5, 30, 35, 36], [5, 30, 11, 36],
|
||||
[39, 40, 45, 46], [5, 40, 45, 46], [39, 6, 45, 46], [5, 6, 45, 46]],
|
||||
[[25, 30, 31, 36], [15, 16, 45, 46], [13, 14, 19, 20], [13, 14, 19, 12],
|
||||
[17, 18, 23, 24], [17, 18, 11, 24], [41, 42, 47, 48], [5, 42, 47, 48]],
|
||||
[[37, 38, 43, 44], [37, 6, 43, 44], [13, 18, 19, 24], [13, 14, 43, 44],
|
||||
[37, 42, 43, 48], [17, 18, 47, 48], [13, 18, 43, 48], [1, 2, 7, 8]]
|
||||
]
|
||||
|
||||
# converts neighbors returned from tableNeighbors to tile indexes
|
||||
@@ -46,11 +46,11 @@ class TileDrawingHelper
|
||||
xm1 = [x - 1, 0].max
|
||||
ym1 = [y - 1, 0].max
|
||||
i = 0
|
||||
i |= 0x01 if data[ x, ym1] == t # N
|
||||
i |= 0x01 if data[x, ym1] == t # N
|
||||
i |= 0x02 if data[xp1, ym1] == t # NE
|
||||
i |= 0x04 if data[xp1, y] == t # E
|
||||
i |= 0x08 if data[xp1, yp1] == t # SE
|
||||
i |= 0x10 if data[ x, yp1] == t # S
|
||||
i |= 0x10 if data[x, yp1] == t # S
|
||||
i |= 0x20 if data[xm1, yp1] == t # SW
|
||||
i |= 0x40 if data[xm1, y] == t # W
|
||||
i |= 0x80 if data[xm1, ym1] == t # NW
|
||||
|
||||
@@ -454,19 +454,18 @@ class Window
|
||||
else
|
||||
@sprites["contents"].src_rect.set(0,0,0,0)
|
||||
end
|
||||
pauseRects=[
|
||||
trimX+32,trimY+64,
|
||||
trimX+48,trimY+64,
|
||||
trimX+32,trimY+80,
|
||||
trimX+48,trimY+80,
|
||||
pauseRects = [
|
||||
trimX + 32, trimY + 64,
|
||||
trimX + 48, trimY + 64,
|
||||
trimX + 32, trimY + 80,
|
||||
trimX + 48, trimY + 80
|
||||
]
|
||||
pauseWidth=16
|
||||
pauseHeight=16
|
||||
@sprites["pause"].src_rect.set(
|
||||
pauseRects[@pauseframe*2],
|
||||
pauseRects[@pauseframe*2+1],
|
||||
pauseWidth,pauseHeight
|
||||
)
|
||||
@sprites["pause"].src_rect.set(pauseRects[@pauseframe * 2],
|
||||
pauseRects[@pauseframe * 2 + 1],
|
||||
pauseWidth,
|
||||
pauseHeight)
|
||||
@sprites["pause"].x=@x+(@width/2)-(pauseWidth/2)
|
||||
@sprites["pause"].y=@y+@height-16 # 16 refers to skin margin
|
||||
@sprites["contents"].x=@x+16
|
||||
@@ -547,8 +546,8 @@ class Window
|
||||
@sprites["cursor"].src_rect.set(0,0,0,0)
|
||||
end
|
||||
for i in 0...4
|
||||
dwidth = (i==0 || i==3) ? @width-32 : 16
|
||||
dheight = (i==0 || i==3) ? 16 : @height-32
|
||||
dwidth = [0, 3].include?(i) ? @width - 32 : 16
|
||||
dheight = [0, 3].include?(i) ? 16 : @height - 32
|
||||
@sidebitmaps[i]=ensureBitmap(@sidebitmaps[i],dwidth,dheight)
|
||||
@sprites["side#{i}"].bitmap=@sidebitmaps[i]
|
||||
@sprites["side#{i}"].src_rect.set(0,0,dwidth,dheight)
|
||||
|
||||
@@ -134,7 +134,7 @@ class Window_AdvancedTextPokemon < SpriteWindow_Base
|
||||
@lastDrawnChar = -1
|
||||
@fmtchars = []
|
||||
@frameskipChanged = false
|
||||
@frameskip = MessageConfig.pbGetTextSpeed()
|
||||
@frameskip = MessageConfig.pbGetTextSpeed
|
||||
super(0,0,33,33)
|
||||
@pausesprite = nil
|
||||
@text = ""
|
||||
@@ -679,7 +679,7 @@ class Window_InputNumberPokemon < SpriteWindow_Base
|
||||
refresh if @frame%15==0
|
||||
if self.active
|
||||
if Input.repeat?(Input::UP) || Input.repeat?(Input::DOWN)
|
||||
pbPlayCursorSE()
|
||||
pbPlayCursorSE
|
||||
if @index==0 && @sign
|
||||
@negative=!@negative
|
||||
else
|
||||
@@ -696,14 +696,14 @@ class Window_InputNumberPokemon < SpriteWindow_Base
|
||||
refresh
|
||||
elsif Input.repeat?(Input::RIGHT)
|
||||
if digits >= 2
|
||||
pbPlayCursorSE()
|
||||
pbPlayCursorSE
|
||||
@index = (@index + 1) % digits
|
||||
@frame=0
|
||||
refresh
|
||||
end
|
||||
elsif Input.repeat?(Input::LEFT)
|
||||
if digits >= 2
|
||||
pbPlayCursorSE()
|
||||
pbPlayCursorSE
|
||||
@index = (@index + digits - 1) % digits
|
||||
@frame=0
|
||||
refresh
|
||||
@@ -847,7 +847,7 @@ class SpriteWindow_Selectable < SpriteWindow_Base
|
||||
oldindex = @index
|
||||
@index = (@index - @column_max + @item_max) % @item_max
|
||||
if @index!=oldindex
|
||||
pbPlayCursorSE()
|
||||
pbPlayCursorSE
|
||||
update_cursor_rect
|
||||
end
|
||||
end
|
||||
@@ -857,7 +857,7 @@ class SpriteWindow_Selectable < SpriteWindow_Base
|
||||
oldindex = @index
|
||||
@index = (@index + @column_max) % @item_max
|
||||
if @index!=oldindex
|
||||
pbPlayCursorSE()
|
||||
pbPlayCursorSE
|
||||
update_cursor_rect
|
||||
end
|
||||
end
|
||||
@@ -866,7 +866,7 @@ class SpriteWindow_Selectable < SpriteWindow_Base
|
||||
oldindex = @index
|
||||
@index -= 1
|
||||
if @index!=oldindex
|
||||
pbPlayCursorSE()
|
||||
pbPlayCursorSE
|
||||
update_cursor_rect
|
||||
end
|
||||
end
|
||||
@@ -875,7 +875,7 @@ class SpriteWindow_Selectable < SpriteWindow_Base
|
||||
oldindex = @index
|
||||
@index += 1
|
||||
if @index!=oldindex
|
||||
pbPlayCursorSE()
|
||||
pbPlayCursorSE
|
||||
update_cursor_rect
|
||||
end
|
||||
end
|
||||
@@ -884,7 +884,7 @@ class SpriteWindow_Selectable < SpriteWindow_Base
|
||||
oldindex = @index
|
||||
@index = [self.index-self.page_item_max, 0].max
|
||||
if @index!=oldindex
|
||||
pbPlayCursorSE()
|
||||
pbPlayCursorSE
|
||||
self.top_row -= self.page_row_max
|
||||
update_cursor_rect
|
||||
end
|
||||
@@ -894,7 +894,7 @@ class SpriteWindow_Selectable < SpriteWindow_Base
|
||||
oldindex = @index
|
||||
@index = [self.index+self.page_item_max, @item_max-1].min
|
||||
if @index!=oldindex
|
||||
pbPlayCursorSE()
|
||||
pbPlayCursorSE
|
||||
self.top_row += self.page_row_max
|
||||
update_cursor_rect
|
||||
end
|
||||
@@ -1092,8 +1092,8 @@ class Window_DrawableCommand < SpriteWindow_SelectableEx
|
||||
tmpbitmap.dispose
|
||||
end
|
||||
# Store suggested width and height of window
|
||||
dims[0] = [self.borderX+1,(width*self.columns)+self.borderX+
|
||||
(self.columns-1)*self.columnSpacing].max
|
||||
dims[0] = [self.borderX + 1,
|
||||
(width * self.columns) + self.borderX + (self.columns - 1) * self.columnSpacing].max
|
||||
dims[1] = [self.borderY+1,windowheight].max
|
||||
dims[1] = [dims[1],Graphics.height].min
|
||||
end
|
||||
@@ -1117,11 +1117,10 @@ class Window_DrawableCommand < SpriteWindow_SelectableEx
|
||||
return 0
|
||||
end
|
||||
|
||||
def drawItem(index,count,rect) # to be implemented by derived classes
|
||||
end
|
||||
def drawItem(index, count, rect); end # to be implemented by derived classes
|
||||
|
||||
def refresh
|
||||
@item_max = itemCount()
|
||||
@item_max = itemCount
|
||||
dwidth = self.width-self.borderX
|
||||
dheight = self.height-self.borderY
|
||||
self.contents = pbDoEnsureBitmap(self.contents,dwidth,dheight)
|
||||
|
||||
@@ -228,7 +228,8 @@ def getFormattedTextFast(bitmap,xDst,yDst,widthDst,heightDst,text,lineheight,
|
||||
textchars[position],
|
||||
x+xStart,texty,width+2,lineheight,
|
||||
false,bold,italic,colorclone,nil,false,false,
|
||||
defaultfontname,bitmap.font.size,position,nil,0])
|
||||
defaultfontname,bitmap.font.size,position,nil,0
|
||||
])
|
||||
end
|
||||
x+=width
|
||||
if !explicitBreaksOnly && x+2>widthDst && lastword[1]!=0 &&
|
||||
@@ -306,10 +307,10 @@ def getLastColors(colorstack,opacitystack,defaultcolors)
|
||||
colors=getLastParam(colorstack,defaultcolors)
|
||||
opacity=getLastParam(opacitystack,255)
|
||||
if opacity!=255
|
||||
colors=[Color.new(colors[0].red,colors[0].green,colors[0].blue,
|
||||
colors[0].alpha*opacity/255),
|
||||
colors[1] ? Color.new(colors[1].red,colors[1].green,colors[1].blue,
|
||||
colors[1].alpha*opacity/255) : nil]
|
||||
colors = [
|
||||
Color.new(colors[0].red, colors[0].green, colors[0].blue, colors[0].alpha * opacity / 255),
|
||||
colors[1] ? Color.new(colors[1].red, colors[1].green, colors[1].blue, colors[1].alpha * opacity / 255) : nil
|
||||
]
|
||||
end
|
||||
return colors
|
||||
end
|
||||
@@ -692,9 +693,10 @@ def getFormattedText(bitmap,xDst,yDst,widthDst,heightDst,text,lineheight=32,
|
||||
if !explicitBreaksOnly && x+2>widthDst && lastword[1]!=0 &&
|
||||
(!hadnonspace || !hadspace)
|
||||
havenl=true
|
||||
characters.insert(lastword[0],["\n",x,y*lineheight+yDst,0,lineheight,false,
|
||||
false,false,defaultcolors[0],defaultcolors[1],false,false,"",8,position,
|
||||
nil])
|
||||
characters.insert(lastword[0], ["\n", x, y * lineheight + yDst, 0, lineheight,
|
||||
false, false, false,
|
||||
defaultcolors[0], defaultcolors[1],
|
||||
false, false, "", 8, position, nil])
|
||||
charactersInternal.insert(lastword[0],[alignment,y,0])
|
||||
lastword[0]+=1
|
||||
y+=1
|
||||
|
||||
@@ -23,12 +23,12 @@ module GameData
|
||||
"Price" => [:price, "u"],
|
||||
"SellPrice" => [:sell_price, "u"],
|
||||
"Description" => [:description, "q"],
|
||||
"FieldUse" => [:field_use, "e", {"OnPokemon" => 1, "Direct" => 2, "TM" => 3,
|
||||
"HM" => 4, "OnPokemonReusable" => 1, "TR" => 6}],
|
||||
"BattleUse" => [:battle_use, "e", {"OnPokemon" => 1, "OnMove" => 2, "OnBattler" => 3,
|
||||
"FieldUse" => [:field_use, "e", { "OnPokemon" => 1, "Direct" => 2, "TM" => 3,
|
||||
"HM" => 4, "OnPokemonReusable" => 1, "TR" => 6 }],
|
||||
"BattleUse" => [:battle_use, "e", { "OnPokemon" => 1, "OnMove" => 2, "OnBattler" => 3,
|
||||
"OnFoe" => 4, "Direct" => 5, "OnPokemonReusable" => 1,
|
||||
"OnMoveReusable" => 2, "OnBattlerReusable" => 3,
|
||||
"OnFoeReusable" => 4, "DirectReusable" => 5}],
|
||||
"OnFoeReusable" => 4, "DirectReusable" => 5 }],
|
||||
"Consumable" => [:consumable, "b"],
|
||||
"Flags" => [:flags, "*s"],
|
||||
"Move" => [:move, "e", :Move]
|
||||
|
||||
@@ -35,7 +35,7 @@ module GameData
|
||||
if form > 0
|
||||
trial = sprintf("%s_%d", species, form).to_sym
|
||||
if !DATA.has_key?(trial)
|
||||
self.register({:id => species}) if !DATA[species]
|
||||
self.register({ :id => species }) if !DATA[species]
|
||||
self.register({
|
||||
:id => trial,
|
||||
:species => species,
|
||||
@@ -49,7 +49,7 @@ module GameData
|
||||
end
|
||||
return DATA[trial]
|
||||
end
|
||||
self.register({:id => species}) if !DATA[species]
|
||||
self.register({ :id => species }) if !DATA[species]
|
||||
return DATA[species]
|
||||
end
|
||||
|
||||
|
||||
@@ -15,10 +15,10 @@ module GameData
|
||||
|
||||
SCHEMA = {
|
||||
"Name" => [:name, "s"],
|
||||
"Gender" => [:gender, "e", {"Male" => 0, "male" => 0, "M" => 0, "m" => 0, "0" => 0,
|
||||
"Gender" => [:gender, "e", { "Male" => 0, "male" => 0, "M" => 0, "m" => 0, "0" => 0,
|
||||
"Female" => 1, "female" => 1, "F" => 1, "f" => 1, "1" => 1,
|
||||
"Unknown" => 2, "unknown" => 2, "Other" => 2, "other" => 2,
|
||||
"Mixed" => 2, "mixed" => 2, "X" => 2, "x" => 2, "2" => 2}],
|
||||
"Mixed" => 2, "mixed" => 2, "X" => 2, "x" => 2, "2" => 2 }],
|
||||
"BaseMoney" => [:base_money, "u"],
|
||||
"SkillLevel" => [:skill_level, "u"],
|
||||
"Flags" => [:flags, "*s"],
|
||||
|
||||
@@ -55,7 +55,8 @@ class Battle::Battler
|
||||
arrStatTexts = [
|
||||
_INTL("{1}'s {2} rose!",pbThis,GameData::Stat.get(stat).name),
|
||||
_INTL("{1}'s {2} rose sharply!",pbThis,GameData::Stat.get(stat).name),
|
||||
_INTL("{1}'s {2} rose drastically!",pbThis,GameData::Stat.get(stat).name)]
|
||||
_INTL("{1}'s {2} rose drastically!",pbThis,GameData::Stat.get(stat).name)
|
||||
]
|
||||
@battle.pbDisplay(arrStatTexts[[increment-1,2].min])
|
||||
# Trigger abilities upon stat gain
|
||||
if abilityActive?
|
||||
@@ -78,12 +79,14 @@ class Battle::Battler
|
||||
arrStatTexts = [
|
||||
_INTL("{1}'s {2} raised its {3}!",pbThis,cause,GameData::Stat.get(stat).name),
|
||||
_INTL("{1}'s {2} sharply raised its {3}!",pbThis,cause,GameData::Stat.get(stat).name),
|
||||
_INTL("{1}'s {2} drastically raised its {3}!",pbThis,cause,GameData::Stat.get(stat).name)]
|
||||
_INTL("{1}'s {2} drastically raised its {3}!",pbThis,cause,GameData::Stat.get(stat).name)
|
||||
]
|
||||
else
|
||||
arrStatTexts = [
|
||||
_INTL("{1}'s {2} raised {3}'s {4}!",user.pbThis,cause,pbThis(true),GameData::Stat.get(stat).name),
|
||||
_INTL("{1}'s {2} sharply raised {3}'s {4}!",user.pbThis,cause,pbThis(true),GameData::Stat.get(stat).name),
|
||||
_INTL("{1}'s {2} drastically raised {3}'s {4}!",user.pbThis,cause,pbThis(true),GameData::Stat.get(stat).name)]
|
||||
_INTL("{1}'s {2} drastically raised {3}'s {4}!",user.pbThis,cause,pbThis(true),GameData::Stat.get(stat).name)
|
||||
]
|
||||
end
|
||||
@battle.pbDisplay(arrStatTexts[[increment-1,2].min])
|
||||
# Trigger abilities upon stat gain
|
||||
@@ -214,7 +217,8 @@ class Battle::Battler
|
||||
arrStatTexts = [
|
||||
_INTL("{1}'s {2} fell!",pbThis,GameData::Stat.get(stat).name),
|
||||
_INTL("{1}'s {2} harshly fell!",pbThis,GameData::Stat.get(stat).name),
|
||||
_INTL("{1}'s {2} severely fell!",pbThis,GameData::Stat.get(stat).name)]
|
||||
_INTL("{1}'s {2} severely fell!",pbThis,GameData::Stat.get(stat).name)
|
||||
]
|
||||
@battle.pbDisplay(arrStatTexts[[increment-1,2].min])
|
||||
# Trigger abilities upon stat loss
|
||||
if abilityActive?
|
||||
@@ -254,12 +258,14 @@ class Battle::Battler
|
||||
arrStatTexts = [
|
||||
_INTL("{1}'s {2} lowered its {3}!",pbThis,cause,GameData::Stat.get(stat).name),
|
||||
_INTL("{1}'s {2} harshly lowered its {3}!",pbThis,cause,GameData::Stat.get(stat).name),
|
||||
_INTL("{1}'s {2} severely lowered its {3}!",pbThis,cause,GameData::Stat.get(stat).name)]
|
||||
_INTL("{1}'s {2} severely lowered its {3}!",pbThis,cause,GameData::Stat.get(stat).name)
|
||||
]
|
||||
else
|
||||
arrStatTexts = [
|
||||
_INTL("{1}'s {2} lowered {3}'s {4}!",user.pbThis,cause,pbThis(true),GameData::Stat.get(stat).name),
|
||||
_INTL("{1}'s {2} harshly lowered {3}'s {4}!",user.pbThis,cause,pbThis(true),GameData::Stat.get(stat).name),
|
||||
_INTL("{1}'s {2} severely lowered {3}'s {4}!",user.pbThis,cause,pbThis(true),GameData::Stat.get(stat).name)]
|
||||
_INTL("{1}'s {2} severely lowered {3}'s {4}!",user.pbThis,cause,pbThis(true),GameData::Stat.get(stat).name)
|
||||
]
|
||||
end
|
||||
@battle.pbDisplay(arrStatTexts[[increment-1,2].min])
|
||||
# Trigger abilities upon stat loss
|
||||
|
||||
@@ -56,7 +56,7 @@ class Battle::Battler
|
||||
end
|
||||
# Use the move
|
||||
PBDebug.log("[Move usage] #{pbThis} started using #{choice[2].name}")
|
||||
PBDebug.logonerr{
|
||||
PBDebug.logonerr {
|
||||
pbUseMove(choice,choice[2]==@battle.struggle)
|
||||
}
|
||||
@battle.pbJudge
|
||||
@@ -525,7 +525,7 @@ class Battle::Battler
|
||||
@battle.pbDisplay(_INTL("{1} used the move instructed by {2}!",b.pbThis,user.pbThis(true)))
|
||||
b.effects[PBEffects::Instructed] = true
|
||||
if b.pbCanChooseMove?(@moves[idxMove], false)
|
||||
PBDebug.logonerr{
|
||||
PBDebug.logonerr {
|
||||
b.pbUseMoveSimple(b.lastMoveUsed,b.lastRegularMoveTarget,idxMove,false)
|
||||
}
|
||||
b.lastRoundMoved = oldLastRoundMoved
|
||||
@@ -561,7 +561,7 @@ class Battle::Battler
|
||||
end
|
||||
nextUser.effects[PBEffects::Dancer] = true
|
||||
if nextUser.pbCanChooseMove?(move, false)
|
||||
PBDebug.logonerr{
|
||||
PBDebug.logonerr {
|
||||
nextUser.pbUseMoveSimple(move.id,preTarget)
|
||||
}
|
||||
nextUser.lastRoundMoved = oldLastRoundMoved
|
||||
|
||||
@@ -60,7 +60,8 @@ class Battle::Move
|
||||
def pbCalcTypeMod(moveType,user,target)
|
||||
return Effectiveness::NORMAL_EFFECTIVE if !moveType
|
||||
return Effectiveness::NORMAL_EFFECTIVE if moveType == :GROUND &&
|
||||
target.pbHasType?(:FLYING) && target.hasActiveItem?(:IRONBALL)
|
||||
target.pbHasType?(:FLYING) &&
|
||||
target.hasActiveItem?(:IRONBALL)
|
||||
# Determine types
|
||||
tTypes = target.pbTypes(true)
|
||||
# Get effectivenesses
|
||||
|
||||
@@ -144,7 +144,8 @@ class Battle::Move::HitTwoToFiveTimesRaiseUserSpd1LowerUserDef1 < Battle::Move
|
||||
2, 2, 2, 2, 2, 2, 2,
|
||||
3, 3, 3, 3, 3, 3, 3,
|
||||
4, 4, 4,
|
||||
5, 5, 5]
|
||||
5, 5, 5
|
||||
]
|
||||
r = @battle.pbRandom(hitChances.length)
|
||||
r = hitChances.length - 1 if user.hasActiveAbility?(:SKILLLINK)
|
||||
return hitChances[r]
|
||||
|
||||
@@ -396,45 +396,37 @@ class Battle::Move::ThrowUserItemAtTarget < Battle::Move
|
||||
# 80 => all Mega Stones
|
||||
# 10 => all Berries
|
||||
@flingPowers = {
|
||||
130 => [:IRONBALL
|
||||
],
|
||||
130 => [:IRONBALL],
|
||||
100 => [:HARDSTONE,:RAREBONE,
|
||||
# Fossils
|
||||
:ARMORFOSSIL,:CLAWFOSSIL,:COVERFOSSIL,:DOMEFOSSIL,:HELIXFOSSIL,
|
||||
:JAWFOSSIL,:OLDAMBER,:PLUMEFOSSIL,:ROOTFOSSIL,:SAILFOSSIL,
|
||||
:SKULLFOSSIL
|
||||
],
|
||||
:SKULLFOSSIL],
|
||||
90 => [:DEEPSEATOOTH,:GRIPCLAW,:THICKCLUB,
|
||||
# Plates
|
||||
:DRACOPLATE,:DREADPLATE,:EARTHPLATE,:FISTPLATE,:FLAMEPLATE,
|
||||
:ICICLEPLATE,:INSECTPLATE,:IRONPLATE,:MEADOWPLATE,:MINDPLATE,
|
||||
:PIXIEPLATE,:SKYPLATE,:SPLASHPLATE,:SPOOKYPLATE,:STONEPLATE,
|
||||
:TOXICPLATE,:ZAPPLATE
|
||||
],
|
||||
:TOXICPLATE,:ZAPPLATE],
|
||||
80 => [:ASSAULTVEST,:CHIPPEDPOT,:CRACKEDPOT,:DAWNSTONE,:DUSKSTONE,
|
||||
:ELECTIRIZER,:HEAVYDUTYBOOTS,:MAGMARIZER,:ODDKEYSTONE,:OVALSTONE,
|
||||
:PROTECTOR,:QUICKCLAW,:RAZORCLAW,:SACHET,:SAFETYGOGGLES,
|
||||
:SHINYSTONE,:STICKYBARB,:WEAKNESSPOLICY,:WHIPPEDDREAM
|
||||
],
|
||||
:SHINYSTONE,:STICKYBARB,:WEAKNESSPOLICY,:WHIPPEDDREAM],
|
||||
70 => [:DRAGONFANG,:POISONBARB,
|
||||
# EV-training items (Macho Brace is 60)
|
||||
:POWERANKLET,:POWERBAND,:POWERBELT,:POWERBRACER,:POWERLENS,
|
||||
:POWERWEIGHT,
|
||||
# Drives
|
||||
:BURNDRIVE,:CHILLDRIVE,:DOUSEDRIVE,:SHOCKDRIVE
|
||||
],
|
||||
:BURNDRIVE,:CHILLDRIVE,:DOUSEDRIVE,:SHOCKDRIVE],
|
||||
60 => [:ADAMANTORB,:DAMPROCK,:GRISEOUSORB,:HEATROCK,:LEEK,:LUSTROUSORB,
|
||||
:MACHOBRACE,:ROCKYHELMET,:STICK,:TERRAINEXTENDER
|
||||
],
|
||||
:MACHOBRACE,:ROCKYHELMET,:STICK,:TERRAINEXTENDER],
|
||||
50 => [:DUBIOUSDISC,:SHARPBEAK,
|
||||
# Memories
|
||||
:BUGMEMORY,:DARKMEMORY,:DRAGONMEMORY,:ELECTRICMEMORY,:FAIRYMEMORY,
|
||||
:FIGHTINGMEMORY,:FIREMEMORY,:FLYINGMEMORY,:GHOSTMEMORY,
|
||||
:GRASSMEMORY,:GROUNDMEMORY,:ICEMEMORY,:POISONMEMORY,
|
||||
:PSYCHICMEMORY,:ROCKMEMORY,:STEELMEMORY,:WATERMEMORY
|
||||
],
|
||||
40 => [:EVIOLITE,:ICYROCK,:LUCKYPUNCH
|
||||
],
|
||||
:PSYCHICMEMORY,:ROCKMEMORY,:STEELMEMORY,:WATERMEMORY],
|
||||
40 => [:EVIOLITE,:ICYROCK,:LUCKYPUNCH],
|
||||
30 => [:ABSORBBULB,:ADRENALINEORB,:AMULETCOIN,:BINDINGBAND,:BLACKBELT,
|
||||
:BLACKGLASSES,:BLACKSLUDGE,:BOTTLECAP,:CELLBATTERY,:CHARCOAL,
|
||||
:CLEANSETAG,:DEEPSEASCALE,:DRAGONSCALE,:EJECTBUTTON,:ESCAPEROPE,
|
||||
@@ -486,15 +478,12 @@ class Battle::Move::ThrowUserItemAtTarget < Battle::Move
|
||||
:RELICGOLD,:RELICSILVER,:RELICSTATUE,:RELICVASE,:STARDUST,
|
||||
:STARPIECE,:STRANGESOUVENIR,:TINYMUSHROOM,
|
||||
# Exp Candies
|
||||
:EXPCANDYXS, :EXPCANDYS, :EXPCANDYM, :EXPCANDYL, :EXPCANDYXL
|
||||
],
|
||||
20 => [
|
||||
# Feathers
|
||||
:EXPCANDYXS, :EXPCANDYS, :EXPCANDYM, :EXPCANDYL, :EXPCANDYXL],
|
||||
20 => [ # Feathers
|
||||
:CLEVERFEATHER,:GENIUSFEATHER,:HEALTHFEATHER,:MUSCLEFEATHER,
|
||||
:PRETTYFEATHER,:RESISTFEATHER,:SWIFTFEATHER,
|
||||
:CLEVERWING,:GENIUSWING,:HEALTHWING,:MUSCLEWING,:PRETTYWING,
|
||||
:RESISTWING,:SWIFTWING
|
||||
],
|
||||
:RESISTWING,:SWIFTWING],
|
||||
10 => [:AIRBALLOON,:BIGROOT,:BRIGHTPOWDER,:CHOICEBAND,:CHOICESCARF,
|
||||
:CHOICESPECS,:DESTINYKNOT,:DISCOUNTCOUPON,:EXPERTBELT,:FOCUSBAND,
|
||||
:FOCUSSASH,:LAGGINGTAIL,:LEFTOVERS,:MENTALHERB,:METALPOWDER,
|
||||
@@ -518,8 +507,7 @@ class Battle::Move::ThrowUserItemAtTarget < Battle::Move
|
||||
:SERIOUSMINT,
|
||||
# Sweets
|
||||
:STRAWBERRYSWEET, :LOVESWEET, :BERRYSWEET, :CLOVERSWEET,
|
||||
:FLOWERSWEET, :STARSWEET, :RIBBONSWEET
|
||||
]
|
||||
:FLOWERSWEET, :STARSWEET, :RIBBONSWEET]
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ class Battle::Scene::MenuBase
|
||||
attr_reader :color
|
||||
attr_reader :index
|
||||
attr_reader :mode
|
||||
|
||||
# NOTE: Button width is half the width of the graphic containing them all.
|
||||
BUTTON_HEIGHT = 46
|
||||
TEXT_BASE_COLOR = Battle::Scene::MESSAGE_BASE_COLOR
|
||||
@@ -202,6 +203,7 @@ end
|
||||
class Battle::Scene::FightMenu < Battle::Scene::MenuBase
|
||||
attr_reader :battler
|
||||
attr_reader :shiftMode
|
||||
|
||||
GET_MOVE_TEXT_COLOR_FROM_MOVE_BUTTON = true
|
||||
|
||||
# If true, displays graphics from Graphics/Pictures/Battle/overlay_fight.png
|
||||
|
||||
@@ -71,7 +71,7 @@ module Battle::Scene::Animation::BallAnimationMixin
|
||||
when :ULTRABALL then return Color.new(255, 255, 123)
|
||||
when :MASTERBALL then return Color.new(189, 165, 231)
|
||||
when :NETBALL then return Color.new(173, 255, 206)
|
||||
when :DIVEBALL then return Color.new( 99, 206, 247)
|
||||
when :DIVEBALL then return Color.new(99, 206, 247)
|
||||
when :NESTBALL then return Color.new(247, 222, 82)
|
||||
when :REPEATBALL then return Color.new(255, 198, 132)
|
||||
when :TIMERBALL then return Color.new(239, 247, 247)
|
||||
|
||||
@@ -57,7 +57,8 @@ class Battle::AI
|
||||
def pbCalcTypeMod(moveType,user,target)
|
||||
return Effectiveness::NORMAL_EFFECTIVE if !moveType
|
||||
return Effectiveness::NORMAL_EFFECTIVE if moveType == :GROUND &&
|
||||
target.pbHasType?(:FLYING) && target.hasActiveItem?(:IRONBALL)
|
||||
target.pbHasType?(:FLYING) &&
|
||||
target.hasActiveItem?(:IRONBALL)
|
||||
# Determine types
|
||||
tTypes = target.pbTypes(true)
|
||||
# Get effectivenesses
|
||||
|
||||
@@ -166,7 +166,7 @@ module Battle::CatchAndStoreMixin
|
||||
# Definite capture, no need to perform randomness checks
|
||||
return 4 if x>=255 || Battle::PokeBallEffects.isUnconditional?(ball, self, battler)
|
||||
# Second half of the shakes calculation
|
||||
y = ( 65536 / ((255.0/x)**0.1875) ).floor
|
||||
y = (65536 / ((255.0/x)**0.1875)).floor
|
||||
# Critical capture check
|
||||
if Settings::ENABLE_CRITICAL_CAPTURES
|
||||
dex_modifier = 0
|
||||
|
||||
@@ -426,6 +426,7 @@ class PBAnimation < Array
|
||||
attr_writer :speed
|
||||
attr_reader :array
|
||||
attr_reader :timing
|
||||
|
||||
MAX_SPRITES = 60
|
||||
|
||||
def speed
|
||||
@@ -698,6 +699,7 @@ end
|
||||
#===============================================================================
|
||||
class PBAnimationPlayerX
|
||||
attr_accessor :looping
|
||||
|
||||
MAX_SPRITES = 60
|
||||
|
||||
def initialize(animation,user,target,scene=nil,oppMove=false,inEditor=false)
|
||||
|
||||
@@ -7,6 +7,7 @@ module RPG
|
||||
attr_reader :max
|
||||
attr_reader :ox
|
||||
attr_reader :oy
|
||||
|
||||
MAX_SPRITES = 60
|
||||
FADE_OLD_TILES_START = 0
|
||||
FADE_OLD_TILES_END = 1
|
||||
|
||||
@@ -147,7 +147,8 @@ def moonphase(time=nil) # in UTC
|
||||
16.6109562298125,
|
||||
20.3022798364375,
|
||||
23.9936034430625,
|
||||
27.6849270496875]
|
||||
27.6849270496875
|
||||
]
|
||||
yy = time.year-((12-time.mon)/10.0).floor
|
||||
j = (365.25*(4712+yy)).floor + (((time.mon+9)%12)*30.6+0.5).floor + time.day+59
|
||||
j -= (((yy/100.0)+49).floor*0.75).floor-38 if j>2299160
|
||||
@@ -219,7 +220,8 @@ def pbIsWeekday(wdayVariable,*arg)
|
||||
_INTL("Wednesday"),
|
||||
_INTL("Thursday"),
|
||||
_INTL("Friday"),
|
||||
_INTL("Saturday")][wday]
|
||||
_INTL("Saturday")
|
||||
][wday]
|
||||
$game_map.need_refresh = true if $game_map
|
||||
end
|
||||
return ret
|
||||
@@ -291,7 +293,8 @@ def pbIsSeason(seasonVariable,*arg)
|
||||
_INTL("Spring"),
|
||||
_INTL("Summer"),
|
||||
_INTL("Autumn"),
|
||||
_INTL("Winter")][thisseason]
|
||||
_INTL("Winter")
|
||||
][thisseason]
|
||||
$game_map.need_refresh = true if $game_map
|
||||
end
|
||||
return ret
|
||||
|
||||
@@ -375,8 +375,8 @@ def pbBerryPlant
|
||||
if berry_plant.mulch_id
|
||||
pbMessage(_INTL("{1} has been laid down.\1", GameData::Item.get(berry_plant.mulch_id).name))
|
||||
else
|
||||
case pbMessage(_INTL("It's soft, earthy soil."), [
|
||||
_INTL("Fertilize"), _INTL("Plant Berry"), _INTL("Exit")], -1)
|
||||
case pbMessage(_INTL("It's soft, earthy soil."),
|
||||
[_INTL("Fertilize"), _INTL("Plant Berry"), _INTL("Exit")], -1)
|
||||
when 0 # Fertilize
|
||||
mulch = nil
|
||||
pbFadeOutIn {
|
||||
|
||||
@@ -154,7 +154,7 @@ module RandomDungeonGenerator
|
||||
end
|
||||
|
||||
# Draws a cell's contents, which is an underlying pattern based on tile
|
||||
#_layout and a rotation (the corridors), and possibly a room on top of that.
|
||||
# _layout and a rotation (the corridors), and possibly a room on top of that.
|
||||
def paint_cell_contents(dungeon, xDst, yDst, tile_layout, rotation)
|
||||
return false if !tile_layout
|
||||
# Draw the corridors
|
||||
@@ -224,6 +224,7 @@ module RandomDungeonGenerator
|
||||
#=============================================================================
|
||||
class Maze
|
||||
attr_accessor :cellWidth, :cellHeight, :nodeWidth, :nodeHeight
|
||||
|
||||
DIRECTIONS = [EdgeMasks::North, EdgeMasks::South, EdgeMasks::East, EdgeMasks::West]
|
||||
|
||||
def initialize(cw, ch)
|
||||
@@ -452,6 +453,7 @@ module RandomDungeonGenerator
|
||||
end
|
||||
|
||||
attr_accessor :width, :height
|
||||
|
||||
BUFFER_X = 8
|
||||
BUFFER_Y = 6
|
||||
|
||||
@@ -532,10 +534,10 @@ module RandomDungeonGenerator
|
||||
def isWall?(x, y)
|
||||
if value(x, y) == DungeonTile::VOID
|
||||
v1 = value(x, y + 1)
|
||||
return true if v1 == DungeonTile::ROOM || v1 == DungeonTile::CORRIDOR
|
||||
return true if [DungeonTile::ROOM, DungeonTile::CORRIDOR].include?(v1)
|
||||
if v1 == DungeonTile::VOID # The tile below is void
|
||||
v1 = value(x, y + 2)
|
||||
return true if v1 == DungeonTile::ROOM || v1 == DungeonTile::CORRIDOR
|
||||
return true if [DungeonTile::ROOM, DungeonTile::CORRIDOR].include?(v1)
|
||||
end
|
||||
end
|
||||
return false
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#===============================================================================
|
||||
class ItemIconSprite < SpriteWrapper
|
||||
attr_reader :item
|
||||
|
||||
ANIM_ICON_SIZE = 48
|
||||
FRAMES_PER_CYCLE = Graphics.frame_rate
|
||||
|
||||
|
||||
@@ -57,6 +57,7 @@ class PokemonStorage
|
||||
attr_reader :boxes
|
||||
attr_accessor :currentBox
|
||||
attr_writer :unlockedWallpapers
|
||||
|
||||
BASICWALLPAPERQTY = 16
|
||||
|
||||
def initialize(maxBoxes = Settings::NUM_STORAGE_BOXES, maxPokemon = PokemonBox::BOX_SIZE)
|
||||
|
||||
@@ -405,15 +405,17 @@ class PokemonPartyPanel < SpriteWrapper
|
||||
end
|
||||
# Draw shiny icon
|
||||
if @pokemon.shiny?
|
||||
pbDrawImagePositions(@overlaysprite.bitmap,[[
|
||||
"Graphics/Pictures/shiny",80,48,0,0,16,16]])
|
||||
pbDrawImagePositions(@overlaysprite.bitmap,
|
||||
[["Graphics/Pictures/shiny", 80, 48, 0, 0, 16, 16]]
|
||||
)
|
||||
end
|
||||
end
|
||||
pbDrawTextPositions(@overlaysprite.bitmap,textpos)
|
||||
# Draw level text
|
||||
if !@pokemon.egg?
|
||||
pbDrawImagePositions(@overlaysprite.bitmap,[[
|
||||
"Graphics/Pictures/Party/overlay_lv",20,70,0,0,22,14]])
|
||||
pbDrawImagePositions(@overlaysprite.bitmap,
|
||||
[["Graphics/Pictures/Party/overlay_lv", 20, 70, 0, 0, 22, 14]]
|
||||
)
|
||||
pbSetSmallFont(@overlaysprite.bitmap)
|
||||
pbDrawTextPositions(@overlaysprite.bitmap,[
|
||||
[@pokemon.level.to_s,42,57,0,basecolor,shadowcolor]
|
||||
|
||||
@@ -556,8 +556,7 @@ class PokemonSummary_Scene
|
||||
_INTL("Egg received."),
|
||||
_INTL("Traded at Lv. {1}.",@pokemon.obtain_level),
|
||||
"",
|
||||
_INTL("Had a fateful encounter at Lv. {1}.",@pokemon.obtain_level)
|
||||
][@pokemon.obtain_method]
|
||||
_INTL("Had a fateful encounter at Lv. {1}.",@pokemon.obtain_level)][@pokemon.obtain_method]
|
||||
memo += sprintf("<c3=404040,B0B0B0>%s\n",mettext) if mettext && mettext!=""
|
||||
# If Pokémon was hatched, write when and where it hatched
|
||||
if @pokemon.obtain_method == 1
|
||||
|
||||
@@ -99,7 +99,7 @@ class Window_PokemonBag < Window_DrawableCommand
|
||||
end
|
||||
|
||||
def refresh
|
||||
@item_max = itemCount()
|
||||
@item_max = itemCount
|
||||
self.update_cursor_rect
|
||||
dwidth = self.width-self.borderX
|
||||
dheight = self.height-self.borderY
|
||||
|
||||
@@ -564,6 +564,7 @@ end
|
||||
#===============================================================================
|
||||
class PokemonStorageScene
|
||||
attr_reader :quickswap
|
||||
|
||||
MARK_WIDTH = 16
|
||||
MARK_HEIGHT = 16
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ class PokemonGlobalMetadata
|
||||
attr_writer :purifyChamber
|
||||
|
||||
def purifyChamber
|
||||
@purifyChamber = PurifyChamber.new() if !@purifyChamber
|
||||
@purifyChamber = PurifyChamber.new if !@purifyChamber
|
||||
return @purifyChamber
|
||||
end
|
||||
end
|
||||
@@ -157,10 +157,11 @@ end
|
||||
class PurifyChamber
|
||||
attr_reader :sets
|
||||
attr_reader :currentSet
|
||||
|
||||
NUMSETS = 9
|
||||
SETSIZE = 4
|
||||
|
||||
def self.maximumTempo() # Calculates the maximum possible tempo
|
||||
def self.maximumTempo # Calculates the maximum possible tempo
|
||||
x=SETSIZE+1
|
||||
return ((x*x+x)/2)-1
|
||||
end
|
||||
@@ -233,7 +234,7 @@ class PurifyChamber
|
||||
return false if shadow.heart_gauge != 0
|
||||
# Define an exception for Lugia
|
||||
if shadow.isSpecies?(:LUGIA)
|
||||
maxtempo=PurifyChamber.maximumTempo()
|
||||
maxtempo=PurifyChamber.maximumTempo
|
||||
for i in 0...NUMSETS
|
||||
return false if @sets[i].tempo!=maxtempo
|
||||
end
|
||||
@@ -423,7 +424,7 @@ class PurifyChamberScreen
|
||||
# array[0]==0 - a position was chosen
|
||||
# array[0]==1 - a new set was chosen
|
||||
# array[0]==2 - choose Pokemon command
|
||||
cmd=@scene.pbSetScreen()
|
||||
cmd=@scene.pbSetScreen
|
||||
if cmd[0]==0
|
||||
# Place Pokemon in the set
|
||||
curpkmn=PurifyChamberHelper.pbGetPokemon(@chamber,cmd[1])
|
||||
@@ -519,7 +520,7 @@ class PurifyChamberScreen
|
||||
@scene.pbChangeSet(cmd[1])
|
||||
chamber.currentSet=cmd[1]
|
||||
elsif cmd[0]==2 # Choose a Pokemon
|
||||
pos=@scene.pbChoosePokemon()
|
||||
pos=@scene.pbChoosePokemon
|
||||
pkmn=pos ? $PokemonStorage[pos[0],pos[1]] : nil
|
||||
heldpkmn=pkmn if pkmn
|
||||
else # cancel
|
||||
@@ -532,13 +533,13 @@ class PurifyChamberScreen
|
||||
end
|
||||
end
|
||||
end
|
||||
if pbCheckPurify()
|
||||
if pbCheckPurify
|
||||
@scene.pbDisplay(_INTL("There is a Pokémon that is ready to open its heart!\1"))
|
||||
@scene.pbCloseSetDetail()
|
||||
pbDoPurify()
|
||||
@scene.pbCloseSetDetail
|
||||
pbDoPurify
|
||||
return false
|
||||
else
|
||||
@scene.pbCloseSetDetail()
|
||||
@scene.pbCloseSetDetail
|
||||
return true
|
||||
end
|
||||
end
|
||||
@@ -576,27 +577,27 @@ class PurifyChamberScreen
|
||||
set=purifiables[i]
|
||||
@chamber.currentSet=set
|
||||
@scene.pbOpenSet(set)
|
||||
@scene.pbPurify()
|
||||
@scene.pbPurify
|
||||
pbPurify(@chamber[set].shadow,self)
|
||||
pbStorePokemon(@chamber[set].shadow)
|
||||
@chamber.setShadow(set,nil) # Remove shadow Pokemon from set
|
||||
if (i+1)!=purifiables.length
|
||||
@scene.pbDisplay(_INTL("There is another Pokémon that is ready to open its heart!"))
|
||||
if !@scene.pbConfirm("Would you like to switch sets?")
|
||||
@scene.pbCloseSet()
|
||||
@scene.pbCloseSet
|
||||
break
|
||||
end
|
||||
end
|
||||
@scene.pbCloseSet()
|
||||
@scene.pbCloseSet
|
||||
end
|
||||
end
|
||||
|
||||
def pbStartPurify
|
||||
chamber=@chamber
|
||||
@scene.pbStart(chamber)
|
||||
if pbCheckPurify()
|
||||
pbDoPurify()
|
||||
@scene.pbEnd()
|
||||
if pbCheckPurify
|
||||
pbDoPurify
|
||||
@scene.pbEnd
|
||||
return
|
||||
end
|
||||
@scene.pbOpenSet(chamber.currentSet)
|
||||
@@ -609,10 +610,11 @@ class PurifyChamberScreen
|
||||
else
|
||||
chamber.currentSet=set
|
||||
cmd=@scene.pbShowCommands(
|
||||
_INTL("What do you want to do?"),[
|
||||
_INTL("EDIT"),_INTL("SWITCH"),_INTL("CANCEL")])
|
||||
_INTL("What do you want to do?"),
|
||||
[_INTL("EDIT"), _INTL("SWITCH"), _INTL("CANCEL")]
|
||||
)
|
||||
if cmd==0 # edit
|
||||
if !pbOpenSetDetail()
|
||||
if !pbOpenSetDetail
|
||||
break
|
||||
end
|
||||
elsif cmd==1 # switch
|
||||
@@ -620,12 +622,12 @@ class PurifyChamberScreen
|
||||
newSet=@scene.pbSwitch(set)
|
||||
chamber.switch(set,newSet)
|
||||
chamber.currentSet=newSet
|
||||
@scene.pbRefresh()
|
||||
@scene.pbRefresh
|
||||
end
|
||||
end
|
||||
end
|
||||
@scene.pbCloseSet()
|
||||
@scene.pbEnd()
|
||||
@scene.pbCloseSet
|
||||
@scene.pbEnd
|
||||
end
|
||||
end
|
||||
|
||||
@@ -662,7 +664,7 @@ class Window_PurifyChamberSets < Window_DrawableCommand
|
||||
end
|
||||
if @chamber.setCount(index)>0
|
||||
pbDrawGauge(self.contents,Rect.new(rect.x+16,rect.y+6,48,8),
|
||||
Color.new(0,0,256),@chamber[index].tempo,PurifyChamber.maximumTempo())
|
||||
Color.new(0,0,256),@chamber[index].tempo,PurifyChamber.maximumTempo)
|
||||
end
|
||||
if @chamber.getShadow(index)
|
||||
pbDrawGauge(self.contents, Rect.new(rect.x+16,rect.y+18,48,8),
|
||||
@@ -867,7 +869,7 @@ class PurifyChamberSetView < SpriteWrapper
|
||||
refresh
|
||||
end
|
||||
|
||||
def refreshFlows()
|
||||
def refreshFlows
|
||||
for flow in @flows
|
||||
flow.setFlowStrength(0)
|
||||
end
|
||||
@@ -969,7 +971,7 @@ class PurifyChamberSetView < SpriteWrapper
|
||||
# draw tempo gauge
|
||||
pbDrawGauge(@info.bitmap,Rect.new(@info.bitmap.width*1/4,24+8,@info.bitmap.width*1/4,8),
|
||||
Color.new(0,0,248),@chamber[@set].tempo,
|
||||
PurifyChamber.maximumTempo())
|
||||
PurifyChamber.maximumTempo)
|
||||
end
|
||||
pbDrawTextPositions(@info.bitmap,textpos)
|
||||
@info.x=Graphics.width-@info.bitmap.width
|
||||
@@ -983,7 +985,7 @@ class PurifyChamberSetView < SpriteWrapper
|
||||
checkCursor(0)
|
||||
points=[@chamber.setCount(@set)*2,1].max
|
||||
setList=@chamber.setList(@set)
|
||||
refreshFlows()
|
||||
refreshFlows
|
||||
for i in 0...PurifyChamber::SETSIZE*2
|
||||
pkmn=(i%2==1 || i>=points) ? nil : setList[i/2]
|
||||
angle=360-(i*360/points)
|
||||
@@ -1083,11 +1085,11 @@ end
|
||||
#
|
||||
#===============================================================================
|
||||
class PurifyChamberScene
|
||||
def pbUpdate()
|
||||
def pbUpdate
|
||||
pbUpdateSpriteHash(@sprites)
|
||||
end
|
||||
|
||||
def pbRefresh()
|
||||
def pbRefresh
|
||||
if @sprites["setview"]
|
||||
@sprites["setview"].refresh
|
||||
@sprites["setwindow"].refresh
|
||||
@@ -1098,7 +1100,7 @@ class PurifyChamberScene
|
||||
@chamber=chamber
|
||||
end
|
||||
|
||||
def pbEnd()
|
||||
def pbEnd
|
||||
end
|
||||
|
||||
def pbOpenSet(set)
|
||||
@@ -1120,7 +1122,7 @@ class PurifyChamberScene
|
||||
pbFadeInAndShow(@sprites) { pbUpdate }
|
||||
end
|
||||
|
||||
def pbCloseSet()
|
||||
def pbCloseSet
|
||||
pbFadeOutAndHide(@sprites) { pbUpdate }
|
||||
pbDisposeSpriteHash(@sprites)
|
||||
@viewport.dispose
|
||||
@@ -1133,20 +1135,20 @@ class PurifyChamberScene
|
||||
@sprites["setview"].cursor=0
|
||||
end
|
||||
|
||||
def pbCloseSetDetail()
|
||||
def pbCloseSetDetail
|
||||
end
|
||||
|
||||
def pbPurify()
|
||||
def pbPurify
|
||||
pbRefresh
|
||||
end
|
||||
|
||||
def pbMove(_pos)
|
||||
@sprites["setview"].heldpkmn=@sprites["setview"].getCurrent()
|
||||
@sprites["setview"].heldpkmn=@sprites["setview"].getCurrent
|
||||
pbRefresh
|
||||
end
|
||||
|
||||
def pbShift(_pos,_heldpoke)
|
||||
@sprites["setview"].heldpkmn=@sprites["setview"].getCurrent()
|
||||
@sprites["setview"].heldpkmn=@sprites["setview"].getCurrent
|
||||
pbRefresh
|
||||
end
|
||||
|
||||
@@ -1191,29 +1193,29 @@ class PurifyChamberScene
|
||||
btn=Input::RIGHT if Input.repeat?(Input::RIGHT)
|
||||
btn=Input::LEFT if Input.repeat?(Input::LEFT)
|
||||
if btn!=0
|
||||
pbPlayCursorSE()
|
||||
pbPlayCursorSE
|
||||
@sprites["setview"].moveCursor(btn)
|
||||
end
|
||||
if Input.repeat?(Input::JUMPUP)
|
||||
nextset=(@sprites["setview"].set==0) ? PurifyChamber::NUMSETS-1 : @sprites["setview"].set-1
|
||||
pbPlayCursorSE()
|
||||
pbPlayCursorSE
|
||||
return [1,nextset]
|
||||
elsif Input.repeat?(Input::JUMPDOWN)
|
||||
nextset=(@sprites["setview"].set==PurifyChamber::NUMSETS-1) ? 0 : @sprites["setview"].set+1
|
||||
pbPlayCursorSE()
|
||||
pbPlayCursorSE
|
||||
return [1,nextset]
|
||||
elsif Input.trigger?(Input::USE)
|
||||
pbPlayDecisionSE()
|
||||
pbPlayDecisionSE
|
||||
return [0,@sprites["setview"].cursor]
|
||||
elsif Input.trigger?(Input::BACK)
|
||||
pbPlayCancelSE()
|
||||
pbPlayCancelSE
|
||||
return [3,0]
|
||||
end
|
||||
end
|
||||
}
|
||||
end
|
||||
|
||||
def pbChooseSet()
|
||||
def pbChooseSet
|
||||
pbActivateWindow(@sprites,"setwindow") {
|
||||
oldindex=@sprites["setwindow"].index
|
||||
loop do
|
||||
@@ -1225,11 +1227,11 @@ class PurifyChamberScene
|
||||
Input.update
|
||||
pbUpdate
|
||||
if Input.trigger?(Input::USE)
|
||||
pbPlayDecisionSE()
|
||||
pbPlayDecisionSE
|
||||
return @sprites["setwindow"].index
|
||||
end
|
||||
if Input.trigger?(Input::BACK)
|
||||
pbPlayCancelSE()
|
||||
pbPlayCancelSE
|
||||
return -1
|
||||
end
|
||||
end
|
||||
@@ -1238,7 +1240,7 @@ class PurifyChamberScene
|
||||
|
||||
def pbSwitch(set)
|
||||
@sprites["setwindow"].switching=set
|
||||
ret=pbChooseSet()
|
||||
ret=pbChooseSet
|
||||
@sprites["setwindow"].switching=-1
|
||||
return ret<0 ? set : ret
|
||||
end
|
||||
@@ -1285,11 +1287,11 @@ class PurifyChamberScene
|
||||
pbRefresh
|
||||
end
|
||||
|
||||
def pbChoosePokemon()
|
||||
def pbChoosePokemon
|
||||
visible=pbFadeOutAndHide(@sprites)
|
||||
scene=PokemonStorageScene.new()
|
||||
scene=PokemonStorageScene.new
|
||||
screen=PokemonStorageScreen.new(scene,$PokemonStorage)
|
||||
pos=screen.pbChoosePokemon()
|
||||
pos=screen.pbChoosePokemon
|
||||
pbRefresh
|
||||
pbFadeInAndShow(@sprites,visible)
|
||||
return pos
|
||||
@@ -1322,7 +1324,7 @@ class PurifyChamberPC
|
||||
|
||||
def access
|
||||
pbMessage(_INTL("\\se[PC access]Accessed the Purify Chamber."))
|
||||
pbPurifyChamber()
|
||||
pbPurifyChamber
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -73,10 +73,12 @@ class PokemonDuel
|
||||
@oldeventspeed = event.move_speed
|
||||
pbMoveRoute($game_player, [
|
||||
PBMoveRoute::ChangeSpeed, 2,
|
||||
PBMoveRoute::DirectionFixOn])
|
||||
PBMoveRoute::DirectionFixOn
|
||||
])
|
||||
pbMoveRoute(event, [
|
||||
PBMoveRoute::ChangeSpeed, 2,
|
||||
PBMoveRoute::DirectionFixOn])
|
||||
PBMoveRoute::DirectionFixOn
|
||||
])
|
||||
pbWait(Graphics.frame_rate * 3 / 4)
|
||||
end
|
||||
|
||||
@@ -129,84 +131,101 @@ class PokemonDuel
|
||||
PBMoveRoute::ScriptAsync, "moveRight90",
|
||||
PBMoveRoute::ScriptAsync, "moveLeft90",
|
||||
PBMoveRoute::ScriptAsync, "moveLeft90",
|
||||
PBMoveRoute::ScriptAsync, "moveRight90"])
|
||||
PBMoveRoute::ScriptAsync, "moveRight90"
|
||||
])
|
||||
pbMoveRoute(event, [
|
||||
PBMoveRoute::ScriptAsync, "moveLeft90",
|
||||
PBMoveRoute::ScriptAsync, "moveRight90",
|
||||
PBMoveRoute::ScriptAsync, "moveRight90",
|
||||
PBMoveRoute::ScriptAsync, "moveLeft90"])
|
||||
PBMoveRoute::ScriptAsync, "moveLeft90"
|
||||
])
|
||||
pbWait(Graphics.frame_rate / 2)
|
||||
pbMessage(_INTL("You study each other's movements..."))
|
||||
elsif action == 0 && command == 1
|
||||
pbMoveRoute($game_player, [
|
||||
PBMoveRoute::ChangeSpeed, 4,
|
||||
PBMoveRoute::Forward])
|
||||
PBMoveRoute::Forward
|
||||
])
|
||||
pbWait(Graphics.frame_rate * 4 / 10)
|
||||
pbShake(9, 9, 8)
|
||||
pbFlashScreens(false, true)
|
||||
pbMoveRoute($game_player, [
|
||||
PBMoveRoute::ChangeSpeed, 2,
|
||||
PBMoveRoute::Backward])
|
||||
PBMoveRoute::Backward
|
||||
])
|
||||
@hp[1] -= 1
|
||||
pbMessage(_INTL("Your attack was not blocked!"))
|
||||
elsif action == 0 && command == 2
|
||||
pbMoveRoute($game_player, [
|
||||
PBMoveRoute::ChangeSpeed, 4,
|
||||
PBMoveRoute::ScriptAsync, "jumpForward"])
|
||||
PBMoveRoute::ScriptAsync, "jumpForward"
|
||||
])
|
||||
pbMoveRoute(event, [
|
||||
PBMoveRoute::ChangeSpeed, 4,
|
||||
PBMoveRoute::Backward])
|
||||
PBMoveRoute::Backward
|
||||
])
|
||||
pbWait(Graphics.frame_rate)
|
||||
pbMoveRoute($game_player, [
|
||||
PBMoveRoute::ChangeSpeed, 2,
|
||||
PBMoveRoute::Backward])
|
||||
PBMoveRoute::Backward
|
||||
])
|
||||
pbMoveRoute(event, [
|
||||
PBMoveRoute::ChangeSpeed, 2,
|
||||
PBMoveRoute::Forward])
|
||||
PBMoveRoute::Forward
|
||||
])
|
||||
pbMessage(_INTL("Your attack was evaded!"))
|
||||
elsif (action == 0 || action == 1 || action == 2) && command == 3
|
||||
pbMoveRoute($game_player, [
|
||||
PBMoveRoute::ChangeSpeed, 4,
|
||||
PBMoveRoute::ScriptAsync, "jumpForward"])
|
||||
PBMoveRoute::ScriptAsync, "jumpForward"
|
||||
])
|
||||
pbWait(Graphics.frame_rate * 4 / 10)
|
||||
pbMoveRoute(event, [
|
||||
PBMoveRoute::ChangeSpeed, 5,
|
||||
PBMoveRoute::Backward,
|
||||
PBMoveRoute::ChangeSpeed, 2])
|
||||
PBMoveRoute::ChangeSpeed, 2
|
||||
])
|
||||
pbWait(Graphics.frame_rate / 2)
|
||||
pbShake(9, 9, 8)
|
||||
pbFlashScreens(false, true)
|
||||
pbMoveRoute($game_player, [
|
||||
PBMoveRoute::ChangeSpeed, 2,
|
||||
PBMoveRoute::Backward])
|
||||
PBMoveRoute::Backward
|
||||
])
|
||||
pbMoveRoute(event, [
|
||||
PBMoveRoute::ChangeSpeed, 2,
|
||||
PBMoveRoute::Forward])
|
||||
PBMoveRoute::Forward
|
||||
])
|
||||
@hp[1] -= 3
|
||||
pbMessage(_INTL("You pierce through the opponent's defenses!"))
|
||||
elsif action == 1 && command == 0
|
||||
pbMoveRoute(event, [
|
||||
PBMoveRoute::ChangeSpeed, 4,
|
||||
PBMoveRoute::Forward])
|
||||
PBMoveRoute::Forward
|
||||
])
|
||||
pbWait(Graphics.frame_rate * 4 / 10)
|
||||
pbShake(9, 9, 8)
|
||||
pbFlashScreens(true, false)
|
||||
pbMoveRoute(event, [
|
||||
PBMoveRoute::ChangeSpeed, 2,
|
||||
PBMoveRoute::Backward])
|
||||
PBMoveRoute::Backward
|
||||
])
|
||||
@hp[0] -= 1
|
||||
pbMessage(_INTL("You fail to block the opponent's attack!"))
|
||||
elsif action == 1 && command == 1
|
||||
pbMoveRoute($game_player, [
|
||||
PBMoveRoute::ChangeSpeed, 4,
|
||||
PBMoveRoute::Forward])
|
||||
PBMoveRoute::Forward
|
||||
])
|
||||
pbWait(Graphics.frame_rate * 6 / 10)
|
||||
pbMoveRoute($game_player, [
|
||||
PBMoveRoute::ChangeSpeed, 2,
|
||||
PBMoveRoute::Backward])
|
||||
PBMoveRoute::Backward
|
||||
])
|
||||
pbMoveRoute(event, [
|
||||
PBMoveRoute::ChangeSpeed, 2,
|
||||
PBMoveRoute::Forward])
|
||||
PBMoveRoute::Forward
|
||||
])
|
||||
pbWait(Graphics.frame_rate * 6 / 10)
|
||||
pbMoveRoute(event, [PBMoveRoute::Backward])
|
||||
pbMoveRoute($game_player, [PBMoveRoute::Forward])
|
||||
@@ -219,21 +238,25 @@ class PokemonDuel
|
||||
pbMoveRoute($game_player, [
|
||||
PBMoveRoute::Backward,
|
||||
PBMoveRoute::ChangeSpeed, 4,
|
||||
PBMoveRoute::ScriptAsync, "jumpForward"])
|
||||
PBMoveRoute::ScriptAsync, "jumpForward"
|
||||
])
|
||||
pbWait(Graphics.frame_rate * 8 / 10)
|
||||
pbMoveRoute(event, [
|
||||
PBMoveRoute::ChangeSpeed, 4,
|
||||
PBMoveRoute::Forward])
|
||||
PBMoveRoute::Forward
|
||||
])
|
||||
pbWait(Graphics.frame_rate * 9 / 10)
|
||||
pbShake(9, 9, 8)
|
||||
pbFlashScreens(true, true)
|
||||
pbMoveRoute($game_player, [
|
||||
PBMoveRoute::Backward,
|
||||
PBMoveRoute::ChangeSpeed, 2])
|
||||
PBMoveRoute::ChangeSpeed, 2
|
||||
])
|
||||
pbMoveRoute(event, [
|
||||
PBMoveRoute::Backward,
|
||||
PBMoveRoute::Backward,
|
||||
PBMoveRoute::ChangeSpeed, 2])
|
||||
PBMoveRoute::ChangeSpeed, 2
|
||||
])
|
||||
pbWait(Graphics.frame_rate)
|
||||
pbMoveRoute(event, [PBMoveRoute::Forward])
|
||||
pbMoveRoute($game_player, [PBMoveRoute::Forward])
|
||||
@@ -243,56 +266,68 @@ class PokemonDuel
|
||||
elsif action == 2 && command == 0
|
||||
pbMoveRoute(event, [
|
||||
PBMoveRoute::ChangeSpeed, 4,
|
||||
PBMoveRoute::Forward])
|
||||
PBMoveRoute::Forward
|
||||
])
|
||||
pbMoveRoute($game_player, [
|
||||
PBMoveRoute::ChangeSpeed, 4,
|
||||
PBMoveRoute::ScriptAsync, "jumpBackward"])
|
||||
PBMoveRoute::ScriptAsync, "jumpBackward"
|
||||
])
|
||||
pbWait(Graphics.frame_rate)
|
||||
pbMoveRoute($game_player, [
|
||||
PBMoveRoute::ChangeSpeed, 2,
|
||||
PBMoveRoute::Forward])
|
||||
PBMoveRoute::Forward
|
||||
])
|
||||
pbMoveRoute(event, [
|
||||
PBMoveRoute::ChangeSpeed, 2,
|
||||
PBMoveRoute::Backward])
|
||||
PBMoveRoute::Backward
|
||||
])
|
||||
pbMessage(_INTL("You evade the opponent's attack!"))
|
||||
elsif action == 3 && (command == 0 || command == 1 || command == 2)
|
||||
pbMoveRoute(event, [
|
||||
PBMoveRoute::ChangeSpeed, 4,
|
||||
PBMoveRoute::ScriptAsync, "jumpForward"])
|
||||
PBMoveRoute::ScriptAsync, "jumpForward"
|
||||
])
|
||||
pbWait(Graphics.frame_rate * 4 / 10)
|
||||
pbMoveRoute($game_player, [
|
||||
PBMoveRoute::ChangeSpeed, 5,
|
||||
PBMoveRoute::Backward,
|
||||
PBMoveRoute::ChangeSpeed, 2])
|
||||
PBMoveRoute::ChangeSpeed, 2
|
||||
])
|
||||
pbWait(Graphics.frame_rate / 2)
|
||||
pbShake(9, 9, 8)
|
||||
pbFlashScreens(true, false)
|
||||
pbMoveRoute($game_player, [
|
||||
PBMoveRoute::ChangeSpeed, 2,
|
||||
PBMoveRoute::Forward])
|
||||
PBMoveRoute::Forward
|
||||
])
|
||||
pbMoveRoute(event, [
|
||||
PBMoveRoute::ChangeSpeed, 2,
|
||||
PBMoveRoute::Backward])
|
||||
PBMoveRoute::Backward
|
||||
])
|
||||
@hp[0] -= 3
|
||||
pbMessage(_INTL("The opponent pierces through your defenses!"))
|
||||
elsif action == 3 && command == 3
|
||||
pbMoveRoute($game_player, [PBMoveRoute::Backward])
|
||||
pbMoveRoute($game_player, [
|
||||
PBMoveRoute::ChangeSpeed, 4,
|
||||
PBMoveRoute::ScriptAsync, "jumpForward"])
|
||||
PBMoveRoute::ScriptAsync, "jumpForward"
|
||||
])
|
||||
pbMoveRoute(event, [
|
||||
PBMoveRoute::Wait, 15,
|
||||
PBMoveRoute::ChangeSpeed, 4,
|
||||
PBMoveRoute::ScriptAsync, "jumpForward"])
|
||||
PBMoveRoute::ScriptAsync, "jumpForward"
|
||||
])
|
||||
pbWait(Graphics.frame_rate)
|
||||
pbMoveRoute(event, [
|
||||
PBMoveRoute::ChangeSpeed, 5,
|
||||
PBMoveRoute::Backward,
|
||||
PBMoveRoute::ChangeSpeed, 2])
|
||||
PBMoveRoute::ChangeSpeed, 2
|
||||
])
|
||||
pbMoveRoute($game_player, [
|
||||
PBMoveRoute::ChangeSpeed, 5,
|
||||
PBMoveRoute::Backward,
|
||||
PBMoveRoute::ChangeSpeed, 2])
|
||||
PBMoveRoute::ChangeSpeed, 2
|
||||
])
|
||||
pbShake(9, 9, 8)
|
||||
pbFlash(Color.new(255, 255, 255, 255), 20)
|
||||
pbFlashScreens(true, true)
|
||||
@@ -310,10 +345,12 @@ class PokemonDuel
|
||||
pbWait(Graphics.frame_rate * 3 / 4)
|
||||
pbMoveRoute($game_player, [
|
||||
PBMoveRoute::DirectionFixOff,
|
||||
PBMoveRoute::ChangeSpeed, @oldmovespeed])
|
||||
PBMoveRoute::ChangeSpeed, @oldmovespeed
|
||||
])
|
||||
pbMoveRoute(@event, [
|
||||
PBMoveRoute::DirectionFixOff,
|
||||
PBMoveRoute::ChangeSpeed, @oldeventspeed])
|
||||
PBMoveRoute::ChangeSpeed, @oldeventspeed
|
||||
])
|
||||
fade_time = Graphics.frame_rate * 4 / 10
|
||||
alpha_diff = (255.0 / fade_time).ceil
|
||||
fade_time.times do
|
||||
|
||||
@@ -11,11 +11,11 @@ class SlotMachineReel < BitmapSprite
|
||||
attr_accessor :spinning
|
||||
attr_accessor :stopping
|
||||
attr_accessor :slipping
|
||||
|
||||
SCROLLSPEED = 16 # Must be a divisor of 48
|
||||
ICONSPOOL = [[0,0,0,0,1,1,2,2,3,3,3,4,4,4,5,5,6,6,7], # 0 - Easy
|
||||
[0,0,0,0,1,1,1,2,2,2,3,3,4,4,5,6,7], # 1 - Medium (default)
|
||||
[0,0,1,1,1,2,2,2,3,3,4,4,5,6,7] # 2 - Hard
|
||||
]
|
||||
[0,0,1,1,1,2,2,2,3,3,4,4,5,6,7]] # 2 - Hard
|
||||
SLIPPING = [0,0,0,0,0,0,1,1,1,2,2,3]
|
||||
|
||||
def initialize(x,y,difficulty=1)
|
||||
@@ -132,8 +132,7 @@ class SlotMachineScene
|
||||
[reel1[0],reel2[0],reel3[0]], # Top row
|
||||
[reel1[2],reel2[2],reel3[2]], # Bottom row
|
||||
[reel1[0],reel2[1],reel3[2]], # Diagonal top left -> bottom right
|
||||
[reel1[2],reel2[1],reel3[0]], # Diagonal bottom left -> top right
|
||||
]
|
||||
[reel1[2],reel2[1],reel3[0]]] # Diagonal bottom left -> top right
|
||||
for i in 0...combinations.length
|
||||
break if i>=1 && @wager<=1 # One coin = centre row only
|
||||
break if i>=3 && @wager<=2 # Two coins = three rows only
|
||||
|
||||
@@ -13,7 +13,7 @@ class VoltorbFlip
|
||||
# Set initial level
|
||||
@level=1
|
||||
# Maximum and minimum total point values for each level
|
||||
@levelRanges=[[ 20, 50],[ 50, 100],[ 100, 200],[ 200, 350],
|
||||
@levelRanges=[[20, 50],[50, 100],[100, 200],[200, 350],
|
||||
[350,600],[600,1000],[1000,2000],[2000,3500]]
|
||||
@firstRound=true
|
||||
pbNewGame
|
||||
|
||||
@@ -77,6 +77,7 @@ class MiningGameCursor < BitmapSprite
|
||||
attr_accessor :position
|
||||
attr_accessor :hit
|
||||
attr_accessor :counter
|
||||
|
||||
ToolPositions = [[1,0],[1,1],[1,1],[0,0],[0,0],
|
||||
[0,2],[0,2],[0,0],[0,0],[0,2],[0,2]] # Graphic, position
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ class BugContestState
|
||||
attr_accessor :decision
|
||||
attr_accessor :lastPokemon
|
||||
attr_reader :timer
|
||||
|
||||
ContestantNames = [
|
||||
_INTL("Bug Catcher Ed"),
|
||||
_INTL("Bug Catcher Benny"),
|
||||
|
||||
@@ -134,6 +134,7 @@ end
|
||||
#===============================================================================
|
||||
class PlayerRatingElo
|
||||
attr_reader :rating
|
||||
|
||||
K_VALUE = 16
|
||||
|
||||
def initialize
|
||||
|
||||
@@ -271,57 +271,57 @@ def getRandomNameEx(type,variable,upper,maxLength=100)
|
||||
name = ""
|
||||
formats = []
|
||||
case type
|
||||
when 0 then formats = %w( F5 BvE FE FE5 FEvE ) # Names for males
|
||||
when 1 then formats = %w( vE6 vEvE6 BvE6 B4 v3 vEv3 Bv3 ) # Names for females
|
||||
when 2 then formats = %w( WE WEU WEvE BvE BvEU BvEvE ) # Neutral gender names
|
||||
when 0 then formats = %w[F5 BvE FE FE5 FEvE] # Names for males
|
||||
when 1 then formats = %w[vE6 vEvE6 BvE6 B4 v3 vEv3 Bv3] # Names for females
|
||||
when 2 then formats = %w[WE WEU WEvE BvE BvEU BvEvE] # Neutral gender names
|
||||
else return ""
|
||||
end
|
||||
format = formats[rand(formats.length)]
|
||||
format.scan(/./) { |c|
|
||||
case c
|
||||
when "c" # consonant
|
||||
set = %w( b c d f g h j k l m n p r s t v w x z )
|
||||
set = %w[b c d f g h j k l m n p r s t v w x z]
|
||||
name += set[rand(set.length)]
|
||||
when "v" # vowel
|
||||
set = %w( a a a e e e i i i o o o u u u )
|
||||
set = %w[a a a e e e i i i o o o u u u]
|
||||
name += set[rand(set.length)]
|
||||
when "W" # beginning vowel
|
||||
set = %w( a a a e e e i i i o o o u u u au au ay ay ea ea ee ee oo oo ou ou )
|
||||
set = %w[a a a e e e i i i o o o u u u au au ay ay ea ea ee ee oo oo ou ou]
|
||||
name += set[rand(set.length)]
|
||||
when "U" # ending vowel
|
||||
set = %w( a a a a a e e e i i i o o o o o u u ay ay ie ie ee ue oo )
|
||||
set = %w[a a a a a e e e i i i o o o o o u u ay ay ie ie ee ue oo]
|
||||
name += set[rand(set.length)]
|
||||
when "B" # beginning consonant
|
||||
set1 = %w( b c d f g h j k l l m n n p r r s s t t v w y z )
|
||||
set2 = %w( bl br ch cl cr dr fr fl gl gr kh kl kr ph pl pr sc sk sl
|
||||
sm sn sp st sw th tr tw vl zh )
|
||||
set1 = %w[b c d f g h j k l l m n n p r r s s t t v w y z]
|
||||
set2 = %w[bl br ch cl cr dr fr fl gl gr kh kl kr ph pl pr sc sk sl
|
||||
sm sn sp st sw th tr tw vl zh]
|
||||
name += (rand(3)>0) ? set1[rand(set1.length)] : set2[rand(set2.length)]
|
||||
when "E" # ending consonant
|
||||
set1 = %w( b c d f g h j k k l l m n n p r r s s t t v z )
|
||||
set2 = %w( bb bs ch cs ds fs ft gs gg ld ls nd ng nk rn kt ks
|
||||
ms ns ph pt ps sk sh sp ss st rd rn rp rm rt rk ns th zh)
|
||||
set1 = %w[b c d f g h j k k l l m n n p r r s s t t v z]
|
||||
set2 = %w[bb bs ch cs ds fs ft gs gg ld ls nd ng nk rn kt ks
|
||||
ms ns ph pt ps sk sh sp ss st rd rn rp rm rt rk ns th zh]
|
||||
name += (rand(3)>0) ? set1[rand(set1.length)] : set2[rand(set2.length)]
|
||||
when "f" # consonant and vowel
|
||||
set = %w( iz us or )
|
||||
set = %w[iz us or]
|
||||
name += set[rand(set.length)]
|
||||
when "F" # consonant and vowel
|
||||
set = %w( bo ba be bu re ro si mi zho se nya gru gruu glee gra glo ra do zo ri
|
||||
di ze go ga pree pro po pa ka ki ku de da ma mo le la li )
|
||||
set = %w[bo ba be bu re ro si mi zho se nya gru gruu glee gra glo ra do zo ri
|
||||
di ze go ga pree pro po pa ka ki ku de da ma mo le la li]
|
||||
name += set[rand(set.length)]
|
||||
when "2"
|
||||
set = %w( c f g k l p r s t )
|
||||
set = %w[c f g k l p r s t]
|
||||
name += set[rand(set.length)]
|
||||
when "3"
|
||||
set = %w( nka nda la li ndra sta cha chie )
|
||||
set = %w[nka nda la li ndra sta cha chie]
|
||||
name += set[rand(set.length)]
|
||||
when "4"
|
||||
set = %w( una ona ina ita ila ala ana ia iana )
|
||||
set = %w[una ona ina ita ila ala ana ia iana]
|
||||
name += set[rand(set.length)]
|
||||
when "5"
|
||||
set = %w( e e o o ius io u u ito io ius us )
|
||||
set = %w[e e o o ius io u u ito io ius us]
|
||||
name += set[rand(set.length)]
|
||||
when "6"
|
||||
set = %w( a a a elle ine ika ina ita ila ala ana )
|
||||
set = %w[a a a elle ine ika ina ita ila ala ana]
|
||||
name += set[rand(set.length)]
|
||||
end
|
||||
}
|
||||
|
||||
@@ -435,8 +435,8 @@ def pbTrainerTypeEditorNew(default_name)
|
||||
return nil
|
||||
end
|
||||
# Choose a gender
|
||||
gender = pbMessage(_INTL("Is the Trainer male, female or unknown?"), [
|
||||
_INTL("Male"), _INTL("Female"), _INTL("Unknown")], 0)
|
||||
gender = pbMessage(_INTL("Is the Trainer male, female or unknown?"),
|
||||
[_INTL("Male"), _INTL("Female"), _INTL("Unknown")], 0)
|
||||
# Choose a base money value
|
||||
params = ChooseNumberParams.new
|
||||
params.setRange(0, 255)
|
||||
@@ -564,7 +564,8 @@ def pbTrainerBattleEditor
|
||||
ret = pbMessage(_INTL("First, define the new trainer's type."), [
|
||||
_INTL("Use existing type"),
|
||||
_INTL("Create new type"),
|
||||
_INTL("Cancel")], 3)
|
||||
_INTL("Cancel")
|
||||
], 3)
|
||||
case ret
|
||||
when 0
|
||||
tr_type = pbListScreen(_INTL("TRAINER TYPE"), TrainerTypeLister.new(0, false))
|
||||
@@ -620,7 +621,7 @@ end
|
||||
#===============================================================================
|
||||
module TrainerPokemonProperty
|
||||
def self.set(settingname,initsetting)
|
||||
initsetting = {:species => nil, :level => 10} if !initsetting
|
||||
initsetting = { :species => nil, :level => 10 } if !initsetting
|
||||
oldsetting = [
|
||||
initsetting[:species],
|
||||
initsetting[:level],
|
||||
@@ -766,7 +767,7 @@ def pbEditPlayerMetadata(player_id = 1)
|
||||
player_id = i
|
||||
break
|
||||
end
|
||||
metadata = GameData::PlayerMetadata.new({:id => player_id})
|
||||
metadata = GameData::PlayerMetadata.new({ :id => player_id })
|
||||
elsif !GameData::PlayerMetadata.exists?(player_id)
|
||||
pbMessage(_INTL("Metadata for player character {1} was not found.", player_id))
|
||||
return
|
||||
@@ -815,7 +816,7 @@ def pbEditMapMetadata(map_id)
|
||||
data = []
|
||||
map_name = mapinfos[map_id].name
|
||||
metadata = GameData::MapMetadata.try_get(map_id)
|
||||
metadata = GameData::MapMetadata.new({:id => map_id}) if !metadata
|
||||
metadata = GameData::MapMetadata.new({ :id => map_id }) if !metadata
|
||||
properties = GameData::MapMetadata.editor_properties
|
||||
properties.each do |property|
|
||||
data.push(metadata.property_from_string(property[0]))
|
||||
|
||||
@@ -167,6 +167,7 @@ class AnimationWindow < SpriteWrapper
|
||||
attr_reader :animbitmap
|
||||
attr_reader :start
|
||||
attr_reader :selected
|
||||
|
||||
NUMFRAMES=5
|
||||
|
||||
def initialize(x,y,width,height,viewport=nil)
|
||||
@@ -358,6 +359,7 @@ class SpriteFrame < InvalidatableSprite
|
||||
attr_reader :locked
|
||||
attr_reader :selected
|
||||
attr_reader :sprite
|
||||
|
||||
NUM_ROWS = (PBAnimation::MAX_SPRITES.to_f/10).ceil # 10 frame number icons in each row
|
||||
|
||||
def initialize(id,sprite,viewport,previous=false)
|
||||
@@ -431,6 +433,7 @@ class AnimationCanvas < Sprite
|
||||
attr_reader :animation # Currently selected animation
|
||||
attr_reader :animbitmap # Currently selected animation bitmap
|
||||
attr_accessor :pattern # Currently selected pattern
|
||||
|
||||
BORDERSIZE=64
|
||||
|
||||
def initialize(animation,viewport=nil)
|
||||
|
||||
@@ -412,7 +412,7 @@ class Slider < UIControl
|
||||
self.changed=(self.curvalue!=oldvalue)
|
||||
self.invalidate
|
||||
end
|
||||
#Right arrow
|
||||
# Right arrow
|
||||
if right.contains(mousepos[0],mousepos[1])
|
||||
if repeattime>2500
|
||||
self.curvalue+=10
|
||||
|
||||
@@ -251,8 +251,8 @@ def pbDebugDayCare
|
||||
msg = _INTL("Pokémon can breed (compatibility = {1}).", compat)
|
||||
# Show compatibility
|
||||
if day_care.egg_generated
|
||||
case pbMessage("\\ts[]" + msg, [
|
||||
_INTL("Collect egg"), _INTL("Clear egg"), _INTL("Cancel")], 3)
|
||||
case pbMessage("\\ts[]" + msg,
|
||||
[_INTL("Collect egg"), _INTL("Clear egg"), _INTL("Cancel")], 3)
|
||||
when 0 # Collect egg
|
||||
if $player.party_full?
|
||||
pbMessage(_INTL("Party is full, can't collect the egg."))
|
||||
@@ -274,8 +274,8 @@ def pbDebugDayCare
|
||||
end
|
||||
end
|
||||
elsif cmd == commands.length - 1 # Steps to next cycle
|
||||
case pbMessage("\\ts[]" + _INTL("Change number of steps to next cycle?"), [
|
||||
_INTL("Set to 1"), _INTL("Set to 256"), _INTL("Set to other value"), _INTL("Cancel")], 4)
|
||||
case pbMessage("\\ts[]" + _INTL("Change number of steps to next cycle?"),
|
||||
[_INTL("Set to 1"), _INTL("Set to 256"), _INTL("Set to other value"), _INTL("Cancel")], 4)
|
||||
when 0 # Set to 1
|
||||
day_care.step_counter = 255
|
||||
need_refresh = true
|
||||
@@ -302,8 +302,8 @@ def pbDebugDayCare
|
||||
msg += "\\n" + _INTL("Steps to next level: {1}", end_exp - pkmn.exp)
|
||||
end
|
||||
# Show level change and cost
|
||||
case pbMessage("\\ts[]" + msg, [
|
||||
_INTL("Summary"), _INTL("Withdraw"), _INTL("Cancel")], 3)
|
||||
case pbMessage("\\ts[]" + msg,
|
||||
[_INTL("Summary"), _INTL("Withdraw"), _INTL("Cancel")], 3)
|
||||
when 0 # Summary
|
||||
pbFadeOutIn {
|
||||
scene = PokemonSummary_Scene.new
|
||||
@@ -322,8 +322,8 @@ def pbDebugDayCare
|
||||
end
|
||||
end
|
||||
else
|
||||
case pbMessage("\\ts[]" + _INTL("This slot is empty."), [
|
||||
_INTL("Deposit"), _INTL("Cancel")], 2)
|
||||
case pbMessage("\\ts[]" + _INTL("This slot is empty."),
|
||||
[_INTL("Deposit"), _INTL("Cancel")], 2)
|
||||
when 0 # Deposit
|
||||
if $player.party.empty?
|
||||
pbMessage(_INTL("Party is empty, can't deposit Pokémon."))
|
||||
@@ -449,7 +449,6 @@ def pbDebugRoamers
|
||||
else
|
||||
$PokemonGlobal.roamPosition[cmdwindow.index] = pbDefaultMap
|
||||
end
|
||||
cmdwindow.refresh
|
||||
else # Roam to a random other map
|
||||
oldmap = $PokemonGlobal.roamPosition[cmdwindow.index]
|
||||
pbRoamPokemonOne(cmdwindow.index)
|
||||
@@ -458,8 +457,8 @@ def pbDebugRoamers
|
||||
pbRoamPokemonOne(cmdwindow.index)
|
||||
end
|
||||
$PokemonGlobal.roamedAlready = false
|
||||
cmdwindow.refresh
|
||||
end
|
||||
cmdwindow.refresh
|
||||
elsif Input.trigger?(Input::BACK)
|
||||
pbPlayCancelSE
|
||||
break
|
||||
@@ -614,7 +613,7 @@ def pbImportAllAnimations
|
||||
Graphics.update
|
||||
audios = []
|
||||
files = Dir.glob(folder+"/*.*")
|
||||
%w( wav ogg mid wma ).each { |ext| # mp3
|
||||
%w[wav ogg mid wma].each { |ext| # mp3
|
||||
upext = ext.upcase
|
||||
audios.concat(files.find_all { |f| f[f.length-3,3]==ext })
|
||||
audios.concat(files.find_all { |f| f[f.length-3,3]==upext })
|
||||
@@ -623,7 +622,7 @@ def pbImportAllAnimations
|
||||
pbSafeCopyFile(audio,RTP.getAudioPath("Audio/SE/Anim/"+File.basename(audio)),"Audio/SE/Anim/"+File.basename(audio))
|
||||
end
|
||||
images = []
|
||||
%w( png gif ).each { |ext| # jpg jpeg bmp
|
||||
%w[png gif].each { |ext| # jpg jpeg bmp
|
||||
upext = ext.upcase
|
||||
images.concat(files.find_all { |f| f[f.length-3,3]==ext })
|
||||
images.concat(files.find_all { |f| f[f.length-3,3]==upext })
|
||||
|
||||
@@ -163,8 +163,8 @@ PokemonDebugMenuCommands.register("setpokerus", {
|
||||
msg = [_INTL("{1} doesn't have Pokérus.", pkmn.name),
|
||||
_INTL("Has strain {1}, infectious for {2} more days.", pokerus / 16, pokerus % 16),
|
||||
_INTL("Has strain {1}, not infectious.", pokerus / 16)][pkmn.pokerusStage]
|
||||
cmd = screen.pbShowCommands(msg, [
|
||||
_INTL("Give random strain"),
|
||||
cmd = screen.pbShowCommands(msg,
|
||||
[_INTL("Give random strain"),
|
||||
_INTL("Make not infectious"),
|
||||
_INTL("Clear Pokérus")], cmd)
|
||||
break if cmd < 0
|
||||
@@ -257,8 +257,8 @@ PokemonDebugMenuCommands.register("hiddenvalues", {
|
||||
cmd = 0
|
||||
loop do
|
||||
persid = sprintf("0x%08X", pkmn.personalID)
|
||||
cmd = screen.pbShowCommands(_INTL("Personal ID is {1}.", persid), [
|
||||
_INTL("Set EVs"),
|
||||
cmd = screen.pbShowCommands(_INTL("Personal ID is {1}.", persid),
|
||||
[_INTL("Set EVs"),
|
||||
_INTL("Set IVs"),
|
||||
_INTL("Randomise pID")], cmd)
|
||||
break if cmd < 0
|
||||
@@ -574,8 +574,8 @@ PokemonDebugMenuCommands.register("setmovepp", {
|
||||
cmd2 = 0
|
||||
loop do
|
||||
msg = _INTL("{1}: PP {2}/{3} (PP Up {4}/3)", movename, move.pp, move.total_pp, move.ppup)
|
||||
cmd2 = screen.pbShowCommands(msg, [
|
||||
_INTL("Set PP"),
|
||||
cmd2 = screen.pbShowCommands(msg,
|
||||
[_INTL("Set PP"),
|
||||
_INTL("Full PP"),
|
||||
_INTL("Set PP Up")], cmd2)
|
||||
break if cmd2 < 0
|
||||
@@ -764,8 +764,8 @@ PokemonDebugMenuCommands.register("setgender", {
|
||||
cmd = 0
|
||||
loop do
|
||||
msg = [_INTL("Gender is male."), _INTL("Gender is female.")][pkmn.male? ? 0 : 1]
|
||||
cmd = screen.pbShowCommands(msg, [
|
||||
_INTL("Make male"),
|
||||
cmd = screen.pbShowCommands(msg,
|
||||
[_INTL("Make male"),
|
||||
_INTL("Make female"),
|
||||
_INTL("Reset")], cmd)
|
||||
break if cmd < 0
|
||||
@@ -800,8 +800,8 @@ PokemonDebugMenuCommands.register("speciesform", {
|
||||
loop do
|
||||
msg = [_INTL("Species {1}, form {2}.", pkmn.speciesName, pkmn.form),
|
||||
_INTL("Species {1}, form {2} (forced).", pkmn.speciesName, pkmn.form)][(pkmn.forced_form.nil?) ? 0 : 1]
|
||||
cmd = screen.pbShowCommands(msg, [
|
||||
_INTL("Set species"),
|
||||
cmd = screen.pbShowCommands(msg,
|
||||
[_INTL("Set species"),
|
||||
_INTL("Set form"),
|
||||
_INTL("Remove form override")], cmd)
|
||||
break if cmd < 0
|
||||
@@ -869,8 +869,8 @@ PokemonDebugMenuCommands.register("setshininess", {
|
||||
loop do
|
||||
msg_idx = pkmn.shiny? ? (pkmn.super_shiny? ? 1 : 0) : 2
|
||||
msg = [_INTL("Is shiny."), _INTL("Is super shiny."), _INTL("Is normal (not shiny).")][msg_idx]
|
||||
cmd = screen.pbShowCommands(msg, [
|
||||
_INTL("Make shiny"),
|
||||
cmd = screen.pbShowCommands(msg,
|
||||
[_INTL("Make shiny"),
|
||||
_INTL("Make super shiny"),
|
||||
_INTL("Make normal"),
|
||||
_INTL("Reset")], cmd)
|
||||
@@ -969,9 +969,7 @@ PokemonDebugMenuCommands.register("setnickname", {
|
||||
speciesname = pkmn.speciesName
|
||||
msg = [_INTL("{1} has the nickname {2}.", speciesname, pkmn.name),
|
||||
_INTL("{1} has no nickname.", speciesname)][pkmn.nicknamed? ? 0 : 1]
|
||||
cmd = screen.pbShowCommands(msg, [
|
||||
_INTL("Rename"),
|
||||
_INTL("Erase name")], cmd)
|
||||
cmd = screen.pbShowCommands(msg, [_INTL("Rename"), _INTL("Erase name")], cmd)
|
||||
break if cmd < 0
|
||||
case cmd
|
||||
when 0 # Rename
|
||||
@@ -997,11 +995,12 @@ PokemonDebugMenuCommands.register("ownership", {
|
||||
cmd = 0
|
||||
loop do
|
||||
gender = [_INTL("Male"), _INTL("Female"), _INTL("Unknown")][pkmn.owner.gender]
|
||||
msg = [_INTL("Player's Pokémon\n{1}\n{2}\n{3} ({4})", pkmn.owner.name, gender, pkmn.owner.public_id, pkmn.owner.id),
|
||||
_INTL("Foreign Pokémon\n{1}\n{2}\n{3} ({4})", pkmn.owner.name, gender, pkmn.owner.public_id, pkmn.owner.id)
|
||||
][pkmn.foreign?($player) ? 1 : 0]
|
||||
cmd = screen.pbShowCommands(msg, [
|
||||
_INTL("Make player's"),
|
||||
msg = [_INTL("Player's Pokémon\n{1}\n{2}\n{3} ({4})",
|
||||
pkmn.owner.name, gender, pkmn.owner.public_id, pkmn.owner.id),
|
||||
_INTL("Foreign Pokémon\n{1}\n{2}\n{3} ({4})",
|
||||
pkmn.owner.name, gender, pkmn.owner.public_id, pkmn.owner.id)][pkmn.foreign?($player) ? 1 : 0]
|
||||
cmd = screen.pbShowCommands(msg,
|
||||
[_INTL("Make player's"),
|
||||
_INTL("Set OT's name"),
|
||||
_INTL("Set OT's gender"),
|
||||
_INTL("Random foreign ID"),
|
||||
@@ -1073,8 +1072,8 @@ PokemonDebugMenuCommands.register("setegg", {
|
||||
loop do
|
||||
msg = [_INTL("Not an egg"),
|
||||
_INTL("Egg (hatches in {1} steps).", pkmn.steps_to_hatch)][pkmn.egg? ? 1 : 0]
|
||||
cmd = screen.pbShowCommands(msg, [
|
||||
_INTL("Make egg"),
|
||||
cmd = screen.pbShowCommands(msg,
|
||||
[_INTL("Make egg"),
|
||||
_INTL("Make Pokémon"),
|
||||
_INTL("Set steps left to 1")], cmd)
|
||||
break if cmd < 0
|
||||
@@ -1114,11 +1113,8 @@ PokemonDebugMenuCommands.register("shadowpkmn", {
|
||||
cmd = 0
|
||||
loop do
|
||||
msg = [_INTL("Not a Shadow Pokémon."),
|
||||
_INTL("Heart gauge is {1} (stage {2}).", pkmn.heart_gauge, pkmn.heartStage)
|
||||
][pkmn.shadowPokemon? ? 1 : 0]
|
||||
cmd = screen.pbShowCommands(msg, [
|
||||
_INTL("Make Shadow"),
|
||||
_INTL("Set heart gauge")], cmd)
|
||||
_INTL("Heart gauge is {1} (stage {2}).", pkmn.heart_gauge, pkmn.heartStage)][pkmn.shadowPokemon? ? 1 : 0]
|
||||
cmd = screen.pbShowCommands(msg, [_INTL("Make Shadow"), _INTL("Set heart gauge")], cmd)
|
||||
break if cmd < 0
|
||||
case cmd
|
||||
when 0 # Make Shadow
|
||||
|
||||
@@ -3,165 +3,165 @@
|
||||
#===============================================================================
|
||||
module Battle::DebugVariables
|
||||
BATTLER_EFFECTS = {
|
||||
PBEffects::AquaRing => {name: "Aqua Ring applies", default: false},
|
||||
PBEffects::Attract => {name: "Battler that self is attracted to", default: -1}, # Battler index
|
||||
PBEffects::BanefulBunker => {name: "Baneful Bunker applies this round", default: false},
|
||||
PBEffects::AquaRing => { name: "Aqua Ring applies", default: false },
|
||||
PBEffects::Attract => { name: "Battler that self is attracted to", default: -1 }, # Battler index
|
||||
PBEffects::BanefulBunker => { name: "Baneful Bunker applies this round", default: false },
|
||||
# PBEffects::BeakBlast - only applies to use of specific move, not suitable for setting via debug
|
||||
PBEffects::Bide => {name: "Bide number of rounds remaining", default: 0},
|
||||
PBEffects::BideDamage => {name: "Bide damage accumulated", default: 0, max: 999},
|
||||
PBEffects::BideTarget => {name: "Bide last battler to hurt self", default: -1}, # Battler index
|
||||
PBEffects::BurnUp => {name: "Burn Up has removed self's Fire type", default: false},
|
||||
PBEffects::Charge => {name: "Charge number of rounds remaining", default: 0},
|
||||
PBEffects::ChoiceBand => {name: "Move locked into by Choice items", default: nil, type: :move},
|
||||
PBEffects::Confusion => {name: "Confusion number of rounds remaining", default: 0},
|
||||
PBEffects::Bide => { name: "Bide number of rounds remaining", default: 0 },
|
||||
PBEffects::BideDamage => { name: "Bide damage accumulated", default: 0, max: 999 },
|
||||
PBEffects::BideTarget => { name: "Bide last battler to hurt self", default: -1 }, # Battler index
|
||||
PBEffects::BurnUp => { name: "Burn Up has removed self's Fire type", default: false },
|
||||
PBEffects::Charge => { name: "Charge number of rounds remaining", default: 0 },
|
||||
PBEffects::ChoiceBand => { name: "Move locked into by Choice items", default: nil, type: :move },
|
||||
PBEffects::Confusion => { name: "Confusion number of rounds remaining", default: 0 },
|
||||
# PBEffects::Counter - not suitable for setting via debug
|
||||
# PBEffects::CounterTarget - not suitable for setting via debug
|
||||
PBEffects::Curse => {name: "Curse damaging applies", default: false},
|
||||
PBEffects::Curse => { name: "Curse damaging applies", default: false },
|
||||
# PBEffects::Dancer - only used while Dancer is running, not suitable for setting via debug
|
||||
PBEffects::DefenseCurl => {name: "Used Defense Curl", default: false},
|
||||
PBEffects::DefenseCurl => { name: "Used Defense Curl", default: false },
|
||||
# PBEffects::DestinyBond - not suitable for setting via debug
|
||||
# PBEffects::DestinyBondPrevious - not suitable for setting via debug
|
||||
# PBEffects::DestinyBondTarget - not suitable for setting via debug
|
||||
PBEffects::Disable => {name: "Disable number of rounds remaining", default: 0},
|
||||
PBEffects::DisableMove => {name: "Disabled move", default: nil, type: :move},
|
||||
PBEffects::Electrify => {name: "Electrify making moves Electric", default: false},
|
||||
PBEffects::Embargo => {name: "Embargo number of rounds remaining", default: 0},
|
||||
PBEffects::Encore => {name: "Encore number of rounds remaining", default: 0},
|
||||
PBEffects::EncoreMove => {name: "Encored move", default: nil, type: :move},
|
||||
PBEffects::Endure => {name: "Endures all lethal damage this round", default: false},
|
||||
PBEffects::Disable => { name: "Disable number of rounds remaining", default: 0 },
|
||||
PBEffects::DisableMove => { name: "Disabled move", default: nil, type: :move },
|
||||
PBEffects::Electrify => { name: "Electrify making moves Electric", default: false },
|
||||
PBEffects::Embargo => { name: "Embargo number of rounds remaining", default: 0 },
|
||||
PBEffects::Encore => { name: "Encore number of rounds remaining", default: 0 },
|
||||
PBEffects::EncoreMove => { name: "Encored move", default: nil, type: :move },
|
||||
PBEffects::Endure => { name: "Endures all lethal damage this round", default: false },
|
||||
# PBEffects::FirstPledge - only applies to use of specific move, not suitable for setting via debug
|
||||
PBEffects::FlashFire => {name: "Flash Fire powering up Fire moves", default: false},
|
||||
PBEffects::Flinch => {name: "Will flinch this round", default: false},
|
||||
PBEffects::FocusEnergy => {name: "Focus Energy critical hit stages (0-4)", default: 0, max: 4},
|
||||
PBEffects::FlashFire => { name: "Flash Fire powering up Fire moves", default: false },
|
||||
PBEffects::Flinch => { name: "Will flinch this round", default: false },
|
||||
PBEffects::FocusEnergy => { name: "Focus Energy critical hit stages (0-4)", default: 0, max: 4 },
|
||||
# PBEffects::FocusPunch - only applies to use of specific move, not suitable for setting via debug
|
||||
PBEffects::FollowMe => {name: "Follow Me drawing in attacks (if 1+)", default: 0}, # Order of use, lowest takes priority
|
||||
PBEffects::RagePowder => {name: "Rage Powder applies (use with Follow Me)", default: false},
|
||||
PBEffects::Foresight => {name: "Foresight applies (Ghost loses immunities)", default: false},
|
||||
PBEffects::FuryCutter => {name: "Fury Cutter power multiplier 2**x (0-4)", default: 0, max: 4},
|
||||
PBEffects::GastroAcid => {name: "Gastro Acid is negating self's ability", default: false},
|
||||
PBEffects::FollowMe => { name: "Follow Me drawing in attacks (if 1+)", default: 0 }, # Order of use, lowest takes priority
|
||||
PBEffects::RagePowder => { name: "Rage Powder applies (use with Follow Me)", default: false },
|
||||
PBEffects::Foresight => { name: "Foresight applies (Ghost loses immunities)", default: false },
|
||||
PBEffects::FuryCutter => { name: "Fury Cutter power multiplier 2**x (0-4)", default: 0, max: 4 },
|
||||
PBEffects::GastroAcid => { name: "Gastro Acid is negating self's ability", default: false },
|
||||
# PBEffects::GemConsumed - only applies during use of move, not suitable for setting via debug
|
||||
PBEffects::Grudge => {name: "Grudge will apply if self faints", default: false},
|
||||
PBEffects::HealBlock => {name: "Heal Block number of rounds remaining", default: 0},
|
||||
PBEffects::HelpingHand => {name: "Helping Hand will power up self's move", default: false},
|
||||
PBEffects::HyperBeam => {name: "Hyper Beam recharge rounds remaining", default: 0},
|
||||
PBEffects::Grudge => { name: "Grudge will apply if self faints", default: false },
|
||||
PBEffects::HealBlock => { name: "Heal Block number of rounds remaining", default: 0 },
|
||||
PBEffects::HelpingHand => { name: "Helping Hand will power up self's move", default: false },
|
||||
PBEffects::HyperBeam => { name: "Hyper Beam recharge rounds remaining", default: 0 },
|
||||
# PBEffects::Illusion - is a Pokémon object, too complex to be worth bothering with
|
||||
PBEffects::Imprison => {name: "Imprison disables others' moves known by self", default: false},
|
||||
PBEffects::Ingrain => {name: "Ingrain applies", default: false},
|
||||
PBEffects::Imprison => { name: "Imprison disables others' moves known by self", default: false },
|
||||
PBEffects::Ingrain => { name: "Ingrain applies", default: false },
|
||||
# PBEffects::Instruct - only used while Instruct is running, not suitable for setting via debug
|
||||
# PBEffects::Instructed - only used while Instruct is running, not suitable for setting via debug
|
||||
PBEffects::JawLock => {name: "Battler trapping self with Jaw Lock", default: -1}, # Battler index
|
||||
PBEffects::KingsShield => {name: "King's Shield applies this round", default: false},
|
||||
PBEffects::LaserFocus => {name: "Laser Focus certain critial hit duration", default: 0},
|
||||
PBEffects::LeechSeed => {name: "Battler that used Leech Seed on self", default: -1}, # Battler index
|
||||
PBEffects::LockOn => {name: "Lock-On number of rounds remaining", default: 0},
|
||||
PBEffects::LockOnPos => {name: "Battler that self is targeting with Lock-On", default: -1}, # Battler index
|
||||
PBEffects::JawLock => { name: "Battler trapping self with Jaw Lock", default: -1 }, # Battler index
|
||||
PBEffects::KingsShield => { name: "King's Shield applies this round", default: false },
|
||||
PBEffects::LaserFocus => { name: "Laser Focus certain critial hit duration", default: 0 },
|
||||
PBEffects::LeechSeed => { name: "Battler that used Leech Seed on self", default: -1 }, # Battler index
|
||||
PBEffects::LockOn => { name: "Lock-On number of rounds remaining", default: 0 },
|
||||
PBEffects::LockOnPos => { name: "Battler that self is targeting with Lock-On", default: -1 }, # Battler index
|
||||
# PBEffects::MagicBounce - only applies during use of move, not suitable for setting via debug
|
||||
# PBEffects::MagicCoat - only applies to use of specific move, not suitable for setting via debug
|
||||
PBEffects::MagnetRise => {name: "Magnet Rise number of rounds remaining", default: 0},
|
||||
PBEffects::MeanLook => {name: "Battler trapping self with Mean Look, etc.", default: -1}, # Battler index
|
||||
PBEffects::MagnetRise => { name: "Magnet Rise number of rounds remaining", default: 0 },
|
||||
PBEffects::MeanLook => { name: "Battler trapping self with Mean Look, etc.", default: -1 }, # Battler index
|
||||
# PBEffects::MeFirst - only applies to use of specific move, not suitable for setting via debug
|
||||
PBEffects::Metronome => {name: "Metronome item power multiplier 1 + 0.2*x (0-5)", default: 0, max: 5},
|
||||
PBEffects::MicleBerry => {name: "Micle Berry boosting next move's accuracy", default: false},
|
||||
PBEffects::Minimize => {name: "Used Minimize", default: false},
|
||||
PBEffects::MiracleEye => {name: "Miracle Eye applies (Dark loses immunities)", default: false},
|
||||
PBEffects::Metronome => { name: "Metronome item power multiplier 1 + 0.2*x (0-5)", default: 0, max: 5 },
|
||||
PBEffects::MicleBerry => { name: "Micle Berry boosting next move's accuracy", default: false },
|
||||
PBEffects::Minimize => { name: "Used Minimize", default: false },
|
||||
PBEffects::MiracleEye => { name: "Miracle Eye applies (Dark loses immunities)", default: false },
|
||||
# PBEffects::MirrorCoat - not suitable for setting via debug
|
||||
# PBEffects::MirrorCoatTarget - not suitable for setting via debug
|
||||
# PBEffects::MoveNext - not suitable for setting via debug
|
||||
PBEffects::MudSport => {name: "Used Mud Sport (Gen 5 and older)", default: false},
|
||||
PBEffects::Nightmare => {name: "Taking Nightmare damage", default: false},
|
||||
PBEffects::NoRetreat => {name: "No Retreat trapping self in battle", default: false},
|
||||
PBEffects::Obstruct => {name: "Obstruct applies this round", default: false},
|
||||
PBEffects::Octolock => {name: "Battler trapping self with Octolock", default: -1}, # Battler index
|
||||
PBEffects::Outrage => {name: "Outrage number of rounds remaining", default: 0},
|
||||
PBEffects::MudSport => { name: "Used Mud Sport (Gen 5 and older)", default: false },
|
||||
PBEffects::Nightmare => { name: "Taking Nightmare damage", default: false },
|
||||
PBEffects::NoRetreat => { name: "No Retreat trapping self in battle", default: false },
|
||||
PBEffects::Obstruct => { name: "Obstruct applies this round", default: false },
|
||||
PBEffects::Octolock => { name: "Battler trapping self with Octolock", default: -1 }, # Battler index
|
||||
PBEffects::Outrage => { name: "Outrage number of rounds remaining", default: 0 },
|
||||
# PBEffects::ParentalBond - only applies during use of move, not suitable for setting via debug
|
||||
PBEffects::PerishSong => {name: "Perish Song number of rounds remaining", default: 0},
|
||||
PBEffects::PerishSongUser => {name: "Battler that used Perish Song on self", default: -1}, # Battler index
|
||||
PBEffects::PickupItem => {name: "Item retrievable by Pickup", default: nil, type: :item},
|
||||
PBEffects::PickupUse => {name: "Pickup item consumed time (higher=more recent)", default: 0},
|
||||
PBEffects::Pinch => {name: "(Battle Palace) Behavior changed at <50% HP", default: false},
|
||||
PBEffects::Powder => {name: "Powder will explode self's Fire move this round", default: false},
|
||||
PBEffects::PerishSong => { name: "Perish Song number of rounds remaining", default: 0 },
|
||||
PBEffects::PerishSongUser => { name: "Battler that used Perish Song on self", default: -1 }, # Battler index
|
||||
PBEffects::PickupItem => { name: "Item retrievable by Pickup", default: nil, type: :item },
|
||||
PBEffects::PickupUse => { name: "Pickup item consumed time (higher=more recent)", default: 0 },
|
||||
PBEffects::Pinch => { name: "(Battle Palace) Behavior changed at <50% HP", default: false },
|
||||
PBEffects::Powder => { name: "Powder will explode self's Fire move this round", default: false },
|
||||
# PBEffects::PowerTrick - doesn't actually swap the stats therefore does nothing, not suitable for setting via debug
|
||||
# PBEffects::Prankster - not suitable for setting via debug
|
||||
# PBEffects::PriorityAbility - not suitable for setting via debug
|
||||
# PBEffects::PriorityItem - not suitable for setting via debug
|
||||
PBEffects::Protect => {name: "Protect applies this round", default: false},
|
||||
PBEffects::ProtectRate => {name: "Protect success chance 1/x", default: 1, max: 999},
|
||||
PBEffects::Protect => { name: "Protect applies this round", default: false },
|
||||
PBEffects::ProtectRate => { name: "Protect success chance 1/x", default: 1, max: 999 },
|
||||
# PBEffects::Pursuit - not suitable for setting via debug
|
||||
# PBEffects::Quash - not suitable for setting via debug
|
||||
# PBEffects::Rage - only applies to use of specific move, not suitable for setting via debug
|
||||
PBEffects::Rollout => {name: "Rollout rounds remaining (lower=stronger)", default: 0},
|
||||
PBEffects::Roost => {name: "Roost removing Flying type this round", default: false},
|
||||
PBEffects::Rollout => { name: "Rollout rounds remaining (lower=stronger)", default: 0 },
|
||||
PBEffects::Roost => { name: "Roost removing Flying type this round", default: false },
|
||||
# PBEffects::ShellTrap - only applies to use of specific move, not suitable for setting via debug
|
||||
# PBEffects::SkyDrop - only applies to use of specific move, not suitable for setting via debug
|
||||
PBEffects::SlowStart => {name: "Slow Start rounds remaining", default: 0},
|
||||
PBEffects::SmackDown => {name: "Smack Down is grounding self", default: false},
|
||||
PBEffects::SlowStart => { name: "Slow Start rounds remaining", default: 0 },
|
||||
PBEffects::SmackDown => { name: "Smack Down is grounding self", default: false },
|
||||
# PBEffects::Snatch - only applies to use of specific move, not suitable for setting via debug
|
||||
PBEffects::SpikyShield => {name: "Spiky Shield applies this round", default: false},
|
||||
PBEffects::Spotlight => {name: "Spotlight drawing in attacks (if 1+)", default: 0},
|
||||
PBEffects::Stockpile => {name: "Stockpile count (0-3)", default: 0, max: 3},
|
||||
PBEffects::StockpileDef => {name: "Def stages gained by Stockpile (0-12)", default: 0, max: 12},
|
||||
PBEffects::StockpileSpDef => {name: "Sp. Def stages gained by Stockpile (0-12)", default: 0, max: 12},
|
||||
PBEffects::Substitute => {name: "Substitute's HP", default: 0, max: 999},
|
||||
PBEffects::TarShot => {name: "Tar Shot weakening self to Fire", default: false},
|
||||
PBEffects::Taunt => {name: "Taunt number of rounds remaining", default: 0},
|
||||
PBEffects::Telekinesis => {name: "Telekinesis number of rounds remaining", default: 0},
|
||||
PBEffects::ThroatChop => {name: "Throat Chop number of rounds remaining", default: 0},
|
||||
PBEffects::Torment => {name: "Torment preventing repeating moves", default: false},
|
||||
PBEffects::SpikyShield => { name: "Spiky Shield applies this round", default: false },
|
||||
PBEffects::Spotlight => { name: "Spotlight drawing in attacks (if 1+)", default: 0 },
|
||||
PBEffects::Stockpile => { name: "Stockpile count (0-3)", default: 0, max: 3 },
|
||||
PBEffects::StockpileDef => { name: "Def stages gained by Stockpile (0-12)", default: 0, max: 12 },
|
||||
PBEffects::StockpileSpDef => { name: "Sp. Def stages gained by Stockpile (0-12)", default: 0, max: 12 },
|
||||
PBEffects::Substitute => { name: "Substitute's HP", default: 0, max: 999 },
|
||||
PBEffects::TarShot => { name: "Tar Shot weakening self to Fire", default: false },
|
||||
PBEffects::Taunt => { name: "Taunt number of rounds remaining", default: 0 },
|
||||
PBEffects::Telekinesis => { name: "Telekinesis number of rounds remaining", default: 0 },
|
||||
PBEffects::ThroatChop => { name: "Throat Chop number of rounds remaining", default: 0 },
|
||||
PBEffects::Torment => { name: "Torment preventing repeating moves", default: false },
|
||||
# PBEffects::Toxic - set elsewhere
|
||||
# PBEffects::Transform - too complex to be worth bothering with
|
||||
# PBEffects::TransformSpecies - too complex to be worth bothering with
|
||||
PBEffects::Trapping => {name: "Trapping number of rounds remaining", default: 0},
|
||||
PBEffects::TrappingMove => {name: "Move that is trapping self", default: nil, type: :move},
|
||||
PBEffects::TrappingUser => {name: "Battler trapping self (for Binding Band)", default: -1}, # Battler index
|
||||
PBEffects::Truant => {name: "Truant will loaf around this round", default: false},
|
||||
PBEffects::Trapping => { name: "Trapping number of rounds remaining", default: 0 },
|
||||
PBEffects::TrappingMove => { name: "Move that is trapping self", default: nil, type: :move },
|
||||
PBEffects::TrappingUser => { name: "Battler trapping self (for Binding Band)", default: -1 }, # Battler index
|
||||
PBEffects::Truant => { name: "Truant will loaf around this round", default: false },
|
||||
# PBEffects::TwoTurnAttack - only applies to use of specific moves, not suitable for setting via debug
|
||||
# PBEffects::Type3 - set elsewhere
|
||||
PBEffects::Unburden => {name: "Self lost its item (for Unburden)", default: false},
|
||||
PBEffects::Uproar => {name: "Uproar number of rounds remaining", default: 0},
|
||||
PBEffects::WaterSport => {name: "Used Water Sport (Gen 5 and older)", default: false},
|
||||
PBEffects::WeightChange => {name: "Weight change +0.1*x kg", default: 0, min: -99999, max: 99999},
|
||||
PBEffects::Yawn => {name: "Yawn rounds remaining until falling asleep", default: 0}
|
||||
PBEffects::Unburden => { name: "Self lost its item (for Unburden)", default: false },
|
||||
PBEffects::Uproar => { name: "Uproar number of rounds remaining", default: 0 },
|
||||
PBEffects::WaterSport => { name: "Used Water Sport (Gen 5 and older)", default: false },
|
||||
PBEffects::WeightChange => { name: "Weight change +0.1*x kg", default: 0, min: -99999, max: 99999 },
|
||||
PBEffects::Yawn => { name: "Yawn rounds remaining until falling asleep", default: 0 }
|
||||
}
|
||||
|
||||
SIDE_EFFECTS = {
|
||||
PBEffects::AuroraVeil => {name: "Aurora Veil duration", default: 0},
|
||||
PBEffects::CraftyShield => {name: "Crafty Shield applies this round", default: false},
|
||||
PBEffects::EchoedVoiceCounter => {name: "Echoed Voice rounds used (max. 5)", default: 0, max: 5},
|
||||
PBEffects::EchoedVoiceUsed => {name: "Echoed Voice used this round", default: false},
|
||||
PBEffects::LastRoundFainted => {name: "Round when side's battler last fainted", default: -2}, # Treated as -1, isn't a battler index
|
||||
PBEffects::LightScreen => {name: "Light Screen duration", default: 0},
|
||||
PBEffects::LuckyChant => {name: "Lucky Chant duration", default: 0},
|
||||
PBEffects::MatBlock => {name: "Mat Block applies this round", default: false},
|
||||
PBEffects::Mist => {name: "Mist duration", default: 0},
|
||||
PBEffects::QuickGuard => {name: "Quick Guard applies this round", default: false},
|
||||
PBEffects::Rainbow => {name: "Rainbow duration", default: 0},
|
||||
PBEffects::Reflect => {name: "Reflect duration", default: 0},
|
||||
PBEffects::Round => {name: "Round was used this round", default: false},
|
||||
PBEffects::Safeguard => {name: "Safeguard duration", default: 0},
|
||||
PBEffects::SeaOfFire => {name: "Sea Of Fire duration", default: 0},
|
||||
PBEffects::Spikes => {name: "Spikes layers (0-3)", default: 0, max: 3},
|
||||
PBEffects::StealthRock => {name: "Stealth Rock exists", default: false},
|
||||
PBEffects::StickyWeb => {name: "Sticky Web exists", default: false},
|
||||
PBEffects::Swamp => {name: "Swamp duration", default: 0},
|
||||
PBEffects::Tailwind => {name: "Tailwind duration", default: 0},
|
||||
PBEffects::ToxicSpikes => {name: "Toxic Spikes layers (0-2)", default: 0, max: 2},
|
||||
PBEffects::WideGuard => {name: "Wide Guard applies this round", default: false}
|
||||
PBEffects::AuroraVeil => { name: "Aurora Veil duration", default: 0 },
|
||||
PBEffects::CraftyShield => { name: "Crafty Shield applies this round", default: false },
|
||||
PBEffects::EchoedVoiceCounter => { name: "Echoed Voice rounds used (max. 5)", default: 0, max: 5 },
|
||||
PBEffects::EchoedVoiceUsed => { name: "Echoed Voice used this round", default: false },
|
||||
PBEffects::LastRoundFainted => { name: "Round when side's battler last fainted", default: -2 }, # Treated as -1, isn't a battler index
|
||||
PBEffects::LightScreen => { name: "Light Screen duration", default: 0 },
|
||||
PBEffects::LuckyChant => { name: "Lucky Chant duration", default: 0 },
|
||||
PBEffects::MatBlock => { name: "Mat Block applies this round", default: false },
|
||||
PBEffects::Mist => { name: "Mist duration", default: 0 },
|
||||
PBEffects::QuickGuard => { name: "Quick Guard applies this round", default: false },
|
||||
PBEffects::Rainbow => { name: "Rainbow duration", default: 0 },
|
||||
PBEffects::Reflect => { name: "Reflect duration", default: 0 },
|
||||
PBEffects::Round => { name: "Round was used this round", default: false },
|
||||
PBEffects::Safeguard => { name: "Safeguard duration", default: 0 },
|
||||
PBEffects::SeaOfFire => { name: "Sea Of Fire duration", default: 0 },
|
||||
PBEffects::Spikes => { name: "Spikes layers (0-3)", default: 0, max: 3 },
|
||||
PBEffects::StealthRock => { name: "Stealth Rock exists", default: false },
|
||||
PBEffects::StickyWeb => { name: "Sticky Web exists", default: false },
|
||||
PBEffects::Swamp => { name: "Swamp duration", default: 0 },
|
||||
PBEffects::Tailwind => { name: "Tailwind duration", default: 0 },
|
||||
PBEffects::ToxicSpikes => { name: "Toxic Spikes layers (0-2)", default: 0, max: 2 },
|
||||
PBEffects::WideGuard => { name: "Wide Guard applies this round", default: false }
|
||||
}
|
||||
|
||||
FIELD_EFFECTS = {
|
||||
PBEffects::AmuletCoin => {name: "Amulet Coin doubling prize money", default: false},
|
||||
PBEffects::FairyLock => {name: "Fairy Lock trapping duration", default: 0},
|
||||
PBEffects::FusionBolt => {name: "Fusion Bolt was used", default: false},
|
||||
PBEffects::FusionFlare => {name: "Fusion Flare was used", default: false},
|
||||
PBEffects::Gravity => {name: "Gravity duration", default: 0},
|
||||
PBEffects::HappyHour => {name: "Happy Hour doubling prize money", default: false},
|
||||
PBEffects::IonDeluge => {name: "Ion Deluge making moves Electric", default: false},
|
||||
PBEffects::MagicRoom => {name: "Magic Room duration", default: 0},
|
||||
PBEffects::MudSportField => {name: "Mud Sport duration (Gen 6+)", default: 0},
|
||||
PBEffects::PayDay => {name: "Pay Day additional prize money", default: 0, max: Settings::MAX_MONEY},
|
||||
PBEffects::TrickRoom => {name: "Trick Room duration", default: 0},
|
||||
PBEffects::WaterSportField => {name: "Water Sport duration (Gen 6+)", default: 0},
|
||||
PBEffects::WonderRoom => {name: "Wonder Room duration", default: 0}
|
||||
PBEffects::AmuletCoin => { name: "Amulet Coin doubling prize money", default: false },
|
||||
PBEffects::FairyLock => { name: "Fairy Lock trapping duration", default: 0 },
|
||||
PBEffects::FusionBolt => { name: "Fusion Bolt was used", default: false },
|
||||
PBEffects::FusionFlare => { name: "Fusion Flare was used", default: false },
|
||||
PBEffects::Gravity => { name: "Gravity duration", default: 0 },
|
||||
PBEffects::HappyHour => { name: "Happy Hour doubling prize money", default: false },
|
||||
PBEffects::IonDeluge => { name: "Ion Deluge making moves Electric", default: false },
|
||||
PBEffects::MagicRoom => { name: "Magic Room duration", default: 0 },
|
||||
PBEffects::MudSportField => { name: "Mud Sport duration (Gen 6+)", default: 0 },
|
||||
PBEffects::PayDay => { name: "Pay Day additional prize money", default: 0, max: Settings::MAX_MONEY },
|
||||
PBEffects::TrickRoom => { name: "Trick Room duration", default: 0 },
|
||||
PBEffects::WaterSportField => { name: "Water Sport duration (Gen 6+)", default: 0 },
|
||||
PBEffects::WonderRoom => { name: "Wonder Room duration", default: 0 }
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
@@ -347,10 +347,11 @@ module Compiler
|
||||
GameData::Move.register(move_hash)
|
||||
end
|
||||
# Parse move
|
||||
line = pbGetCsvRecord(line, line_no, [0, "snssueeuuueiss",
|
||||
line = pbGetCsvRecord(line, line_no,
|
||||
[0, "snssueeuuueiss",
|
||||
nil, nil, nil, nil, nil, :Type, ["Physical", "Special", "Status"],
|
||||
nil, nil, nil, :Target, nil, nil, nil
|
||||
])
|
||||
nil, nil, nil, :Target, nil, nil, nil]
|
||||
)
|
||||
move_id = line[1].to_sym
|
||||
if GameData::Move::DATA[move_id]
|
||||
raise _INTL("Move ID '{1}' is used twice.\r\n{2}", move_id, FileLineData.linereport)
|
||||
@@ -467,8 +468,10 @@ module Compiler
|
||||
# Add previous item's data to records
|
||||
GameData::Item.register(item_hash) if item_hash
|
||||
# Parse item
|
||||
line = pbGetCsvRecord(line, line_no, [0, "snssvusuuUE", nil, nil, nil,
|
||||
nil, nil, nil, nil, nil, nil, nil, :Move])
|
||||
line = pbGetCsvRecord(line, line_no,
|
||||
[0, "snssvusuuUE", nil, nil, nil,
|
||||
nil, nil, nil, nil, nil, nil, nil, :Move]
|
||||
)
|
||||
item_id = line[1].to_sym
|
||||
if GameData::Item.exists?(item_id)
|
||||
raise _INTL("Item ID '{1}' is used twice.\r\n{2}", item_id, FileLineData.linereport)
|
||||
@@ -1337,12 +1340,14 @@ module Compiler
|
||||
# Add previous trainer type's data to records
|
||||
GameData::TrainerType.register(tr_type_hash) if tr_type_hash
|
||||
# Parse trainer type
|
||||
line = pbGetCsvRecord(line, line_no, [0, "snsUSSSeUS",
|
||||
nil, nil, nil, nil, nil, nil, nil, {
|
||||
"Male" => 0, "M" => 0, "0" => 0,
|
||||
line = pbGetCsvRecord(line, line_no,
|
||||
[0, "snsUSSSeUS",
|
||||
nil, nil, nil, nil, nil, nil, nil,
|
||||
{ "Male" => 0, "M" => 0, "0" => 0,
|
||||
"Female" => 1, "F" => 1, "1" => 1,
|
||||
"Mixed" => 2, "X" => 2, "2" => 2, "" => 2
|
||||
}, nil, nil])
|
||||
"Mixed" => 2, "X" => 2, "2" => 2, "" => 2 },
|
||||
nil, nil]
|
||||
)
|
||||
tr_type_id = line[1].to_sym
|
||||
if GameData::TrainerType.exists?(tr_type_id)
|
||||
raise _INTL("Trainer Type ID '{1}' is used twice.\r\n{2}", tr_type_id, FileLineData.linereport)
|
||||
|
||||
@@ -786,9 +786,11 @@ module Compiler
|
||||
PBMoveRoute::PlaySE,RPG::AudioFile.new("Door enter"),PBMoveRoute::Wait,2,
|
||||
PBMoveRoute::TurnLeft,PBMoveRoute::Wait,2,
|
||||
PBMoveRoute::TurnRight,PBMoveRoute::Wait,2,
|
||||
PBMoveRoute::TurnUp,PBMoveRoute::Wait,2])
|
||||
PBMoveRoute::TurnUp,PBMoveRoute::Wait,2
|
||||
])
|
||||
push_move_route_and_wait(list,-1,[ # Move Route for player entering door
|
||||
PBMoveRoute::ThroughOn,PBMoveRoute::Up,PBMoveRoute::ThroughOff])
|
||||
PBMoveRoute::ThroughOn,PBMoveRoute::Up,PBMoveRoute::ThroughOff
|
||||
])
|
||||
push_event(list,208,[0]) # Change Transparent Flag (invisible)
|
||||
push_script(list, "Followers.follow_into_door")
|
||||
push_event(list, 210, [], indent) # Wait for Move's Completion
|
||||
@@ -809,14 +811,16 @@ module Compiler
|
||||
push_event(list,208,[0],1) # Change Transparent Flag (invisible)
|
||||
push_script(list, "Followers.hide_followers", 1)
|
||||
push_move_route_and_wait(list,0,[ # Move Route for setting door to open
|
||||
PBMoveRoute::TurnLeft,PBMoveRoute::Wait,6],1)
|
||||
PBMoveRoute::TurnLeft,PBMoveRoute::Wait,6
|
||||
],1)
|
||||
push_event(list,208,[1],1) # Change Transparent Flag (visible)
|
||||
push_move_route_and_wait(list,-1,[PBMoveRoute::Down],1) # Move Route for player exiting door
|
||||
push_script(list, "Followers.put_followers_on_player", 1)
|
||||
push_move_route_and_wait(list,0,[ # Move Route for door closing
|
||||
PBMoveRoute::TurnUp,PBMoveRoute::Wait,2,
|
||||
PBMoveRoute::TurnRight,PBMoveRoute::Wait,2,
|
||||
PBMoveRoute::TurnDown,PBMoveRoute::Wait,2],1)
|
||||
PBMoveRoute::TurnDown,PBMoveRoute::Wait,2
|
||||
],1)
|
||||
push_branch_end(list,1)
|
||||
push_script(list,"setTempSwitchOn(\"A\")")
|
||||
push_end(list)
|
||||
@@ -973,7 +977,6 @@ module Compiler
|
||||
push_script(newEvents,"pbReceiveItem(:#{itemname})",oldIndent+1)
|
||||
push_else(newEvents,oldIndent+1)
|
||||
push_text(newEvents,_INTL("You have no room left in the Bag."),oldIndent+1)
|
||||
push_branch_end(newEvents,oldIndent+1)
|
||||
else
|
||||
push_event(newEvents,111,[7,cost,0],oldIndent)
|
||||
push_branch(newEvents,"$bag.can_add?(:#{itemname})",oldIndent+1)
|
||||
@@ -985,8 +988,8 @@ module Compiler
|
||||
push_branch_end(newEvents,oldIndent+2)
|
||||
push_else(newEvents,oldIndent+1)
|
||||
push_text(newEvents,_INTL("\\GYou don't have enough money."),oldIndent+1)
|
||||
push_branch_end(newEvents,oldIndent+1)
|
||||
end
|
||||
push_branch_end(newEvents,oldIndent+1)
|
||||
list[i,0] = newEvents # insert 'newEvents' at index 'i'
|
||||
changed = true
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user