viewing paste Unknown #14583 | C

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
        case UNT_DUMMYSKILL:
            switch (sg->skill_id) {
                case SG_SUN_WARM: //SG skills [Komurka]
                case SG_MOON_WARM:
                case SG_STAR_WARM:
                {
                    int count = 0;
                    const int x = bl->x, y = bl->y;
 
                    map->freeblock_lock();
                    //If target isn't knocked back it should hit every "interval" ms [Playtester]
                    do {
                        if( bl->type == BL_PC )
                            status_zap(bl, 0, 15); // sp damage to players
                        else if( status->charge(ss, 0, 2) ) { // mobs
                            // costs 2 SP per hit
                            if( !skill->attack(BF_WEAPON,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick+count*sg->interval,0) )
                                status->charge(ss, 0, 8); //costs additional 8 SP if miss
                        } else { // mobs
                            //should end when out of sp.
                            sg->limit = DIFF_TICK32(tick,sg->tick);
                            break;
                        }
                    } while( x == bl->x && y == bl->y && sg->alive_count
                          && ++count < SKILLUNITTIMER_INTERVAL/sg->interval && !status->isdead(bl) );
                    map->freeblock_unlock();
                }
                break;
 
Viewed 584 times, submitted by Guest.