More revamping and rearranging

This commit is contained in:
Maruno17
2021-01-23 20:44:07 +00:00
parent 8a89ef1220
commit 7de034957b
38 changed files with 674 additions and 661 deletions

View File

@@ -420,7 +420,7 @@ def pbLearnMove(pkmn,move,ignoreifknown=false,bymachine=false,&block)
return false
end
if pkmn.numMoves<Pokemon::MAX_MOVES
pkmn.pbLearnMove(move)
pkmn.learn_move(move)
pbMessage(_INTL("\\se[]{1} learned {2}!\\se[Pkmn move learnt]",pkmnname,movename),&block)
return true
end
@@ -552,7 +552,7 @@ def pbUseItemOnPokemon(item,pkmn,scene)
movename = GameData::Move.get(machine).name
if pkmn.shadowPokemon?
pbMessage(_INTL("Shadow Pokémon can't be taught any moves.")) { scene.pbUpdate }
elsif !pkmn.compatibleWithMove?(machine)
elsif !pkmn.compatible_with_move?(machine)
pbMessage(_INTL("{1} can't learn {2}.",pkmn.name,movename)) { scene.pbUpdate }
else
pbMessage(_INTL("\\se[PC access]You booted up {1}.\1",itm.name)) { scene.pbUpdate }

View File

