This is the line 65 in the code : default_target = default_battler.pbDirectOpposing if default_target.index == default_battler.index
And this is the battle script:
ARTHUR_CHAMPION = {
"BattleEndLoss" =>
{
"setSpeaker" => :Self,
"editWindow" => [nil, "speech hgss 1"],
"speech" => "Tu vas avoir besoin de plus d'entrainement si tu veux mon badge."
},
"BeforeLastSwitchIn_foe" =>
{
"setSpeaker" => :Self,
"editWindow" => [nil, "speech hgss 1"],
"speech" => "Il reste plus qu'toi Teddiursa.\nJ'ai confiance en toi."
},
"AfterLastSwitchIn_player" =>
{
"setSpeaker" => :Opposing,
"editWindow" => [nil, "speech hgss 1"],
"speech" => "Dos au mur mais t'abandonnes pas.\nC'est ça que j'veux voir!"
},
}
It appears that the "setSpeaker" function doesn't work with "BeforeLastSwitchIn", indeed, I managed to make it work by using an "AfterLastSwitchIn".