diff --git a/Data/Map529.rxdata b/Data/Map529.rxdata index 1345d5b6e..4e8053299 100644 Binary files a/Data/Map529.rxdata and b/Data/Map529.rxdata differ diff --git a/Data/Map564.rxdata b/Data/Map564.rxdata index c1fe46ddd..179436b06 100644 Binary files a/Data/Map564.rxdata and b/Data/Map564.rxdata differ diff --git a/Data/Map610.rxdata b/Data/Map610.rxdata index 1f6c519aa..c0d4c24c6 100644 Binary files a/Data/Map610.rxdata and b/Data/Map610.rxdata differ diff --git a/Data/Map677.rxdata b/Data/Map677.rxdata index b48181368..2ff0b1354 100644 Binary files a/Data/Map677.rxdata and b/Data/Map677.rxdata differ diff --git a/Data/MapInfos.rxdata b/Data/MapInfos.rxdata index 19684b2e8..04c014161 100644 Binary files a/Data/MapInfos.rxdata and b/Data/MapInfos.rxdata differ diff --git a/Data/Scripts/011_Battle/002_Move/006_Move_Effects_080-0FF.rb b/Data/Scripts/011_Battle/002_Move/006_Move_Effects_080-0FF.rb index 7c5ab3970..2f8102053 100644 --- a/Data/Scripts/011_Battle/002_Move/006_Move_Effects_080-0FF.rb +++ b/Data/Scripts/011_Battle/002_Move/006_Move_Effects_080-0FF.rb @@ -243,20 +243,20 @@ end #=============================================================================== class PokeBattle_Move_090 < PokeBattle_Move def pbBaseType(user) - hp = pbHiddenPower(user) + hp = pbHiddenPower(user,user.hiddenPowerType) return hp[0] end def pbBaseDamage(baseDmg,user,target) return super if Settings::MECHANICS_GENERATION >= 6 - hp = pbHiddenPower(user) + hp = pbHiddenPower(user,user.hiddenPowerType) return hp[1] end end -def pbHiddenPower(pkmn) +def pbHiddenPower(pkmn,forcedType=nil) # NOTE: This allows Hidden Power to be Fairy-type (if you have that type in # your game). I don't care that the official games don't work like that. iv = pkmn.iv @@ -283,6 +283,9 @@ def pbHiddenPower(pkmn) power |= (iv[:SPECIAL_DEFENSE]&2)<<4 power = powerMin+(powerMax-powerMin)*power/63 end + if forcedType != nil + return [forcedType,power] + end return [type,power] end diff --git a/Data/Scripts/014_Pokemon/001_Pokemon.rb b/Data/Scripts/014_Pokemon/001_Pokemon.rb index 84154dc73..64d501ac9 100644 --- a/Data/Scripts/014_Pokemon/001_Pokemon.rb +++ b/Data/Scripts/014_Pokemon/001_Pokemon.rb @@ -86,6 +86,8 @@ class Pokemon # @return [Integer] this Pokémon's personal ID attr_accessor :personalID + attr_accessor :hiddenPowerType + # Max total IVs IV_STAT_LIMIT = 31 # Max total EVs @@ -118,6 +120,9 @@ class Pokemon #============================================================================= # Species and form #============================================================================= + def hiddenPower=(type) + @hiddenPowerType = type + end # Changes the Pokémon's species and re-calculates its statistics. # @param species_id [Integer] id of the species to change this Pokémon to @@ -1150,6 +1155,8 @@ class Pokemon @iv = {} @ivMaxed = {} @ev = {} + @hiddenPowerType = nil + GameData::Stat.each_main do |s| @iv[s.id] = rand(IV_STAT_LIMIT + 1) @ev[s.id] = 0 diff --git a/Data/Scripts/019_Utilities/001_Utilities.rb b/Data/Scripts/019_Utilities/001_Utilities.rb index fddc4dc01..8397dae57 100644 --- a/Data/Scripts/019_Utilities/001_Utilities.rb +++ b/Data/Scripts/019_Utilities/001_Utilities.rb @@ -432,7 +432,7 @@ def pbMoveTutorAnnotations(move, movelist = nil) return ret end -def pbMoveTutorChoose(move,movelist=nil,bymachine=false,oneusemachine=false) +def pbMoveTutorChoose(move,movelist=nil,bymachine=false,oneusemachine=false,selectedPokemonVariable=nil) ret = false move = GameData::Move.get(move).id if movelist!=nil && movelist.is_a?(Array) @@ -450,6 +450,9 @@ def pbMoveTutorChoose(move,movelist=nil,bymachine=false,oneusemachine=false) chosen = screen.pbChoosePokemon break if chosen<0 pokemon = $Trainer.party[chosen] + if selectedPokemonVariable != nil + pbSet(selectedPokemonVariable,pokemon) + end if pokemon.egg? pbMessage(_INTL("Eggs can't be taught any moves.")) { screen.pbUpdate } elsif pokemon.shadowPokemon? diff --git a/Data/Scripts/050_AddOns/GeneralUtils.rb b/Data/Scripts/050_AddOns/GeneralUtils.rb index dba8aeff4..126cd65d9 100644 --- a/Data/Scripts/050_AddOns/GeneralUtils.rb +++ b/Data/Scripts/050_AddOns/GeneralUtils.rb @@ -376,4 +376,60 @@ def Kernel.getRoamingMap(roamingArrayPos) mapinfos=$RPGVX ? load_data("Data/MapInfos.rvdata") : load_data("Data/MapInfos.rxdata") text= mapinfos[curmap].name#,(curmap==$game_map.map_id) ? _INTL("(this map)") : "") return text +end + +def Kernel.listPlatesInBag() + list = [] + list << PBItems::FISTPLATE if $PokemonBag.pbQuantity(:FISTPLATE)>=1 + list << PBItems::SKYPLATE if $PokemonBag.pbQuantity(:SKYPLATE)>=1 + list << PBItems::TOXICPLATE if $PokemonBag.pbQuantity(:TOXICPLATE)>=1 + list << PBItems::EARTHPLATE if $PokemonBag.pbQuantity(:EARTHPLATE)>=1 + list << PBItems::STONEPLATE if $PokemonBag.pbQuantity(:STONEPLATE)>=1 + list << PBItems::INSECTPLATE if $PokemonBag.pbQuantity(:INSECTPLATE)>=1 + list << PBItems::SPOOKYPLATE if $PokemonBag.pbQuantity(:SPOOKYPLATE)>=1 + list << PBItems::IRONPLATE if $PokemonBag.pbQuantity(:IRONPLATE)>=1 + list << PBItems::FLAMEPLATE if $PokemonBag.pbQuantity(:FLAMEPLATE)>=1 + list << PBItems::SPLASHPLATE if $PokemonBag.pbQuantity(:SPLASHPLATE)>=1 + list << PBItems::MEADOWPLATE if $PokemonBag.pbQuantity(:MEADOWPLATE)>=1 + list << PBItems::ZAPPLATE if $PokemonBag.pbQuantity(:ZAPPLATE)>=1 + list << PBItems::MINDPLATE if $PokemonBag.pbQuantity(:MINDPLATE)>=1 + list << PBItems::ICICLEPLATE if $PokemonBag.pbQuantity(:ICICLEPLATE)>=1 + list << PBItems::DRACOPLATE if $PokemonBag.pbQuantity(:DRACOPLATE)>=1 + list << PBItems::DREADPLATE if $PokemonBag.pbQuantity(:DREADPLATE)>=1 + list << PBItems::PIXIEPLATE if $PokemonBag.pbQuantity(:PIXIEPLATE)>=1 + return list +end + +def Kernel.getItemNamesAsString(list) + strList = "" + for i in 0..list.length-1 + id = list[i] + name =PBItems.getName(id) + strList += name + if i != list.length-1 && list.length > 1 + strList += "," + end + end + return strList +end + +def Kernel.getPlateType(item) + return :FIGHTING if item == PBItems::FISTPLATE + return :FLYING if item == PBItems::SKYPLATE + return :POISON if item == PBItems::TOXICPLATE + return :GROUND if item == PBItems::EARTHPLATE + return :ROCK if item == PBItems::STONEPLATE + return :BUG if item == PBItems::INSECTPLATE + return :GHOST if item == PBItems::SPOOKYPLATE + return :STEEL if item == PBItems::IRONPLATE + return :FIRE if item == PBItems::FLAMEPLATE + return :WATER if item == PBItems::SPLASHPLATE + return :GRASS if item == PBItems::MEADOWPLATE + return :ELECTRIC if item == PBItems::ZAPPLATE + return :PSYCHIC if item == PBItems::MINDPLATE + return :ICE if item == PBItems::ICICLEPLATE + return :DRAGON if item == PBItems::DRACOPLATE + return :DARK if item == PBItems::DREADPLATE + return :FAIRY if item == PBItems::PIXIEPLATE + return -1 end \ No newline at end of file diff --git a/Data/System.rxdata b/Data/System.rxdata index 4789b14f6..28fe2c917 100644 Binary files a/Data/System.rxdata and b/Data/System.rxdata differ diff --git a/Data/Tilesets.rxdata b/Data/Tilesets.rxdata index e3795ef66..bf2215b16 100644 Binary files a/Data/Tilesets.rxdata and b/Data/Tilesets.rxdata differ diff --git a/PBS/items.txt b/PBS/items.txt index 5972c08c9..dc69c15e6 100644 --- a/PBS/items.txt +++ b/PBS/items.txt @@ -605,8 +605,8 @@ 597,SACREDPOTION,Secret Potion,Secret Potions,2,7000,"An ancient, secret medicine. It fully revives all fainted Pokémon in a battle.",2,0,0, 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,0, -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,0, +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, 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,