While I was doing a random double battle, I came across an unusual anomaly. I'm not sure if this is a glitch with the Simulator or if it also occurs in the X and Y cartridge.
This is what happened. On turn 5 of the posted replay Pyroar used Hyper Voice on Hawlucha and Golduck. Hawlucha got hit first and its Red Card item triggered, forcing Pyroar out. Then the second hit of Hyper Voice KOed Golduck. This would normally have triggered Pyroar's Moxie ability, but Pyroar wasn't in the battle. However the ability still seemed to trigger and gave the boost to what was brought out, in this case Noivern.
Here is the replay so you can see the event.
http://replay.pokemonshowdown.com/randomdoublesbattle-118247578
This is what happened. On turn 5 of the posted replay Pyroar used Hyper Voice on Hawlucha and Golduck. Hawlucha got hit first and its Red Card item triggered, forcing Pyroar out. Then the second hit of Hyper Voice KOed Golduck. This would normally have triggered Pyroar's Moxie ability, but Pyroar wasn't in the battle. However the ability still seemed to trigger and gave the boost to what was brought out, in this case Noivern.
Here is the replay so you can see the event.
http://replay.pokemonshowdown.com/randomdoublesbattle-118247578