Rearranged settings

This commit is contained in:
Maruno17
2021-01-02 21:08:47 +00:00
parent 63e257323b
commit d4a7de4bdd
38 changed files with 626 additions and 593 deletions

View File

@@ -491,10 +491,14 @@ FINAL_DMG_MULT = 3
def pbBattleConfusionBerry(battler,battle,item,forced,flavor,confuseMsg)
return false if !forced && !battler.canHeal?
return false if !forced && !battler.pbCanConsumeBerry?(item,false)
return false if !forced && !battler.pbCanConsumeBerry?(item, (MECHANICS_GENERATION >= 7))
itemName = GameData::Item.get(item).name
battle.pbCommonAnimation("EatBerry",battler) if !forced
amt = (NEWEST_BATTLE_MECHANICS) ? battler.pbRecoverHP(battler.totalhp/2) : battler.pbRecoverHP(battler.totalhp/8)
fraction_to_heal = 8 # Gens 6 and lower
if MECHANICS_GENERATION == 7; fraction_to_heal = 2
elsif MECHANICS_GENERATION >= 8; fraction_to_heal = 3
end
amt = battler.pbRecoverHP(battler.totalhp / fraction_to_heal)
if amt>0
if forced
PBDebug.log("[Item triggered] Forced consuming of #{itemName}")
@@ -577,7 +581,7 @@ def pbBattleGem(user,type,move,mults,moveType)
return if move.is_a?(PokeBattle_PledgeMove)
return if moveType != type
user.effects[PBEffects::GemConsumed] = user.item_id
if NEWEST_BATTLE_MECHANICS
if MECHANICS_GENERATION >= 6
mults[BASE_DMG_MULT] *= 1.3
else
mults[BASE_DMG_MULT] *= 1.5
@@ -603,10 +607,10 @@ def pbBattleWeatherAbility(weather,battler,battle,ignorePrimal=false)
battle.pbDisplay(_INTL("{1}'s {2} activated!",battler.pbThis,battler.abilityName))
end
fixedDuration = false
fixedDuration = true if NEWEST_BATTLE_MECHANICS &&
weather!=PBWeather::HarshSun &&
weather!=PBWeather::HeavyRain &&
weather!=PBWeather::StrongWinds
fixedDuration = true if FIXED_DURATION_WEATHER_FROM_ABILITY &&
weather != PBWeather::HarshSun &&
weather != PBWeather::HeavyRain &&
weather != PBWeather::StrongWinds
battle.pbStartWeather(battler,weather,fixedDuration)
# NOTE: The ability splash is hidden again in def pbStartWeather.
end