mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-01-24 15:26:01 +00:00
Rearranged settings
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user