Merge branch 'dev' into ai

This commit is contained in:
Maruno17
2023-02-05 19:10:25 +00:00
208 changed files with 3123 additions and 3331 deletions

View File

@@ -1,3 +1,6 @@
#===============================================================================
#
#===============================================================================
module MultipleForms
@@formSpecies = SpeciesHandlerHash.new
@@ -32,8 +35,9 @@ module MultipleForms
end
end
#===============================================================================
#
#===============================================================================
def drawSpot(bitmap, spotpattern, x, y, red, green, blue)
height = spotpattern.length
width = spotpattern[0].length
@@ -41,8 +45,8 @@ def drawSpot(bitmap, spotpattern, x, y, red, green, blue)
spot = spotpattern[yy]
width.times do |xx|
next if spot[xx] != 1
xOrg = (x + xx) << 1
yOrg = (y + yy) << 1
xOrg = (x + xx) * 2
yOrg = (y + yy) * 2
color = bitmap.get_pixel(xOrg, yOrg)
r = color.red + red
g = color.green + green
@@ -59,6 +63,7 @@ def drawSpot(bitmap, spotpattern, x, y, red, green, blue)
end
def pbSpindaSpots(pkmn, bitmap)
# NOTE: These spots are doubled in size when drawing them.
spot1 = [
[0, 0, 1, 1, 1, 1, 0, 0],
[0, 1, 1, 1, 1, 1, 1, 0],
@@ -119,6 +124,8 @@ def pbSpindaSpots(pkmn, bitmap)
c = (id >> 8) & 15
b = (id >> 4) & 15
a = (id) & 15
# NOTE: The coordinates below (b + 33, a + 25 and so on) are doubled when
# drawing the spot.
if pkmn.shiny?
drawSpot(bitmap, spot1, b + 33, a + 25, -75, -10, -150)
drawSpot(bitmap, spot2, d + 21, c + 24, -75, -10, -150)
@@ -260,9 +267,7 @@ MultipleForms.register(:ROTOM, {
MultipleForms.register(:GIRATINA, {
"getForm" => proc { |pkmn|
next 1 if pkmn.hasItem?(:GRISEOUSORB)
if $game_map && $game_map.metadata&.has_flag?("DistortionWorld")
next 1
end
next 1 if $game_map&.metadata&.has_flag?("DistortionWorld")
next 0
}
})
@@ -723,7 +728,6 @@ MultipleForms.register(:CALYREX, {
}
})
#===============================================================================
# Regional forms
# This code is for determining the form of a Pokémon in an egg created at the

View File

@@ -1,17 +1,15 @@
=begin
All types except Shadow have Shadow as a weakness.
Shadow has Shadow as a resistance.
On a side note, the Shadow moves in Colosseum will not be affected by Weaknesses
or Resistances, while in XD the Shadow-type is Super-Effective against all other
types.
2/5 - display nature
XD - Shadow Rush -- 55, 100 - Deals damage.
Colosseum - Shadow Rush -- 90, 100
If this attack is successful, user loses half of HP lost by opponent due to this
attack (recoil). If user is in Hyper Mode, this attack has a good chance for a
critical hit.
=end
# All types except Shadow have Shadow as a weakness.
# Shadow has Shadow as a resistance.
# On a side note, the Shadow moves in Colosseum will not be affected by
# Weaknesses or Resistances, while in XD the Shadow-type is Super-Effective
# against all other types.
# 2/5 - display nature
#
# XD - Shadow Rush -- 55, 100 - Deals damage.
# Colosseum - Shadow Rush -- 90, 100
# If this attack is successful, user loses half of HP lost by opponent due to
# this attack (recoil). If user is in Hyper Mode, this attack has a good chance
# for a critical hit.
#===============================================================================
# Purify a Shadow Pokémon.
@@ -59,14 +57,11 @@ def pbPurify(pkmn, scene)
end
end
#===============================================================================
# Relic Stone scene.
#===============================================================================
class RelicStoneScene
def pbPurify
end
def pbPurify; end
def pbUpdate
pbUpdateSpriteHash(@sprites)
@@ -105,8 +100,9 @@ class RelicStoneScene
end
end
#===============================================================================
#
#===============================================================================
class RelicStoneScreen
def initialize(scene)
@scene = scene
@@ -132,20 +128,19 @@ class RelicStoneScreen
end
end
#===============================================================================
#
#===============================================================================
def pbRelicStoneScreen(pkmn)
retval = true
pbFadeOutIn {
pbFadeOutIn do
scene = RelicStoneScene.new
screen = RelicStoneScreen.new(scene)
retval = screen.pbStartScreen(pkmn)
}
end
return retval
end
#===============================================================================
#
#===============================================================================
@@ -164,8 +159,6 @@ def pbRelicStone
end
end
#===============================================================================
# Shadow Pokémon in battle.
#===============================================================================
@@ -184,15 +177,14 @@ class Battle
end
end
#===============================================================================
#
#===============================================================================
class Battle::Battler
alias __shadow__pbInitPokemon pbInitPokemon unless method_defined?(:__shadow__pbInitPokemon)
def pbInitPokemon(*arg)
if self.pokemonIndex > 0 && inHyperMode?
self.pokemon.hyper_mode = false
end
self.pokemon.hyper_mode = false if self.pokemonIndex > 0 && inHyperMode?
__shadow__pbInitPokemon(*arg)
# Called into battle
if shadowPokemon?
@@ -228,8 +220,6 @@ class Battle::Battler
end
end
#===============================================================================
# Shadow item effects.
#===============================================================================
@@ -333,8 +323,6 @@ ItemHandlers::BattleUseOnPokemon.add(:VIVIDSCENT, proc { |item, pokemon, battler
next true
})
#===============================================================================
# Two turn attack. On first turn, halves the HP of all active Pokémon.
# Skips second turn (if successful). (Shadow Half)
@@ -359,8 +347,6 @@ class Battle::Move::AllBattlersLoseHalfHPUserSkipsNextTurn < Battle::Move
end
end
#===============================================================================
# User takes recoil damage equal to 1/2 of its current HP. (Shadow End)
#===============================================================================
@@ -380,8 +366,6 @@ class Battle::Move::UserLosesHalfHP < Battle::Move::RecoilMove
end
end
#===============================================================================
# Starts shadow weather. (Shadow Sky)
#===============================================================================
@@ -392,8 +376,6 @@ class Battle::Move::StartShadowSkyWeather < Battle::Move::WeatherMove
end
end
#===============================================================================
# Ends the effects of Light Screen, Reflect and Safeguard on both sides.
# (Shadow Shed)
@@ -425,8 +407,6 @@ class Battle::Move::RemoveAllScreensAndSafeguard < Battle::Move
end
end
#===============================================================================
#
#===============================================================================
@@ -434,8 +414,9 @@ class Game_Temp
attr_accessor :party_heart_gauges_before_battle
end
#===============================================================================
#
#===============================================================================
# Record current heart gauges of Pokémon in party, to see if they drop to zero
# during battle and need to say they're ready to be purified afterwards
EventHandlers.add(:on_start_battle, :record_party_heart_gauges,

View File

@@ -77,8 +77,6 @@ class PokemonSprite < Sprite
end
end
#===============================================================================
# Pokémon icon (for defined Pokémon)
#===============================================================================
@@ -212,8 +210,6 @@ class PokemonIconSprite < Sprite
end
end
#===============================================================================
# Pokémon icon (for species)
#===============================================================================

View File

@@ -1,3 +1,6 @@
#===============================================================================
#
#===============================================================================
class PokemonBox
attr_reader :pokemon
attr_accessor :name
@@ -49,8 +52,9 @@ class PokemonBox
end
end
#===============================================================================
#
#===============================================================================
class PokemonStorage
attr_reader :boxes
attr_accessor :currentBox
@@ -259,8 +263,6 @@ class PokemonStorage
end
end
#===============================================================================
# Regional Storage scripts
#===============================================================================
@@ -282,9 +284,7 @@ class RegionalStorage
if @rgnmap < 0
raise _INTL("The current map has no region set. Please set the MapPosition metadata setting for this map.")
end
if !@storages[@rgnmap]
@storages[@rgnmap] = PokemonStorage.new
end
@storages[@rgnmap] = PokemonStorage.new if !@storages[@rgnmap]
return @storages[@rgnmap]
end
@@ -369,8 +369,6 @@ class RegionalStorage
end
end
#===============================================================================
#
#===============================================================================