mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
new game plus
This commit is contained in:
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.
@@ -6,7 +6,7 @@
|
||||
module Settings
|
||||
# The version of your game. It has to adhere to the MAJOR.MINOR.PATCH format.
|
||||
GAME_VERSION = '5.0.0'
|
||||
GAME_VERSION_NUMBER = "5.0.16 - beta"
|
||||
GAME_VERSION_NUMBER = "5.0.17 - beta"
|
||||
|
||||
POKERADAR_LIGHT_ANIMATION_RED_ID = 17
|
||||
POKERADAR_LIGHT_ANIMATION_GREEN_ID = 18
|
||||
|
||||
@@ -36,9 +36,50 @@ module Game
|
||||
end
|
||||
end
|
||||
|
||||
#For new game plus - resets everything in boxes/party to level 5 and 1st stage
|
||||
def self.ngp_clean_pc_data(old_storage, old_party)
|
||||
new_storage = old_storage
|
||||
for pokemon in old_party
|
||||
new_storage.pbStoreCaught(pokemon)
|
||||
end
|
||||
|
||||
for box in new_storage.boxes
|
||||
for pokemon in box.pokemon
|
||||
if pokemon != nil
|
||||
if !pokemon.egg?
|
||||
pokemon.level = 5
|
||||
pokemon.species = GameData::Species.get(pokemon.species).get_baby_species(false)
|
||||
pokemon.reset_moves
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
return new_storage
|
||||
end
|
||||
|
||||
#For new game plus - removes key items
|
||||
def self.ngp_clean_item_data(old_bag)
|
||||
new_storage = old_bag
|
||||
new_storage.clear
|
||||
|
||||
for pocket in old_bag.pockets
|
||||
for bagElement in pocket
|
||||
item_id = bagElement[0]
|
||||
item_qt = bagElement[1]
|
||||
item = GameData::Item.get(item_id)
|
||||
p item
|
||||
if !item.is_key_item? && !item.is_HM?
|
||||
new_storage.pbStoreItem(item, 1)
|
||||
end
|
||||
end
|
||||
end
|
||||
return new_storage
|
||||
end
|
||||
|
||||
# Called when starting a new game. Initializes global variables
|
||||
# and transfers the player into the map scene.
|
||||
def self.start_new
|
||||
def self.start_new(ngp_bag = nil, ngp_storage = nil, ngp_trainer = nil)
|
||||
|
||||
if $game_map && $game_map.events
|
||||
$game_map.events.each_value { |event| event.clear_starting }
|
||||
end
|
||||
@@ -53,6 +94,13 @@ module Game
|
||||
$PokemonEncounters.setup($game_map.map_id)
|
||||
$game_map.autoplay
|
||||
$game_map.update
|
||||
#
|
||||
# if ngp_bag != nil
|
||||
# $PokemonBag = ngp_clean_item_data(ngp_bag)
|
||||
# end
|
||||
if ngp_storage != nil
|
||||
$PokemonStorage = ngp_clean_pc_data(ngp_storage, ngp_trainer.party)
|
||||
end
|
||||
end
|
||||
|
||||
# Loads the game from the given save data and starts the map scene.
|
||||
|
||||
@@ -110,8 +110,46 @@ module GameData
|
||||
end
|
||||
end
|
||||
|
||||
# Creates a battle-ready version of a trainer's data.
|
||||
# @return [Array] all information about a trainer in a usable form
|
||||
|
||||
def replaceSingleSpeciesModeIfApplicable(species)
|
||||
if $game_switches[SINGLE_POKEMON_MODE_SWITCH]
|
||||
if $game_switches[SINGLE_POKEMON_MODE_HEAD_SWITCH]
|
||||
return replaceFusionsHeadWithSpecies(species)
|
||||
elsif $game_switches[SINGLE_POKEMON_MODE_BODY_SWITCH]
|
||||
return replaceFusionsBodyWithSpecies(species)
|
||||
elsif $game_switches[SINGLE_POKEMON_MODE_RANDOM_SWITCH]
|
||||
if(rand(2) == 0)
|
||||
return replaceFusionsHeadWithSpecies(species)
|
||||
else
|
||||
return replaceFusionsBodyWithSpecies(species)
|
||||
end
|
||||
end
|
||||
end
|
||||
return species
|
||||
end
|
||||
|
||||
def replaceFusionsHeadWithSpecies(species)
|
||||
speciesId = getDexNumberForSpecies(species)
|
||||
if speciesId > NB_POKEMON
|
||||
bodyPoke = getBodyID(speciesId)
|
||||
headPoke = pbGet(SINGLE_POKEMON_MODE_VAR)
|
||||
newSpecies = bodyPoke*NB_POKEMON+headPoke
|
||||
return getPokemon(newSpecies)
|
||||
end
|
||||
return species
|
||||
end
|
||||
|
||||
def replaceFusionsBodyWithSpecies(species)
|
||||
speciesId = getDexNumberForSpecies(species)
|
||||
if speciesId > NB_POKEMON
|
||||
bodyPoke = pbGet(SINGLE_POKEMON_MODE_VAR)
|
||||
headPoke = getHeadID(species)
|
||||
newSpecies = bodyPoke*NB_POKEMON+headPoke
|
||||
return getPokemon(newSpecies)
|
||||
end
|
||||
return species
|
||||
end
|
||||
|
||||
def to_trainer
|
||||
placeholder_species = [Settings::RIVAL_STARTER_PLACEHOLDER_SPECIES,
|
||||
Settings::VAR_1_PLACEHOLDER_SPECIES,
|
||||
@@ -140,6 +178,7 @@ module GameData
|
||||
if placeholder_species.include?(species)
|
||||
species = replace_species_with_placeholder(species)
|
||||
end
|
||||
species = replaceSingleSpeciesModeIfApplicable(species)
|
||||
if $game_switches[REVERSED_MODE]
|
||||
species = reverseFusionSpecies(species)
|
||||
end
|
||||
@@ -159,6 +198,7 @@ module GameData
|
||||
end
|
||||
####
|
||||
|
||||
|
||||
#trainer rematch infinite fusion edit
|
||||
if isRematch
|
||||
nbRematch = getNumberRematch(rematchId)
|
||||
|
||||
@@ -53,6 +53,7 @@ class PokeBattle_Battler
|
||||
end
|
||||
return if @fainted # Has already fainted properly
|
||||
@battle.pbDisplayBrief(_INTL("{1} fainted!",pbThis)) if showMessage
|
||||
updateSpirits()
|
||||
PBDebug.log("[Pokémon fainted] #{pbThis} (#{@index})") if !showMessage
|
||||
@battle.scene.pbFaintBattler(self)
|
||||
pbInitEffects(false)
|
||||
@@ -80,6 +81,15 @@ class PokeBattle_Battler
|
||||
@battle.pbEndPrimordialWeather
|
||||
end
|
||||
|
||||
def updateSpirits()
|
||||
if $PokemonBag.pbQuantity(:ODDKEYSTONE)>=1 && @pokemon.hasType?(:GHOST)
|
||||
nbSpirits = pbGet(ODDKEYSTONE_NB_VARIABLE)
|
||||
if nbSpirits < 108
|
||||
pbSet(ODDKEYSTONE_NB_VARIABLE,nbSpirits+1)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
#=============================================================================
|
||||
# Move PP
|
||||
#=============================================================================
|
||||
|
||||
@@ -305,7 +305,7 @@ def pbDive
|
||||
move = :DIVE
|
||||
movefinder = $Trainer.get_pokemon_with_move(move)
|
||||
if !pbCheckHiddenMoveBadge(Settings::BADGE_FOR_DIVE, false) || (!$DEBUG && !movefinder)
|
||||
if $PokemonBag.pbQuantity(:SCUBAGEAR)>0
|
||||
if $PokemonBag.pbQuantity(:SCUBAGEAR)<=0
|
||||
pbMessage(_INTL("The sea is deep here. A Pokémon may be able to go underwater."))
|
||||
return false
|
||||
end
|
||||
@@ -343,10 +343,10 @@ def pbSurfacing
|
||||
return if !surface_map_id
|
||||
move = :DIVE
|
||||
movefinder = $Trainer.get_pokemon_with_move(move)
|
||||
if !pbCheckHiddenMoveBadge(Settings::BADGE_FOR_DIVE, false) || (!$DEBUG && !movefinder)
|
||||
pbMessage(_INTL("Light is filtering down from above. A Pokémon may be able to surface here."))
|
||||
return false
|
||||
end
|
||||
# if !pbCheckHiddenMoveBadge(Settings::BADGE_FOR_DIVE, false) || (!$DEBUG && !movefinder)
|
||||
# pbMessage(_INTL("Light is filtering down from above. A Pokémon may be able to surface here."))
|
||||
# return false
|
||||
# end
|
||||
if pbConfirmMessage(_INTL("Light is filtering down from above. Would you like to use Dive?"))
|
||||
speciesname = (movefinder) ? movefinder.name : $Trainer.name
|
||||
pbMessage(_INTL("{1} used {2}!", speciesname, GameData::Move.get(move).name))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class PokemonBox
|
||||
attr_reader :pokemon
|
||||
attr_accessor :pokemon
|
||||
attr_accessor :name
|
||||
attr_accessor :background
|
||||
|
||||
|
||||
@@ -30,7 +30,9 @@ class Player < Trainer
|
||||
attr_accessor :mystery_gift_unlocked
|
||||
# @return [Array<Array>] downloaded Mystery Gift data
|
||||
attr_accessor :mystery_gifts
|
||||
|
||||
attr_accessor :beat_league
|
||||
attr_accessor :new_game_plus_unlocked
|
||||
attr_accessor :new_game_plus
|
||||
def trainer_type
|
||||
if @trainer_type.is_a?(Integer)
|
||||
@trainer_type = GameData::Metadata.get_player(@character_ID || 0)[0]
|
||||
@@ -52,6 +54,13 @@ class Player < Trainer
|
||||
@coins = value.clamp(0, Settings::MAX_COINS)
|
||||
end
|
||||
|
||||
|
||||
def beat_league=(value)
|
||||
@beat_league = value
|
||||
end
|
||||
def new_game_plus_unlocked=(value)
|
||||
@new_game_plus_unlocked = value
|
||||
end
|
||||
# Sets the player's Battle Points amount. It can not exceed
|
||||
# {Settings::MAX_BATTLE_POINTS}.
|
||||
# @param value [Integer] new Battle Points value
|
||||
@@ -72,6 +81,10 @@ class Player < Trainer
|
||||
return @badges.count { |badge| badge == true }
|
||||
end
|
||||
|
||||
|
||||
def new_game_plus=(value)
|
||||
@new_game_plus = value
|
||||
end
|
||||
#=============================================================================
|
||||
|
||||
# (see Pokedex#seen?)
|
||||
@@ -104,5 +117,8 @@ class Player < Trainer
|
||||
@seen_storage_creator = false
|
||||
@mystery_gift_unlocked = false
|
||||
@mystery_gifts = []
|
||||
@beat_league = false
|
||||
@new_game_plus_unlocked = false
|
||||
@new_game_plus = false
|
||||
end
|
||||
end
|
||||
|
||||
@@ -284,6 +284,7 @@ class PokemonLoadScreen
|
||||
cmd_debug = -1
|
||||
cmd_quit = -1
|
||||
show_continue = !@save_data.empty?
|
||||
new_game_plus = @save_data[:player].new_game_plus_unlocked
|
||||
if show_continue
|
||||
commands[cmd_continue = commands.length] = _INTL('Continue')
|
||||
if @save_data[:player].mystery_gift_unlocked
|
||||
@@ -291,6 +292,9 @@ class PokemonLoadScreen
|
||||
end
|
||||
end
|
||||
commands[cmd_new_game = commands.length] = _INTL('New Game')
|
||||
if new_game_plus
|
||||
commands[cmd_new_game_plus = commands.length] = _INTL('New Game +')
|
||||
end
|
||||
commands[cmd_options = commands.length] = _INTL('Options')
|
||||
commands[cmd_language = commands.length] = _INTL('Language') if Settings::LANGUAGES.length >= 2
|
||||
commands[cmd_debug = commands.length] = _INTL('Debug') if $DEBUG
|
||||
@@ -312,6 +316,11 @@ class PokemonLoadScreen
|
||||
@scene.pbEndScene
|
||||
Game.start_new
|
||||
return
|
||||
when cmd_new_game_plus
|
||||
@scene.pbEndScene
|
||||
Game.start_new(@save_data[:bag],@save_data[:storage_system],@save_data[:player])
|
||||
@save_data[:player].new_game_plus_unlocked=true
|
||||
return
|
||||
when cmd_mystery_gift
|
||||
pbFadeOutIn { pbDownloadMysteryGift(@save_data[:player]) }
|
||||
when cmd_options
|
||||
|
||||
@@ -128,6 +128,16 @@ def pbChooseSpeciesList(default = nil)
|
||||
return GameData::Species.get(dexNum)
|
||||
end
|
||||
|
||||
def pbChooseSpeciesTextList(default = nil)
|
||||
commands = []
|
||||
for i in 1..NB_POKEMON
|
||||
species = GameData::Species.get(i)
|
||||
commands.push([species.id_number, species.real_name, species.id])
|
||||
end
|
||||
return pbChooseList(commands, default, nil, -1)
|
||||
end
|
||||
|
||||
|
||||
def pbChooseSpeciesFormList(default = nil)
|
||||
commands = []
|
||||
GameData::Species.each do |s|
|
||||
|
||||
@@ -734,7 +734,7 @@ module Compiler
|
||||
end
|
||||
|
||||
def main
|
||||
#return
|
||||
return
|
||||
return if !$DEBUG
|
||||
begin
|
||||
dataFiles = [
|
||||
|
||||
@@ -49,3 +49,10 @@ DIRECTION_UP = 8
|
||||
|
||||
RACE_BIKE = 984
|
||||
IS_REMATCH_SWITCH=200
|
||||
SINGLE_POKEMON_MODE_SWITCH=790
|
||||
SINGLE_POKEMON_MODE_VAR=251
|
||||
SINGLE_POKEMON_MODE_HEAD_SWITCH=791
|
||||
SINGLE_POKEMON_MODE_BODY_SWITCH=792
|
||||
SINGLE_POKEMON_MODE_RANDOM_SWITCH=793
|
||||
|
||||
ODDKEYSTONE_NB_VARIABLE=252
|
||||
@@ -373,6 +373,29 @@ ItemHandlers::UseFromBag.add(:DEBUGGER, proc { |item|
|
||||
end
|
||||
})
|
||||
|
||||
|
||||
ItemHandlers::UseFromBag.add(:ODDKEYSTONE, proc { |item|
|
||||
TOTAL_SPIRITS_NEEDED = 108
|
||||
nbSpirits = pbGet(ODDKEYSTONE_NB_VARIABLE)
|
||||
if nbSpirits == 107
|
||||
Kernel.pbMessage(_INTL("The Odd Keystone appears to be moving on its own."))
|
||||
Kernel.pbMessage(_INTL("Voices can be heard whispering from it..."))
|
||||
Kernel.pbMessage(_INTL("Just... one... more..."))
|
||||
elsif nbSpirits < TOTAL_SPIRITS_NEEDED
|
||||
nbNeeded = TOTAL_SPIRITS_NEEDED-nbSpirits
|
||||
Kernel.pbMessage(_INTL("Voices can be heard whispering from the Odd Keystone..."))
|
||||
Kernel.pbMessage(_INTL("Bring... us... {1}... spirits",nbNeeded.to_s))
|
||||
else
|
||||
Kernel.pbMessage(_INTL("The Odd Keystone appears to be moving on its own."))
|
||||
Kernel.pbMessage(_INTL("It seems as if some poweful energy is trying to escape from it."))
|
||||
if (Kernel.pbMessage("Let it out?", ["No","Yes"], 0)) == 1
|
||||
pbWildBattle(:SPIRITOMB,27)
|
||||
pbSet(ODDKEYSTONE_NB_VARIABLE,0)
|
||||
end
|
||||
next 1
|
||||
end
|
||||
})
|
||||
|
||||
ItemHandlers::UseFromBag.add(:MAGICBOOTS, proc { |item|
|
||||
if $DEBUG
|
||||
if Kernel.pbConfirmMessageSerious(_INTL("Take off the Magic Boots?"))
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Data/items.dat
BIN
Data/items.dat
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -32,8 +32,8 @@
|
||||
32,CLAWFOSSIL,Claw Fossil,Claw Fossils,1,7000,"A fossil of an ancient Pokémon that lived in the sea. It appears to be part of a claw.",0,0,8,
|
||||
33,SKULLFOSSIL,Skull Fossil,Skull Fossils,1,7000,"A fossil from a prehistoric Pokémon that lived on the land. It appears to be part of a head.",0,0,8,
|
||||
34,ARMORFOSSIL,Armor Fossil,Armor Fossils,1,7000,"A fossil from a prehistoric Pokémon that lived on the land. It appears to be part of a collar.",0,0,8,
|
||||
35,COVERFOSSIL,unknown_item,unknown_item,1,1000,"This item has been removed from the game.",0,0,8,
|
||||
36,PLUMEFOSSIL,unknown_item,unknown_item,1,1000,"This item has been removed from the game.",0,0,8,
|
||||
35,COVERFOSSIL,unknown_item,unknown_item,1,1000,"This item has been removed from the game. It can safely be sold or deleted.",0,0,8,
|
||||
36,PLUMEFOSSIL,unknown_item,unknown_item,1,1000,"This item has been removed from the game. It can safely be sold or deleted.",0,0,8,
|
||||
37,PRETTYWING,Pretty Wing,Pretty Wings,1,1000,"Though this feather is beautiful, it's just a regular feather and has no effect on Pokémon.",0,0,0,
|
||||
38,TINYMUSHROOM,Tiny Mushroom,Tiny Mushrooms,1,400,"A small and edible mushroom. It is sought after by collectors.",0,0,0,
|
||||
39,BIGMUSHROOM,Big Mushroom,Big Mushrooms,1,1000,"A large and rare mushroom. It is sought after by collectors.",0,0,0,
|
||||
@@ -62,7 +62,7 @@
|
||||
62,GOOEYMULCH,Gooey Mulch,Gooey Mulch,1,200,"A fertilizer to be spread on soft soil in regions where Berries are grown. A maniac will buy it for a high price.",0,0,11,
|
||||
63,SHOALSALT,Shoal Salt,Shoal Salts,1,20,"Pure salt that can be discovered deep inside the Shoal Cave. A maniac will buy it for a high price.",0,0,0,
|
||||
64,SHOALSHELL,Shoal Shell,Shoal Shells,1,20,"A pretty seashell that can be found deep inside the Shoal Cave. A maniac will buy it for a high price.",0,0,0,
|
||||
65,ODDKEYSTONE,Odd Keystone,Odd Keystones,1,2100,"A vital item that is needed to keep a stone tower from collapsing. Voices can be heard from it occasionally.",0,0,0,
|
||||
65,ODDKEYSTONE,Odd Keystone,Odd Keystones,8,0,"A vital item that is needed to keep a stone tower from collapsing. Voices can be heard from it occasionally.",2,0,6,
|
||||
66,AIRBALLOON,Air Balloon,Air Balloons,1,4000,"An item to be held by a Pokémon. The holder will float in the air until hit. Once hit, this item will burst.",0,0,0,
|
||||
67,BRIGHTPOWDER,Bright Powder,Bright Powders,1,4000,"An item to be held by a Pokémon. It casts a tricky glare that lowers the opponent's accuracy.",0,0,0,
|
||||
68,EVIOLITE,Eviolite,Eviolites,1,4000,"A mysterious evolutionary lump. When held, it raises the Defense and Sp. Def if the holder can still evolve.",0,0,0,
|
||||
@@ -199,7 +199,7 @@
|
||||
199,SHOCKDRIVE,Shock Drive,Shock Drives,1,1000,"A cassette to be held by Genesect. It changes Techno Blast to an Electric-type move.",0,0,0,
|
||||
200,BURNDRIVE,Burn Drive,Burn Drives,1,1000,"A cassette to be held by Genesect. It changes Techno Blast to a Fire-type move.",0,0,0,
|
||||
201,CHILLDRIVE,Chill Drive,Chill Drives,1,1000,"A cassette to be held by Genesect. It changes Techno Blast to an Ice-type move.",0,0,0,
|
||||
202,EVERSTONE,Everstone,Everstones,1,3000,"An item to be held by a Pokémon. The Pokémon holding this peculiar stone is prevented from evolving.",0,0,0,
|
||||
202,EVERSTONE,Everstone,Everstones,1,300,"An item to be held by a Pokémon. The Pokémon holding this peculiar stone is prevented from evolving.",0,0,0,
|
||||
203,DRAGONSCALE,Dragon Scale,Dragon Scales,1,2000,"A thick and tough scale. Dragon-type Pokémon may be holding this item when caught.",0,0,0,
|
||||
204,UPGRADE,Upgrade,Upgrades,1,2000,"A transparent device filled with all sorts of data. It was produced by Silph Co.",1,0,7,
|
||||
205,DUBIOUSDISC,Dubious Disc,Dubious Discs,1,2000,"A transparent device overflowing with dubious data. Its producer is unknown.",1,0,7,
|
||||
@@ -606,11 +606,11 @@
|
||||
598,ABILITYCAPSULE,Ability Capsule,Ability Capsules,1,25000,"A capsule that allows a Pokémon with two Abilities to switch between these Abilities when it is used.",1,0,0,
|
||||
599,MAGICBOOTS,Magic Boots,Magic Boots,8,0,"A pair of magic boots that allow you to walk anywhere by pressing the CTRL key.",2,0,6,
|
||||
600,ANCIENTSTONE,unknown_item,unknown_items,1,1,This item has been removed from the game.,1,0,7,
|
||||
601,ICESTONE,Ice Stone,Ice Stones,1,2100,A peculiar stone that makes certain species of Pokémon evolve. It is made out of ice.,1,0,7,
|
||||
601,ICESTONE,Ice Stone,Ice Stones,1,5000,A peculiar stone that makes certain species of Pokémon evolve. It is made out of ice.,1,0,7,
|
||||
602,GSBALL,GS Ball,GS Balls,8,0,A mysterious ball. Its powers are unknown.,2,0,6,
|
||||
603,MAGNETPASS,Train Pass,Train Passes,8,0,"A ticket required for riding the Saffron Train. It allows you to ride whenever and however much you'd like.",2,0,6,
|
||||
604,SECRETCAPSULE,Secret Capsule,Secret Capsules,1,0,"A capsule that unlocks a Pokémon's hidden ability",1,0,0,
|
||||
605,ODDKEYSTONE_FULL,Odd Keystone,Odd Keystones,8,0,A vital item that is needed to keep a stone tower from collapsing. It contains 108 spirits.,0,0,0,
|
||||
605,ODDKEYSTONE_FULL,unknown_item,Odd Keystones,1,0,"This item has been removed from the game. It can safely be sold or deleted.",0,0,0,
|
||||
607,DYNAMITE,Dynamite,Dynamites,1,100,"A stick of dynamite. Be careful with it!",1,1,0,
|
||||
606,BERSERKGENE,Berserk Gene,Berserk Genes,8,0,A strange gene. It appears to have some mysterious powers.,2,0,6,
|
||||
608,AZUREFLUTE,Azure Flute,Azure Flutes,8,0,"A flute that puts out echoing sounds that do not seem to be of this world. It is unknown who made it.",2,0,6,
|
||||
|
||||
Reference in New Issue
Block a user