@@ -415,7 +415,7 @@ ItemHandlers::UseOnPokemon.add(:AWAKENING,proc { |item,pkmn,scene|
scene.pbDisplay(_INTL("It won't have any effect."))
next false
end
pkmn.healStatus
pkmn.heal_status
scene.pbRefresh
scene.pbDisplay(_INTL("{1} woke up.",pkmn.name))
next true
@@ -428,7 +428,7 @@ ItemHandlers::UseOnPokemon.add(:ANTIDOTE,proc { |item,pkmn,scene|
scene.pbDisplay(_INTL("It won't have any effect."))
next false
end
pkmn.healStatus
pkmn.heal_status
scene.pbRefresh
scene.pbDisplay(_INTL("{1} was cured of its poisoning.",pkmn.name))
next true
@@ -441,7 +441,7 @@ ItemHandlers::UseOnPokemon.add(:BURNHEAL,proc { |item,pkmn,scene|
scene.pbDisplay(_INTL("It won't have any effect."))
next false
end
pkmn.healStatus
pkmn.heal_status
scene.pbRefresh
scene.pbDisplay(_INTL("{1}'s burn was healed.",pkmn.name))
next true
@@ -454,7 +454,7 @@ ItemHandlers::UseOnPokemon.add(:PARLYZHEAL,proc { |item,pkmn,scene|
scene.pbDisplay(_INTL("It won't have any effect."))
next false
end
pkmn.healStatus
pkmn.heal_status
scene.pbRefresh
scene.pbDisplay(_INTL("{1} was cured of paralysis.",pkmn.name))
next true
@@ -467,7 +467,7 @@ ItemHandlers::UseOnPokemon.add(:ICEHEAL,proc { |item,pkmn,scene|
scene.pbDisplay(_INTL("It won't have any effect."))
next false
end
pkmn.healStatus
pkmn.heal_status
scene.pbRefresh
scene.pbDisplay(_INTL("{1} was thawed out.",pkmn.name))
next true
@@ -480,7 +480,7 @@ ItemHandlers::UseOnPokemon.add(:FULLHEAL,proc { |item,pkmn,scene|
scene.pbDisplay(_INTL("It won't have any effect."))
next false
end
pkmn.healStatus
pkmn.heal_status
scene.pbRefresh
scene.pbDisplay(_INTL("{1} became healthy.",pkmn.name))
next true
@@ -497,7 +497,7 @@ ItemHandlers::UseOnPokemon.add(:FULLRESTORE,proc { |item,pkmn,scene|
next false
end
hpgain = pbItemRestoreHP(pkmn,pkmn.totalhp-pkmn.hp)
pkmn.healStatus
pkmn.heal_status
scene.pbRefresh
if hpgain>0
scene.pbDisplay(_INTL("{1}'s HP was restored by {2} points.",pkmn.name,hpgain))
@@ -514,7 +514,7 @@ ItemHandlers::UseOnPokemon.add(:REVIVE,proc { |item,pkmn,scene|
end
pkmn.hp = (pkmn.totalhp/2).floor
pkmn.hp = 1 if pkmn.hp<=0
pkmn.healStatus
pkmn.heal_status
scene.pbRefresh
scene.pbDisplay(_INTL("{1}'s HP was restored.",pkmn.name))
next true
@@ -525,8 +525,8 @@ ItemHandlers::UseOnPokemon.add(:MAXREVIVE,proc { |item,pkmn,scene|
scene.pbDisplay(_INTL("It won't have any effect."))
next false
end
pkmn.healHP
pkmn.healStatus
pkmn.heal_HP
pkmn.heal_status
scene.pbRefresh
scene.pbDisplay(_INTL("{1}'s HP was restored.",pkmn.name))
next true
@@ -553,7 +553,7 @@ ItemHandlers::UseOnPokemon.add(:HEALPOWDER,proc { |item,pkmn,scene|
scene.pbDisplay(_INTL("It won't have any effect."))
next false
end
pkmn.healStatus
pkmn.heal_status
pkmn.changeHappiness("powder")
scene.pbRefresh
scene.pbDisplay(_INTL("{1} became healthy.",pkmn.name))
@@ -565,8 +565,8 @@ ItemHandlers::UseOnPokemon.add(:REVIVALHERB,proc { |item,pkmn,scene|
scene.pbDisplay(_INTL("It won't have any effect."))
next false
end
pkmn.healHP
pkmn.healStatus
pkmn.heal_HP
pkmn.heal_status
pkmn.changeHappiness("revivalherb")
scene.pbRefresh
scene.pbDisplay(_INTL("{1}'s HP was restored.",pkmn.name))

View File

@@ -356,7 +356,7 @@ ItemHandlers::BattleUseOnPokemon.add(:SITRUSBERRY,proc { |item,pokemon,battler,c
})
ItemHandlers::BattleUseOnPokemon.add(:AWAKENING,proc { |item,pokemon,battler,choices,scene|
pokemon.healStatus
pokemon.heal_status
battler.pbCureStatus(false) if battler
name = (battler) ? battler.pbThis : pokemon.name
scene.pbRefresh
@@ -366,7 +366,7 @@ ItemHandlers::BattleUseOnPokemon.add(:AWAKENING,proc { |item,pokemon,battler,cho
ItemHandlers::BattleUseOnPokemon.copy(:AWAKENING,:CHESTOBERRY,:BLUEFLUTE)
ItemHandlers::BattleUseOnPokemon.add(:ANTIDOTE,proc { |item,pokemon,battler,choices,scene|
pokemon.healStatus
pokemon.heal_status
battler.pbCureStatus(false) if battler
name = (battler) ? battler.pbThis : pokemon.name
scene.pbRefresh
@@ -376,7 +376,7 @@ ItemHandlers::BattleUseOnPokemon.add(:ANTIDOTE,proc { |item,pokemon,battler,choi
ItemHandlers::BattleUseOnPokemon.copy(:ANTIDOTE,:PECHABERRY)
ItemHandlers::BattleUseOnPokemon.add(:BURNHEAL,proc { |item,pokemon,battler,choices,scene|
pokemon.healStatus
pokemon.heal_status
battler.pbCureStatus(false) if battler
name = (battler) ? battler.pbThis : pokemon.name
scene.pbRefresh
@@ -386,7 +386,7 @@ ItemHandlers::BattleUseOnPokemon.add(:BURNHEAL,proc { |item,pokemon,battler,choi
ItemHandlers::BattleUseOnPokemon.copy(:BURNHEAL,:RAWSTBERRY)
ItemHandlers::BattleUseOnPokemon.add(:PARALYZEHEAL,proc { |item,pokemon,battler,choices,scene|
pokemon.healStatus
pokemon.heal_status
battler.pbCureStatus(false) if battler
name = (battler) ? battler.pbThis : pokemon.name
scene.pbRefresh
@@ -396,7 +396,7 @@ ItemHandlers::BattleUseOnPokemon.add(:PARALYZEHEAL,proc { |item,pokemon,battler,
ItemHandlers::BattleUseOnPokemon.copy(:PARALYZEHEAL,:PARLYZHEAL,:CHERIBERRY)
ItemHandlers::BattleUseOnPokemon.add(:ICEHEAL,proc { |item,pokemon,battler,choices,scene|
pokemon.healStatus
pokemon.heal_status
battler.pbCureStatus(false) if battler
name = (battler) ? battler.pbThis : pokemon.name
scene.pbRefresh
@@ -406,7 +406,7 @@ ItemHandlers::BattleUseOnPokemon.add(:ICEHEAL,proc { |item,pokemon,battler,choic
ItemHandlers::BattleUseOnPokemon.copy(:ICEHEAL,:ASPEARBERRY)
ItemHandlers::BattleUseOnPokemon.add(:FULLHEAL,proc { |item,pokemon,battler,choices,scene|
pokemon.healStatus
pokemon.heal_status
battler.pbCureStatus(false) if battler
battler.pbCureConfusion if battler
name = (battler) ? battler.pbThis : pokemon.name
@@ -420,7 +420,7 @@ ItemHandlers::BattleUseOnPokemon.copy(:FULLHEAL,
ItemHandlers::BattleUseOnPokemon.copy(:FULLHEAL,:RAGECANDYBAR) if RAGE_CANDY_BAR_CURES_STATUS_PROBLEMS
ItemHandlers::BattleUseOnPokemon.add(:FULLRESTORE,proc { |item,pokemon,battler,choices,scene|
pokemon.healStatus
pokemon.heal_status
battler.pbCureStatus(false) if battler
battler.pbCureConfusion if battler
name = (battler) ? battler.pbThis : pokemon.name
@@ -435,14 +435,14 @@ ItemHandlers::BattleUseOnPokemon.add(:FULLRESTORE,proc { |item,pokemon,battler,c
ItemHandlers::BattleUseOnPokemon.add(:REVIVE,proc { |item,pokemon,battler,choices,scene|
pokemon.hp = pokemon.totalhp/2
pokemon.hp = 1 if pokemon.hp<=0
pokemon.healStatus
pokemon.heal_status
scene.pbRefresh
scene.pbDisplay(_INTL("{1} recovered from fainting!",pokemon.name))
})
ItemHandlers::BattleUseOnPokemon.add(:MAXREVIVE,proc { |item,pokemon,battler,choices,scene|
pokemon.healHP
pokemon.healStatus
pokemon.heal_HP
pokemon.heal_status
scene.pbRefresh
scene.pbDisplay(_INTL("{1} recovered from fainting!",pokemon.name))
})
@@ -460,7 +460,7 @@ ItemHandlers::BattleUseOnPokemon.add(:ENERGYROOT,proc { |item,pokemon,battler,ch
})
ItemHandlers::BattleUseOnPokemon.add(:HEALPOWDER,proc { |item,pokemon,battler,choices,scene|
pokemon.healStatus
pokemon.heal_status
battler.pbCureStatus(false) if battler
battler.pbCureConfusion if battler
pokemon.changeHappiness("powder")
@@ -470,8 +470,8 @@ ItemHandlers::BattleUseOnPokemon.add(:HEALPOWDER,proc { |item,pokemon,battler,ch
})
ItemHandlers::BattleUseOnPokemon.add(:REVIVALHERB,proc { |item,pokemon,battler,choices,scene|
pokemon.healHP
pokemon.healStatus
pokemon.heal_HP
pokemon.heal_status
pokemon.changeHappiness("revivalherb")
scene.pbRefresh
scene.pbDisplay(_INTL("{1} recovered from fainting!",pokemon.name))

View File

@@ -19,6 +19,9 @@ class PokemonMail
attr_reader :item, :message, :sender, :poke1, :poke2, :poke3
def self.copy(mail)
item.poke1[0] = GameData::Species.get(item.poke1[0]).id if item.poke1
item.poke2[0] = GameData::Species.get(item.poke2[0]).id if item.poke2
item.poke3[0] = GameData::Species.get(item.poke3[0]).id if item.poke3
return Mail.new(mail.item, item.message, item.sender, item.poke1, item.poke2, item.poke3)
end
end