The Great Enspacening begins!

This commit is contained in:
Maruno17
2021-12-18 12:20:31 +00:00
parent 2480ab0f9e
commit f7b76ae62e
138 changed files with 567 additions and 567 deletions

View File

@@ -46,7 +46,7 @@ end
class DarknessSprite < SpriteWrapper
attr_reader :radius
def initialize(viewport=nil)
def initialize(viewport = nil)
super(viewport)
@darkness = BitmapWrapper.new(Graphics.width,Graphics.height)
@radius = radiusMin
@@ -91,7 +91,7 @@ end
# Light effects
#===============================================================================
class LightEffect
def initialize(event,viewport=nil,map=nil,filename=nil)
def initialize(event,viewport = nil,map = nil,filename = nil)
@light = IconSprite.new(0,0,viewport)
if filename!=nil && filename!="" && pbResolveBitmap("Graphics/Pictures/"+filename)
@light.setBitmap("Graphics/Pictures/"+filename)
@@ -123,7 +123,7 @@ end
class LightEffect_Lamp < LightEffect
def initialize(event,viewport=nil,map=nil)
def initialize(event,viewport = nil,map = nil)
lamp = AnimatedBitmap.new("Graphics/Pictures/LE")
@light = Sprite.new(viewport)
@light.bitmap = Bitmap.new(128,64)

View File

@@ -81,7 +81,7 @@ end
#===============================================================================
# Blacking out animation
#===============================================================================
def pbStartOver(gameover=false)
def pbStartOver(gameover = false)
if pbInBugContest?
pbBugContestStartOver
return

View File

