Fixed Pledge combo moves sometimes using the wrong type, fixed command windows in battle being too tall if possible, added Debug menu feature to toggle credits skippability

This commit is contained in:
Maruno17
2021-10-10 16:41:47 +01:00
parent a090f50bc5
commit 45fd570414
3 changed files with 19 additions and 4 deletions

View File

@@ -686,7 +686,6 @@ class PokeBattle_PledgeMove < PokeBattle_Move
@pledgeCombo = false
@pledgeOtherUser = nil
@comboEffect = nil
@overrideType = nil
@overrideAnim = nil
# Check whether this is the use of a combo move
@combos.each do |i|
@@ -694,9 +693,7 @@ class PokeBattle_PledgeMove < PokeBattle_Move
@battle.pbDisplay(_INTL("The two moves have become one! It's a combined move!"))
@pledgeCombo = true
@comboEffect = i[1]
@overrideType = i[2]
@overrideAnim = i[3]
@overrideType = nil if !GameData::Type.exists?(@overrideType)
break
end
return if @pledgeCombo
@@ -721,7 +718,13 @@ class PokeBattle_PledgeMove < PokeBattle_Move
end
def pbBaseType(user)
return @overrideType if @overrideType!=nil
# This method is called before pbOnStartUse, so it has to calculate the type
# separately
@combos.each do |i|
next if i[0] != user.effects[PBEffects::FirstPledge]
next if !GameData::Type.exists?(i[2])
return i[2]
end
return super
end

View File

@@ -205,6 +205,7 @@ class PokeBattle_Scene
dw = @sprites["messageWindow"]
dw.text = msg
cw = Window_CommandPokemon.new(commands)
cw.height = Graphics.height - dw.height if cw.height > Graphics.height - dw.height
cw.x = Graphics.width-cw.width
cw.y = Graphics.height-cw.height-dw.height
cw.z = dw.z+1

View File

@@ -160,6 +160,17 @@ DebugMenuCommands.register("daycare", {
}
})
DebugMenuCommands.register("skipcredits", {
"parent" => "fieldmenu",
"name" => _INTL("Skip Credits"),
"description" => _INTL("Toggle whether credits can be ended early by pressing the Use input."),
"effect" => proc {
$PokemonGlobal.creditsPlayed = !$PokemonGlobal.creditsPlayed
pbMessage(_INTL("Credits can be skipped when played in future.")) if $PokemonGlobal.creditsPlayed
pbMessage(_INTL("Credits cannot be skipped when next played.")) if !$PokemonGlobal.creditsPlayed
}
})
DebugMenuCommands.register("relicstone", {
"parent" => "fieldmenu",
"name" => _INTL("Use Relic Stone"),