Ball property in trainers.txt can now be a Poké Ball item's ID, fixed move-learning saying "already knows four moves" regardless of the value of Pokemon::MAX_MOVES

This commit is contained in:
Maruno17
2021-05-13 21:50:36 +01:00
parent 52e7f7b51a
commit 8384adeb22
10 changed files with 39 additions and 17 deletions

View File

@@ -411,7 +411,8 @@ def pbLearnMove(pkmn,move,ignoreifknown=false,bymachine=false,&block)
return true
end
loop do
pbMessage(_INTL("{1} wants to learn {2}, but it already knows four moves.\1",pkmnname,movename),&block) if !bymachine
pbMessage(_INTL("{1} wants to learn {2}, but it already knows {3} moves.\1",
pkmnname, movename, pkmn.numMoves.to_word), &block) if !bymachine
pbMessage(_INTL("Please choose a move that will be replaced with {1}.",movename),&block)
forgetmove = pbForgetMove(pkmn,move)
if forgetmove>=0
@@ -421,7 +422,7 @@ def pbLearnMove(pkmn,move,ignoreifknown=false,bymachine=false,&block)
if bymachine && Settings::TAUGHT_MACHINES_KEEP_OLD_PP
pkmn.moves[forgetmove].pp = [oldmovepp,pkmn.moves[forgetmove].total_pp].min
end
pbMessage(_INTL("1,\\wt[16] 2, and\\wt[16]...\\wt[16] ...\\wt[16] ... Ta-da!\\se[Battle ball drop]\1"),&block)
pbMessage(_INTL("1, 2, and...\\wt[16] ...\\wt[16] ... Ta-da!\\se[Battle ball drop]\1"),&block)
pbMessage(_INTL("{1} forgot how to use {2}.\\nAnd...\1",pkmnname,oldmovename),&block)
pbMessage(_INTL("\\se[]{1} learned {2}!\\se[Pkmn move learnt]",pkmnname,movename),&block)
pkmn.changeHappiness("machine") if bymachine