Assuming this is using the rest of the default GAME.CON without modifications, BOSS3 is scripted to set its strength to 1 here in this block in "state boss3code":
ifai 0
{
ifspritepal 0
ai AIBOSS3RUNENEMY
else
{
strength 1
ai AIBOSS3LOBENEMY
}
}
All actor code runs after EVENT_SPAWN, and any other on-spawn type events, would have executed. So technically your code does change it to BOSS1PALSTRENGTH, it just gets changed back to 1 later on.
The easiest fix here is just to edit that code block to change "strength 1" to "strength BOSS1PALSTRENGTH". However I'm assuming you are not wanting to edit the default GAME.CON file, so in that case you'll have to come up with another method.
What I would do is have some a per-actor gamevar to track the fixup, and check for it in EVENT_GAME. Something like:
var BOSSFIXUP 0 2
appendevent EVENT_GAME
{
// Check this first because EVENT_GAME is expensive
ifn BOSSFIXUP 0
break
// Make all sprites ignore subsequent checks
set BOSSFIXUP 1
switch sprite[].picnum
{
case BOSS2
case BOSS3
ifn sprite[].pal 0
strength BOSS1PALSTRENGTH
break
}
endswitch
}
endevent
This may be the way wrong approach though, I'm not sure if there's some other event that might be better suited. EVENT_GAME isn't great because it runs for every sprite, every frame, so it can easily get out of hand if you aren't careful or use it all over the place haphazardly.
Now that I think about it and look at the Boss scripts, it looks like the "ifai 0" check could safely be overridden. So you would move the behaviors that are checked/set in the actor code into an EVENT_SPAWN block, something like:
appendevent EVENT_SPAWN
{
ifn sprite[].pal 0
{
ife sprite[].picnum BOSS2
{
strength BOSS1PALSTRENGTH
sound BOS2_ATTACK
ai AIBOSS2SHOOTENEMY
}
ife sprite[].picnum BOSS3
{
strength BOSS1PALSTRENGTH
ai AIBOSS3LOBENEMY
}
}
}
endevent
That maybe would work.