Okay before going any further, brace yourself because this could become more like a lecture than a solution So if you didn't like to read a long explanation then forget this
:)
But it is possible to verify if: "Last Target Index" = "Position 1"?
The answer is somewhat yes.. actually not really yes. Let me explain :
You can acquire the enemy index position with this
$game_troop.members[
the index]
the index = the index is not index in Enemies Database, it's the index in enemy troop position(when you assign them in troop database) and it's in reverse order(if I remember correctly). So the answer for this is yes. But it's become NO when you asking for
Last Target Index Why? Because we need to know who was attacking that enemy(or who was attacking this =>
$game_troop.members[
the index]. In this case we didn't know who is the subject.
So this
$game_troop.members[
the index] is actually not needed(useless if I can say) if you want to do this condition type check. To see an example why this cannot be simply done is, try open conditional branch event command, go for enemy and look at the option, is there any option for us to choose last target index? NO because it's not messing with subject or any related to that, it just giving you
enemy not
target, and what we want is
last TARGET index. It's different with
Force Action command that has
last target index for the target option, why? Because Force Action is processed through a method in
Scene_Battle called
process event further inside the code, there's
process forced action, It can be done because to acquire the performer it's easy, it just need
@subject which is the instance variable in this class. But we are not in Scene_Battle, we are in conditional branch event command, so there's no option to call @subject or the computer will yelling undefined method or else.
If in your game you have fixed actor, say you use Eric, Natalie, Terence, Rick and their formation will not
changing even once and for the entire game,
We can use this assuming the actor index formation will never change(this way you know who has the skill X and etc)
$game_party.battle_members[
the index]
the index = the index of actor, it's number from 0 - 3 Assuming your battle members onoly consist 4 actors.
Oh yeah I forgot to mention, the index of actor and enemy is started from 0, not from 1. So For ex Eric is the first actor, then it means his index is 0.
Now we can aquire the last target index with this syntax : game_troop.members[subject.last_target_index]
subject can be changed to
$game_party.battle_members[
the index]
So for the first actor last target index will be game_troop.members[
$game_party.battle_members[
0].last_target_index]
This will give you the enemy object, and if you want to check if it has a particular state, let's say poison, you can add this method #state?(poison id)
Resulting in this : game_troop.members[
$game_party.battle_members[
0].last_target_index].state?(poison id)
Regardless from the functionality of that code, I still doubt it can be used, why? The script call box for conditional branch is very small and it's only fit one line.
So the conclusion is, doing this in eventing will get really complicated. Not only how to acquire what we need to check something(not mention how to check it), we also need to deal with more space to write our code which in this case this cannot be tolerated anymore.
As you can see this : game_troop.members[
$game_party.battle_members[
0].last_target_index].state?(poison id) needed to check if enemy has poison state or not, and this can't fit in script box @@a. So yeah this is not an option to. So again if you're insist to not touching Script Editor this task is simply impossible to be done.
EDIT : Oh yeah, this can be somewhat break the topic of this thread(hope not), and mod will screaming at us. So brace ourselves if that's happen
:)