mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Fixed incorrect Hall of Fame time, fixed Shields Down showing too many messages, fixed target of Pluck still being able to consume its healing berry
This commit is contained in:
@@ -165,7 +165,7 @@ class GameStats
|
||||
end
|
||||
|
||||
def set_time_to_hall_of_fame
|
||||
@time_to_enter_hall_of_fame = @play_time
|
||||
@time_to_enter_hall_of_fame = @play_time if @time_to_enter_hall_of_fame == 0
|
||||
end
|
||||
|
||||
def play_time_per_session
|
||||
|
||||
@@ -255,8 +255,6 @@ class Battle::Battler
|
||||
@battle.pbShowAbilitySplash(self, true)
|
||||
@battle.pbHideAbilitySplash(self)
|
||||
pbChangeForm(newForm, _INTL("{1} deactivated!", abilityName))
|
||||
elsif !endOfRound
|
||||
@battle.pbDisplay(_INTL("{1} deactivated!", abilityName))
|
||||
end
|
||||
elsif @form < 7 # Turn into Core form
|
||||
@battle.pbShowAbilitySplash(self, true)
|
||||
|
||||
@@ -692,7 +692,10 @@ class Battle::Battler
|
||||
end
|
||||
# HP-healing held items (checks all battlers rather than just targets
|
||||
# because Flame Burst's splash damage affects non-targets)
|
||||
@battle.pbPriority(true).each { |b| b.pbItemHPHealCheck }
|
||||
@battle.pbPriority(true).each do |b|
|
||||
next if move.preventsBattlerConsumingHealingBerry?(b, targets)
|
||||
b.pbItemHPHealCheck
|
||||
end
|
||||
# Animate battlers fainting (checks all battlers rather than just targets
|
||||
# because Flame Burst's splash damage affects non-targets)
|
||||
@battle.pbPriority(true).each { |b| b.pbFaint if b&.fainted? }
|
||||
|
||||
@@ -144,6 +144,7 @@ class Battle::Move
|
||||
def tramplesMinimize?; return @flags.any? { |f| f[/^TramplesMinimize$/i] }; end
|
||||
|
||||
def nonLethal?(_user, _target); return false; end # For False Swipe
|
||||
def preventsBattlerConsumingHealingBerry?(battler, targets); return false; end # For Bug Bite/Pluck
|
||||
|
||||
def ignoresSubstitute?(user) # user is the Pokémon using this move
|
||||
if Settings::MECHANICS_GENERATION >= 6
|
||||
|
||||
@@ -375,6 +375,11 @@ end
|
||||
# User consumes target's berry and gains its effect. (Bug Bite, Pluck)
|
||||
#===============================================================================
|
||||
class Battle::Move::UserConsumeTargetBerry < Battle::Move
|
||||
def preventsBattlerConsumingHealingBerry?(battler, targets)
|
||||
return targets.any? { |b| b.index == battler.index } &&
|
||||
battler.item&.is_berry? && Battle::ItemEffects::HPHeal[battler.item]
|
||||
end
|
||||
|
||||
def pbEffectAfterAllHits(user, target)
|
||||
return if user.fainted? || target.fainted?
|
||||
return if target.damageState.unaffected || target.damageState.substitute
|
||||
|
||||
@@ -275,13 +275,21 @@ class HallOfFame_Scene
|
||||
end
|
||||
|
||||
def writeTrainerData
|
||||
totalsec = Graphics.frame_count / Graphics.frame_rate
|
||||
if $PokemonGlobal.hallOfFameLastNumber == 1
|
||||
totalsec = $stats.time_to_enter_hall_of_fame.to_i
|
||||
else
|
||||
totalsec = $stats.play_time.to_i
|
||||
end
|
||||
hour = totalsec / 60 / 60
|
||||
min = totalsec / 60 % 60
|
||||
pubid = sprintf("%05d", $player.public_ID)
|
||||
lefttext = _INTL("Name<r>{1}<br>", $player.name)
|
||||
lefttext += _INTL("IDNo.<r>{1}<br>", pubid)
|
||||
lefttext += _ISPRINTF("Time<r>{1:02d}:{2:02d}<br>", hour, min)
|
||||
lefttext += _INTL("ID No.<r>{1}<br>", pubid)
|
||||
if hour > 0
|
||||
lefttext += _INTL("Time<r>{1}h {2}m<br>", hour, min)
|
||||
else
|
||||
lefttext += _INTL("Time<r>{1}m<br>", min)
|
||||
end
|
||||
lefttext += _INTL("Pokédex<r>{1}/{2}<br>",
|
||||
$player.pokedex.owned_count, $player.pokedex.seen_count)
|
||||
@sprites["messagebox"] = Window_AdvancedTextPokemon.new(lefttext)
|
||||
@@ -315,7 +323,7 @@ class HallOfFame_Scene
|
||||
[pokename, Graphics.width - 192, Graphics.height - 74, 2, BASECOLOR, SHADOWCOLOR],
|
||||
[_INTL("Lv. {1}", pokemon.egg? ? "?" : pokemon.level),
|
||||
64, Graphics.height - 42, 0, BASECOLOR, SHADOWCOLOR],
|
||||
[_INTL("IDNo.{1}", pokemon.egg? ? "?????" : idno),
|
||||
[_INTL("ID No. {1}", pokemon.egg? ? "?????" : idno),
|
||||
Graphics.width - 192, Graphics.height - 42, 2, BASECOLOR, SHADOWCOLOR]
|
||||
]
|
||||
if hallNumber > -1
|
||||
|
||||
@@ -769,7 +769,7 @@ MenuHandlers.add(:pokemon_debug_menu, :species_and_form, {
|
||||
form_name = sprintf("%d: %s", sp.form, form_name)
|
||||
formcmds[0].push(sp.form)
|
||||
formcmds[1].push(form_name)
|
||||
cmd2 = sp.form if pkmn.form == sp.form
|
||||
cmd2 = formcmds[0].length - 1 if pkmn.form == sp.form
|
||||
end
|
||||
if formcmds[0].length <= 1
|
||||
screen.pbDisplay(_INTL("Species {1} only has one form.", pkmn.speciesName))
|
||||
|
||||
Reference in New Issue
Block a user