Implemented GameData::Nature, improved registration of GameData entries

This commit is contained in:
Maruno17
2021-01-31 22:43:51 +00:00
parent 168a1e5df7
commit 9fe14395c0
18 changed files with 384 additions and 224 deletions

View File

@@ -496,11 +496,13 @@ def pbBattleConfusionBerry(battler,battle,item,forced,flavor,confuseMsg)
battle.pbDisplay(_INTL("{1} restored its health using its {2}!",battler.pbThis,itemName))
end
end
nUp = PBNatures.getStatRaised(battler.nature)
nDn = PBNatures.getStatLowered(battler.nature)
if nUp!=nDn && nDn-1==flavor
flavor_stat = [PBStats::ATTACK, PBStats::DEFENSE, PBStats::SPEED,
PBStats::SPATK, PBStats::SPDEF][flavor]
battler.nature.stat_changes.each do |change|
next if change[1] > 0 || change[0] != flavor_stat
battle.pbDisplay(confuseMsg)
battler.pbConfuse if battler.pbCanConfuseSelf?(false)
break
end
return true
end

View File

@@ -98,37 +98,14 @@ class PokeBattle_BattlePalace < PokeBattle_Battle
thispkmn.hp<=thispkmn.totalhp/2
nature = thispkmn.nature
thispkmn.effects[PBEffects::Pinch] = true
if nature==PBNatures::QUIET ||
nature==PBNatures::BASHFUL ||
nature==PBNatures::NAIVE ||
nature==PBNatures::QUIRKY ||
nature==PBNatures::HARDY ||
nature==PBNatures::DOCILE ||
nature==PBNatures::SERIOUS
case nature
when :QUIET, :BASHFUL, :NAIVE, :QUIRKY, :HARDY, :DOCILE, :SERIOUS
pbDisplay(_INTL("{1} is eager for more!",thispkmn.pbThis))
end
if nature==PBNatures::CAREFUL ||
nature==PBNatures::RASH ||
nature==PBNatures::LAX ||
nature==PBNatures::SASSY ||
nature==PBNatures::MILD ||
nature==PBNatures::TIMID
when :CAREFUL, :RASH, :LAX, :SASSY, :MILD, :TIMID
pbDisplay(_INTL("{1} began growling deeply!",thispkmn.pbThis))
end
if nature==PBNatures::GENTLE ||
nature==PBNatures::ADAMANT ||
nature==PBNatures::HASTY ||
nature==PBNatures::LONELY ||
nature==PBNatures::RELAXED ||
nature==PBNatures::NAUGHTY
when :GENTLE, :ADAMANT, :HASTY, :LONELY, :RELAXED, :NAUGHTY
pbDisplay(_INTL("A glint appears in {1}'s eyes!",thispkmn.pbThis(true)))
end
if nature==PBNatures::JOLLY ||
nature==PBNatures::BOLD ||
nature==PBNatures::BRAVE ||
nature==PBNatures::CALM ||
nature==PBNatures::IMPISH ||
nature==PBNatures::MODEST
when :JOLLY, :BOLD, :BRAVE, :CALM, :IMPISH, :MODEST
pbDisplay(_INTL("{1} is getting into position!",thispkmn.pbThis))
end
end