@@ -311,7 +311,7 @@ Events.onMapSceneChange += proc { |_sender, e|
# Event locations, terrain tags
#===============================================================================
# NOTE: Assumes the event is 1x1 tile in size. Only returns one tile.
def pbFacingTile(direction=nil,event=nil)
def pbFacingTile(direction = nil,event = nil)
return $map_factory.getFacingTile(direction,event) if $map_factory
return pbFacingTileRegular(direction,event)
end
@@ -395,7 +395,7 @@ end
#===============================================================================
# Audio playing
#===============================================================================
def pbCueBGM(bgm,seconds,volume=nil,pitch=nil)
def pbCueBGM(bgm,seconds,volume = nil,pitch = nil)
return if !bgm
bgm = pbResolveAudioFile(bgm,volume,pitch)
playingBGM = $game_system.playing_bgm
@@ -484,7 +484,7 @@ end
def pbMoveRoute(event,commands,waitComplete=false)
def pbMoveRoute(event,commands,waitComplete = false)
route = RPG::MoveRoute.new
route.repeat = false
route.skippable = true
@@ -612,7 +612,7 @@ def pbMoveTowardPlayer(event)
$PokemonMap.addMovedEvent(event.id) if $PokemonMap
end
def pbJumpToward(dist=1,playSound=false,cancelSurf=false)
def pbJumpToward(dist = 1,playSound = false,cancelSurf = false)
x = $game_player.x
y = $game_player.y
case $game_player.direction
@@ -640,7 +640,7 @@ end
#===============================================================================
# Bridges, cave escape points, and setting the heal point
#===============================================================================
def pbBridgeOn(height=2)
def pbBridgeOn(height = 2)
$PokemonGlobal.bridge = height
end
@@ -706,7 +706,7 @@ end
#===============================================================================
# Picking up an item found on the ground
#===============================================================================
def pbItemBall(item,quantity=1)
def pbItemBall(item,quantity = 1)
item = GameData::Item.get(item)
return false if !item || quantity<1
itemname = (quantity>1) ? item.name_plural : item.name
@@ -752,7 +752,7 @@ end
#===============================================================================
# Being given an item
#===============================================================================
def pbReceiveItem(item,quantity=1)
def pbReceiveItem(item,quantity = 1)
item = GameData::Item.get(item)
return false if !item || quantity<1
itemname = (quantity>1) ? item.name_plural : item.name

View File

@@ -309,7 +309,7 @@ end
# Standard methods that start a wild battle of various sizes
#===============================================================================
# Used when walking in tall grass, hence the additional code.
def pbWildBattle(species, level, outcomeVar=1, canRun=true, canLose=false)
def pbWildBattle(species, level, outcomeVar = 1, canRun = true, canLose = false)
species = GameData::Species.get(species).id
# Potentially call a different pbWildBattle-type method instead (for roaming
# Pokémon, Safari battles, Bug Contest battles)
@@ -329,7 +329,7 @@ def pbWildBattle(species, level, outcomeVar=1, canRun=true, canLose=false)
end
def pbDoubleWildBattle(species1, level1, species2, level2,
outcomeVar=1, canRun=true, canLose=false)
outcomeVar = 1, canRun = true, canLose = false)
# Set some battle rules
setBattleRule("outcomeVar",outcomeVar) if outcomeVar!=1
setBattleRule("cannotRun") if !canRun
@@ -342,7 +342,7 @@ def pbDoubleWildBattle(species1, level1, species2, level2,
end
def pbTripleWildBattle(species1, level1, species2, level2, species3, level3,
outcomeVar=1, canRun=true, canLose=false)
outcomeVar = 1, canRun = true, canLose = false)
# Set some battle rules
setBattleRule("outcomeVar",outcomeVar) if outcomeVar!=1
setBattleRule("cannotRun") if !canRun
@@ -467,8 +467,8 @@ end
# Used by most trainer events, which can be positioned in such a way that
# multiple trainer events spot the player at once. The extra code in this method
# deals with that case and can cause a double trainer battle instead.
def pbTrainerBattle(trainerID, trainerName, endSpeech=nil,
doubleBattle=false, trainerPartyID=0, canLose=false, outcomeVar=1)
def pbTrainerBattle(trainerID, trainerName, endSpeech = nil,
doubleBattle = false, trainerPartyID = 0, canLose = false, outcomeVar = 1)
# If there is another NPC trainer who spotted the player at the same time, and
# it is possible to have a double battle (the player has 2+ able Pokémon or
# has a partner trainer), then record this first NPC trainer into
@@ -523,8 +523,8 @@ def pbTrainerBattle(trainerID, trainerName, endSpeech=nil,
end
def pbDoubleTrainerBattle(trainerID1, trainerName1, trainerPartyID1, endSpeech1,
trainerID2, trainerName2, trainerPartyID2=0, endSpeech2=nil,
canLose=false, outcomeVar=1)
trainerID2, trainerName2, trainerPartyID2 = 0, endSpeech2 = nil,
canLose = false, outcomeVar = 1)
# Set some battle rules
setBattleRule("outcomeVar",outcomeVar) if outcomeVar!=1
setBattleRule("canLose") if canLose
@@ -540,8 +540,8 @@ end
def pbTripleTrainerBattle(trainerID1, trainerName1, trainerPartyID1, endSpeech1,
trainerID2, trainerName2, trainerPartyID2, endSpeech2,
trainerID3, trainerName3, trainerPartyID3=0, endSpeech3=nil,
canLose=false, outcomeVar=1)
trainerID3, trainerName3, trainerPartyID3 = 0, endSpeech3 = nil,
canLose = false, outcomeVar = 1)
# Set some battle rules
setBattleRule("outcomeVar",outcomeVar) if outcomeVar!=1
setBattleRule("canLose") if canLose

View File

@@ -39,7 +39,7 @@ def pbSceneStandby
$scene.createSpritesets if $scene && $scene.is_a?(Scene_Map)
end
def pbBattleAnimation(bgm=nil,battletype=0,foe=nil)
def pbBattleAnimation(bgm = nil,battletype = 0,foe = nil)
$game_temp.in_battle = true
viewport = Viewport.new(0,0,Graphics.width,Graphics.height)
viewport.z = 99999

View File

@@ -387,7 +387,7 @@ end
# Creates and returns a Pokémon based on the given species and level.
# Applies wild Pokémon modifiers (wild held item, shiny chance modifiers,
# Pokérus, gender/nature forcing because of player's lead Pokémon).
def pbGenerateWildPokemon(species,level,isRoamer=false)
def pbGenerateWildPokemon(species,level,isRoamer = false)
genwildpoke = Pokemon.new(species,level)
# Give the wild Pokémon a held item
items = genwildpoke.wildHoldItems

View File

