this is a programming question. apologies if there is a better place for this.
I'm trying to figure out how to mod Gen 1 Mimic so that a mimicked move does not reset back to Mimic after switching the user out. I'm obscenely ignorant, and naturally I can't just copy/paste later gen versions of Mimic (or Sketch) because they have other differences I don't want. I tried cross-referencing them in order to isolate what exactly makes the later gen ones permanent permanent, but I'm incompetent so it hasn't worked out.
any easy ways to do this? or is there a better place/person to ask? much appreciated
I'm trying to figure out how to mod Gen 1 Mimic so that a mimicked move does not reset back to Mimic after switching the user out. I'm obscenely ignorant, and naturally I can't just copy/paste later gen versions of Mimic (or Sketch) because they have other differences I don't want. I tried cross-referencing them in order to isolate what exactly makes the later gen ones permanent permanent, but I'm incompetent so it hasn't worked out.
Code:
mimic: {
inherit: true,
desc: "This move is replaced by a random move on target's moveset. The copied move has the maximum PP for that move. Ignores a target's Substitute.",
shortDesc: "A random target's move replaces this one.",
onHit: function (target, source) {
var disallowedMoves = {mimic:1, struggle:1, transform:1};
if (source.transformed) return false;
var moveslot = source.moves.indexOf('mimic');
if (moveslot === -1) return false;
var moves = target.moves;
moves = moves.randomize();
for (var i = 0; i < moves.length; i++) {
if (!(moves[i] in disallowedMoves)) {
var move = moves[i];
break;
}
}
var move = this.getMove(move);
source.moveset[moveslot] = {
move: move.name,
id: move.id,
pp: move.pp,
maxpp: move.pp,
target: move.target,
disabled: false,
used: false
};
source.moves[moveslot] = toId(move.name);
this.add('-start', source, 'Mimic', move.name);
}
},