diff --git a/Data/Scripts/004_Sprites/002_Sprite_Timer.rb b/Data/Scripts/004_Sprites/002_Sprite_Timer.rb index dd3b97362..4e5b26274 100644 --- a/Data/Scripts/004_Sprites/002_Sprite_Timer.rb +++ b/Data/Scripts/004_Sprites/002_Sprite_Timer.rb @@ -19,6 +19,7 @@ class Sprite_Timer def update return if disposed? if $game_system.timer_working + @timer.visible = true if @timer if !@timer @timer=Window_AdvancedTextPokemon.newWithSize("",Graphics.width-120,0,120,64) @timer.width=@timer.borderX+96 diff --git a/Data/Scripts/012_Battle/001_Battler/001_PokeBattle_Battler.rb b/Data/Scripts/012_Battle/001_Battler/001_PokeBattle_Battler.rb index 00bbbda2b..4946d3dff 100644 --- a/Data/Scripts/012_Battle/001_Battler/001_PokeBattle_Battler.rb +++ b/Data/Scripts/012_Battle/001_Battler/001_PokeBattle_Battler.rb @@ -106,6 +106,7 @@ class PokeBattle_Battler def statusCount=(value) @statusCount = value @pokemon.statusCount = value if @pokemon + @battle.scene.pbRefreshOne(@index) end #============================================================================= diff --git a/Data/Scripts/012_Battle/002_Move/006_Move_Effects_080-0FF.rb b/Data/Scripts/012_Battle/002_Move/006_Move_Effects_080-0FF.rb index cfc9cd864..ed5669fe9 100644 --- a/Data/Scripts/012_Battle/002_Move/006_Move_Effects_080-0FF.rb +++ b/Data/Scripts/012_Battle/002_Move/006_Move_Effects_080-0FF.rb @@ -3035,7 +3035,7 @@ class PokeBattle_Move_0EB < PokeBattle_Move next if b.fainted? || b.damageState.unaffected || switchedBattlers.include?(b.index) newPkmn = @battle.pbGetReplacementPokemonIndex(b.index,true) # Random next if newPkmn<0 - @battle.pbRecallAndReplace(b.index,newPkmn) + @battle.pbRecallAndReplace(b.index, newPkmn, true) @battle.pbDisplay(_INTL("{1} was dragged out!",b.pbThis)) @battle.pbClearChoice(b.index) # Replacement Pokémon does nothing this round switchedBattlers.push(b.index) @@ -3077,7 +3077,7 @@ class PokeBattle_Move_0EC < PokeBattle_Move next if b.hasActiveAbility?(:SUCTIONCUPS) && !@battle.moldBreaker newPkmn = @battle.pbGetReplacementPokemonIndex(b.index,true) # Random next if newPkmn<0 - @battle.pbRecallAndReplace(b.index,newPkmn) + @battle.pbRecallAndReplace(b.index, newPkmn, true) @battle.pbDisplay(_INTL("{1} was dragged out!",b.pbThis)) @battle.pbClearChoice(b.index) # Replacement Pokémon does nothing this round switchedBattlers.push(b.index) @@ -3114,7 +3114,7 @@ class PokeBattle_Move_0ED < PokeBattle_Move return if user.fainted? newPkmn = @battle.pbGetReplacementPokemonIndex(user.index) # Owner chooses return if newPkmn<0 - @battle.pbRecallAndReplace(user.index,newPkmn,true) + @battle.pbRecallAndReplace(user.index, newPkmn, false, true) @battle.pbClearChoice(user.index) # Replacement Pokémon does nothing this round @battle.moldBreaker = false switchedBattlers.push(user.index) diff --git a/Data/Scripts/012_Battle/003_Battle/006_Battle_Action_Switching.rb b/Data/Scripts/012_Battle/003_Battle/006_Battle_Action_Switching.rb index f1879eec3..b435a5e43 100644 --- a/Data/Scripts/012_Battle/003_Battle/006_Battle_Action_Switching.rb +++ b/Data/Scripts/012_Battle/003_Battle/006_Battle_Action_Switching.rb @@ -223,11 +223,11 @@ class PokeBattle_Battle end # Actually performs the recalling and sending out in all situations. - def pbRecallAndReplace(idxBattler,idxParty,batonPass=false) + def pbRecallAndReplace(idxBattler,idxParty,randomReplacement=false,batonPass=false) @scene.pbRecall(idxBattler) if !@battlers[idxBattler].fainted? @battlers[idxBattler].pbAbilitiesOnSwitchOut # Inc. primordial weather check @scene.pbShowPartyLineup(idxBattler&1) if pbSideSize(idxBattler)==1 - pbMessagesOnReplace(idxBattler,idxParty) + pbMessagesOnReplace(idxBattler,idxParty) if !randomReplacement pbReplace(idxBattler,idxParty,batonPass) end diff --git a/Data/Scripts/012_Battle/008_BattleHandlers_Items.rb b/Data/Scripts/012_Battle/008_BattleHandlers_Items.rb index 541d16c79..d4eda313b 100644 --- a/Data/Scripts/012_Battle/008_BattleHandlers_Items.rb +++ b/Data/Scripts/012_Battle/008_BattleHandlers_Items.rb @@ -1238,7 +1238,7 @@ BattleHandlers::TargetItemAfterMoveUse.add(:REDCARD, battle.pbDisplay(_INTL("{1} held up its {2} against {3}!", battler.pbThis,battler.itemName,user.pbThis(true))) battler.pbConsumeItem - battle.pbRecallAndReplace(user.index,newPkmn) + battle.pbRecallAndReplace(user.index, newPkmn, true) battle.pbDisplay(_INTL("{1} was dragged out!",user.pbThis)) battle.pbClearChoice(user.index) # Replacement Pokémon does nothing this round switched.push(user.index) diff --git a/Data/Scripts/014_Trainers/001_PokeBattle_Trainer.rb b/Data/Scripts/014_Trainers/001_PokeBattle_Trainer.rb index 77ffef5a5..590d5437d 100644 --- a/Data/Scripts/014_Trainers/001_PokeBattle_Trainer.rb +++ b/Data/Scripts/014_Trainers/001_PokeBattle_Trainer.rb @@ -169,13 +169,13 @@ class PokeBattle_Trainer def pokedexSeen(region=-1) # Number of Pokémon seen ret=0 if region==-1 - for i in 0..PBSpecies.maxValue + for i in 1..PBSpecies.maxValue ret+=1 if @seen[i] end else regionlist=pbAllRegionalSpecies(region) for i in regionlist - ret+=1 if @seen[i] + ret+=1 if i > 0 && @seen[i] end end return ret diff --git a/Data/Scripts/015_Items/001_PItem_Items.rb b/Data/Scripts/015_Items/001_PItem_Items.rb index c0a2a2253..b378155ee 100644 --- a/Data/Scripts/015_Items/001_PItem_Items.rb +++ b/Data/Scripts/015_Items/001_PItem_Items.rb @@ -466,14 +466,12 @@ def pbRestorePP(pkmn,idxMove,pp) return newpp-oldpp end -def pbBattleRestorePP(pkmn,battler,idxMove,pp) - if pbRestorePP(pkmn,idxMove,pp)>0 - if battler && !battler.effects[PBEffects::Transform] && - battler.moves[idxMove] && battler.moves[idxMove].id==pkmn.moves[idxMove].id - battler.pbSetPP(battler.moves[idxMove],pkmn.moves[idxMove].pp) - end +def pbBattleRestorePP(pkmn, battler, idxMove, pp) + return if pbRestorePP(pkmn,idxMove,pp) == 0 + if battler && !battler.effects[PBEffects::Transform] && + battler.moves[idxMove] && battler.moves[idxMove].id == pkmn.moves[idxMove].id + battler.pbSetPP(battler.moves[idxMove], pkmn.moves[idxMove].pp) end - return ret end #=============================================================================== diff --git a/Data/Scripts/020_System and utilities/005_PSystem_Utilities.rb b/Data/Scripts/020_System and utilities/005_PSystem_Utilities.rb index 7e68c1af5..4a78a57af 100644 --- a/Data/Scripts/020_System and utilities/005_PSystem_Utilities.rb +++ b/Data/Scripts/020_System and utilities/005_PSystem_Utilities.rb @@ -908,7 +908,7 @@ def pbAllRegionalSpecies(region) dexList = pbLoadRegionalDexes[region] return ret if !dexList || dexList.length==0 for i in 0...dexList.length - ret[dexList[i]] = i if dexList[i] + ret[dexList[i]] = i if dexList[i] && dexList[i] > 0 end ret.map! { |e| e ? e : 0 } # Replace nils with 0s return ret