hi all im trying to program a card with the following effect
"If this card was Special Summoned by the effect of a "Bugman" card: Negate the effect of any Effect Monster that battles with this card (including in the Graveyard). This face-up card's original ATK is 1000. once per turn You can negate the effect(s) of a face-up "Bugman" card you control, and if you do, add 1 "Bugman" card from your Deck to your hand. You can only use this effect of "Bugman Knockout" once per turn."
i got all the effects working but the problem is with the last effect if it targets itself the effect doesnt get negated but then during my opponents turn when he attacks the eff is negated and then not negated when the attack resolves i cant figure out why here my code so far