@@ -39,31 +39,31 @@ module PBDayNight
@oneOverSixty = 1/60.0
# Returns true if it's day.
def self.isDay?(time=nil)
def self.isDay?(time = nil)
time = pbGetTimeNow if !time
return (time.hour>=5 && time.hour<20)
end
# Returns true if it's night.
def self.isNight?(time=nil)
def self.isNight?(time = nil)
time = pbGetTimeNow if !time
return (time.hour>=20 || time.hour<5)
end
# Returns true if it's morning.
def self.isMorning?(time=nil)
def self.isMorning?(time = nil)
time = pbGetTimeNow if !time
return (time.hour>=5 && time.hour<10)
end
# Returns true if it's the afternoon.
def self.isAfternoon?(time=nil)
def self.isAfternoon?(time = nil)
time = pbGetTimeNow if !time
return (time.hour>=14 && time.hour<17)
end
# Returns true if it's the evening.
def self.isEvening?(time=nil)
def self.isEvening?(time = nil)
time = pbGetTimeNow if !time
return (time.hour>=17 && time.hour<20)
end
@@ -137,7 +137,7 @@ end
# 5 - Waning Gibbous
# 6 - Last Quarter
# 7 - Waning Crescent
def moonphase(time=nil) # in UTC
def moonphase(time = nil) # in UTC
time = pbGetTimeNow if !time
transitions = [
1.8456618033125,

View File

@@ -35,7 +35,7 @@ end
def pbCanUseHiddenMove?(pkmn,move,showmsg=true)
def pbCanUseHiddenMove?(pkmn,move,showmsg = true)
return HiddenMoveHandlers.triggerCanUseMove(move,pkmn,showmsg)
end
@@ -52,7 +52,7 @@ def pbHiddenMoveEvent
Events.onAction.trigger(nil)
end
def pbCheckHiddenMoveBadge(badge=-1,showmsg=true)
def pbCheckHiddenMoveBadge(badge = -1,showmsg = true)
return true if badge<0 # No badge requirement
return true if $DEBUG
if (Settings::FIELD_MOVES_COUNT_BADGES) ? $player.badge_count >= badge : $player.badges[badge]
@@ -368,7 +368,7 @@ def pbSurfacing
end
# @deprecated This method is slated to be removed in v21.
def pbTransferUnderwater(mapid,x,y,direction=$game_player.direction)
def pbTransferUnderwater(mapid,x,y,direction = $game_player.direction)
Deprecation.warn_method('pbTransferUnderwater', 'v21', '"Transfer Player" event command')
pbFadeOutIn {
$game_temp.player_new_map_id = mapid
@@ -560,7 +560,7 @@ HiddenMoveHandlers::UseMove.add(:FLY,proc { |move, pkmn|
#===============================================================================
# Headbutt
#===============================================================================
def pbHeadbuttEffect(event=nil)
def pbHeadbuttEffect(event = nil)
event = $game_player.pbFacingEvent(true) if !event
a = (event.x+(event.x/24).floor+1)*(event.y+(event.y/24).floor+1)
a = (a*2/5)%10 # Even 2x as likely as odd, 0 is 1.5x as likely as odd
@@ -585,7 +585,7 @@ def pbHeadbuttEffect(event=nil)
end
end
def pbHeadbutt(event=nil)
def pbHeadbutt(event = nil)
move = :HEADBUTT
movefinder = $player.get_pokemon_with_move(move)
if !$DEBUG && !movefinder
@@ -781,7 +781,7 @@ def pbEndSurf(_xOffset,_yOffset)
end
# @deprecated This method is slated to be removed in v21.
def pbTransferSurfing(mapid,xcoord,ycoord,direction=$game_player.direction)
def pbTransferSurfing(mapid,xcoord,ycoord,direction = $game_player.direction)
Deprecation.warn_method('pbTransferSurfing', 'v21', '"Transfer Player" event command')
pbFadeOutIn {
$game_temp.player_new_map_id = mapid

View File

@@ -37,7 +37,7 @@ def pbFishingEnd
$PokemonGlobal.fishing = false
end
def pbFishing(hasEncounter,rodType=1)
def pbFishing(hasEncounter,rodType = 1)
$stats.fishing_count += 1
speedup = ($player.first_pokemon && [:STICKYHOLD, :SUCTIONCUPS].include?($player.first_pokemon.ability_id))
biteChance = 20+(25*rodType) # 45, 70, 95