mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Fixed rendering of some tiles for certain sizes of tilesets, more rubocopping
This commit is contained in:
10
.rubocop.yml
10
.rubocop.yml
@@ -15,6 +15,11 @@ Layout/ExtraSpacing:
|
||||
AllowForAlignment: true
|
||||
AllowBeforeTrailingComments: true
|
||||
|
||||
# Looks better than having hash elements shifted way to the right just to line
|
||||
# up with the hash's opening bracket.
|
||||
Layout/FirstHashElementIndentation:
|
||||
EnforcedStyle: consistent
|
||||
|
||||
# In a hash with multiple values (one per line), prefer the => to be lined up
|
||||
# and text to otherwise be left-aligned.
|
||||
Layout/HashAlignment:
|
||||
@@ -207,3 +212,8 @@ Style/SymbolProc:
|
||||
# it from the true/false results.
|
||||
Style/TernaryParentheses:
|
||||
EnforcedStyle: require_parentheses
|
||||
|
||||
# This prefers "x += 1 while x < 10" and "x += 1 until x == 10". This hides
|
||||
# loops, which is not good.
|
||||
Style/WhileUntilModifier:
|
||||
Enabled: false
|
||||
|
||||
@@ -49,6 +49,6 @@ end
|
||||
|
||||
if System::VERSION != Essentials::MKXPZ_VERSION
|
||||
printf(sprintf("\e[1;33mWARNING: mkxp-z version %s detected, but this version of Pokémon Essentials was designed for mkxp-z version %s.\e[0m\r\n",
|
||||
System::VERSION, Essentials::MKXPZ_VERSION))
|
||||
System::VERSION, Essentials::MKXPZ_VERSION))
|
||||
printf("\e[1;33mWARNING: Pokémon Essentials may not work properly.\e[0m\r\n")
|
||||
end
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
#############################
|
||||
#
|
||||
#===============================================================================
|
||||
# HTTP utility functions
|
||||
#
|
||||
#############################
|
||||
#===============================================================================
|
||||
def pbPostData(url, postdata, filename = nil, depth = 0)
|
||||
if url[/^http:\/\/([^\/]+)(.*)$/]
|
||||
host = $1
|
||||
@@ -21,11 +19,11 @@ def pbPostData(url, postdata, filename = nil, depth = 0)
|
||||
body,
|
||||
"application/x-www-form-urlencoded",
|
||||
{
|
||||
"Host" => host, # might not be necessary
|
||||
"Host" => host, # might not be necessary
|
||||
"Proxy-Connection" => "Close",
|
||||
"Content-Length" => body.bytesize.to_s,
|
||||
"Pragma" => "no-cache",
|
||||
"User-Agent" => userAgent
|
||||
"Content-Length" => body.bytesize.to_s,
|
||||
"Pragma" => "no-cache",
|
||||
"User-Agent" => userAgent
|
||||
}
|
||||
) rescue ""
|
||||
return ret if !ret.is_a?(Hash)
|
||||
@@ -40,8 +38,8 @@ end
|
||||
def pbDownloadData(url, filename = nil, authorization = nil, depth = 0, &block)
|
||||
headers = {
|
||||
"Proxy-Connection" => "Close",
|
||||
"Pragma" => "no-cache",
|
||||
"User-Agent" => "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.14) Gecko/2009082707 Firefox/3.0.14"
|
||||
"Pragma" => "no-cache",
|
||||
"User-Agent" => "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.14) Gecko/2009082707 Firefox/3.0.14"
|
||||
}
|
||||
headers["authorization"] = authorization if authorization
|
||||
ret = HTTPLite.get(url, headers) rescue ""
|
||||
|
||||
@@ -571,15 +571,17 @@ class Translation
|
||||
def setMapMessagesAsHash(map_id, array)
|
||||
load_default_messages
|
||||
@default_game_messages[MessageTypes::EVENT_TEXTS] ||= []
|
||||
@default_game_messages[MessageTypes::EVENT_TEXTS][map_id] = priv_add_to_hash(MessageTypes::EVENT_TEXTS,
|
||||
array, nil, map_id)
|
||||
@default_game_messages[MessageTypes::EVENT_TEXTS][map_id] = priv_add_to_hash(
|
||||
MessageTypes::EVENT_TEXTS, array, nil, map_id
|
||||
)
|
||||
end
|
||||
|
||||
def addMapMessagesAsHash(map_id, array)
|
||||
load_default_messages
|
||||
@default_game_messages[MessageTypes::EVENT_TEXTS] ||= []
|
||||
@default_game_messages[MessageTypes::EVENT_TEXTS][map_id] = priv_add_to_hash(MessageTypes::EVENT_TEXTS,
|
||||
array, @default_game_messages[MessageTypes::EVENT_TEXTS][map_id], map_id)
|
||||
@default_game_messages[MessageTypes::EVENT_TEXTS][map_id] = priv_add_to_hash(
|
||||
MessageTypes::EVENT_TEXTS, array, @default_game_messages[MessageTypes::EVENT_TEXTS][map_id], map_id
|
||||
)
|
||||
end
|
||||
|
||||
def get(type, id)
|
||||
|
||||
@@ -277,13 +277,13 @@ module PluginManager
|
||||
end
|
||||
# Add plugin to class variable
|
||||
@@Plugins[name] = {
|
||||
:name => name,
|
||||
:version => version,
|
||||
:essentials => essentials,
|
||||
:link => link,
|
||||
:dependencies => dependencies,
|
||||
:name => name,
|
||||
:version => version,
|
||||
:essentials => essentials,
|
||||
:link => link,
|
||||
:dependencies => dependencies,
|
||||
:incompatibilities => incompats,
|
||||
:credits => credits
|
||||
:credits => credits
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ module SaveData
|
||||
# Populated during runtime by SaveData.register_conversion calls.
|
||||
@conversions = {
|
||||
essentials: {},
|
||||
game: {}
|
||||
game: {}
|
||||
}
|
||||
|
||||
#=============================================================================
|
||||
@@ -171,7 +171,7 @@ module SaveData
|
||||
conversions_to_run = []
|
||||
versions = {
|
||||
essentials: save_data[:essentials_version] || "18.1",
|
||||
game: save_data[:game_version] || "0.0.0"
|
||||
game: save_data[:game_version] || "0.0.0"
|
||||
}
|
||||
[:essentials, :game].each do |trigger_type|
|
||||
# Ensure the versions are sorted from lowest to highest
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#==============================================================================
|
||||
#===============================================================================
|
||||
# ** 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
|
||||
# this class.
|
||||
#==============================================================================
|
||||
#===============================================================================
|
||||
class Game_System
|
||||
attr_reader :map_interpreter # map event interpreter
|
||||
attr_reader :battle_interpreter # battle event interpreter
|
||||
@@ -39,7 +39,7 @@ class Game_System
|
||||
@bgs_position = 0
|
||||
end
|
||||
|
||||
################################################################################
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
def bgm_play(bgm)
|
||||
old_pos = @bgm_position
|
||||
@@ -140,7 +140,7 @@ class Game_System
|
||||
end
|
||||
end
|
||||
|
||||
################################################################################
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
def me_play(me)
|
||||
me = RPG::AudioFile.new(me) if me.is_a?(String)
|
||||
@@ -157,7 +157,7 @@ class Game_System
|
||||
Graphics.frame_reset
|
||||
end
|
||||
|
||||
################################################################################
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
def bgs_play(bgs)
|
||||
@playing_bgs = (bgs.nil?) ? nil : bgs.clone
|
||||
@@ -224,7 +224,7 @@ class Game_System
|
||||
return (@playing_bgs) ? @playing_bgs.clone : nil
|
||||
end
|
||||
|
||||
################################################################################
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
def se_play(se)
|
||||
se = RPG::AudioFile.new(se) if se.is_a?(String)
|
||||
@@ -240,7 +240,7 @@ class Game_System
|
||||
Audio.se_stop
|
||||
end
|
||||
|
||||
################################################################################
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
def battle_bgm
|
||||
return (@battle_bgm) ? @battle_bgm : $data_system.battle_bgm
|
||||
@@ -254,7 +254,7 @@ class Game_System
|
||||
|
||||
attr_writer :battle_end_me
|
||||
|
||||
################################################################################
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
def windowskin_name
|
||||
if @windowskin_name.nil?
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#==============================================================================
|
||||
#===============================================================================
|
||||
# ** Game_Map
|
||||
#------------------------------------------------------------------------------
|
||||
# This class handles the map. It includes scrolling and passable determining
|
||||
# functions. Refer to "$game_map" for the instance of this class.
|
||||
#==============================================================================
|
||||
#===============================================================================
|
||||
class Game_Map
|
||||
attr_accessor :map_id
|
||||
attr_accessor :tileset_name # tileset file name
|
||||
|
||||
@@ -165,12 +165,12 @@ class Sprite_Character < RPG::Sprite
|
||||
end
|
||||
this_x = @character.screen_x
|
||||
this_x = ((this_x - (Graphics.width / 2)) * TilemapRenderer::ZOOM_X) + (Graphics.width / 2) if TilemapRenderer::ZOOM_X != 1
|
||||
self.x = this_x
|
||||
self.x = this_x
|
||||
this_y = @character.screen_y
|
||||
this_y = ((this_y - (Graphics.height / 2)) * TilemapRenderer::ZOOM_Y) + (Graphics.height / 2) if TilemapRenderer::ZOOM_Y != 1
|
||||
self.y = this_y
|
||||
self.z = @character.screen_z(@ch)
|
||||
self.opacity = @character.opacity
|
||||
self.y = this_y
|
||||
self.z = @character.screen_z(@ch)
|
||||
self.opacity = @character.opacity
|
||||
self.blend_type = @character.blend_type
|
||||
if @character.animation_id != 0
|
||||
animation = $data_animations[@character.animation_id]
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
#=======================================================================
|
||||
# This module is a little fix that works around PC hardware limitations.
|
||||
# Since Essentials isn't working with software rendering anymore, it now
|
||||
# has to deal with the limits of the GPU. For the most part this is no
|
||||
# big deal, but people do have some really big tilesets.
|
||||
#===============================================================================
|
||||
# This module is a little fix that works around PC hardware limitations. Since
|
||||
# Essentials isn't working with software rendering anymore, it now has to deal
|
||||
# with the limits of the GPU. For the most part this is no big deal, but people
|
||||
# do have some really big tilesets.
|
||||
#
|
||||
# The fix is simple enough: If your tileset is too big, a new
|
||||
# bitmap will be constructed with all the excess pixels sent to the
|
||||
# image's right side. This basically means that you now have a limit
|
||||
# far higher than you should ever actually need.
|
||||
# The fix is simple enough: If your tileset is too big, a new bitmap will be
|
||||
# constructed with all the excess pixels sent to the image's right side. This
|
||||
# basically means that you now have a limit far higher than you should ever
|
||||
# actually need.
|
||||
#
|
||||
# Hardware limit -> max tileset length:
|
||||
# 1024px -> 4096px
|
||||
@@ -15,9 +15,9 @@
|
||||
# 4096px -> 65536px (enough to load pretty much any tileset)
|
||||
# 8192px -> 262144px
|
||||
# 16384px -> 1048576px (what most people have at this point)
|
||||
|
||||
#
|
||||
# ~Roza/Zoroark
|
||||
#=======================================================================
|
||||
#===============================================================================
|
||||
class TilemapRenderer
|
||||
module TilesetWrapper
|
||||
TILESET_WIDTH = SOURCE_TILE_WIDTH * TILESET_TILES_PER_ROW
|
||||
@@ -37,6 +37,7 @@ class TilemapRenderer
|
||||
end
|
||||
bmp = Bitmap.new(TILESET_WIDTH * columns, MAX_TEX_SIZE)
|
||||
remainder = height % MAX_TEX_SIZE
|
||||
remainder = MAX_TEX_SIZE if remainder == 0
|
||||
columns.times do |col|
|
||||
srcrect = Rect.new(0, col * MAX_TEX_SIZE, width, (col + 1 == columns) ? remainder : MAX_TEX_SIZE)
|
||||
bmp.blt(col * TILESET_WIDTH, 0, originalbmp, srcrect)
|
||||
|
||||
@@ -18,13 +18,13 @@ def shadowc3tag(base, shadow)
|
||||
base_text = base.to_rgb32
|
||||
else
|
||||
base_text = sprintf("%02X%02X%02X", base[0], base[1], base[2])
|
||||
base_text += sprintf("02X", base[3]) if base[3]
|
||||
base_text += sprintf("%02X", base[3]) if base[3]
|
||||
end
|
||||
if shadow.is_a?(Color)
|
||||
shadow_text = shadow.to_rgb32
|
||||
else
|
||||
shadow_text = sprintf("%02X%02X%02X", shadow[0], shadow[1], shadow[2])
|
||||
shadow_text += sprintf("02X", shadow[3]) if shadow[3]
|
||||
shadow_text += sprintf("%02X", shadow[3]) if shadow[3]
|
||||
end
|
||||
return sprintf("<c3=%s,%s>", base_text, shadow_text)
|
||||
end
|
||||
@@ -428,125 +428,124 @@ def getFormattedText(bitmap, xDst, yDst, widthDst, heightDst, text, lineheight =
|
||||
graphicHeight = nil
|
||||
graphicRect = nil
|
||||
controls.length.times do |i|
|
||||
if controls[i] && controls[i][2] == position
|
||||
control = controls[i][0]
|
||||
param = controls[i][1]
|
||||
endtag = controls[i][3]
|
||||
case control
|
||||
when "c"
|
||||
if endtag
|
||||
colorstack.pop
|
||||
else
|
||||
color = Color.new_from_rgb(param)
|
||||
colorstack.push([color, nil])
|
||||
end
|
||||
when "c2"
|
||||
if endtag
|
||||
colorstack.pop
|
||||
else
|
||||
base = Color.new_from_rgb(param[0, 4])
|
||||
shadow = Color.new_from_rgb(param[4, 4])
|
||||
colorstack.push([base, shadow])
|
||||
end
|
||||
when "c3"
|
||||
if endtag
|
||||
colorstack.pop
|
||||
else
|
||||
param = param.split(",")
|
||||
# get pure colors unaffected by opacity
|
||||
oldColors = getLastParam(colorstack, defaultcolors)
|
||||
base = (param[0] && param[0] != "") ? Color.new_from_rgb(param[0]) : oldColors[0]
|
||||
shadow = (param[1] && param[1] != "") ? Color.new_from_rgb(param[1]) : oldColors[1]
|
||||
colorstack.push([base, shadow])
|
||||
end
|
||||
when "o"
|
||||
if endtag
|
||||
opacitystack.pop
|
||||
else
|
||||
opacitystack.push(param.sub(/\s+$/, "").to_i)
|
||||
end
|
||||
when "b"
|
||||
boldcount += (endtag ? -1 : 1)
|
||||
when "i"
|
||||
italiccount += (endtag ? -1 : 1)
|
||||
when "u"
|
||||
underlinecount += (endtag ? -1 : 1)
|
||||
when "s"
|
||||
strikecount += (endtag ? -1 : 1)
|
||||
when "outln"
|
||||
outlinecount += (endtag ? -1 : 1)
|
||||
when "outln2"
|
||||
outline2count += (endtag ? -1 : 1)
|
||||
when "fs" # Font size
|
||||
if endtag
|
||||
fontsizestack.pop
|
||||
else
|
||||
fontsizestack.push(param.sub(/\s+$/, "").to_i)
|
||||
end
|
||||
fontsize = getLastParam(fontsizestack, defaultfontsize)
|
||||
bitmap.font.size = fontsize
|
||||
when "fn" # Font name
|
||||
if endtag
|
||||
fontnamestack.pop
|
||||
else
|
||||
fontname = param.sub(/\s+$/, "")
|
||||
fontnamestack.push(Font.exist?(fontname) ? fontname : "Arial")
|
||||
end
|
||||
fontname = getLastParam(fontnamestack, defaultfontname)
|
||||
bitmap.font.name = fontname
|
||||
when "ar" # Right align
|
||||
if endtag
|
||||
alignstack.pop
|
||||
else
|
||||
alignstack.push(1)
|
||||
end
|
||||
nextline = 1 if x > 0 && nextline == 0
|
||||
when "al" # Left align
|
||||
if endtag
|
||||
alignstack.pop
|
||||
else
|
||||
alignstack.push(0)
|
||||
end
|
||||
nextline = 1 if x > 0 && nextline == 0
|
||||
when "ac" # Center align
|
||||
if endtag
|
||||
alignstack.pop
|
||||
else
|
||||
alignstack.push(2)
|
||||
end
|
||||
nextline = 1 if x > 0 && nextline == 0
|
||||
when "icon" # Icon
|
||||
if !endtag
|
||||
param = param.sub(/\s+$/, "")
|
||||
graphic = "Graphics/Icons/#{param}"
|
||||
controls[i] = nil
|
||||
break
|
||||
end
|
||||
when "img" # Icon
|
||||
if !endtag
|
||||
param = param.sub(/\s+$/, "")
|
||||
param = param.split("|")
|
||||
graphic = param[0]
|
||||
if param.length > 1
|
||||
graphicX = param[1].to_i
|
||||
graphicY = param[2].to_i
|
||||
graphicWidth = param[3].to_i
|
||||
graphicHeight = param[4].to_i
|
||||
end
|
||||
controls[i] = nil
|
||||
break
|
||||
end
|
||||
when "br" # Line break
|
||||
nextline += 1 if !endtag
|
||||
when "r" # Right align this line
|
||||
if !endtag
|
||||
x = 0
|
||||
rightalign = 1
|
||||
lastword = [characters.length, x]
|
||||
end
|
||||
next if !controls[i] || controls[i][2] != position
|
||||
control = controls[i][0]
|
||||
param = controls[i][1]
|
||||
endtag = controls[i][3]
|
||||
case control
|
||||
when "c"
|
||||
if endtag
|
||||
colorstack.pop
|
||||
else
|
||||
color = Color.new_from_rgb(param)
|
||||
colorstack.push([color, nil])
|
||||
end
|
||||
when "c2"
|
||||
if endtag
|
||||
colorstack.pop
|
||||
else
|
||||
base = Color.new_from_rgb(param[0, 4])
|
||||
shadow = Color.new_from_rgb(param[4, 4])
|
||||
colorstack.push([base, shadow])
|
||||
end
|
||||
when "c3"
|
||||
if endtag
|
||||
colorstack.pop
|
||||
else
|
||||
param = param.split(",")
|
||||
# get pure colors unaffected by opacity
|
||||
oldColors = getLastParam(colorstack, defaultcolors)
|
||||
base = (param[0] && param[0] != "") ? Color.new_from_rgb(param[0]) : oldColors[0]
|
||||
shadow = (param[1] && param[1] != "") ? Color.new_from_rgb(param[1]) : oldColors[1]
|
||||
colorstack.push([base, shadow])
|
||||
end
|
||||
when "o"
|
||||
if endtag
|
||||
opacitystack.pop
|
||||
else
|
||||
opacitystack.push(param.sub(/\s+$/, "").to_i)
|
||||
end
|
||||
when "b"
|
||||
boldcount += (endtag ? -1 : 1)
|
||||
when "i"
|
||||
italiccount += (endtag ? -1 : 1)
|
||||
when "u"
|
||||
underlinecount += (endtag ? -1 : 1)
|
||||
when "s"
|
||||
strikecount += (endtag ? -1 : 1)
|
||||
when "outln"
|
||||
outlinecount += (endtag ? -1 : 1)
|
||||
when "outln2"
|
||||
outline2count += (endtag ? -1 : 1)
|
||||
when "fs" # Font size
|
||||
if endtag
|
||||
fontsizestack.pop
|
||||
else
|
||||
fontsizestack.push(param.sub(/\s+$/, "").to_i)
|
||||
end
|
||||
fontsize = getLastParam(fontsizestack, defaultfontsize)
|
||||
bitmap.font.size = fontsize
|
||||
when "fn" # Font name
|
||||
if endtag
|
||||
fontnamestack.pop
|
||||
else
|
||||
fontname = param.sub(/\s+$/, "")
|
||||
fontnamestack.push(Font.exist?(fontname) ? fontname : "Arial")
|
||||
end
|
||||
fontname = getLastParam(fontnamestack, defaultfontname)
|
||||
bitmap.font.name = fontname
|
||||
when "ar" # Right align
|
||||
if endtag
|
||||
alignstack.pop
|
||||
else
|
||||
alignstack.push(1)
|
||||
end
|
||||
nextline = 1 if x > 0 && nextline == 0
|
||||
when "al" # Left align
|
||||
if endtag
|
||||
alignstack.pop
|
||||
else
|
||||
alignstack.push(0)
|
||||
end
|
||||
nextline = 1 if x > 0 && nextline == 0
|
||||
when "ac" # Center align
|
||||
if endtag
|
||||
alignstack.pop
|
||||
else
|
||||
alignstack.push(2)
|
||||
end
|
||||
nextline = 1 if x > 0 && nextline == 0
|
||||
when "icon" # Icon
|
||||
if !endtag
|
||||
param = param.sub(/\s+$/, "")
|
||||
graphic = "Graphics/Icons/#{param}"
|
||||
controls[i] = nil
|
||||
break
|
||||
end
|
||||
when "img" # Icon
|
||||
if !endtag
|
||||
param = param.sub(/\s+$/, "")
|
||||
param = param.split("|")
|
||||
graphic = param[0]
|
||||
if param.length > 1
|
||||
graphicX = param[1].to_i
|
||||
graphicY = param[2].to_i
|
||||
graphicWidth = param[3].to_i
|
||||
graphicHeight = param[4].to_i
|
||||
end
|
||||
controls[i] = nil
|
||||
break
|
||||
end
|
||||
when "br" # Line break
|
||||
nextline += 1 if !endtag
|
||||
when "r" # Right align this line
|
||||
if !endtag
|
||||
x = 0
|
||||
rightalign = 1
|
||||
lastword = [characters.length, x]
|
||||
end
|
||||
controls[i] = nil
|
||||
end
|
||||
controls[i] = nil
|
||||
end
|
||||
bitmap.font.bold = (boldcount > 0)
|
||||
bitmap.font.italic = (italiccount > 0)
|
||||
|
||||
@@ -551,7 +551,7 @@ def pbMessageDisplay(msgwindow, message, letterbyletter = true, commandProc = ni
|
||||
elsif signWaitCount == 0 && letterbyletter
|
||||
pbPlayDecisionSE
|
||||
end
|
||||
########## Position message window ##############
|
||||
# Position message window
|
||||
pbRepositionMessageWindow(msgwindow, linecount)
|
||||
if facewindow
|
||||
pbPositionNearMsgWindow(facewindow, msgwindow, :left)
|
||||
@@ -559,7 +559,7 @@ def pbMessageDisplay(msgwindow, message, letterbyletter = true, commandProc = ni
|
||||
facewindow.z = msgwindow.z
|
||||
end
|
||||
atTop = (msgwindow.y == 0)
|
||||
########## Show text #############################
|
||||
# Show text
|
||||
msgwindow.text = text
|
||||
Graphics.frame_reset if Graphics.frame_rate > 40
|
||||
loop do
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
#####################################
|
||||
# Needed because RGSS doesn't call at_exit procs on exit
|
||||
# Exit is not called when game is reset (using F12)
|
||||
$AtExitProcs = [] if !$AtExitProcs
|
||||
|
||||
@@ -38,7 +38,7 @@ def pbResolveAudioFile(str, volume = nil, pitch = nil)
|
||||
return str
|
||||
end
|
||||
|
||||
################################################################################
|
||||
#===============================================================================
|
||||
|
||||
# Plays a BGM file.
|
||||
# param -- Either a string showing the filename
|
||||
@@ -88,7 +88,7 @@ def pbBGMStop(timeInSeconds = 0.0)
|
||||
(timeInSeconds > 0.0) ? Audio.bgm_fade((timeInSeconds * 1000).floor) : Audio.bgm_stop
|
||||
end
|
||||
|
||||
################################################################################
|
||||
#===============================================================================
|
||||
|
||||
# Plays an ME file.
|
||||
# param -- Either a string showing the filename
|
||||
@@ -138,7 +138,7 @@ def pbMEStop(timeInSeconds = 0.0)
|
||||
(timeInSeconds > 0.0) ? Audio.me_fade((timeInSeconds * 1000).floor) : Audio.me_stop
|
||||
end
|
||||
|
||||
################################################################################
|
||||
#===============================================================================
|
||||
|
||||
# Plays a BGS file.
|
||||
# param -- Either a string showing the filename
|
||||
@@ -188,7 +188,7 @@ def pbBGSStop(timeInSeconds = 0.0)
|
||||
(timeInSeconds > 0.0) ? Audio.bgs_fade((timeInSeconds * 1000).floor) : Audio.bgs_stop
|
||||
end
|
||||
|
||||
################################################################################
|
||||
#===============================================================================
|
||||
|
||||
# Plays an SE file.
|
||||
# param -- Either a string showing the filename
|
||||
@@ -232,7 +232,7 @@ def pbSEStop(_timeInSeconds = 0.0)
|
||||
end
|
||||
end
|
||||
|
||||
################################################################################
|
||||
#===============================================================================
|
||||
|
||||
# Plays a sound effect that plays when the player moves the cursor.
|
||||
def pbPlayCursorSE
|
||||
|
||||
@@ -418,7 +418,7 @@ module GameData
|
||||
ret = nil if ret == :None
|
||||
when "Evolutions"
|
||||
if ret
|
||||
ret = ret.select { |evo| !evo[3] } # Remove prevolutions
|
||||
ret = ret.reject { |evo| evo[3] } # Remove prevolutions
|
||||
ret.each do |evo|
|
||||
param_type = GameData::Evolution.get(evo[1]).parameter
|
||||
if !param_type.nil?
|
||||
|
||||
@@ -406,7 +406,7 @@ end
|
||||
# Recoil move.
|
||||
#===============================================================================
|
||||
class Battle::Move::RecoilMove < Battle::Move
|
||||
def recoilMove?; return true; end
|
||||
def recoilMove?; return true; end
|
||||
def pbRecoilDamage(user, target); return 1; end
|
||||
|
||||
def pbEffectAfterAllHits(user, target)
|
||||
|
||||
@@ -488,7 +488,7 @@ end
|
||||
# User faints, even if the move does nothing else. (Explosion, Self-Destruct)
|
||||
#===============================================================================
|
||||
class Battle::Move::UserFaintsExplosive < Battle::Move
|
||||
def worksWithNoTargets?; return true; end
|
||||
def worksWithNoTargets?; return true; end
|
||||
def pbNumHits(user, targets); return 1; end
|
||||
|
||||
def pbMoveFailed?(user, targets)
|
||||
|
||||
@@ -169,8 +169,8 @@ class Battle::Move::RemoveTargetItem < Battle::Move
|
||||
def pbBaseDamage(baseDmg, user, target)
|
||||
if Settings::MECHANICS_GENERATION >= 6 &&
|
||||
target.item && !target.unlosableItem?(target.item)
|
||||
# NOTE: Damage is still boosted even if target has Sticky Hold or a
|
||||
# substitute.
|
||||
# NOTE: Damage is still boosted even if target has Sticky Hold or a
|
||||
# substitute.
|
||||
baseDmg = (baseDmg * 1.5).round
|
||||
end
|
||||
return baseDmg
|
||||
|
||||
@@ -213,16 +213,14 @@ class Battle::Scene::PokemonDataBox < Sprite
|
||||
nameWidth = self.bitmap.text_size(@battler.name).width
|
||||
nameOffset = 0
|
||||
nameOffset = nameWidth - 116 if nameWidth > 116
|
||||
pbDrawTextPositions(self.bitmap,
|
||||
[[@battler.name, @spriteBaseX + 8 - nameOffset, 12, :left, NAME_BASE_COLOR, NAME_SHADOW_COLOR]]
|
||||
pbDrawTextPositions(self.bitmap, [[@battler.name, @spriteBaseX + 8 - nameOffset, 12, :left,
|
||||
NAME_BASE_COLOR, NAME_SHADOW_COLOR]]
|
||||
)
|
||||
end
|
||||
|
||||
def draw_level
|
||||
# "Lv" graphic
|
||||
pbDrawImagePositions(self.bitmap,
|
||||
[["Graphics/UI/Battle/overlay_lv", @spriteBaseX + 140, 16]]
|
||||
)
|
||||
pbDrawImagePositions(self.bitmap, [["Graphics/UI/Battle/overlay_lv", @spriteBaseX + 140, 16]])
|
||||
# Level number
|
||||
pbDrawNumber(@battler.level, self.bitmap, @spriteBaseX + 162, 16)
|
||||
end
|
||||
|
||||
@@ -446,7 +446,7 @@ module Battle::Scene::Animation::BallAnimationMixin
|
||||
particle.moveDelta(start, particle_lifetime, max_radius * Math.cos(radian), max_radius * Math.sin(radian))
|
||||
particle.moveZoom(start, particle_lifetime, 10)
|
||||
particle.moveTone(start + particle_lifetime - particle_fade_duration,
|
||||
particle_fade_duration / 2, variances[7 - (3 * num)])
|
||||
particle_fade_duration / 2, variances[7 - (3 * num)])
|
||||
particle.moveOpacity(start + particle_lifetime - particle_fade_duration,
|
||||
particle_fade_duration,
|
||||
0) # Fade out at end
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
################################################################################
|
||||
#===============================================================================
|
||||
# This section was created solely for you to put various bits of code that
|
||||
# modify various wild Pokémon and trainers immediately prior to battling them.
|
||||
# Be sure that any code you use here ONLY applies to the Pokémon/trainers you
|
||||
# want it to apply to!
|
||||
################################################################################
|
||||
#===============================================================================
|
||||
|
||||
# Make all wild Pokémon shiny while a certain Switch is ON (see Settings).
|
||||
EventHandlers.add(:on_wild_pokemon_created, :make_shiny_switch,
|
||||
|
||||
@@ -506,8 +506,9 @@ ItemHandlers::UseOnPokemon.add(:FULLHEAL, proc { |item, qty, pkmn, scene|
|
||||
})
|
||||
|
||||
ItemHandlers::UseOnPokemon.copy(:FULLHEAL,
|
||||
:LAVACOOKIE, :OLDGATEAU, :CASTELIACONE, :LUMIOSEGALETTE, :SHALOURSABLE,
|
||||
:BIGMALASADA, :PEWTERCRUNCHIES, :LUMBERRY)
|
||||
:LAVACOOKIE, :OLDGATEAU, :CASTELIACONE,
|
||||
:LUMIOSEGALETTE, :SHALOURSABLE, :BIGMALASADA,
|
||||
:PEWTERCRUNCHIES, :LUMBERRY)
|
||||
ItemHandlers::UseOnPokemon.copy(:FULLHEAL, :RAGECANDYBAR) if Settings::RAGE_CANDY_BAR_CURES_STATUS_PROBLEMS
|
||||
|
||||
ItemHandlers::UseOnPokemon.add(:FULLRESTORE, proc { |item, qty, pkmn, scene|
|
||||
@@ -1075,8 +1076,7 @@ ItemHandlers::UseOnPokemon.add(:ABILITYPATCH, proc { |item, qty, pkmn, scene|
|
||||
pkmn.ability_index = 2
|
||||
pkmn.ability = nil
|
||||
scene.pbRefresh
|
||||
scene.pbDisplay(_INTL("{1}'s Ability changed! Its Ability is now {2}!",
|
||||
pkmn.name, new_ability_name))
|
||||
scene.pbDisplay(_INTL("{1}'s Ability changed! Its Ability is now {2}!", pkmn.name, new_ability_name))
|
||||
next true
|
||||
end
|
||||
next false
|
||||
@@ -1209,8 +1209,7 @@ ItemHandlers::UseOnPokemon.add(:ROTOMCATALOG, proc { |item, qty, pkmn, scene|
|
||||
_INTL("Lawn mower"),
|
||||
_INTL("Cancel")
|
||||
]
|
||||
new_form = scene.pbShowCommands(_INTL("Which appliance would you like to order?"),
|
||||
choices, pkmn.form)
|
||||
new_form = scene.pbShowCommands(_INTL("Which appliance would you like to order?"), choices, pkmn.form)
|
||||
if new_form == pkmn.form
|
||||
scene.pbDisplay(_INTL("It won't have any effect."))
|
||||
next false
|
||||
@@ -1233,7 +1232,7 @@ ItemHandlers::UseOnPokemon.add(:ZYGARDECUBE, proc { |item, qty, pkmn, scene|
|
||||
next false
|
||||
end
|
||||
case scene.pbShowCommands(_INTL("What will you do with {1}?", pkmn.name),
|
||||
[_INTL("Change form"), _INTL("Change Ability"), _INTL("Cancel")])
|
||||
[_INTL("Change form"), _INTL("Change Ability"), _INTL("Cancel")])
|
||||
when 0 # Change form
|
||||
newForm = (pkmn.form == 0) ? 1 : 0
|
||||
pkmn.setForm(newForm) do
|
||||
|
||||
@@ -72,9 +72,10 @@ ItemHandlers::CanUseInBattle.add(:POTION, proc { |item, pokemon, battler, move,
|
||||
})
|
||||
|
||||
ItemHandlers::CanUseInBattle.copy(:POTION,
|
||||
:SUPERPOTION, :HYPERPOTION, :MAXPOTION, :BERRYJUICE, :SWEETHEART, :FRESHWATER,
|
||||
:SODAPOP, :LEMONADE, :MOOMOOMILK, :ORANBERRY, :SITRUSBERRY, :ENERGYPOWDER,
|
||||
:ENERGYROOT)
|
||||
:SUPERPOTION, :HYPERPOTION, :MAXPOTION,
|
||||
:BERRYJUICE, :SWEETHEART, :FRESHWATER, :SODAPOP,
|
||||
:LEMONADE, :MOOMOOMILK, :ORANBERRY, :SITRUSBERRY,
|
||||
:ENERGYPOWDER, :ENERGYROOT)
|
||||
ItemHandlers::CanUseInBattle.copy(:POTION, :RAGECANDYBAR) if !Settings::RAGE_CANDY_BAR_CURES_STATUS_PROBLEMS
|
||||
|
||||
ItemHandlers::CanUseInBattle.add(:AWAKENING, proc { |item, pokemon, battler, move, firstAction, battle, scene, showMessages|
|
||||
@@ -126,8 +127,9 @@ ItemHandlers::CanUseInBattle.add(:FULLHEAL, proc { |item, pokemon, battler, move
|
||||
})
|
||||
|
||||
ItemHandlers::CanUseInBattle.copy(:FULLHEAL,
|
||||
:LAVACOOKIE, :OLDGATEAU, :CASTELIACONE, :LUMIOSEGALETTE, :SHALOURSABLE,
|
||||
:BIGMALASADA, :PEWTERCRUNCHIES, :LUMBERRY, :HEALPOWDER)
|
||||
:LAVACOOKIE, :OLDGATEAU, :CASTELIACONE,
|
||||
:LUMIOSEGALETTE, :SHALOURSABLE, :BIGMALASADA,
|
||||
:PEWTERCRUNCHIES, :LUMBERRY, :HEALPOWDER)
|
||||
ItemHandlers::CanUseInBattle.copy(:FULLHEAL, :RAGECANDYBAR) if Settings::RAGE_CANDY_BAR_CURES_STATUS_PROBLEMS
|
||||
|
||||
ItemHandlers::CanUseInBattle.add(:FULLRESTORE, proc { |item, pokemon, battler, move, firstAction, battle, scene, showMessages|
|
||||
@@ -220,14 +222,16 @@ ItemHandlers::CanUseInBattle.add(:XDEFENSE, proc { |item, pokemon, battler, move
|
||||
})
|
||||
|
||||
ItemHandlers::CanUseInBattle.copy(:XDEFENSE,
|
||||
:XDEFENSE2, :XDEFENSE3, :XDEFENSE6, :XDEFEND, :XDEFEND2, :XDEFEND3, :XDEFEND6)
|
||||
:XDEFENSE2, :XDEFENSE3, :XDEFENSE6,
|
||||
:XDEFEND, :XDEFEND2, :XDEFEND3, :XDEFEND6)
|
||||
|
||||
ItemHandlers::CanUseInBattle.add(:XSPATK, proc { |item, pokemon, battler, move, firstAction, battle, scene, showMessages|
|
||||
next pbBattleItemCanRaiseStat?(:SPECIAL_ATTACK, battler, scene, showMessages)
|
||||
})
|
||||
|
||||
ItemHandlers::CanUseInBattle.copy(:XSPATK,
|
||||
:XSPATK2, :XSPATK3, :XSPATK6, :XSPECIAL, :XSPECIAL2, :XSPECIAL3, :XSPECIAL6)
|
||||
:XSPATK2, :XSPATK3, :XSPATK6,
|
||||
:XSPECIAL, :XSPECIAL2, :XSPECIAL3, :XSPECIAL6)
|
||||
|
||||
ItemHandlers::CanUseInBattle.add(:XSPDEF, proc { |item, pokemon, battler, move, firstAction, battle, scene, showMessages|
|
||||
next pbBattleItemCanRaiseStat?(:SPECIAL_DEFENSE, battler, scene, showMessages)
|
||||
@@ -429,8 +433,9 @@ ItemHandlers::BattleUseOnPokemon.add(:FULLHEAL, proc { |item, pokemon, battler,
|
||||
})
|
||||
|
||||
ItemHandlers::BattleUseOnPokemon.copy(:FULLHEAL,
|
||||
:LAVACOOKIE, :OLDGATEAU, :CASTELIACONE, :LUMIOSEGALETTE, :SHALOURSABLE,
|
||||
:BIGMALASADA, :PEWTERCRUNCHIES, :LUMBERRY)
|
||||
:LAVACOOKIE, :OLDGATEAU, :CASTELIACONE,
|
||||
:LUMIOSEGALETTE, :SHALOURSABLE, :BIGMALASADA,
|
||||
:PEWTERCRUNCHIES, :LUMBERRY)
|
||||
ItemHandlers::BattleUseOnPokemon.copy(:FULLHEAL, :RAGECANDYBAR) if Settings::RAGE_CANDY_BAR_CURES_STATUS_PROBLEMS
|
||||
|
||||
ItemHandlers::BattleUseOnPokemon.add(:FULLRESTORE, proc { |item, pokemon, battler, choices, scene|
|
||||
|
||||
@@ -397,7 +397,7 @@ class Phone
|
||||
if contact.common_event_call?
|
||||
if !pbCommonEvent(contact.common_event_id)
|
||||
pbMessage(_INTL("{1}'s messages not defined.\nCouldn't call common event {2}.",
|
||||
contact.display_name, contact.common_event_id))
|
||||
contact.display_name, contact.common_event_id))
|
||||
end
|
||||
else
|
||||
call = generate_trainer_dialogue(contact)
|
||||
@@ -421,7 +421,7 @@ class Phone
|
||||
if contact.common_event_call?
|
||||
if !pbCommonEvent(contact.common_event_id)
|
||||
pbMessage(_INTL("{1}'s messages not defined.\nCouldn't call common event {2}.",
|
||||
contact.display_name, contact.common_event_id))
|
||||
contact.display_name, contact.common_event_id))
|
||||
end
|
||||
else
|
||||
call = generate_trainer_dialogue(contact)
|
||||
|
||||
@@ -297,7 +297,7 @@ ItemHandlers::BattleUseOnPokemon.add(:JOYSCENT, proc { |item, pokemon, battler,
|
||||
if pokemon.hyper_mode
|
||||
pokemon.hyper_mode = false
|
||||
scene.pbDisplay(_INTL("{1} came to its senses from the {2}!",
|
||||
battler&.pbThis || pokemon.name, GameData::Item.get(item).name))
|
||||
battler&.pbThis || pokemon.name, GameData::Item.get(item).name))
|
||||
end
|
||||
pbRaiseHappinessAndReduceHeart(pokemon, scene, 1, false)
|
||||
next true
|
||||
@@ -307,7 +307,7 @@ ItemHandlers::BattleUseOnPokemon.add(:EXCITESCENT, proc { |item, pokemon, battle
|
||||
if pokemon.hyper_mode
|
||||
pokemon.hyper_mode = false
|
||||
scene.pbDisplay(_INTL("{1} came to its senses from the {2}!",
|
||||
battler&.pbThis || pokemon.name, GameData::Item.get(item).name))
|
||||
battler&.pbThis || pokemon.name, GameData::Item.get(item).name))
|
||||
end
|
||||
pbRaiseHappinessAndReduceHeart(pokemon, scene, 2, false)
|
||||
next true
|
||||
@@ -317,7 +317,7 @@ ItemHandlers::BattleUseOnPokemon.add(:VIVIDSCENT, proc { |item, pokemon, battler
|
||||
if pokemon.hyper_mode
|
||||
pokemon.hyper_mode = false
|
||||
scene.pbDisplay(_INTL("{1} came to its senses from the {2}!",
|
||||
battler&.pbThis || pokemon.name, GameData::Item.get(item).name))
|
||||
battler&.pbThis || pokemon.name, GameData::Item.get(item).name))
|
||||
end
|
||||
pbRaiseHappinessAndReduceHeart(pokemon, scene, 3, false)
|
||||
next true
|
||||
|
||||
@@ -592,7 +592,7 @@ class PokemonEvolutionScene
|
||||
newspeciesname = GameData::Species.get(@newspecies).name
|
||||
pbMessageDisplay(@sprites["msgwindow"],
|
||||
"\\se[]" + _INTL("Congratulations! Your {1} evolved into {2}!\\wt[80]",
|
||||
@pokemon.name, newspeciesname)) { pbUpdate }
|
||||
@pokemon.name, newspeciesname)) { pbUpdate }
|
||||
@sprites["msgwindow"].text = ""
|
||||
# Check for consumed item and check if Pokémon should be duplicated
|
||||
pbEvolutionMethodAfterEvolution
|
||||
|
||||
@@ -45,59 +45,59 @@ class Scene_Credits
|
||||
|
||||
# This next piece of code is the credits.
|
||||
# Start Editing
|
||||
CREDIT = <<_END_
|
||||
CREDIT = <<~_END_
|
||||
|
||||
Your credits go here.
|
||||
Your credits go here.
|
||||
|
||||
Your credits go here.
|
||||
Your credits go here.
|
||||
|
||||
Your credits go here.
|
||||
Your credits go here.
|
||||
|
||||
Your credits go here.
|
||||
Your credits go here.
|
||||
|
||||
Your credits go here.
|
||||
Your credits go here.
|
||||
|
||||
{INSERTS_PLUGIN_CREDITS_DO_NOT_REMOVE}
|
||||
{INSERTS_PLUGIN_CREDITS_DO_NOT_REMOVE}
|
||||
|
||||
"Pokémon Essentials" was created by:
|
||||
Flameguru
|
||||
Poccil (Peter O.)
|
||||
Maruno
|
||||
"Pokémon Essentials" was created by:
|
||||
Poccil (Peter O.)
|
||||
Maruno
|
||||
Inspired by work by Flameguru
|
||||
|
||||
With contributions from:
|
||||
AvatarMonkeyKirby<s>Marin
|
||||
Boushy<s>MiDas Mike
|
||||
Brother1440<s>Near Fantastica
|
||||
FL.<s>PinkMan
|
||||
Genzai Kawakami<s>Popper
|
||||
Golisopod User<s>Rataime
|
||||
help-14<s>Savordez
|
||||
IceGod64<s>SoundSpawn
|
||||
Jacob O. Wobbrock<s>the__end
|
||||
KitsuneKouta<s>Venom12
|
||||
Lisa Anthony<s>Wachunga
|
||||
Luka S.J.<s>
|
||||
and everyone else who helped out
|
||||
With contributions from:
|
||||
AvatarMonkeyKirby<s>Marin
|
||||
Boushy<s>MiDas Mike
|
||||
Brother1440<s>Near Fantastica
|
||||
FL.<s>PinkMan
|
||||
Genzai Kawakami<s>Popper
|
||||
Golisopod User<s>Rataime
|
||||
help-14<s>Savordez
|
||||
IceGod64<s>SoundSpawn
|
||||
Jacob O. Wobbrock<s>the__end
|
||||
KitsuneKouta<s>Venom12
|
||||
Lisa Anthony<s>Wachunga
|
||||
Luka S.J.<s>
|
||||
and everyone else who helped out
|
||||
|
||||
"mkxp-z" by:
|
||||
Roza
|
||||
Based on "mkxp" by Ancurio et al.
|
||||
"mkxp-z" by:
|
||||
Roza
|
||||
Based on "mkxp" by Ancurio et al.
|
||||
|
||||
"RPG Maker XP" by:
|
||||
Enterbrain
|
||||
"RPG Maker XP" by:
|
||||
Enterbrain
|
||||
|
||||
Pokémon is owned by:
|
||||
The Pokémon Company
|
||||
Nintendo
|
||||
Affiliated with Game Freak
|
||||
Pokémon is owned by:
|
||||
The Pokémon Company
|
||||
Nintendo
|
||||
Affiliated with Game Freak
|
||||
|
||||
|
||||
|
||||
This is a non-profit fan-made game.
|
||||
No copyright infringements intended.
|
||||
Please support the official games!
|
||||
This is a non-profit fan-made game.
|
||||
No copyright infringements intended.
|
||||
Please support the official games!
|
||||
|
||||
_END_
|
||||
_END_
|
||||
# Stop Editing
|
||||
|
||||
def main
|
||||
@@ -150,29 +150,31 @@ _END_
|
||||
lines_per_bitmap.times do |j|
|
||||
line = credit_lines[(i * lines_per_bitmap) + j]
|
||||
next if !line
|
||||
line += " " if line.end_with?("<s>")
|
||||
line = line.split("<s>")
|
||||
xpos = 0
|
||||
align = 1 # Centre align
|
||||
linewidth = Graphics.width
|
||||
line.length.times do |k|
|
||||
text = line[k].strip
|
||||
if line.length > 1
|
||||
xpos = (k == 0) ? 0 : 20 + (Graphics.width / 2)
|
||||
align = (k == 0) ? 2 : 0 # Right align : left align
|
||||
linewidth = (Graphics.width / 2) - 20
|
||||
end
|
||||
credit_bitmap.font.color = TEXT_SHADOW_COLOR
|
||||
credit_bitmap.draw_text(xpos, (j * 32) + 12, linewidth, 32, line[k], align)
|
||||
credit_bitmap.draw_text(xpos, (j * 32) + 12, linewidth, 32, text, align)
|
||||
credit_bitmap.font.color = TEXT_OUTLINE_COLOR
|
||||
credit_bitmap.draw_text(xpos + 2, (j * 32) + 2, linewidth, 32, line[k], align)
|
||||
credit_bitmap.draw_text(xpos, (j * 32) + 2, linewidth, 32, line[k], align)
|
||||
credit_bitmap.draw_text(xpos - 2, (j * 32) + 2, linewidth, 32, line[k], align)
|
||||
credit_bitmap.draw_text(xpos + 2, (j * 32) + 4, linewidth, 32, line[k], align)
|
||||
credit_bitmap.draw_text(xpos - 2, (j * 32) + 4, linewidth, 32, line[k], align)
|
||||
credit_bitmap.draw_text(xpos + 2, (j * 32) + 6, linewidth, 32, line[k], align)
|
||||
credit_bitmap.draw_text(xpos, (j * 32) + 6, linewidth, 32, line[k], align)
|
||||
credit_bitmap.draw_text(xpos - 2, (j * 32) + 6, linewidth, 32, line[k], align)
|
||||
credit_bitmap.draw_text(xpos + 2, (j * 32) + 2, linewidth, 32, text, align)
|
||||
credit_bitmap.draw_text(xpos, (j * 32) + 2, linewidth, 32, text, align)
|
||||
credit_bitmap.draw_text(xpos - 2, (j * 32) + 2, linewidth, 32, text, align)
|
||||
credit_bitmap.draw_text(xpos + 2, (j * 32) + 4, linewidth, 32, text, align)
|
||||
credit_bitmap.draw_text(xpos - 2, (j * 32) + 4, linewidth, 32, text, align)
|
||||
credit_bitmap.draw_text(xpos + 2, (j * 32) + 6, linewidth, 32, text, align)
|
||||
credit_bitmap.draw_text(xpos, (j * 32) + 6, linewidth, 32, text, align)
|
||||
credit_bitmap.draw_text(xpos - 2, (j * 32) + 6, linewidth, 32, text, align)
|
||||
credit_bitmap.font.color = TEXT_BASE_COLOR
|
||||
credit_bitmap.draw_text(xpos, (j * 32) + 4, linewidth, 32, line[k], align)
|
||||
credit_bitmap.draw_text(xpos, (j * 32) + 4, linewidth, 32, text, align)
|
||||
end
|
||||
end
|
||||
credit_sprite = Sprite.new(text_viewport)
|
||||
|
||||
@@ -546,7 +546,7 @@ class PokemonSummary_Scene
|
||||
showNature = !@pokemon.shadowPokemon? || @pokemon.heartStage <= 3
|
||||
if showNature
|
||||
nature_name = red_text_tag + @pokemon.nature.name + black_text_tag
|
||||
memo += _INTL("{1} nature.", @pokemon.nature.name) + "\n"
|
||||
memo += _INTL("{1} nature.", nature_name) + "\n"
|
||||
end
|
||||
# Write date received
|
||||
if @pokemon.timeReceived
|
||||
|
||||
@@ -114,10 +114,10 @@ class PokemonSaveScreen
|
||||
$game_temp.begun_new_game = false
|
||||
pbSEPlay("GUI save choice")
|
||||
if Game.save
|
||||
pbMessage("\\se[]" +_INTL("{1} saved the game.\\me[GUI save game]\\wtnp[30]", $player.name))
|
||||
pbMessage("\\se[]" + _INTL("{1} saved the game.\\me[GUI save game]\\wtnp[30]", $player.name))
|
||||
ret = true
|
||||
else
|
||||
pbMessage("\\se[]" +_INTL("Save failed.\\wtnp[30]"))
|
||||
pbMessage("\\se[]" + _INTL("Save failed.\\wtnp[30]"))
|
||||
ret = false
|
||||
end
|
||||
else
|
||||
|
||||
@@ -5,14 +5,14 @@ def pbPCItemStorage
|
||||
command = 0
|
||||
loop do
|
||||
command = pbShowCommandsWithHelp(nil,
|
||||
[_INTL("Withdraw Item"),
|
||||
_INTL("Deposit Item"),
|
||||
_INTL("Toss Item"),
|
||||
_INTL("Exit")],
|
||||
[_INTL("Take out items from the PC."),
|
||||
_INTL("Store items in the PC."),
|
||||
_INTL("Throw away items stored in the PC."),
|
||||
_INTL("Go back to the previous menu.")], -1, command)
|
||||
[_INTL("Withdraw Item"),
|
||||
_INTL("Deposit Item"),
|
||||
_INTL("Toss Item"),
|
||||
_INTL("Exit")],
|
||||
[_INTL("Take out items from the PC."),
|
||||
_INTL("Store items in the PC."),
|
||||
_INTL("Throw away items stored in the PC."),
|
||||
_INTL("Go back to the previous menu.")], -1, command)
|
||||
case command
|
||||
when 0 # Withdraw Item
|
||||
if !$PokemonGlobal.pcItemStorage
|
||||
@@ -170,14 +170,14 @@ MenuHandlers.add(:pc_menu, :pokemon_storage, {
|
||||
command = 0
|
||||
loop do
|
||||
command = pbShowCommandsWithHelp(nil,
|
||||
[_INTL("Organize Boxes"),
|
||||
_INTL("Withdraw Pokémon"),
|
||||
_INTL("Deposit Pokémon"),
|
||||
_INTL("See ya!")],
|
||||
[_INTL("Organize the Pokémon in Boxes and in your party."),
|
||||
_INTL("Move Pokémon stored in Boxes to your party."),
|
||||
_INTL("Store Pokémon in your party in Boxes."),
|
||||
_INTL("Return to the previous menu.")], -1, command)
|
||||
[_INTL("Organize Boxes"),
|
||||
_INTL("Withdraw Pokémon"),
|
||||
_INTL("Deposit Pokémon"),
|
||||
_INTL("See ya!")],
|
||||
[_INTL("Organize the Pokémon in Boxes and in your party."),
|
||||
_INTL("Move Pokémon stored in Boxes to your party."),
|
||||
_INTL("Store Pokémon in your party in Boxes."),
|
||||
_INTL("Return to the previous menu.")], -1, command)
|
||||
break if command < 0
|
||||
case command
|
||||
when 0 # Organize
|
||||
|
||||
@@ -616,7 +616,7 @@ class PokemonMartScreen
|
||||
end
|
||||
if GameData::Item.get(item).is_important?
|
||||
next if !pbConfirm(_INTL("So you want the {1}?\nIt'll be ${2}. All right?",
|
||||
itemname, price.to_s_formatted))
|
||||
itemname, price.to_s_formatted))
|
||||
quantity = 1
|
||||
else
|
||||
maxafford = (price <= 0) ? Settings::BAG_MAX_PER_SLOT : @adapter.getMoney / price
|
||||
|
||||
@@ -681,7 +681,7 @@ class DirectFlowDiagram
|
||||
@distance = 96
|
||||
end
|
||||
|
||||
# 0=none, 1=weak, 2=strong
|
||||
# 0=none, 1=weak, 2=strong
|
||||
def setFlowStrength(strength)
|
||||
@strength = strength
|
||||
end
|
||||
@@ -755,7 +755,7 @@ class FlowDiagram
|
||||
@distance = 96
|
||||
end
|
||||
|
||||
# 0=none, 1=weak, 2=strong
|
||||
# 0=none, 1=weak, 2=strong
|
||||
def setFlowStrength(strength)
|
||||
@strength = strength
|
||||
end
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
################################################################################
|
||||
#===============================================================================
|
||||
# "Lottery" mini-game
|
||||
# By Maruno
|
||||
################################################################################
|
||||
#===============================================================================
|
||||
def pbSetLotteryNumber(variable = 1)
|
||||
t = pbGetTimeNow
|
||||
hash = t.day + (t.month << 5) + (t.year << 9)
|
||||
|
||||
@@ -238,9 +238,6 @@ class StandardRules < PokemonRuleSet
|
||||
end
|
||||
end
|
||||
|
||||
###########################################
|
||||
# Generation IV Cups
|
||||
###########################################
|
||||
#===============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
|
||||
@@ -48,14 +48,16 @@ class LevelAdjustment
|
||||
adj1 = nil
|
||||
adj2 = nil
|
||||
ret = [getOldExp(team1, team2), getOldExp(team2, team1)]
|
||||
if @adjustment == BOTH_TEAMS || @adjustment == MY_TEAM
|
||||
case @adjustment
|
||||
when BOTH_TEAMS
|
||||
adj1 = getAdjustment(team1, team2)
|
||||
elsif @adjustment == BOTH_TEAMS_DIFFERENT
|
||||
adj1 = getMyAdjustment(team1, team2)
|
||||
end
|
||||
if @adjustment == BOTH_TEAMS || @adjustment == ENEMY_TEAM
|
||||
adj2 = getAdjustment(team2, team1)
|
||||
elsif @adjustment == BOTH_TEAMS_DIFFERENT
|
||||
when MY_TEAM
|
||||
adj1 = getAdjustment(team1, team2)
|
||||
when ENEMY_TEAM
|
||||
adj2 = getAdjustment(team2, team1)
|
||||
when BOTH_TEAMS_DIFFERENT
|
||||
adj1 = getMyAdjustment(team1, team2)
|
||||
adj2 = getTheirAdjustment(team2, team1)
|
||||
end
|
||||
if adj1
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
module BattleAnimationEditor
|
||||
module_function
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
# Controls
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
class Window_Menu < Window_CommandPokemon
|
||||
def initialize(commands, x, y)
|
||||
tempbitmap = Bitmap.new(32, 32)
|
||||
@@ -41,9 +41,9 @@ module BattleAnimationEditor
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
# Clipboard
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
module Clipboard
|
||||
@data = nil
|
||||
@typekey = ""
|
||||
@@ -63,9 +63,9 @@ module BattleAnimationEditor
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
def pbTrackPopupMenu(commands)
|
||||
mousepos = Mouse.getMousePos
|
||||
return -1 if !mousepos
|
||||
@@ -94,9 +94,9 @@ module BattleAnimationEditor
|
||||
return -1
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
# Sprite sheet scrolling bar
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
class AnimationWindow < Sprite
|
||||
attr_reader :animbitmap
|
||||
attr_reader :start
|
||||
@@ -232,9 +232,9 @@ module BattleAnimationEditor
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
class CanvasAnimationWindow < AnimationWindow
|
||||
def animbitmap
|
||||
return @canvas.animbitmap
|
||||
@@ -246,9 +246,9 @@ module BattleAnimationEditor
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
# Cel sprite
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
class InvalidatableSprite < Sprite
|
||||
def initialize(viewport = nil)
|
||||
super(viewport)
|
||||
@@ -283,9 +283,9 @@ module BattleAnimationEditor
|
||||
def refresh; end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
class SpriteFrame < InvalidatableSprite
|
||||
attr_reader :id
|
||||
attr_reader :locked
|
||||
@@ -352,9 +352,9 @@ module BattleAnimationEditor
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
# Canvas
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
class AnimationCanvas < Sprite
|
||||
attr_reader :viewport
|
||||
attr_reader :sprites
|
||||
@@ -930,9 +930,9 @@ module BattleAnimationEditor
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
# Window classes
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
class BitmapDisplayWindow < SpriteWindow_Base
|
||||
attr_reader :bitmapname
|
||||
attr_reader :hue
|
||||
@@ -982,9 +982,9 @@ module BattleAnimationEditor
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
class AnimationNameWindow
|
||||
def initialize(canvas, x, y, width, height, viewport = nil)
|
||||
@canvas = canvas
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
module BattleAnimationEditor
|
||||
module_function
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
module ShadowText
|
||||
def shadowtext(bitmap, x, y, w, h, t, disabled = false, align = 0)
|
||||
width = bitmap.text_size(t).width
|
||||
@@ -19,9 +17,9 @@ module BattleAnimationEditor
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
class UIControl
|
||||
include ShadowText
|
||||
attr_accessor :bitmap
|
||||
@@ -95,9 +93,9 @@ module BattleAnimationEditor
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
class Label < UIControl
|
||||
def text=(value)
|
||||
self.label = value
|
||||
@@ -112,9 +110,9 @@ module BattleAnimationEditor
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
class Button < UIControl
|
||||
attr_accessor :label
|
||||
|
||||
@@ -169,9 +167,9 @@ module BattleAnimationEditor
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
class Checkbox < Button
|
||||
attr_reader :checked
|
||||
|
||||
@@ -230,9 +228,9 @@ module BattleAnimationEditor
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
class TextField < UIControl
|
||||
attr_accessor :label
|
||||
attr_reader :text
|
||||
@@ -366,9 +364,9 @@ module BattleAnimationEditor
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
class Slider < UIControl
|
||||
attr_reader :minvalue
|
||||
attr_reader :maxvalue
|
||||
@@ -480,9 +478,9 @@ module BattleAnimationEditor
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
class OptionalSlider < Slider
|
||||
def initialize(label, minvalue, maxvalue, curvalue)
|
||||
@slider = Slider.new(label, minvalue, maxvalue, curvalue)
|
||||
@@ -551,7 +549,7 @@ module BattleAnimationEditor
|
||||
@checkbox.refresh
|
||||
end
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
private
|
||||
|
||||
@@ -573,9 +571,9 @@ module BattleAnimationEditor
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
class ArrayCountSlider < Slider
|
||||
def maxvalue
|
||||
return @array.length - 1
|
||||
@@ -587,9 +585,9 @@ module BattleAnimationEditor
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
class FrameCountSlider < Slider
|
||||
def maxvalue
|
||||
return @canvas.animation.length
|
||||
@@ -601,9 +599,9 @@ module BattleAnimationEditor
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
class FrameCountButton < Button
|
||||
def label
|
||||
return _INTL("Total Frames: {1}", @canvas.animation.length)
|
||||
@@ -615,9 +613,9 @@ module BattleAnimationEditor
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
class TextSlider < UIControl
|
||||
attr_reader :minvalue
|
||||
attr_reader :maxvalue
|
||||
@@ -735,9 +733,9 @@ module BattleAnimationEditor
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
class OptionalTextSlider < TextSlider
|
||||
def initialize(label, options, curval)
|
||||
@slider = TextSlider.new(label, options, curval)
|
||||
@@ -806,7 +804,7 @@ module BattleAnimationEditor
|
||||
@checkbox.refresh
|
||||
end
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
private
|
||||
|
||||
@@ -828,9 +826,9 @@ module BattleAnimationEditor
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
class ControlWindow < SpriteWindow_Base
|
||||
attr_reader :controls
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
module BattleAnimationEditor
|
||||
module_function
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
# Paths and interpolation
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
class ControlPointSprite < Sprite
|
||||
attr_accessor :dragging
|
||||
|
||||
@@ -51,9 +51,9 @@ module BattleAnimationEditor
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
class PointSprite < Sprite
|
||||
def initialize(x, y, viewport = nil)
|
||||
super(viewport)
|
||||
@@ -69,9 +69,9 @@ module BattleAnimationEditor
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
class PointPath
|
||||
include Enumerable
|
||||
|
||||
@@ -179,9 +179,9 @@ module BattleAnimationEditor
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
def catmullRom(p1, p2, p3, p4, t)
|
||||
# p1=prevPoint, p2=startPoint, p3=endPoint, p4=nextPoint, t is from 0 through 1
|
||||
t2 = t * t
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
module BattleAnimationEditor
|
||||
module_function
|
||||
|
||||
################################################################################
|
||||
#=============================================================================
|
||||
# Importing and exporting
|
||||
################################################################################
|
||||
#=============================================================================
|
||||
def pbRgssChdir(dir)
|
||||
RTP.eachPathFor(dir) { |path| Dir.chdir(path) { yield } }
|
||||
end
|
||||
@@ -83,9 +83,9 @@ module BattleAnimationEditor
|
||||
return
|
||||
end
|
||||
|
||||
################################################################################
|
||||
#=============================================================================
|
||||
# Format conversion
|
||||
################################################################################
|
||||
#=============================================================================
|
||||
def pbConvertAnimToNewFormat(textdata)
|
||||
needconverting = false
|
||||
textdata.length.times do |i|
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
module BattleAnimationEditor
|
||||
module_function
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
# Mini battle scene
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
class MiniBattler
|
||||
attr_accessor :index
|
||||
attr_accessor :pokemon
|
||||
@@ -11,9 +11,9 @@ module BattleAnimationEditor
|
||||
def initialize(index); self.index = index; end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
#
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
class MiniBattle
|
||||
attr_accessor :battlers
|
||||
|
||||
@@ -23,9 +23,9 @@ module BattleAnimationEditor
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
# Pop-up menus for buttons in bottom menu
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
def pbSelectAnim(canvas, animwin)
|
||||
animfiles = []
|
||||
pbRgssChdir(File.join("Graphics", "Animations")) { animfiles.concat(Dir.glob("*.png")) }
|
||||
@@ -182,9 +182,9 @@ module BattleAnimationEditor
|
||||
cmdwin.dispose
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
# Pop-up menus for individual cels
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
def pbChooseNum(cel)
|
||||
ret = cel
|
||||
sliderwin2 = ControlWindow.new(0, 0, 320, 32 * 5)
|
||||
@@ -370,9 +370,9 @@ module BattleAnimationEditor
|
||||
return
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
# Pop-up menus for buttons in right hand menu
|
||||
#===============================================================================
|
||||
#=============================================================================
|
||||
def pbTimingList(canvas)
|
||||
commands = []
|
||||
cmdNewSound = -1
|
||||
|
||||
@@ -260,7 +260,7 @@ module Compiler
|
||||
(0...values.length).each do |i|
|
||||
value = values[i]
|
||||
next if !value || value.empty?
|
||||
quote_count = value.count('"') #scan(/(?:^|\G|[^\\])(\\)*"/).length
|
||||
quote_count = value.count('"')
|
||||
if !quote_count.zero?
|
||||
# Quote marks found in value
|
||||
(i...(values.length - 1)).each do |j|
|
||||
|
||||
@@ -606,15 +606,19 @@ module Compiler
|
||||
push_choice(firstpage.list, 0, "Yes", 3)
|
||||
if common_event > 0
|
||||
if battleid > 0
|
||||
push_script(firstpage.list, sprintf("Phone.add(get_self,\n %s, %d, %d, %d\n)", brieftrcombo, battles.length, battleid, common_event), 3)
|
||||
push_script(firstpage.list, sprintf("Phone.add(get_self,\n %s, %d, %d, %d\n)",
|
||||
brieftrcombo, battles.length, battleid, common_event), 3)
|
||||
else
|
||||
push_script(firstpage.list, sprintf("Phone.add(get_self,\n %s, %d, nil, %d\n)", brieftrcombo, battles.length, common_event), 3)
|
||||
push_script(firstpage.list, sprintf("Phone.add(get_self,\n %s, %d, nil, %d\n)",
|
||||
brieftrcombo, battles.length, common_event), 3)
|
||||
end
|
||||
else
|
||||
if battleid > 0
|
||||
push_script(firstpage.list, sprintf("Phone.add(get_self,\n %s, %d, %d\n)", brieftrcombo, battles.length, battleid), 3)
|
||||
push_script(firstpage.list, sprintf("Phone.add(get_self,\n %s, %d, %d\n)",
|
||||
brieftrcombo, battles.length, battleid), 3)
|
||||
else
|
||||
push_script(firstpage.list, sprintf("Phone.add(get_self,\n %s, %d\n)", brieftrcombo, battles.length), 3)
|
||||
push_script(firstpage.list, sprintf("Phone.add(get_self,\n %s, %d\n)",
|
||||
brieftrcombo, battles.length), 3)
|
||||
end
|
||||
end
|
||||
push_choice(firstpage.list, 1, "No", 3)
|
||||
@@ -694,15 +698,19 @@ module Compiler
|
||||
push_choice(lastpage.list, 0, "Yes", 2)
|
||||
if common_event > 0
|
||||
if battleid > 0
|
||||
push_script(lastpage.list, sprintf("Phone.add(get_self,\n %s, %d, %d, %d\n)", brieftrcombo, battles.length, battleid, common_event), 2)
|
||||
push_script(lastpage.list, sprintf("Phone.add(get_self,\n %s, %d, %d, %d\n)",
|
||||
brieftrcombo, battles.length, battleid, common_event), 2)
|
||||
else
|
||||
push_script(lastpage.list, sprintf("Phone.add(get_self,\n %s, %d, nil, %d\n)", brieftrcombo, battles.length, common_event), 2)
|
||||
push_script(lastpage.list, sprintf("Phone.add(get_self,\n %s, %d, nil, %d\n)",
|
||||
brieftrcombo, battles.length, common_event), 2)
|
||||
end
|
||||
else
|
||||
if battleid > 0
|
||||
push_script(lastpage.list, sprintf("Phone.add(get_self,\n %s, %d, %d\n)", brieftrcombo, battles.length, battleid), 2)
|
||||
push_script(lastpage.list, sprintf("Phone.add(get_self,\n %s, %d, %d\n)",
|
||||
brieftrcombo, battles.length, battleid), 2)
|
||||
else
|
||||
push_script(lastpage.list, sprintf("Phone.add(get_self,\n %s, %d\n)", brieftrcombo, battles.length), 2)
|
||||
push_script(lastpage.list, sprintf("Phone.add(get_self,\n %s, %d\n)",
|
||||
brieftrcombo, battles.length), 2)
|
||||
end
|
||||
end
|
||||
push_choice(lastpage.list, 1, "No", 2)
|
||||
|
||||
Reference in New Issue
Block a user