So I am trying to make it so that all HM's are used without needing a badge requirement. I have figured that part out...but now it allows me to use cut whenever I want, even when I don't have a Pokémon that knows the move. I have tried running the game outside of debug mode and I'm getting the same thing. Here is my script under the "Cut" section of PField_FieldMoves:
def Kernel.pbCut
move = getID(PBMoves,:CUT)
movefinder = Kernel.pbCheckMove(move)
Kernel.pbMessage(_INTL("These weeds are blocking the path.\1"))
if Kernel.pbConfirmMessage(_INTL("Would you like to cut them?"))
speciesname = (movefinder) ? movefinder.name : $Trainer.name
Kernel.pbMessage(_INTL("{1} used {2}!",speciesname,PBMoves.getName(move)))
pbHiddenMoveAnimation(movefinder)
return true
end
return false
end
HiddenMoveHandlers::CanUseMove.add(:CUT,proc{|move,pkmn,showmsg|
return false if !pbCheckHiddenMoveBadge(BADGEFORCUT,showmsg)
facingEvent = $game_player.pbFacingEvent
if !facingEvent || facingEvent.name!="Tree"
Kernel.pbMessage(_INTL("Can't use that here.")) if showmsg
return false
end
return true
})
HiddenMoveHandlers::UseMove.add(:CUT,proc{|move,pokemon|
if !pbHiddenMoveAnimation(pokemon)
Kernel.pbMessage(_INTL("{1} used {2}!",pokemon.name,PBMoves.getName(move)))
end
facingEvent = $game_player.pbFacingEvent
if facingEvent
pbSmashEvent(facingEvent)
end
return true
})
def pbSmashEvent(event)
return if !event
if event.name=="Tree"; pbSEPlay("Cut",80)
elsif event.name=="Rock"; pbSEPlay("Rock Smash",80)
end
pbMoveRoute(event,[
PBMoveRoute::Wait,2,
PBMoveRoute::TurnLeft,
PBMoveRoute::Wait,2,
PBMoveRoute::TurnRight,
PBMoveRoute::Wait,2,
PBMoveRoute::TurnUp,
PBMoveRoute::Wait,2
])
pbWait(2*2*4)
event.erase
$PokemonMap.addErasedEvent(event.id) if $PokemonMap
end
I am stumped. Anyone know what I did wrong?
def Kernel.pbCut
move = getID(PBMoves,:CUT)
movefinder = Kernel.pbCheckMove(move)
Kernel.pbMessage(_INTL("These weeds are blocking the path.\1"))
if Kernel.pbConfirmMessage(_INTL("Would you like to cut them?"))
speciesname = (movefinder) ? movefinder.name : $Trainer.name
Kernel.pbMessage(_INTL("{1} used {2}!",speciesname,PBMoves.getName(move)))
pbHiddenMoveAnimation(movefinder)
return true
end
return false
end
HiddenMoveHandlers::CanUseMove.add(:CUT,proc{|move,pkmn,showmsg|
return false if !pbCheckHiddenMoveBadge(BADGEFORCUT,showmsg)
facingEvent = $game_player.pbFacingEvent
if !facingEvent || facingEvent.name!="Tree"
Kernel.pbMessage(_INTL("Can't use that here.")) if showmsg
return false
end
return true
})
HiddenMoveHandlers::UseMove.add(:CUT,proc{|move,pokemon|
if !pbHiddenMoveAnimation(pokemon)
Kernel.pbMessage(_INTL("{1} used {2}!",pokemon.name,PBMoves.getName(move)))
end
facingEvent = $game_player.pbFacingEvent
if facingEvent
pbSmashEvent(facingEvent)
end
return true
})
def pbSmashEvent(event)
return if !event
if event.name=="Tree"; pbSEPlay("Cut",80)
elsif event.name=="Rock"; pbSEPlay("Rock Smash",80)
end
pbMoveRoute(event,[
PBMoveRoute::Wait,2,
PBMoveRoute::TurnLeft,
PBMoveRoute::Wait,2,
PBMoveRoute::TurnRight,
PBMoveRoute::Wait,2,
PBMoveRoute::TurnUp,
PBMoveRoute::Wait,2
])
pbWait(2*2*4)
event.erase
$PokemonMap.addErasedEvent(event.id) if $PokemonMap
end
I am stumped. Anyone know what I did wrong?