mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-11-03 00:06:01 +00:00
Release 6.9.0
This commit is contained in:
Vendored
BIN
Binary file not shown.
Generated
+8
@@ -0,0 +1,8 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Datasource local storage ignored files
|
||||
/../../../../../../../../../../../:\Users\charl\Documents\Jeux\rpgmaker\infinitefusion\dev\infinitefusion-e18\Data\.idea/dataSources/
|
||||
/dataSources.local.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Vendored
BIN
Binary file not shown.
@@ -0,0 +1,2 @@
|
||||
.idea
|
||||
LocalSettings.rb
|
||||
@@ -5,14 +5,15 @@
|
||||
#==============================================================================#
|
||||
module Settings
|
||||
# The version of your game. It has to adhere to the MAJOR.MINOR.PATCH format.
|
||||
GAME_VERSION_NUMBER = "6.8.3"
|
||||
LATEST_GAME_RELEASE = "6.8"
|
||||
GAME_VERSION_NUMBER = "6.9"
|
||||
LATEST_GAME_RELEASE = "6.9.0"
|
||||
|
||||
HOENN_VERSION_NUMBER = "1.1.0"
|
||||
HOENN_LATEST_GAME_RELEASE = "1.1.0"
|
||||
HOENN_VERSION_NUMBER = "1.3"
|
||||
HOENN_LATEST_GAME_RELEASE = "1.2.0"
|
||||
|
||||
SNOW_DAY = false
|
||||
SNOW_DAY = true
|
||||
|
||||
EXPERIMENTAL_FEATURES = false
|
||||
KANTO = GAME_ID == :IF_KANTO
|
||||
HOENN = GAME_ID == :IF_HOENN
|
||||
|
||||
@@ -36,7 +37,7 @@ module Settings
|
||||
ANIMATE_REFLECTIONS = false # GAME_ID == :IF_HOENN #true
|
||||
USE_REFLECTIONS = false
|
||||
# Infinite fusion settings
|
||||
NB_POKEMON = 576
|
||||
NB_POKEMON = 582
|
||||
TRANSFER_BOX_DISCLAIMER_MESSAGE = ""
|
||||
CUSTOM_BASE_SPRITES_FOLDER = "Graphics/CustomBattlers/local_sprites/BaseSprites/"
|
||||
CUSTOM_BATTLERS_FOLDER = "Graphics/CustomBattlers/"
|
||||
@@ -47,9 +48,13 @@ module Settings
|
||||
DOWNLOADED_SPRITES_FOLDER = "Graphics/temp/"
|
||||
DEFAULT_SPRITE_PATH = "Graphics/Battlers/Special/000.png"
|
||||
CREDITS_FILE_PATH = "Data/sprites/Sprite_Credits.csv"
|
||||
|
||||
VERSION_FILE_PATH = "Data/VERSION"
|
||||
CUSTOM_SPRITES_FILE_PATH = "Data/sprites/CUSTOM_SPRITES"
|
||||
BASE_SPRITES_FILE_PATH = "Data/sprites/BASE_SPRITES"
|
||||
REFERENCES_FILE_PATH = "Data/sprites/SELECTED_REFERENCES"
|
||||
|
||||
|
||||
CUSTOM_DEX_ENTRIES_PATH = "Data/pokedex/dex.json"
|
||||
AI_DEX_ENTRIES_PATH = "Data/pokedex/generated_entries.json"
|
||||
POKEDEX_ENTRIES_PATH = "Data/pokedex/all_entries.json"
|
||||
@@ -115,11 +120,6 @@ module Settings
|
||||
WIKI_URL = "https://infinitefusion.fandom.com/"
|
||||
FAQ_URL = "https://hackmd.io/@PIF-Staff/PIF-Hoenn-FAQ"
|
||||
|
||||
AI_ENTRIES_URL = "https://ai-entries.pkmninfinitefusion.workers.dev/"
|
||||
AI_ENTRIES_RATE_MAX_NB_REQUESTS = 10 # Nb. requests allowed in each time window
|
||||
AI_ENTRIES_RATE_TIME_WINDOW = 120 # In seconds
|
||||
AI_ENTRIES_RATE_LOG_FILE = 'Data/pokedex/dex_rate_limit.log' # Path to the log file
|
||||
|
||||
CUSTOMSPRITES_RATE_MAX_NB_REQUESTS = 15 # Nb. requests allowed in each time window
|
||||
CUSTOMSPRITES_ENTRIES_RATE_TIME_WINDOW = 120 # In seconds
|
||||
CUSTOMSPRITES_RATE_LOG_FILE = 'Data/sprites/sprites_rate_limit.log' # Path to the log file
|
||||
@@ -279,7 +279,7 @@ module Settings
|
||||
#=============================================================================
|
||||
|
||||
# The number of steps allowed before a Safari Zone game is over (0=infinite).
|
||||
SAFARI_STEPS = 600
|
||||
SAFARI_STEPS = Settings::KANTO ? 600 : -1
|
||||
# The number of seconds a Bug Catching Contest lasts for (0=infinite).
|
||||
BUG_CONTEST_TIME = 20 * 60 # 20 minutes
|
||||
|
||||
@@ -312,7 +312,7 @@ module Settings
|
||||
BADGE_FOR_FLY = 3
|
||||
BADGE_FOR_STRENGTH = 5
|
||||
BADGE_FOR_DIVE = 9
|
||||
BADGE_FOR_WATERFALL = 9
|
||||
BADGE_FOR_WATERFALL = 10
|
||||
BADGE_FOR_TELEPORT = 1
|
||||
BADGE_FOR_BOUNCE = 8
|
||||
BADGE_FOR_ROCKCLIMB = 16
|
||||
@@ -562,6 +562,8 @@ module Settings
|
||||
ANGRY_ANIMATION_ID = 24
|
||||
ANGRY_SHORT_ANIMATION_ID = 34
|
||||
|
||||
STEAM_ANIMATION = 38
|
||||
|
||||
FUSE_ANIMATION_ID = 33
|
||||
|
||||
# ID of the animation played when a patch of grass rustles due to using the
|
||||
@@ -584,6 +586,7 @@ module Settings
|
||||
CUT_TREE_ANIMATION_ID = 19
|
||||
ROCK_SMASH_ANIMATION_ID = 20
|
||||
|
||||
ANIMATION_OW_ATTACK = 14
|
||||
#=============================================================================
|
||||
|
||||
# An array of available languages in the game, and their corresponding message
|
||||
@@ -591,15 +594,17 @@ module Settings
|
||||
# from.
|
||||
LANGUAGES = {
|
||||
:IF_KANTO => [
|
||||
["English", "english.dat"],
|
||||
["Français", "french.dat"],
|
||||
["中文", "chinese.dat"]
|
||||
["English", "english.dat", :ENGLISH],
|
||||
["Français", "french.dat", :FRENCH],
|
||||
["Français (Québec)", "french.dat", :FRENCH_QC],
|
||||
["中文", "chinese.dat", :CHINESE]
|
||||
],
|
||||
:IF_HOENN => [
|
||||
["English", "english.dat"],
|
||||
["Français", "french.dat"],
|
||||
#["Español", "spanish.dat"],
|
||||
["中文", "chinese.dat"]
|
||||
["English", "english.dat", :ENGLISH],
|
||||
["Français", "french.dat",:FRENCH],
|
||||
["Français (Québec)", "french.dat", :FRENCH_QC],
|
||||
#["Español", "spanish.dat", :SPANISH],
|
||||
["中文", "chinese.dat", :CHINESE]
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,22 @@ module Encryption
|
||||
ENCRYPTION_KEY = [0x4A, 0x8F, 0x2C, 0xE1, 0x73, 0xB5, 0x96, 0x0D,
|
||||
0x5E, 0xA2, 0x3F, 0xC7, 0x81, 0x14, 0x6B, 0xD9]
|
||||
|
||||
CHUNK_SIZE = 1 << 20
|
||||
|
||||
def self.xor(data)
|
||||
data.bytes.each_with_index.map { |b, i| b ^ ENCRYPTION_KEY[i % ENCRYPTION_KEY.length] }.pack("C*")
|
||||
key = ENCRYPTION_KEY.pack("C*")
|
||||
@full_chunk_key ||= (key * (CHUNK_SIZE / key.length)).unpack1("H*").to_i(16)
|
||||
full_chunk_key = @full_chunk_key
|
||||
result = String.new(capacity: data.bytesize, encoding: Encoding::BINARY)
|
||||
offset = 0
|
||||
while offset < data.bytesize
|
||||
chunk = data.byteslice(offset, CHUNK_SIZE)
|
||||
size = chunk.bytesize
|
||||
chunk_key = size == CHUNK_SIZE ? full_chunk_key : (key * (size / key.length + 1)).byteslice(0, size).unpack1("H*").to_i(16)
|
||||
xored = chunk.unpack1("H*").to_i(16) ^ chunk_key
|
||||
result << [xored.to_s(16).rjust(size * 2, "0")].pack("H*")
|
||||
offset += CHUNK_SIZE
|
||||
end
|
||||
return result
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -39,7 +39,7 @@ end
|
||||
module Kernel
|
||||
def echo(string)
|
||||
return unless $DEBUG
|
||||
printf(string.is_a?(String) ? string : string.inspect)
|
||||
printf("%s", string.is_a?(String) ? string : string.inspect)
|
||||
end
|
||||
|
||||
def echoln(string)
|
||||
|
||||
@@ -1,11 +1,20 @@
|
||||
def pbAddScriptTexts(items, script)
|
||||
script.force_encoding(Encoding::UTF_8)
|
||||
|
||||
script.scan(/(?:_I|sign)\s*\(\s*\"((?:[^\\\"]*\\\"?)*[^\"]*)\"/) do |s|
|
||||
string = s[0]
|
||||
string.gsub!(/\\\"/, "\"")
|
||||
string.gsub!(/\\\\/, "\\")
|
||||
items.push(string)
|
||||
end
|
||||
|
||||
# extract pbTrainerBattle(..., "TrainerName", "LoseText", ...) in PIF1
|
||||
script.scan(/pbTrainerBattle\s*\(\s*[^,]+,\s*"[^"]*"\s*,\s*"([^"]*)"/) do |s|
|
||||
string = s[0]
|
||||
string.gsub!(/\\\"/, "\"")
|
||||
string.gsub!(/\\\\/, "\\")
|
||||
items.push(string)
|
||||
end
|
||||
end
|
||||
|
||||
def pbAddRgssScriptTexts(items, script)
|
||||
@@ -509,7 +518,6 @@ class Messages
|
||||
end
|
||||
|
||||
def extract(outfile)
|
||||
# return if !@messages
|
||||
origMessages = Messages.new("Data/messages.dat")
|
||||
File.open(outfile, "wb") { |f|
|
||||
f.write(0xef.chr)
|
||||
@@ -517,12 +525,18 @@ class Messages
|
||||
f.write(0xbf.chr)
|
||||
f.write("# To localize this text for a particular language, please\r\n")
|
||||
f.write("# translate every second line of this file.\r\n")
|
||||
if origMessages.messages[0]
|
||||
for i in 0...origMessages.messages[0].length
|
||||
msgs = origMessages.messages[0][i]
|
||||
|
||||
# Map messages use the newly collected messages in @messages.
|
||||
# This includes text extracted from map events, such as
|
||||
# pbTrainerBattle(..., "Trainer", "LoseText", ...).
|
||||
if @messages && @messages[0]
|
||||
for i in 0...@messages[0].length
|
||||
msgs = @messages[0][i]
|
||||
Messages.writeObject(f, msgs, "Map#{i}", origMessages)
|
||||
end
|
||||
end
|
||||
|
||||
# Keep the original behavior for non-map message sections.
|
||||
for i in 1...origMessages.messages.length
|
||||
msgs = origMessages.messages[i]
|
||||
Messages.writeObject(f, msgs, i, origMessages)
|
||||
@@ -534,7 +548,7 @@ class Messages
|
||||
@messages = [] if !@messages
|
||||
arr = []
|
||||
for i in 0...array.length
|
||||
arr[i] = (array[i]) ? array[i] : ""
|
||||
arr[i] = (array[i] == "") ? nil : array[i]
|
||||
end
|
||||
@messages[type] = arr
|
||||
end
|
||||
@@ -543,7 +557,8 @@ class Messages
|
||||
@messages = [] if !@messages
|
||||
arr = (@messages[type]) ? @messages[type] : []
|
||||
for i in 0...array.length
|
||||
arr[i] = (array[i]) ? array[i] : (arr[i]) ? arr[i] : ""
|
||||
arr[i] = array[i] if array[i]
|
||||
arr[i] = nil if arr[i] == ""
|
||||
end
|
||||
@messages[type] = arr
|
||||
end
|
||||
@@ -751,6 +766,10 @@ module MessageTypes
|
||||
@@messages.loadMessageFile(filename)
|
||||
end
|
||||
|
||||
def self.loadFallbackMessageFile(filename)
|
||||
@@messagesFallback.loadMessageFile(filename)
|
||||
end
|
||||
|
||||
def self.get(type, id)
|
||||
ret = @@messages.get(type, id)
|
||||
if ret == ""
|
||||
|
||||
@@ -8,18 +8,18 @@ module Input
|
||||
AUX1 = L
|
||||
AUX2 = R
|
||||
|
||||
unless defined?(update_KGC_ScreenCapture)
|
||||
class << Input
|
||||
alias update_KGC_ScreenCapture update
|
||||
end
|
||||
end
|
||||
# unless defined?(update_KGC_ScreenCapture)
|
||||
# class << Input
|
||||
# alias update_KGC_ScreenCapture update
|
||||
# end
|
||||
# end
|
||||
|
||||
def self.update
|
||||
update_KGC_ScreenCapture
|
||||
if trigger?(Input::F8)
|
||||
pbScreenCapture
|
||||
end
|
||||
end
|
||||
# def self.update
|
||||
# update_KGC_ScreenCapture
|
||||
# if trigger?(Input::F8)
|
||||
# pbScreenCapture
|
||||
# end
|
||||
# end
|
||||
end
|
||||
|
||||
module Mouse
|
||||
|
||||
@@ -128,6 +128,7 @@ class SpriteAnimation
|
||||
end
|
||||
|
||||
def effect?
|
||||
return false unless @_animation_duration
|
||||
return @_animation_duration > 0
|
||||
end
|
||||
|
||||
|
||||
@@ -126,6 +126,16 @@ module Game
|
||||
pokemon.exp_when_fused_body=nil
|
||||
pokemon.exp_gained_since_fused=nil
|
||||
pokemon.level = 5
|
||||
|
||||
if pokemon.original_body
|
||||
pokemon.original_body.level = 5
|
||||
pokemon.original_body.exp_gained_with_player = 0
|
||||
end
|
||||
|
||||
if pokemon.original_head
|
||||
pokemon.original_head.level = 5
|
||||
pokemon.original_head.exp_gained_with_player = 0
|
||||
end
|
||||
pokemon.pif_sprite =nil
|
||||
|
||||
pokemon.owner.id = $Trainer.id
|
||||
|
||||
@@ -145,10 +145,15 @@ class Scene_Map
|
||||
$game_temp.in_menu = true
|
||||
$game_player.straighten
|
||||
$game_map.update
|
||||
if $PokemonTemp.overworld_safari
|
||||
caught_pokemon_icons = displayCaughtPokemonIcons
|
||||
end
|
||||
|
||||
sscene = PokemonPauseMenu_Scene.new
|
||||
sscreen = PokemonPauseMenu.new(sscene)
|
||||
sscreen.pbStartPokemonMenu
|
||||
$game_temp.in_menu = false
|
||||
caught_pokemon_icons.dispose if $PokemonTemp.overworld_safari
|
||||
end
|
||||
|
||||
def call_debug
|
||||
|
||||
@@ -415,6 +415,7 @@ class Interpreter
|
||||
end
|
||||
|
||||
def pbPushThisBoulder
|
||||
pbSEPlay("strength")
|
||||
pbPushThisEvent if $PokemonMap.strengthUsed
|
||||
return true
|
||||
end
|
||||
|
||||
@@ -523,6 +523,14 @@ class Game_Map
|
||||
end
|
||||
end
|
||||
|
||||
def set_tile(x, y, layer, id = 0)
|
||||
self.data[x, y, layer] = id
|
||||
end
|
||||
|
||||
def erase_tile(x, y, layer)
|
||||
set_tile(x, y, layer, 0)
|
||||
end
|
||||
|
||||
def refresh
|
||||
for event in @events.values
|
||||
event.refresh
|
||||
|
||||
@@ -202,10 +202,10 @@ class PokemonMapFactory
|
||||
return true if thisEvent.through
|
||||
if thisEvent==$game_player
|
||||
if !($DEBUG && Input.press?(Input::CTRL))
|
||||
return false if !map.passableStrict?(x,y,0,thisEvent)
|
||||
return false if !map.playerPassable?(x,y,0,thisEvent)
|
||||
end
|
||||
else
|
||||
return false if !map.passableStrict?(x,y,0,thisEvent)
|
||||
return false if !map.playerPassable?(x,y,0,thisEvent)
|
||||
end
|
||||
for event in map.events.values
|
||||
next if event == thisEvent || !event.at_coordinate?(x, y)
|
||||
|
||||
@@ -23,6 +23,8 @@ class Game_Character
|
||||
attr_accessor :animation_id
|
||||
attr_accessor :transparent
|
||||
attr_reader :move_speed
|
||||
attr_accessor :move_speed_override
|
||||
|
||||
attr_accessor :walk_anime
|
||||
attr_writer :bob_height
|
||||
attr_accessor :under_everything # under even grass
|
||||
@@ -34,6 +36,8 @@ class Game_Character
|
||||
attr_accessor :shadow_offset
|
||||
attr_accessor :animation_speed
|
||||
attr_accessor :step_anime
|
||||
|
||||
attr_accessor :can_hop_cliff
|
||||
def initialize(map = nil)
|
||||
@map = map
|
||||
@id = 0
|
||||
@@ -89,6 +93,8 @@ class Game_Character
|
||||
@forced_bush_depth = nil
|
||||
@shadow_offset =0
|
||||
@animation_speed = nil #override if the animation speed needs to be different from move speed
|
||||
@move_speed_override = nil
|
||||
@can_hop_cliff = false
|
||||
end
|
||||
|
||||
def at_coordinate?(check_x, check_y)
|
||||
@@ -242,7 +248,7 @@ class Game_Character
|
||||
this_map = (self.map.valid?(@x, @y)) ? [self.map, @x, @y] : $MapFactory.getNewMap(@x, @y)
|
||||
if this_map[0].deepBush?(this_map[1], this_map[2]) && self.map.deepBush?(xbehind, ybehind)
|
||||
@bush_depth = Game_Map::TILE_HEIGHT
|
||||
elsif !moving? && this_map[0].bush?(this_map[1], this_map[2])
|
||||
elsif this_map[0].bush?(this_map[1], this_map[2])
|
||||
@bush_depth = 12
|
||||
else
|
||||
@bush_depth = 0
|
||||
@@ -690,6 +696,10 @@ class Game_Character
|
||||
@x += (dir == 4) ? -1 : (dir == 6) ? 1 : 0
|
||||
@y += (dir == 8) ? -1 : (dir == 2) ? 1 : 0
|
||||
increase_steps
|
||||
elsif @can_hop_cliff && (pbFacingTerrainTag.is_cliff || terrain_tag.is_cliff)
|
||||
@through = true
|
||||
jump_forward(1)
|
||||
@through = false
|
||||
else
|
||||
check_event_trigger_touch(dir)
|
||||
end
|
||||
@@ -1286,9 +1296,21 @@ class Game_Character
|
||||
@stopped_this_frame = false
|
||||
end
|
||||
|
||||
def play_step_animation(nb_times)
|
||||
return if @lock_pattern
|
||||
return if @step_anime_once
|
||||
@step_anime_once = true
|
||||
@step_animation_nb_times = nb_times
|
||||
@step_animation_current_time = 0
|
||||
@step_anime_once_frame_count = 0
|
||||
@old_step_anime = @step_anime
|
||||
@step_anime = true
|
||||
@pattern = 0
|
||||
@anime_count = 0
|
||||
end
|
||||
|
||||
def update_pattern
|
||||
return if @lock_pattern
|
||||
# return if @jump_count > 0 # Don't animate if jumping on the spot
|
||||
# Character has stopped moving, return to original pattern
|
||||
if @moved_last_frame && !@moved_this_frame && !@step_anime
|
||||
@pattern = @original_pattern
|
||||
@@ -1301,21 +1323,33 @@ class Game_Character
|
||||
@anime_count = 0
|
||||
return
|
||||
end
|
||||
# Calculate how many frames each pattern should display for, i.e. the time
|
||||
# it takes to move half a tile (or a whole tile if cycling). We assume the
|
||||
# game uses square tiles.
|
||||
# Calculate how many frames each pattern should display for
|
||||
real_speed = (jumping?) ? jump_speed_real : move_speed_real
|
||||
if @animation_speed
|
||||
base = Game_Map::REAL_RES_X / 2.0
|
||||
frames_per_pattern = base / @animation_speed
|
||||
else
|
||||
frames_per_pattern = Game_Map::REAL_RES_X / (real_speed * 2.0)
|
||||
frames_per_pattern *= 2 if move_speed >= 5 # Cycling speed or faster
|
||||
frames_per_pattern *= 2 if move_speed >= 5
|
||||
end
|
||||
return if @anime_count < frames_per_pattern
|
||||
# Advance to the next animation frame
|
||||
@pattern = (@pattern + 1) % 4
|
||||
@anime_count -= frames_per_pattern
|
||||
advance_step_animation_once if @step_anime_once
|
||||
end
|
||||
|
||||
def advance_step_animation_once
|
||||
@step_anime_once_frame_count += 1
|
||||
|
||||
total_frames = @step_animation_nb_times * 4
|
||||
if @step_anime_once_frame_count % 4 == 0
|
||||
@pattern = 0 #loop
|
||||
end
|
||||
return if @step_anime_once_frame_count < total_frames
|
||||
@pattern = 0
|
||||
@step_anime = @old_step_anime
|
||||
@step_anime_once = false
|
||||
end
|
||||
|
||||
# def distance_from_player
|
||||
@@ -1330,6 +1364,13 @@ class Game_Character
|
||||
return (dx + dy) - 1
|
||||
end
|
||||
|
||||
def distance_from_target(target)
|
||||
return Float::INFINITY if self.map_id != $game_map.map_id
|
||||
dx = (@x - target.x).abs
|
||||
dy = (@y - target.y).abs
|
||||
return (dx + dy) - 1
|
||||
end
|
||||
|
||||
def move_diagonal_freeform(distance_horizontal, distance_vertical, speed)
|
||||
real_dx = distance_horizontal * Game_Map::REAL_RES_X
|
||||
real_dy = distance_vertical * Game_Map::REAL_RES_Y
|
||||
|
||||
@@ -10,6 +10,8 @@ class Game_Event < Game_Character
|
||||
attr_reader :page
|
||||
attr_reader :on_bridge
|
||||
attr_accessor :refresh_hue
|
||||
attr_accessor :is_rival_following
|
||||
attr_accessor :forced_bush_depth
|
||||
|
||||
def initialize(map_id, event, map=nil)
|
||||
super(map)
|
||||
@@ -38,6 +40,9 @@ class Game_Event < Game_Character
|
||||
if @event.name[/forced_z\s*=\s*(-?\d+)/i]
|
||||
@forced_z = $1.to_i
|
||||
end
|
||||
if @event.name.include?("under_player")
|
||||
@under_player = true
|
||||
end
|
||||
if @event.name.include?("on_bridge")
|
||||
@on_bridge = true
|
||||
end
|
||||
@@ -45,6 +50,11 @@ class Game_Event < Game_Character
|
||||
refresh
|
||||
end
|
||||
|
||||
# def forced_bush_depth=(value)
|
||||
# @bush_depth = value
|
||||
# update
|
||||
# end
|
||||
|
||||
def through
|
||||
return true if @on_bridge && $PokemonGlobal.bridge <= 0
|
||||
return @through
|
||||
@@ -65,11 +75,23 @@ class Game_Event < Game_Character
|
||||
@starting = true if @list.size > 1
|
||||
end
|
||||
|
||||
def name=(value)
|
||||
@event.name = value
|
||||
end
|
||||
|
||||
def erase
|
||||
@erased = true
|
||||
refresh
|
||||
end
|
||||
|
||||
def despawn #Should only ever be called on dynamically created events
|
||||
erase
|
||||
$game_map.events.delete(@id)
|
||||
$PokemonTemp.tempEvents&.each { |_, events| events.delete(self) }
|
||||
$PokemonTemp.tempEvents&.delete_if { |_, v| v.empty? }
|
||||
end
|
||||
|
||||
|
||||
def erase_route
|
||||
@route_erased = true
|
||||
refresh
|
||||
@@ -236,6 +258,9 @@ class Game_Event < Game_Character
|
||||
@interpreter = nil
|
||||
return
|
||||
end
|
||||
if @forced_bush_depth && @page&.graphic&.character_name == "shadow_event" #hardcoded hack for ninjakids that hide in the water...
|
||||
@forced_bush_depth = false
|
||||
end
|
||||
@tile_id = @page.graphic.tile_id
|
||||
@character_name = @page.graphic.character_name
|
||||
@character_hue = @page.graphic.character_hue if @refresh_hue
|
||||
@@ -315,4 +340,8 @@ class Game_Event < Game_Character
|
||||
end
|
||||
|
||||
|
||||
def is_on_water
|
||||
return self.terrain_tag.can_surf
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -74,6 +74,8 @@ class Game_Player < Game_Character
|
||||
if $game_player.pbTerrainTag.ice
|
||||
reset_bike_speed
|
||||
self.move_speed = 4
|
||||
elsif $game_player.move_speed_override
|
||||
self.move_speed = $game_player.move_speed_override
|
||||
elsif !@move_route_forcing && $PokemonGlobal
|
||||
if $PokemonGlobal.bicycle
|
||||
self.move_speed = current_bicycle_speed
|
||||
|
||||
@@ -74,9 +74,7 @@ def moveFancy(follower,direction)
|
||||
newY = follower.y + deltaY
|
||||
# Move if new position is the player's, or the new position is passable,
|
||||
# or the current position is not passable
|
||||
if ($game_player.x==newX && $game_player.y==newY) ||
|
||||
pbTestPass(follower,newX,newY,0) ||
|
||||
!pbTestPass(follower,follower.x,follower.y,0)
|
||||
if can_move_to_new_position(newX,newY,follower)
|
||||
oldThrough=follower.through
|
||||
follower.through=true
|
||||
case direction
|
||||
@@ -89,6 +87,13 @@ def moveFancy(follower,direction)
|
||||
end
|
||||
end
|
||||
|
||||
def can_move_to_new_position(newX,newY, follower)
|
||||
return true if ($game_player.x==newX && $game_player.y==newY)
|
||||
return true if pbTestPass(follower,newX,newY,0)
|
||||
return true unless !pbTestPass(follower,follower.x,follower.y,0)
|
||||
return false
|
||||
end
|
||||
|
||||
# Same map only
|
||||
def jumpFancy(follower,direction,leader)
|
||||
deltaX=(direction == 6 ? 2 : (direction == 4 ? -2 : 0))
|
||||
|
||||
@@ -44,12 +44,11 @@ class BushBitmap
|
||||
ret = Bitmap.new(bitmap.width, bitmap.height)
|
||||
charheight = ret.height
|
||||
cy = charheight - depth - 2
|
||||
y = charheight
|
||||
if cy >= 0
|
||||
ret.blt(0, y, bitmap, Rect.new(0, y, ret.width, cy))
|
||||
ret.blt(0, y + cy, bitmap, Rect.new(0, y + cy, ret.width, 2), 170)
|
||||
ret.blt(0, 0, bitmap, Rect.new(0, 0, ret.width, cy))
|
||||
ret.blt(0, cy, bitmap, Rect.new(0, cy, ret.width, 2), 170)
|
||||
end
|
||||
ret.blt(0, y + cy + 2, bitmap, Rect.new(0, y + cy + 2, ret.width, 2), 85) if cy + 2 >= 0
|
||||
ret.blt(0, cy + 2, bitmap, Rect.new(0, cy + 2, ret.width, 2), 85) if cy + 2 >= 0
|
||||
return ret
|
||||
end
|
||||
end
|
||||
@@ -263,7 +262,8 @@ class Sprite_Character < RPG::Sprite
|
||||
self.bitmap = (@charbitmapAnimated) ? @charbitmap.bitmap : @charbitmap
|
||||
end
|
||||
else
|
||||
@bushbitmap = BushBitmap.new(@charbitmap, (@tile_id >= 384), bushdepth) if !@bushbitmap
|
||||
source = (@character == $game_player) ? getClothedPlayerSprite() : (@charbitmapAnimated ? @charbitmap.bitmap : @charbitmap)
|
||||
@bushbitmap = BushBitmap.new(source, (@tile_id >= 384), bushdepth) if !@bushbitmap
|
||||
self.bitmap = @bushbitmap.bitmap
|
||||
end
|
||||
self.visible = !@character.transparent
|
||||
|
||||
@@ -25,7 +25,7 @@ class Particle_Engine
|
||||
"flare" => Particle_Engine::Flare,
|
||||
"splash" => Particle_Engine::Splash,
|
||||
# By Peter O.
|
||||
"starteleport" => Particle_Engine::StarTeleport
|
||||
"starteleport" => Particle_Engine::StarTeleport,
|
||||
}
|
||||
end
|
||||
|
||||
@@ -373,14 +373,12 @@ end
|
||||
class Particle_Engine::Smoke < ParticleEffect_Event
|
||||
def initialize(event, viewport)
|
||||
super
|
||||
setParameters([0, 0, 0, 80, 20, 0.5, -64,
|
||||
Graphics.height, -64, Graphics.width, 0.5, 0.10, -5, -15, 5, 80])
|
||||
initParticles("smoke", 250)
|
||||
setParameters([0, 0, 0, 30, 20, 0.5, -64,
|
||||
Graphics.height, -64, Graphics.width, 0.5, 0.05, -5, -15, 5, 80])
|
||||
initParticles("smoke", 100)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
class Particle_Engine::Teleport < ParticleEffect_Event
|
||||
def initialize(event, viewport)
|
||||
super
|
||||
|
||||
@@ -201,6 +201,36 @@ class TilemapRenderer
|
||||
}
|
||||
}
|
||||
|
||||
#path: 276 -
|
||||
EMPTY_TILE = 0
|
||||
GROUND_SNOW_TILE = 418
|
||||
TILESET_SUPPORTING_SNOW_TREES = [1,2,5,7,8,9,12,13,15,34]
|
||||
SNOW_SUBSTITUTIONS = {
|
||||
#Trees
|
||||
864 =>868, 865=>869,
|
||||
872=>876, 873=>877,
|
||||
880=>884, 881=>885,
|
||||
866=>870, 867=>871,
|
||||
874=>878, 875=>879,
|
||||
#Grass
|
||||
424=> GROUND_SNOW_TILE, 425 => GROUND_SNOW_TILE,426=> GROUND_SNOW_TILE,427=> GROUND_SNOW_TILE,
|
||||
432=> GROUND_SNOW_TILE,433=> GROUND_SNOW_TILE,434=> GROUND_SNOW_TILE,435=> GROUND_SNOW_TILE,
|
||||
440=> GROUND_SNOW_TILE,441=> GROUND_SNOW_TILE,442=> GROUND_SNOW_TILE,443=> GROUND_SNOW_TILE,
|
||||
448=> GROUND_SNOW_TILE,449=> GROUND_SNOW_TILE,450=> GROUND_SNOW_TILE,451=>GROUND_SNOW_TILE,
|
||||
|
||||
# grass details, flowers,
|
||||
1009=>GROUND_SNOW_TILE, 1010=>GROUND_SNOW_TILE,
|
||||
992=>GROUND_SNOW_TILE, 993=>GROUND_SNOW_TILE,
|
||||
|
||||
#Ledges
|
||||
1352=>1357,1353=>1358,1354=>1359,1355=>1350,1356=>1351,
|
||||
1360=>1365, 1361=>1366,1362=>1367,
|
||||
1368 =>1373, 1369=>1374, 1370=>1375,
|
||||
}
|
||||
# SNOW_TREES_TILES = [864,865,872,873,880,881,
|
||||
# 866,867,874,875]
|
||||
|
||||
|
||||
WIND_TREE_AUTOTILES = {
|
||||
1 => { # Route-field
|
||||
864 => "tree_sway_single_1",
|
||||
@@ -327,6 +357,20 @@ class TilemapRenderer
|
||||
875 => "tree_sway_group_4",
|
||||
},
|
||||
|
||||
36 => { # Route-tropical
|
||||
832 => "tree_sway_tropical_single_1",
|
||||
833 => "tree_sway_tropical_single_2",
|
||||
840 => "tree_sway_tropical_single_3",
|
||||
841 => "tree_sway_tropical_single_4",
|
||||
848 => "tree_sway_tropical_single_5",
|
||||
889 => "tree_sway_tropical_single_6",
|
||||
|
||||
834 => "tree_sway_tropical_group_1",
|
||||
835 => "tree_sway_tropical_group_2",
|
||||
842 => "tree_sway_tropical_group_3",
|
||||
843 => "tree_sway_tropical_group_4",
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
#=============================================================================
|
||||
@@ -694,9 +738,28 @@ class TilemapRenderer
|
||||
end
|
||||
|
||||
INVISIBLE_WALL_TILE_ID = 384
|
||||
def get_snow_tile_id(tile_id, current_tileset)
|
||||
return tile_id unless Settings::HOENN
|
||||
return tile_id unless TILESET_SUPPORTING_SNOW_TREES.include?(current_tileset)
|
||||
return tile_id unless Settings::SNOW_DAY
|
||||
return tile_id unless SNOW_SUBSTITUTIONS.include?(tile_id)
|
||||
return SNOW_SUBSTITUTIONS[tile_id]
|
||||
end
|
||||
|
||||
def check_hoenn_safari_flowers(tile_id)
|
||||
replacement_tile = EMPTY_TILE
|
||||
safari_flower_tiles = [987,998]
|
||||
return tile_id unless Settings::HOENN
|
||||
return tile_id unless HOENN_SAFARI_MAPS.include?(@current_map_id)
|
||||
return tile_id if $game_switches[SWITCH_SAFARI_FLOWERS_PLANTED]
|
||||
return tile_id unless safari_flower_tiles.include?(tile_id)
|
||||
echoln "deleting flowers!"
|
||||
return replacement_tile
|
||||
end
|
||||
|
||||
def refresh_tile_bitmap(tile, map, tile_id)
|
||||
tile.tile_id = tile_id
|
||||
original_id = tile_id
|
||||
if tile_id < TILES_PER_AUTOTILE || (Settings::HOENN && tile_id == INVISIBLE_WALL_TILE_ID)
|
||||
tile.set_bitmap("", tile_id, false, false, 0, nil)
|
||||
tile.shows_reflection = false
|
||||
@@ -716,7 +779,6 @@ class TilemapRenderer
|
||||
# true_tileset_start_id += single_autotile_count
|
||||
# end
|
||||
|
||||
filename = nil
|
||||
extra_autotile_hash = get_autotile_overrides(map.tileset_id, map.map_id)
|
||||
|
||||
if extra_autotile_hash && extra_autotile_hash[tile_id]
|
||||
@@ -740,6 +802,15 @@ class TilemapRenderer
|
||||
filename = map.tileset_name
|
||||
tile.set_bitmap(filename, tile_id, false, false, priority, @tilesets[filename])
|
||||
end
|
||||
tile_id = get_snow_tile_id(tile_id,map.tileset_id) #returns the original tile if no snow
|
||||
tile_id = check_hoenn_safari_flowers(tile_id) #Removes flowers in safari if not unlocked all zones
|
||||
if tile_id == EMPTY_TILE
|
||||
tile.set_bitmap("", original_id, false, false, 0, nil)
|
||||
tile.shows_reflection = false
|
||||
tile.underwater_tile = false
|
||||
tile.bridge = false
|
||||
return
|
||||
end
|
||||
|
||||
tile.shows_reflection = terrain_tag_data&.shows_reflections
|
||||
tile.underwater_tile = terrain_tag_data&.underwater
|
||||
|
||||
@@ -431,7 +431,7 @@ end
|
||||
|
||||
def pbDisplayCosmeticsMoneyWindow(msgwindow,x=nil,y=nil)
|
||||
moneyString = pbGetCosmeticsMoneyString()
|
||||
goldwindow = Window_AdvancedTextPokemon.new(_INTL("{2}:\n<ar>{1}</ar>", moneyString,COSMETIC_CURRENCY_NAME))
|
||||
goldwindow = Window_AdvancedTextPokemon.new(_INTL("{2}:\n<ar>{1}</ar>", moneyString, get_cosmetic_currency_name))
|
||||
goldwindow.setSkin("Graphics/Windowskins/goldskin")
|
||||
goldwindow.resizeToFit(goldwindow.text, Graphics.width)
|
||||
goldwindow.width = 160 if goldwindow.width <= 160
|
||||
@@ -648,6 +648,16 @@ def pbMessageDisplay(msgwindow, message, letterbyletter = true, commandProc = ni
|
||||
text.gsub!(/\\pog/i, "")
|
||||
text.gsub!(/\\b/i, "<c3=3050C8,D0D0C8>")
|
||||
text.gsub!(/\\r/i, "<c3=E00808,D0D0C8>")
|
||||
|
||||
text.gsub!("<-","←")
|
||||
text.gsub!("->","→")
|
||||
text.gsub!("<arr_left>","←")
|
||||
text.gsub!("<arr_right>","→")
|
||||
text.gsub!("<arr_down>","↓")
|
||||
text.gsub!("<arr_up>","↑")
|
||||
text.gsub!("<arr_down>","↓")
|
||||
|
||||
|
||||
text.gsub!(/\\mu\[(.*?)\]/i) do
|
||||
$Trainer && isPlayerMale() ? $1 : ""
|
||||
end
|
||||
@@ -948,6 +958,7 @@ def pbMessage(message, commands = nil, cmdIfCancel = 0, skin = nil, defaultCmd =
|
||||
end
|
||||
|
||||
def pbMessageNoSound(message, commands = nil, cmdIfCancel = 0, skin = nil, defaultCmd = 0, &block)
|
||||
echoln message
|
||||
ret = 0
|
||||
msgwindow = pbCreateMessageWindow(nil, skin)
|
||||
if commands
|
||||
|
||||
@@ -264,6 +264,15 @@ GameData::Evolution.register({
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
GameData::Evolution.register({
|
||||
:id => :ReversersLevel,
|
||||
:parameter => Integer,
|
||||
:level_up_proc => proc { |pkmn, parameter|
|
||||
next pkmn.level >= parameter #TODO
|
||||
}
|
||||
})
|
||||
|
||||
GameData::Evolution.register({
|
||||
:id => :Happiness,
|
||||
:minimum_level => 1, # Needs any level up
|
||||
|
||||
@@ -22,6 +22,7 @@ module GameData
|
||||
attr_reader :ignore_passability
|
||||
|
||||
attr_reader :acroBike
|
||||
attr_reader :show_footprints
|
||||
|
||||
|
||||
# oricorio
|
||||
@@ -43,6 +44,15 @@ module GameData
|
||||
attr_reader :secretBase_tree
|
||||
attr_reader :secretBase_cave
|
||||
attr_reader :secretBase_bush
|
||||
attr_reader :step_sound
|
||||
|
||||
attr_reader :ambient_sound
|
||||
attr_reader :ambient_sound_priority
|
||||
|
||||
attr_reader :shifting_tile_horizontal
|
||||
attr_reader :shifting_tile_vertical
|
||||
|
||||
attr_reader :is_cliff
|
||||
|
||||
DATA = {}
|
||||
|
||||
@@ -86,6 +96,8 @@ module GameData
|
||||
@ignore_passability = hash[:ignore_passability] || false
|
||||
@ignore_passability = hash[:ignore_passability] || false
|
||||
|
||||
@show_footprints = hash[:show_footprints] || false
|
||||
|
||||
@flowerRed = hash[:flowerRed] || false
|
||||
@flowerYellow = hash[:flowerYellow] || false
|
||||
@flowerPink = hash[:flowerPink] || false
|
||||
@@ -102,6 +114,13 @@ module GameData
|
||||
@secretBase_tree = hash[:secretBase_tree] || false
|
||||
@secretBase_cave = hash[:secretBase_cave] || false
|
||||
@secretBase_bush = hash[:secretBase_bush] || false
|
||||
@shifting_tile_horizontal = hash[:shifting_tile_horizontal] || false
|
||||
@shifting_tile_vertical = hash[:shifting_tile_vertical] || false
|
||||
|
||||
@step_sound = hash[:step_sound]
|
||||
@ambient_sound = hash[:ambient_sound]
|
||||
@ambient_sound_priority = hash[:ambient_sound_priority]
|
||||
@is_cliff = hash[:is_cliff]
|
||||
|
||||
end
|
||||
|
||||
@@ -126,7 +145,8 @@ GameData::TerrainTag.register({
|
||||
GameData::TerrainTag.register({
|
||||
:id => :Ledge,
|
||||
:id_number => 1,
|
||||
:ledge => true
|
||||
:ledge => true,
|
||||
:is_cliff => true
|
||||
})
|
||||
|
||||
GameData::TerrainTag.register({
|
||||
@@ -134,19 +154,21 @@ GameData::TerrainTag.register({
|
||||
:id_number => 2,
|
||||
:shows_grass_rustle => true,
|
||||
:land_wild_encounters => true,
|
||||
:battle_environment => :Grass
|
||||
:battle_environment => :Grass,
|
||||
:step_sound => "steps/step_tall_grass"
|
||||
})
|
||||
|
||||
GameData::TerrainTag.register({
|
||||
:id => :Sand,
|
||||
:id_number => 3,
|
||||
:battle_environment => :Sand
|
||||
:battle_environment => :Sand,
|
||||
:show_footprints => true,
|
||||
})
|
||||
|
||||
GameData::TerrainTag.register({
|
||||
:id => :Rock,
|
||||
:id_number => 15,
|
||||
:battle_environment => :Rock
|
||||
:battle_environment => :Rock,
|
||||
})
|
||||
|
||||
GameData::TerrainTag.register({
|
||||
@@ -179,7 +201,9 @@ GameData::TerrainTag.register({
|
||||
:id => :Waterfall,
|
||||
:id_number => 8,
|
||||
:can_surf => true,
|
||||
:waterfall => true
|
||||
:waterfall => true,
|
||||
:ambient_sound => "ambient/waterfall",
|
||||
:ambient_sound_priority => 80
|
||||
})
|
||||
|
||||
GameData::TerrainTag.register({
|
||||
@@ -187,7 +211,9 @@ GameData::TerrainTag.register({
|
||||
:id_number => 9,
|
||||
:can_surf => true,
|
||||
:can_fish => true,
|
||||
:waterfall_crest => true
|
||||
:waterfall_crest => true,
|
||||
:ambient_sound => "ambient/waterfall",
|
||||
:ambient_sound_priority => 80
|
||||
})
|
||||
|
||||
GameData::TerrainTag.register({
|
||||
@@ -195,16 +221,17 @@ GameData::TerrainTag.register({
|
||||
:id_number => 10,
|
||||
:deep_bush => true,
|
||||
:land_wild_encounters => true,
|
||||
:double_wild_encounters => true,
|
||||
:battle_environment => :TallGrass,
|
||||
:must_walk => true
|
||||
:must_walk => true,
|
||||
:step_sound => "steps/step_tall_grass",
|
||||
})
|
||||
|
||||
GameData::TerrainTag.register({
|
||||
:id => :UnderwaterGrass,
|
||||
:id_number => 11,
|
||||
:underwater => true,
|
||||
:land_wild_encounters => true
|
||||
:land_wild_encounters => true,
|
||||
:step_sound => "steps/step_tall_grass"
|
||||
})
|
||||
|
||||
GameData::TerrainTag.register({
|
||||
@@ -228,7 +255,8 @@ GameData::TerrainTag.register({
|
||||
:id_number => 14,
|
||||
:shows_grass_rustle => true,
|
||||
:land_wild_encounters => true,
|
||||
:battle_environment => :Grass
|
||||
:battle_environment => :Grass,
|
||||
:step_sound => "steps/step_tall_grass"
|
||||
})
|
||||
|
||||
GameData::TerrainTag.register({
|
||||
@@ -241,7 +269,8 @@ GameData::TerrainTag.register({
|
||||
:id => :Puddle,
|
||||
:id_number => 16,
|
||||
:battle_environment => :Puddle,
|
||||
:shows_reflections => false
|
||||
:land_wild_encounters => true,
|
||||
:shows_reflections => true
|
||||
})
|
||||
|
||||
GameData::TerrainTag.register({
|
||||
@@ -286,27 +315,30 @@ GameData::TerrainTag.register({
|
||||
})
|
||||
|
||||
GameData::TerrainTag.register({
|
||||
:id => :Grass_alt1,
|
||||
:id => :Grass_alt1, #CLOVERS
|
||||
:id_number => 24,
|
||||
:shows_grass_rustle => true,
|
||||
:land_wild_encounters => true,
|
||||
:battle_environment => :Grass
|
||||
:battle_environment => :Grass,
|
||||
:step_sound => "steps/step_tall_grass"
|
||||
})
|
||||
|
||||
GameData::TerrainTag.register({
|
||||
:id => :Grass_alt2,
|
||||
:id => :Grass_alt2, #DRY GRASS
|
||||
:id_number => 25,
|
||||
:shows_grass_rustle => true,
|
||||
:land_wild_encounters => true,
|
||||
:battle_environment => :Grass
|
||||
:battle_environment => :Grass,
|
||||
:step_sound => "steps/step_tall_grass"
|
||||
})
|
||||
|
||||
GameData::TerrainTag.register({
|
||||
:id => :Grass_alt3,
|
||||
:id => :Grass_alt3, #FLOWERS
|
||||
:id_number => 26,
|
||||
:shows_grass_rustle => true,
|
||||
:land_wild_encounters => true,
|
||||
:battle_environment => :Grass
|
||||
:battle_environment => :Grass,
|
||||
:step_sound => "steps/step_tall_grass"
|
||||
})
|
||||
|
||||
GameData::TerrainTag.register({
|
||||
@@ -359,4 +391,108 @@ GameData::TerrainTag.register({
|
||||
:id => :AcroBike,
|
||||
:id_number => 34,
|
||||
:acroBike => true,
|
||||
})
|
||||
|
||||
GameData::TerrainTag.register({
|
||||
:id => :CutGrass,
|
||||
:id_number => 35,
|
||||
})
|
||||
|
||||
GameData::TerrainTag.register({
|
||||
:id => :TallGrassTop,
|
||||
:id_number => 36,
|
||||
:step_sound => "steps/step_tall_grass",
|
||||
})
|
||||
GameData::TerrainTag.register({
|
||||
:id => :TallGrassMiddle,
|
||||
:id_number => 37,
|
||||
:deep_bush => true,
|
||||
:land_wild_encounters => true,
|
||||
:double_wild_encounters => true,
|
||||
:battle_environment => :TallGrass,
|
||||
:must_walk => true,
|
||||
:step_sound => "steps/step_tall_grass",
|
||||
})
|
||||
|
||||
GameData::TerrainTag.register({
|
||||
:id => :DeepSand,
|
||||
:id_number => 38,
|
||||
:battle_environment => :Sand,
|
||||
:land_wild_encounters => true,
|
||||
:must_walk => true,
|
||||
:show_footprints => true,
|
||||
:can_fish => true,
|
||||
})
|
||||
|
||||
GameData::TerrainTag.register({
|
||||
:id => :SuspendedBridgeVertical,
|
||||
:id_number => 39,
|
||||
:shifting_tile_vertical => true,
|
||||
:step_sound => "steps/wooden_bridge",
|
||||
:bridge => true
|
||||
})
|
||||
GameData::TerrainTag.register({
|
||||
:id => :SuspendedBridgeHHorizontal,
|
||||
:id_number => 40,
|
||||
:shifting_tile_horizontal => true,
|
||||
:step_sound => "steps/wooden_bridge",
|
||||
:bridge => true
|
||||
})
|
||||
|
||||
GameData::TerrainTag.register({
|
||||
:id => :Beach,
|
||||
:id_number => 41,
|
||||
:battle_environment => :Sand,
|
||||
:show_footprints => true,
|
||||
:ambient_sound => "ambient/ocean",
|
||||
:ambient_sound_priority => 50,
|
||||
})
|
||||
|
||||
GameData::TerrainTag.register({ #Like normal water, but with a river flowing sound effect
|
||||
:id => :RiverWater,
|
||||
:id_number => 42,
|
||||
:can_surf => true,
|
||||
:can_fish => true,
|
||||
:battle_environment => :MovingWater,
|
||||
:ambient_sound => "ambient/river",
|
||||
:ambient_sound_priority => 50
|
||||
|
||||
})
|
||||
|
||||
GameData::TerrainTag.register({
|
||||
:id => :Lava,
|
||||
:id_number => 43,
|
||||
:battle_environment => :Volcano,
|
||||
:ambient_sound => "ambient/lava",
|
||||
:ambient_sound_priority => 30,
|
||||
:can_fish => true,
|
||||
})
|
||||
GameData::TerrainTag.register({
|
||||
:id => :Snow,
|
||||
:id_number => 44,
|
||||
:battle_environment => :Snow,
|
||||
:show_footprints => true,
|
||||
})
|
||||
|
||||
GameData::TerrainTag.register({
|
||||
:id => :Cliff,
|
||||
:id_number => 45,
|
||||
:is_cliff => true,
|
||||
:battle_environment => :Rock,
|
||||
})
|
||||
|
||||
GameData::TerrainTag.register({
|
||||
:id => :Mud,
|
||||
:id_number => 46,
|
||||
:step_sound => "steps/step_mud",
|
||||
:show_footprints => true,
|
||||
})
|
||||
|
||||
GameData::TerrainTag.register({
|
||||
:id => :Grass_alt4, #Additional grass type for maps that need something else aside from grass, clovers, dry grass and flowers
|
||||
:id_number => 47,
|
||||
:shows_grass_rustle => true,
|
||||
:land_wild_encounters => true,
|
||||
:battle_environment => :Grass,
|
||||
:step_sound => "steps/step_tall_grass"
|
||||
})
|
||||
@@ -128,8 +128,8 @@ GameData::Weather.register({
|
||||
:graphics => [["sandstorm_1", "sandstorm_2", "sandstorm_3", "sandstorm_4"], ["sandstorm_tile"]],
|
||||
:particle_delta_x => -1200,
|
||||
:particle_delta_y => 640,
|
||||
:tile_delta_x => -720,
|
||||
:tile_delta_y => 360,
|
||||
:tile_delta_x => -800,
|
||||
:tile_delta_y => 400,
|
||||
:tone_proc => proc { |strength|
|
||||
next Tone.new(strength / 2, 0, -strength / 2, 0)
|
||||
}
|
||||
@@ -199,9 +199,11 @@ GameData::Weather.register({
|
||||
:graphics => [["ash_1", "ash_2", "ash_3"]],
|
||||
:particle_delta_x => 20,
|
||||
:particle_delta_y => 100,
|
||||
:tone_proc => proc { |strength|
|
||||
next Tone.new(strength / 2, strength / 2, strength / 2, 0)
|
||||
}
|
||||
:tone_proc => proc { |strength| next Tone.new(0, 0, 0, 0) }
|
||||
# :tone_proc => proc { |strength|
|
||||
# # next Tone.new(strength / 2, strength / 2, strength / 2, 0)
|
||||
# next Tone.new(0, 0, 0, 0)
|
||||
# }
|
||||
})
|
||||
|
||||
GameData::Weather.register({ #Used underwater
|
||||
@@ -209,8 +211,20 @@ GameData::Weather.register({ #Used underwater
|
||||
:id_number => 13,
|
||||
:graphics => [["bubble_1", "bubble_2", "bubble_3"]],
|
||||
:particle_delta_x => 20,
|
||||
:particle_delta_y => 40,
|
||||
:particle_delta_y => -40,
|
||||
:tone_proc => proc { |strength|
|
||||
next Tone.new(strength / 2, strength / 2, strength / 2, 0)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
GameData::Weather.register({
|
||||
:id => :Crumble,
|
||||
:id_number => 14,
|
||||
:category => :Crumble,
|
||||
:graphics => [[], ["crumble_tile"]],
|
||||
:tile_delta_x => 0,
|
||||
:tile_delta_y => 300,
|
||||
:tone_proc => proc { |strength|
|
||||
next Tone.new(strength / 2, 0, -strength / 2, 0)
|
||||
}
|
||||
})
|
||||
@@ -55,6 +55,19 @@ GameData::EncounterType.register({
|
||||
:old_slots => [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]
|
||||
})
|
||||
|
||||
GameData::EncounterType.register({
|
||||
:id => :Land4,
|
||||
:type => :land,
|
||||
:trigger_chance => 10,
|
||||
:old_slots => [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]
|
||||
})
|
||||
|
||||
GameData::EncounterType.register({
|
||||
:id => :Puddle,
|
||||
:type => :land,
|
||||
:trigger_chance => 5,
|
||||
:old_slots => [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]
|
||||
})
|
||||
|
||||
GameData::EncounterType.register({
|
||||
:id => :LandDay,
|
||||
|
||||
@@ -96,7 +96,8 @@ GameData::Environment.register({
|
||||
|
||||
GameData::Environment.register({
|
||||
:id => :Snow,
|
||||
:name => _INTL("Snow")
|
||||
:name => _INTL("Snow"),
|
||||
:battle_base => "snow"
|
||||
})
|
||||
|
||||
GameData::Environment.register({
|
||||
|
||||
@@ -192,6 +192,9 @@ module GameData
|
||||
end
|
||||
# @return [String] the translated name of this species
|
||||
def name
|
||||
if getCurrentLanguage == :FRENCH_QC
|
||||
return @real_name
|
||||
end
|
||||
ret = MessageTypes.get(MessageTypes::Species, @id_number)
|
||||
return (ret && !ret.empty?) ? ret : @real_name
|
||||
end
|
||||
|
||||
@@ -212,7 +212,6 @@ module GameData
|
||||
end
|
||||
|
||||
def generateRandomGymSpecies(old_species)
|
||||
echoln "GENERATING GYM SPECIES"
|
||||
gym_index = pbGet(VAR_CURRENT_GYM_TYPE)
|
||||
return old_species if gym_index == -1
|
||||
return generateRandomChampionSpecies(old_species) if gym_index == 999
|
||||
@@ -222,10 +221,12 @@ module GameData
|
||||
customsList = getCustomSpeciesList()
|
||||
bst_range = pbGet(VAR_RANDOMIZER_TRAINER_BST)
|
||||
gym_type = GameData::Type.get(type_id)
|
||||
echoln "type: #{gym_type.id}"
|
||||
#echoln "type: #{gym_type.id}"
|
||||
same_egg_group = $game_switches[SWITCH_RANDOM_GYM_EGG_GROUP]
|
||||
|
||||
while true
|
||||
new_species = $game_switches[SWITCH_RANDOM_GYM_CUSTOMS] ? getSpecies(getNewCustomSpecies(old_species, customsList, bst_range)) : getSpecies(getNewSpecies(old_species, bst_range))
|
||||
new_species = $game_switches[SWITCH_RANDOM_GYM_CUSTOMS] ? getSpecies(getNewCustomSpecies(old_species, customsList, bst_range, false, true, same_egg_group)) : getSpecies(getNewSpecies(old_species, bst_range, false, PBSpecies.maxValue, true, same_egg_group))
|
||||
#echoln "#{old_species} - #{new_species.name}> "
|
||||
return new_species if $game_switches[SWITCH_LEGENDARY_MODE] # new_species = $game_switches[SWITCH_RANDOM_GYM_CUSTOMS] ? getSpecies(getNewCustomSpecies(old_species, customsList, bst_range)) : getSpecies(getNewSpecies(old_species, bst_range))
|
||||
if new_species.hasType?(gym_type)
|
||||
return new_species
|
||||
|
||||
@@ -301,7 +301,7 @@ class PokeBattle_Battler
|
||||
end
|
||||
|
||||
def pbWeight
|
||||
ret = (@pokemon) ? @pokemon.weight : 500
|
||||
ret = (@pokemon) ? @pokemon.species_data.weight : 500
|
||||
ret += @effects[PBEffects::WeightChange]
|
||||
ret = 1 if ret < 1
|
||||
if abilityActive? && !@battle.moldBreaker
|
||||
|
||||
@@ -297,6 +297,7 @@ class PokeBattle_Battler
|
||||
@spatk = @pokemon.spatk
|
||||
@spdef = @pokemon.spdef
|
||||
@speed = @pokemon.speed
|
||||
@attack, @defense = @defense, @attack if @effects[PBEffects::PowerTrick]
|
||||
if fullChange
|
||||
@type1 = @pokemon.type1
|
||||
@type2 = @pokemon.type2
|
||||
|
||||
@@ -136,6 +136,11 @@ class PokeBattle_Battler
|
||||
end
|
||||
@effects[PBEffects::BurnUp] = false
|
||||
@effects[PBEffects::Roost] = false
|
||||
if pbOwnedByPlayer?
|
||||
@battle.scene.pbRefreshOne(@index) if $PokemonSystem.type_icons_player
|
||||
else
|
||||
@battle.scene.pbRefreshOne(@index) if $PokemonSystem.type_icons_opponent
|
||||
end
|
||||
end
|
||||
|
||||
#=============================================================================
|
||||
|
||||
@@ -171,6 +171,7 @@ class PokeBattle_Battler
|
||||
pbBeginTurn(choice)
|
||||
# Force the use of certain moves if they're already being used
|
||||
if usingMultiTurnAttack?
|
||||
echoln @currentMove
|
||||
choice[2] = PokeBattle_Move.from_pokemon_move(@battle, Pokemon::Move.new(@currentMove))
|
||||
specialUsage = true
|
||||
elsif @effects[PBEffects::Encore] > 0 && choice[1] >= 0 &&
|
||||
|
||||
@@ -277,6 +277,14 @@ end
|
||||
# Confuses the target.
|
||||
#===============================================================================
|
||||
class PokeBattle_Move_013 < PokeBattle_ConfuseMove
|
||||
|
||||
def pbOnStartUse(user,target)
|
||||
if user.pokemon.chatter_text
|
||||
pbCallBubOverBattler(user)
|
||||
pbMessage(user.pokemon.chatter_text + "!\\wtnp[15]")
|
||||
end
|
||||
super(user,target)
|
||||
end
|
||||
end
|
||||
|
||||
#===============================================================================
|
||||
@@ -1753,7 +1761,7 @@ class PokeBattle_Move_060 < PokeBattle_Move
|
||||
end
|
||||
if !checkedTerrain
|
||||
case @battle.environment
|
||||
when :Grass, :TallGrass, :Grass_alt1,:Grass_alt2,:Grass_alt3,
|
||||
when :Grass, :TallGrass, :Grass_alt1,:Grass_alt2,:Grass_alt3,:Grass_alt4
|
||||
@newType = :GRASS
|
||||
when :MovingWater, :StillWater, :Puddle, :Underwater
|
||||
@newType = :WATER
|
||||
|
||||
@@ -2498,8 +2498,14 @@ class PokeBattle_Move_0D6 < PokeBattle_HealingMove
|
||||
return (user.totalhp/2.0).round
|
||||
end
|
||||
|
||||
def pbEffectAfterAllHits(user,target)
|
||||
def pbEffectGeneral(user)
|
||||
user.effects[PBEffects::Roost] = true
|
||||
if user.pbOwnedByPlayer?
|
||||
@battle.scene.pbRefreshOne(user.index) if $PokemonSystem.type_icons_player
|
||||
else
|
||||
@battle.scene.pbRefreshOne(user.index) if $PokemonSystem.type_icons_opponent
|
||||
end
|
||||
super(user)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -3223,8 +3229,7 @@ class PokeBattle_Move_0F1 < PokeBattle_Move
|
||||
itemName = target.itemName
|
||||
user.item = target.item
|
||||
# Permanently steal the item from wild Pokémon
|
||||
# removed target.item == target.initialItem, this may cause bugs.
|
||||
if @battle.wildBattle? && target.opposes? && !user.initialItem
|
||||
if @battle.wildBattle? && target.opposes? && !user.initialItem && target.item&.id == target.initialItem
|
||||
user.setInitialItem(target.item)
|
||||
end
|
||||
target.pbRemoveItem(false)
|
||||
@@ -3284,8 +3289,7 @@ class PokeBattle_Move_0F2 < PokeBattle_Move
|
||||
target.effects[PBEffects::ChoiceBand] = nil
|
||||
target.effects[PBEffects::Unburden] = (!target.item && oldTargetItem)
|
||||
# Permanently steal the item from wild Pokémon
|
||||
if @battle.wildBattle? && target.opposes? &&
|
||||
target.initialItem==oldTargetItem && !user.initialItem
|
||||
if @battle.wildBattle? && target.opposes? && target.initialItem==oldTargetItem&.id && !user.initialItem
|
||||
user.setInitialItem(oldTargetItem)
|
||||
end
|
||||
@battle.pbDisplay(_INTL("{1} switched items with its opponent!",user.pbThis))
|
||||
@@ -3328,8 +3332,7 @@ class PokeBattle_Move_0F3 < PokeBattle_Move
|
||||
itemName = user.itemName
|
||||
target.item = user.item
|
||||
# Permanently steal the item from wild Pokémon
|
||||
if @battle.wildBattle? && user.opposes? &&
|
||||
user.initialItem==user.item && !target.initialItem
|
||||
if @battle.wildBattle? && user.opposes? && user.initialItem==user.item&.id && !target.initialItem
|
||||
target.setInitialItem(user.item)
|
||||
user.pbRemoveItem
|
||||
else
|
||||
@@ -3534,6 +3537,7 @@ class PokeBattle_Move_0F7 < PokeBattle_Move
|
||||
@willFail = true if user.item.is_berry? && !user.canConsumeBerry?
|
||||
return if @willFail
|
||||
return if user.item.is_mega_stone?
|
||||
return if user.item.is_berry?
|
||||
flingableItem = false
|
||||
@flingPowers.each do |_power, items|
|
||||
next if !items.include?(user.item_id)
|
||||
|
||||
@@ -1352,6 +1352,11 @@ class PokeBattle_Move_142 < PokeBattle_Move
|
||||
|
||||
def pbEffectAgainstTarget(user, target)
|
||||
target.effects[PBEffects::Type3] = :GHOST
|
||||
if target.pbOwnedByPlayer?
|
||||
@battle.scene.pbRefreshOne(target.index) if $PokemonSystem.type_icons_player
|
||||
else
|
||||
@battle.scene.pbRefreshOne(target.index) if $PokemonSystem.type_icons_opponent
|
||||
end
|
||||
typeName = GameData::Type.get(:GHOST).name
|
||||
@battle.pbDisplay(_INTL("{1} transformed into the {2} type!", target.pbThis, typeName))
|
||||
end
|
||||
@@ -1371,6 +1376,11 @@ class PokeBattle_Move_143 < PokeBattle_Move
|
||||
|
||||
def pbEffectAgainstTarget(user, target)
|
||||
target.effects[PBEffects::Type3] = :GRASS
|
||||
if target.pbOwnedByPlayer?
|
||||
@battle.scene.pbRefreshOne(target.index) if $PokemonSystem.type_icons_player
|
||||
else
|
||||
@battle.scene.pbRefreshOne(target.index) if $PokemonSystem.type_icons_opponent
|
||||
end
|
||||
typeName = GameData::Type.get(:GRASS).name
|
||||
@battle.pbDisplay(_INTL("{1} transformed into the {2} type!", target.pbThis, typeName))
|
||||
end
|
||||
@@ -2017,6 +2027,11 @@ class PokeBattle_Move_162 < PokeBattle_Move
|
||||
def pbEffectAfterAllHits(user, target)
|
||||
if !user.effects[PBEffects::BurnUp]
|
||||
user.effects[PBEffects::BurnUp] = true
|
||||
if user.pbOwnedByPlayer?
|
||||
@battle.scene.pbRefreshOne(user.index) if $PokemonSystem.type_icons_player
|
||||
else
|
||||
@battle.scene.pbRefreshOne(user.index) if $PokemonSystem.type_icons_opponent
|
||||
end
|
||||
@battle.pbDisplay(_INTL("{1} burned itself out!", user.pbThis))
|
||||
end
|
||||
end
|
||||
|
||||
@@ -76,10 +76,11 @@ module PokeBattle_BattleCommon
|
||||
gave_away_pokemon = promptGiveToPartner(pkmn) if isPartneredWithAnyTrainer()
|
||||
|
||||
promptCaughtPokemonAction(pkmn) if !gave_away_pokemon
|
||||
if $game_switches[AUTOSAVE_CATCH_SWITCH]
|
||||
Kernel.tryAutosave()
|
||||
end
|
||||
|
||||
#Removed because battle restarts right away after reloading and duplicates the Pokemon.
|
||||
# if $game_switches[AUTOSAVE_CATCH_SWITCH]
|
||||
# Kernel.tryAutosave()
|
||||
# end
|
||||
end
|
||||
@caughtPokemon.clear
|
||||
end
|
||||
|
||||
@@ -218,6 +218,16 @@ class PokeBattle_Battle
|
||||
end
|
||||
end
|
||||
|
||||
def list_all_player_participants
|
||||
participating = []
|
||||
pbParty(0).each_with_index do |pkmn, i|
|
||||
next if !pkmn
|
||||
if @usedInBattle[0][i] == true
|
||||
participating.push(pkmn) unless pkmn.fainted?
|
||||
end
|
||||
end
|
||||
return participating
|
||||
end
|
||||
|
||||
|
||||
def singleBattle?
|
||||
|
||||
@@ -83,7 +83,6 @@ class PokeBattle_Battle
|
||||
@sideSizes[0] -= 1
|
||||
end
|
||||
end
|
||||
|
||||
PBDebug.log("Trying #{@sideSizes[0]}v#{@sideSizes[1]} battle instead")
|
||||
if @sideSizes[0] <= 0 || @sideSizes[1] <= 0
|
||||
raise _INTL("Couldn't reduce battle size any further, battle isn't possible")
|
||||
@@ -103,6 +102,9 @@ class PokeBattle_Battle
|
||||
pbClearChoice(idxBattler)
|
||||
@successStates[idxBattler] = PokeBattle_SuccessState.new
|
||||
@battlers[idxBattler].pbInitialize(pkmn, idxParty)
|
||||
|
||||
side = idxBattler % 2
|
||||
@usedInBattle[side][idxParty] = true if @usedInBattle && @usedInBattle[side]
|
||||
end
|
||||
|
||||
def pbSetUpSides
|
||||
@@ -378,7 +380,7 @@ class PokeBattle_Battle
|
||||
$Trainer.cosmetics_money = 0 unless $Trainer.cosmetics_money
|
||||
pbPlayer.cosmetics_money += cosmetics_money
|
||||
if !@moneyGain && cosmetics_money > 0 # message displayed in pbGainMoney if player wins money
|
||||
pbDisplayPaused(_INTL("You got some {1} for winning!", COSMETIC_CURRENCY_NAME))
|
||||
pbDisplayPaused(_INTL("You got some {1} for winning!", get_cosmetic_currency_name))
|
||||
end
|
||||
return cosmetics_money
|
||||
end
|
||||
@@ -395,7 +397,7 @@ class PokeBattle_Battle
|
||||
|
||||
if moneyGained > 0
|
||||
if cosmetics_money > 0
|
||||
pbDisplayPaused(_INTL("You got ${1} and some {2} for winning!", moneyGained.to_s_formatted, COSMETIC_CURRENCY_NAME))
|
||||
pbDisplayPaused(_INTL("You got ${1} and some {2} for winning!", moneyGained.to_s_formatted, get_cosmetic_currency_name))
|
||||
else
|
||||
pbDisplayPaused(_INTL("You got ${1} for winning!", moneyGained.to_s_formatted))
|
||||
end
|
||||
@@ -457,7 +459,15 @@ class PokeBattle_Battle
|
||||
@opponent.each_with_index do |_t, i|
|
||||
@scene.pbShowOpponent(i)
|
||||
msg = (@endSpeeches[i] && @endSpeeches[i] != "") ? @endSpeeches[i] : "..."
|
||||
pbDisplayPaused(msg.gsub(/\\[Pp][Nn]/, pbPlayer.name))
|
||||
msg = MessageTypes.getFromMapHash($game_map.map_id, msg)
|
||||
msg = msg.gsub(/\\[Pp][Nn]/, pbPlayer.name)
|
||||
msg = msg.gsub(/\\n/, "\n")
|
||||
if Settings::EXPERIMENTAL_FEATURES
|
||||
pbCallBubFixed(60, 4, 340, 100, true)
|
||||
pbMessage(msg)
|
||||
else
|
||||
pbDisplayPaused(msg)
|
||||
end
|
||||
end
|
||||
end
|
||||
# Gain money from winning a trainer battle, and from Pay Day
|
||||
@@ -499,7 +509,10 @@ class PokeBattle_Battle
|
||||
@opponent.each_with_index do |_t, i|
|
||||
@scene.pbShowOpponent(i)
|
||||
msg = (@endSpeechesWin[i] && @endSpeechesWin[i] != "") ? @endSpeechesWin[i] : "..."
|
||||
pbDisplayPaused(msg.gsub(/\\[Pp][Nn]/, pbPlayer.name))
|
||||
msg = MessageTypes.getFromMapHash($game_map.map_id, msg)
|
||||
msg = msg.gsub(/\\[Pp][Nn]/, pbPlayer.name)
|
||||
msg = msg.gsub(/\\n/, "\n")
|
||||
pbDisplayPaused(msg)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -302,7 +302,8 @@ class PokeBattle_Battle
|
||||
sendOuts.each do |b|
|
||||
@scene.pbResetMoveIndex(b[0])
|
||||
pbSetSeen(@battlers[b[0]])
|
||||
@usedInBattle[b[0] & 1][b[0] / 2] = true
|
||||
idxParty = @battlers[b[0]].pokemonIndex
|
||||
@usedInBattle[b[0] & 1][idxParty] = true if idxParty >= 0
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -208,44 +208,7 @@ class PokeBattle_Battle
|
||||
# Weather
|
||||
pbEORWeather(priority)
|
||||
# Future Sight/Doom Desire
|
||||
@positions.each_with_index do |pos,idxPos|
|
||||
next if !pos || pos.effects[PBEffects::FutureSightCounter]==0
|
||||
pos.effects[PBEffects::FutureSightCounter] -= 1
|
||||
next if pos.effects[PBEffects::FutureSightCounter]>0
|
||||
next if !@battlers[idxPos] || @battlers[idxPos].fainted? # No target
|
||||
moveUser = nil
|
||||
eachBattler do |b|
|
||||
next if b.opposes?(pos.effects[PBEffects::FutureSightUserIndex])
|
||||
next if b.pokemonIndex!=pos.effects[PBEffects::FutureSightUserPartyIndex]
|
||||
moveUser = b
|
||||
break
|
||||
end
|
||||
next if moveUser && moveUser.index==idxPos # Target is the user
|
||||
if !moveUser # User isn't in battle, get it from the party
|
||||
party = pbParty(pos.effects[PBEffects::FutureSightUserIndex])
|
||||
pkmn = party[pos.effects[PBEffects::FutureSightUserPartyIndex]]
|
||||
if pkmn && pkmn.able?
|
||||
moveUser = PokeBattle_Battler.new(self,pos.effects[PBEffects::FutureSightUserIndex])
|
||||
moveUser.pbInitDummyPokemon(pkmn,pos.effects[PBEffects::FutureSightUserPartyIndex])
|
||||
end
|
||||
end
|
||||
next if !moveUser # User is fainted
|
||||
move = pos.effects[PBEffects::FutureSightMove]
|
||||
pbDisplay(_INTL("{1} took the {2} attack!",@battlers[idxPos].pbThis,
|
||||
GameData::Move.get(move).name))
|
||||
# NOTE: Future Sight failing against the target here doesn't count towards
|
||||
# Stomping Tantrum.
|
||||
userLastMoveFailed = moveUser.lastMoveFailed
|
||||
@futureSight = true
|
||||
moveUser.pbUseMoveSimple(move,idxPos)
|
||||
@futureSight = false
|
||||
moveUser.lastMoveFailed = userLastMoveFailed
|
||||
@battlers[idxPos].pbFaint if @battlers[idxPos].fainted?
|
||||
pos.effects[PBEffects::FutureSightCounter] = 0
|
||||
pos.effects[PBEffects::FutureSightMove] = nil
|
||||
pos.effects[PBEffects::FutureSightUserIndex] = -1
|
||||
pos.effects[PBEffects::FutureSightUserPartyIndex] = -1
|
||||
end
|
||||
@positions.each_with_index { |pos, idxPos| pbEORUseFutureSight(pos, idxPos) }
|
||||
# Wish
|
||||
@positions.each_with_index do |pos,idxPos|
|
||||
next if !pos || pos.effects[PBEffects::Wish]==0
|
||||
@@ -261,8 +224,8 @@ class PokeBattle_Battle
|
||||
for side in 0...2
|
||||
next if sides[side].effects[PBEffects::SeaOfFire]==0
|
||||
next if [:Rain, :HeavyRain].include?(curWeather)
|
||||
@battle.pbCommonAnimation("SeaOfFire") if side==0
|
||||
@battle.pbCommonAnimation("SeaOfFireOpp") if side==1
|
||||
pbCommonAnimation("SeaOfFire") if side==0
|
||||
pbCommonAnimation("SeaOfFireOpp") if side==1
|
||||
priority.each do |b|
|
||||
next if b.opposes?(side)
|
||||
next if !b.takesIndirectDamage? || b.pbHasType?(:FIRE)
|
||||
@@ -631,7 +594,14 @@ class PokeBattle_Battle
|
||||
b.effects[PBEffects::PriorityItem] = false
|
||||
b.effects[PBEffects::Protect] = false
|
||||
b.effects[PBEffects::RagePowder] = false
|
||||
b.effects[PBEffects::Roost] = false
|
||||
if b.effects[PBEffects::Roost]
|
||||
b.effects[PBEffects::Roost] = false
|
||||
if b.pbOwnedByPlayer?
|
||||
@scene.pbRefreshOne(b.index) if $PokemonSystem.type_icons_player
|
||||
else
|
||||
@scene.pbRefreshOne(b.index) if $PokemonSystem.type_icons_opponent
|
||||
end
|
||||
end
|
||||
b.effects[PBEffects::Snatch] = 0
|
||||
b.effects[PBEffects::SpikyShield] = false
|
||||
b.effects[PBEffects::Spotlight] = 0
|
||||
@@ -663,4 +633,51 @@ class PokeBattle_Battle
|
||||
@field.effects[PBEffects::FusionFlare] = false
|
||||
@endOfRound = false
|
||||
end
|
||||
|
||||
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# End Of Round use delayed moves (Future Sight, Doom Desire).
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
def pbEORUseFutureSight(position, position_index)
|
||||
return if !position || position.effects[PBEffects::FutureSightCounter] == 0
|
||||
position.effects[PBEffects::FutureSightCounter] -= 1
|
||||
return if position.effects[PBEffects::FutureSightCounter] > 0
|
||||
move = position.effects[PBEffects::FutureSightMove]
|
||||
userIdx = position.effects[PBEffects::FutureSightUserIndex]
|
||||
partyIdx = position.effects[PBEffects::FutureSightUserPartyIndex]
|
||||
position.effects[PBEffects::FutureSightCounter] = 0
|
||||
position.effects[PBEffects::FutureSightMove] = nil
|
||||
position.effects[PBEffects::FutureSightUserIndex] = -1
|
||||
position.effects[PBEffects::FutureSightUserPartyIndex] = -1
|
||||
return if !move # defensive: corrupted/never-set state, bail out safely
|
||||
return if !@battlers[position_index] || @battlers[position_index].fainted?
|
||||
moveUser = nil
|
||||
allBattlers = @battlers.select { |b| b && !b.fainted? }
|
||||
allBattlers.each do |battler|
|
||||
next if battler.opposes?(userIdx)
|
||||
next if battler.pokemonIndex != partyIdx
|
||||
moveUser = battler
|
||||
break
|
||||
end
|
||||
return if moveUser && moveUser.index == position_index
|
||||
if !moveUser
|
||||
party = pbParty(userIdx)
|
||||
pkmn = (partyIdx >= 0) ? party[partyIdx] : nil
|
||||
if pkmn&.able?
|
||||
moveUser = PokeBattle_Battler.new(self, userIdx)
|
||||
moveUser.pbInitDummyPokemon(pkmn, partyIdx)
|
||||
end
|
||||
end
|
||||
return if !moveUser
|
||||
pbDisplay(_INTL("{1} took the {2} attack!", @battlers[position_index].pbThis,
|
||||
GameData::Move.get(move).name))
|
||||
userLastMoveFailed = moveUser.lastMoveFailed
|
||||
@futureSight = true
|
||||
moveUser.pbUseMoveSimple(move, position_index)
|
||||
@futureSight = false
|
||||
moveUser.lastMoveFailed = userLastMoveFailed
|
||||
@battlers[position_index].pbFaint if @battlers[position_index].fainted?
|
||||
end
|
||||
end
|
||||
|
||||
@@ -183,7 +183,7 @@ BattleHandlers::StatusImmunityAbilityNonIgnorable.add(:COMATOSE,
|
||||
|
||||
BattleHandlers::StatusImmunityAbilityNonIgnorable.add(:SHIELDSDOWN,
|
||||
proc { |ability,battler,status|
|
||||
next true if battler.isFusionOf(:MINIOR_C) && battler.form<7
|
||||
next true if battler.isFusionOf(:MINIOR_M) && battler.form<7
|
||||
}
|
||||
)
|
||||
|
||||
@@ -1453,6 +1453,11 @@ BattleHandlers::TargetAbilityOnHit.add(:ILLUSION,
|
||||
next if !target.effects[PBEffects::Illusion]
|
||||
target.effects[PBEffects::Illusion] = nil
|
||||
battle.scene.pbChangePokemon(target,target.pokemon)
|
||||
if user.pbOwnedByPlayer?
|
||||
battle.scene.pbRefreshOne(target.index) if $PokemonSystem.type_icons_player
|
||||
else
|
||||
battle.scene.pbRefreshOne(target.index) if $PokemonSystem.type_icons_opponent
|
||||
end
|
||||
battle.pbDisplay(_INTL("{1}'s illusion wore off!",target.pbThis))
|
||||
battle.pbSetSeen(target)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,413 @@
|
||||
module MoveFunctions
|
||||
# --- 000-00F: Basic / status conditions ----------------------------------
|
||||
NO_ADDITIONAL_EFFECT = "000" # Tackle, Slash, Hydro Pump, Megahorn, X-Scissor, etc.
|
||||
NO_EFFECT = "001" # Splash, Counterfeit
|
||||
STRUGGLE = "002"
|
||||
INFLICT_SLEEP = "003" # Spore, Sing, Hypnosis, Sleep Powder, Dark Void, Relic Song...
|
||||
INFLICT_DROWSY = "004" # Yawn
|
||||
INFLICT_POISON = "005" # Sludge Bomb, Poison Jab, Gunk Shot, Smog, Poison Gas...
|
||||
INFLICT_BAD_POISON = "006" # Toxic, Poison Fang
|
||||
INFLICT_PARALYSIS = "007" # Thunderbolt, Thunder Wave, Body Slam, Glare, Stun Spore...
|
||||
INFLICT_PARALYSIS_THUNDER = "008" # Thunder (weather affects accuracy)
|
||||
PARALYZE_OR_FLINCH = "009" # Thunder Fang
|
||||
INFLICT_BURN = "00A" # Flamethrower, Fire Blast, Will-O-Wisp, Scald, Ember...
|
||||
BURN_OR_FLINCH = "00B" # Fire Fang
|
||||
INFLICT_FREEZE = "00C" # Ice Beam, Ice Punch, Powder Snow
|
||||
INFLICT_FREEZE_BLIZZARD = "00D" # Blizzard (perfect accuracy in hail)
|
||||
FREEZE_OR_FLINCH = "00E" # Ice Fang
|
||||
FLINCH = "00F" # Bite, Air Slash, Iron Head, Headbutt, Rock Slide...
|
||||
|
||||
# --- 010-01F: Flinch / confusion / misc status ----------------------------
|
||||
FLINCH_MINIMIZE_BOOST = "010" # Stomp, Steamroller, Dragon Rush
|
||||
HIT_ONLY_WHILE_ASLEEP = "011" # Snore
|
||||
FLINCH_FIRST_TURN_ONLY = "012" # Fake Out
|
||||
INFLICT_CONFUSION = "013" # Psybeam, Confusion, Confuse Ray, Supersonic, Water Pulse...
|
||||
INFLICT_CONFUSION_CHATTER = "014" # Chatter
|
||||
INFLICT_CONFUSION_HURRICANE = "015" # Hurricane (weather affects accuracy)
|
||||
INFLICT_ATTRACT = "016" # Attract
|
||||
BURN_FREEZE_OR_PARALYZE = "017" # Tri Attack
|
||||
CURE_USER_STATUS = "018" # Refresh
|
||||
CURE_PARTY_STATUS = "019" # Aromatherapy, Heal Bell
|
||||
SAFEGUARD = "01A" # Safeguard
|
||||
TRANSFER_STATUS = "01B" # Psycho Shift
|
||||
USER_ATTACK_UP_1 = "01C" # Howl, Sharpen, Meditate, Meteor Mash, Metal Claw, Power-Up Punch
|
||||
USER_DEFENSE_UP_1 = "01D" # Harden, Withdraw, Steel Wing
|
||||
USER_DEFENSE_UP_1_CURL = "01E" # Defense Curl
|
||||
USER_SPEED_UP_1 = "01F" # Flame Charge
|
||||
|
||||
# --- 020-02F: User stat boosts ---------------------------------------------
|
||||
USER_SP_ATK_UP_1 = "020" # Charge Beam, Fiery Dance
|
||||
USER_SP_DEF_UP_1_CHARGE = "021" # Charge
|
||||
USER_EVASION_UP_1 = "022" # Double Team
|
||||
USER_CRIT_RATE_UP = "023" # Focus Energy
|
||||
USER_ATK_DEF_UP_1 = "024" # Bulk Up
|
||||
USER_ATK_DEF_ACC_UP_1 = "025" # Coil
|
||||
USER_ATK_SPEED_UP_1 = "026" # Dragon Dance
|
||||
USER_ATK_SP_ATK_UP_1 = "027" # Work Up
|
||||
USER_ATK_SP_ATK_UP_1_SUN = "028" # Growth (doubled in sun)
|
||||
USER_ATK_ACC_UP_1 = "029" # Hone Claws
|
||||
USER_DEF_SP_DEF_UP_1 = "02A" # Cosmic Power, Defend Order
|
||||
USER_SP_ATK_SP_DEF_SPEED_UP_1 = "02B" # Quiver Dance
|
||||
USER_SP_ATK_SP_DEF_UP_1 = "02C" # Calm Mind
|
||||
USER_ALL_STATS_UP_1 = "02D" # Ancient Power, Ominous Wind, Silver Wind
|
||||
USER_ATTACK_UP_2 = "02E" # Swords Dance
|
||||
USER_DEFENSE_UP_2 = "02F" # Acid Armor, Barrier, Iron Defense
|
||||
|
||||
# --- 030-03F: User stat boosts / drops --------------------------------------
|
||||
USER_SPEED_UP_2 = "030" # Agility, Rock Polish
|
||||
USER_SPEED_UP_2_LOSE_WEIGHT = "031" # Autotomize
|
||||
USER_SP_ATK_UP_2 = "032" # Nasty Plot
|
||||
USER_SP_DEF_UP_2 = "033" # Amnesia
|
||||
USER_EVASION_UP_2_MINIMIZE = "034" # Minimize
|
||||
USER_SHELL_SMASH = "035" # Shell Smash
|
||||
USER_SPEED_UP_2_ATTACK_UP_1 = "036" # Shift Gear
|
||||
RAISE_RANDOM_STAT_2 = "037" # Acupressure
|
||||
USER_DEFENSE_UP_3 = "038" # Cotton Guard
|
||||
USER_SP_ATK_UP_3 = "039" # Tail Glow
|
||||
USER_BELLY_DRUM = "03A" # Belly Drum
|
||||
USER_ATK_DEF_DOWN_1 = "03B" # Superpower
|
||||
USER_DEF_SP_DEF_DOWN_1 = "03C" # Close Combat, Dragon Ascent
|
||||
USER_DEF_SP_DEF_SPEED_DOWN_1 = "03D" # V-create
|
||||
USER_SPEED_DOWN_1 = "03E" # Hammer Arm, Ice Hammer
|
||||
USER_SP_ATK_DOWN_2 = "03F" # Draco Meteor, Overheat, Leaf Storm, Psycho Boost, Fleur Cannon
|
||||
|
||||
# --- 040-04F: Target stat changes -------------------------------------------
|
||||
TARGET_SP_ATK_UP_1_CONFUSE = "040" # Flatter
|
||||
TARGET_ATTACK_UP_2_CONFUSE = "041" # Swagger
|
||||
TARGET_ATTACK_DOWN_1 = "042" # Growl, Play Rough, Lunge, Baby-Doll Eyes, Aurora Beam...
|
||||
TARGET_DEFENSE_DOWN_1 = "043" # Leer, Tail Whip, Crunch, Iron Tail, Rock Smash...
|
||||
TARGET_SPEED_DOWN_1 = "044" # Icy Wind, Bulldoze, Mud Shot, Rock Tomb, Bubble Beam...
|
||||
TARGET_SP_ATK_DOWN_1 = "045" # Moonblast, Snarl, Struggle Bug, Mystical Fire, Mist Ball
|
||||
TARGET_SP_DEF_DOWN_1 = "046" # Psychic, Shadow Ball, Energy Ball, Earth Power, Bug Buzz...
|
||||
TARGET_ACCURACY_DOWN_1 = "047" # Smokescreen, Sand Attack, Mud-Slap, Flash, Octazooka...
|
||||
TARGET_EVASION_DOWN = "048" # Sweet Scent
|
||||
TARGET_EVASION_DOWN_CLEAR_FIELD = "049" # Defog
|
||||
TARGET_ATK_DEF_DOWN_1 = "04A" # Tickle
|
||||
TARGET_ATTACK_DOWN_2 = "04B" # Charm, Feather Dance
|
||||
TARGET_DEFENSE_DOWN_2 = "04C" # Screech
|
||||
TARGET_SPEED_DOWN_2 = "04D" # String Shot, Cotton Spore, Scary Face
|
||||
TARGET_SP_ATK_DOWN_2_GENDER = "04E" # Captivate
|
||||
TARGET_SP_DEF_DOWN_2 = "04F" # Fake Tears, Acid Spray, Seed Flare, Metal Sound
|
||||
|
||||
# --- 050-05F: Stat stage manipulation / type & ability changes ----------------
|
||||
RESET_TARGET_STAT_STAGES = "050" # Clear Smog
|
||||
RESET_ALL_STAT_STAGES = "051" # Haze
|
||||
SWAP_ATTACK_STAGES = "052" # Power Swap
|
||||
SWAP_DEFENSE_STAGES = "053" # Guard Swap
|
||||
SWAP_ALL_STAGES = "054" # Heart Swap
|
||||
COPY_TARGET_STAGES = "055" # Psych Up
|
||||
PREVENT_STAT_DROPS = "056" # Mist
|
||||
SWAP_USER_ATK_DEF = "057" # Power Trick
|
||||
AVERAGE_ATTACK_STATS = "058" # Power Split
|
||||
AVERAGE_DEFENSE_STATS = "059" # Guard Split
|
||||
AVERAGE_HP = "05A" # Pain Split
|
||||
TAILWIND = "05B" # Tailwind
|
||||
MIMIC = "05C" # Mimic
|
||||
SKETCH = "05D" # Sketch
|
||||
CHANGE_TYPE_TO_MOVE = "05E" # Conversion
|
||||
CHANGE_TYPE_TO_RESIST = "05F" # Conversion 2
|
||||
|
||||
# --- 060-06F: Type / ability changes, fixed damage ---------------------------
|
||||
CHANGE_TYPE_BY_ENVIRONMENT = "060" # Camouflage
|
||||
TARGET_BECOMES_WATER = "061" # Soak
|
||||
COPY_TARGET_TYPE = "062" # Reflect Type
|
||||
TARGET_ABILITY_SIMPLE = "063" # Simple Beam
|
||||
TARGET_ABILITY_INSOMNIA = "064" # Worry Seed
|
||||
USER_COPY_TARGET_ABILITY = "065" # Role Play
|
||||
TARGET_COPY_USER_ABILITY = "066" # Entrainment
|
||||
SWAP_ABILITIES = "067" # Skill Swap
|
||||
NEGATE_TARGET_ABILITY = "068" # Gastro Acid
|
||||
TRANSFORM = "069" # Transform
|
||||
FIXED_DAMAGE_20 = "06A" # Sonic Boom
|
||||
FIXED_DAMAGE_40 = "06B" # Dragon Rage
|
||||
FIXED_DAMAGE_HALF_TARGET_HP = "06C" # Super Fang, Nature's Madness
|
||||
FIXED_DAMAGE_USER_LEVEL = "06D" # Seismic Toss, Night Shade
|
||||
FIXED_DAMAGE_MATCH_USER_HP = "06E" # Endeavor
|
||||
FIXED_DAMAGE_RANDOM_LEVEL = "06F" # Psywave
|
||||
|
||||
# --- 070-07F: OHKO, counters, conditional power ----------------------------------
|
||||
ONE_HIT_KO = "070" # Fissure, Sheer Cold, Guillotine, Horn Drill
|
||||
COUNTER_PHYSICAL = "071" # Counter
|
||||
COUNTER_SPECIAL = "072" # Mirror Coat
|
||||
COUNTER_LAST_DAMAGE = "073" # Metal Burst
|
||||
DAMAGE_TARGET_ALLY = "074" # Flame Burst
|
||||
DOUBLE_POWER_VS_DIVE = "075" # Surf
|
||||
DOUBLE_POWER_VS_DIG = "076" # Earthquake
|
||||
DOUBLE_POWER_VS_FLYING_GUST = "077" # Gust
|
||||
DOUBLE_POWER_VS_FLYING_TWISTER = "078" # Twister (also flinches)
|
||||
DOUBLE_POWER_AFTER_FUSION_FLARE = "079" # Fusion Bolt
|
||||
DOUBLE_POWER_AFTER_FUSION_BOLT = "07A" # Fusion Flare
|
||||
DOUBLE_POWER_IF_POISONED = "07B" # Venoshock
|
||||
DOUBLE_POWER_IF_PARALYZED = "07C" # Smelling Salts
|
||||
DOUBLE_POWER_IF_ASLEEP = "07D" # Wake-Up Slap
|
||||
DOUBLE_POWER_IF_USER_STATUS = "07E" # Facade
|
||||
DOUBLE_POWER_IF_TARGET_STATUS = "07F" # Hex
|
||||
|
||||
# --- 080-08F: Conditional / variable power ------------------------------------------
|
||||
DOUBLE_POWER_IF_TARGET_HALF_HP = "080" # Brine
|
||||
DOUBLE_POWER_IF_USER_HIT = "081" # Revenge, Avalanche
|
||||
DOUBLE_POWER_IF_TARGET_DAMAGED = "082" # Assurance
|
||||
ROUND = "083" # Round
|
||||
DOUBLE_POWER_IF_TARGET_MOVED = "084" # Payback
|
||||
DOUBLE_POWER_IF_ALLY_FAINTED = "085" # Retaliate
|
||||
DOUBLE_POWER_IF_NO_ITEM = "086" # Acrobatics
|
||||
WEATHER_BALL = "087" # Weather Ball
|
||||
PURSUIT = "088" # Pursuit
|
||||
POWER_BY_HAPPINESS = "089" # Return
|
||||
POWER_BY_LOW_HAPPINESS = "08A" # Frustration
|
||||
POWER_BY_USER_HP = "08B" # Eruption, Water Spout
|
||||
POWER_BY_TARGET_HP = "08C" # Crush Grip, Wring Out
|
||||
POWER_BY_SPEED_DIFF_SLOWER = "08D" # Gyro Ball
|
||||
POWER_BY_USER_STAT_BOOSTS = "08E" # Power Trip, Stored Power
|
||||
POWER_BY_TARGET_STAT_BOOSTS = "08F" # Punishment
|
||||
|
||||
# --- 090-09F: Variable power / field effects ----------------------------------------
|
||||
HIDDEN_POWER = "090" # Hidden Power
|
||||
POWER_DOUBLES_CONSECUTIVE = "091" # Fury Cutter
|
||||
POWER_BY_CONSECUTIVE_TURNS = "092" # Echoed Voice
|
||||
RAGE = "093" # Rage
|
||||
PRESENT = "094" # Present
|
||||
MAGNITUDE = "095" # Magnitude
|
||||
NATURAL_GIFT = "096" # Natural Gift
|
||||
POWER_BY_LOW_PP = "097" # Trump Card
|
||||
POWER_BY_LOW_USER_HP = "098" # Flail, Reversal
|
||||
POWER_BY_SPEED_DIFF_FASTER = "099" # Electro Ball
|
||||
POWER_BY_TARGET_WEIGHT = "09A" # Low Kick, Grass Knot
|
||||
POWER_BY_WEIGHT_DIFF = "09B" # Heat Crash, Heavy Slam
|
||||
HELPING_HAND = "09C" # Helping Hand
|
||||
MUD_SPORT = "09D" # Mud Sport
|
||||
WATER_SPORT = "09E" # Water Sport
|
||||
TYPE_BY_HELD_ITEM = "09F" # Judgment, Multi-Attack, Techno Blast
|
||||
|
||||
# --- 0A0-0AF: Crits, screens, accuracy, protection, move copying ---------------------
|
||||
ALWAYS_CRITICAL_HIT = "0A0" # Frost Breath, Storm Throw
|
||||
LUCKY_CHANT = "0A1" # Lucky Chant
|
||||
REFLECT = "0A2" # Reflect
|
||||
LIGHT_SCREEN = "0A3" # Light Screen
|
||||
SECRET_POWER = "0A4" # Secret Power
|
||||
ALWAYS_HITS = "0A5" # Swift, Aerial Ace, Aura Sphere, Shock Wave, Magical Leaf...
|
||||
LOCK_ON = "0A6" # Lock-On, Mind Reader
|
||||
FORESIGHT = "0A7" # Foresight, Odor Sleuth
|
||||
MIRACLE_EYE = "0A8" # Miracle Eye
|
||||
IGNORE_DEFENSE_STAGES = "0A9" # Chip Away, Darkest Lariat, Sacred Sword
|
||||
PROTECT = "0AA" # Protect, Detect
|
||||
QUICK_GUARD = "0AB" # Quick Guard
|
||||
WIDE_GUARD = "0AC" # Wide Guard
|
||||
FEINT = "0AD" # Feint
|
||||
MIRROR_MOVE = "0AE" # Mirror Move
|
||||
COPYCAT = "0AF" # Copycat
|
||||
|
||||
# --- 0B0-0BF: Move calling, disruption, multi-hit ------------------------------------
|
||||
ME_FIRST = "0B0" # Me First
|
||||
MAGIC_COAT = "0B1" # Magic Coat
|
||||
SNATCH = "0B2" # Snatch
|
||||
NATURE_POWER = "0B3" # Nature Power
|
||||
RANDOM_MOVE_WHILE_ASLEEP = "0B4" # Sleep Talk
|
||||
ASSIST = "0B5" # Assist
|
||||
METRONOME = "0B6" # Metronome
|
||||
TORMENT = "0B7" # Torment
|
||||
IMPRISON = "0B8" # Imprison
|
||||
DISABLE = "0B9" # Disable
|
||||
TAUNT = "0BA" # Taunt
|
||||
HEAL_BLOCK = "0BB" # Heal Block
|
||||
ENCORE = "0BC" # Encore
|
||||
HIT_TWICE = "0BD" # Double Kick, Dual Chop, Bonemerang, Double Hit, Gear Grind
|
||||
HIT_TWICE_POISON = "0BE" # Twineedle
|
||||
HIT_THREE_TIMES_POWER_UP = "0BF" # Triple Kick
|
||||
|
||||
# --- 0C0-0CF: Multi-hit, recharge, two-turn moves --------------------------------------
|
||||
HIT_2_TO_5_TIMES = "0C0" # Fury Attack, Bullet Seed, Rock Blast, Icicle Spear, Pin Missile...
|
||||
BEAT_UP = "0C1" # Beat Up
|
||||
RECHARGE_NEXT_TURN = "0C2" # Hyper Beam, Giga Impact, Blast Burn, Frenzy Plant, Hydro Cannon...
|
||||
TWO_TURN_RAZOR_WIND = "0C3" # Razor Wind
|
||||
TWO_TURN_SOLAR_BEAM = "0C4" # Solar Beam, Solar Blade
|
||||
TWO_TURN_FREEZE_SHOCK = "0C5" # Freeze Shock
|
||||
TWO_TURN_ICE_BURN = "0C6" # Ice Burn
|
||||
TWO_TURN_SKY_ATTACK = "0C7" # Sky Attack
|
||||
TWO_TURN_SKULL_BASH = "0C8" # Skull Bash
|
||||
TWO_TURN_FLY = "0C9" # Fly
|
||||
TWO_TURN_DIG = "0CA" # Dig
|
||||
TWO_TURN_DIVE = "0CB" # Dive
|
||||
TWO_TURN_BOUNCE = "0CC" # Bounce
|
||||
TWO_TURN_SHADOW_FORCE = "0CD" # Shadow Force
|
||||
TWO_TURN_SKY_DROP = "0CE" # Sky Drop
|
||||
TRAP_TARGET = "0CF" # Bind, Wrap, Clamp, Fire Spin, Magma Storm, Sand Tomb, Infestation
|
||||
|
||||
# --- 0D0-0DF: Trapping, rampage, healing / draining ----------------------------------------
|
||||
TRAP_TARGET_WHIRLPOOL = "0D0" # Whirlpool
|
||||
UPROAR = "0D1" # Uproar
|
||||
RAMPAGE_THEN_CONFUSE = "0D2" # Outrage, Petal Dance, Thrash
|
||||
ROLLOUT = "0D3" # Rollout, Ice Ball
|
||||
BIDE = "0D4" # Bide
|
||||
HEAL_USER_HALF = "0D5" # Recover, Slack Off, Soft-Boiled, Milk Drink, Heal Order
|
||||
HEAL_USER_HALF_ROOST = "0D6" # Roost
|
||||
WISH = "0D7" # Wish
|
||||
HEAL_USER_BY_WEATHER = "0D8" # Moonlight, Morning Sun, Synthesis
|
||||
REST = "0D9" # Rest
|
||||
AQUA_RING = "0DA" # Aqua Ring
|
||||
INGRAIN = "0DB" # Ingrain
|
||||
LEECH_SEED = "0DC" # Leech Seed
|
||||
DRAIN_HALF_DAMAGE = "0DD" # Absorb, Giga Drain, Drain Punch, Horn Leech, Leech Life...
|
||||
DREAM_EATER = "0DE" # Dream Eater
|
||||
HEAL_TARGET_HALF = "0DF" # Heal Pulse
|
||||
|
||||
# --- 0E0-0EF: Self-KO, switching, trapping -------------------------------------------------
|
||||
USER_FAINTS_EXPLODE = "0E0" # Explosion, Self-Destruct
|
||||
FINAL_GAMBIT = "0E1" # Final Gambit
|
||||
MEMENTO = "0E2" # Memento
|
||||
HEALING_WISH = "0E3" # Healing Wish
|
||||
LUNAR_DANCE = "0E4" # Lunar Dance
|
||||
PERISH_SONG = "0E5" # Perish Song
|
||||
GRUDGE = "0E6" # Grudge
|
||||
DESTINY_BOND = "0E7" # Destiny Bond
|
||||
ENDURE = "0E8" # Endure
|
||||
NON_LETHAL_HIT = "0E9" # False Swipe, Hold Back
|
||||
TELEPORT = "0EA" # Teleport
|
||||
FORCE_SWITCH_STATUS = "0EB" # Roar, Whirlwind
|
||||
FORCE_SWITCH_DAMAGE = "0EC" # Dragon Tail, Circle Throw
|
||||
BATON_PASS = "0ED" # Baton Pass
|
||||
SWITCH_OUT_AFTER_HIT = "0EE" # U-turn, Volt Switch
|
||||
PREVENT_ESCAPE = "0EF" # Mean Look, Block, Spider Web, Anchor Shot, Spirit Shackle...
|
||||
|
||||
# --- 0F0-0FF: Items, recoil, weather ---------------------------------------------------------
|
||||
KNOCK_OFF = "0F0" # Knock Off
|
||||
STEAL_ITEM = "0F1" # Thief, Covet
|
||||
SWAP_ITEMS = "0F2" # Trick, Switcheroo
|
||||
BESTOW = "0F3" # Bestow
|
||||
EAT_TARGET_BERRY = "0F4" # Bug Bite, Pluck
|
||||
DESTROY_TARGET_BERRY = "0F5" # Incinerate
|
||||
RECYCLE = "0F6" # Recycle
|
||||
FLING = "0F7" # Fling
|
||||
EMBARGO = "0F8" # Embargo
|
||||
MAGIC_ROOM = "0F9" # Magic Room
|
||||
RECOIL_QUARTER = "0FA" # Take Down, Submission, Wild Charge, Head Charge
|
||||
RECOIL_THIRD = "0FB" # Double-Edge, Brave Bird, Wood Hammer
|
||||
RECOIL_HALF = "0FC" # Head Smash, Light of Ruin
|
||||
RECOIL_THIRD_PARALYZE = "0FD" # Volt Tackle
|
||||
RECOIL_THIRD_BURN = "0FE" # Flare Blitz
|
||||
WEATHER_SUN = "0FF" # Sunny Day
|
||||
|
||||
# --- 100-10F: Weather, hazards, misc ----------------------------------------------------------
|
||||
WEATHER_RAIN = "100" # Rain Dance
|
||||
WEATHER_SANDSTORM = "101" # Sandstorm
|
||||
WEATHER_HAIL = "102" # Hail
|
||||
HAZARD_SPIKES = "103" # Spikes
|
||||
HAZARD_TOXIC_SPIKES = "104" # Toxic Spikes
|
||||
HAZARD_STEALTH_ROCK = "105" # Stealth Rock
|
||||
PLEDGE_GRASS = "106" # Grass Pledge
|
||||
PLEDGE_FIRE = "107" # Fire Pledge
|
||||
PLEDGE_WATER = "108" # Water Pledge
|
||||
PAY_DAY = "109" # Pay Day
|
||||
BREAK_SCREENS = "10A" # Brick Break, Psychic Fangs
|
||||
CRASH_DAMAGE_ON_MISS = "10B" # Jump Kick, High Jump Kick
|
||||
SUBSTITUTE = "10C" # Substitute
|
||||
CURSE = "10D" # Curse
|
||||
SPITE = "10E" # Spite
|
||||
NIGHTMARE = "10F" # Nightmare
|
||||
|
||||
# --- 110-11F: Misc, stockpile, redirect, field effects ----------------------------------------
|
||||
RAPID_SPIN = "110" # Rapid Spin
|
||||
DELAYED_ATTACK = "111" # Future Sight, Doom Desire
|
||||
STOCKPILE = "112" # Stockpile
|
||||
SPIT_UP = "113" # Spit Up
|
||||
SWALLOW = "114" # Swallow
|
||||
FAILS_IF_USER_HIT = "115" # Focus Punch
|
||||
FAILS_IF_TARGET_NOT_ATTACKING = "116" # Sucker Punch
|
||||
REDIRECT_ATTACKS_TO_USER = "117" # Follow Me, Rage Powder
|
||||
GRAVITY = "118" # Gravity
|
||||
MAGNET_RISE = "119" # Magnet Rise
|
||||
TELEKINESIS = "11A" # Telekinesis
|
||||
HITS_FLYING_TARGETS = "11B" # Sky Uppercut
|
||||
GROUND_TARGET = "11C" # Smack Down, Thousand Arrows
|
||||
AFTER_YOU = "11D" # After You
|
||||
QUASH = "11E" # Quash
|
||||
TRICK_ROOM = "11F" # Trick Room
|
||||
|
||||
# --- 120-12F: Misc (126-132 are reserved for Shadow moves) --------------------------------------
|
||||
ALLY_SWITCH = "120" # Ally Switch
|
||||
USE_TARGET_ATTACK = "121" # Foul Play
|
||||
USE_TARGET_DEFENSE = "122" # Psyshock, Psystrike, Secret Sword
|
||||
DAMAGE_SAME_TYPE_ONLY = "123" # Synchronoise
|
||||
WONDER_ROOM = "124" # Wonder Room
|
||||
LAST_RESORT = "125" # Last Resort
|
||||
# 126-132: reserved for Shadow moves (no constants defined)
|
||||
|
||||
# --- 133-13F: Gen 6 moves --------------------------------------------------------------------
|
||||
HOLD_HANDS = "133" # Hold Hands
|
||||
CELEBRATE = "134" # Celebrate
|
||||
FREEZE_SUPER_EFFECTIVE_WATER = "135" # Freeze-Dry
|
||||
USER_DEFENSE_UP_2_DIAMOND_STORM = "136" # Diamond Storm
|
||||
MAGNETIC_FLUX = "137" # Magnetic Flux
|
||||
AROMATIC_MIST = "138" # Aromatic Mist
|
||||
TARGET_ATTACK_DOWN_1_NEVER_MISS = "139" # Play Nice
|
||||
TARGET_ATK_SP_ATK_DOWN_1 = "13A" # Noble Roar, Tearful Look
|
||||
HYPERSPACE_FURY = "13B" # Hyperspace Fury
|
||||
TARGET_SP_ATK_DOWN_1_NEVER_MISS = "13C" # Confide
|
||||
TARGET_SP_ATK_DOWN_2_PLAIN = "13D" # Eerie Impulse
|
||||
ROTOTILLER = "13E" # Rototiller
|
||||
FLOWER_SHIELD = "13F" # Flower Shield
|
||||
|
||||
# --- 140-14F ----------------------------------------------------------------------------------
|
||||
VENOM_DRENCH = "140" # Venom Drench
|
||||
TOPSY_TURVY = "141" # Topsy-Turvy
|
||||
ADD_GHOST_TYPE = "142" # Trick-or-Treat
|
||||
ADD_GRASS_TYPE = "143" # Forest's Curse
|
||||
FLYING_PRESS = "144" # Flying Press
|
||||
ELECTRIFY = "145" # Electrify
|
||||
ION_DELUGE = "146" # Ion Deluge, Plasma Fists
|
||||
HYPERSPACE_HOLE = "147" # Hyperspace Hole
|
||||
POWDER = "148" # Powder
|
||||
MAT_BLOCK = "149" # Mat Block
|
||||
CRAFTY_SHIELD = "14A" # Crafty Shield
|
||||
KINGS_SHIELD = "14B" # King's Shield
|
||||
SPIKY_SHIELD = "14C" # Spiky Shield
|
||||
TWO_TURN_PHANTOM_FORCE = "14D" # Phantom Force
|
||||
GEOMANCY = "14E" # Geomancy
|
||||
DRAIN_THREE_QUARTERS_DAMAGE = "14F" # Draining Kiss, Oblivion Wing
|
||||
|
||||
# --- 150-15F ----------------------------------------------------------------------------------
|
||||
FELL_STINGER = "150" # Fell Stinger
|
||||
PARTING_SHOT = "151" # Parting Shot
|
||||
FAIRY_LOCK = "152" # Fairy Lock
|
||||
HAZARD_STICKY_WEB = "153" # Sticky Web
|
||||
TERRAIN_ELECTRIC = "154" # Electric Terrain
|
||||
TERRAIN_GRASSY = "155" # Grassy Terrain
|
||||
TERRAIN_MISTY = "156" # Misty Terrain
|
||||
HAPPY_HOUR = "157" # Happy Hour
|
||||
BELCH = "158" # Belch
|
||||
TOXIC_THREAD = "159" # Toxic Thread
|
||||
SPARKLING_ARIA = "15A" # Sparkling Aria
|
||||
PURIFY = "15B" # Purify
|
||||
GEAR_UP = "15C" # Gear Up
|
||||
SPECTRAL_THIEF = "15D" # Spectral Thief
|
||||
LASER_FOCUS = "15E" # Laser Focus
|
||||
USER_DEFENSE_DOWN_1 = "15F" # Clanging Scales
|
||||
|
||||
# --- 160-16F ----------------------------------------------------------------------------------
|
||||
STRENGTH_SAP = "160" # Strength Sap
|
||||
SPEED_SWAP = "161" # Speed Swap
|
||||
BURN_UP = "162" # Burn Up
|
||||
IGNORE_ABILITIES = "163" # Moongeist Beam, Sunsteel Strike
|
||||
PHOTON_GEYSER = "164" # Photon Geyser
|
||||
CORE_ENFORCER = "165" # Core Enforcer
|
||||
DOUBLE_POWER_IF_LAST_MOVE_FAILED = "166" # Stomping Tantrum
|
||||
AURORA_VEIL = "167" # Aurora Veil
|
||||
BANEFUL_BUNKER = "168" # Baneful Bunker
|
||||
REVELATION_DANCE = "169" # Revelation Dance
|
||||
SPOTLIGHT = "16A" # Spotlight
|
||||
INSTRUCT = "16B" # Instruct
|
||||
THROAT_CHOP = "16C" # Throat Chop
|
||||
HEAL_USER_HALF_SANDSTORM_BOOST = "16D" # Shore Up
|
||||
HEAL_TARGET_HALF_GRASSY_BOOST = "16E" # Floral Healing
|
||||
POLLEN_PUFF = "16F" # Pollen Puff
|
||||
|
||||
# --- 170-175 ----------------------------------------------------------------------------------
|
||||
MIND_BLOWN = "170" # Mind Blown
|
||||
SHELL_TRAP = "171" # Shell Trap
|
||||
BEAK_BLAST = "172" # Beak Blast
|
||||
TERRAIN_PSYCHIC = "173" # Psychic Terrain
|
||||
FAILS_AFTER_FIRST_TURN = "174" # First Impression
|
||||
HIT_TWICE_FLINCH = "175" # Double Iron Bash
|
||||
|
||||
# New custom function codes should start at 176 (or high values like 500+).
|
||||
end
|
||||
File diff suppressed because it is too large
Load Diff
@@ -272,44 +272,49 @@ class PokemonDataBox < SpriteWrapper
|
||||
end
|
||||
|
||||
# Draw type icons (foe Pokémon only)
|
||||
if @battler.opposes?(0) && $PokemonSystem.type_icons
|
||||
if @battler.opposes?(0) && $PokemonSystem.type_icons_opponent
|
||||
drawEnemyTypeIcons(imagePos)
|
||||
end
|
||||
if @battler.pbOwnedByPlayer? && $PokemonSystem.type_icons_player
|
||||
drawPlayerTypeIcons(imagePos)
|
||||
end
|
||||
|
||||
pbDrawImagePositions(self.bitmap, imagePos)
|
||||
refreshHP
|
||||
refreshExp
|
||||
end
|
||||
|
||||
def drawEnemyTypeIcons(imagePos)
|
||||
def drawTypeIcons(imagePos, x_position, first_icon_y_position, wrap_direction)
|
||||
return if @battler.is_a?(PokeBattle_FakeBattler)
|
||||
type1_number = GameData::Type.get(@battler.type1).id_number
|
||||
type2_number = GameData::Type.get(@battler.type2).id_number
|
||||
|
||||
vertical_margin = 2
|
||||
iconHeight = 19
|
||||
|
||||
type_icons_x_position = @spriteBaseX + 210
|
||||
type1_icon_y_position = 16
|
||||
type2_icon_y_position = type1_icon_y_position + vertical_margin + iconHeight
|
||||
|
||||
type1_y_offset = type1_number * iconHeight
|
||||
type2_y_offset = type2_number * iconHeight
|
||||
types_icon_path = "Graphics/Pictures/Battle/typesSmall"
|
||||
y_position = first_icon_y_position
|
||||
x_offset = 0
|
||||
|
||||
types_icon_path = "Graphics/Pictures/Battle/typesSmall"
|
||||
if type1_number == type2_number
|
||||
imagePos.push([types_icon_path, type_icons_x_position, type1_icon_y_position,
|
||||
x_offset, type1_y_offset, -1, iconHeight])
|
||||
else
|
||||
imagePos.push([types_icon_path, type_icons_x_position,
|
||||
type1_icon_y_position,
|
||||
x_offset,
|
||||
type1_y_offset, -1, iconHeight]
|
||||
)
|
||||
imagePos.push([types_icon_path, type_icons_x_position, type2_icon_y_position,
|
||||
x_offset,
|
||||
type2_y_offset, -1, iconHeight])
|
||||
end
|
||||
illusion = @battler.effects[PBEffects::Illusion]
|
||||
types = illusion ? [ illusion.type1, illusion.type2 ] : @battler.pbTypes(true)
|
||||
types.uniq.each { |type|
|
||||
type_number = GameData::Type.get(type).id_number
|
||||
type_y_offset = type_number * iconHeight
|
||||
imagePos.push([types_icon_path, x_position, y_position,
|
||||
x_offset, type_y_offset, -1, iconHeight])
|
||||
|
||||
y_position += vertical_margin + iconHeight
|
||||
if y_position + iconHeight > self.bitmap.height
|
||||
y_position = first_icon_y_position
|
||||
x_position += (vertical_margin + iconHeight) * wrap_direction
|
||||
end
|
||||
}
|
||||
end
|
||||
|
||||
def drawEnemyTypeIcons(imagePos)
|
||||
drawTypeIcons(imagePos, @spriteBaseX + 210, 16, 1)
|
||||
end
|
||||
|
||||
def drawPlayerTypeIcons(imagePos)
|
||||
drawTypeIcons(imagePos, @spriteBaseX -20, 16, -1)
|
||||
end
|
||||
|
||||
def refreshHP
|
||||
|
||||
@@ -211,14 +211,21 @@ class PokeBattle_Scene
|
||||
else
|
||||
x = 200
|
||||
y = 380
|
||||
# Partner trainer's sprite
|
||||
trainerFile = GameData::TrainerType.front_sprite_filename(trainerType)
|
||||
echoln ""
|
||||
echoln "-------"
|
||||
echoln trainerFile
|
||||
echoln trainerType
|
||||
if trainerType == :RIVAL1 && Settings::HOENN
|
||||
trainer_sprite = IconSprite.new(x,y,@viewport)
|
||||
trainer_sprite.setBitmapDirectly(generate_front_trainer_sprite_bitmap_from_appearance($Trainer.rival_appearance))
|
||||
else
|
||||
# Partner trainer's sprite
|
||||
trainerFile = GameData::TrainerType.front_sprite_filename(trainerType)
|
||||
echoln ""
|
||||
echoln "-------"
|
||||
echoln trainerFile
|
||||
|
||||
trainer_sprite = IconSprite.new(x,y,@viewport)
|
||||
trainer_sprite.setBitmap(trainerFile)
|
||||
trainer_sprite = IconSprite.new(x,y,@viewport)
|
||||
trainer_sprite.setBitmap(trainerFile)
|
||||
|
||||
end
|
||||
trainer_sprite.zoom_x=2
|
||||
trainer_sprite.zoom_y=2
|
||||
trainer_sprite.z = 30 + idxTrainer
|
||||
|
||||
@@ -7,9 +7,10 @@ class PokeBattle_FakeBattler
|
||||
attr_reader :pokemon
|
||||
attr_reader :owned
|
||||
|
||||
def initialize(battle,index)
|
||||
def initialize(battle,index,pokemon=nil)
|
||||
@battle = battle
|
||||
@pokemon = battle.party2[0]
|
||||
@pokemon = pokemon
|
||||
@pokemon = battle.party2[0] unless pokemon
|
||||
@index = index
|
||||
end
|
||||
|
||||
@@ -25,6 +26,10 @@ class PokeBattle_FakeBattler
|
||||
def shiny?; return @pokemon.shiny?; end
|
||||
alias isShiny? shiny?
|
||||
|
||||
def pbOwnedByPlayer?
|
||||
return @battle.pbOwnedByPlayer?(@index)
|
||||
end
|
||||
|
||||
def isSpecies?(check_species)
|
||||
return @pokemon && @pokemon.isSpecies?(check_species)
|
||||
end
|
||||
@@ -348,6 +353,10 @@ class PokeBattle_SafariZone
|
||||
return 30-@ballCount
|
||||
end
|
||||
|
||||
def pbOwnedByPlayer?(idxBattler)
|
||||
return
|
||||
end
|
||||
|
||||
def defaultWeather=(value); @weather = value; end
|
||||
def defaultTerrain=(value); end
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user