Merge branch 'master' into dev

This commit is contained in:
Maruno17
2021-08-12 20:37:25 +01:00
7 changed files with 20 additions and 8 deletions

View File

@@ -4,6 +4,7 @@
module Console
def self.setup_console
return unless $DEBUG
echoln "GPU Cache Max: #{Bitmap.max_size}"
echoln "--------------------------------"
echoln "#{System.game_title} Output Window"
echoln "--------------------------------"

View File

@@ -75,6 +75,11 @@ module SaveData
return @loaded
end
# Marks value as unloaded.
def mark_as_unloaded
@loaded = false
end
# Uses the {#from_old_format} proc to select the correct data from
# +old_format+ and return it.
# Returns nil if the proc is undefined.
@@ -221,6 +226,13 @@ module SaveData
load_values(save_data) { |value| !value.loaded? }
end
# Marks all values that aren't loaded on bootup as unloaded.
def self.mark_values_as_unloaded
@values.each do |value|
value.mark_as_unloaded unless value.load_in_bootup?
end
end
# Loads each value from the given save data that has
# been set to be loaded during bootup. Done when a save file exists.
# @param save_data [Hash] save data to load

View File

@@ -164,6 +164,8 @@ class Scene_Map
end
updateSpritesets
if $game_temp.to_title
$game_temp.to_title = false
SaveData.mark_values_as_unloaded
$scene = pbCallTitle
return
end

View File

@@ -165,7 +165,7 @@ class PokeBattle_Battler
def pbSymbiosis
return if fainted?
return if !self.item
return if self.item
@battle.pbPriority(true).each do |b|
next if b.opposes?
next if !b.hasActiveAbility?(:SYMBIOSIS)

View File

@@ -2522,7 +2522,8 @@ class PokeBattle_Move_0D6 < PokeBattle_HealingMove
return (user.totalhp/2.0).round
end
def pbEffectAfterAllHits(user,target)
def pbEffectGeneral(user)
super
user.effects[PBEffects::Roost] = true
end
end

View File

@@ -872,7 +872,7 @@ BattleHandlers::DamageCalcUserAbility.add(:AERILATE,
}
)
BattleHandlers::DamageCalcUserAbility.copy(:AERILATE,:PIXILATE,:REFRIGERATE,:GALVANIZE)
BattleHandlers::DamageCalcUserAbility.copy(:AERILATE, :PIXILATE, :REFRIGERATE, :GALVANIZE, :NORMALIZE)
BattleHandlers::DamageCalcUserAbility.add(:ANALYTIC,
proc { |ability,user,target,move,mults,baseDmg,type|

View File

@@ -367,11 +367,7 @@ class PokemonEncounters
chance_total = 0
enc_list.each { |a| chance_total += a[0] }
# Choose a random entry in the encounter table based on entry probabilities
rnd = 0
chance_rolls.times do
r = rand(chance_total)
rnd = r if r > rnd # Prefer rarer entries if rolling repeatedly
end
rnd = rand(chance_total)
encounter = nil
enc_list.each do |enc|
rnd -= enc[0]