Line 50 assigns the victim's race to $player.isowner
It does not check if this race = player
Line 54 always chooses the first script if $player.isowner has any value.
The second (reduced performance?) script can only be selected if the victim has no race at all.
Code: Select all
!fight.attack.object
044 fighter:
045 * if the player does not see the fight, why use high performance scripts?
046 $player.ships = [SECTOR] -> get player owned ship array from sector
047 $player.ships = size of array $player.ships
048 $player.stations = [SECTOR] -> get player owned station array from sector
049 $player.stations = size of array $player.stations
050 $player.isowner = $victim -> get owner race
051 $player.jumps = [PLAYERSHIP] -> get sector
052 $player.jumps = get jumps from sector [SECTOR] to sector $player.jumps
053
054 if $player.ships OR $player.stations OR $player.isowner OR $player.jumps < 2
055 @ |= [THIS] -> call script '!plugin.acp.fight.attack.object' : the victim=$victim follow in new sector=$follow Only attack shields?=$onlyShields
056 else
057 @ |= [THIS] -> call script '!fight.attack.object.std' : the victim=$victim follow in new sector=$follow only target shields?=$onlyShields
058 end