From a6c092a574025c2535b9570e2bc2c8211d5cb76a Mon Sep 17 00:00:00 2001 From: Maruno17 Date: Wed, 29 Dec 2021 22:13:18 +0000 Subject: [PATCH] Abilities that hasten egg hatching now have a flag in abilities.txt for this effect --- .../016_UI/001_Non-interactive UI/003_UI_EggHatching.rb | 4 ++-- PBS/Gen 5/abilities.txt | 2 ++ PBS/Gen 7/abilities.txt | 2 ++ PBS/Gen 8/abilities.txt | 3 +++ PBS/abilities.txt | 3 +++ 5 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Data/Scripts/016_UI/001_Non-interactive UI/003_UI_EggHatching.rb b/Data/Scripts/016_UI/001_Non-interactive UI/003_UI_EggHatching.rb index 3ab0a8377..cbbede2e5 100644 --- a/Data/Scripts/016_UI/001_Non-interactive UI/003_UI_EggHatching.rb +++ b/Data/Scripts/016_UI/001_Non-interactive UI/003_UI_EggHatching.rb @@ -221,8 +221,8 @@ Events.onStepTaken += proc { |_sender, _e| $player.party.each do |egg| next if egg.steps_to_hatch <= 0 egg.steps_to_hatch -= 1 - $player.pokemon_party.each do |i| - next if ![:FLAMEBODY, :MAGMAARMOR, :STEAMENGINE].include?(i.ability_id) + $player.pokemon_party.each do |pkmn| + next if !pkmn.ability&.has_flag?("FasterEggHatching") egg.steps_to_hatch -= 1 break end diff --git a/PBS/Gen 5/abilities.txt b/PBS/Gen 5/abilities.txt index 164296ae0..cdad3e64a 100644 --- a/PBS/Gen 5/abilities.txt +++ b/PBS/Gen 5/abilities.txt @@ -158,6 +158,7 @@ Description = The Pokémon is protected from flinching. #------------------------------- [MAGMAARMOR] Name = Magma Armor +Flags = FasterEggHatching Description = Prevents the Pokémon from becoming frozen. #------------------------------- [WATERVEIL] @@ -194,6 +195,7 @@ Description = The Pokémon awakens quickly from sleep. #------------------------------- [FLAMEBODY] Name = Flame Body +Flags = FasterEggHatching Description = Contact with the Pokémon may burn the attacker. #------------------------------- [RUNAWAY] diff --git a/PBS/Gen 7/abilities.txt b/PBS/Gen 7/abilities.txt index ca6eafe9a..82d259692 100644 --- a/PBS/Gen 7/abilities.txt +++ b/PBS/Gen 7/abilities.txt @@ -158,6 +158,7 @@ Description = The Pokémon is protected from flinching. #------------------------------- [MAGMAARMOR] Name = Magma Armor +Flags = FasterEggHatching Description = Prevents the Pokémon from becoming frozen. #------------------------------- [WATERVEIL] @@ -194,6 +195,7 @@ Description = The Pokémon awakens quickly from sleep. #------------------------------- [FLAMEBODY] Name = Flame Body +Flags = FasterEggHatching Description = Contact with the Pokémon may burn the attacker. #------------------------------- [RUNAWAY] diff --git a/PBS/Gen 8/abilities.txt b/PBS/Gen 8/abilities.txt index aab3bac71..5af587cb2 100644 --- a/PBS/Gen 8/abilities.txt +++ b/PBS/Gen 8/abilities.txt @@ -158,6 +158,7 @@ Description = The Pokémon is protected from flinching. #------------------------------- [MAGMAARMOR] Name = Magma Armor +Flags = FasterEggHatching Description = Prevents the Pokémon from becoming frozen. #------------------------------- [WATERVEIL] @@ -194,6 +195,7 @@ Description = The Pokémon awakens quickly from sleep. #------------------------------- [FLAMEBODY] Name = Flame Body +Flags = FasterEggHatching Description = Contact with the Pokémon may burn the attacker. #------------------------------- [RUNAWAY] @@ -970,6 +972,7 @@ Description = This Pokémon's moves cannot be redirected. #------------------------------- [STEAMENGINE] Name = Steam Engine +Flags = FasterEggHatching Description = Boosts Speed drastically if hit by a Fire or Water move. #------------------------------- [PUNKROCK] diff --git a/PBS/abilities.txt b/PBS/abilities.txt index aab3bac71..5af587cb2 100644 --- a/PBS/abilities.txt +++ b/PBS/abilities.txt @@ -158,6 +158,7 @@ Description = The Pokémon is protected from flinching. #------------------------------- [MAGMAARMOR] Name = Magma Armor +Flags = FasterEggHatching Description = Prevents the Pokémon from becoming frozen. #------------------------------- [WATERVEIL] @@ -194,6 +195,7 @@ Description = The Pokémon awakens quickly from sleep. #------------------------------- [FLAMEBODY] Name = Flame Body +Flags = FasterEggHatching Description = Contact with the Pokémon may burn the attacker. #------------------------------- [RUNAWAY] @@ -970,6 +972,7 @@ Description = This Pokémon's moves cannot be redirected. #------------------------------- [STEAMENGINE] Name = Steam Engine +Flags = FasterEggHatching Description = Boosts Speed drastically if hit by a Fire or Water move. #------------------------------- [PUNKROCK]