Arena Trap and similar abilities don't use turn...

when trying to run away.
Also added some french tokens I forgot to add.
This commit is contained in:
JappaWakka 2025-01-25 10:45:43 +01:00
parent 57803d7266
commit 736af58545
6 changed files with 38 additions and 6 deletions

View File

@ -816,11 +816,33 @@
BattleScreen.BattleQuery.Add(New EndBattleQueryObject(False)) BattleScreen.BattleQuery.Add(New EndBattleQueryObject(False))
Battle.Won = True Battle.Won = True
Battle.Fled = True Battle.Fled = True
Else
Dim Trapped As Boolean = False
Dim p As Pokemon = BattleScreen.OwnPokemon
Dim op As Pokemon = BattleScreen.OppPokemon
If op.Ability.Name.ToLower() = "shadow tag" And p.Ability.Name.ToLower() <> "shadow tag" And op.HP > 0 Then
Trapped = True
End If
If op.Ability.Name.ToLower() = "arena trap" And op.HP > 0 And BattleScreen.FieldEffects.IsGrounded(True, BattleScreen) = True Then
Trapped = True
End If
If op.Ability.Name.ToLower() = "magnet pull" And op.HP > 0 Then
If p.Type1.Type = Element.Types.Steel Or p.Type2.Type = Element.Types.Steel Then
Trapped = True
End If
End If
If Trapped = True Then
Screen.TextBox.Show(Localization.GetString("battle_cannot_run_ability", "Failed to run away because of~") & op.Ability.Name & ".", {}, True, False)
Else Else
BattleScreen.BattleQuery.Clear() BattleScreen.BattleQuery.Clear()
BattleScreen.BattleQuery.Add(BattleScreen.FocusBattle()) BattleScreen.BattleQuery.Add(BattleScreen.FocusBattle())
BattleScreen.BattleQuery.Insert(0, New ToggleMenuQueryObject(True)) BattleScreen.BattleQuery.Insert(0, New ToggleMenuQueryObject(True))
BattleScreen.Battle.InitializeRound(BattleScreen, New Battle.RoundConst With {.StepType = Battle.RoundConst.StepTypes.Text, .Argument = "Failed to run away."}) BattleScreen.Battle.InitializeRound(BattleScreen, New Battle.RoundConst With {.StepType = Battle.RoundConst.StepTypes.Text, .Argument = Localization.GetString("battle_cannot_run", "Failed to run away.")})
End If
End If End If
End Sub End Sub

View File

@ -476,6 +476,8 @@ battle_switch_already_in_battle,is already~in battle!
battle_switch_fainted,is fainted! battle_switch_fainted,is fainted!
battle_switch_egg,Cannot switch in~the egg! battle_switch_egg,Cannot switch in~the egg!
battle_cannot_switch,Cannot switch out. battle_cannot_switch,Cannot switch out.
battle_cannot_run,Failed to run away.
battle_cannot_run_ability,Failed to run away because of~
--- ---
Badges: Badges:
badge_Boulder,Fels badge_Boulder,Fels

View File

@ -497,6 +497,8 @@ battle_switch_already_in_battle,is already~in battle!
battle_switch_fainted,is fainted! battle_switch_fainted,is fainted!
battle_switch_egg,Cannot switch in~the egg! battle_switch_egg,Cannot switch in~the egg!
battle_cannot_switch,Cannot switch out. battle_cannot_switch,Cannot switch out.
battle_cannot_run,Failed to run away.
battle_cannot_run_ability,Failed to run away because of~
--- ---
Badges: Badges:
badge_1,Boulder badge_1,Boulder

View File

@ -227,8 +227,8 @@ option_screen_game_difficulty_description,Définit le niveau de difficulté.
option_screen_game_difficulty_easy,Facile option_screen_game_difficulty_easy,Facile
option_screen_game_difficulty_hard,Difficile option_screen_game_difficulty_hard,Difficile
option_screen_game_difficulty_superhard,Extreme option_screen_game_difficulty_superhard,Extreme
option_screen_game_interfacescale,Interface Scale option_screen_game_interfacescale,Taille de l'interface
option_screen_game_interfacescale_automatic,Automatic option_screen_game_interfacescale_automatic,Automatique
option_screen_game_viewbobbing,View Bobbing option_screen_game_viewbobbing,View Bobbing
option_screen_game_viewbobbing_description,Active ou désactive le tremblement de la caméra. option_screen_game_viewbobbing_description,Active ou désactive le tremblement de la caméra.
@ -497,6 +497,8 @@ battle_switch_already_in_battle,est déjà en combat!
battle_switch_fainted,est KO! battle_switch_fainted,est KO!
battle_switch_egg,Impossible d'envoyer l'œuf ! battle_switch_egg,Impossible d'envoyer l'œuf !
battle_cannot_switch,Impossible de changer. battle_cannot_switch,Impossible de changer.
battle_cannot_run,Failed to run away.
battle_cannot_run_ability,Failed to run away because of~
--- ---
Badges: Badges:
badge_1,Roche badge_1,Roche

View File

@ -496,6 +496,8 @@ battle_switch_already_in_battle,is al~aan het vechten!
battle_switch_fainted,is uitgeschakeld! battle_switch_fainted,is uitgeschakeld!
battle_switch_egg,Kan geen ei inzetten! battle_switch_egg,Kan geen ei inzetten!
battle_cannot_switch,Kan niet wisselen. battle_cannot_switch,Kan niet wisselen.
battle_cannot_run,Kon niet wegrennen.
battle_cannot_run_ability,Kon niet wegrennen vanwege~
--- ---
Badges: Badges:
badge_Boulder,Rots badge_Boulder,Rots

View File

@ -498,6 +498,8 @@ battle_switch_already_in_battle,ja está~em batalha!
battle_switch_fainted,Desmaiou! battle_switch_fainted,Desmaiou!
battle_switch_egg,Não pode trocar~por Ovo! battle_switch_egg,Não pode trocar~por Ovo!
battle_cannot_switch,Não da pra trocar. battle_cannot_switch,Não da pra trocar.
battle_cannot_run,Failed to run away.
battle_cannot_run_ability,Failed to run away because of~
--- ---
Badges: Badges:
badge_1,Boulder badge_1,Boulder