Fixed Symbiosis, fixed Roost not roosting, fixed Normalize not boosting damage, fixed crash in Bug Catching Contest, fixed old format moves.txt compiling, added cache size text to console

This commit is contained in:
Maruno17
2021-08-12 20:00:42 +01:00
parent 7f86115c36
commit 19535b8160
6 changed files with 8 additions and 9 deletions
@@ -4,6 +4,7 @@
module Console module Console
def self.setup_console def self.setup_console
return unless $DEBUG return unless $DEBUG
echoln "GPU Cache Max: #{Bitmap.max_size}"
echoln "--------------------------------" echoln "--------------------------------"
echoln "#{System.game_title} Output Window" echoln "#{System.game_title} Output Window"
echoln "--------------------------------" echoln "--------------------------------"
@@ -159,7 +159,7 @@ class PokeBattle_Battler
def pbSymbiosis def pbSymbiosis
return if fainted? return if fainted?
return if !self.item return if self.item
@battle.pbPriority(true).each do |b| @battle.pbPriority(true).each do |b|
next if b.opposes? next if b.opposes?
next if !b.hasActiveAbility?(:SYMBIOSIS) next if !b.hasActiveAbility?(:SYMBIOSIS)
@@ -2494,7 +2494,8 @@ class PokeBattle_Move_0D6 < PokeBattle_HealingMove
return (user.totalhp/2.0).round return (user.totalhp/2.0).round
end end
def pbEffectAfterAllHits(user,target) def pbEffectGeneral(user)
super
user.effects[PBEffects::Roost] = true user.effects[PBEffects::Roost] = true
end end
end end
@@ -871,7 +871,7 @@ BattleHandlers::DamageCalcUserAbility.add(:AERILATE,
} }
) )
BattleHandlers::DamageCalcUserAbility.copy(:AERILATE,:PIXILATE,:REFRIGERATE,:GALVANIZE) BattleHandlers::DamageCalcUserAbility.copy(:AERILATE, :PIXILATE, :REFRIGERATE, :GALVANIZE, :NORMALIZE)
BattleHandlers::DamageCalcUserAbility.add(:ANALYTIC, BattleHandlers::DamageCalcUserAbility.add(:ANALYTIC,
proc { |ability,user,target,move,mults,baseDmg,type| proc { |ability,user,target,move,mults,baseDmg,type|
@@ -346,11 +346,7 @@ class PokemonEncounters
chance_total = 0 chance_total = 0
enc_list.each { |a| chance_total += a[0] } enc_list.each { |a| chance_total += a[0] }
# Choose a random entry in the encounter table based on entry probabilities # Choose a random entry in the encounter table based on entry probabilities
rnd = 0 rnd = rand(chance_total)
chance_rolls.times do
r = rand(chance_total)
rnd = r if r > rnd # Prefer rarer entries if rolling repeatedly
end
encounter = nil encounter = nil
enc_list.each do |enc| enc_list.each do |enc|
rnd -= enc[0] rnd -= enc[0]
@@ -1322,7 +1322,8 @@ module Compiler
end end
# Write all line data to hash # Write all line data to hash
moves = [line_data[3], line_data[4], line_data[5], line_data[6]] moves = [line_data[3], line_data[4], line_data[5], line_data[6]]
moves.uniq!.compact! moves.uniq!
moves.compact!
ivs = {} ivs = {}
if line_data[12] if line_data[12]
GameData::Stat.each_main do |s| GameData::Stat.each_main do |s|