mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Adds hidden ability routes
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -64,6 +64,11 @@ class PokeBattle_Battler
|
||||
return GameData::Ability.try_get(@ability_id)
|
||||
end
|
||||
|
||||
def hasHiddenAbility?
|
||||
return @pokemon.ability_index >= 2
|
||||
end
|
||||
|
||||
|
||||
def ability=(value)
|
||||
new_ability = GameData::Ability.try_get(value)
|
||||
@ability_id = (new_ability) ? new_ability.id : nil
|
||||
|
||||
@@ -42,6 +42,15 @@ class PokeBattle_Scene
|
||||
if @battle.showAnims
|
||||
for i in 0...@battle.sideSizes[1]
|
||||
idxBattler = 2*i+1
|
||||
|
||||
#hidden ability animation
|
||||
if @battle.battlers[idxBattler].hasHiddenAbility?
|
||||
pbCommonAnimation("StatUp",@battle.battlers[idxBattler])
|
||||
@battle.pbShowAbilitySplash(@battle.battlers[idxBattler],true)
|
||||
@battle.pbHideAbilitySplash(@battle.battlers[idxBattler])
|
||||
end
|
||||
|
||||
#shiny animation
|
||||
next if !@battle.battlers[idxBattler] || !@battle.battlers[idxBattler].shiny?
|
||||
pbCommonAnimation("Shiny",@battle.battlers[idxBattler])
|
||||
end
|
||||
|
||||
@@ -729,8 +729,9 @@ class PokemonFusionScene
|
||||
@scene.pbShowPokedex(@newspecies)
|
||||
end
|
||||
#first check if hidden ability
|
||||
hiddenAbility1 = @pokemon1.ability == @pokemon1.getAbilityList[0][-1]
|
||||
hiddenAbility2 = @pokemon2.ability == @pokemon2.getAbilityList[0][-1]
|
||||
# getAbilityList format: [[:ABILITY, index],...]
|
||||
hiddenAbility1 = @pokemon1.ability == @pokemon1.getAbilityList[-1][0]
|
||||
hiddenAbility2 = @pokemon2.ability == @pokemon2.getAbilityList[-1][0]
|
||||
|
||||
#change species
|
||||
@pokemon1.species = newSpecies
|
||||
|
||||
@@ -115,6 +115,7 @@ VAR_PREMIUM_WONDERTRADE_LEFT=111
|
||||
VAR_RIVAL_STARTER=250
|
||||
VAR_FUSION_ICON_STYLE=220
|
||||
VAR_SHINY_HUE_OFFSET=275
|
||||
VAR_CURRENT_HIDDEN_MAP = 226
|
||||
|
||||
#Randomizer
|
||||
VAR_RANDOMIZER_WILD_POKE_BST=197
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
|
||||
HIDDEN_MAPS_STEPS = 1500
|
||||
HIDDEN_MAP_ALWAYS = [178,655,570,356]
|
||||
HIDDEN_MAP_ALWAYS = [178,655,570,356,78] #todo remove 78 (route 1)
|
||||
RANDOM_HIDDEN_MAP_LIST = [8,109,431,446,402,403,467,468,10,23,167,16,19,78,185,86,
|
||||
491,90,40,342,490,102,103,104,105,106,1,12,413,445,484,485,486,140,350,146,
|
||||
149,304,356,307,409,351,495,154,349,322,323,544,198,144,155,444,58,59,229,52,53,54,
|
||||
@@ -9,7 +9,7 @@ RANDOM_HIDDEN_MAP_LIST = [8,109,431,446,402,403,467,468,10,23,167,16,19,78,185,
|
||||
335,254,261,262,266,230,145,147,258,284,283,267,586,285,286,287,300,311,47,580,529,
|
||||
635,638,646,560,559,526,600,564,594,566,562,619,563,603,561,597,633,640,641,621,312,
|
||||
670,692,643,523,698,
|
||||
602,642,623,569,588,573,362,645,651,376
|
||||
602,642,623,569,588,573,362,645,651,376,762
|
||||
]
|
||||
|
||||
Events.onMapUpdate+=proc {|sender,e|
|
||||
@@ -20,9 +20,25 @@ Events.onMapUpdate+=proc {|sender,e|
|
||||
}
|
||||
def changeHiddenMap()
|
||||
i = rand(RANDOM_HIDDEN_MAP_LIST.length-1)
|
||||
pbSet(226,RANDOM_HIDDEN_MAP_LIST[i])
|
||||
pbSet(VAR_CURRENT_HIDDEN_MAP,RANDOM_HIDDEN_MAP_LIST[i])
|
||||
end
|
||||
|
||||
Events.onWildPokemonCreate+=proc {|sender,e|
|
||||
if $game_map.map_id== pbGet(226) || isAlwaysHiddenAbilityMap($game_map.map_id)
|
||||
pokemon=e[0]
|
||||
chosenAbility = pokemon.getAbilityList.sample #format: [[:ABILITY, index],...]
|
||||
p chosenAbility
|
||||
pokemon.ability = chosenAbility[0]
|
||||
pokemon.ability_index = chosenAbility[1]
|
||||
end
|
||||
}
|
||||
|
||||
def isAlwaysHiddenAbilityMap(mapId)
|
||||
return HIDDEN_MAP_ALWAYS.include? mapId
|
||||
end
|
||||
|
||||
|
||||
|
||||
def Kernel.getMapName(id)
|
||||
mapinfos = pbLoadMapInfos
|
||||
return mapinfos[id].name
|
||||
|
||||
@@ -378,6 +378,24 @@ ItemHandlers::UseFromBag.add(:ODDKEYSTONE, proc { |item|
|
||||
end
|
||||
})
|
||||
|
||||
def useDreamMirror
|
||||
map_name = Kernel.getMapName(pbGet(226)).to_s
|
||||
Kernel.pbMessage(_INTL("You peeked into the Dream Mirror..."))
|
||||
Kernel.pbMessage(_INTL("You can see a faint glimpse of {1} in the reflection.", map_name))
|
||||
end
|
||||
|
||||
#DREAMMIRROR
|
||||
ItemHandlers::UseFromBag.add(:DREAMMIRROR, proc { |item|
|
||||
useDreamMirror
|
||||
next 1
|
||||
})
|
||||
|
||||
ItemHandlers::UseInField.add(:DREAMMIRROR, proc { |item|
|
||||
useDreamMirror
|
||||
next 1
|
||||
})
|
||||
|
||||
|
||||
ItemHandlers::UseFromBag.add(:MAGICBOOTS, proc { |item|
|
||||
if $DEBUG
|
||||
if Kernel.pbConfirmMessageSerious(_INTL("Take off the Magic Boots?"))
|
||||
@@ -450,6 +468,8 @@ ItemHandlers::UseOnPokemon.add(:DNASPLICERS, proc { |item, pokemon, scene|
|
||||
next false
|
||||
})
|
||||
|
||||
|
||||
|
||||
ItemHandlers::UseOnPokemon.add(:DNAREVERSER, proc { |item, pokemon, scene|
|
||||
if !pokemon.isFusion?
|
||||
scene.pbDisplay(_INTL("It won't have any effect."))
|
||||
|
||||
Binary file not shown.
@@ -667,6 +667,7 @@
|
||||
659,TM121,TM121,TM121s,4,10000,"The user shoots boiling hot water at its target. It may also leave the target with a burn.",3,0,0,SCALD
|
||||
660,LINKINGCORD,Linking Cord,Linking Cords,1,6000,"A cable exuding a mysterious energy. It’s loved by certain Pokémon.",1,0,7,
|
||||
661,INVISIBALL,Invisiball,Invisiball,3,200,"A Pokéball that is completely invisble to the human eye. You shouldn't be able to obtain this item",0,4,4,
|
||||
662,DREAMMIRROR,Dream Mirror,Dream Mirrors,8,0,"A strange mirror that allows you to peak into the Dream World for a brief instant.",2,0,6,
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user