Explosive damage and battle traps

Hello again, I'm back with more questions (seriously, I'm really bad with this).

First, I'm having a problem with a type of damage... You see, in my game there are modern weapons (namely bombs and grenades) that deal a huge amount of damage, so to balance and spice things a bit, I want it to be useful only in open battlefields and if you use it in an enclosed area, it will damage the party as well.

So, how do I manage this? I have all of Yanfly plugins if they are needed.

Also, a bit related with the firs question, how can I make some items called Landmines which only activate if an enemy uses a Physical attack?

Thank you again for your help.
First, a quick tip 🙂 I'd probably only ask one question per thread. This is only because tracking the solution to multiple things in one thread can sometimes become hard to read. Plus, as you learn the answer to one thing, it might help point you in the right direction for your other questions!

Getting back to the topic:
I think some more information is needed before people can start to chime in. Are these bombs and grenades only being used in battle? Are they being used on the map? What have you tried so far?
First, a quick tip 🙂 I'd probably only ask one question per thread. This is only because tracking the solution to multiple things in one thread can sometimes become hard to read. Plus, as you learn the answer to one thing, it might help point you in the right direction for your other questions!

Getting back to the topic:
I think some more information is needed before people can start to chime in. Are these bombs and grenades only being used in battle? Are they being used on the map? What have you tried so far?
I heard I need to open a new thread per question, otherwise it could become necroposting.

Well, in any case, bombs and grenades are only for battle. Also, for now, they are common weapons but I want to add the effect of damaging the party in certain maps.
You'd need a way to define "enclosed area"—presumably map region IDs, but this might get tedious if an entire map is considered enclosed, so ideally, you'd specify by map ID or region ID.

You'd specify an array of map IDs that are enclosed areas, and a region ID (e.g. region #2) to define smaller enclosed areas in a larger map. Or specify if a map is enclosed with a map note tag, e.g. <Enclosed>.

You'd then change the target scope of your item or skill if the player is in an "enclosed area" as defined by a region ID or the map ID or note tag.

Target Core can almost certainly do this with note tags, but a little plugin might be less tedious if you have a bunch of skills that this applies to.
I heard I need to open a new thread per question, otherwise it could become necroposting.
Oh that's fine! I was more talking about how to build your bombs/grenades and then asking about a separate (yet related) mechanic on landmines. I think it's probably easier to see if you make two threads. But the best option might have been to wait until you had an idea of how to do the first thing, and then see if it helps you understand how to do the second thing. It's not wrong necessarily, I just think it's easier to read when reading things back 🙂

You'd need a way to define "enclosed area"—presumably map region IDs, but this might get tedious if an entire map is considered enclosed, so ideally, you'd specify by map ID or region ID.

You'd specify an array of map IDs that are enclosed areas, and a region ID (e.g. region #2) to define smaller enclosed areas in a larger map. Or specify if a map is enclosed with a map note tag, e.g. <Enclosed>.

You'd then change the target scope of your item or skill if the player is in an "enclosed area" as defined by a region ID or the map ID or note tag.

Target Core can almost certainly do this with note tags, but a little plugin might be less tedious if you have a bunch of skills that this applies to.
This is probably the best option. You'd probably also want to convey to players that they're in an enclosed area somehow. That way the player doesn't get frustrated when their bombs sometimes damage the party and sometimes don't.

Original thread: https://forums.rpgmakerweb.com/threads/explosive-damage-and-battle-traps.176048/