Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions src/map/battle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4868,15 +4868,6 @@ static int32 battle_calc_attack_skill_ratio(struct Damage* wd, block_list *src,b
RE_LVL_DMOD(100);
break;
#endif
case SN_SHARPSHOOTING:
if (src->type == BL_MOB) { // TODO: Did these formulas change in the renewal balancing?
if (wd->miscflag & 2) // Splash damage bonus
skillratio += -100 + 140 * skill_lv;
else
skillratio += 100 + 50 * skill_lv;
break;
}
[[fallthrough]];
case MA_SHARPSHOOTING:
#ifdef RENEWAL
skillratio += -100 + 300 + 300 * skill_lv;
Expand Down
6 changes: 6 additions & 0 deletions src/map/map-server-generator.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,9 @@
<ClInclude Include="skills/archer/concentration.hpp" />
<ClInclude Include="skills/archer/detect.hpp" />
<ClInclude Include="skills/archer/doublestrafe.hpp" />
<ClInclude Include="skills/archer/falconassault.hpp" />
<ClInclude Include="skills/archer/flasher.hpp" />
<ClInclude Include="skills/archer/focusedarrowstrike.hpp" />
<ClInclude Include="skills/archer/freezingtrap.hpp" />
<ClInclude Include="skills/archer/landmine.hpp" />
<ClInclude Include="skills/archer/makingarrow.hpp" />
Expand All @@ -287,6 +289,7 @@
<ClInclude Include="skills/archer/skill_factory_archer.hpp" />
<ClInclude Include="skills/archer/springtrap.hpp" />
<ClInclude Include="skills/archer/talkiebox.hpp" />
<ClInclude Include="skills/archer/windwalker.hpp" />
<ClInclude Include="skills/custom/skill_factory_custom.hpp" />
<ClInclude Include="skills/gunslinger/bullseye.hpp" />
<ClInclude Include="skills/gunslinger/cracker.hpp" />
Expand Down Expand Up @@ -548,7 +551,9 @@
<ClCompile Include="skills/archer/concentration.cpp" />
<ClCompile Include="skills/archer/detect.cpp" />
<ClCompile Include="skills/archer/doublestrafe.cpp" />
<ClCompile Include="skills/archer/falconassault.cpp" />
<ClCompile Include="skills/archer/flasher.cpp" />
<ClCompile Include="skills/archer/focusedarrowstrike.cpp" />
<ClCompile Include="skills/archer/freezingtrap.cpp" />
<ClCompile Include="skills/archer/landmine.cpp" />
<ClCompile Include="skills/archer/makingarrow.cpp" />
Expand All @@ -560,6 +565,7 @@
<ClCompile Include="skills/archer/skill_factory_archer.cpp" />
<ClCompile Include="skills/archer/springtrap.cpp" />
<ClCompile Include="skills/archer/talkiebox.cpp" />
<ClCompile Include="skills/archer/windwalker.cpp" />
<ClCompile Include="skills/custom/skill_factory_custom.cpp" />
<ClCompile Include="skills/gunslinger/bullseye.cpp" />
<ClCompile Include="skills/gunslinger/cracker.cpp" />
Expand Down
18 changes: 18 additions & 0 deletions src/map/map-server-generator.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -474,9 +474,15 @@
<ClInclude Include="skills/archer/doublestrafe.hpp">
<Filter>Header Files\Skills\Archer</Filter>
</ClInclude>
<ClInclude Include="skills/archer/falconassault.hpp">
<Filter>Header Files\Skills\Archer</Filter>
</ClInclude>
<ClInclude Include="skills/archer/flasher.hpp">
<Filter>Header Files\Skills\Archer</Filter>
</ClInclude>
<ClInclude Include="skills/archer/focusedarrowstrike.hpp">
<Filter>Header Files\Skills\Archer</Filter>
</ClInclude>
<ClInclude Include="skills/archer/freezingtrap.hpp">
<Filter>Header Files\Skills\Archer</Filter>
</ClInclude>
Expand Down Expand Up @@ -510,6 +516,9 @@
<ClInclude Include="skills/archer/talkiebox.hpp">
<Filter>Header Files\Skills\Archer</Filter>
</ClInclude>
<ClInclude Include="skills/archer/windwalker.hpp">
<Filter>Header Files\Skills\Archer</Filter>
</ClInclude>
<ClInclude Include="skills/custom/skill_factory_custom.hpp">
<Filter>Header Files\Skills\Custom</Filter>
</ClInclude>
Expand Down Expand Up @@ -1151,9 +1160,15 @@
<ClCompile Include="skills/archer/doublestrafe.cpp">
<Filter>Source Files\Skills\Archer</Filter>
</ClCompile>
<ClCompile Include="skills/archer/falconassault.cpp">
<Filter>Source Files\Skills\Archer</Filter>
</ClCompile>
<ClCompile Include="skills/archer/flasher.cpp">
<Filter>Source Files\Skills\Archer</Filter>
</ClCompile>
<ClCompile Include="skills/archer/focusedarrowstrike.cpp">
<Filter>Source Files\Skills\Archer</Filter>
</ClCompile>
<ClCompile Include="skills/archer/freezingtrap.cpp">
<Filter>Source Files\Skills\Archer</Filter>
</ClCompile>
Expand Down Expand Up @@ -1187,6 +1202,9 @@
<ClCompile Include="skills/archer/talkiebox.cpp">
<Filter>Source Files\Skills\Archer</Filter>
</ClCompile>
<ClCompile Include="skills/archer/windwalker.cpp">
<Filter>Source Files\Skills\Archer</Filter>
</ClCompile>
<ClCompile Include="skills/custom/skill_factory_custom.cpp">
<Filter>Source Files\Skills\Custom</Filter>
</ClCompile>
Expand Down
6 changes: 6 additions & 0 deletions src/map/map-server.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,9 @@
<ClInclude Include="skills/archer/concentration.hpp" />
<ClInclude Include="skills/archer/detect.hpp" />
<ClInclude Include="skills/archer/doublestrafe.hpp" />
<ClInclude Include="skills/archer/falconassault.hpp" />
<ClInclude Include="skills/archer/flasher.hpp" />
<ClInclude Include="skills/archer/focusedarrowstrike.hpp" />
<ClInclude Include="skills/archer/freezingtrap.hpp" />
<ClInclude Include="skills/archer/landmine.hpp" />
<ClInclude Include="skills/archer/makingarrow.hpp" />
Expand All @@ -287,6 +289,7 @@
<ClInclude Include="skills/archer/skill_factory_archer.hpp" />
<ClInclude Include="skills/archer/springtrap.hpp" />
<ClInclude Include="skills/archer/talkiebox.hpp" />
<ClInclude Include="skills/archer/windwalker.hpp" />
<ClInclude Include="skills/custom/skill_factory_custom.hpp" />
<ClInclude Include="skills/gunslinger/bullseye.hpp" />
<ClInclude Include="skills/gunslinger/cracker.hpp" />
Expand Down Expand Up @@ -548,7 +551,9 @@
<ClCompile Include="skills/archer/concentration.cpp" />
<ClCompile Include="skills/archer/detect.cpp" />
<ClCompile Include="skills/archer/doublestrafe.cpp" />
<ClCompile Include="skills/archer/falconassault.cpp" />
<ClCompile Include="skills/archer/flasher.cpp" />
<ClCompile Include="skills/archer/focusedarrowstrike.cpp" />
<ClCompile Include="skills/archer/freezingtrap.cpp" />
<ClCompile Include="skills/archer/landmine.cpp" />
<ClCompile Include="skills/archer/makingarrow.cpp" />
Expand All @@ -560,6 +565,7 @@
<ClCompile Include="skills/archer/skill_factory_archer.cpp" />
<ClCompile Include="skills/archer/springtrap.cpp" />
<ClCompile Include="skills/archer/talkiebox.cpp" />
<ClCompile Include="skills/archer/windwalker.cpp" />
<ClCompile Include="skills/custom/skill_factory_custom.cpp" />
<ClCompile Include="skills/gunslinger/bullseye.cpp" />
<ClCompile Include="skills/gunslinger/cracker.cpp" />
Expand Down
18 changes: 18 additions & 0 deletions src/map/map-server.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -474,9 +474,15 @@
<ClInclude Include="skills/archer/doublestrafe.hpp">
<Filter>Header Files\Skills\Archer</Filter>
</ClInclude>
<ClInclude Include="skills/archer/falconassault.hpp">
<Filter>Header Files\Skills\Archer</Filter>
</ClInclude>
<ClInclude Include="skills/archer/flasher.hpp">
<Filter>Header Files\Skills\Archer</Filter>
</ClInclude>
<ClInclude Include="skills/archer/focusedarrowstrike.hpp">
<Filter>Header Files\Skills\Archer</Filter>
</ClInclude>
<ClInclude Include="skills/archer/freezingtrap.hpp">
<Filter>Header Files\Skills\Archer</Filter>
</ClInclude>
Expand Down Expand Up @@ -510,6 +516,9 @@
<ClInclude Include="skills/archer/talkiebox.hpp">
<Filter>Header Files\Skills\Archer</Filter>
</ClInclude>
<ClInclude Include="skills/archer/windwalker.hpp">
<Filter>Header Files\Skills\Archer</Filter>
</ClInclude>
<ClInclude Include="skills/custom/skill_factory_custom.hpp">
<Filter>Header Files\Skills\Custom</Filter>
</ClInclude>
Expand Down Expand Up @@ -1151,9 +1160,15 @@
<ClCompile Include="skills/archer/doublestrafe.cpp">
<Filter>Source Files\Skills\Archer</Filter>
</ClCompile>
<ClCompile Include="skills/archer/falconassault.cpp">
<Filter>Source Files\Skills\Archer</Filter>
</ClCompile>
<ClCompile Include="skills/archer/flasher.cpp">
<Filter>Source Files\Skills\Archer</Filter>
</ClCompile>
<ClCompile Include="skills/archer/focusedarrowstrike.cpp">
<Filter>Source Files\Skills\Archer</Filter>
</ClCompile>
<ClCompile Include="skills/archer/freezingtrap.cpp">
<Filter>Source Files\Skills\Archer</Filter>
</ClCompile>
Expand Down Expand Up @@ -1187,6 +1202,9 @@
<ClCompile Include="skills/archer/talkiebox.cpp">
<Filter>Source Files\Skills\Archer</Filter>
</ClCompile>
<ClCompile Include="skills/archer/windwalker.cpp">
<Filter>Source Files\Skills\Archer</Filter>
</ClCompile>
<ClCompile Include="skills/custom/skill_factory_custom.cpp">
<Filter>Source Files\Skills\Custom</Filter>
</ClCompile>
Expand Down
19 changes: 0 additions & 19 deletions src/map/skill.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5168,11 +5168,6 @@ int32 skill_castend_damage_id (block_list* src, block_list *bl, uint16 skill_id,
}
break;

#ifndef RENEWAL
case SN_SHARPSHOOTING:
flag |= 2; // Flag for specific mob damage formula
[[fallthrough]];
#endif
case MA_SHARPSHOOTING:
case NJ_KAMAITACHI:
case NPC_DARKPIERCING:
Expand All @@ -5192,10 +5187,6 @@ int32 skill_castend_damage_id (block_list* src, block_list *bl, uint16 skill_id,
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))) {
#ifndef RENEWAL
if (skill_id == SN_SHARPSHOOTING)
flag &= ~2; // Only targets in the splash area are affected
#endif

//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);
Expand Down Expand Up @@ -5295,9 +5286,6 @@ int32 skill_castend_damage_id (block_list* src, block_list *bl, uint16 skill_id,
flag |= SD_PREAMBLE; // a fake packet will be sent for the first target to be hit
[[fallthrough]];
case MA_SHOWER:
#ifdef RENEWAL
case SN_SHARPSHOOTING:
#endif
case HW_NAPALMVULCAN:
case NJ_HUUMA:
case NPC_PULSESTRIKE:
Expand Down Expand Up @@ -5501,11 +5489,6 @@ int32 skill_castend_damage_id (block_list* src, block_list *bl, uint16 skill_id,
status_heal(src, heal, 0, 0);
}
break;
#ifdef RENEWAL
case SN_SHARPSHOOTING:
status_change_end(src, SC_CAMOUFLAGE);
break;
#endif
case SJ_PROMINENCEKICK: // Trigger the 2nd hit. (100% fire damage.)
skill_attack(skill_get_type(skill_id), src, src, bl, skill_id, skill_lv, tick, sflag|8|SD_ANIMATION);
break;
Expand Down Expand Up @@ -6184,7 +6167,6 @@ int32 skill_castend_damage_id (block_list* src, block_list *bl, uint16 skill_id,
if (rnd() % 2 == 0)
break; // 50% chance
[[fallthrough]];
case SN_FALCONASSAULT:
#ifndef RENEWAL
case PA_PRESSURE:
case CR_ACIDDEMONSTRATION:
Expand Down Expand Up @@ -8491,7 +8473,6 @@ int32 skill_castend_nodamage_id (block_list *src, block_list *bl, uint16 skill_i
party_foreachsamemap(skill_area_sub, sd, skill_get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag | BCT_PARTY | 1, skill_castend_nodamage_id);
break;

case SN_WINDWALK:
case CASH_BLESSING:
case CASH_INCAGI:
case CASH_ASSUMPTIO:
Expand Down
11 changes: 11 additions & 0 deletions src/map/skills/archer/falconassault.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Copyright (c) rAthena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder

#include "falconassault.hpp"

SkillFalconAssault::SkillFalconAssault() : SkillImpl(SN_FALCONASSAULT) {
}

void SkillFalconAssault::castendDamageId(block_list *src, block_list *target, uint16 skill_lv, t_tick tick, int32& flag) const {
skill_attack(skill_get_type(getSkillId()),src,src,target,getSkillId(),skill_lv,tick,flag);
}
13 changes: 13 additions & 0 deletions src/map/skills/archer/falconassault.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Copyright (c) rAthena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder

#pragma once

#include "../skill_impl.hpp"

class SkillFalconAssault : public SkillImpl {
public:
SkillFalconAssault();

void castendDamageId(block_list *src, block_list *target, uint16 skill_lv, t_tick tick, int32& flag) const override;
};
56 changes: 56 additions & 0 deletions src/map/skills/archer/focusedarrowstrike.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
// Copyright (c) rAthena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder

#include "focusedarrowstrike.hpp"

#include <config/const.hpp>
#include <config/core.hpp>

#include "map/status.hpp"

SkillFocusedArrowStrike::SkillFocusedArrowStrike() : SkillImplRecursiveDamageSplash(SN_SHARPSHOOTING) {
}

void SkillFocusedArrowStrike::calculateSkillRatio(const Damage *wd, const block_list *src, const block_list *target, uint16 skill_lv, int32 &skillratio, int32 mflag) const {
if (src->type == BL_MOB) { // TODO: Did these formulas change in the renewal balancing?
if (wd->miscflag & 2) // Splash damage bonus
skillratio += -100 + 140 * skill_lv;
else
skillratio += 100 + 50 * skill_lv;
return;
}
#ifdef RENEWAL
skillratio += -100 + 300 + 300 * skill_lv;
RE_LVL_DMOD(100);
#else
skillratio += 100 + 50 * skill_lv;
#endif
}

void SkillFocusedArrowStrike::castendDamageId(block_list *src, block_list *target, uint16 skill_lv, t_tick tick, int32& flag) const {
#ifdef RENEWAL
SkillImplRecursiveDamageSplash::castendDamageId(src, target, skill_lv, tick, flag);

if( flag&1 ) {
status_change_end(src, SC_CAMOUFLAGE);
}
#else
flag |= 2; // Flag for specific mob damage formula
skill_area_temp[1] = target->id;
if (battle_config.skill_eightpath_algorithm) {
//Use official AoE algorithm
if (!(map_foreachindir(skill_attack_area, src->m, src->x, src->y, target->x, target->y,
skill_get_splash(getSkillId(), skill_lv), skill_get_maxcount(getSkillId(), skill_lv), 0, splash_target(src),
skill_get_type(getSkillId()), src, src, getSkillId(), skill_lv, tick, flag, BCT_ENEMY))) {
flag &= ~2; // Only targets in the splash area are affected

//These skills hit at least the target if the AoE doesn't hit
skill_attack(skill_get_type(getSkillId()), src, src, target, getSkillId(), skill_lv, tick, flag);
}
} else {
map_foreachinpath(skill_attack_area, src->m, src->x, src->y, target->x, target->y,
skill_get_splash(getSkillId(), skill_lv), skill_get_maxcount(getSkillId(), skill_lv), splash_target(src),
skill_get_type(getSkillId()), src, src, getSkillId(), skill_lv, tick, flag, BCT_ENEMY);
}
#endif
}
14 changes: 14 additions & 0 deletions src/map/skills/archer/focusedarrowstrike.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Copyright (c) rAthena Dev Teams - Licensed under GNU GPL
// For more information, see LICENCE in the main folder

#pragma once

#include "../skill_impl.hpp"

class SkillFocusedArrowStrike : public SkillImplRecursiveDamageSplash {
public:
SkillFocusedArrowStrike();

void calculateSkillRatio(const Damage *wd, const block_list *src, const block_list *target, uint16 skill_lv, int32 &skillratio, int32 mflag) const override;
void castendDamageId(block_list *src, block_list *target, uint16 skill_lv, t_tick tick, int32& flag) const override;
};
9 changes: 9 additions & 0 deletions src/map/skills/archer/skill_factory_archer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
#include "concentration.hpp"
#include "detect.hpp"
#include "doublestrafe.hpp"
#include "falconassault.hpp"
#include "flasher.hpp"
#include "focusedarrowstrike.hpp"
#include "freezingtrap.hpp"
#include "landmine.hpp"
#include "makingarrow.hpp"
Expand All @@ -27,6 +29,7 @@
#include "skidtrap.hpp"
#include "springtrap.hpp"
#include "talkiebox.hpp"
#include "windwalker.hpp"

std::unique_ptr<const SkillImpl> SkillFactoryArcher::create(const e_skill skill_id) const {
switch( skill_id ){
Expand Down Expand Up @@ -84,8 +87,14 @@ std::unique_ptr<const SkillImpl> SkillFactoryArcher::create(const e_skill skill_
return std::make_unique<WeaponSkillImpl>(skill_id);
case RA_UNLIMIT:
return std::make_unique<StatusSkillImpl>(skill_id);
case SN_FALCONASSAULT:
return std::make_unique<SkillFalconAssault>();
case SN_SHARPSHOOTING:
return std::make_unique<SkillFocusedArrowStrike>();
case SN_SIGHT:
return std::make_unique<StatusSkillImpl>(skill_id);
case SN_WINDWALK:
return std::make_unique<SkillWindWalker>();
case TR_KVASIR_SONATA:
return std::make_unique<StatusSkillImpl>(skill_id);
case TR_MYSTIC_SYMPHONY:
Expand Down
Loading
Loading