mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +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:
@@ -18,6 +18,13 @@ module Settings
|
|||||||
MORE_TYPE_EFFECTS = (MECHANICS_GENERATION >= 6)
|
MORE_TYPE_EFFECTS = (MECHANICS_GENERATION >= 6)
|
||||||
# Whether weather caused by an ability lasts 5 rounds (true) or forever (false).
|
# Whether weather caused by an ability lasts 5 rounds (true) or forever (false).
|
||||||
FIXED_DURATION_WEATHER_FROM_ABILITY = (MECHANICS_GENERATION >= 6)
|
FIXED_DURATION_WEATHER_FROM_ABILITY = (MECHANICS_GENERATION >= 6)
|
||||||
|
# Whether any Pokémon (originally owned by the player or foreign) can disobey
|
||||||
|
# the player's commands if the Pokémon is too high a level compared to the
|
||||||
|
# number of Gym Badges the player has.
|
||||||
|
ANY_HIGH_LEVEL_POKEMON_CAN_DISOBEY = false
|
||||||
|
# Whether foreign Pokémon can disobey the player's commands if the Pokémon is
|
||||||
|
# too high a level compared to the number of Gym Badges the player has.
|
||||||
|
FOREIGN_HIGH_LEVEL_POKEMON_CAN_DISOBEY = true
|
||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
|
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ class Scene_Map
|
|||||||
if !pbMapInterpreterRunning?
|
if !pbMapInterpreterRunning?
|
||||||
if Input.trigger?(Input::USE)
|
if Input.trigger?(Input::USE)
|
||||||
$PokemonTemp.hiddenMoveEventCalling = true
|
$PokemonTemp.hiddenMoveEventCalling = true
|
||||||
elsif Input.trigger?(Input::BACK)
|
elsif Input.trigger?(Input::ACTION)
|
||||||
unless $game_system.menu_disabled || $game_player.moving?
|
unless $game_system.menu_disabled || $game_player.moving?
|
||||||
$game_temp.menu_calling = true
|
$game_temp.menu_calling = true
|
||||||
$game_temp.menu_beep = true
|
$game_temp.menu_beep = true
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ class Game_Player < Game_Character
|
|||||||
return false if $game_temp.in_menu || $game_temp.in_battle ||
|
return false if $game_temp.in_menu || $game_temp.in_battle ||
|
||||||
@move_route_forcing || $game_temp.message_window_showing ||
|
@move_route_forcing || $game_temp.message_window_showing ||
|
||||||
pbMapInterpreterRunning?
|
pbMapInterpreterRunning?
|
||||||
input = ($PokemonSystem.runstyle == 1) ^ Input.press?(Input::ACTION)
|
input = ($PokemonSystem.runstyle == 1) ^ Input.press?(Input::BACK)
|
||||||
return input && $Trainer.has_running_shoes && !jumping? &&
|
return input && $Trainer.has_running_shoes && !jumping? &&
|
||||||
!$PokemonGlobal.diving && !$PokemonGlobal.surfing &&
|
!$PokemonGlobal.diving && !$PokemonGlobal.surfing &&
|
||||||
!$PokemonGlobal.bicycle && !$game_player.pbTerrainTag.must_walk
|
!$PokemonGlobal.bicycle && !$game_player.pbTerrainTag.must_walk
|
||||||
|
|||||||
@@ -104,9 +104,9 @@ end
|
|||||||
#===============================================================================
|
#===============================================================================
|
||||||
def pbEventCommentInput(*args)
|
def pbEventCommentInput(*args)
|
||||||
parameters = []
|
parameters = []
|
||||||
list = *args[0].list # Event or event page
|
list = args[0].list # List of commands for event or event page
|
||||||
elements = *args[1] # Number of elements
|
elements = args[1] # Number of elements
|
||||||
trigger = *args[2] # Trigger
|
trigger = args[2] # Trigger
|
||||||
return nil if list == nil
|
return nil if list == nil
|
||||||
return nil unless list.is_a?(Array)
|
return nil unless list.is_a?(Array)
|
||||||
for item in list
|
for item in list
|
||||||
|
|||||||
@@ -111,12 +111,15 @@ class PokeBattle_Battler
|
|||||||
return true if !@battle.pbOwnedByPlayer?(@index)
|
return true if !@battle.pbOwnedByPlayer?(@index)
|
||||||
disobedient = false
|
disobedient = false
|
||||||
# Pokémon may be disobedient; calculate if it is
|
# Pokémon may be disobedient; calculate if it is
|
||||||
|
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 = 10 * (@battle.pbPlayer.badge_count + 1)
|
||||||
badgeLevel = GameData::GrowthRate.max_level if @battle.pbPlayer.badge_count >= 8
|
badgeLevel = GameData::GrowthRate.max_level if @battle.pbPlayer.badge_count >= 8
|
||||||
if @pokemon.foreign?(@battle.pbPlayer) && @level>badgeLevel
|
if @level > badgeLevel
|
||||||
a = ((@level+badgeLevel)*@battle.pbRandom(256)/256).floor
|
a = ((@level+badgeLevel)*@battle.pbRandom(256)/256).floor
|
||||||
disobedient |= (a>=badgeLevel)
|
disobedient |= (a>=badgeLevel)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
disobedient |= !pbHyperModeObedience(choice[2])
|
disobedient |= !pbHyperModeObedience(choice[2])
|
||||||
return true if !disobedient
|
return true if !disobedient
|
||||||
# Pokémon is disobedient; make it do something else
|
# Pokémon is disobedient; make it do something else
|
||||||
|
|||||||
@@ -162,6 +162,7 @@ class PokemonDataBox < SpriteWrapper
|
|||||||
end
|
end
|
||||||
|
|
||||||
def exp_fraction
|
def exp_fraction
|
||||||
|
return 0.0 if @rangeExp == 0
|
||||||
return (@animatingExp) ? @currentExp.to_f/@rangeExp : @battler.pokemon.exp_fraction
|
return (@animatingExp) ? @currentExp.to_f/@rangeExp : @battler.pokemon.exp_fraction
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -180,6 +181,7 @@ class PokemonDataBox < SpriteWrapper
|
|||||||
end
|
end
|
||||||
|
|
||||||
def animateExp(oldExp,newExp,rangeExp)
|
def animateExp(oldExp,newExp,rangeExp)
|
||||||
|
return if rangeExp == 0
|
||||||
@currentExp = oldExp
|
@currentExp = oldExp
|
||||||
@endExp = newExp
|
@endExp = newExp
|
||||||
@rangeExp = rangeExp
|
@rangeExp = rangeExp
|
||||||
|
|||||||
@@ -268,7 +268,7 @@ class PokeBattle_Scene
|
|||||||
# Animates a data box's Exp bar
|
# Animates a data box's Exp bar
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
def pbEXPBar(battler,startExp,endExp,tempExp1,tempExp2)
|
def pbEXPBar(battler,startExp,endExp,tempExp1,tempExp2)
|
||||||
return if !battler
|
return if !battler || endExp == startExp
|
||||||
startExpLevel = tempExp1-startExp
|
startExpLevel = tempExp1-startExp
|
||||||
endExpLevel = tempExp2-startExp
|
endExpLevel = tempExp2-startExp
|
||||||
expRange = endExp-startExp
|
expRange = endExp-startExp
|
||||||
|
|||||||
@@ -24,15 +24,15 @@ class ButtonEventScene < EventScene
|
|||||||
addImageForScreen(2, 16, 158, "Graphics/Pictures/Controls help/help_arrows")
|
addImageForScreen(2, 16, 158, "Graphics/Pictures/Controls help/help_arrows")
|
||||||
addLabelForScreen(2, 134, 100, 352, _INTL("Use the Arrow keys to move the main character.\r\n\r\nYou can also use the Arrow keys to select entries and navigate menus."))
|
addLabelForScreen(2, 134, 100, 352, _INTL("Use the Arrow keys to move the main character.\r\n\r\nYou can also use the Arrow keys to select entries and navigate menus."))
|
||||||
|
|
||||||
addImageForScreen(3, 16, 106, "Graphics/Pictures/Controls help/help_usekey")
|
addImageForScreen(3, 16, 90, "Graphics/Pictures/Controls help/help_usekey")
|
||||||
addImageForScreen(3, 16, 236, "Graphics/Pictures/Controls help/help_backkey")
|
addImageForScreen(3, 16, 236, "Graphics/Pictures/Controls help/help_backkey")
|
||||||
addLabelForScreen(3, 134, 84, 352, _INTL("Used to confirm a choice, interact with people and things, and move through text. (Default: C)"))
|
addLabelForScreen(3, 134, 68, 352, _INTL("Used to confirm a choice, interact with people and things, and move through text. (Default: C)"))
|
||||||
addLabelForScreen(3, 134, 212, 352, _INTL("Used to exit, cancel a choice, and cancel a mode. Also used to open the Pause Menu. (Default: X)"))
|
addLabelForScreen(3, 134, 196, 352, _INTL("Used to exit, cancel a choice, and cancel a mode. While moving around, hold to move at a different speed. (Default: X)"))
|
||||||
|
|
||||||
addImageForScreen(4, 16, 90, "Graphics/Pictures/Controls help/help_actionkey")
|
addImageForScreen(4, 16, 90, "Graphics/Pictures/Controls help/help_actionkey")
|
||||||
addImageForScreen(4, 16, 252, "Graphics/Pictures/Controls help/help_specialkey")
|
addImageForScreen(4, 16, 236, "Graphics/Pictures/Controls help/help_specialkey")
|
||||||
addLabelForScreen(4, 134, 52, 352, _INTL("Has various functions depending on context. While moving around, hold to move at a different speed. (Default: Z)"))
|
addLabelForScreen(4, 134, 68, 352, _INTL("Used to open the Pause Menu. Also has various functions depending on context. (Default: Z)"))
|
||||||
addLabelForScreen(4, 134, 212, 352, _INTL("Press to open the Ready Menu, where registered items and available field moves can be used. (Default: D)"))
|
addLabelForScreen(4, 134, 196, 352, _INTL("Press to open the Ready Menu, where registered items and available field moves can be used. (Default: D)"))
|
||||||
|
|
||||||
set_up_screen(@current_screen)
|
set_up_screen(@current_screen)
|
||||||
Graphics.transition(20)
|
Graphics.transition(20)
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ class PokemonPauseMenu_Scene
|
|||||||
Graphics.update
|
Graphics.update
|
||||||
Input.update
|
Input.update
|
||||||
pbUpdateSceneMap
|
pbUpdateSceneMap
|
||||||
if Input.trigger?(Input::BACK)
|
if Input.trigger?(Input::BACK) || Input.trigger?(Input::ACTION)
|
||||||
ret = -1
|
ret = -1
|
||||||
break
|
break
|
||||||
elsif Input.trigger?(Input::USE)
|
elsif Input.trigger?(Input::USE)
|
||||||
|
|||||||
Reference in New Issue
Block a user