I am struggling so much with this. Please help me out. I have inputted <hi met: 0> at my Attack skill. I am trying to access it via Regular Expression just like Yanfly. Well I have done it copying Yanfly but it doesn't read the number. It prints out "Hi Met NaN". Please ignore all other code here. A lot of it is for testing purposes.
JavaScript:
_Game_Action_apply = Game_Action.prototype.apply;
Game_Action.prototype.apply = function (target) {
_Game_Action_apply.call(this, target);
console.log("EVALUATE");
console.log(this._item);
if (this._item._dataClass == 'skill') {
var skill = $dataSkills[this._item._itemId];
console.log(skill);
if (skill.meta.unlock) console.log("UNLOCK");
let note = Object.keys(skill.meta);
console.log(note);
let note2 = "/<(?:hi met):\s(\d+)>/ig"
let skillMeta = skill.meta;
console.log(skillMeta);
//console.log(note2 + " " + RegExp.$2);
if (note2.match(skillMeta)) {
console.log("Hi Met " + parseInt(RegExp.$1)); //this one is troublesome
}
}
//if(this._item.meta)
}