What I am assuming:-
If flashlight shines on ghost for less than 1 second-->no damage
If flashlight shines on ghost for 1 second-->25 health deduct
Or If flashlight shines on ghost for 2 second -->50 health deduct
And there are multiple ghosts in the game
My solution:-
1.)Make an instance variable for the ghost sprite named "ghost_death_counter"
2.) (If "flashlight sprite" overlaps "ghost sprite") & (every 0.0 second) --> add 0.01 to ghost sprite's instance variable named "ghost_death_counter"
3.) (For every ghost sprite) & (If value of "ghost_death_variable" >=1)--> (reduce 25 from its health) & (reset value of "ghost_death_variable" to 0)