mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-09 14:14:59 +00:00
Added settings that enable disobedience check, swapped alternate movement speed key with pause menu key, fixed pbEventCommentInput not working, fixed issue with animating Exp bar upon hitting the max level
This commit is contained in:
@@ -111,11 +111,14 @@ class PokeBattle_Battler
|
||||
return true if !@battle.pbOwnedByPlayer?(@index)
|
||||
disobedient = false
|
||||
# Pokémon may be disobedient; calculate if it is
|
||||
badgeLevel = 10 * (@battle.pbPlayer.badge_count + 1)
|
||||
badgeLevel = GameData::GrowthRate.max_level if @battle.pbPlayer.badge_count >= 8
|
||||
if @pokemon.foreign?(@battle.pbPlayer) && @level>badgeLevel
|
||||
a = ((@level+badgeLevel)*@battle.pbRandom(256)/256).floor
|
||||
disobedient |= (a>=badgeLevel)
|
||||
if Settings::ANY_HIGH_LEVEL_POKEMON_CAN_DISOBEY ||
|
||||
(Settings::FOREIGN_HIGH_LEVEL_POKEMON_CAN_DISOBEY && @pokemon.foreign?(@battle.pbPlayer))
|
||||
badgeLevel = 10 * (@battle.pbPlayer.badge_count + 1)
|
||||
badgeLevel = GameData::GrowthRate.max_level if @battle.pbPlayer.badge_count >= 8
|
||||
if @level > badgeLevel
|
||||
a = ((@level+badgeLevel)*@battle.pbRandom(256)/256).floor
|
||||
disobedient |= (a>=badgeLevel)
|
||||
end
|
||||
end
|
||||
disobedient |= !pbHyperModeObedience(choice[2])
|
||||
return true if !disobedient
|
||||
|
||||
@@ -162,6 +162,7 @@ class PokemonDataBox < SpriteWrapper
|
||||
end
|
||||
|
||||
def exp_fraction
|
||||
return 0.0 if @rangeExp == 0
|
||||
return (@animatingExp) ? @currentExp.to_f/@rangeExp : @battler.pokemon.exp_fraction
|
||||
end
|
||||
|
||||
@@ -180,6 +181,7 @@ class PokemonDataBox < SpriteWrapper
|
||||
end
|
||||
|
||||
def animateExp(oldExp,newExp,rangeExp)
|
||||
return if rangeExp == 0
|
||||
@currentExp = oldExp
|
||||
@endExp = newExp
|
||||
@rangeExp = rangeExp
|
||||
|
||||
@@ -268,7 +268,7 @@ class PokeBattle_Scene
|
||||
# Animates a data box's Exp bar
|
||||
#=============================================================================
|
||||
def pbEXPBar(battler,startExp,endExp,tempExp1,tempExp2)
|
||||
return if !battler
|
||||
return if !battler || endExp == startExp
|
||||
startExpLevel = tempExp1-startExp
|
||||
endExpLevel = tempExp2-startExp
|
||||
expRange = endExp-startExp
|
||||
|
||||
Reference in New Issue
Block a user