mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-06-18 01:04:14 +00:00
More aligning of code
This commit is contained in:
@@ -953,7 +953,8 @@ class Interpreter
|
|||||||
sscreen = PokemonEntry.new(sscene)
|
sscreen = PokemonEntry.new(sscene)
|
||||||
$game_actors[@parameters[0]].name = sscreen.pbStartScreen(
|
$game_actors[@parameters[0]].name = sscreen.pbStartScreen(
|
||||||
_INTL("Enter {1}'s name.", $game_actors[@parameters[0]].name),
|
_INTL("Enter {1}'s name.", $game_actors[@parameters[0]].name),
|
||||||
1, @parameters[1], $game_actors[@parameters[0]].name)
|
1, @parameters[1], $game_actors[@parameters[0]].name
|
||||||
|
)
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
|
|||||||
@@ -270,15 +270,14 @@ class PokemonMapFactory
|
|||||||
# the array (3,-4), because (5-2=3) and (1-5=-4).
|
# the array (3,-4), because (5-2=3) and (1-5=-4).
|
||||||
def getThisAndOtherEventRelativePos(thisEvent, otherEvent)
|
def getThisAndOtherEventRelativePos(thisEvent, otherEvent)
|
||||||
return [0, 0] if !thisEvent || !otherEvent
|
return [0, 0] if !thisEvent || !otherEvent
|
||||||
return getRelativePos(
|
return getRelativePos(thisEvent.map.map_id, thisEvent.x, thisEvent.y,
|
||||||
thisEvent.map.map_id, thisEvent.x, thisEvent.y,
|
|
||||||
otherEvent.map.map_id, otherEvent.x, otherEvent.y)
|
otherEvent.map.map_id, otherEvent.x, otherEvent.y)
|
||||||
end
|
end
|
||||||
|
|
||||||
def getThisAndOtherPosRelativePos(thisEvent, otherMapID, otherX, otherY)
|
def getThisAndOtherPosRelativePos(thisEvent, otherMapID, otherX, otherY)
|
||||||
return [0, 0] if !thisEvent
|
return [0, 0] if !thisEvent
|
||||||
return getRelativePos(
|
return getRelativePos(thisEvent.map.map_id, thisEvent.x, thisEvent.y,
|
||||||
thisEvent.map.map_id, thisEvent.x, thisEvent.y, otherMapID, otherX, otherY)
|
otherMapID, otherX, otherY)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Unused
|
# Unused
|
||||||
|
|||||||
@@ -117,7 +117,8 @@ class Sprite_Character < RPG::Sprite
|
|||||||
self.oy = @ch
|
self.oy = @ch
|
||||||
else
|
else
|
||||||
@charbitmap = AnimatedBitmap.new(
|
@charbitmap = AnimatedBitmap.new(
|
||||||
'Graphics/Characters/' + @character_name, @character_hue)
|
'Graphics/Characters/' + @character_name, @character_hue
|
||||||
|
)
|
||||||
RPG::Cache.retain('Graphics/Characters/', @character_name, @character_hue) if @character == $game_player
|
RPG::Cache.retain('Graphics/Characters/', @character_name, @character_hue) if @character == $game_player
|
||||||
@charbitmapAnimated = true
|
@charbitmapAnimated = true
|
||||||
@bushbitmap.dispose if @bushbitmap
|
@bushbitmap.dispose if @bushbitmap
|
||||||
|
|||||||
@@ -45,8 +45,8 @@ class Sprite_Shadow < RPG::Sprite
|
|||||||
self.ox = 16
|
self.ox = 16
|
||||||
self.oy = 32
|
self.oy = 32
|
||||||
else
|
else
|
||||||
@chbitmap = AnimatedBitmap.new(
|
@chbitmap = AnimatedBitmap.new('Graphics/Characters/' + @character.character_name,
|
||||||
'Graphics/Characters/' + @character.character_name, @character.character_hue)
|
@character.character_hue)
|
||||||
@cw = @chbitmap.width / 4
|
@cw = @chbitmap.width / 4
|
||||||
@ch = @chbitmap.height / 4
|
@ch = @chbitmap.height / 4
|
||||||
self.ox = @cw / 2
|
self.ox = @cw / 2
|
||||||
|
|||||||
@@ -180,8 +180,7 @@ def bltMinimapAutotile(dstBitmap, x, y, srcBitmap, id)
|
|||||||
src = Rect.new(0, 0, 0, 0)
|
src = Rect.new(0, 0, 0, 0)
|
||||||
for i in 0...4
|
for i in 0...4
|
||||||
tile_position = tiles[i] - 1
|
tile_position = tiles[i] - 1
|
||||||
src.set(
|
src.set(tile_position % 6 * cxTile + anim,
|
||||||
tile_position % 6 * cxTile + anim,
|
|
||||||
tile_position / 6 * cyTile, cxTile, cyTile)
|
tile_position / 6 * cyTile, cxTile, cyTile)
|
||||||
dstBitmap.blt(i % 2 * cxTile + x, i / 2 * cyTile + y, srcBitmap, src)
|
dstBitmap.blt(i % 2 * cxTile + x, i / 2 * cyTile + y, srcBitmap, src)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -522,24 +522,19 @@ class Window
|
|||||||
@cursorbitmap.clear
|
@cursorbitmap.clear
|
||||||
@sprites["cursor"].bitmap = @cursorbitmap
|
@sprites["cursor"].bitmap = @cursorbitmap
|
||||||
@sprites["cursor"].src_rect.set(0, 0, width, height)
|
@sprites["cursor"].src_rect.set(0, 0, width, height)
|
||||||
rect = Rect.new(margin, margin,
|
rect = Rect.new(margin, margin, width - fullmargin, height - fullmargin)
|
||||||
width - fullmargin, height - fullmargin)
|
|
||||||
@cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[8])
|
@cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[8])
|
||||||
@cursorbitmap.blt(0, 0, @_windowskin, cursorrects[4]) # top left
|
@cursorbitmap.blt(0, 0, @_windowskin, cursorrects[4]) # top left
|
||||||
@cursorbitmap.blt(width - margin, 0, @_windowskin, cursorrects[5]) # top right
|
@cursorbitmap.blt(width - margin, 0, @_windowskin, cursorrects[5]) # top right
|
||||||
@cursorbitmap.blt(0, height - margin, @_windowskin, cursorrects[6]) # bottom right
|
@cursorbitmap.blt(0, height - margin, @_windowskin, cursorrects[6]) # bottom right
|
||||||
@cursorbitmap.blt(width - margin, height - margin, @_windowskin, cursorrects[7]) # bottom left
|
@cursorbitmap.blt(width - margin, height - margin, @_windowskin, cursorrects[7]) # bottom left
|
||||||
rect = Rect.new(margin, 0,
|
rect = Rect.new(margin, 0, width - fullmargin, margin)
|
||||||
width - fullmargin, margin)
|
|
||||||
@cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[0])
|
@cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[0])
|
||||||
rect = Rect.new(0, margin,
|
rect = Rect.new(0, margin, margin, height - fullmargin)
|
||||||
margin, height - fullmargin)
|
|
||||||
@cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[1])
|
@cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[1])
|
||||||
rect = Rect.new(width - margin, margin,
|
rect = Rect.new(width - margin, margin, margin, height - fullmargin)
|
||||||
margin, height - fullmargin)
|
|
||||||
@cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[2])
|
@cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[2])
|
||||||
rect = Rect.new(margin, height - margin,
|
rect = Rect.new(margin, height - margin, width - fullmargin, margin)
|
||||||
width - fullmargin, margin)
|
|
||||||
@cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[3])
|
@cursorbitmap.stretch_blt(rect, @_windowskin, cursorrects[3])
|
||||||
else
|
else
|
||||||
@sprites["cursor"].visible = false
|
@sprites["cursor"].visible = false
|
||||||
@@ -553,8 +548,7 @@ class Window
|
|||||||
@sprites["side#{i}"].src_rect.set(0, 0, dwidth, dheight)
|
@sprites["side#{i}"].src_rect.set(0, 0, dwidth, dheight)
|
||||||
@sidebitmaps[i].clear
|
@sidebitmaps[i].clear
|
||||||
if sideRects[i].width > 0 && sideRects[i].height > 0
|
if sideRects[i].width > 0 && sideRects[i].height > 0
|
||||||
@sidebitmaps[i].stretch_blt(@sprites["side#{i}"].src_rect,
|
@sidebitmaps[i].stretch_blt(@sprites["side#{i}"].src_rect, @_windowskin, sideRects[i])
|
||||||
@_windowskin, sideRects[i])
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
backwidth = @width - 4
|
backwidth = @width - 4
|
||||||
|
|||||||
@@ -618,8 +618,7 @@ class SpriteWindow < Window
|
|||||||
@sprites["corner1"].src_rect.set(cx, 0, endX, startY)
|
@sprites["corner1"].src_rect.set(cx, 0, endX, startY)
|
||||||
@sprites["corner2"].src_rect.set(0, cy, startX, endY)
|
@sprites["corner2"].src_rect.set(0, cy, startX, endY)
|
||||||
@sprites["corner3"].src_rect.set(cx, cy, endX, endY)
|
@sprites["corner3"].src_rect.set(cx, cy, endX, endY)
|
||||||
backRect = Rect.new(@skinrect.x, @skinrect.y,
|
backRect = Rect.new(@skinrect.x, @skinrect.y, @skinrect.width, @skinrect.height)
|
||||||
@skinrect.width, @skinrect.height)
|
|
||||||
blindsRect = nil
|
blindsRect = nil
|
||||||
sideRects = [
|
sideRects = [
|
||||||
Rect.new(startX, 0, @skinrect.width, startY), # side0 (top)
|
Rect.new(startX, 0, @skinrect.width, startY), # side0 (top)
|
||||||
|
|||||||
@@ -1344,8 +1344,7 @@ class Window_AdvancedCommandPokemon < Window_DrawableCommand
|
|||||||
pbDrawShadowText(self.contents, rect.x, rect.y, rect.width, rect.height,
|
pbDrawShadowText(self.contents, rect.x, rect.y, rect.width, rect.height,
|
||||||
@commands[index], self.baseColor, self.shadowColor)
|
@commands[index], self.baseColor, self.shadowColor)
|
||||||
else
|
else
|
||||||
chars = getFormattedText(
|
chars = getFormattedText(self.contents, rect.x, rect.y + 4, rect.width, rect.height,
|
||||||
self.contents, rect.x, rect.y + 4, rect.width, rect.height,
|
|
||||||
@commands[index], rect.height, true, true)
|
@commands[index], rect.height, true, true)
|
||||||
drawFormattedChars(self.contents, chars)
|
drawFormattedChars(self.contents, chars)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -163,8 +163,7 @@ def getFormattedTextForDims(bitmap, xDst, yDst, widthDst, heightDst, text, lineh
|
|||||||
if newlineBreaks
|
if newlineBreaks
|
||||||
text2.gsub!(/<(\/?)(br)(\s*\=\s*([^>]*))?>/i, "\n")
|
text2.gsub!(/<(\/?)(br)(\s*\=\s*([^>]*))?>/i, "\n")
|
||||||
end
|
end
|
||||||
return getFormattedText(
|
return getFormattedText(bitmap, xDst, yDst, widthDst, heightDst,
|
||||||
bitmap, xDst, yDst, widthDst, heightDst,
|
|
||||||
text2, lineheight, newlineBreaks,
|
text2, lineheight, newlineBreaks,
|
||||||
explicitBreaksOnly, true)
|
explicitBreaksOnly, true)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -701,8 +701,8 @@ class Battle
|
|||||||
@field.weather = newWeather
|
@field.weather = newWeather
|
||||||
duration = (fixedDuration) ? 5 : -1
|
duration = (fixedDuration) ? 5 : -1
|
||||||
if duration > 0 && user && user.itemActive?
|
if duration > 0 && user && user.itemActive?
|
||||||
duration = Battle::ItemEffects.triggerWeatherExtender(user.item,
|
duration = Battle::ItemEffects.triggerWeatherExtender(user.item, @field.weather,
|
||||||
@field.weather, duration, user, self)
|
duration, user, self)
|
||||||
end
|
end
|
||||||
@field.weatherDuration = duration
|
@field.weatherDuration = duration
|
||||||
weather_data = GameData::BattleWeather.try_get(@field.weather)
|
weather_data = GameData::BattleWeather.try_get(@field.weather)
|
||||||
@@ -779,8 +779,8 @@ class Battle
|
|||||||
@field.terrain = newTerrain
|
@field.terrain = newTerrain
|
||||||
duration = (fixedDuration) ? 5 : -1
|
duration = (fixedDuration) ? 5 : -1
|
||||||
if duration > 0 && user && user.itemActive?
|
if duration > 0 && user && user.itemActive?
|
||||||
duration = Battle::ItemEffects.triggerTerrainExtender(user.item,
|
duration = Battle::ItemEffects.triggerTerrainExtender(user.item, newTerrain,
|
||||||
newTerrain, duration, user, self)
|
duration, user, self)
|
||||||
end
|
end
|
||||||
@field.terrainDuration = duration
|
@field.terrainDuration = duration
|
||||||
terrain_data = GameData::BattleTerrain.try_get(@field.terrain)
|
terrain_data = GameData::BattleTerrain.try_get(@field.terrain)
|
||||||
|
|||||||
@@ -24,13 +24,11 @@ class Battle
|
|||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
if party[idxParty].fainted?
|
if party[idxParty].fainted?
|
||||||
partyScene.pbDisplay(_INTL("{1} has no energy left to battle!",
|
partyScene.pbDisplay(_INTL("{1} has no energy left to battle!", party[idxParty].name)) if partyScene
|
||||||
party[idxParty].name)) if partyScene
|
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
if pbFindBattler(idxParty, idxBattler)
|
if pbFindBattler(idxParty, idxBattler)
|
||||||
partyScene.pbDisplay(_INTL("{1} is already in battle!",
|
partyScene.pbDisplay(_INTL("{1} is already in battle!", party[idxParty].name)) if partyScene
|
||||||
party[idxParty].name)) if partyScene
|
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
|
|||||||
@@ -128,8 +128,8 @@ class Battle
|
|||||||
next false
|
next false
|
||||||
end
|
end
|
||||||
next false if !pkmn
|
next false if !pkmn
|
||||||
next false if !ItemHandlers.triggerCanUseInBattle(item,
|
next false if !ItemHandlers.triggerCanUseInBattle(item, pkmn, battler, idxMove,
|
||||||
pkmn, battler, idxMove, firstAction, self, itemScene)
|
firstAction, self, itemScene)
|
||||||
next false if !pbRegisterItem(idxBattler, item, idxPkmn, idxMove)
|
next false if !pbRegisterItem(idxBattler, item, idxPkmn, idxMove)
|
||||||
ret = true
|
ret = true
|
||||||
next true
|
next true
|
||||||
|
|||||||
@@ -142,15 +142,18 @@ class Battle::Battler
|
|||||||
end
|
end
|
||||||
if abilityActive?
|
if abilityActive?
|
||||||
return false if !@battle.moldBreaker && Battle::AbilityEffects.triggerStatLossImmunity(
|
return false if !@battle.moldBreaker && Battle::AbilityEffects.triggerStatLossImmunity(
|
||||||
self.ability, self, stat, @battle, showFailMsg)
|
self.ability, self, stat, @battle, showFailMsg
|
||||||
|
)
|
||||||
return false if Battle::AbilityEffects.triggerStatLossImmunityNonIgnorable(
|
return false if Battle::AbilityEffects.triggerStatLossImmunityNonIgnorable(
|
||||||
self.ability, self, stat, @battle, showFailMsg)
|
self.ability, self, stat, @battle, showFailMsg
|
||||||
|
)
|
||||||
end
|
end
|
||||||
if !@battle.moldBreaker
|
if !@battle.moldBreaker
|
||||||
allAllies.each do |b|
|
allAllies.each do |b|
|
||||||
next if !b.abilityActive?
|
next if !b.abilityActive?
|
||||||
return false if Battle::AbilityEffects.triggerStatLossImmunityFromAlly(
|
return false if Battle::AbilityEffects.triggerStatLossImmunityFromAlly(
|
||||||
b.ability, b, self, stat, @battle, showFailMsg)
|
b.ability, b, self, stat, @battle, showFailMsg
|
||||||
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -87,8 +87,7 @@ class Battle::Battler
|
|||||||
# executing them)
|
# executing them)
|
||||||
if hasActiveItem?(:ASSAULTVEST) && move.statusMove? && move.id != :MEFIRST && commandPhase
|
if hasActiveItem?(:ASSAULTVEST) && move.statusMove? && move.id != :MEFIRST && commandPhase
|
||||||
if showMessages
|
if showMessages
|
||||||
msg = _INTL("The effects of the {1} prevent status moves from being used!",
|
msg = _INTL("The effects of the {1} prevent status moves from being used!", itemName)
|
||||||
itemName)
|
|
||||||
(commandPhase) ? @battle.pbDisplayPaused(msg) : @battle.pbDisplay(msg)
|
(commandPhase) ? @battle.pbDisplayPaused(msg) : @battle.pbDisplay(msg)
|
||||||
end
|
end
|
||||||
return false
|
return false
|
||||||
|
|||||||
@@ -86,8 +86,8 @@ class Battle::Move
|
|||||||
return false if @battle.moldBreaker
|
return false if @battle.moldBreaker
|
||||||
ret = false
|
ret = false
|
||||||
if target.abilityActive?
|
if target.abilityActive?
|
||||||
ret = Battle::AbilityEffects.triggerMoveImmunity(target.ability,
|
ret = Battle::AbilityEffects.triggerMoveImmunity(target.ability, user, target,
|
||||||
user, target, self, @calcType, @battle, show_message)
|
self, @calcType, @battle, show_message)
|
||||||
end
|
end
|
||||||
return ret
|
return ret
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -131,26 +131,31 @@ class Battle::Move
|
|||||||
def pbCalcAccuracyModifiers(user, target, modifiers)
|
def pbCalcAccuracyModifiers(user, target, modifiers)
|
||||||
# Ability effects that alter accuracy calculation
|
# Ability effects that alter accuracy calculation
|
||||||
if user.abilityActive?
|
if user.abilityActive?
|
||||||
Battle::AbilityEffects.triggerAccuracyCalcFromUser(user.ability,
|
Battle::AbilityEffects.triggerAccuracyCalcFromUser(
|
||||||
modifiers, user, target, self, @calcType)
|
user.ability, modifiers, user, target, self, @calcType
|
||||||
|
)
|
||||||
end
|
end
|
||||||
user.allAllies.each do |b|
|
user.allAllies.each do |b|
|
||||||
next if !b.abilityActive?
|
next if !b.abilityActive?
|
||||||
Battle::AbilityEffects.triggerAccuracyCalcFromAlly(b.ability,
|
Battle::AbilityEffects.triggerAccuracyCalcFromAlly(
|
||||||
modifiers, user, target, self, @calcType)
|
b.ability, modifiers, user, target, self, @calcType
|
||||||
|
)
|
||||||
end
|
end
|
||||||
if target.abilityActive? && !@battle.moldBreaker
|
if target.abilityActive? && !@battle.moldBreaker
|
||||||
Battle::AbilityEffects.triggerAccuracyCalcFromTarget(target.ability,
|
Battle::AbilityEffects.triggerAccuracyCalcFromTarget(
|
||||||
modifiers, user, target, self, @calcType)
|
target.ability, modifiers, user, target, self, @calcType
|
||||||
|
)
|
||||||
end
|
end
|
||||||
# Item effects that alter accuracy calculation
|
# Item effects that alter accuracy calculation
|
||||||
if user.itemActive?
|
if user.itemActive?
|
||||||
Battle::ItemEffects.triggerAccuracyCalcFromUser(user.item,
|
Battle::ItemEffects.triggerAccuracyCalcFromUser(
|
||||||
modifiers, user, target, self, @calcType)
|
user.item, modifiers, user, target, self, @calcType
|
||||||
|
)
|
||||||
end
|
end
|
||||||
if target.itemActive?
|
if target.itemActive?
|
||||||
Battle::ItemEffects.triggerAccuracyCalcFromTarget(target.item,
|
Battle::ItemEffects.triggerAccuracyCalcFromTarget(
|
||||||
modifiers, user, target, self, @calcType)
|
target.item, modifiers, user, target, self, @calcType
|
||||||
|
)
|
||||||
end
|
end
|
||||||
# Other effects, inc. ones that set accuracy_multiplier or evasion_stage to
|
# Other effects, inc. ones that set accuracy_multiplier or evasion_stage to
|
||||||
# specific values
|
# specific values
|
||||||
@@ -295,8 +300,9 @@ class Battle::Move
|
|||||||
end
|
end
|
||||||
# Ability effects that alter damage
|
# Ability effects that alter damage
|
||||||
if user.abilityActive?
|
if user.abilityActive?
|
||||||
Battle::AbilityEffects.triggerDamageCalcFromUser(user.ability,
|
Battle::AbilityEffects.triggerDamageCalcFromUser(
|
||||||
user, target, self, multipliers, baseDmg, type)
|
user.ability, user, target, self, multipliers, baseDmg, type
|
||||||
|
)
|
||||||
end
|
end
|
||||||
if !@battle.moldBreaker
|
if !@battle.moldBreaker
|
||||||
# NOTE: It's odd that the user's Mold Breaker prevents its partner's
|
# NOTE: It's odd that the user's Mold Breaker prevents its partner's
|
||||||
@@ -304,29 +310,35 @@ class Battle::Move
|
|||||||
# how it works.
|
# how it works.
|
||||||
user.allAllies.each do |b|
|
user.allAllies.each do |b|
|
||||||
next if !b.abilityActive?
|
next if !b.abilityActive?
|
||||||
Battle::AbilityEffects.triggerDamageCalcFromAlly(b.ability,
|
Battle::AbilityEffects.triggerDamageCalcFromAlly(
|
||||||
user, target, self, multipliers, baseDmg, type)
|
b.ability, user, target, self, multipliers, baseDmg, type
|
||||||
|
)
|
||||||
end
|
end
|
||||||
if target.abilityActive?
|
if target.abilityActive?
|
||||||
Battle::AbilityEffects.triggerDamageCalcFromTarget(target.ability,
|
Battle::AbilityEffects.triggerDamageCalcFromTarget(
|
||||||
user, target, self, multipliers, baseDmg, type) if !@battle.moldBreaker
|
target.ability, user, target, self, multipliers, baseDmg, type
|
||||||
Battle::AbilityEffects.triggerDamageCalcFromTargetNonIgnorable(target.ability,
|
)
|
||||||
user, target, self, multipliers, baseDmg, type)
|
Battle::AbilityEffects.triggerDamageCalcFromTargetNonIgnorable(
|
||||||
|
target.ability, user, target, self, multipliers, baseDmg, type
|
||||||
|
)
|
||||||
end
|
end
|
||||||
target.allAllies.each do |b|
|
target.allAllies.each do |b|
|
||||||
next if !b.abilityActive?
|
next if !b.abilityActive?
|
||||||
Battle::AbilityEffects.triggerDamageCalcFromTargetAlly(b.ability,
|
Battle::AbilityEffects.triggerDamageCalcFromTargetAlly(
|
||||||
user, target, self, multipliers, baseDmg, type)
|
b.ability, user, target, self, multipliers, baseDmg, type
|
||||||
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
# Item effects that alter damage
|
# Item effects that alter damage
|
||||||
if user.itemActive?
|
if user.itemActive?
|
||||||
Battle::ItemEffects.triggerDamageCalcFromUser(user.item,
|
Battle::ItemEffects.triggerDamageCalcFromUser(
|
||||||
user, target, self, multipliers, baseDmg, type)
|
user.item, user, target, self, multipliers, baseDmg, type
|
||||||
|
)
|
||||||
end
|
end
|
||||||
if target.itemActive?
|
if target.itemActive?
|
||||||
Battle::ItemEffects.triggerDamageCalcFromTarget(target.item,
|
Battle::ItemEffects.triggerDamageCalcFromTarget(
|
||||||
user, target, self, multipliers, baseDmg, type)
|
target.item, user, target, self, multipliers, baseDmg, type
|
||||||
|
)
|
||||||
end
|
end
|
||||||
# Parental Bond's second attack
|
# Parental Bond's second attack
|
||||||
if user.effects[PBEffects::ParentalBond] == 1
|
if user.effects[PBEffects::ParentalBond] == 1
|
||||||
|
|||||||
@@ -897,8 +897,10 @@ end
|
|||||||
class Battle::Move::DisableTargetSoundMoves < Battle::Move
|
class Battle::Move::DisableTargetSoundMoves < Battle::Move
|
||||||
def pbAdditionalEffect(user, target)
|
def pbAdditionalEffect(user, target)
|
||||||
return if target.fainted? || target.damageState.substitute
|
return if target.fainted? || target.damageState.substitute
|
||||||
|
if target.effects[PBEffects::ThroatChop] == 0
|
||||||
@battle.pbDisplay(_INTL("The effects of {1} prevent {2} from using certain moves!",
|
@battle.pbDisplay(_INTL("The effects of {1} prevent {2} from using certain moves!",
|
||||||
@name, target.pbThis(true))) if target.effects[PBEffects::ThroatChop] == 0
|
@name, target.pbThis(true)))
|
||||||
|
end
|
||||||
target.effects[PBEffects::ThroatChop] = 3
|
target.effects[PBEffects::ThroatChop] = 3
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -31,8 +31,9 @@ class Battle::Scene
|
|||||||
"Graphics/Pictures/Battle/overlay_message", @viewport)
|
"Graphics/Pictures/Battle/overlay_message", @viewport)
|
||||||
messageBox.z = 195
|
messageBox.z = 195
|
||||||
# Create message window (displays the message)
|
# Create message window (displays the message)
|
||||||
msgWindow = Window_AdvancedTextPokemon.newWithSize("",
|
msgWindow = Window_AdvancedTextPokemon.newWithSize(
|
||||||
16, Graphics.height - 96 + 2, Graphics.width - 32, 96, @viewport)
|
"", 16, Graphics.height - 96 + 2, Graphics.width - 32, 96, @viewport
|
||||||
|
)
|
||||||
msgWindow.z = 200
|
msgWindow.z = 200
|
||||||
msgWindow.opacity = 0
|
msgWindow.opacity = 0
|
||||||
msgWindow.baseColor = MESSAGE_BASE_COLOR
|
msgWindow.baseColor = MESSAGE_BASE_COLOR
|
||||||
|
|||||||
@@ -58,8 +58,9 @@ class Battle::Scene
|
|||||||
# Animates a party lineup appearing for the given side
|
# Animates a party lineup appearing for the given side
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
def pbShowPartyLineup(side, fullAnim = false)
|
def pbShowPartyLineup(side, fullAnim = false)
|
||||||
@animations.push(Animation::LineupAppear.new(@sprites, @viewport,
|
@animations.push(Animation::LineupAppear.new(
|
||||||
side, @battle.pbParty(side), @battle.pbPartyStarts(side), fullAnim))
|
@sprites, @viewport, side, @battle.pbParty(side), @battle.pbPartyStarts(side), fullAnim
|
||||||
|
))
|
||||||
if !fullAnim
|
if !fullAnim
|
||||||
while inPartyAnimation?
|
while inPartyAnimation?
|
||||||
pbUpdate
|
pbUpdate
|
||||||
@@ -112,13 +113,15 @@ class Battle::Scene
|
|||||||
pbChangePokemon(b[0], pkmn)
|
pbChangePokemon(b[0], pkmn)
|
||||||
pbRefresh
|
pbRefresh
|
||||||
if @battle.opposes?(b[0])
|
if @battle.opposes?(b[0])
|
||||||
sendOutAnim = Animation::PokeballTrainerSendOut.new(@sprites, @viewport,
|
sendOutAnim = Animation::PokeballTrainerSendOut.new(
|
||||||
@battle.pbGetOwnerIndexFromBattlerIndex(b[0]) + 1,
|
@sprites, @viewport, @battle.pbGetOwnerIndexFromBattlerIndex(b[0]) + 1,
|
||||||
@battle.battlers[b[0]], startBattle, i)
|
@battle.battlers[b[0]], startBattle, i
|
||||||
|
)
|
||||||
else
|
else
|
||||||
sendOutAnim = Animation::PokeballPlayerSendOut.new(@sprites, @viewport,
|
sendOutAnim = Animation::PokeballPlayerSendOut.new(
|
||||||
@battle.pbGetOwnerIndexFromBattlerIndex(b[0]) + 1,
|
@sprites, @viewport, @battle.pbGetOwnerIndexFromBattlerIndex(b[0]) + 1,
|
||||||
@battle.battlers[b[0]], startBattle, i)
|
@battle.battlers[b[0]], startBattle, i
|
||||||
|
)
|
||||||
end
|
end
|
||||||
dataBoxAnim = Animation::DataBoxAppear.new(@sprites, @viewport, b[0])
|
dataBoxAnim = Animation::DataBoxAppear.new(@sprites, @viewport, b[0])
|
||||||
sendOutAnims.push([sendOutAnim, dataBoxAnim, false])
|
sendOutAnims.push([sendOutAnim, dataBoxAnim, false])
|
||||||
@@ -297,10 +300,12 @@ class Battle::Scene
|
|||||||
pbTopRightWindow(
|
pbTopRightWindow(
|
||||||
_INTL("Max. HP<r>+{1}\r\nAttack<r>+{2}\r\nDefense<r>+{3}\r\nSp. Atk<r>+{4}\r\nSp. Def<r>+{5}\r\nSpeed<r>+{6}",
|
_INTL("Max. HP<r>+{1}\r\nAttack<r>+{2}\r\nDefense<r>+{3}\r\nSp. Atk<r>+{4}\r\nSp. Def<r>+{5}\r\nSpeed<r>+{6}",
|
||||||
pkmn.totalhp - oldTotalHP, pkmn.attack - oldAttack, pkmn.defense - oldDefense,
|
pkmn.totalhp - oldTotalHP, pkmn.attack - oldAttack, pkmn.defense - oldDefense,
|
||||||
pkmn.spatk - oldSpAtk, pkmn.spdef - oldSpDef, pkmn.speed - oldSpeed))
|
pkmn.spatk - oldSpAtk, pkmn.spdef - oldSpDef, pkmn.speed - oldSpeed)
|
||||||
|
)
|
||||||
pbTopRightWindow(
|
pbTopRightWindow(
|
||||||
_INTL("Max. HP<r>{1}\r\nAttack<r>{2}\r\nDefense<r>{3}\r\nSp. Atk<r>{4}\r\nSp. Def<r>{5}\r\nSpeed<r>{6}",
|
_INTL("Max. HP<r>{1}\r\nAttack<r>{2}\r\nDefense<r>{3}\r\nSp. Atk<r>{4}\r\nSp. Def<r>{5}\r\nSpeed<r>{6}",
|
||||||
pkmn.totalhp, pkmn.attack, pkmn.defense, pkmn.spatk, pkmn.spdef, pkmn.speed))
|
pkmn.totalhp, pkmn.attack, pkmn.defense, pkmn.spatk, pkmn.spdef, pkmn.speed)
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
@@ -326,8 +331,9 @@ class Battle::Scene
|
|||||||
#=============================================================================
|
#=============================================================================
|
||||||
def pbThrow(ball, shakes, critical, targetBattler, showPlayer = false)
|
def pbThrow(ball, shakes, critical, targetBattler, showPlayer = false)
|
||||||
@briefMessage = false
|
@briefMessage = false
|
||||||
captureAnim = Animation::PokeballThrowCapture.new(@sprites, @viewport,
|
captureAnim = Animation::PokeballThrowCapture.new(
|
||||||
ball, shakes, critical, @battle.battlers[targetBattler], showPlayer)
|
@sprites, @viewport, ball, shakes, critical, @battle.battlers[targetBattler], showPlayer
|
||||||
|
)
|
||||||
loop do
|
loop do
|
||||||
captureAnim.update
|
captureAnim.update
|
||||||
pbUpdate
|
pbUpdate
|
||||||
@@ -367,8 +373,9 @@ class Battle::Scene
|
|||||||
|
|
||||||
def pbThrowAndDeflect(ball, idxBattler)
|
def pbThrowAndDeflect(ball, idxBattler)
|
||||||
@briefMessage = false
|
@briefMessage = false
|
||||||
throwAnim = Animation::PokeballThrowDeflect.new(@sprites, @viewport,
|
throwAnim = Animation::PokeballThrowDeflect.new(
|
||||||
ball, @battle.battlers[idxBattler])
|
@sprites, @viewport, ball, @battle.battlers[idxBattler]
|
||||||
|
)
|
||||||
loop do
|
loop do
|
||||||
throwAnim.update
|
throwAnim.update
|
||||||
pbUpdate
|
pbUpdate
|
||||||
@@ -534,7 +541,8 @@ class Battle::Scene
|
|||||||
end
|
end
|
||||||
animPlayer.setLineTransform(
|
animPlayer.setLineTransform(
|
||||||
FOCUSUSER_X, FOCUSUSER_Y, FOCUSTARGET_X, FOCUSTARGET_Y,
|
FOCUSUSER_X, FOCUSUSER_Y, FOCUSTARGET_X, FOCUSTARGET_Y,
|
||||||
oldUserX, oldUserY - userHeight / 2, oldTargetX, oldTargetY - targetHeight / 2)
|
oldUserX, oldUserY - userHeight / 2, oldTargetX, oldTargetY - targetHeight / 2
|
||||||
|
)
|
||||||
# Play the animation
|
# Play the animation
|
||||||
animPlayer.start
|
animPlayer.start
|
||||||
loop do
|
loop do
|
||||||
|
|||||||
@@ -118,8 +118,9 @@ class Battle::Scene::CommandMenu < Battle::Scene::MenuBase
|
|||||||
self.x = 0
|
self.x = 0
|
||||||
self.y = Graphics.height - 96
|
self.y = Graphics.height - 96
|
||||||
# Create message box (shows "What will X do?")
|
# Create message box (shows "What will X do?")
|
||||||
@msgBox = Window_UnformattedTextPokemon.newWithSize("",
|
@msgBox = Window_UnformattedTextPokemon.newWithSize(
|
||||||
self.x + 16, self.y + 2, 220, Graphics.height - self.y, viewport)
|
"", self.x + 16, self.y + 2, 220, Graphics.height - self.y, viewport
|
||||||
|
)
|
||||||
@msgBox.baseColor = TEXT_BASE_COLOR
|
@msgBox.baseColor = TEXT_BASE_COLOR
|
||||||
@msgBox.shadowColor = TEXT_SHADOW_COLOR
|
@msgBox.shadowColor = TEXT_SHADOW_COLOR
|
||||||
@msgBox.windowskin = nil
|
@msgBox.windowskin = nil
|
||||||
@@ -146,8 +147,9 @@ class Battle::Scene::CommandMenu < Battle::Scene::MenuBase
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
# Create command window (shows Fight/Bag/Pokémon/Run)
|
# Create command window (shows Fight/Bag/Pokémon/Run)
|
||||||
@cmdWindow = Window_CommandPokemon.newWithSize([],
|
@cmdWindow = Window_CommandPokemon.newWithSize(
|
||||||
self.x + Graphics.width - 240, self.y, 240, Graphics.height - self.y, viewport)
|
[], self.x + Graphics.width - 240, self.y, 240, Graphics.height - self.y, viewport
|
||||||
|
)
|
||||||
@cmdWindow.columns = 2
|
@cmdWindow.columns = 2
|
||||||
@cmdWindow.columnSpacing = 4
|
@cmdWindow.columnSpacing = 4
|
||||||
@cmdWindow.ignore_input = true
|
@cmdWindow.ignore_input = true
|
||||||
@@ -287,15 +289,17 @@ class Battle::Scene::FightMenu < Battle::Scene::MenuBase
|
|||||||
addSprite("shiftButton", @shiftButton)
|
addSprite("shiftButton", @shiftButton)
|
||||||
else
|
else
|
||||||
# Create message box (shows type and PP of selected move)
|
# Create message box (shows type and PP of selected move)
|
||||||
@msgBox = Window_AdvancedTextPokemon.newWithSize("",
|
@msgBox = Window_AdvancedTextPokemon.newWithSize(
|
||||||
self.x + 320, self.y, Graphics.width - 320, Graphics.height - self.y, viewport)
|
"", self.x + 320, self.y, Graphics.width - 320, Graphics.height - self.y, viewport
|
||||||
|
)
|
||||||
@msgBox.baseColor = TEXT_BASE_COLOR
|
@msgBox.baseColor = TEXT_BASE_COLOR
|
||||||
@msgBox.shadowColor = TEXT_SHADOW_COLOR
|
@msgBox.shadowColor = TEXT_SHADOW_COLOR
|
||||||
pbSetNarrowFont(@msgBox.contents)
|
pbSetNarrowFont(@msgBox.contents)
|
||||||
addSprite("msgBox", @msgBox)
|
addSprite("msgBox", @msgBox)
|
||||||
# Create command window (shows moves)
|
# Create command window (shows moves)
|
||||||
@cmdWindow = Window_CommandPokemon.newWithSize([],
|
@cmdWindow = Window_CommandPokemon.newWithSize(
|
||||||
self.x, self.y, 320, Graphics.height - self.y, viewport)
|
[], self.x, self.y, 320, Graphics.height - self.y, viewport
|
||||||
|
)
|
||||||
@cmdWindow.columns = 2
|
@cmdWindow.columns = 2
|
||||||
@cmdWindow.columnSpacing = 4
|
@cmdWindow.columnSpacing = 4
|
||||||
@cmdWindow.ignore_input = true
|
@cmdWindow.ignore_input = true
|
||||||
|
|||||||
@@ -651,8 +651,7 @@ class Battle::Scene::Animation::BattlerFaint < Battle::Scene::Animation
|
|||||||
shadow = addSprite(shaSprite, PictureOrigin::Center)
|
shadow = addSprite(shaSprite, PictureOrigin::Center)
|
||||||
# Get approx duration depending on sprite's position/size. Min 20 frames.
|
# Get approx duration depending on sprite's position/size. Min 20 frames.
|
||||||
battlerTop = batSprite.y - batSprite.height
|
battlerTop = batSprite.y - batSprite.height
|
||||||
cropY = Battle::Scene.pbBattlerPosition(@idxBattler,
|
cropY = Battle::Scene.pbBattlerPosition(@idxBattler, @battle.pbSideSize(@idxBattler))[1]
|
||||||
@battle.pbSideSize(@idxBattler))[1]
|
|
||||||
cropY += 8
|
cropY += 8
|
||||||
duration = (cropY - battlerTop) / 8
|
duration = (cropY - battlerTop) / 8
|
||||||
duration = 10 if duration < 10 # Min 0.5 seconds
|
duration = 10 if duration < 10 # Min 0.5 seconds
|
||||||
|
|||||||
@@ -271,11 +271,13 @@ class Battle::AI
|
|||||||
if GameData::Type.exists?(:FLYING)
|
if GameData::Type.exists?(:FLYING)
|
||||||
if skill >= PBTrainerAI.highSkill
|
if skill >= PBTrainerAI.highSkill
|
||||||
targetTypes = target.pbTypes(true)
|
targetTypes = target.pbTypes(true)
|
||||||
mult = Effectiveness.calculate(:FLYING,
|
mult = Effectiveness.calculate(
|
||||||
targetTypes[0], targetTypes[1], targetTypes[2])
|
:FLYING, targetTypes[0], targetTypes[1], targetTypes[2]
|
||||||
|
)
|
||||||
else
|
else
|
||||||
mult = Effectiveness.calculate(:FLYING,
|
mult = Effectiveness.calculate(
|
||||||
target.types[0], target.types[1], target.effects[PBEffects::Type3])
|
:FLYING, target.types[0], target.types[1], target.effects[PBEffects::Type3]
|
||||||
|
)
|
||||||
end
|
end
|
||||||
baseDmg = (baseDmg.to_f * mult / Effectiveness::NORMAL_EFFECTIVE).round
|
baseDmg = (baseDmg.to_f * mult / Effectiveness::NORMAL_EFFECTIVE).round
|
||||||
end
|
end
|
||||||
@@ -338,15 +340,17 @@ class Battle::AI
|
|||||||
break
|
break
|
||||||
end
|
end
|
||||||
if canCheck
|
if canCheck
|
||||||
Battle::AbilityEffects.triggerDamageCalcFromUser(user.ability,
|
Battle::AbilityEffects.triggerDamageCalcFromUser(
|
||||||
user, target, move, multipliers, baseDmg, type)
|
user.ability, user, target, move, multipliers, baseDmg, type
|
||||||
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if skill >= PBTrainerAI.mediumSkill && !moldBreaker
|
if skill >= PBTrainerAI.mediumSkill && !moldBreaker
|
||||||
user.allAllies.each do |b|
|
user.allAllies.each do |b|
|
||||||
next if !b.abilityActive?
|
next if !b.abilityActive?
|
||||||
Battle::AbilityEffects.triggerDamageCalcFromAlly(b.ability,
|
Battle::AbilityEffects.triggerDamageCalcFromAlly(
|
||||||
user, target, move, multipliers, baseDmg, type)
|
b.ability, user, target, move, multipliers, baseDmg, type
|
||||||
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if skill >= PBTrainerAI.bestSkill && !moldBreaker && target.abilityActive?
|
if skill >= PBTrainerAI.bestSkill && !moldBreaker && target.abilityActive?
|
||||||
@@ -360,15 +364,17 @@ class Battle::AI
|
|||||||
break
|
break
|
||||||
end
|
end
|
||||||
if canCheck
|
if canCheck
|
||||||
Battle::AbilityEffects.triggerDamageCalcFromTarget(target.ability,
|
Battle::AbilityEffects.triggerDamageCalcFromTarget(
|
||||||
user, target, move, multipliers, baseDmg, type)
|
target.ability, user, target, move, multipliers, baseDmg, type
|
||||||
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if skill >= PBTrainerAI.bestSkill && !moldBreaker
|
if skill >= PBTrainerAI.bestSkill && !moldBreaker
|
||||||
target.allAllies.each do |b|
|
target.allAllies.each do |b|
|
||||||
next if !b.abilityActive?
|
next if !b.abilityActive?
|
||||||
Battle::AbilityEffects.triggerDamageCalcFromTargetAlly(b.ability,
|
Battle::AbilityEffects.triggerDamageCalcFromTargetAlly(
|
||||||
user, target, move, multipliers, baseDmg, type)
|
b.ability, user, target, move, multipliers, baseDmg, type
|
||||||
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
# Item effects that alter damage
|
# Item effects that alter damage
|
||||||
@@ -379,16 +385,18 @@ class Battle::AI
|
|||||||
# round.
|
# round.
|
||||||
itemBlacklist = [:EXPERTBELT, :LIFEORB]
|
itemBlacklist = [:EXPERTBELT, :LIFEORB]
|
||||||
if !itemBlacklist.include?(user.item_id)
|
if !itemBlacklist.include?(user.item_id)
|
||||||
Battle::ItemEffects.triggerDamageCalcFromUser(user.item,
|
Battle::ItemEffects.triggerDamageCalcFromUser(
|
||||||
user, target, move, multipliers, baseDmg, type)
|
user.item, user, target, move, multipliers, baseDmg, type
|
||||||
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if skill >= PBTrainerAI.bestSkill && target.itemActive?
|
if skill >= PBTrainerAI.bestSkill && target.itemActive?
|
||||||
# NOTE: Type-weakening berries aren't suitable for checking at the start
|
# NOTE: Type-weakening berries aren't suitable for checking at the start
|
||||||
# of the round.
|
# of the round.
|
||||||
if target.item && !target.item.is_berry?
|
if target.item && !target.item.is_berry?
|
||||||
Battle::ItemEffects.triggerDamageCalcFromTarget(target.item,
|
Battle::ItemEffects.triggerDamageCalcFromTarget(
|
||||||
user, target, move, multipliers, baseDmg, type)
|
target.item, user, target, move, multipliers, baseDmg, type
|
||||||
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
# Global abilities
|
# Global abilities
|
||||||
@@ -640,32 +648,37 @@ class Battle::AI
|
|||||||
# Ability effects that alter accuracy calculation
|
# Ability effects that alter accuracy calculation
|
||||||
if skill >= PBTrainerAI.mediumSkill
|
if skill >= PBTrainerAI.mediumSkill
|
||||||
if user.abilityActive?
|
if user.abilityActive?
|
||||||
Battle::AbilityEffects.triggerAccuracyCalcFromUser(user.ability,
|
Battle::AbilityEffects.triggerAccuracyCalcFromUser(
|
||||||
modifiers, user, target, move, type)
|
user.ability, modifiers, user, target, move, type
|
||||||
|
)
|
||||||
end
|
end
|
||||||
user.allAllies.each do |b|
|
user.allAllies.each do |b|
|
||||||
next if !b.abilityActive?
|
next if !b.abilityActive?
|
||||||
Battle::AbilityEffects.triggerAccuracyCalcFromAlly(b.ability,
|
Battle::AbilityEffects.triggerAccuracyCalcFromAlly(
|
||||||
modifiers, user, target, move, type)
|
b.ability, modifiers, user, target, move, type
|
||||||
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if skill >= PBTrainerAI.bestSkill
|
if skill >= PBTrainerAI.bestSkill
|
||||||
if target.abilityActive? && !moldBreaker
|
if target.abilityActive? && !moldBreaker
|
||||||
Battle::AbilityEffects.triggerAccuracyCalcFromTarget(target.ability,
|
Battle::AbilityEffects.triggerAccuracyCalcFromTarget(
|
||||||
modifiers, user, target, move, type)
|
target.ability, modifiers, user, target, move, type
|
||||||
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
# Item effects that alter accuracy calculation
|
# Item effects that alter accuracy calculation
|
||||||
if skill >= PBTrainerAI.mediumSkill
|
if skill >= PBTrainerAI.mediumSkill
|
||||||
if user.itemActive?
|
if user.itemActive?
|
||||||
Battle::ItemEffects.triggerAccuracyCalcFromUser(user.item,
|
Battle::ItemEffects.triggerAccuracyCalcFromUser(
|
||||||
modifiers, user, target, move, type)
|
user.item, modifiers, user, target, move, type
|
||||||
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
if skill >= PBTrainerAI.bestSkill
|
if skill >= PBTrainerAI.bestSkill
|
||||||
if target.itemActive?
|
if target.itemActive?
|
||||||
Battle::ItemEffects.triggerAccuracyCalcFromTarget(target.item,
|
Battle::ItemEffects.triggerAccuracyCalcFromTarget(
|
||||||
modifiers, user, target, move, type)
|
target.item, modifiers, user, target, move, type
|
||||||
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
# Other effects, inc. ones that set accuracy_multiplier or evasion_stage to specific values
|
# Other effects, inc. ones that set accuracy_multiplier or evasion_stage to specific values
|
||||||
|
|||||||
@@ -222,7 +222,8 @@ class RPG::Animation
|
|||||||
timing.se = RPG::AudioFile.new(
|
timing.se = RPG::AudioFile.new(
|
||||||
othertiming.se.name.clone,
|
othertiming.se.name.clone,
|
||||||
othertiming.se.volume,
|
othertiming.se.volume,
|
||||||
othertiming.se.pitch)
|
othertiming.se.pitch
|
||||||
|
)
|
||||||
timing.flash_scope = othertiming.flash_scope
|
timing.flash_scope = othertiming.flash_scope
|
||||||
timing.flash_color = othertiming.flash_color.clone
|
timing.flash_color = othertiming.flash_color.clone
|
||||||
timing.flash_duration = othertiming.flash_duration
|
timing.flash_duration = othertiming.flash_duration
|
||||||
@@ -851,8 +852,7 @@ class PBAnimationPlayerX
|
|||||||
sprite.y = cel[AnimFrame::Y] + @userOrig[1] - Battle::Scene::FOCUSUSER_Y
|
sprite.y = cel[AnimFrame::Y] + @userOrig[1] - Battle::Scene::FOCUSUSER_Y
|
||||||
when 3 # Focused on user and target
|
when 3 # Focused on user and target
|
||||||
next if !@srcLine || !@dstLine
|
next if !@srcLine || !@dstLine
|
||||||
point = transformPoint(
|
point = transformPoint(@srcLine[0], @srcLine[1], @srcLine[2], @srcLine[3],
|
||||||
@srcLine[0], @srcLine[1], @srcLine[2], @srcLine[3],
|
|
||||||
@dstLine[0], @dstLine[1], @dstLine[2], @dstLine[3],
|
@dstLine[0], @dstLine[1], @dstLine[2], @dstLine[3],
|
||||||
sprite.x, sprite.y)
|
sprite.x, sprite.y)
|
||||||
sprite.x = point[0]
|
sprite.x = point[0]
|
||||||
|
|||||||
@@ -64,8 +64,7 @@ class BugContestBattle < Battle
|
|||||||
pbDisplayPaused(_INTL("You already caught a {1}.", lastPokemon.name))
|
pbDisplayPaused(_INTL("You already caught a {1}.", lastPokemon.name))
|
||||||
helptext = _INTL("STOCK POKéMON:\n {1} Lv.{2} MaxHP: {3}\nTHIS POKéMON:\n {4} Lv.{5} MaxHP: {6}",
|
helptext = _INTL("STOCK POKéMON:\n {1} Lv.{2} MaxHP: {3}\nTHIS POKéMON:\n {4} Lv.{5} MaxHP: {6}",
|
||||||
lastPokemon.name, lastPokemon.level, lastPokemon.totalhp,
|
lastPokemon.name, lastPokemon.level, lastPokemon.totalhp,
|
||||||
pkmn.name, pkmn.level, pkmn.totalhp
|
pkmn.name, pkmn.level, pkmn.totalhp)
|
||||||
)
|
|
||||||
@scene.pbShowHelp(helptext)
|
@scene.pbShowHelp(helptext)
|
||||||
if pbDisplayConfirm(_INTL("Switch Pokémon?"))
|
if pbDisplayConfirm(_INTL("Switch Pokémon?"))
|
||||||
pbBugContestState.lastPokemon = pkmn
|
pbBugContestState.lastPokemon = pkmn
|
||||||
|
|||||||
@@ -507,7 +507,8 @@ def pbMoveRoute(event, commands, waitComplete = false)
|
|||||||
i += 2
|
i += 2
|
||||||
when PBMoveRoute::Graphic
|
when PBMoveRoute::Graphic
|
||||||
route.list.push(RPG::MoveCommand.new(commands[i],
|
route.list.push(RPG::MoveCommand.new(commands[i],
|
||||||
[commands[i + 1], commands[i + 2], commands[i + 3], commands[i + 4]]))
|
[commands[i + 1], commands[i + 2],
|
||||||
|
commands[i + 3], commands[i + 4]]))
|
||||||
i += 4
|
i += 4
|
||||||
else
|
else
|
||||||
route.list.push(RPG::MoveCommand.new(commands[i]))
|
route.list.push(RPG::MoveCommand.new(commands[i]))
|
||||||
|
|||||||
@@ -508,8 +508,7 @@ def pbTrainerBattle(trainerID, trainerName, endSpeech = nil,
|
|||||||
# Perform the battle
|
# Perform the battle
|
||||||
if $game_temp.waiting_trainer
|
if $game_temp.waiting_trainer
|
||||||
decision = pbTrainerBattleCore($game_temp.waiting_trainer[0],
|
decision = pbTrainerBattleCore($game_temp.waiting_trainer[0],
|
||||||
[trainerID, trainerName, trainerPartyID, endSpeech]
|
[trainerID, trainerName, trainerPartyID, endSpeech])
|
||||||
)
|
|
||||||
else
|
else
|
||||||
decision = pbTrainerBattleCore([trainerID, trainerName, trainerPartyID, endSpeech])
|
decision = pbTrainerBattleCore([trainerID, trainerName, trainerPartyID, endSpeech])
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -91,7 +91,8 @@ def pbHiddenMoveAnimation(pokemon)
|
|||||||
interp = RectInterpolator.new(
|
interp = RectInterpolator.new(
|
||||||
Rect.new(0, Graphics.height / 2, Graphics.width, 0),
|
Rect.new(0, Graphics.height / 2, Graphics.width, 0),
|
||||||
Rect.new(0, (Graphics.height - bg.bitmap.height) / 2, Graphics.width, bg.bitmap.height),
|
Rect.new(0, (Graphics.height - bg.bitmap.height) / 2, Graphics.width, bg.bitmap.height),
|
||||||
Graphics.frame_rate / 4)
|
Graphics.frame_rate / 4
|
||||||
|
)
|
||||||
ptinterp = nil
|
ptinterp = nil
|
||||||
phase = 1
|
phase = 1
|
||||||
frames = 0
|
frames = 0
|
||||||
@@ -110,7 +111,8 @@ def pbHiddenMoveAnimation(pokemon)
|
|||||||
ptinterp = PointInterpolator.new(
|
ptinterp = PointInterpolator.new(
|
||||||
Graphics.width + (sprite.bitmap.width / 2), bg.bitmap.height / 2,
|
Graphics.width + (sprite.bitmap.width / 2), bg.bitmap.height / 2,
|
||||||
Graphics.width / 2, bg.bitmap.height / 2,
|
Graphics.width / 2, bg.bitmap.height / 2,
|
||||||
Graphics.frame_rate * 4 / 10)
|
Graphics.frame_rate * 4 / 10
|
||||||
|
)
|
||||||
end
|
end
|
||||||
when 2 # Slide Pokémon sprite in from right to centre
|
when 2 # Slide Pokémon sprite in from right to centre
|
||||||
ptinterp.update
|
ptinterp.update
|
||||||
@@ -129,7 +131,8 @@ def pbHiddenMoveAnimation(pokemon)
|
|||||||
ptinterp = PointInterpolator.new(
|
ptinterp = PointInterpolator.new(
|
||||||
Graphics.width / 2, bg.bitmap.height / 2,
|
Graphics.width / 2, bg.bitmap.height / 2,
|
||||||
-(sprite.bitmap.width / 2), bg.bitmap.height / 2,
|
-(sprite.bitmap.width / 2), bg.bitmap.height / 2,
|
||||||
Graphics.frame_rate * 4 / 10)
|
Graphics.frame_rate * 4 / 10
|
||||||
|
)
|
||||||
frames = 0
|
frames = 0
|
||||||
end
|
end
|
||||||
when 4 # Slide Pokémon sprite off from centre to left
|
when 4 # Slide Pokémon sprite off from centre to left
|
||||||
@@ -142,7 +145,8 @@ def pbHiddenMoveAnimation(pokemon)
|
|||||||
interp = RectInterpolator.new(
|
interp = RectInterpolator.new(
|
||||||
Rect.new(0, (Graphics.height - bg.bitmap.height) / 2, Graphics.width, bg.bitmap.height),
|
Rect.new(0, (Graphics.height - bg.bitmap.height) / 2, Graphics.width, bg.bitmap.height),
|
||||||
Rect.new(0, Graphics.height / 2, Graphics.width, 0),
|
Rect.new(0, Graphics.height / 2, Graphics.width, 0),
|
||||||
Graphics.frame_rate / 4)
|
Graphics.frame_rate / 4
|
||||||
|
)
|
||||||
end
|
end
|
||||||
when 5 # Shrink viewport height from full to zero
|
when 5 # Shrink viewport height from full to zero
|
||||||
interp.update
|
interp.update
|
||||||
|
|||||||
@@ -575,13 +575,13 @@ module RandomDungeonGenerator
|
|||||||
for y in 0...maxHeight / cellHeight
|
for y in 0...maxHeight / cellHeight
|
||||||
for x in 0...maxWidth / cellWidth
|
for x in 0...maxWidth / cellWidth
|
||||||
pattern = maze.getEdgePattern(x, y)
|
pattern = maze.getEdgePattern(x, y)
|
||||||
if DungeonMaze.paint_cell_contents(
|
next if !DungeonMaze.paint_cell_contents(
|
||||||
self, BUFFER_X + x * cellWidth, BUFFER_Y + y * cellHeight,
|
self, BUFFER_X + x * cellWidth, BUFFER_Y + y * cellHeight,
|
||||||
corridor_patterns[pattern], DungeonMaze::TURN_NONE)
|
corridor_patterns[pattern], DungeonMaze::TURN_NONE
|
||||||
|
)
|
||||||
roomcount += 1
|
roomcount += 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
# If no rooms were generated, make the whole map a room
|
# If no rooms were generated, make the whole map a room
|
||||||
if roomcount == 0
|
if roomcount == 0
|
||||||
for x in 0...maxWidth
|
for x in 0...maxWidth
|
||||||
|
|||||||
@@ -688,7 +688,8 @@ def pbUseItem(bag, item, bagscene = nil)
|
|||||||
max_at_once = [max_at_once, $bag.quantity(item)].min
|
max_at_once = [max_at_once, $bag.quantity(item)].min
|
||||||
if max_at_once > 1
|
if max_at_once > 1
|
||||||
qty = screen.scene.pbChooseNumber(
|
qty = screen.scene.pbChooseNumber(
|
||||||
_INTL("How many {1} do you want to use?", GameData::Item.get(item).name), max_at_once)
|
_INTL("How many {1} do you want to use?", GameData::Item.get(item).name), max_at_once
|
||||||
|
)
|
||||||
screen.scene.pbSetHelpText("") if screen.is_a?(PokemonPartyScreen)
|
screen.scene.pbSetHelpText("") if screen.is_a?(PokemonPartyScreen)
|
||||||
end
|
end
|
||||||
if qty >= 1
|
if qty >= 1
|
||||||
@@ -749,7 +750,8 @@ def pbUseItemOnPokemon(item, pkmn, scene)
|
|||||||
max_at_once = [max_at_once, $bag.quantity(item)].min
|
max_at_once = [max_at_once, $bag.quantity(item)].min
|
||||||
if max_at_once > 1
|
if max_at_once > 1
|
||||||
qty = scene.scene.pbChooseNumber(
|
qty = scene.scene.pbChooseNumber(
|
||||||
_INTL("How many {1} do you want to use?", itm.name), max_at_once)
|
_INTL("How many {1} do you want to use?", itm.name), max_at_once
|
||||||
|
)
|
||||||
scene.scene.pbSetHelpText("") if scene.is_a?(PokemonPartyScreen)
|
scene.scene.pbSetHelpText("") if scene.is_a?(PokemonPartyScreen)
|
||||||
end
|
end
|
||||||
return false if qty <= 0
|
return false if qty <= 0
|
||||||
|
|||||||
@@ -41,22 +41,25 @@ def pbDisplayMail(mail, _bearer = nil)
|
|||||||
if GameData::Item.get(mail.item).is_icon_mail?
|
if GameData::Item.get(mail.item).is_icon_mail?
|
||||||
if mail.poke1
|
if mail.poke1
|
||||||
sprites["bearer"] = IconSprite.new(64, 288, viewport)
|
sprites["bearer"] = IconSprite.new(64, 288, viewport)
|
||||||
bitmapFileName = GameData::Species.icon_filename(mail.poke1[0],
|
bitmapFileName = GameData::Species.icon_filename(
|
||||||
mail.poke1[3], mail.poke1[1], mail.poke1[2], mail.poke1[4], mail.poke1[5])
|
mail.poke1[0], mail.poke1[3], mail.poke1[1], mail.poke1[2], mail.poke1[4], mail.poke1[5]
|
||||||
|
)
|
||||||
sprites["bearer"].setBitmap(bitmapFileName)
|
sprites["bearer"].setBitmap(bitmapFileName)
|
||||||
sprites["bearer"].src_rect.set(0, 0, 64, 64)
|
sprites["bearer"].src_rect.set(0, 0, 64, 64)
|
||||||
end
|
end
|
||||||
if mail.poke2
|
if mail.poke2
|
||||||
sprites["bearer2"] = IconSprite.new(144, 288, viewport)
|
sprites["bearer2"] = IconSprite.new(144, 288, viewport)
|
||||||
bitmapFileName = GameData::Species.icon_filename(mail.poke2[0],
|
bitmapFileName = GameData::Species.icon_filename(
|
||||||
mail.poke2[3], mail.poke2[1], mail.poke2[2], mail.poke2[4], mail.poke2[5])
|
mail.poke2[0], mail.poke2[3], mail.poke2[1], mail.poke2[2], mail.poke2[4], mail.poke2[5]
|
||||||
|
)
|
||||||
sprites["bearer2"].setBitmap(bitmapFileName)
|
sprites["bearer2"].setBitmap(bitmapFileName)
|
||||||
sprites["bearer2"].src_rect.set(0, 0, 64, 64)
|
sprites["bearer2"].src_rect.set(0, 0, 64, 64)
|
||||||
end
|
end
|
||||||
if mail.poke3
|
if mail.poke3
|
||||||
sprites["bearer3"] = IconSprite.new(224, 288, viewport)
|
sprites["bearer3"] = IconSprite.new(224, 288, viewport)
|
||||||
bitmapFileName = GameData::Species.icon_filename(mail.poke3[0],
|
bitmapFileName = GameData::Species.icon_filename(
|
||||||
mail.poke3[3], mail.poke3[1], mail.poke3[2], mail.poke3[4], mail.poke3[5])
|
mail.poke3[0], mail.poke3[3], mail.poke3[1], mail.poke3[2], mail.poke3[4], mail.poke3[5]
|
||||||
|
)
|
||||||
sprites["bearer3"].setBitmap(bitmapFileName)
|
sprites["bearer3"].setBitmap(bitmapFileName)
|
||||||
sprites["bearer3"].src_rect.set(0, 0, 64, 64)
|
sprites["bearer3"].src_rect.set(0, 0, 64, 64)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -78,7 +78,8 @@ class PokemonBag
|
|||||||
max_size = max_pocket_size(pocket)
|
max_size = max_pocket_size(pocket)
|
||||||
max_size = @pockets[pocket].length + 1 if max_size < 0 # Infinite size
|
max_size = @pockets[pocket].length + 1 if max_size < 0 # Infinite size
|
||||||
return ItemStorageHelper.can_add?(
|
return ItemStorageHelper.can_add?(
|
||||||
@pockets[pocket], max_size, Settings::BAG_MAX_PER_SLOT, item_data.id, qty)
|
@pockets[pocket], max_size, Settings::BAG_MAX_PER_SLOT, item_data.id, qty
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
def add(item, qty = 1)
|
def add(item, qty = 1)
|
||||||
|
|||||||
@@ -103,8 +103,8 @@ class PokemonEggHatch_Scene
|
|||||||
pbMEPlay("Evolution success")
|
pbMEPlay("Evolution success")
|
||||||
@pokemon.name = nil
|
@pokemon.name = nil
|
||||||
pbMessage(_INTL("\\se[]{1} hatched from the Egg!\\wt[80]", @pokemon.name)) { update }
|
pbMessage(_INTL("\\se[]{1} hatched from the Egg!\\wt[80]", @pokemon.name)) { update }
|
||||||
if pbConfirmMessage(
|
if pbConfirmMessage(_INTL("Would you like to nickname the newly hatched {1}?",
|
||||||
_INTL("Would you like to nickname the newly hatched {1}?", @pokemon.name)) { update }
|
@pokemon.name)) { update }
|
||||||
nickname = pbEnterPokemonName(_INTL("{1}'s nickname?", @pokemon.name),
|
nickname = pbEnterPokemonName(_INTL("{1}'s nickname?", @pokemon.name),
|
||||||
0, Pokemon::MAX_NAME_SIZE, "", @pokemon, true)
|
0, Pokemon::MAX_NAME_SIZE, "", @pokemon, true)
|
||||||
@pokemon.name = nickname
|
@pokemon.name = nickname
|
||||||
|
|||||||
@@ -47,7 +47,8 @@ class PokemonPokedexMenu_Scene
|
|||||||
@sprites["background"] = IconSprite.new(0, 0, @viewport)
|
@sprites["background"] = IconSprite.new(0, 0, @viewport)
|
||||||
@sprites["background"].setBitmap(_INTL("Graphics/Pictures/Pokedex/bg_menu"))
|
@sprites["background"].setBitmap(_INTL("Graphics/Pictures/Pokedex/bg_menu"))
|
||||||
@sprites["headings"] = Window_AdvancedTextPokemon.newWithSize(
|
@sprites["headings"] = Window_AdvancedTextPokemon.newWithSize(
|
||||||
_INTL("<c3=F8F8F8,C02028>SEEN<r>OBTAINED</c3>"), 286, 136, 208, 64, @viewport)
|
_INTL("<c3=F8F8F8,C02028>SEEN<r>OBTAINED</c3>"), 286, 136, 208, 64, @viewport
|
||||||
|
)
|
||||||
@sprites["headings"].windowskin = nil
|
@sprites["headings"].windowskin = nil
|
||||||
@sprites["commands"] = Window_DexesList.new(commands, commands2, Graphics.width - 84)
|
@sprites["commands"] = Window_DexesList.new(commands, commands2, Graphics.width - 84)
|
||||||
@sprites["commands"].x = 40
|
@sprites["commands"].x = 40
|
||||||
|
|||||||
@@ -406,16 +406,14 @@ class PokemonPartyPanel < SpriteWrapper
|
|||||||
# Draw shiny icon
|
# Draw shiny icon
|
||||||
if @pokemon.shiny?
|
if @pokemon.shiny?
|
||||||
pbDrawImagePositions(@overlaysprite.bitmap,
|
pbDrawImagePositions(@overlaysprite.bitmap,
|
||||||
[["Graphics/Pictures/shiny", 80, 48, 0, 0, 16, 16]]
|
[["Graphics/Pictures/shiny", 80, 48, 0, 0, 16, 16]])
|
||||||
)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
pbDrawTextPositions(@overlaysprite.bitmap, textpos)
|
pbDrawTextPositions(@overlaysprite.bitmap, textpos)
|
||||||
# Draw level text
|
# Draw level text
|
||||||
if !@pokemon.egg?
|
if !@pokemon.egg?
|
||||||
pbDrawImagePositions(@overlaysprite.bitmap,
|
pbDrawImagePositions(@overlaysprite.bitmap,
|
||||||
[["Graphics/Pictures/Party/overlay_lv", 20, 70, 0, 0, 22, 14]]
|
[["Graphics/Pictures/Party/overlay_lv", 20, 70, 0, 0, 22, 14]])
|
||||||
)
|
|
||||||
pbSetSmallFont(@overlaysprite.bitmap)
|
pbSetSmallFont(@overlaysprite.bitmap)
|
||||||
pbDrawTextPositions(@overlaysprite.bitmap, [
|
pbDrawTextPositions(@overlaysprite.bitmap, [
|
||||||
[@pokemon.level.to_s, 42, 57, 0, basecolor, shadowcolor]
|
[@pokemon.level.to_s, 42, 57, 0, basecolor, shadowcolor]
|
||||||
@@ -461,7 +459,8 @@ class PokemonParty_Scene
|
|||||||
@sprites["messagebox"].letterbyletter = true
|
@sprites["messagebox"].letterbyletter = true
|
||||||
pbBottomLeftLines(@sprites["messagebox"], 2)
|
pbBottomLeftLines(@sprites["messagebox"], 2)
|
||||||
@sprites["storagetext"] = Window_UnformattedTextPokemon.new(
|
@sprites["storagetext"] = Window_UnformattedTextPokemon.new(
|
||||||
@can_access_storage ? _INTL("[Special]: To Boxes") : "")
|
@can_access_storage ? _INTL("[Special]: To Boxes") : ""
|
||||||
|
)
|
||||||
@sprites["storagetext"].x = 32
|
@sprites["storagetext"].x = 32
|
||||||
@sprites["storagetext"].y = Graphics.height - @sprites["messagebox"].height - 16
|
@sprites["storagetext"].y = Graphics.height - @sprites["messagebox"].height - 16
|
||||||
@sprites["storagetext"].z = 10
|
@sprites["storagetext"].z = 10
|
||||||
@@ -1103,11 +1102,15 @@ class PokemonPartyScreen
|
|||||||
annot.push((elig) ? _INTL("ABLE") : _INTL("NOT ABLE"))
|
annot.push((elig) ? _INTL("ABLE") : _INTL("NOT ABLE"))
|
||||||
end
|
end
|
||||||
ret = -1
|
ret = -1
|
||||||
@scene.pbStartScene(@party,
|
@scene.pbStartScene(
|
||||||
(@party.length > 1) ? _INTL("Choose a Pokémon.") : _INTL("Choose Pokémon or cancel."), annot)
|
@party,
|
||||||
|
(@party.length > 1) ? _INTL("Choose a Pokémon.") : _INTL("Choose Pokémon or cancel."),
|
||||||
|
annot
|
||||||
|
)
|
||||||
loop do
|
loop do
|
||||||
@scene.pbSetHelpText(
|
@scene.pbSetHelpText(
|
||||||
(@party.length > 1) ? _INTL("Choose a Pokémon.") : _INTL("Choose Pokémon or cancel."))
|
(@party.length > 1) ? _INTL("Choose a Pokémon.") : _INTL("Choose Pokémon or cancel.")
|
||||||
|
)
|
||||||
pkmnid = @scene.pbChoosePokemon
|
pkmnid = @scene.pbChoosePokemon
|
||||||
break if pkmnid < 0
|
break if pkmnid < 0
|
||||||
if !eligibility[pkmnid] && !allowIneligible
|
if !eligibility[pkmnid] && !allowIneligible
|
||||||
@@ -1131,11 +1134,15 @@ class PokemonPartyScreen
|
|||||||
annot.push((elig) ? _INTL("ABLE") : _INTL("NOT ABLE"))
|
annot.push((elig) ? _INTL("ABLE") : _INTL("NOT ABLE"))
|
||||||
end
|
end
|
||||||
ret = -1
|
ret = -1
|
||||||
@scene.pbStartScene(@party,
|
@scene.pbStartScene(
|
||||||
(@party.length > 1) ? _INTL("Choose a Pokémon.") : _INTL("Choose Pokémon or cancel."), annot)
|
@party,
|
||||||
|
(@party.length > 1) ? _INTL("Choose a Pokémon.") : _INTL("Choose Pokémon or cancel."),
|
||||||
|
annot
|
||||||
|
)
|
||||||
loop do
|
loop do
|
||||||
@scene.pbSetHelpText(
|
@scene.pbSetHelpText(
|
||||||
(@party.length > 1) ? _INTL("Choose a Pokémon.") : _INTL("Choose Pokémon or cancel."))
|
(@party.length > 1) ? _INTL("Choose a Pokémon.") : _INTL("Choose Pokémon or cancel.")
|
||||||
|
)
|
||||||
pkmnid = @scene.pbChoosePokemon
|
pkmnid = @scene.pbChoosePokemon
|
||||||
break if pkmnid < 0
|
break if pkmnid < 0
|
||||||
if !eligibility[pkmnid] && !allowIneligible
|
if !eligibility[pkmnid] && !allowIneligible
|
||||||
|
|||||||
@@ -197,8 +197,9 @@ class PokemonBag_Scene
|
|||||||
@sprites["itemlist"].baseColor = ITEMLISTBASECOLOR
|
@sprites["itemlist"].baseColor = ITEMLISTBASECOLOR
|
||||||
@sprites["itemlist"].shadowColor = ITEMLISTSHADOWCOLOR
|
@sprites["itemlist"].shadowColor = ITEMLISTSHADOWCOLOR
|
||||||
@sprites["itemicon"] = ItemIconSprite.new(48, Graphics.height - 48, nil, @viewport)
|
@sprites["itemicon"] = ItemIconSprite.new(48, Graphics.height - 48, nil, @viewport)
|
||||||
@sprites["itemtext"] = Window_UnformattedTextPokemon.newWithSize("",
|
@sprites["itemtext"] = Window_UnformattedTextPokemon.newWithSize(
|
||||||
72, 270, Graphics.width - 72 - 24, 128, @viewport)
|
"", 72, 270, Graphics.width - 72 - 24, 128, @viewport
|
||||||
|
)
|
||||||
@sprites["itemtext"].baseColor = ITEMTEXTBASECOLOR
|
@sprites["itemtext"].baseColor = ITEMTEXTBASECOLOR
|
||||||
@sprites["itemtext"].shadowColor = ITEMTEXTSHADOWCOLOR
|
@sprites["itemtext"].shadowColor = ITEMTEXTSHADOWCOLOR
|
||||||
@sprites["itemtext"].visible = true
|
@sprites["itemtext"].visible = true
|
||||||
@@ -268,13 +269,16 @@ class PokemonBag_Scene
|
|||||||
if @choosing && @filterlist
|
if @choosing && @filterlist
|
||||||
for i in 1...@bag.pockets.length
|
for i in 1...@bag.pockets.length
|
||||||
if @filterlist[i].length == 0
|
if @filterlist[i].length == 0
|
||||||
@sprites["pocketicon"].bitmap.blt(6 + (i - 1) * 22, 6,
|
@sprites["pocketicon"].bitmap.blt(
|
||||||
@pocketbitmap.bitmap, Rect.new((i - 1) * 20, 28, 20, 20))
|
6 + (i - 1) * 22, 6, @pocketbitmap.bitmap, Rect.new((i - 1) * 20, 28, 20, 20)
|
||||||
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@sprites["pocketicon"].bitmap.blt(2 + (@sprites["itemlist"].pocket - 1) * 22, 2,
|
@sprites["pocketicon"].bitmap.blt(
|
||||||
@pocketbitmap.bitmap, Rect.new((@sprites["itemlist"].pocket - 1) * 28, 0, 28, 28))
|
2 + (@sprites["itemlist"].pocket - 1) * 22, 2, @pocketbitmap.bitmap,
|
||||||
|
Rect.new((@sprites["itemlist"].pocket - 1) * 28, 0, 28, 28)
|
||||||
|
)
|
||||||
# Refresh the item window
|
# Refresh the item window
|
||||||
@sprites["itemlist"].refresh
|
@sprites["itemlist"].refresh
|
||||||
# Refresh more things
|
# Refresh more things
|
||||||
@@ -552,7 +556,8 @@ class PokemonBagScreen
|
|||||||
params.setRange(0, Settings::BAG_MAX_PER_SLOT)
|
params.setRange(0, Settings::BAG_MAX_PER_SLOT)
|
||||||
params.setDefaultValue(qty)
|
params.setDefaultValue(qty)
|
||||||
newqty = pbMessageChooseNumber(
|
newqty = pbMessageChooseNumber(
|
||||||
_INTL("Choose new quantity of {1} (max. #{Settings::BAG_MAX_PER_SLOT}).", itemplural), params) { @scene.pbUpdate }
|
_INTL("Choose new quantity of {1} (max. #{Settings::BAG_MAX_PER_SLOT}).", itemplural), params
|
||||||
|
) { @scene.pbUpdate }
|
||||||
if newqty > qty
|
if newqty > qty
|
||||||
@bag.add(item, newqty - qty)
|
@bag.add(item, newqty - qty)
|
||||||
elsif newqty < qty
|
elsif newqty < qty
|
||||||
|
|||||||
@@ -43,13 +43,15 @@ class PokemonPhoneScene
|
|||||||
@viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
|
@viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
|
||||||
@viewport.z = 99999
|
@viewport.z = 99999
|
||||||
@sprites["list"] = Window_PhoneList.newEmpty(152, 32, Graphics.width - 142, Graphics.height - 80, @viewport)
|
@sprites["list"] = Window_PhoneList.newEmpty(152, 32, Graphics.width - 142, Graphics.height - 80, @viewport)
|
||||||
@sprites["header"] = Window_UnformattedTextPokemon.newWithSize(_INTL("Phone"),
|
@sprites["header"] = Window_UnformattedTextPokemon.newWithSize(
|
||||||
2, -18, 128, 64, @viewport)
|
_INTL("Phone"), 2, -18, 128, 64, @viewport
|
||||||
|
)
|
||||||
@sprites["header"].baseColor = Color.new(248, 248, 248)
|
@sprites["header"].baseColor = Color.new(248, 248, 248)
|
||||||
@sprites["header"].shadowColor = Color.new(0, 0, 0)
|
@sprites["header"].shadowColor = Color.new(0, 0, 0)
|
||||||
mapname = (@trainers[0][2]) ? pbGetMapNameFromId(@trainers[0][2]) : ""
|
mapname = (@trainers[0][2]) ? pbGetMapNameFromId(@trainers[0][2]) : ""
|
||||||
@sprites["bottom"] = Window_AdvancedTextPokemon.newWithSize("",
|
@sprites["bottom"] = Window_AdvancedTextPokemon.newWithSize(
|
||||||
162, Graphics.height - 64, Graphics.width - 158, 64, @viewport)
|
"", 162, Graphics.height - 64, Graphics.width - 158, 64, @viewport
|
||||||
|
)
|
||||||
@sprites["bottom"].text = "<ac>" + mapname
|
@sprites["bottom"].text = "<ac>" + mapname
|
||||||
@sprites["info"] = Window_AdvancedTextPokemon.newWithSize("", -8, 224, 180, 160, @viewport)
|
@sprites["info"] = Window_AdvancedTextPokemon.newWithSize("", -8, 224, 180, 160, @viewport)
|
||||||
addBackgroundPlane(@sprites, "bg", "phonebg", @viewport)
|
addBackgroundPlane(@sprites, "bg", "phonebg", @viewport)
|
||||||
@@ -68,8 +70,7 @@ class PokemonPhoneScene
|
|||||||
for trainer in @trainers
|
for trainer in @trainers
|
||||||
if trainer.length == 4
|
if trainer.length == 4
|
||||||
displayname = _INTL("{1} {2}", GameData::TrainerType.get(trainer[0]).name,
|
displayname = _INTL("{1} {2}", GameData::TrainerType.get(trainer[0]).name,
|
||||||
pbGetMessageFromHash(MessageTypes::TrainerNames, trainer[1])
|
pbGetMessageFromHash(MessageTypes::TrainerNames, trainer[1]))
|
||||||
)
|
|
||||||
commands.push(displayname) # trainer's display name
|
commands.push(displayname) # trainer's display name
|
||||||
else
|
else
|
||||||
commands.push(trainer[1]) # NPC's display name
|
commands.push(trainer[1]) # NPC's display name
|
||||||
|
|||||||
@@ -14,12 +14,14 @@ class PokemonJukebox_Scene
|
|||||||
@sprites["background"] = IconSprite.new(0, 0, @viewport)
|
@sprites["background"] = IconSprite.new(0, 0, @viewport)
|
||||||
@sprites["background"].setBitmap("Graphics/Pictures/jukeboxbg")
|
@sprites["background"].setBitmap("Graphics/Pictures/jukeboxbg")
|
||||||
@sprites["header"] = Window_UnformattedTextPokemon.newWithSize(
|
@sprites["header"] = Window_UnformattedTextPokemon.newWithSize(
|
||||||
_INTL("Jukebox"), 2, -18, 128, 64, @viewport)
|
_INTL("Jukebox"), 2, -18, 128, 64, @viewport
|
||||||
|
)
|
||||||
@sprites["header"].baseColor = Color.new(248, 248, 248)
|
@sprites["header"].baseColor = Color.new(248, 248, 248)
|
||||||
@sprites["header"].shadowColor = Color.new(0, 0, 0)
|
@sprites["header"].shadowColor = Color.new(0, 0, 0)
|
||||||
@sprites["header"].windowskin = nil
|
@sprites["header"].windowskin = nil
|
||||||
@sprites["commands"] = Window_CommandPokemon.newWithSize(@commands,
|
@sprites["commands"] = Window_CommandPokemon.newWithSize(
|
||||||
94, 92, 324, 224, @viewport)
|
@commands, 94, 92, 324, 224, @viewport
|
||||||
|
)
|
||||||
@sprites["commands"].windowskin = nil
|
@sprites["commands"].windowskin = nil
|
||||||
pbFadeInAndShow(@sprites) { pbUpdate }
|
pbFadeInAndShow(@sprites) { pbUpdate }
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -106,8 +106,10 @@ class PokemonLoad_Scene
|
|||||||
addBackgroundOrColoredPlane(@sprites, "background", "loadbg", Color.new(248, 248, 248), @viewport)
|
addBackgroundOrColoredPlane(@sprites, "background", "loadbg", Color.new(248, 248, 248), @viewport)
|
||||||
y = 16 * 2
|
y = 16 * 2
|
||||||
for i in 0...commands.length
|
for i in 0...commands.length
|
||||||
@sprites["panel#{i}"] = PokemonLoadPanel.new(i, commands[i],
|
@sprites["panel#{i}"] = PokemonLoadPanel.new(
|
||||||
(show_continue) ? (i == 0) : false, trainer, frame_count, stats, map_id, @viewport)
|
i, commands[i], (show_continue) ? (i == 0) : false, trainer,
|
||||||
|
frame_count, stats, map_id, @viewport
|
||||||
|
)
|
||||||
@sprites["panel#{i}"].x = 24 * 2
|
@sprites["panel#{i}"].x = 24 * 2
|
||||||
@sprites["panel#{i}"].y = y
|
@sprites["panel#{i}"].y = y
|
||||||
@sprites["panel#{i}"].pbRefresh
|
@sprites["panel#{i}"].pbRefresh
|
||||||
|
|||||||
@@ -87,8 +87,7 @@ class PokemonSaveScreen
|
|||||||
pbMessage(_INTL('WARNING!'))
|
pbMessage(_INTL('WARNING!'))
|
||||||
pbMessage(_INTL('There is a different game file that is already saved.'))
|
pbMessage(_INTL('There is a different game file that is already saved.'))
|
||||||
pbMessage(_INTL("If you save now, the other file's adventure, including items and Pokémon, will be entirely lost."))
|
pbMessage(_INTL("If you save now, the other file's adventure, including items and Pokémon, will be entirely lost."))
|
||||||
if !pbConfirmMessageSerious(
|
if !pbConfirmMessageSerious(_INTL('Are you sure you want to save now and overwrite the other save file?'))
|
||||||
_INTL('Are you sure you want to save now and overwrite the other save file?'))
|
|
||||||
pbSEPlay('GUI save choice')
|
pbSEPlay('GUI save choice')
|
||||||
@scene.pbEndScreen
|
@scene.pbEndScreen
|
||||||
return false
|
return false
|
||||||
|
|||||||
@@ -220,8 +220,7 @@ class Window_PokemonOption < Window_DrawableCommand
|
|||||||
for value in @options[index].values
|
for value in @options[index].values
|
||||||
pbDrawShadowText(self.contents, xpos, rect.y, optionwidth, rect.height, value,
|
pbDrawShadowText(self.contents, xpos, rect.y, optionwidth, rect.height, value,
|
||||||
(ivalue == self[index]) ? @selBaseColor : self.baseColor,
|
(ivalue == self[index]) ? @selBaseColor : self.baseColor,
|
||||||
(ivalue == self[index]) ? @selShadowColor : self.shadowColor
|
(ivalue == self[index]) ? @selShadowColor : self.shadowColor)
|
||||||
)
|
|
||||||
xpos += self.contents.text_size(value).width
|
xpos += self.contents.text_size(value).width
|
||||||
xpos += spacing
|
xpos += spacing
|
||||||
ivalue += 1
|
ivalue += 1
|
||||||
@@ -245,7 +244,8 @@ class Window_PokemonOption < Window_DrawableCommand
|
|||||||
self.contents.fill_rect(
|
self.contents.fill_rect(
|
||||||
xpos + (sliderlength - 8) * (@options[index].optstart + self[index]) / @options[index].optend,
|
xpos + (sliderlength - 8) * (@options[index].optstart + self[index]) / @options[index].optend,
|
||||||
rect.y - 8 + rect.height / 2,
|
rect.y - 8 + rect.height / 2,
|
||||||
8, 16, @selBaseColor)
|
8, 16, @selBaseColor
|
||||||
|
)
|
||||||
value = sprintf("%d", @options[index].optstart + self[index])
|
value = sprintf("%d", @options[index].optstart + self[index])
|
||||||
xpos += optionwidth - self.contents.text_size(value).width
|
xpos += optionwidth - self.contents.text_size(value).width
|
||||||
pbDrawShadowText(self.contents, xpos, rect.y, optionwidth, rect.height, value,
|
pbDrawShadowText(self.contents, xpos, rect.y, optionwidth, rect.height, value,
|
||||||
@@ -291,7 +291,8 @@ class PokemonOption_Scene
|
|||||||
@viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
|
@viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
|
||||||
@viewport.z = 99999
|
@viewport.z = 99999
|
||||||
@sprites["title"] = Window_UnformattedTextPokemon.newWithSize(
|
@sprites["title"] = Window_UnformattedTextPokemon.newWithSize(
|
||||||
_INTL("Options"), 0, 0, Graphics.width, 64, @viewport)
|
_INTL("Options"), 0, 0, Graphics.width, 64, @viewport
|
||||||
|
)
|
||||||
@sprites["textbox"] = pbCreateMessageWindow
|
@sprites["textbox"] = pbCreateMessageWindow
|
||||||
@sprites["textbox"].text = _INTL("Speech frame {1}.", 1 + $PokemonSystem.textskin)
|
@sprites["textbox"].text = _INTL("Speech frame {1}.", 1 + $PokemonSystem.textskin)
|
||||||
@sprites["textbox"].letterbyletter = false
|
@sprites["textbox"].letterbyletter = false
|
||||||
@@ -376,9 +377,10 @@ class PokemonOption_Scene
|
|||||||
)
|
)
|
||||||
]
|
]
|
||||||
@PokemonOptions = pbAddOnOptions(@PokemonOptions)
|
@PokemonOptions = pbAddOnOptions(@PokemonOptions)
|
||||||
@sprites["option"] = Window_PokemonOption.new(@PokemonOptions, 0,
|
@sprites["option"] = Window_PokemonOption.new(
|
||||||
@sprites["title"].height, Graphics.width,
|
@PokemonOptions, 0, @sprites["title"].height, Graphics.width,
|
||||||
Graphics.height - @sprites["title"].height - @sprites["textbox"].height)
|
Graphics.height - @sprites["title"].height - @sprites["textbox"].height
|
||||||
|
)
|
||||||
@sprites["option"].viewport = @viewport
|
@sprites["option"].viewport = @viewport
|
||||||
@sprites["option"].visible = true
|
@sprites["option"].visible = true
|
||||||
# Get the values of each option
|
# Get the values of each option
|
||||||
|
|||||||
@@ -95,9 +95,9 @@ class MosaicPokemonSprite < PokemonSprite
|
|||||||
@mosaicbitmap2.clear
|
@mosaicbitmap2.clear
|
||||||
@mosaicbitmap.stretch_blt(Rect.new(0, 0, newWidth, newHeight), @oldbitmap, @oldbitmap.rect)
|
@mosaicbitmap.stretch_blt(Rect.new(0, 0, newWidth, newHeight), @oldbitmap, @oldbitmap.rect)
|
||||||
@mosaicbitmap2.stretch_blt(
|
@mosaicbitmap2.stretch_blt(
|
||||||
Rect.new(-@mosaic / 2 + 1, -@mosaic / 2 + 1,
|
Rect.new(-@mosaic / 2 + 1, -@mosaic / 2 + 1, @mosaicbitmap2.width, @mosaicbitmap2.height),
|
||||||
@mosaicbitmap2.width, @mosaicbitmap2.height),
|
@mosaicbitmap, Rect.new(0, 0, newWidth, newHeight)
|
||||||
@mosaicbitmap, Rect.new(0, 0, newWidth, newHeight))
|
)
|
||||||
self.bitmap = @mosaicbitmap2
|
self.bitmap = @mosaicbitmap2
|
||||||
end
|
end
|
||||||
@inrefresh = false
|
@inrefresh = false
|
||||||
@@ -1928,8 +1928,7 @@ class PokemonStorageScreen
|
|||||||
_INTL("Name"),
|
_INTL("Name"),
|
||||||
_INTL("Cancel")
|
_INTL("Cancel")
|
||||||
]
|
]
|
||||||
command = pbShowCommands(
|
command = pbShowCommands(_INTL("What do you want to do?"), commands)
|
||||||
_INTL("What do you want to do?"), commands)
|
|
||||||
case command
|
case command
|
||||||
when 0
|
when 0
|
||||||
destbox = @scene.pbChooseBox(_INTL("Jump to which Box?"))
|
destbox = @scene.pbChooseBox(_INTL("Jump to which Box?"))
|
||||||
|
|||||||
@@ -44,8 +44,7 @@ class StorageSystemPC
|
|||||||
[_INTL("Organize the Pokémon in Boxes and in your party."),
|
[_INTL("Organize the Pokémon in Boxes and in your party."),
|
||||||
_INTL("Move Pokémon stored in Boxes to your party."),
|
_INTL("Move Pokémon stored in Boxes to your party."),
|
||||||
_INTL("Store Pokémon in your party in Boxes."),
|
_INTL("Store Pokémon in your party in Boxes."),
|
||||||
_INTL("Return to the previous menu.")], -1, command
|
_INTL("Return to the previous menu.")], -1, command)
|
||||||
)
|
|
||||||
if command >= 0 && command < 3
|
if command >= 0 && command < 3
|
||||||
case command
|
case command
|
||||||
when 1 # Withdraw
|
when 1 # Withdraw
|
||||||
@@ -123,8 +122,7 @@ def pbPCItemStorage
|
|||||||
[_INTL("Take out items from the PC."),
|
[_INTL("Take out items from the PC."),
|
||||||
_INTL("Store items in the PC."),
|
_INTL("Store items in the PC."),
|
||||||
_INTL("Throw away items stored in the PC."),
|
_INTL("Throw away items stored in the PC."),
|
||||||
_INTL("Go back to the previous menu.")], -1, command
|
_INTL("Go back to the previous menu.")], -1, command)
|
||||||
)
|
|
||||||
case command
|
case command
|
||||||
when 0 # Withdraw Item
|
when 0 # Withdraw Item
|
||||||
if !$PokemonGlobal.pcItemStorage
|
if !$PokemonGlobal.pcItemStorage
|
||||||
|
|||||||
@@ -203,13 +203,15 @@ class PokemonMart_Scene
|
|||||||
@sprites["background"].setBitmap("Graphics/Pictures/martScreen")
|
@sprites["background"].setBitmap("Graphics/Pictures/martScreen")
|
||||||
@sprites["icon"] = ItemIconSprite.new(36, Graphics.height - 50, nil, @viewport)
|
@sprites["icon"] = ItemIconSprite.new(36, Graphics.height - 50, nil, @viewport)
|
||||||
winAdapter = buying ? BuyAdapter.new(adapter) : SellAdapter.new(adapter)
|
winAdapter = buying ? BuyAdapter.new(adapter) : SellAdapter.new(adapter)
|
||||||
@sprites["itemwindow"] = Window_PokemonMart.new(stock, winAdapter,
|
@sprites["itemwindow"] = Window_PokemonMart.new(
|
||||||
Graphics.width - 316 - 16, 12, 330 + 16, Graphics.height - 126)
|
stock, winAdapter, Graphics.width - 316 - 16, 12, 330 + 16, Graphics.height - 126
|
||||||
|
)
|
||||||
@sprites["itemwindow"].viewport = @viewport
|
@sprites["itemwindow"].viewport = @viewport
|
||||||
@sprites["itemwindow"].index = 0
|
@sprites["itemwindow"].index = 0
|
||||||
@sprites["itemwindow"].refresh
|
@sprites["itemwindow"].refresh
|
||||||
@sprites["itemtextwindow"] = Window_UnformattedTextPokemon.newWithSize("",
|
@sprites["itemtextwindow"] = Window_UnformattedTextPokemon.newWithSize(
|
||||||
64, Graphics.height - 96 - 16, Graphics.width - 64, 128, @viewport)
|
"", 64, Graphics.height - 96 - 16, Graphics.width - 64, 128, @viewport
|
||||||
|
)
|
||||||
pbPrepareWindow(@sprites["itemtextwindow"])
|
pbPrepareWindow(@sprites["itemtextwindow"])
|
||||||
@sprites["itemtextwindow"].baseColor = Color.new(248, 248, 248)
|
@sprites["itemtextwindow"].baseColor = Color.new(248, 248, 248)
|
||||||
@sprites["itemtextwindow"].shadowColor = Color.new(0, 0, 0)
|
@sprites["itemtextwindow"].shadowColor = Color.new(0, 0, 0)
|
||||||
@@ -562,7 +564,8 @@ class PokemonMartScreen
|
|||||||
maxafford = (price <= 0) ? Settings::BAG_MAX_PER_SLOT : @adapter.getMoney / price
|
maxafford = (price <= 0) ? Settings::BAG_MAX_PER_SLOT : @adapter.getMoney / price
|
||||||
maxafford = Settings::BAG_MAX_PER_SLOT if maxafford > Settings::BAG_MAX_PER_SLOT
|
maxafford = Settings::BAG_MAX_PER_SLOT if maxafford > Settings::BAG_MAX_PER_SLOT
|
||||||
quantity = @scene.pbChooseNumber(
|
quantity = @scene.pbChooseNumber(
|
||||||
_INTL("{1}? Certainly. How many would you like?", itemname), item, maxafford)
|
_INTL("{1}? Certainly. How many would you like?", itemname), item, maxafford
|
||||||
|
)
|
||||||
next if quantity == 0
|
next if quantity == 0
|
||||||
price *= quantity
|
price *= quantity
|
||||||
if !pbConfirm(_INTL("{1}, and you want {2}. That will be ${3}. OK?",
|
if !pbConfirm(_INTL("{1}, and you want {2}. That will be ${3}. OK?",
|
||||||
@@ -633,7 +636,8 @@ class PokemonMartScreen
|
|||||||
@scene.pbShowMoney
|
@scene.pbShowMoney
|
||||||
if qty > 1
|
if qty > 1
|
||||||
qty = @scene.pbChooseNumber(
|
qty = @scene.pbChooseNumber(
|
||||||
_INTL("{1}? How many would you like to sell?", itemname), item, qty)
|
_INTL("{1}? How many would you like to sell?", itemname), item, qty
|
||||||
|
)
|
||||||
end
|
end
|
||||||
if qty == 0
|
if qty == 0
|
||||||
@scene.pbHideMoney
|
@scene.pbHideMoney
|
||||||
@@ -669,8 +673,7 @@ def pbPokemonMart(stock, speech = nil, cantsell = false)
|
|||||||
commands[cmdBuy = commands.length] = _INTL("Buy")
|
commands[cmdBuy = commands.length] = _INTL("Buy")
|
||||||
commands[cmdSell = commands.length] = _INTL("Sell") if !cantsell
|
commands[cmdSell = commands.length] = _INTL("Sell") if !cantsell
|
||||||
commands[cmdQuit = commands.length] = _INTL("Quit")
|
commands[cmdQuit = commands.length] = _INTL("Quit")
|
||||||
cmd = pbMessage(
|
cmd = pbMessage(speech ? speech : _INTL("Welcome! How may I serve you?"),
|
||||||
speech ? speech : _INTL("Welcome! How may I serve you?"),
|
|
||||||
commands, cmdQuit + 1)
|
commands, cmdQuit + 1)
|
||||||
loop do
|
loop do
|
||||||
if cmdBuy >= 0 && cmd == cmdBuy
|
if cmdBuy >= 0 && cmd == cmdBuy
|
||||||
|
|||||||
@@ -411,7 +411,8 @@ class PurifyChamberScreen
|
|||||||
if @chamber.setCount(set) == 0 && @chamber.isPurifiableIgnoreRegular?(set)
|
if @chamber.setCount(set) == 0 && @chamber.isPurifiableIgnoreRegular?(set)
|
||||||
pkmn = @chamber.getShadow(set)
|
pkmn = @chamber.getShadow(set)
|
||||||
@scene.pbDisplay(
|
@scene.pbDisplay(
|
||||||
_INTL("This {1} is ready to open its heart. However, there must be at least one regular Pokémon in the set to perform a purification ceremony.", pkmn.name))
|
_INTL("This {1} is ready to open its heart. However, there must be at least one regular Pokémon in the set to perform a purification ceremony.", pkmn.name)
|
||||||
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -447,7 +448,8 @@ class PurifyChamberScreen
|
|||||||
commands.push(_INTL("CANCEL"))
|
commands.push(_INTL("CANCEL"))
|
||||||
choice = @scene.pbShowCommands(
|
choice = @scene.pbShowCommands(
|
||||||
_INTL("What shall I do with this {1}?",
|
_INTL("What shall I do with this {1}?",
|
||||||
heldpkmn ? heldpkmn.name : curpkmn.name), commands)
|
heldpkmn ? heldpkmn.name : curpkmn.name), commands
|
||||||
|
)
|
||||||
if choice == 0
|
if choice == 0
|
||||||
if heldpkmn
|
if heldpkmn
|
||||||
if pbPlace(heldpkmn, cmd[1]) # calls place or shift as appropriate
|
if pbPlace(heldpkmn, cmd[1]) # calls place or shift as appropriate
|
||||||
@@ -1113,7 +1115,8 @@ class PurifyChamberScene
|
|||||||
addBackgroundOrColoredPlane(@sprites, "bg", "purifychamberbg",
|
addBackgroundOrColoredPlane(@sprites, "bg", "purifychamberbg",
|
||||||
Color.new(0, 0, 0), @viewport)
|
Color.new(0, 0, 0), @viewport)
|
||||||
@sprites["setwindow"] = Window_PurifyChamberSets.new(
|
@sprites["setwindow"] = Window_PurifyChamberSets.new(
|
||||||
@chamber, 0, 0, 112, Graphics.height, @viewport)
|
@chamber, 0, 0, 112, Graphics.height, @viewport
|
||||||
|
)
|
||||||
@sprites["setview"] = PurifyChamberSetView.new(@chamber, set, @viewport)
|
@sprites["setview"] = PurifyChamberSetView.new(@chamber, set, @viewport)
|
||||||
@sprites["msgwindow"] = Window_AdvancedTextPokemon.new("")
|
@sprites["msgwindow"] = Window_AdvancedTextPokemon.new("")
|
||||||
@sprites["msgwindow"].viewport = @viewportmsg
|
@sprites["msgwindow"].viewport = @viewportmsg
|
||||||
|
|||||||
@@ -23,7 +23,8 @@ def pbEditMysteryGift(type, item, id = 0, giftname = "")
|
|||||||
commands.push(_INTL("[Custom]"))
|
commands.push(_INTL("[Custom]"))
|
||||||
loop do
|
loop do
|
||||||
command = pbMessage(
|
command = pbMessage(
|
||||||
_INTL("Choose a phrase to be where the gift Pokémon was obtained from."), commands, -1)
|
_INTL("Choose a phrase to be where the gift Pokémon was obtained from."), commands, -1
|
||||||
|
)
|
||||||
if command < 0
|
if command < 0
|
||||||
return nil if pbConfirmMessage(_INTL("Stop editing this gift?"))
|
return nil if pbConfirmMessage(_INTL("Stop editing this gift?"))
|
||||||
elsif command < commands.length - 1
|
elsif command < commands.length - 1
|
||||||
|
|||||||
@@ -81,8 +81,9 @@ class PokemonEntryScene
|
|||||||
@viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
|
@viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
|
||||||
@viewport.z = 99999
|
@viewport.z = 99999
|
||||||
if USEKEYBOARD
|
if USEKEYBOARD
|
||||||
@sprites["entry"] = Window_TextEntry_Keyboard.new(initialText,
|
@sprites["entry"] = Window_TextEntry_Keyboard.new(
|
||||||
0, 0, 400 - 112, 96, helptext, true)
|
initialText, 0, 0, 400 - 112, 96, helptext, true
|
||||||
|
)
|
||||||
Input.text_input = true
|
Input.text_input = true
|
||||||
else
|
else
|
||||||
@sprites["entry"] = Window_TextEntry.new(initialText, 0, 0, 400, 96, helptext, true)
|
@sprites["entry"] = Window_TextEntry.new(initialText, 0, 0, 400, 96, helptext, true)
|
||||||
|
|||||||
@@ -419,7 +419,8 @@ def pbDuel(trainer_id, trainer_name, event, speeches)
|
|||||||
trainer_id = GameData::TrainerType.get(trainer_id).id
|
trainer_id = GameData::TrainerType.get(trainer_id).id
|
||||||
duel = PokemonDuel.new
|
duel = PokemonDuel.new
|
||||||
opponent = NPCTrainer.new(
|
opponent = NPCTrainer.new(
|
||||||
pbGetMessageFromHash(MessageTypes::TrainerNames, trainer_name), trainer_id)
|
pbGetMessageFromHash(MessageTypes::TrainerNames, trainer_name), trainer_id
|
||||||
|
)
|
||||||
speech_texts = []
|
speech_texts = []
|
||||||
for i in 0...12
|
for i in 0...12
|
||||||
speech_texts.push(_I(speeches[i]))
|
speech_texts.push(_I(speeches[i]))
|
||||||
|
|||||||
@@ -169,8 +169,9 @@ class TriadScene
|
|||||||
@viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
|
@viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
|
||||||
@viewport.z = 99999
|
@viewport.z = 99999
|
||||||
addBackgroundPlane(@sprites, "background", "triad_bg", @viewport)
|
addBackgroundPlane(@sprites, "background", "triad_bg", @viewport)
|
||||||
@sprites["helpwindow"] = Window_AdvancedTextPokemon.newWithSize("",
|
@sprites["helpwindow"] = Window_AdvancedTextPokemon.newWithSize(
|
||||||
0, Graphics.height - 64, Graphics.width, 64, @viewport)
|
"", 0, Graphics.height - 64, Graphics.width, 64, @viewport
|
||||||
|
)
|
||||||
for i in 0...@battle.width * @battle.height
|
for i in 0...@battle.width * @battle.height
|
||||||
@sprites["sprite#{i}"] = SpriteWrapper.new(@viewport)
|
@sprites["sprite#{i}"] = SpriteWrapper.new(@viewport)
|
||||||
@sprites["sprite#{i}"].x = Graphics.width / 2 - 118 + (i % 3) * 78
|
@sprites["sprite#{i}"].x = Graphics.width / 2 - 118 + (i % 3) * 78
|
||||||
@@ -1076,7 +1077,8 @@ def pbBuyTriads
|
|||||||
cmdwindow = Window_CommandPokemonEx.newWithSize(realcommands, 0, 0, Graphics.width / 2, Graphics.height)
|
cmdwindow = Window_CommandPokemonEx.newWithSize(realcommands, 0, 0, Graphics.width / 2, Graphics.height)
|
||||||
cmdwindow.z = 99999
|
cmdwindow.z = 99999
|
||||||
goldwindow = Window_UnformattedTextPokemon.newWithSize(
|
goldwindow = Window_UnformattedTextPokemon.newWithSize(
|
||||||
_INTL("Money:\r\n{1}", pbGetGoldString), 0, 0, 32, 32)
|
_INTL("Money:\r\n{1}", pbGetGoldString), 0, 0, 32, 32
|
||||||
|
)
|
||||||
goldwindow.resizeToFit(goldwindow.text, Graphics.width)
|
goldwindow.resizeToFit(goldwindow.text, Graphics.width)
|
||||||
goldwindow.x = Graphics.width - goldwindow.width
|
goldwindow.x = Graphics.width - goldwindow.width
|
||||||
goldwindow.y = 0
|
goldwindow.y = 0
|
||||||
@@ -1118,7 +1120,8 @@ def pbBuyTriads
|
|||||||
params.setInitialValue(1)
|
params.setInitialValue(1)
|
||||||
params.setCancelValue(0)
|
params.setCancelValue(0)
|
||||||
quantity = pbMessageChooseNumber(
|
quantity = pbMessageChooseNumber(
|
||||||
_INTL("The {1} card? Certainly. How many would you like?", itemname), params)
|
_INTL("The {1} card? Certainly. How many would you like?", itemname), params
|
||||||
|
)
|
||||||
next if quantity <= 0
|
next if quantity <= 0
|
||||||
price *= quantity
|
price *= quantity
|
||||||
next if !pbConfirmMessage(_INTL("{1}, and you want {2}. That will be ${3}. OK?", itemname, quantity, price.to_s_formatted))
|
next if !pbConfirmMessage(_INTL("{1}, and you want {2}. That will be ${3}. OK?", itemname, quantity, price.to_s_formatted))
|
||||||
@@ -1162,7 +1165,8 @@ def pbSellTriads
|
|||||||
cmdwindow = Window_CommandPokemonEx.newWithSize(commands, 0, 0, Graphics.width / 2, Graphics.height)
|
cmdwindow = Window_CommandPokemonEx.newWithSize(commands, 0, 0, Graphics.width / 2, Graphics.height)
|
||||||
cmdwindow.z = 99999
|
cmdwindow.z = 99999
|
||||||
goldwindow = Window_UnformattedTextPokemon.newWithSize(
|
goldwindow = Window_UnformattedTextPokemon.newWithSize(
|
||||||
_INTL("Money:\r\n{1}", pbGetGoldString), 0, 0, 32, 32)
|
_INTL("Money:\r\n{1}", pbGetGoldString), 0, 0, 32, 32
|
||||||
|
)
|
||||||
goldwindow.resizeToFit(goldwindow.text, Graphics.width)
|
goldwindow.resizeToFit(goldwindow.text, Graphics.width)
|
||||||
goldwindow.x = Graphics.width - goldwindow.width
|
goldwindow.x = Graphics.width - goldwindow.width
|
||||||
goldwindow.y = 0
|
goldwindow.y = 0
|
||||||
@@ -1216,7 +1220,8 @@ def pbSellTriads
|
|||||||
params.setInitialValue(1)
|
params.setInitialValue(1)
|
||||||
params.setCancelValue(0)
|
params.setCancelValue(0)
|
||||||
quantity = pbMessageChooseNumber(
|
quantity = pbMessageChooseNumber(
|
||||||
_INTL("The {1} card? How many would you like to sell?", itemname), params)
|
_INTL("The {1} card? How many would you like to sell?", itemname), params
|
||||||
|
)
|
||||||
end
|
end
|
||||||
if quantity > 0
|
if quantity > 0
|
||||||
price /= 4
|
price /= 4
|
||||||
|
|||||||
@@ -56,11 +56,13 @@ class TilePuzzleCursor < BitmapSprite
|
|||||||
if @game != 3
|
if @game != 3
|
||||||
expand = (@holding) ? 0 : 4
|
expand = (@holding) ? 0 : 4
|
||||||
for i in 0...4
|
for i in 0...4
|
||||||
self.bitmap.blt(x + (i % 2) * (@tilewidth - @cursorbitmap.width / 4) + expand * (((i % 2) * 2) - 1),
|
self.bitmap.blt(
|
||||||
|
x + (i % 2) * (@tilewidth - @cursorbitmap.width / 4) + expand * (((i % 2) * 2) - 1),
|
||||||
y + (i / 2) * (@tileheight - @cursorbitmap.height / 2) + expand * (((i / 2) * 2) - 1),
|
y + (i / 2) * (@tileheight - @cursorbitmap.height / 2) + expand * (((i / 2) * 2) - 1),
|
||||||
@cursorbitmap.bitmap, Rect.new(
|
@cursorbitmap.bitmap, Rect.new((i % 2) * @cursorbitmap.width / 4,
|
||||||
(i % 2) * @cursorbitmap.width / 4, (i / 2) * @cursorbitmap.height / 2,
|
(i / 2) * @cursorbitmap.height / 2,
|
||||||
@cursorbitmap.width / 4, @cursorbitmap.height / 2))
|
@cursorbitmap.width / 4, @cursorbitmap.height / 2)
|
||||||
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
# Arrows
|
# Arrows
|
||||||
@@ -72,8 +74,8 @@ class TilePuzzleCursor < BitmapSprite
|
|||||||
(@tileheight - @cursorbitmap.height / 2) / 2, -expand]
|
(@tileheight - @cursorbitmap.height / 2) / 2, -expand]
|
||||||
for i in 0...4
|
for i in 0...4
|
||||||
if @arrows[i]
|
if @arrows[i]
|
||||||
self.bitmap.blt(x + xin[i], y + yin[i], @cursorbitmap.bitmap, Rect.new(
|
self.bitmap.blt(x + xin[i], y + yin[i], @cursorbitmap.bitmap,
|
||||||
@cursorbitmap.width / 2 + (i % 2) * (@cursorbitmap.width / 4),
|
Rect.new(@cursorbitmap.width / 2 + (i % 2) * (@cursorbitmap.width / 4),
|
||||||
(i / 2) * (@cursorbitmap.height / 2),
|
(i / 2) * (@cursorbitmap.height / 2),
|
||||||
@cursorbitmap.width / 4, @cursorbitmap.height / 2))
|
@cursorbitmap.width / 4, @cursorbitmap.height / 2))
|
||||||
end
|
end
|
||||||
|
|||||||
+4
-2
@@ -373,7 +373,8 @@ class BattleFactoryData
|
|||||||
trainerdata = bttrainers[@trainerid]
|
trainerdata = bttrainers[@trainerid]
|
||||||
@opponent = NPCTrainer.new(
|
@opponent = NPCTrainer.new(
|
||||||
pbGetMessageFromHash(MessageTypes::TrainerNames, trainerdata[1]),
|
pbGetMessageFromHash(MessageTypes::TrainerNames, trainerdata[1]),
|
||||||
trainerdata[0])
|
trainerdata[0]
|
||||||
|
)
|
||||||
opponentPkmn = pbBattleFactoryPokemon(pbBattleChallenge.rules, @bcdata.wins, @bcdata.swaps, @rentals)
|
opponentPkmn = pbBattleFactoryPokemon(pbBattleChallenge.rules, @bcdata.wins, @bcdata.swaps, @rentals)
|
||||||
@opponent.party = opponentPkmn.sample(3)
|
@opponent.party = opponentPkmn.sample(3)
|
||||||
end
|
end
|
||||||
@@ -395,7 +396,8 @@ class BattleFactoryData
|
|||||||
trainerdata = bttrainers[trainerid]
|
trainerdata = bttrainers[trainerid]
|
||||||
@opponent = NPCTrainer.new(
|
@opponent = NPCTrainer.new(
|
||||||
pbGetMessageFromHash(MessageTypes::TrainerNames, trainerdata[1]),
|
pbGetMessageFromHash(MessageTypes::TrainerNames, trainerdata[1]),
|
||||||
trainerdata[0])
|
trainerdata[0]
|
||||||
|
)
|
||||||
opponentPkmn = pbBattleFactoryPokemon(pbBattleChallenge.rules, @bcdata.wins, @bcdata.swaps,
|
opponentPkmn = pbBattleFactoryPokemon(pbBattleChallenge.rules, @bcdata.wins, @bcdata.swaps,
|
||||||
[].concat(@rentals).concat(@oldopponent))
|
[].concat(@rentals).concat(@oldopponent))
|
||||||
@opponent.party = opponentPkmn.sample(3)
|
@opponent.party = opponentPkmn.sample(3)
|
||||||
|
|||||||
+2
-1
@@ -44,7 +44,8 @@ def pbGenerateBattleTrainer(idxTrainer, rules)
|
|||||||
trainerdata = bttrainers[idxTrainer]
|
trainerdata = bttrainers[idxTrainer]
|
||||||
opponent = NPCTrainer.new(
|
opponent = NPCTrainer.new(
|
||||||
pbGetMessageFromHash(MessageTypes::TrainerNames, trainerdata[1]),
|
pbGetMessageFromHash(MessageTypes::TrainerNames, trainerdata[1]),
|
||||||
trainerdata[0])
|
trainerdata[0]
|
||||||
|
)
|
||||||
# Determine how many IVs the trainer's Pokémon will have
|
# Determine how many IVs the trainer's Pokémon will have
|
||||||
indvalues = 31
|
indvalues = 31
|
||||||
indvalues = 21 if idxTrainer < 220
|
indvalues = 21 if idxTrainer < 220
|
||||||
|
|||||||
@@ -7,13 +7,17 @@ class BattleSwapScene
|
|||||||
@sprites = {}
|
@sprites = {}
|
||||||
addBackgroundPlane(@sprites, "bg", "rentbg", @viewport)
|
addBackgroundPlane(@sprites, "bg", "rentbg", @viewport)
|
||||||
@sprites["title"] = Window_UnformattedTextPokemon.newWithSize(
|
@sprites["title"] = Window_UnformattedTextPokemon.newWithSize(
|
||||||
_INTL("RENTAL POKéMON"), 0, 0, Graphics.width, 64, @viewport)
|
_INTL("RENTAL POKéMON"), 0, 0, Graphics.width, 64, @viewport
|
||||||
|
)
|
||||||
@sprites["list"] = Window_AdvancedCommandPokemonEx.newWithSize(
|
@sprites["list"] = Window_AdvancedCommandPokemonEx.newWithSize(
|
||||||
[], 0, 64, Graphics.width, Graphics.height - 128, @viewport)
|
[], 0, 64, Graphics.width, Graphics.height - 128, @viewport
|
||||||
@sprites["help"] = Window_UnformattedTextPokemon.newWithSize("",
|
)
|
||||||
0, Graphics.height - 64, Graphics.width, 64, @viewport)
|
@sprites["help"] = Window_UnformattedTextPokemon.newWithSize(
|
||||||
@sprites["msgwindow"] = Window_AdvancedTextPokemon.newWithSize("",
|
"", 0, Graphics.height - 64, Graphics.width, 64, @viewport
|
||||||
0, Graphics.height - 64, Graphics.height, 64, @viewport)
|
)
|
||||||
|
@sprites["msgwindow"] = Window_AdvancedTextPokemon.newWithSize(
|
||||||
|
"", 0, Graphics.height - 64, Graphics.height, 64, @viewport
|
||||||
|
)
|
||||||
@sprites["msgwindow"].visible = false
|
@sprites["msgwindow"].visible = false
|
||||||
pbUpdateChoices([])
|
pbUpdateChoices([])
|
||||||
pbDeactivateWindows(@sprites)
|
pbDeactivateWindows(@sprites)
|
||||||
@@ -29,13 +33,17 @@ class BattleSwapScene
|
|||||||
@sprites = {}
|
@sprites = {}
|
||||||
addBackgroundPlane(@sprites, "bg", "swapbg", @viewport)
|
addBackgroundPlane(@sprites, "bg", "swapbg", @viewport)
|
||||||
@sprites["title"] = Window_UnformattedTextPokemon.newWithSize(
|
@sprites["title"] = Window_UnformattedTextPokemon.newWithSize(
|
||||||
_INTL("POKéMON SWAP"), 0, 0, Graphics.width, 64, @viewport)
|
_INTL("POKéMON SWAP"), 0, 0, Graphics.width, 64, @viewport
|
||||||
|
)
|
||||||
@sprites["list"] = Window_AdvancedCommandPokemonEx.newWithSize(
|
@sprites["list"] = Window_AdvancedCommandPokemonEx.newWithSize(
|
||||||
[], 0, 64, Graphics.width, Graphics.height - 128, @viewport)
|
[], 0, 64, Graphics.width, Graphics.height - 128, @viewport
|
||||||
|
)
|
||||||
@sprites["help"] = Window_UnformattedTextPokemon.newWithSize(
|
@sprites["help"] = Window_UnformattedTextPokemon.newWithSize(
|
||||||
"", 0, Graphics.height - 64, Graphics.width, 64, @viewport)
|
"", 0, Graphics.height - 64, Graphics.width, 64, @viewport
|
||||||
|
)
|
||||||
@sprites["msgwindow"] = Window_AdvancedTextPokemon.newWithSize(
|
@sprites["msgwindow"] = Window_AdvancedTextPokemon.newWithSize(
|
||||||
"", 0, Graphics.height - 64, Graphics.width, 64, @viewport)
|
"", 0, Graphics.height - 64, Graphics.width, 64, @viewport
|
||||||
|
)
|
||||||
@sprites["msgwindow"].visible = false
|
@sprites["msgwindow"].visible = false
|
||||||
pbInitSwapScreen
|
pbInitSwapScreen
|
||||||
pbDeactivateWindows(@sprites)
|
pbDeactivateWindows(@sprites)
|
||||||
|
|||||||
@@ -293,9 +293,10 @@ Events.onMapChange += proc { |_sender, _e|
|
|||||||
Events.onMapSceneChange += proc { |_sender, e|
|
Events.onMapSceneChange += proc { |_sender, e|
|
||||||
scene = e[0]
|
scene = e[0]
|
||||||
if pbInBugContest? && pbBugContestState.decision == 0 && BugContestState::TIME_ALLOWED > 0
|
if pbInBugContest? && pbBugContestState.decision == 0 && BugContestState::TIME_ALLOWED > 0
|
||||||
scene.spriteset.addUserSprite(TimerDisplay.new(
|
scene.spriteset.addUserSprite(
|
||||||
pbBugContestState.timer,
|
TimerDisplay.new(pbBugContestState.timer,
|
||||||
BugContestState::TIME_ALLOWED * Graphics.frame_rate))
|
BugContestState::TIME_ALLOWED * Graphics.frame_rate)
|
||||||
|
)
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-2
@@ -342,8 +342,9 @@ def pbDecideWinnerScore(party0, party1, rating)
|
|||||||
for move in party0[i].moves
|
for move in party0[i].moves
|
||||||
next if !move
|
next if !move
|
||||||
for j in 0...party1.length
|
for j in 0...party1.length
|
||||||
score += pbDecideWinnerEffectiveness(move.id,
|
score += pbDecideWinnerEffectiveness(
|
||||||
types1[j], types2[j], abilities[j], [-16, -8, 0, 4, 12, 20])
|
move.id, types1[j], types2[j], abilities[j], [-16, -8, 0, 4, 12, 20]
|
||||||
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
basestatsum = baseStatTotal(party0[i].species)
|
basestatsum = baseStatTotal(party0[i].species)
|
||||||
|
|||||||
@@ -8,8 +8,9 @@ def pbEncountersEditor
|
|||||||
commands = []
|
commands = []
|
||||||
maps = []
|
maps = []
|
||||||
list = pbListWindow([])
|
list = pbListWindow([])
|
||||||
help_window = Window_UnformattedTextPokemon.newWithSize(_INTL("Edit wild encounters"),
|
help_window = Window_UnformattedTextPokemon.newWithSize(
|
||||||
Graphics.width / 2, 0, Graphics.width / 2, 96)
|
_INTL("Edit wild encounters"), Graphics.width / 2, 0, Graphics.width / 2, 96
|
||||||
|
)
|
||||||
help_window.z = 99999
|
help_window.z = 99999
|
||||||
ret = 0
|
ret = 0
|
||||||
need_refresh = true
|
need_refresh = true
|
||||||
@@ -128,8 +129,9 @@ def pbEncounterMapVersionEditor(enc_data)
|
|||||||
commands = []
|
commands = []
|
||||||
enc_types = []
|
enc_types = []
|
||||||
list = pbListWindow([])
|
list = pbListWindow([])
|
||||||
help_window = Window_UnformattedTextPokemon.newWithSize(_INTL("Edit map's encounters"),
|
help_window = Window_UnformattedTextPokemon.newWithSize(
|
||||||
Graphics.width / 2, 0, Graphics.width / 2, 96)
|
_INTL("Edit map's encounters"), Graphics.width / 2, 0, Graphics.width / 2, 96
|
||||||
|
)
|
||||||
help_window.z = 99999
|
help_window.z = 99999
|
||||||
ret = 0
|
ret = 0
|
||||||
need_refresh = true
|
need_refresh = true
|
||||||
@@ -253,8 +255,9 @@ end
|
|||||||
def pbEncounterTypeEditor(enc_data, enc_type)
|
def pbEncounterTypeEditor(enc_data, enc_type)
|
||||||
commands = []
|
commands = []
|
||||||
list = pbListWindow([])
|
list = pbListWindow([])
|
||||||
help_window = Window_UnformattedTextPokemon.newWithSize(_INTL("Edit encounter slots"),
|
help_window = Window_UnformattedTextPokemon.newWithSize(
|
||||||
Graphics.width / 2, 0, Graphics.width / 2, 96)
|
_INTL("Edit encounter slots"), Graphics.width / 2, 0, Graphics.width / 2, 96
|
||||||
|
)
|
||||||
help_window.z = 99999
|
help_window.z = 99999
|
||||||
enc_type_name = ""
|
enc_type_name = ""
|
||||||
ret = 0
|
ret = 0
|
||||||
@@ -1172,7 +1175,8 @@ def pbRegionalDexEditor(dex)
|
|||||||
cmd_window = pbListWindow([])
|
cmd_window = pbListWindow([])
|
||||||
info = Window_AdvancedTextPokemon.newWithSize(
|
info = Window_AdvancedTextPokemon.newWithSize(
|
||||||
_INTL("Z+Up/Down: Rearrange entries\nZ+Right: Insert new entry\nZ+Left: Delete entry\nD: Clear entry"),
|
_INTL("Z+Up/Down: Rearrange entries\nZ+Right: Insert new entry\nZ+Left: Delete entry\nD: Clear entry"),
|
||||||
Graphics.width / 2, 64, Graphics.width / 2, Graphics.height - 64, viewport)
|
Graphics.width / 2, 64, Graphics.width / 2, Graphics.height - 64, viewport
|
||||||
|
)
|
||||||
info.z = 2
|
info.z = 2
|
||||||
dex.compact!
|
dex.compact!
|
||||||
ret = dex.clone
|
ret = dex.clone
|
||||||
@@ -1226,7 +1230,9 @@ def pbRegionalDexEditor(dex)
|
|||||||
when 0
|
when 0
|
||||||
if cmd[1] >= 0 # Edit entry
|
if cmd[1] >= 0 # Edit entry
|
||||||
case pbMessage(_INTL("\\ts[]Do what with this entry?"),
|
case pbMessage(_INTL("\\ts[]Do what with this entry?"),
|
||||||
[_INTL("Change species"), _INTL("Clear"), _INTL("Insert entry"), _INTL("Delete entry"), _INTL("Cancel")], 5)
|
[_INTL("Change species"), _INTL("Clear"),
|
||||||
|
_INTL("Insert entry"), _INTL("Delete entry"),
|
||||||
|
_INTL("Cancel")], 5)
|
||||||
when 0 # Change species
|
when 0 # Change species
|
||||||
species = pbChooseSpeciesList(dex[cmd[1]])
|
species = pbChooseSpeciesList(dex[cmd[1]])
|
||||||
if species
|
if species
|
||||||
@@ -1276,11 +1282,14 @@ def pbRegionalDexEditorMain
|
|||||||
cmd_window = pbListWindow([])
|
cmd_window = pbListWindow([])
|
||||||
cmd_window.viewport = viewport
|
cmd_window.viewport = viewport
|
||||||
cmd_window.z = 2
|
cmd_window.z = 2
|
||||||
title = Window_UnformattedTextPokemon.newWithSize(_INTL("Regional Dexes Editor"),
|
title = Window_UnformattedTextPokemon.newWithSize(
|
||||||
Graphics.width / 2, 0, Graphics.width / 2, 64, viewport)
|
_INTL("Regional Dexes Editor"), Graphics.width / 2, 0, Graphics.width / 2, 64, viewport
|
||||||
|
)
|
||||||
title.z = 2
|
title.z = 2
|
||||||
info = Window_AdvancedTextPokemon.newWithSize(_INTL("Z+Up/Down: Rearrange Dexes"),
|
info = Window_AdvancedTextPokemon.newWithSize(
|
||||||
Graphics.width / 2, 64, Graphics.width / 2, Graphics.height - 64, viewport)
|
_INTL("Z+Up/Down: Rearrange Dexes"), Graphics.width / 2, 64,
|
||||||
|
Graphics.width / 2, Graphics.height - 64, viewport
|
||||||
|
)
|
||||||
info.z = 2
|
info.z = 2
|
||||||
dex_lists = []
|
dex_lists = []
|
||||||
pbLoadRegionalDexes.each_with_index { |d, index| dex_lists[index] = d.clone }
|
pbLoadRegionalDexes.each_with_index { |d, index| dex_lists[index] = d.clone }
|
||||||
@@ -1314,7 +1323,8 @@ def pbRegionalDexEditorMain
|
|||||||
when 0 # Clicked on a command/Dex
|
when 0 # Clicked on a command/Dex
|
||||||
if cmd[1] == 0 # Add new Dex
|
if cmd[1] == 0 # Add new Dex
|
||||||
case pbMessage(_INTL("Fill in this new Dex?"),
|
case pbMessage(_INTL("Fill in this new Dex?"),
|
||||||
[_INTL("Leave blank"), _INTL("National Dex"), _INTL("Nat. Dex grouped families"), _INTL("Cancel")], 4)
|
[_INTL("Leave blank"), _INTL("National Dex"),
|
||||||
|
_INTL("Nat. Dex grouped families"), _INTL("Cancel")], 4)
|
||||||
when 0 # Leave blank
|
when 0 # Leave blank
|
||||||
dex_lists.push([])
|
dex_lists.push([])
|
||||||
refresh_list = true
|
refresh_list = true
|
||||||
@@ -1432,11 +1442,14 @@ def pbAnimationsOrganiser
|
|||||||
cmdwin = pbListWindow([])
|
cmdwin = pbListWindow([])
|
||||||
cmdwin.viewport = viewport
|
cmdwin.viewport = viewport
|
||||||
cmdwin.z = 2
|
cmdwin.z = 2
|
||||||
title = Window_UnformattedTextPokemon.newWithSize(_INTL("Animations Organiser"),
|
title = Window_UnformattedTextPokemon.newWithSize(
|
||||||
Graphics.width / 2, 0, Graphics.width / 2, 64, viewport)
|
_INTL("Animations Organiser"), Graphics.width / 2, 0, Graphics.width / 2, 64, viewport
|
||||||
|
)
|
||||||
title.z = 2
|
title.z = 2
|
||||||
info = Window_AdvancedTextPokemon.newWithSize(_INTL("Z+Up/Down: Swap\nZ+Left: Delete\nZ+Right: Insert"),
|
info = Window_AdvancedTextPokemon.newWithSize(
|
||||||
Graphics.width / 2, 64, Graphics.width / 2, Graphics.height - 64, viewport)
|
_INTL("Z+Up/Down: Swap\nZ+Left: Delete\nZ+Right: Insert"),
|
||||||
|
Graphics.width / 2, 64, Graphics.width / 2, Graphics.height - 64, viewport
|
||||||
|
)
|
||||||
info.z = 2
|
info.z = 2
|
||||||
commands = []
|
commands = []
|
||||||
refreshlist = true
|
refreshlist = true
|
||||||
|
|||||||
@@ -18,7 +18,8 @@ class PokemonTilesetScene
|
|||||||
@sprites = {}
|
@sprites = {}
|
||||||
@sprites["title"] = Window_UnformattedTextPokemon.newWithSize(
|
@sprites["title"] = Window_UnformattedTextPokemon.newWithSize(
|
||||||
_INTL("Tileset Editor\r\nA/S: SCROLL\r\nZ: MENU"),
|
_INTL("Tileset Editor\r\nA/S: SCROLL\r\nZ: MENU"),
|
||||||
TILESET_WIDTH, 0, Graphics.width - TILESET_WIDTH, 128, @viewport)
|
TILESET_WIDTH, 0, Graphics.width - TILESET_WIDTH, 128, @viewport
|
||||||
|
)
|
||||||
@sprites["tileset"] = BitmapSprite.new(TILESET_WIDTH, Graphics.height, @viewport)
|
@sprites["tileset"] = BitmapSprite.new(TILESET_WIDTH, Graphics.height, @viewport)
|
||||||
@sprites["overlay"] = BitmapSprite.new(Graphics.width, Graphics.height, @viewport)
|
@sprites["overlay"] = BitmapSprite.new(Graphics.width, Graphics.height, @viewport)
|
||||||
pbSetSystemFont(@sprites["overlay"].bitmap)
|
pbSetSystemFont(@sprites["overlay"].bitmap)
|
||||||
|
|||||||
@@ -60,7 +60,8 @@ class SelectionSprite < Sprite
|
|||||||
if @othersprite && !@othersprite.disposed? &&
|
if @othersprite && !@othersprite.disposed? &&
|
||||||
@othersprite.bitmap && !@othersprite.bitmap.disposed?
|
@othersprite.bitmap && !@othersprite.bitmap.disposed?
|
||||||
@sprite.bitmap = pbDoEnsureBitmap(
|
@sprite.bitmap = pbDoEnsureBitmap(
|
||||||
@sprite.bitmap, @othersprite.bitmap.width, @othersprite.bitmap.height)
|
@sprite.bitmap, @othersprite.bitmap.width, @othersprite.bitmap.height
|
||||||
|
)
|
||||||
red = Color.new(255, 0, 0)
|
red = Color.new(255, 0, 0)
|
||||||
@sprite.bitmap.clear
|
@sprite.bitmap.clear
|
||||||
@sprite.bitmap.fill_rect(0, 0, @othersprite.bitmap.width, 2, red)
|
@sprite.bitmap.fill_rect(0, 0, @othersprite.bitmap.width, 2, red)
|
||||||
@@ -324,8 +325,9 @@ class MapScreenScene
|
|||||||
@selmapid = -1
|
@selmapid = -1
|
||||||
@sprites["background"] = ColoredPlane.new(Color.new(160, 208, 240), @viewport)
|
@sprites["background"] = ColoredPlane.new(Color.new(160, 208, 240), @viewport)
|
||||||
@sprites["selsprite"] = SelectionSprite.new(@viewport)
|
@sprites["selsprite"] = SelectionSprite.new(@viewport)
|
||||||
@sprites["title"] = Window_UnformattedTextPokemon.newWithSize(_INTL("D: Help"),
|
@sprites["title"] = Window_UnformattedTextPokemon.newWithSize(
|
||||||
0, Graphics.height - 64, Graphics.width, 64, @viewport)
|
_INTL("D: Help"), 0, Graphics.height - 64, Graphics.width, 64, @viewport
|
||||||
|
)
|
||||||
@sprites["title"].z = 2
|
@sprites["title"].z = 2
|
||||||
@mapinfos = pbLoadMapInfos
|
@mapinfos = pbLoadMapInfos
|
||||||
conns = MapFactoryHelper.getMapConnections
|
conns = MapFactoryHelper.getMapConnections
|
||||||
@@ -358,8 +360,9 @@ class MapScreenScene
|
|||||||
helptext += _INTL("Double-click: Edit map's metadata\r\n")
|
helptext += _INTL("Double-click: Edit map's metadata\r\n")
|
||||||
helptext += _INTL("Drag map to move it\r\n")
|
helptext += _INTL("Drag map to move it\r\n")
|
||||||
helptext += _INTL("Arrow keys/drag canvas: Move around canvas")
|
helptext += _INTL("Arrow keys/drag canvas: Move around canvas")
|
||||||
title = Window_UnformattedTextPokemon.newWithSize(helptext,
|
title = Window_UnformattedTextPokemon.newWithSize(
|
||||||
0, 0, Graphics.width * 8 / 10, Graphics.height, @viewport)
|
helptext, 0, 0, Graphics.width * 8 / 10, Graphics.height, @viewport
|
||||||
|
)
|
||||||
title.z = 2
|
title.z = 2
|
||||||
loop do
|
loop do
|
||||||
Graphics.update
|
Graphics.update
|
||||||
|
|||||||
@@ -541,12 +541,15 @@ class AnimationCanvas < Sprite
|
|||||||
oldtargetx = targetsprite ? targetsprite.x : 0
|
oldtargetx = targetsprite ? targetsprite.x : 0
|
||||||
oldtargety = targetsprite ? targetsprite.y : 0
|
oldtargety = targetsprite ? targetsprite.y : 0
|
||||||
@player = PBAnimationPlayerX.new(@animation,
|
@player = PBAnimationPlayerX.new(@animation,
|
||||||
@battle.battlers[oppmove ? 1 : 0], @battle.battlers[oppmove ? 0 : 1], self, oppmove, true)
|
@battle.battlers[oppmove ? 1 : 0],
|
||||||
|
@battle.battlers[oppmove ? 0 : 1],
|
||||||
|
self, oppmove, true)
|
||||||
@player.setLineTransform(
|
@player.setLineTransform(
|
||||||
Battle::Scene::FOCUSUSER_X, Battle::Scene::FOCUSUSER_Y,
|
Battle::Scene::FOCUSUSER_X, Battle::Scene::FOCUSUSER_Y,
|
||||||
Battle::Scene::FOCUSTARGET_X, Battle::Scene::FOCUSTARGET_Y,
|
Battle::Scene::FOCUSTARGET_X, Battle::Scene::FOCUSTARGET_Y,
|
||||||
olduserx, oldusery,
|
olduserx, oldusery,
|
||||||
oldtargetx, oldtargety)
|
oldtargetx, oldtargety
|
||||||
|
)
|
||||||
@player.start
|
@player.start
|
||||||
@playing = true
|
@playing = true
|
||||||
@sprites["pokemon_0"].x += BORDERSIZE
|
@sprites["pokemon_0"].x += BORDERSIZE
|
||||||
@@ -992,8 +995,7 @@ class BitmapDisplayWindow < SpriteWindow_Base
|
|||||||
wh = sx * wh
|
wh = sx * wh
|
||||||
ww = self.contents.width
|
ww = self.contents.width
|
||||||
end
|
end
|
||||||
dest = Rect.new(
|
dest = Rect.new((self.contents.width - ww) / 2,
|
||||||
(self.contents.width - ww) / 2,
|
|
||||||
(self.contents.height - wh) / 2,
|
(self.contents.height - wh) / 2,
|
||||||
ww, wh)
|
ww, wh)
|
||||||
src = Rect.new(0, 0, bmap.width, bmap.height)
|
src = Rect.new(0, 0, bmap.width, bmap.height)
|
||||||
@@ -1009,7 +1011,8 @@ class AnimationNameWindow
|
|||||||
@canvas = canvas
|
@canvas = canvas
|
||||||
@oldname = nil
|
@oldname = nil
|
||||||
@window = Window_UnformattedTextPokemon.newWithSize(
|
@window = Window_UnformattedTextPokemon.newWithSize(
|
||||||
_INTL("Name: {1}", @canvas.animation.name), x, y, width, height, viewport)
|
_INTL("Name: {1}", @canvas.animation.name), x, y, width, height, viewport
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
def viewport=(value); @window.viewport = value; end
|
def viewport=(value); @window.viewport = value; end
|
||||||
|
|||||||
@@ -47,10 +47,7 @@ class UIControl
|
|||||||
end
|
end
|
||||||
|
|
||||||
def toAbsoluteRect(rc)
|
def toAbsoluteRect(rc)
|
||||||
return Rect.new(
|
return Rect.new(rc.x + self.parentX, rc.y + self.parentY, rc.width, rc.height)
|
||||||
rc.x + self.parentX,
|
|
||||||
rc.y + self.parentY,
|
|
||||||
rc.width, rc.height)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def parentX
|
def parentX
|
||||||
|
|||||||
@@ -283,8 +283,9 @@ def pbDefinePath(canvas)
|
|||||||
showline = false
|
showline = false
|
||||||
sliderwin2.visible = false
|
sliderwin2.visible = false
|
||||||
# This window displays the mouse's current position
|
# This window displays the mouse's current position
|
||||||
window = Window_UnformattedTextPokemon.newWithSize("",
|
window = Window_UnformattedTextPokemon.newWithSize(
|
||||||
0, 320 - 64, 128, 64, canvas.viewport)
|
"", 0, 320 - 64, 128, 64, canvas.viewport
|
||||||
|
)
|
||||||
loop do
|
loop do
|
||||||
Graphics.update
|
Graphics.update
|
||||||
Input.update
|
Input.update
|
||||||
@@ -363,8 +364,9 @@ def pbDefinePath(canvas)
|
|||||||
point.dispose
|
point.dispose
|
||||||
end
|
end
|
||||||
points.clear
|
points.clear
|
||||||
window = Window_UnformattedTextPokemon.newWithSize("",
|
window = Window_UnformattedTextPokemon.newWithSize(
|
||||||
0, 320 - 64, 128, 64, canvas.viewport)
|
"", 0, 320 - 64, 128, 64, canvas.viewport
|
||||||
|
)
|
||||||
sliderwin2.visible = false
|
sliderwin2.visible = false
|
||||||
loop do
|
loop do
|
||||||
Graphics.update
|
Graphics.update
|
||||||
|
|||||||
@@ -129,7 +129,8 @@ def pbAnimList(animations, canvas, animwin)
|
|||||||
cmdwin.viewport = canvas.viewport
|
cmdwin.viewport = canvas.viewport
|
||||||
helpwindow = Window_UnformattedTextPokemon.newWithSize(
|
helpwindow = Window_UnformattedTextPokemon.newWithSize(
|
||||||
_INTL("Enter: Load/rename an animation\nEsc: Cancel"),
|
_INTL("Enter: Load/rename an animation\nEsc: Cancel"),
|
||||||
320, 0, 320, 128, canvas.viewport)
|
320, 0, 320, 128, canvas.viewport
|
||||||
|
)
|
||||||
maxsizewindow = ControlWindow.new(0, 416, 320, 32 * 3)
|
maxsizewindow = ControlWindow.new(0, 416, 320, 32 * 3)
|
||||||
maxsizewindow.addSlider(_INTL("Total Animations:"), 1, 2000, animations.length)
|
maxsizewindow.addSlider(_INTL("Total Animations:"), 1, 2000, animations.length)
|
||||||
maxsizewindow.addButton(_INTL("Resize Animation List"))
|
maxsizewindow.addButton(_INTL("Resize Animation List"))
|
||||||
|
|||||||
@@ -684,8 +684,9 @@ end
|
|||||||
def chooseMapPoint(map, rgnmap = false)
|
def chooseMapPoint(map, rgnmap = false)
|
||||||
viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
|
viewport = Viewport.new(0, 0, Graphics.width, Graphics.height)
|
||||||
viewport.z = 99999
|
viewport.z = 99999
|
||||||
title = Window_UnformattedTextPokemon.newWithSize(_INTL("Click a point on the map."),
|
title = Window_UnformattedTextPokemon.newWithSize(
|
||||||
0, Graphics.height - 64, Graphics.width, 64, viewport)
|
_INTL("Click a point on the map."), 0, Graphics.height - 64, Graphics.width, 64, viewport
|
||||||
|
)
|
||||||
title.z = 2
|
title.z = 2
|
||||||
if rgnmap
|
if rgnmap
|
||||||
sprite = RegionMapSprite.new(map, viewport)
|
sprite = RegionMapSprite.new(map, viewport)
|
||||||
@@ -1554,11 +1555,13 @@ def pbPropertyList(title, data, properties, saveprompt = false)
|
|||||||
list = pbListWindow([], Graphics.width / 2)
|
list = pbListWindow([], Graphics.width / 2)
|
||||||
list.viewport = viewport
|
list.viewport = viewport
|
||||||
list.z = 2
|
list.z = 2
|
||||||
title = Window_UnformattedTextPokemon.newWithSize(title,
|
title = Window_UnformattedTextPokemon.newWithSize(
|
||||||
list.width, 0, Graphics.width / 2, 64, viewport)
|
title, list.width, 0, Graphics.width / 2, 64, viewport
|
||||||
|
)
|
||||||
title.z = 2
|
title.z = 2
|
||||||
desc = Window_UnformattedTextPokemon.newWithSize("",
|
desc = Window_UnformattedTextPokemon.newWithSize(
|
||||||
list.width, title.height, Graphics.width / 2, Graphics.height - title.height, viewport)
|
"", list.width, title.height, Graphics.width / 2, Graphics.height - title.height, viewport
|
||||||
|
)
|
||||||
desc.z = 2
|
desc.z = 2
|
||||||
selectedmap = -1
|
selectedmap = -1
|
||||||
retval = nil
|
retval = nil
|
||||||
|
|||||||
@@ -257,7 +257,8 @@ DebugMenuCommands.register("testwildbattleadvanced", {
|
|||||||
params.setInitialValue(size0)
|
params.setInitialValue(size0)
|
||||||
params.setCancelValue(0)
|
params.setCancelValue(0)
|
||||||
newSize = pbMessageChooseNumber(
|
newSize = pbMessageChooseNumber(
|
||||||
_INTL("Choose the number of battlers on the player's side (max. {1}).", maxVal), params)
|
_INTL("Choose the number of battlers on the player's side (max. {1}).", maxVal), params
|
||||||
|
)
|
||||||
size0 = newSize if newSize > 0
|
size0 = newSize if newSize > 0
|
||||||
elsif pkmnCmd == pkmnCmds.length - 3 # Add Pokémon
|
elsif pkmnCmd == pkmnCmds.length - 3 # Add Pokémon
|
||||||
species = pbChooseSpeciesList
|
species = pbChooseSpeciesList
|
||||||
@@ -325,7 +326,8 @@ DebugMenuCommands.register("testtrainerbattleadvanced", {
|
|||||||
elsif size1 > trainers.length && trainers[0][1].party_count == 1
|
elsif size1 > trainers.length && trainers[0][1].party_count == 1
|
||||||
pbMessage(
|
pbMessage(
|
||||||
_INTL("Opposing side size cannot be {1}, as that requires the first trainer to have 2 or more Pokémon, which they don't.",
|
_INTL("Opposing side size cannot be {1}, as that requires the first trainer to have 2 or more Pokémon, which they don't.",
|
||||||
size1))
|
size1)
|
||||||
|
)
|
||||||
next
|
next
|
||||||
end
|
end
|
||||||
setBattleRule(sprintf("%dv%d", size0, size1))
|
setBattleRule(sprintf("%dv%d", size0, size1))
|
||||||
@@ -347,7 +349,8 @@ DebugMenuCommands.register("testtrainerbattleadvanced", {
|
|||||||
params.setInitialValue(size1)
|
params.setInitialValue(size1)
|
||||||
params.setCancelValue(0)
|
params.setCancelValue(0)
|
||||||
newSize = pbMessageChooseNumber(
|
newSize = pbMessageChooseNumber(
|
||||||
_INTL("Choose the number of battlers on the opponent's side (max. {1}).", maxVal), params)
|
_INTL("Choose the number of battlers on the opponent's side (max. {1}).", maxVal), params
|
||||||
|
)
|
||||||
size1 = newSize if newSize > 0
|
size1 = newSize if newSize > 0
|
||||||
elsif trainerCmd == trainerCmds.length - 3 # Set player side size
|
elsif trainerCmd == trainerCmds.length - 3 # Set player side size
|
||||||
if !pbCanDoubleBattle?
|
if !pbCanDoubleBattle?
|
||||||
@@ -360,7 +363,8 @@ DebugMenuCommands.register("testtrainerbattleadvanced", {
|
|||||||
params.setInitialValue(size0)
|
params.setInitialValue(size0)
|
||||||
params.setCancelValue(0)
|
params.setCancelValue(0)
|
||||||
newSize = pbMessageChooseNumber(
|
newSize = pbMessageChooseNumber(
|
||||||
_INTL("Choose the number of battlers on the player's side (max. {1}).", maxVal), params)
|
_INTL("Choose the number of battlers on the player's side (max. {1}).", maxVal), params
|
||||||
|
)
|
||||||
size0 = newSize if newSize > 0
|
size0 = newSize if newSize > 0
|
||||||
elsif trainerCmd == trainerCmds.length - 4 # Add trainer
|
elsif trainerCmd == trainerCmds.length - 4 # Add trainer
|
||||||
trainerdata = pbListScreen(_INTL("CHOOSE A TRAINER"), TrainerBattleLister.new(0, false))
|
trainerdata = pbListScreen(_INTL("CHOOSE A TRAINER"), TrainerBattleLister.new(0, false))
|
||||||
|
|||||||
@@ -58,7 +58,8 @@ PokemonDebugMenuCommands.register("sethp", {
|
|||||||
params.setRange(0, pkmn.totalhp)
|
params.setRange(0, pkmn.totalhp)
|
||||||
params.setDefaultValue(pkmn.hp)
|
params.setDefaultValue(pkmn.hp)
|
||||||
newhp = pbMessageChooseNumber(
|
newhp = pbMessageChooseNumber(
|
||||||
_INTL("Set {1}'s HP (max. {2}).", pkmn.name, pkmn.totalhp), params) { screen.pbUpdate }
|
_INTL("Set {1}'s HP (max. {2}).", pkmn.name, pkmn.totalhp), params
|
||||||
|
) { screen.pbUpdate }
|
||||||
if newhp != pkmn.hp
|
if newhp != pkmn.hp
|
||||||
pkmn.hp = newhp
|
pkmn.hp = newhp
|
||||||
screen.pbRefreshSingle(pkmnid)
|
screen.pbRefreshSingle(pkmnid)
|
||||||
@@ -106,7 +107,8 @@ PokemonDebugMenuCommands.register("setstatus", {
|
|||||||
params.setRange(0, 9)
|
params.setRange(0, 9)
|
||||||
params.setDefaultValue(3)
|
params.setDefaultValue(3)
|
||||||
count = pbMessageChooseNumber(
|
count = pbMessageChooseNumber(
|
||||||
_INTL("Set the Pokémon's sleep count."), params) { screen.pbUpdate }
|
_INTL("Set the Pokémon's sleep count."), params
|
||||||
|
) { screen.pbUpdate }
|
||||||
cancel = true if count <= 0
|
cancel = true if count <= 0
|
||||||
end
|
end
|
||||||
if !cancel
|
if !cancel
|
||||||
@@ -209,7 +211,8 @@ PokemonDebugMenuCommands.register("setlevel", {
|
|||||||
params.setRange(1, GameData::GrowthRate.max_level)
|
params.setRange(1, GameData::GrowthRate.max_level)
|
||||||
params.setDefaultValue(pkmn.level)
|
params.setDefaultValue(pkmn.level)
|
||||||
level = pbMessageChooseNumber(
|
level = pbMessageChooseNumber(
|
||||||
_INTL("Set the Pokémon's level (max. {1}).", params.maxNumber), params) { screen.pbUpdate }
|
_INTL("Set the Pokémon's level (max. {1}).", params.maxNumber), params
|
||||||
|
) { screen.pbUpdate }
|
||||||
if level != pkmn.level
|
if level != pkmn.level
|
||||||
pkmn.level = level
|
pkmn.level = level
|
||||||
pkmn.calc_stats
|
pkmn.calc_stats
|
||||||
@@ -237,7 +240,8 @@ PokemonDebugMenuCommands.register("setexp", {
|
|||||||
params.setRange(minxp, maxxp - 1)
|
params.setRange(minxp, maxxp - 1)
|
||||||
params.setDefaultValue(pkmn.exp)
|
params.setDefaultValue(pkmn.exp)
|
||||||
newexp = pbMessageChooseNumber(
|
newexp = pbMessageChooseNumber(
|
||||||
_INTL("Set the Pokémon's Exp (range {1}-{2}).", minxp, maxxp - 1), params) { screen.pbUpdate }
|
_INTL("Set the Pokémon's Exp (range {1}-{2}).", minxp, maxxp - 1), params
|
||||||
|
) { screen.pbUpdate }
|
||||||
if newexp != pkmn.exp
|
if newexp != pkmn.exp
|
||||||
pkmn.exp = newexp
|
pkmn.exp = newexp
|
||||||
pkmn.calc_stats
|
pkmn.calc_stats
|
||||||
@@ -372,7 +376,8 @@ PokemonDebugMenuCommands.register("sethappiness", {
|
|||||||
params.setRange(0, 255)
|
params.setRange(0, 255)
|
||||||
params.setDefaultValue(pkmn.happiness)
|
params.setDefaultValue(pkmn.happiness)
|
||||||
h = pbMessageChooseNumber(
|
h = pbMessageChooseNumber(
|
||||||
_INTL("Set the Pokémon's happiness (max. 255)."), params) { screen.pbUpdate }
|
_INTL("Set the Pokémon's happiness (max. 255)."), params
|
||||||
|
) { screen.pbUpdate }
|
||||||
if h != pkmn.happiness
|
if h != pkmn.happiness
|
||||||
pkmn.happiness = h
|
pkmn.happiness = h
|
||||||
screen.pbRefreshSingle(pkmnid)
|
screen.pbRefreshSingle(pkmnid)
|
||||||
@@ -396,7 +401,8 @@ PokemonDebugMenuCommands.register("setbeauty", {
|
|||||||
params.setRange(0, 255)
|
params.setRange(0, 255)
|
||||||
params.setDefaultValue(pkmn.beauty)
|
params.setDefaultValue(pkmn.beauty)
|
||||||
newval = pbMessageChooseNumber(
|
newval = pbMessageChooseNumber(
|
||||||
_INTL("Set the Pokémon's Beauty (max. 255)."), params) { screen.pbUpdate }
|
_INTL("Set the Pokémon's Beauty (max. 255)."), params
|
||||||
|
) { screen.pbUpdate }
|
||||||
if newval != pkmn.beauty
|
if newval != pkmn.beauty
|
||||||
pkmn.beauty = newval
|
pkmn.beauty = newval
|
||||||
screen.pbRefreshSingle(pkmnid)
|
screen.pbRefreshSingle(pkmnid)
|
||||||
@@ -414,7 +420,8 @@ PokemonDebugMenuCommands.register("setcool", {
|
|||||||
params.setRange(0, 255)
|
params.setRange(0, 255)
|
||||||
params.setDefaultValue(pkmn.cool)
|
params.setDefaultValue(pkmn.cool)
|
||||||
newval = pbMessageChooseNumber(
|
newval = pbMessageChooseNumber(
|
||||||
_INTL("Set the Pokémon's Cool (max. 255)."), params) { screen.pbUpdate }
|
_INTL("Set the Pokémon's Cool (max. 255)."), params
|
||||||
|
) { screen.pbUpdate }
|
||||||
if newval != pkmn.cool
|
if newval != pkmn.cool
|
||||||
pkmn.cool = newval
|
pkmn.cool = newval
|
||||||
screen.pbRefreshSingle(pkmnid)
|
screen.pbRefreshSingle(pkmnid)
|
||||||
@@ -432,7 +439,8 @@ PokemonDebugMenuCommands.register("setcute", {
|
|||||||
params.setRange(0, 255)
|
params.setRange(0, 255)
|
||||||
params.setDefaultValue(pkmn.cute)
|
params.setDefaultValue(pkmn.cute)
|
||||||
newval = pbMessageChooseNumber(
|
newval = pbMessageChooseNumber(
|
||||||
_INTL("Set the Pokémon's Cute (max. 255)."), params) { screen.pbUpdate }
|
_INTL("Set the Pokémon's Cute (max. 255)."), params
|
||||||
|
) { screen.pbUpdate }
|
||||||
if newval != pkmn.cute
|
if newval != pkmn.cute
|
||||||
pkmn.cute = newval
|
pkmn.cute = newval
|
||||||
screen.pbRefreshSingle(pkmnid)
|
screen.pbRefreshSingle(pkmnid)
|
||||||
@@ -450,7 +458,8 @@ PokemonDebugMenuCommands.register("setsmart", {
|
|||||||
params.setRange(0, 255)
|
params.setRange(0, 255)
|
||||||
params.setDefaultValue(pkmn.smart)
|
params.setDefaultValue(pkmn.smart)
|
||||||
newval = pbMessageChooseNumber(
|
newval = pbMessageChooseNumber(
|
||||||
_INTL("Set the Pokémon's Smart (max. 255)."), params) { screen.pbUpdate }
|
_INTL("Set the Pokémon's Smart (max. 255)."), params
|
||||||
|
) { screen.pbUpdate }
|
||||||
if newval != pkmn.smart
|
if newval != pkmn.smart
|
||||||
pkmn.smart = newval
|
pkmn.smart = newval
|
||||||
screen.pbRefreshSingle(pkmnid)
|
screen.pbRefreshSingle(pkmnid)
|
||||||
@@ -468,7 +477,8 @@ PokemonDebugMenuCommands.register("settough", {
|
|||||||
params.setRange(0, 255)
|
params.setRange(0, 255)
|
||||||
params.setDefaultValue(pkmn.tough)
|
params.setDefaultValue(pkmn.tough)
|
||||||
newval = pbMessageChooseNumber(
|
newval = pbMessageChooseNumber(
|
||||||
_INTL("Set the Pokémon's Tough (max. 255)."), params) { screen.pbUpdate }
|
_INTL("Set the Pokémon's Tough (max. 255)."), params
|
||||||
|
) { screen.pbUpdate }
|
||||||
if newval != pkmn.tough
|
if newval != pkmn.tough
|
||||||
pkmn.tough = newval
|
pkmn.tough = newval
|
||||||
screen.pbRefreshSingle(pkmnid)
|
screen.pbRefreshSingle(pkmnid)
|
||||||
@@ -486,7 +496,8 @@ PokemonDebugMenuCommands.register("setsheen", {
|
|||||||
params.setRange(0, 255)
|
params.setRange(0, 255)
|
||||||
params.setDefaultValue(pkmn.sheen)
|
params.setDefaultValue(pkmn.sheen)
|
||||||
newval = pbMessageChooseNumber(
|
newval = pbMessageChooseNumber(
|
||||||
_INTL("Set the Pokémon's Sheen (max. 255)."), params) { screen.pbUpdate }
|
_INTL("Set the Pokémon's Sheen (max. 255)."), params
|
||||||
|
) { screen.pbUpdate }
|
||||||
if newval != pkmn.sheen
|
if newval != pkmn.sheen
|
||||||
pkmn.sheen = newval
|
pkmn.sheen = newval
|
||||||
screen.pbRefreshSingle(pkmnid)
|
screen.pbRefreshSingle(pkmnid)
|
||||||
@@ -585,7 +596,8 @@ PokemonDebugMenuCommands.register("setmovepp", {
|
|||||||
params.setRange(0, move.total_pp)
|
params.setRange(0, move.total_pp)
|
||||||
params.setDefaultValue(move.pp)
|
params.setDefaultValue(move.pp)
|
||||||
h = pbMessageChooseNumber(
|
h = pbMessageChooseNumber(
|
||||||
_INTL("Set PP of {1} (max. {2}).", movename, move.total_pp), params) { screen.pbUpdate }
|
_INTL("Set PP of {1} (max. {2}).", movename, move.total_pp), params
|
||||||
|
) { screen.pbUpdate }
|
||||||
move.pp = h
|
move.pp = h
|
||||||
when 1 # Full PP
|
when 1 # Full PP
|
||||||
move.pp = move.total_pp
|
move.pp = move.total_pp
|
||||||
@@ -594,7 +606,8 @@ PokemonDebugMenuCommands.register("setmovepp", {
|
|||||||
params.setRange(0, 3)
|
params.setRange(0, 3)
|
||||||
params.setDefaultValue(move.ppup)
|
params.setDefaultValue(move.ppup)
|
||||||
h = pbMessageChooseNumber(
|
h = pbMessageChooseNumber(
|
||||||
_INTL("Set PP Up of {1} (max. 3).", movename), params) { screen.pbUpdate }
|
_INTL("Set PP Up of {1} (max. 3).", movename), params
|
||||||
|
) { screen.pbUpdate }
|
||||||
move.ppup = h
|
move.ppup = h
|
||||||
move.pp = move.total_pp if move.pp > move.total_pp
|
move.pp = move.total_pp if move.pp > move.total_pp
|
||||||
end
|
end
|
||||||
@@ -869,11 +882,8 @@ PokemonDebugMenuCommands.register("setshininess", {
|
|||||||
loop do
|
loop do
|
||||||
msg_idx = pkmn.shiny? ? (pkmn.super_shiny? ? 1 : 0) : 2
|
msg_idx = pkmn.shiny? ? (pkmn.super_shiny? ? 1 : 0) : 2
|
||||||
msg = [_INTL("Is shiny."), _INTL("Is super shiny."), _INTL("Is normal (not shiny).")][msg_idx]
|
msg = [_INTL("Is shiny."), _INTL("Is super shiny."), _INTL("Is normal (not shiny).")][msg_idx]
|
||||||
cmd = screen.pbShowCommands(msg,
|
cmd = screen.pbShowCommands(msg, [_INTL("Make shiny"), _INTL("Make super shiny"),
|
||||||
[_INTL("Make shiny"),
|
_INTL("Make normal"), _INTL("Reset")], cmd)
|
||||||
_INTL("Make super shiny"),
|
|
||||||
_INTL("Make normal"),
|
|
||||||
_INTL("Reset")], cmd)
|
|
||||||
break if cmd < 0
|
break if cmd < 0
|
||||||
case cmd
|
case cmd
|
||||||
when 0 # Make shiny
|
when 0 # Make shiny
|
||||||
@@ -1022,7 +1032,8 @@ PokemonDebugMenuCommands.register("ownership", {
|
|||||||
params.setRange(0, 65535)
|
params.setRange(0, 65535)
|
||||||
params.setDefaultValue(pkmn.owner.public_id)
|
params.setDefaultValue(pkmn.owner.public_id)
|
||||||
val = pbMessageChooseNumber(
|
val = pbMessageChooseNumber(
|
||||||
_INTL("Set the new ID (max. 65535)."), params) { screen.pbUpdate }
|
_INTL("Set the new ID (max. 65535)."), params
|
||||||
|
) { screen.pbUpdate }
|
||||||
pkmn.owner.id = val | val << 16
|
pkmn.owner.id = val | val << 16
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -1132,7 +1143,8 @@ PokemonDebugMenuCommands.register("shadowpkmn", {
|
|||||||
params.setDefaultValue(pkmn.heart_gauge)
|
params.setDefaultValue(pkmn.heart_gauge)
|
||||||
val = pbMessageChooseNumber(
|
val = pbMessageChooseNumber(
|
||||||
_INTL("Set the heart gauge (max. {1}).", pkmn.max_gauge_size),
|
_INTL("Set the heart gauge (max. {1}).", pkmn.max_gauge_size),
|
||||||
params) { screen.pbUpdate }
|
params
|
||||||
|
) { screen.pbUpdate }
|
||||||
if val != oldheart
|
if val != oldheart
|
||||||
pkmn.adjustHeart(val - oldheart)
|
pkmn.adjustHeart(val - oldheart)
|
||||||
pkmn.check_ready_to_purify
|
pkmn.check_ready_to_purify
|
||||||
|
|||||||
@@ -162,7 +162,8 @@ BattleDebugMenuCommands.register("weather", {
|
|||||||
when 0 # Change type
|
when 0 # Change type
|
||||||
weather_cmd = weather_types.index(battle.field.weather) || 0
|
weather_cmd = weather_types.index(battle.field.weather) || 0
|
||||||
new_weather = pbMessage(
|
new_weather = pbMessage(
|
||||||
"\\ts[]" + _INTL("Choose the new weather type."), weather_cmds, -1, nil, weather_cmd)
|
"\\ts[]" + _INTL("Choose the new weather type."), weather_cmds, -1, nil, weather_cmd
|
||||||
|
)
|
||||||
if new_weather >= 0
|
if new_weather >= 0
|
||||||
battle.field.weather = weather_types[new_weather]
|
battle.field.weather = weather_types[new_weather]
|
||||||
battle.field.weatherDuration = 5 if battle.field.weatherDuration == 0
|
battle.field.weatherDuration = 5 if battle.field.weatherDuration == 0
|
||||||
@@ -177,7 +178,8 @@ BattleDebugMenuCommands.register("weather", {
|
|||||||
params.setInitialValue([battle.field.weatherDuration, 0].max)
|
params.setInitialValue([battle.field.weatherDuration, 0].max)
|
||||||
params.setCancelValue([battle.field.weatherDuration, 0].max)
|
params.setCancelValue([battle.field.weatherDuration, 0].max)
|
||||||
new_duration = pbMessageChooseNumber(
|
new_duration = pbMessageChooseNumber(
|
||||||
"\\ts[]" + _INTL("Choose the new weather duration (0=infinite)."), params)
|
"\\ts[]" + _INTL("Choose the new weather duration (0=infinite)."), params
|
||||||
|
)
|
||||||
if new_duration != [battle.field.weatherDuration, 0].max
|
if new_duration != [battle.field.weatherDuration, 0].max
|
||||||
battle.field.weatherDuration = (new_duration == 0) ? -1 : new_duration
|
battle.field.weatherDuration = (new_duration == 0) ? -1 : new_duration
|
||||||
end
|
end
|
||||||
@@ -223,7 +225,8 @@ BattleDebugMenuCommands.register("terrain", {
|
|||||||
when 0 # Change type
|
when 0 # Change type
|
||||||
terrain_cmd = terrain_types.index(battle.field.terrain) || 0
|
terrain_cmd = terrain_types.index(battle.field.terrain) || 0
|
||||||
new_terrain = pbMessage(
|
new_terrain = pbMessage(
|
||||||
"\\ts[]" + _INTL("Choose the new terrain type."), terrain_cmds, -1, nil, terrain_cmd)
|
"\\ts[]" + _INTL("Choose the new terrain type."), terrain_cmds, -1, nil, terrain_cmd
|
||||||
|
)
|
||||||
if new_terrain >= 0
|
if new_terrain >= 0
|
||||||
battle.field.terrain = terrain_types[new_terrain]
|
battle.field.terrain = terrain_types[new_terrain]
|
||||||
battle.field.terrainDuration = 5 if battle.field.terrainDuration == 0
|
battle.field.terrainDuration = 5 if battle.field.terrainDuration == 0
|
||||||
@@ -238,7 +241,8 @@ BattleDebugMenuCommands.register("terrain", {
|
|||||||
params.setInitialValue([battle.field.terrainDuration, 0].max)
|
params.setInitialValue([battle.field.terrainDuration, 0].max)
|
||||||
params.setCancelValue([battle.field.terrainDuration, 0].max)
|
params.setCancelValue([battle.field.terrainDuration, 0].max)
|
||||||
new_duration = pbMessageChooseNumber(
|
new_duration = pbMessageChooseNumber(
|
||||||
"\\ts[]" + _INTL("Choose the new terrain duration (0=infinite)."), params)
|
"\\ts[]" + _INTL("Choose the new terrain duration (0=infinite)."), params
|
||||||
|
)
|
||||||
if new_duration != [battle.field.terrainDuration, 0].max
|
if new_duration != [battle.field.terrainDuration, 0].max
|
||||||
battle.field.terrainDuration = (new_duration == 0) ? -1 : new_duration
|
battle.field.terrainDuration = (new_duration == 0) ? -1 : new_duration
|
||||||
end
|
end
|
||||||
@@ -275,7 +279,8 @@ BattleDebugMenuCommands.register("environment", {
|
|||||||
when 0 # Change environment
|
when 0 # Change environment
|
||||||
environment_cmd = environment_types.index(battle.environment) || 0
|
environment_cmd = environment_types.index(battle.environment) || 0
|
||||||
new_environment = pbMessage(
|
new_environment = pbMessage(
|
||||||
"\\ts[]" + _INTL("Choose the new environment."), environment_cmds, -1, nil, environment_cmd)
|
"\\ts[]" + _INTL("Choose the new environment."), environment_cmds, -1, nil, environment_cmd
|
||||||
|
)
|
||||||
if new_environment >= 0
|
if new_environment >= 0
|
||||||
battle.environment = environment_types[new_environment]
|
battle.environment = environment_types[new_environment]
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -72,7 +72,8 @@ BattlerDebugMenuCommands.register("sethp", {
|
|||||||
params.setRange(1, battler.totalhp)
|
params.setRange(1, battler.totalhp)
|
||||||
params.setDefaultValue(battler.hp)
|
params.setDefaultValue(battler.hp)
|
||||||
new_hp = pbMessageChooseNumber(
|
new_hp = pbMessageChooseNumber(
|
||||||
"\\ts[]" + _INTL("Set {1}'s HP (1-{2}).", battler.pbThis(true), battler.totalhp), params)
|
"\\ts[]" + _INTL("Set {1}'s HP (1-{2}).", battler.pbThis(true), battler.totalhp), params
|
||||||
|
)
|
||||||
battler.hp = new_hp if new_hp != battler.hp
|
battler.hp = new_hp if new_hp != battler.hp
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -126,7 +127,8 @@ BattlerDebugMenuCommands.register("setstatus", {
|
|||||||
params.setDefaultValue(0)
|
params.setDefaultValue(0)
|
||||||
params.setCancelValue(-1)
|
params.setCancelValue(-1)
|
||||||
count = pbMessageChooseNumber(
|
count = pbMessageChooseNumber(
|
||||||
"\\ts[]" + _INTL("Set {1}'s toxic count (0-15).", battler.pbThis(true)), params)
|
"\\ts[]" + _INTL("Set {1}'s toxic count (0-15).", battler.pbThis(true)), params
|
||||||
|
)
|
||||||
next if count < 0
|
next if count < 0
|
||||||
battler.statusCount = 1
|
battler.statusCount = 1
|
||||||
battler.effects[PBEffects::Toxic] = count
|
battler.effects[PBEffects::Toxic] = count
|
||||||
@@ -192,7 +194,8 @@ BattlerDebugMenuCommands.register("setstatstages", {
|
|||||||
params.setNegativesAllowed(true)
|
params.setNegativesAllowed(true)
|
||||||
params.setDefaultValue(battler.stages[stat_ids[cmd]])
|
params.setDefaultValue(battler.stages[stat_ids[cmd]])
|
||||||
value = pbMessageChooseNumber(
|
value = pbMessageChooseNumber(
|
||||||
"\\ts[]" + _INTL("Set the stage for {1}.", GameData::Stat.get(stat_ids[cmd]).name), params)
|
"\\ts[]" + _INTL("Set the stage for {1}.", GameData::Stat.get(stat_ids[cmd]).name), params
|
||||||
|
)
|
||||||
battler.stages[stat_ids[cmd]] = value
|
battler.stages[stat_ids[cmd]] = value
|
||||||
else # Reset all stats
|
else # Reset all stats
|
||||||
GameData::Stat.each_battle { |stat| battler.stages[stat.id] = 0 }
|
GameData::Stat.each_battle { |stat| battler.stages[stat.id] = 0 }
|
||||||
@@ -214,7 +217,8 @@ BattlerDebugMenuCommands.register("setlevel", {
|
|||||||
params.setRange(1, GameData::GrowthRate.max_level)
|
params.setRange(1, GameData::GrowthRate.max_level)
|
||||||
params.setDefaultValue(pkmn.level)
|
params.setDefaultValue(pkmn.level)
|
||||||
level = pbMessageChooseNumber(
|
level = pbMessageChooseNumber(
|
||||||
"\\ts[]" + _INTL("Set the Pokémon's level (max. {1}).", params.maxNumber), params)
|
"\\ts[]" + _INTL("Set the Pokémon's level (max. {1}).", params.maxNumber), params
|
||||||
|
)
|
||||||
if level != pkmn.level
|
if level != pkmn.level
|
||||||
pkmn.level = level
|
pkmn.level = level
|
||||||
pkmn.calc_stats
|
pkmn.calc_stats
|
||||||
@@ -242,7 +246,8 @@ BattlerDebugMenuCommands.register("setexp", {
|
|||||||
params.setRange(min_exp, max_exp - 1)
|
params.setRange(min_exp, max_exp - 1)
|
||||||
params.setDefaultValue(pkmn.exp)
|
params.setDefaultValue(pkmn.exp)
|
||||||
new_exp = pbMessageChooseNumber(
|
new_exp = pbMessageChooseNumber(
|
||||||
"\\ts[]" + _INTL("Set the Pokémon's Exp (range {1}-{2}).", min_exp, max_exp - 1), params)
|
"\\ts[]" + _INTL("Set the Pokémon's Exp (range {1}-{2}).", min_exp, max_exp - 1), params
|
||||||
|
)
|
||||||
pkmn.exp = new_exp if new_exp != pkmn.exp
|
pkmn.exp = new_exp if new_exp != pkmn.exp
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -514,7 +519,8 @@ BattlerDebugMenuCommands.register("setmovepp", {
|
|||||||
params.setRange(0, move.total_pp)
|
params.setRange(0, move.total_pp)
|
||||||
params.setDefaultValue(move.pp)
|
params.setDefaultValue(move.pp)
|
||||||
h = pbMessageChooseNumber(
|
h = pbMessageChooseNumber(
|
||||||
"\\ts[]" + _INTL("Set PP of {1} (max. {2}).", move_name, move.total_pp), params)
|
"\\ts[]" + _INTL("Set PP of {1} (max. {2}).", move_name, move.total_pp), params
|
||||||
|
)
|
||||||
move.pp = h
|
move.pp = h
|
||||||
if battler && battler.moves[move_indices[cmd]].id == move.id
|
if battler && battler.moves[move_indices[cmd]].id == move.id
|
||||||
battler.moves[move_indices[cmd]].pp = move.pp
|
battler.moves[move_indices[cmd]].pp = move.pp
|
||||||
@@ -529,7 +535,8 @@ BattlerDebugMenuCommands.register("setmovepp", {
|
|||||||
params.setRange(0, 3)
|
params.setRange(0, 3)
|
||||||
params.setDefaultValue(move.ppup)
|
params.setDefaultValue(move.ppup)
|
||||||
h = pbMessageChooseNumber(
|
h = pbMessageChooseNumber(
|
||||||
"\\ts[]" + _INTL("Set PP Up of {1} (max. 3).", move_name), params)
|
"\\ts[]" + _INTL("Set PP Up of {1} (max. 3).", move_name), params
|
||||||
|
)
|
||||||
move.ppup = h
|
move.ppup = h
|
||||||
move.pp = move.total_pp if move.pp > move.total_pp
|
move.pp = move.total_pp if move.pp > move.total_pp
|
||||||
if battler && battler.moves[move_indices[cmd]].id == move.id
|
if battler && battler.moves[move_indices[cmd]].id == move.id
|
||||||
|
|||||||
@@ -16,8 +16,9 @@ def pbListScreen(title, lister)
|
|||||||
list = pbListWindow([])
|
list = pbListWindow([])
|
||||||
list.viewport = viewport
|
list.viewport = viewport
|
||||||
list.z = 2
|
list.z = 2
|
||||||
title = Window_UnformattedTextPokemon.newWithSize(title,
|
title = Window_UnformattedTextPokemon.newWithSize(
|
||||||
Graphics.width / 2, 0, Graphics.width / 2, 64, viewport)
|
title, Graphics.width / 2, 0, Graphics.width / 2, 64, viewport
|
||||||
|
)
|
||||||
title.z = 2
|
title.z = 2
|
||||||
lister.setViewport(viewport)
|
lister.setViewport(viewport)
|
||||||
selectedmap = -1
|
selectedmap = -1
|
||||||
@@ -63,8 +64,9 @@ def pbListScreenBlock(title, lister)
|
|||||||
list = pbListWindow([], Graphics.width / 2)
|
list = pbListWindow([], Graphics.width / 2)
|
||||||
list.viewport = viewport
|
list.viewport = viewport
|
||||||
list.z = 2
|
list.z = 2
|
||||||
title = Window_UnformattedTextPokemon.newWithSize(title,
|
title = Window_UnformattedTextPokemon.newWithSize(
|
||||||
Graphics.width / 2, 0, Graphics.width / 2, 64, viewport)
|
title, Graphics.width / 2, 0, Graphics.width / 2, 64, viewport
|
||||||
|
)
|
||||||
title.z = 2
|
title.z = 2
|
||||||
lister.setViewport(viewport)
|
lister.setViewport(viewport)
|
||||||
selectedmap = -1
|
selectedmap = -1
|
||||||
@@ -552,8 +554,9 @@ class TrainerBattleLister
|
|||||||
def initialize(selection, includeNew)
|
def initialize(selection, includeNew)
|
||||||
@sprite = IconSprite.new(Graphics.width * 3 / 4, (Graphics.height / 2) + 32)
|
@sprite = IconSprite.new(Graphics.width * 3 / 4, (Graphics.height / 2) + 32)
|
||||||
@sprite.z = 2
|
@sprite.z = 2
|
||||||
@pkmnList = Window_UnformattedTextPokemon.newWithSize("",
|
@pkmnList = Window_UnformattedTextPokemon.newWithSize(
|
||||||
Graphics.width / 2, Graphics.height - 64, Graphics.width / 2, 64)
|
"", Graphics.width / 2, Graphics.height - 64, Graphics.width / 2, 64
|
||||||
|
)
|
||||||
@pkmnList.z = 3
|
@pkmnList.z = 3
|
||||||
@selection = selection
|
@selection = selection
|
||||||
@commands = []
|
@commands = []
|
||||||
|
|||||||
@@ -351,8 +351,7 @@ module Compiler
|
|||||||
line = pbGetCsvRecord(line, line_no,
|
line = pbGetCsvRecord(line, line_no,
|
||||||
[0, "snssueeuuueiss",
|
[0, "snssueeuuueiss",
|
||||||
nil, nil, nil, nil, nil, :Type, ["Physical", "Special", "Status"],
|
nil, nil, nil, nil, nil, :Type, ["Physical", "Special", "Status"],
|
||||||
nil, nil, nil, :Target, nil, nil, nil]
|
nil, nil, nil, :Target, nil, nil, nil])
|
||||||
)
|
|
||||||
move_id = line[1].to_sym
|
move_id = line[1].to_sym
|
||||||
if GameData::Move::DATA[move_id]
|
if GameData::Move::DATA[move_id]
|
||||||
raise _INTL("Move ID '{1}' is used twice.\r\n{2}", move_id, FileLineData.linereport)
|
raise _INTL("Move ID '{1}' is used twice.\r\n{2}", move_id, FileLineData.linereport)
|
||||||
@@ -471,8 +470,7 @@ module Compiler
|
|||||||
# Parse item
|
# Parse item
|
||||||
line = pbGetCsvRecord(line, line_no,
|
line = pbGetCsvRecord(line, line_no,
|
||||||
[0, "snssvusuuUE", nil, nil, nil,
|
[0, "snssvusuuUE", nil, nil, nil,
|
||||||
nil, nil, nil, nil, nil, nil, nil, :Move]
|
nil, nil, nil, nil, nil, nil, nil, :Move])
|
||||||
)
|
|
||||||
item_id = line[1].to_sym
|
item_id = line[1].to_sym
|
||||||
if GameData::Item.exists?(item_id)
|
if GameData::Item.exists?(item_id)
|
||||||
raise _INTL("Item ID '{1}' is used twice.\r\n{2}", item_id, FileLineData.linereport)
|
raise _INTL("Item ID '{1}' is used twice.\r\n{2}", item_id, FileLineData.linereport)
|
||||||
@@ -1347,8 +1345,7 @@ module Compiler
|
|||||||
{ "Male" => 0, "M" => 0, "0" => 0,
|
{ "Male" => 0, "M" => 0, "0" => 0,
|
||||||
"Female" => 1, "F" => 1, "1" => 1,
|
"Female" => 1, "F" => 1, "1" => 1,
|
||||||
"Mixed" => 2, "X" => 2, "2" => 2, "" => 2 },
|
"Mixed" => 2, "X" => 2, "2" => 2, "" => 2 },
|
||||||
nil, nil]
|
nil, nil])
|
||||||
)
|
|
||||||
tr_type_id = line[1].to_sym
|
tr_type_id = line[1].to_sym
|
||||||
if GameData::TrainerType.exists?(tr_type_id)
|
if GameData::TrainerType.exists?(tr_type_id)
|
||||||
raise _INTL("Trainer Type ID '{1}' is used twice.\r\n{2}", tr_type_id, FileLineData.linereport)
|
raise _INTL("Trainer Type ID '{1}' is used twice.\r\n{2}", tr_type_id, FileLineData.linereport)
|
||||||
|
|||||||
@@ -119,7 +119,8 @@ module Compiler
|
|||||||
for i in 0...route.list.length
|
for i in 0...route.list.length
|
||||||
list.push(RPG::EventCommand.new(
|
list.push(RPG::EventCommand.new(
|
||||||
(i == 0) ? 209 : 509, indent,
|
(i == 0) ? 209 : 509, indent,
|
||||||
(i == 0) ? [character, route] : [route.list[i - 1]]))
|
(i == 0) ? [character, route] : [route.list[i - 1]]
|
||||||
|
))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -946,15 +947,15 @@ module Compiler
|
|||||||
list.delete_at(i)
|
list.delete_at(i)
|
||||||
end
|
end
|
||||||
list.insert(i,
|
list.insert(i,
|
||||||
RPG::EventCommand.new(314, list[i].indent, [0]) # Recover All
|
RPG::EventCommand.new(314, list[i].indent, [0])) # Recover All
|
||||||
)
|
|
||||||
changed = true
|
changed = true
|
||||||
when "pbFadeOutIn(99999){foriin$player.partyi.healend}"
|
when "pbFadeOutIn(99999){foriin$player.partyi.healend}"
|
||||||
oldIndent = list[i].indent
|
oldIndent = list[i].indent
|
||||||
for j in i..lastScript
|
for j in i..lastScript
|
||||||
list.delete_at(i)
|
list.delete_at(i)
|
||||||
end
|
end
|
||||||
list.insert(i,
|
list.insert(
|
||||||
|
i,
|
||||||
RPG::EventCommand.new(223, oldIndent, [Tone.new(-255, -255, -255), 6]), # Fade to black
|
RPG::EventCommand.new(223, oldIndent, [Tone.new(-255, -255, -255), 6]), # Fade to black
|
||||||
RPG::EventCommand.new(106, oldIndent, [6]), # Wait
|
RPG::EventCommand.new(106, oldIndent, [6]), # Wait
|
||||||
RPG::EventCommand.new(314, oldIndent, [0]), # Recover All
|
RPG::EventCommand.new(314, oldIndent, [0]), # Recover All
|
||||||
@@ -1175,7 +1176,8 @@ module Compiler
|
|||||||
fullTransfer = list[i]
|
fullTransfer = list[i]
|
||||||
indent = list[i].indent
|
indent = list[i].indent
|
||||||
(list.length - 1).times { list.delete_at(0) }
|
(list.length - 1).times { list.delete_at(0) }
|
||||||
list.insert(0,
|
list.insert(
|
||||||
|
0,
|
||||||
RPG::EventCommand.new(250, indent, [RPG::AudioFile.new("Exit Door", 80, 100)]), # Play SE
|
RPG::EventCommand.new(250, indent, [RPG::AudioFile.new("Exit Door", 80, 100)]), # Play SE
|
||||||
RPG::EventCommand.new(223, indent, [Tone.new(-255, -255, -255), 6]), # Fade to black
|
RPG::EventCommand.new(223, indent, [Tone.new(-255, -255, -255), 6]), # Fade to black
|
||||||
RPG::EventCommand.new(106, indent, [8]), # Wait
|
RPG::EventCommand.new(106, indent, [8]), # Wait
|
||||||
@@ -1324,11 +1326,13 @@ module Compiler
|
|||||||
end
|
end
|
||||||
if isempty
|
if isempty
|
||||||
if elseIndex >= 0
|
if elseIndex >= 0
|
||||||
list.insert(elseIndex + 1,
|
list.insert(
|
||||||
|
elseIndex + 1,
|
||||||
RPG::EventCommand.new(115, list[i].indent + 1, []) # Exit Event Processing
|
RPG::EventCommand.new(115, list[i].indent + 1, []) # Exit Event Processing
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
list.insert(i + 1,
|
list.insert(
|
||||||
|
i + 1,
|
||||||
RPG::EventCommand.new(0, list[i].indent + 1, []), # Empty Event
|
RPG::EventCommand.new(0, list[i].indent + 1, []), # Empty Event
|
||||||
RPG::EventCommand.new(411, list[i].indent, []), # Else
|
RPG::EventCommand.new(411, list[i].indent, []), # Else
|
||||||
RPG::EventCommand.new(115, list[i].indent + 1, []) # Exit Event Processing
|
RPG::EventCommand.new(115, list[i].indent + 1, []) # Exit Event Processing
|
||||||
|
|||||||
Reference in New Issue
Block a user