It's nice to see that both of them were able to come to some useful conclusions that later let you trigger the elemental trap of sorts. Yet, I find a problem with the scriptlet that you're now using. You see, it has a flaw. It uses the current party member's stats. extracted from
mem variable, as a base for the damage that should be dealt to that very same hero, also called
mem there. This is a weird solution indeed. Normally, you'd pick an enemy to decide how strong the skill's base stats & effects will be. That's not the case here.
As a summary, it's a clear case of
friendly fire.
Let's say your skill is magical by definition. That would mean that mages who normally have high MATK stats could be seriously hurt by that skill while fighters like
:ehappy: Eric wouldn't. If it's physical by nature, then
:esad: Eric would be the first casualty here. Of course,
this might not take place if they also have high DEF or MDEF stats.
Of course, if you simply don't mind about these
technicalities, well, you're good to go!
😀
My Suggestion
You better pick an enemy from the database to cast the spell instead.
And yes, it's that simple.
:ewink:
Edit: The caster is expected to be a Game_Enemy not a DB enemy so I had to change that.
item doesn't need to be redefined every single time you pick another hero.
Ruby:
caster = Game_Enemy.new(0, 1) # Enemy ID is 1 here
item = $data_skills[80]
$game_party.members.each do |member|
member.item_apply(caster, item)
end
It doesn't have to be enemy #1, obviously.
:eswt: