static void tp(int s, int, BS &b) { int berry = b.poke(s).item(); if (!testpinch(s, s, b, 4)) return; int stat = (b.true_rand()%5) +1; b.gainStatMod(s, stat, 2,false); b.sendBerryMessage(9,s,0,s,berry, stat); }
static void tp(int s, int, BS &b) { /* The berry may change after the call to test pinch (eaten), so saved before. */ int berry = b.poke(s).item(); if (!testpinch(s, s, b,4)) return; int arg = poke(b,s)["ItemArg"].toInt(); b.sendBerryMessage(7,s,0,s,berry, arg); b.gainStatMod(s, arg, 1,false); }
static void uodr(int s, int t, BS &b) { if (!b.koed(s) && s != t && turn(b,t)["CriticalHit"].toBool()) { b.sendAbMessage(3,0,s); b.gainStatMod(s,Attack,12); } }