ruins of alph hidden chamber fix

This commit is contained in:
infinitefusion
2022-03-05 14:25:18 -05:00
parent 1aba4df441
commit ecb79c6336
12 changed files with 75 additions and 6 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -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

View File

@@ -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

View File

@@ -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?

View File

@@ -377,3 +377,59 @@ def Kernel.getRoamingMap(roamingArrayPos)
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

Binary file not shown.

Binary file not shown.

View File

@@ -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,