Moved battle music filenames to Settings, improved PluginManager's version comparer, removed player bump animation, fixed No Guard not applying to OHKO moves, can reuse the same Repel item quicker

This commit is contained in:
Maruno17
2025-01-22 23:02:34 +00:00
parent db2df5c8b4
commit 6f37cb7e33
16 changed files with 130 additions and 73 deletions

View File

@@ -608,6 +608,9 @@ class Battle::Battler
user.effects[PBEffects::LockOnPos] == target.index
# Toxic
return true if move.pbOverrideSuccessCheckPerHit(user, target)
# No Guard
return true if user.hasActiveAbility?(:NOGUARD) ||
target.hasActiveAbility?(:NOGUARD)
# Semi-invulnerable target
return false if target.damageState.invulnerable
# Called by another move

View File

@@ -448,7 +448,7 @@ class Battle::Scene
return nil if ANIMATION_DEFAULTS.include?(wanted_move) # No need to check for these animations twice
end
# Use Tackle or Defense Curl's animation
if target_data.num_targets == 0 && target.data.id != :None
if target_data.num_targets == 0 && target_data.id != :None
return find_move_animation_for_move(ANIMATION_DEFAULTS[1], 0, user_index)
end
return find_move_animation_for_move(ANIMATION_DEFAULTS[0], 0, user_index)
@@ -593,7 +593,7 @@ class Battle::Scene
def pbCommonAnimation(anim_name, user = nil, target = nil)
return if nil_or_empty?(anim_name)
# Find an animation to play (new format or old format)
anims = try_get_better_common_animation(anim_name, user.index)
anims = try_get_better_common_animation(anim_name, user&.index)
return if !anims
# Play a new format animation
if anims.is_a?(Array)

View File

@@ -144,7 +144,7 @@ class Battle::AI
:STICKYHOLD, :SUPERLUCK, :UNNERVE, :WIMPOUT],
2 => [:BATTLEARMOR, :COLORCHANGE, :CUTECHARM, :DAMP, :GRASSPELT,
:HUNGERSWITCH, :INNERFOCUS, :LEAFGUARD, :LIGHTMETAL, :MIMICRY,
:OBLIVIOUS, :POWERSPOT, :PROPELLORTAIL, :PUNKROCK, :SHELLARMOR,
:OBLIVIOUS, :POWERSPOT, :PROPELLERTAIL, :PUNKROCK, :SHELLARMOR,
:STALWART, :STEADFAST, :STEELYSPIRIT, :SUCTIONCUPS, :TANGLEDFEET,
:WANDERINGSPIRIT, :WEAKARMOR],
1 => [:BIGPECKS, :KEENEYE, :MAGMAARMOR, :PICKUP, :RIVALRY, :STENCH],