Hi!
Where do i change the default substitiute behavior?
(I want too change the default percentage of hp where substitution occurs)
Thanks!
|| is an "or". So in the example above, since an item can't be both Certain Hit and Magical, I think the method will always return "true", which is why you're seeing the behavior that you are.
Try using: !item || item.physical?
Or try using: !item || (!item.certain? && !item.magical?)
I haven't tested these, but based on the way I'm following the method, I think either one should probably solve your problem.
Also, every time I type ||, I see it appear as purple text instead of black, until I put my eyes directly next to the screen. Maybe some form of synesthesia? EDIT: Just blew up a screenshot and did a point-sample in Photoshop... they really are purple!! How bizarre.