Custom formula: giving a Miss result instead of 0 damage?

I've got an item that I only want to work against enemies on two particular maps.


It's pretty much working, but when not on those maps, it deals 0 damage. I'd like it to show 'Miss' instead.


This is my formula, but it's not working - it's still showing as 0 damage.

[28,29].include?($game_map.map_id) ? b.hp : @result.missed = true; 0
Is it possible to force a miss in the formula?
I believe the miss thing isn't checked already during the damage evaluation, because the miss thing is checked before the evaluation... It only seems to evaluate damage if it will hit... so once you reach the damage calculation part, it won't miss anymore...

anyway, why is there a ; 0 at the end?

when I tried it, it always deal 0 damage even when the map has the correct id... which is because the evaluated damage is always equal to the last part of the evaluation...
I didn't try that formula on the correct map - I was testing with an incorrect map. It works on the correct map if you take out this bit:

Code:
@result.missed = true;

Original thread: https://forums.rpgmakerweb.com/threads/custom-formula-giving-a-miss-result-instead-of-0-damage.15567/