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