def Kernel.pbCanUseHiddenMove?(pkmn,move)
case move
when PBMoves::FLY
if !$DEBUG && !$Trainer.badges[BADGEFORFLY]
Kernel.pbMessage(_INTL("Sorry, a new Badge is required."))
return false
end
if $game_player.pbHasDependentEvents?
Kernel.pbMessage(_INTL("You can't use that if you have someone with you."))
return false
end
if !pbGetMetadata($game_map.map_id,MetadataOutdoor)
Kernel.pbMessage(_INTL("Can't use that here."))
return false
end
return true
when PBMoves::CUT
if !$DEBUG && !$Trainer.badges[BADGEFORCUT]
Kernel.pbMessage(_INTL("Sorry, a new Badge is required."))
return false
end
facingEvent=$game_player.pbFacingEvent
if !facingEvent || facingEvent.name!="Tree"
Kernel.pbMessage(_INTL("Can't use that here."))
return false
end
return true
when PBMoves::HEADBUTT
facingEvent=$game_player.pbFacingEvent
if !facingEvent || facingEvent.name!="HeadbuttTree"
Kernel.pbMessage(_INTL("Can't use that here."))
return false
end
return true
when PBMoves::SURF
terrain=Kernel.pbFacingTerrainTag
if !$DEBUG && !$Trainer.badges[BADGEFORCUT]
Kernel.pbMessage(_INTL("Sorry, a new Badge is required."))
return false
end
if $PokemonGlobal.surfing
Kernel.pbMessage(_INTL("You're already surfing."))
return false
end
if $game_player.pbHasDependentEvents?
Kernel.pbMessage(_INTL("You can't use that if you have someone with you."))
return false
end
terrain=Kernel.pbFacingTerrainTag
if pbGetMetadata($game_map.map_id,MetadataBicycleAlways)
Kernel.pbMessage(_INTL("Let's enjoy cycling!"))
return false
end
if !pbIsWaterTag?(terrain)
Kernel.pbMessage(_INTL("No surfing here!"))
return false
end
return true
when PBMoves::STRENGTH
if !$DEBUG && !$Trainer.badges[BADGEFORSTRENGTH]
Kernel.pbMessage(_INTL("Sorry, a new Badge is required."))
return false
end
facingEvent=$game_player.pbFacingEvent
if !facingEvent || facingEvent.name!="Boulder"
Kernel.pbMessage(_INTL("Can't use that here."))
return false
end
return true
when PBMoves::ROCKSMASH
terrain=Kernel.pbFacingTerrainTag
if !$DEBUG && !$Trainer.badges[BADGEFORROCKSMASH]
Kernel.pbMessage(_INTL("Sorry, a new Badge is required."))
return false
end
facingEvent=$game_player.pbFacingEvent
if !facingEvent || facingEvent.name!="Rock"
Kernel.pbMessage(_INTL("Can't use that here."))
return false
end
return true
when PBMoves::FLASH
if !$DEBUG && !$Trainer.badges[BADGEFORFLASH]
Kernel.pbMessage(_INTL("Sorry, a new Badge is required."))
return false
end
if !pbGetMetadata($game_map.map_id,MetadataDarkMap)
Kernel.pbMessage(_INTL("Can't use that here."))
return false
end
if $PokemonGlobal.flashUsed
Kernel.pbMessage(_INTL("This is in use already."))
return false
end
return true
when PBMoves::WATERFALL
if !$DEBUG && !$Trainer.badges[BADGEFORWATERFALL]
Kernel.pbMessage(_INTL("Sorry, a new Badge is required."))
return false
end
terrain=Kernel.pbFacingTerrainTag
if terrain!=PBTerrain::Waterfall
Kernel.pbMessage(_INTL("Can't use that here."))
return false
end
return true
when PBMoves::DIVE
if !$DEBUG && !$Trainer.badges[BADGEFORDIVE]
Kernel.pbMessage(_INTL("Sorry, a new Badge is required."))
return false
end
if $PokemonGlobal.diving
return true
end
if $game_player.terrain_tag!=PBTerrain::DeepWater
Kernel.pbMessage(_INTL("Can't use that here."))
return false
end
if !pbGetMetadata($game_map.map_id,MetadataDiveMap)
Kernel.pbMessage(_INTL("Can't use that here."))
return false
end
return true
when PBMoves::TELEPORT
if !pbGetMetadata($game_map.map_id,MetadataOutdoor)
Kernel.pbMessage(_INTL("Can't use that here."))
return false
end
if $game_player.pbHasDependentEvents?
Kernel.pbMessage(_INTL("You can't use that if you have someone with you."))
return false
end
healing=$PokemonGlobal.healingSpot
if !healing
healing=pbGetMetadata(0,MetadataHome) # Home
end
if healing
mapname=pbGetMapNameFromId(healing[0])
if Kernel.pbConfirmMessage(_INTL("Want to return to the healing spot used last in {1}?",mapname))
return true
end
return false
else
Kernel.pbMessage(_INTL("Can't use that here."))
return false
end
when PBMoves::DIG
escape=pbGetMetadata($game_map.map_id,MetadataEscapePoint)
if !escape
Kernel.pbMessage(_INTL("Can't use that here."))
return false
end
if $game_player.pbHasDependentEvents?
Kernel.pbMessage(_INTL("You can't use that if you have someone with you."))
return false
end
mapname=pbGetMapNameFromId(escape[0])
if Kernel.pbConfirmMessage(_INTL("Want to escape from here and return to {1}?",mapname))
return true
end
return false
when PBMoves::SWEETSCENT
return true
else
return HiddenMoveHandlers.triggerCanUseMove(move,pkmn)
end
return false
end