Game_Action.prototype.lukEffectRate = function(target) { return Math.max(1.0 + (this.subject().luk - target.luk) * 0.001, 0.0);};For your second question make the skill/item apply a state that has notetags (Battle Core + Skill&States Core). Maybe you can get the origin straight without storing it like that, but yeah, don't know:
<JS On Add State>target._stateMan = origin;</JS On Add State><JS Post-Damage as Target>if (user.actorId() === target._stateMan.actorId()){target.addState(X);}</JS Post-Damage as Target>PS. This is assuming that only actors use this stuff (so that you can reference actorIds). Also, you can put more conditionals in the second part if you want it to activate only on certain types of attacks.