Added generic item icon support for HMs/TRs, moves taught by TR are now relearnable, tweaked determination of valid Mega forms

This commit is contained in:
Maruno17
2021-04-22 21:08:34 +01:00
parent 70b9f65558
commit 4ae84f9b5d
8 changed files with 83 additions and 73 deletions

View File

@@ -450,7 +450,7 @@ end
def pbUseItem(bag,item,bagscene=nil)
itm = GameData::Item.get(item)
useType = itm.field_use
if itm.is_machine? # TM or HM
if itm.is_machine? # TM or TR or HM
if $Trainer.pokemon_count == 0
pbMessage(_INTL("There is no Pokémon."))
return 0
@@ -461,7 +461,7 @@ def pbUseItem(bag,item,bagscene=nil)
pbMessage(_INTL("\\se[PC access]You booted up {1}.\1",itm.name))
if !pbConfirmMessage(_INTL("Do you want to teach {1} to a Pokémon?",movename))
return 0
elsif pbMoveTutorChoose(machine,nil,true)
elsif pbMoveTutorChoose(machine,nil,true,itm.is_TR?)
bag.pbDeleteItem(item) if itm.is_TR?
return 1
end