Exemple #1
0
    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);
    }
Exemple #2
0
    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);
    }
Exemple #3
0
 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);
     }
 }