Jump to content
  • 0

SharpShooting not working (2018-05-30)


Question

Posted

I'm using the 2018-05-30 version and everything was working fine, but now my Sharp Shooting doesn't work!!
I can hear the sound of the blind effect sometimes when I use the skill, but there's no damage and no animation (even using a item with autospell)
All the other skills of the class are working 100% ? 

Here's everything I could find about sharp shooting:

Battle.c(2454 and 2491)

if( !(wd.type&DMG_MULTI_HIT) && sstatus->cri && (!skill_id ||
		skill_id == KN_AUTOCOUNTER || skill_id == SN_SHARPSHOOTING ||
		skill_id == MA_SHARPSHOOTING || skill_id == NJ_KIRIKAGE))
	{
		short cri = sstatus->cri;

		if (sd) {
			cri += sd->critaddrace[tstatus->race] + sd->critaddrace[RC_ALL];
			if(is_skill_using_arrow(src, skill_id)) {
				cri += sd->bonus.arrow_cri;
				if (!skill_id)
					cri += sd->bonus.critical_rangeatk;
			}
		}

		if(sc && sc->data[SC_CAMOUFLAGE])
			cri += 100 * min(10,sc->data[SC_CAMOUFLAGE]->val3); //max 100% (1K)

		//The official equation is *2, but that only applies when sd's do critical.
		//Therefore, we use the old value 3 on cases when an sd gets attacked by a mob
		cri -= tstatus->luk * ((!sd && tsd) ? 3 : 2);

		if( tsc && tsc->data[SC_SLEEP] )
			cri <<= 1;

		switch(skill_id) {
			case 0:
				if(sc && !sc->data[SC_AUTOCOUNTER])
					break;
				clif_specialeffect(src, EF_AUTOCOUNTER, AREA);
				status_change_end(src, SC_AUTOCOUNTER, INVALID_TIMER);
			case KN_AUTOCOUNTER:
				if(battle_config.auto_counter_type &&
					(battle_config.auto_counter_type&src->type))
					return true;
				else
					cri <<= 1;
				break;
			case SN_SHARPSHOOTING:
			case MA_SHARPSHOOTING:
				cri += 200;
				break;
			case NJ_KIRIKAGE:
				cri += 250 + 50*skill_lv;
				break;
		}
		if(tsd && tsd->bonus.critical_def)
			cri = cri * ( 100 - tsd->bonus.critical_def ) / 100;
		return (rnd()%1000 < cri);
	}
	return 0;

battle.c(3754)

case SN_SHARPSHOOTING:
		case MA_SHARPSHOOTING:
			skillratio += 100 + 50 * skill_lv;
			break;

battle.c(5005)

if (skill_id != SN_SHARPSHOOTING && skill_id != RA_ARROWSTORM)
		status_change_end(src, SC_CAMOUFLAGE, INVALID_TIMER);

battle.c(5242)

if( sc ) {
		//SC_FUSION hp penalty [Komurka]
		if (sc->data[SC_FUSION]) {
			int hp= sstatus->max_hp;
			if (sd && tsd) {
				hp = 8*hp/100;
				if (((int64)sstatus->hp * 100) <= ((int64)sstatus->max_hp * 20))
					hp = sstatus->hp;
			} else
				hp = 2*hp/100; //2% hp loss per hit
			status_zap(src, hp, 0);
		}
		// Only affecting non-skills
		if (!skill_id && wd.dmg_lv > ATK_BLOCK) {
			if (sc->data[SC_ENCHANTBLADE]) {
				//[((Skill Lv x 20) + 100) x (casterBaseLevel / 150)] + casterInt + MATK - MDEF - MDEF2
				int64 enchant_dmg = sc->data[SC_ENCHANTBLADE]->val2;
				if (sstatus->matk_max > sstatus->matk_min)
					enchant_dmg = enchant_dmg + sstatus->matk_min + rnd() % (sstatus->matk_max - sstatus->matk_min);
				else
					enchant_dmg = enchant_dmg + sstatus->matk_min;
				enchant_dmg = enchant_dmg + (sstatus->luk * 5 + sstatus->int_ * 3) - (tstatus->mdef + tstatus->mdef2);
				if (enchant_dmg > 0)
					ATK_ADD(wd.damage, wd.damage2, enchant_dmg);
			}
		}
		if (skill_id != SN_SHARPSHOOTING && skill_id != RA_ARROWSTORM)
			status_change_end(src, SC_CAMOUFLAGE, INVALID_TIMER);
	}

skill.c(4785)

case SN_SHARPSHOOTING:
	case MA_SHARPSHOOTING:
	case NJ_KAMAITACHI:
	case NPC_ACIDBREATH:
		sc_start(src, bl, SC_BLIND, 5 * skill_lv, skill_lv, skill_get_time2(skill_id, skill_lv));
		break;

skill.c(4791)

case NPC_FIREBREATH:
	case NPC_ICEBREATH:
	case NPC_THUNDERBREATH:
		skill_area_temp[1] = bl->id;
		if (battle_config.skill_eightpath_algorithm) {
			//Use official AoE algorithm
			if (!(map_foreachindir(skill_attack_area, src->m, src->x, src->y, bl->x, bl->y,
			   skill_get_splash(skill_id, skill_lv), skill_get_maxcount(skill_id, skill_lv), 0, splash_target(src),
			   skill_get_type(skill_id), src, src, skill_id, skill_lv, tick, flag, BCT_ENEMY))) {
				//These skills hit at least the target if the AoE doesn't hit
				skill_attack(skill_get_type(skill_id), src, src, bl, skill_id, skill_lv, tick, flag);
			}
		} else {
			map_foreachinpath(skill_attack_area, src->m, src->x, src->y, bl->x, bl->y,
				skill_get_splash(skill_id, skill_lv), skill_get_maxcount(skill_id, skill_lv), splash_target(src),
				skill_get_type(skill_id), src, src, skill_id, skill_lv, tick, flag, BCT_ENEMY);
		}
		if (skill_id == SN_SHARPSHOOTING)
			status_change_end(src, SC_CAMOUFLAGE, INVALID_TIMER);
		break;

 

Is there something missing or wrong? ?
I don't know enough about to tell ;-;

Pleeease someone help me ? 

image.thumb.png.6d1cda594867947250a29f8816fbe81e.png

1 answer to this question

Recommended Posts

  • 0
Posted

Oh... Now I see how dumb I am...

Well, after hours of editting it's more than likely to happen something like that xD

The problem was:

case SN_SHARPSHOOTING:
	case MA_SHARPSHOOTING:
	case NJ_KAMAITACHI:
	case NPC_ACIDBREATH:
		sc_start(src, bl, SC_BLIND, 5 * skill_lv, skill_lv, skill_get_time2(skill_id, skill_lv));
		break;

There's no "sc_start(src, bl, SC_BLIND, 5 * skill_lv, skill_lv, skill_get_time2(skill_id, skill_lv));         break;" ?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...