mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-07 21:24:59 +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
|
end
|
||||||
|
|
||||||
def set_time_to_hall_of_fame
|
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
|
end
|
||||||
|
|
||||||
def play_time_per_session
|
def play_time_per_session
|
||||||
|
|||||||
@@ -255,8 +255,6 @@ class Battle::Battler
|
|||||||
@battle.pbShowAbilitySplash(self, true)
|
@battle.pbShowAbilitySplash(self, true)
|
||||||
@battle.pbHideAbilitySplash(self)
|
@battle.pbHideAbilitySplash(self)
|
||||||
pbChangeForm(newForm, _INTL("{1} deactivated!", abilityName))
|
pbChangeForm(newForm, _INTL("{1} deactivated!", abilityName))
|
||||||
elsif !endOfRound
|
|
||||||
@battle.pbDisplay(_INTL("{1} deactivated!", abilityName))
|
|
||||||
end
|
end
|
||||||
elsif @form < 7 # Turn into Core form
|
elsif @form < 7 # Turn into Core form
|
||||||
@battle.pbShowAbilitySplash(self, true)
|
@battle.pbShowAbilitySplash(self, true)
|
||||||
|
|||||||
@@ -692,7 +692,10 @@ class Battle::Battler
|
|||||||
end
|
end
|
||||||
# HP-healing held items (checks all battlers rather than just targets
|
# HP-healing held items (checks all battlers rather than just targets
|
||||||
# because Flame Burst's splash damage affects non-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
|
# Animate battlers fainting (checks all battlers rather than just targets
|
||||||
# because Flame Burst's splash damage affects non-targets)
|
# because Flame Burst's splash damage affects non-targets)
|
||||||
@battle.pbPriority(true).each { |b| b.pbFaint if b&.fainted? }
|
@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 tramplesMinimize?; return @flags.any? { |f| f[/^TramplesMinimize$/i] }; end
|
||||||
|
|
||||||
def nonLethal?(_user, _target); return false; end # For False Swipe
|
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
|
def ignoresSubstitute?(user) # user is the Pokémon using this move
|
||||||
if Settings::MECHANICS_GENERATION >= 6
|
if Settings::MECHANICS_GENERATION >= 6
|
||||||
|
|||||||
@@ -375,6 +375,11 @@ end
|
|||||||
# User consumes target's berry and gains its effect. (Bug Bite, Pluck)
|
# User consumes target's berry and gains its effect. (Bug Bite, Pluck)
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
class Battle::Move::UserConsumeTargetBerry < Battle::Move
|
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)
|
def pbEffectAfterAllHits(user, target)
|
||||||
return if user.fainted? || target.fainted?
|
return if user.fainted? || target.fainted?
|
||||||
return if target.damageState.unaffected || target.damageState.substitute
|
return if target.damageState.unaffected || target.damageState.substitute
|
||||||
|
|||||||
@@ -275,13 +275,21 @@ class HallOfFame_Scene
|
|||||||
end
|
end
|
||||||
|
|
||||||
def writeTrainerData
|
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
|
hour = totalsec / 60 / 60
|
||||||
min = totalsec / 60 % 60
|
min = totalsec / 60 % 60
|
||||||
pubid = sprintf("%05d", $player.public_ID)
|
pubid = sprintf("%05d", $player.public_ID)
|
||||||
lefttext = _INTL("Name<r>{1}<br>", $player.name)
|
lefttext = _INTL("Name<r>{1}<br>", $player.name)
|
||||||
lefttext += _INTL("ID No.<r>{1}<br>", pubid)
|
lefttext += _INTL("ID No.<r>{1}<br>", pubid)
|
||||||
lefttext += _ISPRINTF("Time<r>{1:02d}:{2:02d}<br>", hour, min)
|
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>",
|
lefttext += _INTL("Pokédex<r>{1}/{2}<br>",
|
||||||
$player.pokedex.owned_count, $player.pokedex.seen_count)
|
$player.pokedex.owned_count, $player.pokedex.seen_count)
|
||||||
@sprites["messagebox"] = Window_AdvancedTextPokemon.new(lefttext)
|
@sprites["messagebox"] = Window_AdvancedTextPokemon.new(lefttext)
|
||||||
|
|||||||
@@ -769,7 +769,7 @@ MenuHandlers.add(:pokemon_debug_menu, :species_and_form, {
|
|||||||
form_name = sprintf("%d: %s", sp.form, form_name)
|
form_name = sprintf("%d: %s", sp.form, form_name)
|
||||||
formcmds[0].push(sp.form)
|
formcmds[0].push(sp.form)
|
||||||
formcmds[1].push(form_name)
|
formcmds[1].push(form_name)
|
||||||
cmd2 = sp.form if pkmn.form == sp.form
|
cmd2 = formcmds[0].length - 1 if pkmn.form == sp.form
|
||||||
end
|
end
|
||||||
if formcmds[0].length <= 1
|
if formcmds[0].length <= 1
|
||||||
screen.pbDisplay(_INTL("Species {1} only has one form.", pkmn.speciesName))
|
screen.pbDisplay(_INTL("Species {1} only has one form.", pkmn.speciesName))
|
||||||
|
|||||||
Reference in New Issue
Block a user