Removed all excess whitespace and standardized line endings.

This commit is contained in:
m3rein
2020-09-05 21:23:16 +02:00
parent caed5bd757
commit 240af4e5e7
219 changed files with 929 additions and 929 deletions

View File

@@ -347,7 +347,7 @@ PLANT_SPARKLE_ANIMATION_ID = 7
# message file in the Data folder. Edit only if you have 2 or more
# languages to choose from.
#===============================================================================
LANGUAGES = [
LANGUAGES = [
# ["English","english.dat"],
# ["Deutsch","deutsch.dat"]
]
]

View File

@@ -208,4 +208,4 @@ end
def nil_or_empty?(string)
return string.nil? || !string.is_a?(String) || string.size == 0
end
end

View File

@@ -32,8 +32,8 @@ class Win32API
def call(*args)
if @w32name!="GetAsyncKeyState"
File.open("winapi.txt","ab") { |f|
f.write("call(#{@w32dll},#{@w32name},#{args.inspect})\r\n")
File.open("winapi.txt","ab") { |f|
f.write("call(#{@w32dll},#{@w32name},#{args.inspect})\r\n")
}
end
debug_call(*args)
@@ -605,4 +605,4 @@ module RPG
# def play
# end
end
end
end

View File

@@ -22,7 +22,7 @@ class Win32API
wndthreadid = @@GetWindowThreadProcessId.call(nextwindow,processid)
if wndthreadid==threadid
@@RGSSWINDOW = nextwindow
return @@RGSSWINDOW
return @@RGSSWINDOW
end
end
end until nextwindow==0
@@ -62,7 +62,7 @@ class Win32API
hWnd = pbFindRgssWindow
window.call(hWnd,9)
end
def Win32API.fillScreen
setWindowLong = Win32API.new('user32','SetWindowLong','LLL','L')
setWindowPos = Win32API.new('user32','SetWindowPos','LLIIIII','I')
@@ -75,8 +75,8 @@ class Win32API
Win32API.focusWindow
return [width,height]
end
def Win32API.restoreScreen
def Win32API.restoreScreen
setWindowLong = Win32API.new('user32','SetWindowLong','LLL','L')
setWindowPos = Win32API.new('user32','SetWindowPos','LLIIIII','I')
metrics = Win32API.new('user32','GetSystemMetrics','I','I')
@@ -101,4 +101,4 @@ end
# Well done for finding this place.
# DO NOT EDIT THESE
ESSENTIALS_VERSION = "18"
ERROR_TEXT = ""
ERROR_TEXT = ""

View File

@@ -3,7 +3,7 @@ module Win32
buf = "\0" * len
Win32API.new("kernel32", "RtlMoveMemory", "ppl", "").call(buf, self, len)
buf
end
end
end
@@ -41,13 +41,13 @@ module Winsock
#-----------------------------------------------------------------------------
def self.closesocket(*args)
Win32API.new(DLL, "closesocket", "p", "l").call(*args)
end
end
#-----------------------------------------------------------------------------
# * Connect
#-----------------------------------------------------------------------------
def self.connect(*args)
Win32API.new(DLL, "connect", "ppl", "l").call(*args)
end
end
#-----------------------------------------------------------------------------
# * Get host (Using Adress)
#-----------------------------------------------------------------------------
@@ -95,7 +95,7 @@ module Winsock
#-----------------------------------------------------------------------------
def self.inet_ntoa(*args)
Win32API.new(DLL, "inet_ntoa", "l", "p").call(*args)
end
end
#-----------------------------------------------------------------------------
# * Listen
#-----------------------------------------------------------------------------
@@ -125,7 +125,7 @@ module Winsock
#-----------------------------------------------------------------------------
def self.setsockopt(*args)
Win32API.new(DLL, "setsockopt", "pllpl", "l").call(*args)
end
end
#-----------------------------------------------------------------------------
# * Shutdown
#-----------------------------------------------------------------------------
@@ -136,7 +136,7 @@ module Winsock
# * Socket
#-----------------------------------------------------------------------------
def self.socket(*args)
Win32API.new(DLL, "socket", "lll", "l").call(*args)
Win32API.new(DLL, "socket", "lll", "l").call(*args)
end
#-----------------------------------------------------------------------------
# * Get Last Error
@@ -162,12 +162,12 @@ class Socket
#-----------------------------------------------------------------------------
# * Constants
#-----------------------------------------------------------------------------
AF_UNSPEC = 0
AF_UNSPEC = 0
AF_UNIX = 1
AF_INET = 2
AF_IPX = 6
AF_APPLETALK = 16
PF_UNSPEC = 0
PF_UNSPEC = 0
PF_UNIX = 1
PF_INET = 2
PF_IPX = 6
@@ -244,13 +244,13 @@ class Socket
AI_V4MAPPED = 2048
#--------------------------------------------------------------------------
# * Returns the associated IP address for the given hostname.
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def self.getaddress(host)
gethostbyname(host)[3].unpack("C4").join(".")
end
#--------------------------------------------------------------------------
# * Returns the associated IP address for the given hostname.
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def self.getservice(serv)
case serv
when Numeric
@@ -271,7 +271,7 @@ class Socket
end
#--------------------------------------------------------------------------
# * Returns the user's hostname.
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def self.gethostname
buf = "\0" * 256
Winsock.gethostname(buf, 256)
@@ -305,7 +305,7 @@ class Socket
end
#--------------------------------------------------------------------------
# * Creates an INET-sockaddr struct.
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def self.sockaddr_in(port, host)
begin
[AF_INET, getservice(port)].pack("sn") + gethostbyname(host)[3] + [].pack("x8")
@@ -319,7 +319,7 @@ class Socket
end
#--------------------------------------------------------------------------
# * Creates a new socket and connects it to the given host and port.
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def self.open(*args)
socket = new(*args)
if block_given?
@@ -333,14 +333,14 @@ class Socket
end
#--------------------------------------------------------------------------
# * Creates a new socket.
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def initialize(domain, type, protocol)
SocketError.check if (@fd = Winsock.socket(domain, type, protocol)) == -1
@fd
end
#--------------------------------------------------------------------------
# * Accepts incoming connections.
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def accept(flags = 0)
buf = "\0" * 16
SocketError.check if Winsock.accept(@fd, buf, flags) == -1
@@ -348,21 +348,21 @@ class Socket
end
#--------------------------------------------------------------------------
# * Binds a socket to the given sockaddr.
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def bind(sockaddr)
SocketError.check if (ret = Winsock.bind(@fd, sockaddr, sockaddr.size)) == -1
ret
end
#--------------------------------------------------------------------------
# * Closes a socket.
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def close
SocketError.check if (ret = Winsock.closesocket(@fd)) == -1
ret
end
#--------------------------------------------------------------------------
# * Connects a socket to the given sockaddr.
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def connect(sockaddr)
#return if Network.testing? == 2
SocketError.check if (ret = Winsock.connect(@fd, sockaddr, sockaddr.size)) == -1
@@ -370,28 +370,28 @@ class Socket
end
#--------------------------------------------------------------------------
# * Listens for incoming connections.
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def listen(backlog)
SocketError.check if (ret = Winsock.listen(@fd, backlog)) == -1
ret
end
#--------------------------------------------------------------------------
# * Checks waiting data's status.
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def select(timeout) # timeout in seconds
SocketError.check if (ret = Winsock.select(1, [1, @fd].pack("ll"), 0, 0, [timeout.to_i,
SocketError.check if (ret = Winsock.select(1, [1, @fd].pack("ll"), 0, 0, [timeout.to_i,
(timeout * 1000000).to_i].pack("ll"))) == -1
ret
end
#--------------------------------------------------------------------------
# * Checks if data is waiting.
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def ready?
not select(0) == 0
end
end
#--------------------------------------------------------------------------
# * Reads data from socket.
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def read(len)
buf = "\0" * len
Win32API.new("msvcrt", "_read", "lpl", "l").call(@fd, buf, len)
@@ -399,7 +399,7 @@ class Socket
end
#--------------------------------------------------------------------------
# * Returns received data.
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def recv(len, flags = 0)
retString=""
remainLen=len
@@ -415,7 +415,7 @@ class Socket
end
#--------------------------------------------------------------------------
# * Sends data to a host.
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def send(data, flags = 0)
SocketError.check if (ret = Winsock.send(@fd, data, data.size, flags)) == -1
ret
@@ -423,7 +423,7 @@ class Socket
#--------------------------------------------------------------------------
# * Recieves file from a socket
# size : file size
# scene : update scene boolean
# scene : update scene boolean
#--------------------------------------------------------------------------
def recv_file(size,scene=false,file="")
data = []
@@ -464,12 +464,12 @@ class Socket
break if ch == "\n"
message += ch
end
# Return recieved data
# Return recieved data
return message
end
#--------------------------------------------------------------------------
# * Writes data to socket.
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def write(data)
Win32API.new("msvcrt", "_write", "lpl", "l").call(@fd, data, 1)
end
@@ -490,7 +490,7 @@ end
class TCPSocket < Socket
#--------------------------------------------------------------------------
# * Creates a new socket and connects it to the given host and port.
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def self.open(*args)
socket = new(*args)
if block_given?
@@ -504,7 +504,7 @@ class TCPSocket < Socket
end
#--------------------------------------------------------------------------
# * Creates a new socket and connects it to the given host and port.
#--------------------------------------------------------------------------
#--------------------------------------------------------------------------
def initialize(host, port)
super(AF_INET, SOCK_STREAM, IPPROTO_TCP)
connect(Socket.sockaddr_in(port, host))
@@ -526,7 +526,7 @@ class SocketError < StandardError
#if not Network.testing? == 1
raise Errno.const_get(Errno.constants.detect { |c| Errno.const_get(c).new.errno == errno })
#else
# errno != 0 ? (Network.testresult(true)) : (Network.testresult(false))
# errno != 0 ? (Network.testresult(true)) : (Network.testresult(false))
#end
end
end
@@ -669,7 +669,7 @@ def pbDownloadToString(url)
return data
rescue
return ""
end
end
end
def pbDownloadToFile(url, file)
@@ -685,7 +685,7 @@ def pbPostToString(url, postdata)
return data
rescue
return ""
end
end
end
def pbPostToFile(url, postdata, file)
@@ -693,4 +693,4 @@ def pbPostToFile(url, postdata, file)
pbPostData(url, postdata,file)
rescue
end
end
end

View File

@@ -3,7 +3,7 @@ module Console
GENERIC_READ = 0x80000000
GENERIC_WRITE = 0x40000000
FILE_SHARE_READ = 0x00000001
FILE_SHARE_WRITE = 0x00000002
FILE_SHARE_WRITE = 0x00000002
CONSOLE_TEXTMODE_BUFFER = 0x00000001
def Console::AllocConsole
@@ -76,7 +76,7 @@ module Console
echo "Debug Output:\n"
echo "-------------------------------\n\n"
SetConsoleActiveScreenBuffer(@bufferHandle)
end
end
def self.readInput
length=20
@@ -113,7 +113,7 @@ module Console
def self.readInput2
buffer=0.chr
done=false
input=""
input=""
eventsread=0.chr*4
while !done
if ReadConsole(buffer)==0
@@ -155,4 +155,4 @@ module Kernel
echo(string)
echo("\r\n")
end
end
end

View File

@@ -665,7 +665,7 @@ class Bitmap
SwapRgb = Win32API.new('./rubyscreen.dll', 'SwapRgb', 'pi', '') rescue nil
def setData(x)
RtlMoveMemory_ip.call(self.address, x, x.length)
RtlMoveMemory_ip.call(self.address, x, x.length)
end
def getData
@@ -677,7 +677,7 @@ class Bitmap
def swap32(x)
return ((x>>24)&0x000000FF)|
((x>>8)&0x0000FF00)|
((x<<8)&0x00FF0000)|
((x<<8)&0x00FF0000)|
((x<<24)&0xFF000000)
end
@@ -716,7 +716,7 @@ class Bitmap
b=0;c=2;while b!=len
data2[b]=data[c]
data2[c]=data[b]
b+=4;c+=4;
b+=4;c+=4;
end
end
#$times.push(Time.now-ttt)
@@ -754,4 +754,4 @@ class Bitmap
end
return @address
end
end
end

View File

@@ -340,7 +340,7 @@ module PluginManager
return if !installed?(plugin_name)
return @@Plugins[plugin_name][:link]
end
# Returns the credits of the specified plugin.
def self.credits(plugin_name)
return if !installed?(plugin_name)
@@ -373,4 +373,4 @@ module PluginManager
end
return 0
end
end
end

View File

@@ -33,4 +33,4 @@ class Game_Switches
@data[switch_id] = value
end
end
end
end

View File

@@ -33,4 +33,4 @@ class Game_Variables
@data[variable_id] = value
end
end
end
end

View File

@@ -13,7 +13,7 @@ class Game_SelfSwitches
@data = {}
end
#-----------------------------------------------------------------------------
# * Get Self Switch
# * Get Self Switch
# key : key
#-----------------------------------------------------------------------------
def [](key)
@@ -27,4 +27,4 @@ class Game_SelfSwitches
def []=(key, value)
@data[key] = value
end
end
end

View File

@@ -153,4 +153,4 @@ class Game_Screen
end
end
end
end
end

View File

@@ -2,7 +2,7 @@
# ** Game_System
#------------------------------------------------------------------------------
# This class handles data surrounding the system. Backround music, etc.
# is managed here as well. Refer to "$game_system" for the instance of
# is managed here as well. Refer to "$game_system" for the instance of
# this class.
#==============================================================================
@@ -47,7 +47,7 @@ class Game_System
################################################################################
def bgm_play(bgm)
def bgm_play(bgm)
bgm_play_internal(bgm,0)
end
@@ -226,7 +226,7 @@ class Game_System
end
def getPlayingBGS
return (@playing_bgs) ? @playing_bgs.clone : nil
return (@playing_bgs) ? @playing_bgs.clone : nil
end
################################################################################
@@ -286,4 +286,4 @@ class Game_System
event.start
end
end
end
end

View File

@@ -153,4 +153,4 @@ class Game_Picture
@angle %= 360
end
end
end
end

View File

@@ -78,4 +78,4 @@ class Game_CommonEvent
@interpreter.update
end
end
end
end

View File

@@ -866,4 +866,4 @@ class Game_Character
@pattern = (@pattern + 1) % 4
@anime_count -= frames_per_pattern
end
end
end

View File

@@ -244,4 +244,4 @@ class Game_Event < Game_Character
@interpreter.update
end
end
end
end

View File

@@ -55,7 +55,7 @@ class Game_Player < Game_Character
end
def pbHasDependentEvents?
return $PokemonGlobal.dependentEvents.length>0
return $PokemonGlobal.dependentEvents.length>0
end
def bump_into_object
@@ -486,7 +486,7 @@ def pbCanUseBike?(mapid)
return true if pbGetMetadata(mapid,MetadataBicycleAlways)
val = pbGetMetadata(mapid,MetadataBicycle)
val = pbGetMetadata(mapid,MetadataOutdoor) if val==nil
return (val) ? true : false
return (val) ? true : false
end
def pbMountBike
@@ -502,4 +502,4 @@ def pbDismountBike
$PokemonGlobal.bicycle = false
pbUpdateVehicle
$game_map.autoplayAsCue
end
end

View File

@@ -100,4 +100,4 @@ class Game_Character
update_old2
end
end
=end
=end

View File

@@ -435,4 +435,4 @@ class Game_Map
@fog_opacity_duration -= 1
end
end
end
end

View File

@@ -12,61 +12,61 @@
normal event command requires a direction and number of tiles to scroll,
Map Autoscroll scrolls the map to center on the tile whose x and y
coordinates are given.
FEATURES
- automatic map scrolling to given x,y coordinate (or player)
- destination is fixed, so it's possible to scroll to same place even if
origin is variable (e.g. moving NPC)
- variable speed (just like "Scroll Map" event command)
- diagonal scrolling supported
- diagonal scrolling supported
SETUP
Instead of a "Scroll Map" event command, use the "Call Script" command
and enter on the following on the first line:
autoscroll(x,y)
(replacing "x" and "y" with the x and y coordinates of the tile to scroll to)
To specify a scroll speed other than the default (4), use:
autoscroll(x,y,speed)
(now also replacing "speed" with the scroll speed from 1-6)
Diagonal scrolling happens automatically when the destination is diagonal
relative to the starting point (i.e., not directly up, down, left or right).
To scroll to the player, instead use the following:
autoscroll_player(speed)
autoscroll_player(speed)
Note: because of how the interpreter and the "Call Script" event command
are setup, the call to autoscroll(...) can only be on the first line of
the "Call Script" event command (and not flowing down to subsequent lines).
For example, the following call may not work as expected:
autoscroll($game_variables[1],
$game_variables[2])
(since the long argument names require dropping down to a second line)
A work-around is to setup new variables with shorter names in a preceding
(separate) "Call Script" event command:
@x = $game_variables[1]
@y = $game_variables[2]
and then use those as arguments:
autoscroll(@x,@y)
The renaming must be in a separate "Call Script" because otherwise
the call to autoscroll(...) isn't on the first line.
Originally requested by militantmilo80:
http://www.rmxp.net/forums/index.php?showtopic=29519
http://www.rmxp.net/forums/index.php?showtopic=29519
=end
class Interpreter
@@ -154,9 +154,9 @@ class Game_Map
end
def scroll_downleft(distance)
@display_x = [@display_x - distance, 0].max
@display_x = [@display_x - distance, 0].max
@display_y = [@display_y + distance,
(self.height - Graphics.height*1.0/TILE_HEIGHT) * REAL_RES_Y].min
(self.height - Graphics.height*1.0/TILE_HEIGHT) * REAL_RES_Y].min
end
def scroll_upright(distance)
@@ -185,10 +185,10 @@ class Game_Map
when 6; scroll_right(distance)
when 7; scroll_upleft(distance)
when 8; scroll_up(distance)
when 9; scroll_upright(distance)
when 9; scroll_upright(distance)
end
# Subtract distance scrolled
@scroll_rest -= distance
end
end
end
end
end

View File

@@ -169,7 +169,7 @@ class PokemonMapFactory
return false if !map.valid?(x,y)
return true if thisEvent.through
if thisEvent==$game_player
return false unless ($DEBUG && Input.press?(Input::CTRL)) ||
return false unless ($DEBUG && Input.press?(Input::CTRL)) ||
map.passable?(x,y,0,thisEvent)
else
return false unless map.passable?(x,y,0,thisEvent)
@@ -269,7 +269,7 @@ class PokemonMapFactory
def getThisAndOtherPosRelativePos(thisEvent,otherMapID,otherX,otherY)
return [0,0] if !thisEvent
return getRelativePos(
thisEvent.map.map_id,thisEvent.x,thisEvent.y,otherMapID,otherX,otherY)
thisEvent.map.map_id,thisEvent.x,thisEvent.y,otherMapID,otherX,otherY)
end
def getOffsetEventPos(event,xOffset,yOffset)
@@ -363,7 +363,7 @@ class PokemonMapFactory
for i in 0...@maps.length
next if MapFactoryHelper.mapInRange?(@maps[i])
@maps[i] = nil
deleted = true
deleted = true
end
if deleted
@maps.compact!
@@ -485,4 +485,4 @@ def updateTilesets
for map in maps
map.updateTileset if map
end
end
end

View File

@@ -55,4 +55,4 @@ class Sprite_Picture
@sprite.angle = @picture.angle
@sprite.tone = @picture.tone
end
end
end

View File

@@ -41,4 +41,4 @@ class Sprite_Timer
@timer.visible=false if @timer
end
end
end
end

View File

@@ -33,10 +33,10 @@ class BushBitmap
for i in 0...4
y = i*charheight
if cy>=0
ret.blt(0,y,bitmap,Rect.new(0,y,ret.width,cy))
ret.blt(0,y,bitmap,Rect.new(0,y,ret.width,cy))
ret.blt(0,y+cy,bitmap,Rect.new(0,y+cy,ret.width,2),170)
end
ret.blt(0,y+cy+2,bitmap,Rect.new(0,y+cy+2,ret.width,2),85) if cy+2>=0
ret.blt(0,y+cy+2,bitmap,Rect.new(0,y+cy+2,ret.width,2),85) if cy+2>=0
end
return ret
end
@@ -47,10 +47,10 @@ class BushBitmap
cy = charheight-depth-2
y = charheight
if cy>=0
ret.blt(0,y,bitmap,Rect.new(0,y,ret.width,cy))
ret.blt(0,y,bitmap,Rect.new(0,y,ret.width,cy))
ret.blt(0,y+cy,bitmap,Rect.new(0,y+cy,ret.width,2),170)
end
ret.blt(0,y+cy+2,bitmap,Rect.new(0,y+cy+2,ret.width,2),85) if cy+2>=0
ret.blt(0,y+cy+2,bitmap,Rect.new(0,y+cy+2,ret.width,2),85) if cy+2>=0
return ret
end
end
@@ -171,4 +171,4 @@ class Sprite_Character < RPG::Sprite
@reflection.update if @reflection
@surfbase.update if @surfbase
end
end
end

View File

@@ -40,7 +40,7 @@ class Sprite_Reflection
return if disposed?
shouldShow = @rsprite.visible
if !shouldShow
# Just-in-time disposal of sprite
# Just-in-time disposal of sprite
if @sprite
@sprite.dispose
@sprite = nil
@@ -87,4 +87,4 @@ class Sprite_Reflection
@sprite.src_rect = @rsprite.src_rect
end
end
end
end

View File

@@ -38,7 +38,7 @@ class Sprite_SurfBase
def update
return if disposed?
if !$PokemonGlobal.surfing && !$PokemonGlobal.diving
# Just-in-time disposal of sprite
# Just-in-time disposal of sprite
if @sprite
@sprite.dispose
@sprite = nil
@@ -74,4 +74,4 @@ class Sprite_SurfBase
@sprite.opacity = @rsprite.opacity
end
end
end
end

View File

@@ -164,4 +164,4 @@ class Spriteset_Map
@@viewport1.update
@@viewport3.update
end
end
end

View File

@@ -31,4 +31,4 @@ class Spriteset_Global
end
@timer_sprite.update
end
end
end

View File

@@ -91,4 +91,4 @@ class Spriteset_Map
@usersprites[i].update if !@usersprites[i].disposed?
end
end
end
end

View File

@@ -8,7 +8,7 @@ SHADOW_WARN = true
class Sprite_Shadow < RPG::Sprite
attr_accessor :character
def initialize(viewport, character = nil,params=[])
super(viewport)
@source = params[0]
@@ -104,7 +104,7 @@ class Sprite_Shadow < RPG::Sprite
if (@angle_trigo < @anglemin and @angle_trigo > @anglemax) and @anglemin > @anglemax
self.opacity = 0
return
end
end
end
end
@@ -179,7 +179,7 @@ end
#===================================================
class Spriteset_Map
attr_accessor :shadows
alias shadow_initialize initialize
def initialize(map=nil)
@shadows = []
@@ -201,7 +201,7 @@ class Spriteset_Map
sprite.setShadows(map, @shadows)
end
$scene.spritesetGlobal.playersprite.setShadows(map, @shadows)
end
end
end
@@ -252,4 +252,4 @@ def XPML_read(map,markup,event,max_param_number=0)
end
end
return parameter_list
end
end

View File

@@ -33,12 +33,12 @@ class Particle_Engine
return if disposed?
for particle in @effect
next if particle.nil?
particle.dispose
particle.dispose
end
@effect.clear
@map = nil
@disposed = true
end
end
def disposed?
return @disposed
@@ -64,7 +64,7 @@ class Particle_Engine
cls = @effects[type]
if cls.nil?
particle.dispose if particle
return nil
return nil
end
if !particle || !particle.is_a?(cls)
particle.dispose if particle
@@ -94,7 +94,7 @@ class Particle_Engine
particle = realloc_effect(event,particle)
@effect[i] = particle
end
particle.update if particle
particle.update if particle
end
end
end
@@ -208,7 +208,7 @@ class ParticleEffect_Event < ParticleEffect
@opacity = []
@startingx = self.x + @xoffset
@startingy = self.y + @yoffset
@screen_x = self.x
@screen_x = self.x
@screen_y = self.y
@real_x = @event.real_x
@real_y = @event.real_y
@@ -299,7 +299,7 @@ class ParticleEffect_Event < ParticleEffect
@particles[i].x = @startingx + @xoffset
@particlex[i] = 0.0
@particley[i] = 0.0
end
end
if @fade == 0
if @opacity[i] <= 0
@opacity[i] = @originalopacity
@@ -307,7 +307,7 @@ class ParticleEffect_Event < ParticleEffect
@particles[i].x = @startingx + @xoffset
@particlex[i] = 0.0
@particley[i] = 0.0
end
end
else
if @opacity[i] <= 0
@opacity[i] = 250
@@ -315,7 +315,7 @@ class ParticleEffect_Event < ParticleEffect
@particles[i].x = @startingx + @xoffset
@particlex[i] = 0.0
@particley[i] = 0.0
end
end
end
calcParticlePos(i)
if @randomhue == 1
@@ -349,7 +349,7 @@ class ParticleEffect_Event < ParticleEffect
def dispose
for particle in @particles
particle.dispose
particle.dispose
end
for bitmap in @bitmaps.values
bitmap.dispose
@@ -558,7 +558,7 @@ class Particle_Engine::Splash < ParticleEffect_Event
super
for i in 0...@maxparticless
@particles[i].opacity = 50
@particles[i].update
@particles[i].update
end
end
end
@@ -574,7 +574,7 @@ class Game_Event < Game_Character
begin
nf_particles_game_map_initialize(map_id, event, map)
rescue ArgumentError
nf_particles_game_map_initialize(map_id, event)
nf_particles_game_map_initialize(map_id, event)
end
end
@@ -583,4 +583,4 @@ class Game_Event < Game_Character
nf_particles_game_map_refresh
@pe_refresh = true
end
end
end

View File

@@ -17,7 +17,7 @@ end
def passable?(passages,tile_id)
return false if tile_id == nil
passage = passages[tile_id]
return (passage && passage<15)
return (passage && passage<15)
end
def getPassabilityMinimap(mapid)
@@ -222,7 +222,7 @@ class Draw_Tilemap # This class controls a set of sprites, with
end
if @flash_data
@sprites.push([])
@contentstrips.push([])
@contentstrips.push([])
end
end
@@ -444,4 +444,4 @@ class Sprite_Character
self.z=ScreenPosHelper.pbScreenZ(@character,@ch)
end
end
end
end

View File

@@ -1,5 +1,5 @@
#===============================================================================
#
#
#===============================================================================
class SynchronizedTilemapAutotilesInternal
def initialize(oldat)
@@ -115,4 +115,4 @@ class SynchronizedTilemap < Tilemap
@autotiles.sync
super
end
end
end

View File

@@ -67,4 +67,4 @@ class TilemapLoader
def ox=(v); @tilemap.ox = v; end
def oy; @tilemap.oy; end
def oy=(v); @tilemap.oy = v; end
end
end

View File

@@ -16,7 +16,7 @@ class TileDrawingHelper
[ [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
NeighborsToTiles = [
46, 44, 46, 44, 43, 41, 43, 40, 46, 44, 46, 44, 43, 41, 43, 40,
@@ -98,7 +98,7 @@ class TileDrawingHelper
for i in 0...4
tile_position = tiles[i] - 1
src.set(tile_position % 6 * 16 + anim, tile_position / 6 * 16, 16, 16)
bitmap.stretch_blt(Rect.new(i % 2 * cxTile + x, i / 2 * cyTile + y, cxTile, cyTile),
bitmap.stretch_blt(Rect.new(i % 2 * cxTile + x, i / 2 * cyTile + y, cxTile, cyTile),
autotile, src)
end
end
@@ -115,7 +115,7 @@ class TileDrawingHelper
bltSmallRegularTile(bitmap, x, y, cxTile, cyTile, id)
elsif id > 0
bltSmallAutotile(bitmap, x, y, cxTile, cyTile, id, frame)
end
end
end
def bltAutotile(bitmap,x,y,id,frame)
@@ -131,6 +131,6 @@ class TileDrawingHelper
bltRegularTile(bitmap, x, y, id)
elsif id > 0
bltAutotile(bitmap, x, y, id, frame)
end
end
end
end
end

View File

@@ -1466,4 +1466,4 @@ class Interpreter
result = pbExecuteScript(script)
return true
end
end
end

View File

@@ -52,7 +52,7 @@ class Event
end
end
end
# Triggers the event and calls all its event handlers. Normally called only
# by the code where the event occurred. The first argument is the sender of
# the event, the other arguments are the event's parameters.
@@ -169,4 +169,4 @@ class MoveHandlerHash < HandlerHash
def initialize
super(:PBMoves)
end
end
end

View File

@@ -160,4 +160,4 @@ end
class StringOutput
include FileOutputMixin
end
end

View File

@@ -52,7 +52,7 @@ def pbSetTextMessages
lastitem.gsub!(/([^\.\!\?])\s\s+/) { |m| $1+" " }
items.push(lastitem)
lastitem=""
end
end
neednewline=false
end
if list.code == 101
@@ -84,7 +84,7 @@ def pbSetTextMessages
if lastitem!=""
items.push(lastitem)
lastitem=""
end
end
end
end
end
@@ -128,7 +128,7 @@ def pbSetTextMessages
lastitem.gsub!(/([^\.\!\?])\s\s+/) { |m| $1+" " }
items.push(lastitem)
lastitem=""
end
end
neednewline=false
end
if list.code == 101
@@ -160,7 +160,7 @@ def pbSetTextMessages
if lastitem!=""
items.push(lastitem)
lastitem=""
end
end
end
end
end
@@ -196,7 +196,7 @@ def pbEachIntlSection(file)
if !line[/^\#/] && !line[/^\s*$/]
if line[re]
if havesection
yield lastsection,sectionname
yield lastsection,sectionname
end
lastsection.clear
sectionname=$~[1]
@@ -214,13 +214,13 @@ def pbEachIntlSection(file)
end
}
if havesection
yield lastsection,sectionname
yield lastsection,sectionname
end
end
def pbGetText(infile)
begin
file=File.open(infile,"rb")
file=File.open(infile,"rb")
rescue
raise _INTL("Can't find {1}",infile)
end
@@ -773,4 +773,4 @@ def _MAPISPRINTF(mapid,*arg)
}
end
return string
end
end

View File

@@ -20,7 +20,7 @@ module PBDebug
if $DEBUG && $INTERNAL && @@log.length>0
File.open("Data/debuglog.txt", "a+b") { |f| f.write("#{@@log}") }
end
@@log.clear
@@log.clear
end
def self.log(msg)
@@ -37,4 +37,4 @@ module PBDebug
File.open("Data/dumplog.txt", "a+b") { |f| f.write("#{msg}\r\n") }
end
end
end
end

View File

@@ -144,7 +144,7 @@ module AudioState
def self.pitch; @pitch; end
def self.volume; @volume; end
def self.waitingBGM=(value);
def self.waitingBGM=(value);
Thread.exclusive { @waitingBGM=value; }
end
@@ -245,7 +245,7 @@ def Audio_me_fade(ms)
end
def Audio_me_stop()
AudioState::AudioContextStop.call(AudioState.meContext)
AudioState::AudioContextStop.call(AudioState.meContext)
end
def Audio_bgs_play(name, volume, pitch, position = 0)
@@ -264,7 +264,7 @@ def Audio_bgs_fade(ms)
end
def Audio_bgs_stop()
AudioState::AudioContextStop.call(AudioState.bgsContext)
AudioState::AudioContextStop.call(AudioState.bgsContext)
end
def Audio_se_play(name, volume, pitch, position = 0)
@@ -279,7 +279,7 @@ def Audio_se_play(name, volume, pitch, position = 0)
end
def Audio_se_stop()
AudioState::AudioContextStop.call(AudioState.seContext)
AudioState::AudioContextStop.call(AudioState.seContext)
end

View File

@@ -13,7 +13,7 @@ def pbStringToAudioFile(str)
end
end
# Converts an object to an audio file.
# Converts an object to an audio file.
# str -- Either a string showing the filename or an RPG::AudioFile object.
# Possible formats for _str_:
# filename volume and pitch 100
@@ -41,7 +41,7 @@ end
################################################################################
# Plays a BGM file.
# param -- Either a string showing the filename
# param -- Either a string showing the filename
# (relative to Audio/BGM/) or an RPG::AudioFile object.
# Possible formats for _param_:
# filename volume and pitch 100
@@ -91,7 +91,7 @@ end
################################################################################
# Plays an ME file.
# param -- Either a string showing the filename
# param -- Either a string showing the filename
# (relative to Audio/ME/) or an RPG::AudioFile object.
# Possible formats for _param_:
# filename volume and pitch 100
@@ -140,7 +140,7 @@ end
################################################################################
# Plays a BGS file.
# param -- Either a string showing the filename
# param -- Either a string showing the filename
# (relative to Audio/BGS/) or an RPG::AudioFile object.
# Possible formats for _param_:
# filename volume and pitch 100
@@ -189,7 +189,7 @@ end
################################################################################
# Plays an SE file.
# param -- Either a string showing the filename
# param -- Either a string showing the filename
# (relative to Audio/SE/) or an RPG::AudioFile object.
# Possible formats for _param_:
# filename volume and pitch 100
@@ -289,4 +289,4 @@ def pbPlayCloseMenuSE
if FileTest.audio_exist?("Audio/SE/GUI menu close")
pbSEPlay("GUI menu close",80)
end
end
end

View File

@@ -17,7 +17,7 @@ Parameters:
freq - the frequency of the sound in Hz. The higher the frequency,
the higher the pitch. If 0, no sound will be generated.
The module Audio::Note contains useful frequencies for tones.
freq can also be a SoundEnvelope or an array of two element arrays,
freq can also be a SoundEnvelope or an array of two element arrays,
as follows:
freq[0] - time in ms to apply the specified frequency
freq[1] - frequency to apply. In between, values will be interpolated
@@ -26,7 +26,7 @@ Parameters:
async - specifies whether the function will return immediately
without waiting for the sound to finish (stands for asynchronous)
timbre - specifies the timbre of the tone; from 0.0 through 1.0
timbre can also be a SoundEnvelope or an array of two element arrays,
timbre can also be a SoundEnvelope or an array of two element arrays,
as follows:
volume[0] - time in ms to apply the specified timbre
volume[1] - timbre to apply. In between, values will be interpolated
@@ -206,7 +206,7 @@ class NoteEnvelope
def sweeping(duration,sweepDuration)
return self if duration<=0
return steady(duration) if sweepDuration<=0
@envelope.changeDiscrete(0,@maxPoint)
@envelope.changeDiscrete(0,@maxPoint)
falling=true
while duration>0
dur=duration>sweepDuration ? sweepDuration : duration
@@ -368,13 +368,13 @@ class SoundEnvelope; include Enumerable
# duration - duration of the sound
# attack - attack time (in ms), or time between the start of the sound
# and the time where the sound reaches its maximum volume.
# If this value is less than 0, the sound will decay from silence to
# If this value is less than 0, the sound will decay from silence to
# the sustain volume instead (see below).
# decay - decay time (in ms), or time after the attack phase until
# the time where the sound reaches its sustain volume
# sustain - sustain volume, or normal volume of sound (0-100)
# release - release time (in ms), or amount of time to fade out the
# sound when it reaches its end. The sound's duration includes its
# release - release time (in ms), or amount of time to fade out the
# sound when it reaches its end. The sound's duration includes its
# release time.
def self.attackDecayRelease(duration,attack,decay,sustain,release)
env=self.new
@@ -396,7 +396,7 @@ class SoundEnvelope; include Enumerable
return self.new.addValueChanges(
value,onDuration,0,offDuration).repeat(totalDuration)
end
def change(delta,volume)
return self if delta<0
velength=@e.length
@@ -528,7 +528,7 @@ class SoundEnvelopeIterator# :nodoc:
def getValue(frame)
value=0
if @envIndex==@env.length
value=@env[@envIndex-1][1]
value=@env[@envIndex-1][1]
elsif @envIndex==0
value=@env[@envIndex][1]
else
@@ -539,7 +539,7 @@ class SoundEnvelopeIterator# :nodoc:
thisVolume=@env[@envIndex][1]
value=(thisVolume-lastVolume)*(frame-lastPos)/(thisPos-lastPos)+lastVolume
else
value=@env[@envIndex][1]
value=@env[@envIndex][1]
end
end
while @envIndex+1<=@env.length && @env[@envIndex][0]==frame.to_i
@@ -652,7 +652,7 @@ class WaveForm# :nodoc:
@exactCounter+=@step
while @exactCounter>1.0; @exactCounter-=1.0; end
end
def mixSamples(other)
for i in 0...other.sampleCount
newSamp=((@samples[i]-0x80)+(other.samples[i]-0x80))/2+0x80
@@ -806,7 +806,7 @@ module Audio
timbre1,timbre2,@@sineProc2,@@sineProc2,async)
end
@@noiseProc2 = proc { |i,timbre|
@@noiseProc2 = proc { |i,timbre|
n = (rand(256)/255.0)*0.1
next (rand(2)==0) ? 1-n : -1+n
}
@@ -1293,7 +1293,7 @@ end
###############################
begin
MciSendString = Win32API.new('winmm','mciSendString','%w(p,p,l,l)','l')
MciSendString = Win32API.new('winmm','mciSendString','%w(p,p,l,l)','l')
MciErrorString = Win32API.new('winmm','mciGetErrorString','%w(l,p,l)','l')
rescue
MciSendString = nil
@@ -1347,4 +1347,4 @@ def endRecord(file)
MciSendString.call("close RECORDER",0,0,0)
end
#Audio.sine(140,SoundEnvelope.initial(6400).change(140,11400),50)
#Audio.sine(140,SoundEnvelope.initial(6400).change(140,11400),50)

View File

@@ -179,12 +179,12 @@ module RTP
# Gets the absolute RGSS paths for the given file name
def self.eachPathFor(filename)
return if !filename
if filename[/^[A-Za-z]\:[\/\\]/] || filename[/^[\/\\]/]
if filename[/^[A-Za-z]\:[\/\\]/] || filename[/^[\/\\]/]
# filename is already absolute
yield filename
else
# relative path
RTP.eachPath { |path|
RTP.eachPath { |path|
if path=="./"
yield filename
else
@@ -423,7 +423,7 @@ end
#===============================================================================
#
#
#===============================================================================
module MiniRegistry
HKEY_CLASSES_ROOT = 0x80000000
@@ -455,7 +455,7 @@ module MiniRegistry
def self.close(hkey); check(RegCloseKey.call(hkey)) if hkey; end
def self.get(hkey,subkey,name,defaultValue=nil,bit64=false)
self.open(hkey,subkey,bit64) { |key|
self.open(hkey,subkey,bit64) { |key|
return self.read(key,name) rescue defaultValue
}
return defaultValue
@@ -654,4 +654,4 @@ module ::Marshal
end
end
end
end
end

View File

@@ -22,7 +22,7 @@ def canonicalize(c)
if x=="."
elsif x==".."
if pos>=0
ret.delete_at(pos)
ret.delete_at(pos)
pos -= 1
end
else
@@ -141,7 +141,7 @@ class WeakHashtable
def [](key)
o=@hash[key]
return o if !o
if o.weakref_alive?
if o.weakref_alive?
o=o.__getobj__
else
@hash.delete(key)
@@ -494,4 +494,4 @@ module BitmapCache
@cache = {}
GC.start
end
end
end

View File

@@ -414,7 +414,7 @@ class Window
@sprites["cursor"].visible=false
end
for i in @sprites
i[1].z=@z
i[1].z=@z
end
if @rpgvx
@sprites["cursor"].z=@z # For Compatibility
@@ -526,23 +526,23 @@ class Window
@cursorbitmap.clear
@sprites["cursor"].bitmap=@cursorbitmap
@sprites["cursor"].src_rect.set(0,0,width,height)
rect = Rect.new(margin,margin,
rect = Rect.new(margin,margin,
width - fullmargin, height - fullmargin)
@cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[8])
@cursorbitmap.blt(0, 0, @_windowskin, cursorrects[4])# top left
@cursorbitmap.blt(width-margin, 0, @_windowskin, cursorrects[5]) # top right
@cursorbitmap.blt(0, height-margin, @_windowskin, cursorrects[6]) # bottom right
@cursorbitmap.blt(width-margin, height-margin, @_windowskin, cursorrects[7]) # bottom left
rect = Rect.new(margin, 0,
rect = Rect.new(margin, 0,
width - fullmargin, margin)
@cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[0])
rect = Rect.new(0, margin,
rect = Rect.new(0, margin,
margin, height - fullmargin)
@cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[1])
rect = Rect.new(width - margin, margin,
rect = Rect.new(width - margin, margin,
margin, height - fullmargin)
@cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[2])
rect = Rect.new(margin, height-margin,
rect = Rect.new(margin, height-margin,
width - fullmargin, margin)
@cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[3])
else
@@ -605,4 +605,4 @@ class Window
sprite.oy=(sprite.zoom_y<=0) ? 0 : (i-y)/sprite.zoom_y
end
end
end
end

View File

@@ -208,7 +208,7 @@ def pbRepositionMessageWindow(msgwindow, linecount=2)
case $game_message.background
when 1; msgwindow.opacity=0 # dim
when 2; msgwindow.opacity=0 # transparent
end
end
end
end
@@ -218,7 +218,7 @@ def pbUpdateMsgWindowPos(msgwindow,event,eventChanged=false)
if eventChanged
msgwindow.resizeToFit2(msgwindow.text,Graphics.width*2/3,msgwindow.height)
end
msgwindow.y=event.screen_y-48-msgwindow.height
msgwindow.y=event.screen_y-48-msgwindow.height
if msgwindow.y<0
msgwindow.y=event.screen_y+24
end
@@ -231,7 +231,7 @@ def pbUpdateMsgWindowPos(msgwindow,event,eventChanged=false)
curwidth=msgwindow.width
if curwidth!=Graphics.width
msgwindow.width=Graphics.width
msgwindow.width=Graphics.width
msgwindow.width=Graphics.width
end
end
end
@@ -467,7 +467,7 @@ end
def pbUpdateSpriteHash(windows)
for i in windows
window=i[1]
if window
if window
if window.is_a?(Sprite) || window.is_a?(Window)
window.update if !pbDisposed?(window)
elsif window.is_a?(Plane)
@@ -636,7 +636,7 @@ def pbFadeInAndShow(sprites,visiblesprites=nil)
for j in 0..numFrames
pbSetSpritesToColor(sprites,Color.new(0,0,0,((numFrames-j)*alphaDiff)))
(block_given?) ? yield : pbUpdateSpriteHash(sprites)
end
end
}
end
@@ -754,7 +754,7 @@ if !defined?(_INTL)
for i in 1...args.length
string.gsub!(/\{#{i}\}/,"#{args[i]}")
end
return string
return string
end
end
@@ -776,6 +776,6 @@ if !defined?(_MAPINTL)
for i in 2...args.length
string.gsub!(/\{#{i}\}/,"#{args[i+1]}")
end
return string
return string
end
end
end

View File

@@ -1,5 +1,5 @@
#===============================================================================
#
#
#===============================================================================
class SpriteWindowCursorRect < Rect
def initialize(window)
@@ -95,7 +95,7 @@ class SpriteWindow < Window
# Flags used to preserve compatibility
# with RGSS/RGSS2's version of Window
module CompatBits
module CompatBits
CorrectZ = 1
ExpandBack = 2
ShowScrollArrows = 4
@@ -437,7 +437,7 @@ class SpriteWindow < Window
def skinformat=(value)
if @skinformat!=value
@skinformat=value
@skinformat=value
privRefresh(true)
end
end
@@ -573,9 +573,9 @@ class SpriteWindow < Window
hascontents=(@contents && !@contents.disposed?)
@sprites["back"].visible=@visible
@sprites["contents"].visible=@visible && @openness==255
@sprites["pause"].visible=supported && @visible && @pause &&
@sprites["pause"].visible=supported && @visible && @pause &&
(@combat & CompatBits::ShowPause)
@sprites["cursor"].visible=supported && @visible && @openness==255 &&
@sprites["cursor"].visible=supported && @visible && @openness==255 &&
(@combat & CompatBits::ShowCursor)
@sprites["scroll0"].visible = false
@sprites["scroll1"].visible = false
@@ -698,7 +698,7 @@ class SpriteWindow < Window
@sprites["contents"].y=@y+trimStartY
if (@compat & CompatBits::ShowScrollArrows)>0 && @skinformat==0
# Compatibility mode: Make scroll arrows visible
if @skinformat==0 && @_windowskin && !@_windowskin.disposed? &&
if @skinformat==0 && @_windowskin && !@_windowskin.disposed? &&
@contents && !@contents.disposed?
@sprites["scroll0"].visible = @visible && hascontents && @oy > 0
@sprites["scroll1"].visible = @visible && hascontents && @ox > 0
@@ -887,7 +887,7 @@ end
#===============================================================================
#
#
#===============================================================================
class SpriteWindow_Base < SpriteWindow
TEXTPADDING=4 # In pixels
@@ -970,7 +970,7 @@ class SpriteWindow_Base < SpriteWindow
@sysframe=AnimatedBitmap.new(@curframe)
@resolvedFrame=nil
__setWindowskin(@sysframe.bitmap)
__resolveSystemFrame()
__resolveSystemFrame()
end
begin
refresh
@@ -1000,7 +1000,7 @@ end
#===============================================================================
#
#
#===============================================================================
# Represents a window with no formatting capabilities. Its text color can be set,
# though, and line breaks are supported, but the text is generally unformatted.
@@ -1110,7 +1110,7 @@ end
#===============================================================================
#
#
#===============================================================================
class Window_AdvancedTextPokemon < SpriteWindow_Base
attr_reader :text
@@ -1386,7 +1386,7 @@ class Window_AdvancedTextPokemon < SpriteWindow_Base
return 0 if @lastDrawnChar<0
return @numtextchars if @lastDrawnChar>=@fmtchars.length
# index after the last character's index
return @fmtchars[@lastDrawnChar][14]+1
return @fmtchars[@lastDrawnChar][14]+1
end
def maxPosition
@@ -1590,7 +1590,7 @@ class Window_AdvancedTextPokemon < SpriteWindow_Base
refresh if !@frameskipChanged
updateInternal
# following line needed to allow "textspeed=-999" to work seamlessly
refresh if @frameskipChanged
refresh if @frameskipChanged
end
@frameskipChanged = false
end
@@ -1611,7 +1611,7 @@ end
#===============================================================================
#
#
#===============================================================================
class Window_InputNumberPokemon < SpriteWindow_Base
attr_reader :number
@@ -1724,7 +1724,7 @@ class Window_InputNumberPokemon < SpriteWindow_Base
self.contents.font.color=@shadowColor
pbDrawShadow(self.contents,x+(12-textwidth/2),y, textwidth+4, 32, text)
self.contents.font.color=@baseColor
self.contents.draw_text(x+(12-textwidth/2),y, textwidth+4, 32, text)
self.contents.draw_text(x+(12-textwidth/2),y, textwidth+4, 32, text)
if @index==i && @active && @frame/15==0
colors=getDefaultTextColors(self.windowskin)
self.contents.fill_rect(x+(12-textwidth/2),y+30,textwidth,2,colors[0])
@@ -1735,7 +1735,7 @@ end
#===============================================================================
#
#
#===============================================================================
class SpriteWindow_Selectable < SpriteWindow_Base
attr_reader :index
@@ -1942,7 +1942,7 @@ class SpriteWindow_Selectable < SpriteWindow_Base
# self.top_row = row - (self.page_row_max - 1)
# dorefresh=true
# end
# if oldindex-self.top_item>=((self.page_item_max - 1)/2)
# if oldindex-self.top_item>=((self.page_item_max - 1)/2)
# self.top_row+=1
# end
# self.top_row = [self.top_row, self.row_max - self.page_row_max].min
@@ -1966,7 +1966,7 @@ end
#===============================================================================
#
#
#===============================================================================
module UpDownArrowMixin
def initUpDownArrow
@@ -1997,7 +1997,7 @@ module UpDownArrowMixin
@uparrow.color = value
@downarrow.color = value
end
def adjustForZoom(sprite)
sprite.zoom_x = self.zoom_x
sprite.zoom_y = self.zoom_y
@@ -2029,7 +2029,7 @@ end
#===============================================================================
#
#
#===============================================================================
class SpriteWindow_SelectableEx < SpriteWindow_Selectable
include UpDownArrowMixin
@@ -2043,7 +2043,7 @@ end
#===============================================================================
#
#
#===============================================================================
class Window_DrawableCommand < SpriteWindow_SelectableEx
attr_reader :baseColor
@@ -2149,7 +2149,7 @@ end
#===============================================================================
#
#
#===============================================================================
class Window_CommandPokemon < Window_DrawableCommand
attr_reader :commands
@@ -2198,7 +2198,7 @@ class Window_CommandPokemon < Window_DrawableCommand
def commands=(value)
@commands=value
@item_max=commands.length
@item_max=commands.length
self.update_cursor_rect
self.refresh
end
@@ -2241,14 +2241,14 @@ end
#===============================================================================
#
#
#===============================================================================
class Window_CommandPokemonEx < Window_CommandPokemon
end
#===============================================================================
#
#
#===============================================================================
class Window_AdvancedCommandPokemon < Window_DrawableCommand
attr_reader :commands
@@ -2363,7 +2363,7 @@ end
#===============================================================================
#
#
#===============================================================================
class Window_AdvancedCommandPokemonEx < Window_AdvancedCommandPokemon
end
end

View File

@@ -58,7 +58,7 @@ end
class PngAnimatedBitmap
# Creates an animated bitmap from a PNG file.
# Creates an animated bitmap from a PNG file.
def initialize(file,hue=0)
@frames=[]
@currentFrame=0
@@ -91,9 +91,9 @@ class PngAnimatedBitmap
end
def width; self.bitmap.width; end
def height; self.bitmap.height; end
def deanimate
for i in 1...@frames.length
@frames[i].dispose
@@ -207,7 +207,7 @@ class GifBitmap
#File.open("debug.txt","ab") { |f| f.puts("rejecting bitmap") }
bitmap.dispose
bitmap=nil
end
end
if bitmap
#File.open("debug.txt","ab") { |f| f.puts("reusing bitmap") }
# Have a regular non-animated bitmap
@@ -348,7 +348,7 @@ end
def pbGetTileBitmap(filename, tile_id, hue)
return BitmapCache.tileEx(filename, tile_id, hue) { |f|
return BitmapCache.tileEx(filename, tile_id, hue) { |f|
AnimatedBitmap.new("Graphics/Tilesets/"+filename).deanimate;
}
end
@@ -482,7 +482,7 @@ end
#===============================================================================
#
#
#===============================================================================
class AnimatedSprite < SpriteWrapper
attr_reader :frame
@@ -597,7 +597,7 @@ class AnimatedSprite < SpriteWrapper
if @playing
@realframes+=1
if @realframes==@frameskip
@realframes=0
@realframes=0
self.frame+=1
self.frame%=self.framecount
end
@@ -838,7 +838,7 @@ class PictureWindow < SpriteWindow_Base
else
@_iconbitmap=AnimatedBitmap.new(pathOrBitmap,hue)
self.contents=@_iconbitmap ? @_iconbitmap.bitmap : nil
self.width=@_iconbitmap ? @_iconbitmap.bitmap.width+self.borderX :
self.width=@_iconbitmap ? @_iconbitmap.bitmap.width+self.borderX :
32+self.borderX
self.height=@_iconbitmap ? @_iconbitmap.bitmap.height+self.borderY :
32+self.borderY
@@ -854,7 +854,7 @@ end
#===============================================================================
#
#
#===============================================================================
class Plane
def update; end
@@ -900,14 +900,14 @@ class LargePlane < Plane
def ox; @__ox; end
def oy; @__oy; end
def ox=(value);
def ox=(value);
return if @__ox==value
@__ox = value
refresh
end
def oy=(value);
def oy=(value);
return if @__oy==value
@__oy = value
refresh
@@ -944,13 +944,13 @@ class LargePlane < Plane
def color; @__sprite.color; end
def tone; @__sprite.tone; end
def zoom_x=(v);
def zoom_x=(v);
return if @__sprite.zoom_x==v
@__sprite.zoom_x = v
refresh
end
def zoom_y=(v);
def zoom_y=(v);
return if @__sprite.zoom_y==v
@__sprite.zoom_y = v
refresh
@@ -1082,4 +1082,4 @@ class AnimatedPlane < LargePlane
return if file==nil
@bitmap=AnimatedBitmap.new(file,hue)
end
end
end

View File

@@ -837,13 +837,13 @@ def getFormattedText(bitmap,xDst,yDst,widthDst,heightDst,text,lineheight=32,
for i in 0...characters.length
c=characters[i]
if i>0 && (charactersInternal[i][0]!=lastalign ||
charactersInternal[i][1]!=lasty)
charactersInternal[i][1]!=lasty)
# Found end of run
widthblocks.push([runstart,i,lastalign,totalwidth,lasty])
runstart=i
totalwidth=0
end
lastalign=charactersInternal[i][0]
lastalign=charactersInternal[i][0]
lasty=charactersInternal[i][1]
extraspace=(charactersInternal[i][4]) ? charactersInternal[i][4] : 0
totalwidth+=c[3]-extraspace
@@ -1209,4 +1209,4 @@ def pbDrawImagePositions(bitmap,textpos)
bitmap.blt(x,y,srcbitmap.bitmap,srcrect)
srcbitmap.dispose
end
end
end

View File

@@ -29,7 +29,7 @@ class Game_Message
def visible
return @visible || false
end
def background
return @background || 0
end
@@ -48,7 +48,7 @@ end
#===============================================================================
#
#
#===============================================================================
class Scene_Map
def updatemini
@@ -96,7 +96,7 @@ class Scene_Battle
$game_screen.update
else
$game_map.screen.update
end
end
# If timer has reached 0
if $game_system.timer_working and $game_system.timer == 0
# Abort battle
@@ -158,7 +158,7 @@ end
#===============================================================================
#
#
#===============================================================================
def pbEventCommentInput(*args)
parameters = []
@@ -284,7 +284,7 @@ module InterpreterMixin
i = (newI>i) ? newI : i+1
else
return i
end
end
end
end
@@ -635,7 +635,7 @@ end
#===============================================================================
#
#
#===============================================================================
class ChooseNumberParams
def initialize
@@ -795,15 +795,15 @@ def pbChooseNumber(msgwindow,params)
end
cmdwindow.dispose
Input.update
return ret
return ret
end
#===============================================================================
#
#
#===============================================================================
class FaceWindowVX < SpriteWindow_Base
class FaceWindowVX < SpriteWindow_Base
def initialize(face)
super(0,0,128,128)
faceinfo=face.split(",")
@@ -841,7 +841,7 @@ end
#===============================================================================
#
#
#===============================================================================
def pbGetBasicMapNameFromId(id)
begin
@@ -877,7 +877,7 @@ def pbCsvField!(str)
end
end
str[0,fieldbytes]=""
if !str[/\A\s*,/] && !str[/\A\s*$/]
if !str[/\A\s*,/] && !str[/\A\s*$/]
raise _INTL("Invalid quoted field (in: {1})",ret)
end
str[0,str.length]=$~.post_match
@@ -915,7 +915,7 @@ def pbGetGoldString
if $data_system.respond_to?("words")
moneyString=_INTL("{1} {2}",$game_party.gold,$data_system.words.gold)
else
moneyString=_INTL("{1} {2}",$game_party.gold,Vocab.gold)
moneyString=_INTL("{1} {2}",$game_party.gold,Vocab.gold)
end
end
return moneyString
@@ -956,7 +956,7 @@ end
#===============================================================================
#
#
#===============================================================================
def pbCreateStatusWindow(viewport=nil)
msgwindow=Window_AdvancedTextPokemon.new("")
@@ -1026,7 +1026,7 @@ def pbMessageDisplay(msgwindow,message,letterbyletter=true,commandProc=nil)
text.gsub!(/\\\\/,"\5")
text.gsub!(/\\1/,"\1")
if $game_actors
text.gsub!(/\\n\[([1-8])\]/i) {
text.gsub!(/\\n\[([1-8])\]/i) {
m = $1.to_i
next $game_actors[m].name
}
@@ -1044,7 +1044,7 @@ def pbMessageDisplay(msgwindow,message,letterbyletter=true,commandProc=nil)
text.gsub!(/\\b/i,"<c3=3050C8,D0D0C8>")
text.gsub!(/\\r/i,"<c3=E00808,D0D0C8>")
isDarkSkin = isDarkWindowskin(msgwindow.windowskin)
text.gsub!(/\\[Cc]\[([0-9]+)\]/) {
text.gsub!(/\\[Cc]\[([0-9]+)\]/) {
m = $1.to_i
next getSkinColor(msgwindow.windowskin,m,isDarkSkin)
}
@@ -1054,9 +1054,9 @@ def pbMessageDisplay(msgwindow,message,letterbyletter=true,commandProc=nil)
end until text == last_text
begin
last_text = text.clone
text.gsub!(/\\l\[([0-9]+)\]/i) {
text.gsub!(/\\l\[([0-9]+)\]/i) {
linecount = [1,$1.to_i].max
next ""
next ""
}
end until text == last_text
colortag = ""
@@ -1428,4 +1428,4 @@ def pbMessageWaitForInput(msgwindow,frames,showPause=false)
yield if block_given?
end
msgwindow.stopPause if msgwindow && showPause
end
end

View File

@@ -1,5 +1,5 @@
#===============================================================================
#
#
#===============================================================================
class Window_CharacterEntry < Window_DrawableCommand
XSIZE=13
@@ -67,12 +67,12 @@ end
#===============================================================================
#
#
#===============================================================================
class CharacterEntryHelper
attr_reader :text
attr_reader :maxlength
attr_reader :passwordChar
attr_reader :passwordChar
attr_accessor :cursor
def initialize(text)
@@ -163,7 +163,7 @@ end
#===============================================================================
#
#
#===============================================================================
class Window_TextEntry < SpriteWindow_Base
def initialize(text,x,y,width,height,heading=nil,usedarkercolor=false)
@@ -205,7 +205,7 @@ class Window_TextEntry < SpriteWindow_Base
end
def maxlength=(value)
@helper.maxlength=value
@helper.maxlength=value
self.refresh
end
@@ -281,7 +281,7 @@ class Window_TextEntry < SpriteWindow_Base
for i in startpos...scanlength
c=(@helper.passwordChar!="") ? @helper.passwordChar : textscan[i]
textwidth=bitmap.text_size(c).width
next if c=="\n"
next if c=="\n"
# Draw text
pbDrawShadowText(bitmap,x,y, textwidth+4, 32, c,@baseColor,@shadowColor)
# Draw cursor if necessary
@@ -300,7 +300,7 @@ end
#===============================================================================
#
#
#===============================================================================
def getLineBrokenText(bitmap,value,width,dims)
x=0
@@ -367,7 +367,7 @@ end
#===============================================================================
#
#
#===============================================================================
class Window_MultilineTextEntry < SpriteWindow_Base
def initialize(text,x,y,width,height)
@@ -412,7 +412,7 @@ class Window_MultilineTextEntry < SpriteWindow_Base
end
def maxlength=(value)
@helper.maxlength=value
@helper.maxlength=value
@textchars=nil
self.refresh
end
@@ -728,7 +728,7 @@ class Window_MultilineTextEntry < SpriteWindow_Base
thispos=textchars[i][6]
thiscolumn=textchars[i][7]
thislength=textchars[i][8]
if thisline==@cursorLine && @cursorColumn>=thiscolumn &&
if thisline==@cursorLine && @cursorColumn>=thiscolumn &&
@cursorColumn<=thiscolumn+thislength
cursorY=textchars[i][2]-startY
cursorX=textchars[i][1]
@@ -751,7 +751,7 @@ end
#===============================================================================
#
#
#===============================================================================
class Window_TextEntry_Keyboard < Window_TextEntry
def update
@@ -1021,14 +1021,14 @@ class PokemonEntryScene
@sprites["entry2"].setOtherCharset(@@Characters[@symtype][1])
else # Insert given character
if @sprites["entry"].insert(@sprites["entry2"].character)
pbPlayDecisionSE()
pbPlayDecisionSE()
else
pbPlayBuzzerSE()
end
end
next
end
end
end
Input.update
return ret
end
@@ -1141,7 +1141,7 @@ class PokemonEntryScene2
end
def update
updateInternal
updateInternal
end
def dispose
@@ -1599,7 +1599,7 @@ end
#===============================================================================
#
#
#===============================================================================
def pbEnterText(helptext,minlength,maxlength,initialText="",mode=0,pokemon=nil,nofadeout=false)
ret=""
@@ -1673,4 +1673,4 @@ def pbMessageFreeText(message,currenttext,passwordbox,maxlength,width=240,&block
},&block)
pbDisposeMessageWindow(msgwindow)
return retval
end
end

View File

@@ -3,7 +3,7 @@ def getCubicPoint2(src,t)
cx0 = src[2]; cy0 = src[3]
cx1 = src[4]; cy1 = src[5]
x1 = src[6]; y1 = src[7]
x1 = cx1+(x1-cx1)*t
x0 = x0+(cx0-x0)*t
cx0 = cx0+(cx1-cx0)*t
@@ -613,7 +613,7 @@ class EventScene
return @disposed
end
def addBitmap(x, y, bitmap)
def addBitmap(x, y, bitmap)
# _bitmap_ can be a Bitmap or an AnimatedBitmap
# (update method isn't called if it's animated)
# EventScene doesn't take ownership of the passed-in bitmap
@@ -628,7 +628,7 @@ class EventScene
end
def addLabel(x, y, width, text)
addBitmap(x,y,pbTextBitmap(text,width))
addBitmap(x,y,pbTextBitmap(text,width))
end
def addImage(x, y, name)
@@ -706,4 +706,4 @@ def pbEventScreen(cls)
}
viewport.dispose
}
end
end

View File

@@ -169,4 +169,4 @@ class PointInterpolator
@y = ry1+t*(ry2-ry1)
@curframe += 1
end
end
end

View File

@@ -1,7 +1,7 @@
#===============================================================================
# ** Modified Scene_Map class for Pokémon.
#-------------------------------------------------------------------------------
#
#
#===============================================================================
class Scene_Map
attr_reader :spritesetGlobal
@@ -103,7 +103,7 @@ class Scene_Map
$game_player.straighten
$game_map.update
sscene = PokemonPauseMenu_Scene.new
sscreen = PokemonPauseMenu.new(sscene)
sscreen = PokemonPauseMenu.new(sscene)
sscreen.pbStartPokemonMenu
$game_temp.in_menu = false
end
@@ -236,4 +236,4 @@ class Scene_Map
Graphics.freeze
end
end
end
end

View File

@@ -131,4 +131,4 @@ class Scene_Intro
@eventscene.main
Graphics.freeze
end
end
end

View File

@@ -43,4 +43,4 @@ class ButtonEventScene < EventScene
scene.dispose
Graphics.transition(20)
end
end
end

View File

@@ -32,7 +32,7 @@ class Scene_Movie
end
status = " " * 255
x=movie.call("play FILE",0,0,0)
loop do
loop do
sleep(0.1)
@message.call(@temp.to_i,11,0,0)
Graphics.update
@@ -43,10 +43,10 @@ class Scene_Movie
break if true_status.to_s != "play"
if Input.trigger?(Input::B)
movie.call("close FILE",0,0,0)
$scene = Scene_Map.new
$scene = Scene_Map.new
break
end
end
$scene = Scene_Map.new
end
end
end

View File

@@ -228,4 +228,4 @@ _END_
@realOY += @oyChangePerFrame
@credit_sprite.oy = @realOY
end
end
end

View File

@@ -42,7 +42,7 @@ module Graphics
end
=end
@@transition.update if @@transition && !@@transition.disposed?
@@transition = nil if @@transition && @@transition.disposed?
@@transition = nil if @@transition && @@transition.disposed?
end
def self.judge_special_transition(duration,filename)
@@ -97,7 +97,7 @@ end
#===============================================================================
#
#
#===============================================================================
class BreakingGlass
def initialize(numframes)
@@ -161,7 +161,7 @@ end
#===============================================================================
#
#
#===============================================================================
class ShrinkingPieces
def initialize(numframes,rotation)
@@ -228,7 +228,7 @@ end
#===============================================================================
#
#
#===============================================================================
class SplashTransition
SPLASH_SIZE = 32
@@ -327,7 +327,7 @@ end
#===============================================================================
#
#
#===============================================================================
class RandomStripeTransition
RAND_STRIPE_SIZE = 2
@@ -349,7 +349,7 @@ class RandomStripeTransition
@viewport.z = 99999
@sprite = Sprite.new(@viewport)
@sprite.bitmap = Bitmap.new(Graphics.width,Graphics.height)
##########
##########
@direction = direction
size = RAND_STRIPE_SIZE
bands = ((@direction==0) ? Graphics.width : Graphics.height)/size
@@ -412,7 +412,7 @@ end
#===============================================================================
#
#
#===============================================================================
class ZoomInTransition
def initialize(numframes)
@@ -467,7 +467,7 @@ end
#===============================================================================
#
#
#===============================================================================
class ScrollScreen
def initialize(numframes,direction)
@@ -538,7 +538,7 @@ end
#===============================================================================
#
#
#===============================================================================
class MosaicTransition
def initialize(numframes)
@@ -594,7 +594,7 @@ end
#===============================================================================
#
#
#===============================================================================
class FadeTransition
def initialize(numframes)
@@ -1614,4 +1614,4 @@ class FourBallBurst
end
@duration -= 1
end
end
end

View File

@@ -29,7 +29,7 @@ module PhoneMsgType
Generic = 0
Greeting = 1
Body = 2
BattleRequest = 3
BattleRequest = 3
end
@@ -190,7 +190,7 @@ module PokemonSpeciesData
end
return ret
end
def self.optionalValues(compilingForms=false)
ret = {
"Type2" => [SpeciesType2, "e",:PBTypes],
@@ -469,4 +469,4 @@ def pbClearData
if pbRgssExists?("Data/Tilesets.rvdata")
$data_tilesets = load_data("Data/Tilesets.rvdata")
end
end
end

View File

@@ -101,4 +101,4 @@ class PBMove
maxPP = pbGetMoveData(@id,MOVE_TOTAL_PP) || 0
return maxPP+maxPP*@ppup/5
end
end
end

View File

@@ -25,4 +25,4 @@ rescue Exception
if $!.is_a?(SystemExit) || "#{$!.class}"=="Reset"
raise $!
end
end
end

View File

@@ -87,4 +87,4 @@ class PBTypes
e = PBTypes.getCombinedEffectiveness(attackType,targetType1,targetType2,targetType3)
return e>PBTypeEffectiveness::NORMAL_EFFECTIVE
end
end
end

View File

@@ -84,4 +84,4 @@ module PBNatures
end
return ret
end
end
end

View File

@@ -21,4 +21,4 @@ module PBGenderRates
end
return 255 # Default value (genderless)
end
end
end

View File

@@ -98,7 +98,7 @@ module PBExperience
# Erratic (600000):
# For levels 0-50: n**3([100-n]/50)
# For levels 51-68: n**3([150-n]/100)
# For levels 69-98: n**3(1.274-[1/50][n/3]-p(n mod 3))
# For levels 69-98: n**3(1.274-[1/50][n/3]-p(n mod 3))
# where p(x) = array(0.000,0.008,0.014)[x]
# For levels 99-100: n**3([160-n]/100)
# Fluctuating (1640000):
@@ -114,7 +114,7 @@ module PBExperience
# Level 101+, use formulae
case growth
when PBGrowthRates::Medium # 1000000
return level ** 3
return level ** 3
when PBGrowthRates::Erratic # 600000
# Different formula that causes 600000 EXP at level 100
return ((level ** 4) * 0.6 / 100).floor
@@ -194,4 +194,4 @@ module PBExperience
end
return mLevel
end
end
end

View File

@@ -63,4 +63,4 @@ rescue Exception
if $!.is_a?(SystemExit) || "#{$!.class}"=="Reset"
raise $!
end
end
end

View File

@@ -256,4 +256,4 @@ module PBRibbons
]
return desc[id]
end
end
end

View File

@@ -39,4 +39,4 @@ module PBEggGroups
]
return names[id]
end
end
end

View File

@@ -30,4 +30,4 @@ module PBColors
]
return names[id]
end
end
end

View File

@@ -29,4 +29,4 @@ module PBHabitats
]
return names[id]
end
end
end

View File

@@ -662,4 +662,4 @@ class PokeBattle_Battler
end
return @battle.battlers[(@index^1)]
end
end
end

View File

@@ -323,4 +323,4 @@ class PokeBattle_Battler
@participants.push(b.pokemonIndex) if !@participants.include?(b.pokemonIndex)
end
end
end
end

View File

@@ -298,4 +298,4 @@ class PokeBattle_Battler
end
def pbHyperMode; end
end
end

View File

@@ -570,4 +570,4 @@ class PokeBattle_Battler
return if hasActiveAbility?(:INNERFOCUS) && !@battle.moldBreaker
@effects[PBEffects::Flinch] = true
end
end
end

View File

@@ -307,4 +307,4 @@ class PokeBattle_Battler
def pbResetStatStages
PBStats.eachBattleStat { |s| @stages[s] = 0 }
end
end
end

View File

@@ -319,4 +319,4 @@ class PokeBattle_Battler
pbHeldItemTriggered(@item)
end
end
end
end

View File

@@ -190,4 +190,4 @@ class PokeBattle_Battler
pbAddTarget(targets,user,choices[@battle.pbRandom(choices.length)],nearOnly)
end
end
end
end

View File

@@ -127,13 +127,13 @@ class PokeBattle_Battler
@effects[PBEffects::Rage] = false
# Do nothing if using Snore/Sleep Talk
if @status==PBStatuses::SLEEP && move.usableWhenAsleep?
@battle.pbDisplay(_INTL("{1} ignored orders and kept sleeping!",pbThis))
@battle.pbDisplay(_INTL("{1} ignored orders and kept sleeping!",pbThis))
return false
end
b = ((@level+badgeLevel)*@battle.pbRandom(256)/256).floor
# Use another move
if b<badgeLevel
@battle.pbDisplay(_INTL("{1} ignored orders!",pbThis))
@battle.pbDisplay(_INTL("{1} ignored orders!",pbThis))
return false if !@battle.pbCanShowFightMenu?(@index)
otherMoves = []
eachMoveWithIndex do |m,i|
@@ -275,7 +275,7 @@ class PokeBattle_Battler
@battle.pbDisplay(_INTL("{1} is in love with {2}!",pbThis,
@battle.battlers[@effects[PBEffects::Attract]].pbThis(true)))
if @battle.pbRandom(100)<50
@battle.pbDisplay(_INTL("{1} is immobilized by love!",pbThis))
@battle.pbDisplay(_INTL("{1} is immobilized by love!",pbThis))
@lastMoveFailed = true
return false
end
@@ -405,7 +405,7 @@ class PokeBattle_Battler
if move.pbDamagingMove? && PBTypes.ineffective?(typeMod)
PBDebug.log("[Target immune] #{target.pbThis}'s type immunity")
@battle.pbDisplay(_INTL("It doesn't affect {1}...",target.pbThis(true)))
return false
return false
end
# Dark-type immunity to moves made faster by Prankster
if NEWEST_BATTLE_MECHANICS && user.effects[PBEffects::Prankster] &&
@@ -535,4 +535,4 @@ class PokeBattle_Battler
@battle.pbDisplay(_INTL("{1}'s attack missed!",user.pbThis))
end
end
end
end

View File

@@ -72,7 +72,7 @@ class PokeBattle_Battler
next if b.status!=PBStatuses::FROZEN
# NOTE: Non-Fire-type moves that thaw the user will also thaw the
# target (in Gen 6+).
if isConst?(move.calcType,PBTypes,:FIRE) ||
if isConst?(move.calcType,PBTypes,:FIRE) ||
(NEWEST_BATTLE_MECHANICS && move.thawsUser?)
b.pbCureStatus
end
@@ -185,4 +185,4 @@ class PokeBattle_Battler
end
end
end
end
end

View File

@@ -27,4 +27,4 @@ rescue Exception
if $!.is_a?(SystemExit) || "#{$!.class}"=="Reset"
raise $!
end
end
end

View File

@@ -89,7 +89,7 @@ class PokeBattle_Move
def damagingMove?; return @category!=2; end
def statusMove?; return @category==2; end
def usableWhenAsleep?; return false; end
def unusableInGravity?; return false; end
def healingMove?; return false; end
@@ -137,4 +137,4 @@ class PokeBattle_Move
end
return false
end
end
end

View File

@@ -23,7 +23,7 @@ class PokeBattle_Move
def pbMissMessage(user,target); return false; end
#=============================================================================
#
#
#=============================================================================
# Whether the move is currently in the "charging" turn of a two turn attack.
# Is false if Power Herb or another effect lets a two turn move charge and
@@ -347,4 +347,4 @@ class PokeBattle_Move
target.lastFoeAttacker.push(user.index) # For Metal Burst
end
end
end
end

View File

@@ -711,4 +711,4 @@ class PokeBattle_PledgeMove < PokeBattle_Move
id = @overrideAnim if @overrideAnim!=nil
return super
end
end
end

View File

@@ -376,13 +376,13 @@ class PokeBattle_Move_094 < PokeBattle_Move
end
def pbBaseDamage(baseDmg,user,target)
return @presentDmg
return @presentDmg
end
def pbEffectAgainstTarget(user,target)
return if @presentDmg>0
target.pbRecoverHP(target.totalhp/4)
@battle.pbDisplay(_INTL("{1}'s HP was restored.",target.pbThis))
@battle.pbDisplay(_INTL("{1}'s HP was restored.",target.pbThis))
end
def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true)
@@ -622,7 +622,7 @@ class PokeBattle_Move_09B < PokeBattle_Move
if n>=5; ret = 120
elsif n>=4; ret = 100
elsif n>=3; ret = 80
elsif n>=2; ret = 60
elsif n>=2; ret = 60
end
return ret
end
@@ -638,7 +638,7 @@ class PokeBattle_Move_09C < PokeBattle_Move
def pbFailsAgainstTarget?(user,target)
if target.fainted? || target.effects[PBEffects::HelpingHand]
@battle.pbDisplay(_INTL("But it failed!"))
@battle.pbDisplay(_INTL("But it failed!"))
return true
end
return true if pbMoveFailedTargetAlreadyMoved?(target)
@@ -2729,7 +2729,7 @@ class PokeBattle_Move_0DF < PokeBattle_Move
hpGain = (target.totalhp*3/4.0).round
end
target.pbRecoverHP(hpGain)
@battle.pbDisplay(_INTL("{1}'s HP was restored.",target.pbThis))
@battle.pbDisplay(_INTL("{1}'s HP was restored.",target.pbThis))
end
end
@@ -2996,15 +2996,15 @@ class PokeBattle_Move_0EB < PokeBattle_Move
if target.hasActiveAbility?(:SUCTIONCUPS) && !@battle.moldBreaker
@battle.pbShowAbilitySplash(target)
if PokeBattle_SceneConstants::USE_ABILITY_SPLASH
@battle.pbDisplay(_INTL("{1} anchors itself!",target.pbThis))
@battle.pbDisplay(_INTL("{1} anchors itself!",target.pbThis))
else
@battle.pbDisplay(_INTL("{1} anchors itself with {2}!",target.pbThis,target.abilityName))
@battle.pbDisplay(_INTL("{1} anchors itself with {2}!",target.pbThis,target.abilityName))
end
@battle.pbHideAbilitySplash(target)
return true
end
if target.effects[PBEffects::Ingrain]
@battle.pbDisplay(_INTL("{1} anchored itself with its roots!",target.pbThis))
@battle.pbDisplay(_INTL("{1} anchored itself with its roots!",target.pbThis))
return true
end
if @battle.wildBattle? && target.level>user.level

View File

@@ -278,7 +278,7 @@ class PokeBattle_Move_10D < PokeBattle_Move
def pbFailsAgainstTarget?(user,target)
if user.pbHasType?(:GHOST) && target.effects[PBEffects::Curse]
@battle.pbDisplay(_INTL("But it failed!"))
@battle.pbDisplay(_INTL("But it failed!"))
return true
end
return false
@@ -1401,7 +1401,7 @@ end
class PokeBattle_Move_142 < PokeBattle_Move
def pbFailsAgainstTarget?(user,target)
if !hasConst?(PBTypes,:GHOST) || target.pbHasType?(:GHOST) || !target.canChangeType?
@battle.pbDisplay(_INTL("But it failed!"))
@battle.pbDisplay(_INTL("But it failed!"))
return true
end
return false
@@ -1423,7 +1423,7 @@ end
class PokeBattle_Move_143 < PokeBattle_Move
def pbFailsAgainstTarget?(user,target)
if !hasConst?(PBTypes,:GRASS) || target.pbHasType?(:GRASS) || !target.canChangeType?
@battle.pbDisplay(_INTL("But it failed!"))
@battle.pbDisplay(_INTL("But it failed!"))
return true
end
return false
@@ -1547,7 +1547,7 @@ class PokeBattle_Move_148 < PokeBattle_Move
def pbEffectAgainstTarget(user,target)
target.effects[PBEffects::Powder] = true
@battle.pbDisplay(_INTL("{1} is covered in powder!",user.pbThis))
end
end
end
@@ -2208,7 +2208,7 @@ class PokeBattle_Move_165 < PokeBattle_Move
@battle.choices[target.index][0]==:Shift) && target.movedThisRound?)
target.effects[PBEffects::GastroAcid] = true
target.effects[PBEffects::Truant] = false
@battle.pbDisplay(_INTL("{1}'s Ability was suppressed!",target.pbThis))
@battle.pbDisplay(_INTL("{1}'s Ability was suppressed!",target.pbThis))
target.pbOnAbilityChanged(target.ability)
end
end
@@ -2434,7 +2434,7 @@ class PokeBattle_Move_16E < PokeBattle_Move
hpGain = (target.totalhp/2.0).round
hpGain = (target.totalhp*2/3.0).round if @battle.field.terrain==PBBattleTerrains::Grassy
target.pbRecoverHP(hpGain)
@battle.pbDisplay(_INTL("{1}'s HP was restored.",target.pbThis))
@battle.pbDisplay(_INTL("{1}'s HP was restored.",target.pbThis))
end
end
@@ -2476,7 +2476,7 @@ class PokeBattle_Move_16F < PokeBattle_Move
def pbEffectAgainstTarget(user,target)
return if !@healing
target.pbRecoverHP(target.totalhp/2)
@battle.pbDisplay(_INTL("{1}'s HP was restored.",target.pbThis))
@battle.pbDisplay(_INTL("{1}'s HP was restored.",target.pbThis))
end
def pbShowAnimation(id,user,targets,hitNum=0,showAnimation=true)
@@ -2623,4 +2623,4 @@ end
# NOTE: If you're inventing new move effects, use function code 176 and onwards.
# Actually, you might as well use high numbers like 500+ (up to FFFF),
# just to make sure later additions to Essentials don't clash with your
# new effects.
# new effects.

View File

@@ -29,4 +29,4 @@ rescue Exception
if $!.is_a?(SystemExit) || "#{$!.class}"=="Reset"
raise $!
end
end
end

View File

@@ -599,7 +599,7 @@ class PokeBattle_Battle
end
#=============================================================================
#
#
#=============================================================================
# Returns the battler representing the Pokémon at index idxParty in its party,
# on the same side as a battler with battler index of idxBattlerOther.
@@ -650,7 +650,7 @@ class PokeBattle_Battle
return if @field.weather==newWeather
@field.weather = newWeather
duration = (fixedDuration) ? 5 : -1
if duration>0 && user && user.itemActive?
if duration>0 && user && user.itemActive?
duration = BattleHandlers.triggerWeatherExtenderItem(user.item,
@field.weather,duration,user,self)
end
@@ -708,7 +708,7 @@ class PokeBattle_Battle
return if @field.terrain==newTerrain
@field.terrain = newTerrain
duration = (fixedDuration) ? 5 : -1
if duration>0 && user && user.itemActive?
if duration>0 && user && user.itemActive?
duration = BattleHandlers.triggerTerrainExtenderItem(user.item,
newTerrain,duration,user,self)
end
@@ -778,4 +778,4 @@ class PokeBattle_Battle
return if !PokeBattle_SceneConstants::USE_ABILITY_SPLASH
@scene.pbReplaceAbilitySplash(battler)
end
end
end

View File

@@ -376,7 +376,7 @@ class PokeBattle_Battle
moneyLost = oldMoney-pbPlayer.money
if moneyLost>0
if trainerBattle?
pbDisplayPaused(_INTL("You gave ${1} to the winner...",moneyLost.to_s_formatted))
pbDisplayPaused(_INTL("You gave ${1} to the winner...",moneyLost.to_s_formatted))
else
pbDisplayPaused(_INTL("You panicked and dropped ${1}...",moneyLost.to_s_formatted))
end
@@ -534,4 +534,4 @@ class PokeBattle_Battle
elsif fainted2; @decision = 1 # Win
end
end
end
end

View File

@@ -188,7 +188,7 @@ class PokeBattle_Battle
curLevel += 1
if curLevel>newLevel
# Gained all the Exp now, end the animation
pkmn.calcStats
pkmn.calcStats
battler.pbUpdate(false) if battler
@scene.pbRefreshOne(battler.index) if battler
break
@@ -260,4 +260,4 @@ class PokeBattle_Battle
end
end
end
end
end

View File

@@ -251,4 +251,4 @@ class PokeBattle_Battle
end
return ret
end
end
end

View File

@@ -189,7 +189,7 @@ class PokeBattle_Battle
switched.push(idxBattler)
else # Player's Pokémon has fainted in a wild battle
switch = false
if !pbDisplayConfirm(_INTL("Use next Pokémon?"))
if !pbDisplayConfirm(_INTL("Use next Pokémon?"))
switch = (pbRun(idxBattler,true)<=0)
else
switch = true
@@ -408,4 +408,4 @@ class PokeBattle_Battle
battler.pbCheckForm
return true
end
end
end

View File

@@ -141,4 +141,4 @@ class PokeBattle_Battle
# Return unused item to Bag
pbReturnUnusedItemToBag(item,userBattler.index)
end
end
end

View File

@@ -35,7 +35,7 @@ class PokeBattle_Battle
if battler.opposes?
return 0 if trainerBattle?
@choices[idxBattler][0] = :Run
@choices[idxBattler][1] = 0
@choices[idxBattler][1] = 0
@choices[idxBattler][2] = nil
return -1
end
@@ -142,4 +142,4 @@ class PokeBattle_Battle
pbDisplayPaused(_INTL("You couldn't get away!"))
return -1
end
end
end

View File

@@ -189,4 +189,4 @@ class PokeBattle_Battle
end
pbDisplay(_INTL("{1}'s Primal Reversion!\nIt reverted to its primal form!",battler.pbThis))
end
end
end

View File

@@ -247,4 +247,4 @@ class PokeBattle_Battle
break if commandsEnd
end
end
end
end

View File

@@ -187,4 +187,4 @@ class PokeBattle_Battle
pbAttackPhaseMegaEvolution
pbAttackPhaseMoves
end
end
end

View File

@@ -79,7 +79,7 @@ class PokeBattle_Battle
b.pbFaint if b.fainted?
end
# Weather damage
# NOTE:
# NOTE:
case curWeather
when PBWeather::Sandstorm
next if !b.takesSandstormDamage?
@@ -442,7 +442,7 @@ class PokeBattle_Battle
if b.effects[PBEffects::Encore]==0 || b.moves[idxEncoreMove].pp==0
b.effects[PBEffects::Encore] = 0
pbDisplay(_INTL("{1}'s encore ended!",b.pbThis))
end
end
else
PBDebug.log("[End of effect] #{b.pbThis}'s encore ended (encored move no longer known)")
b.effects[PBEffects::Encore] = 0
@@ -573,7 +573,7 @@ class PokeBattle_Battle
if b.effects[PBEffects::Uproar]==0
pbDisplay(_INTL("{1} calmed down.",b.pbThis))
else
pbDisplay(_INTL("{1} is making an uproar!",b.pbThis))
pbDisplay(_INTL("{1} is making an uproar!",b.pbThis))
end
end
# Slow Start's end message
@@ -664,4 +664,4 @@ class PokeBattle_Battle
@field.effects[PBEffects::FusionFlare] = false
@endOfRound = false
end
end
end

Some files were not shown because too many files have changed in this diff Show More