Updates Golden Thief Bug card behavior (#6562)

* Fixes #5918.
* Target magic skills should get blocked even when cast on self.
* Self magic skills should get blocked on all targets except self.
* Adds an IgnoreGtb skill flag to explicitly allow a skill to bypass these checks.
Thanks to @Playtester!
This commit is contained in:
Aleos 2022-02-01 15:53:27 -05:00 committed by GitHub
parent 181bc0e856
commit 3deb3e2048
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 2 deletions

View File

@ -34208,6 +34208,8 @@ Body:
MaxLevel: 5 MaxLevel: 5
Type: Magic Type: Magic
TargetType: Attack TargetType: Attack
Flags:
IgnoreGtb: true
Range: 9 Range: 9
Hit: Single Hit: Single
HitCount: 1 HitCount: 1

View File

@ -3,7 +3,7 @@
//===== By: ================================================== //===== By: ==================================================
//= rAthena Dev Team //= rAthena Dev Team
//===== Last Updated: ======================================== //===== Last Updated: ========================================
//= 20200324 //= 20220126
//===== Description: ========================================= //===== Description: =========================================
//= Explanation of the skill_db.yml file and structure. //= Explanation of the skill_db.yml file and structure.
//============================================================ //============================================================
@ -102,6 +102,7 @@ IgnoreWugBite - Ignore RA_WUGBITE.
IgnoreAutoGuard - Not blocked by SC_AUTOGUARD (When TargetType is Weapon only). IgnoreAutoGuard - Not blocked by SC_AUTOGUARD (When TargetType is Weapon only).
IgnoreCicada - Not blocked by SC_UTSUSEMI or SC_BUNSINJYUTSU (When TargetType is Weapon only). IgnoreCicada - Not blocked by SC_UTSUSEMI or SC_BUNSINJYUTSU (When TargetType is Weapon only).
ShowScale - Shows AoE area while casting ShowScale - Shows AoE area while casting
IgnoreGtb - Not blocked by Golden Thief Bug card.
--------------------------------------- ---------------------------------------

View File

@ -8251,6 +8251,7 @@
export_constant(INF2_IGNOREAUTOGUARD); export_constant(INF2_IGNOREAUTOGUARD);
export_constant(INF2_IGNORECICADA); export_constant(INF2_IGNORECICADA);
export_constant(INF2_SHOWSCALE); export_constant(INF2_SHOWSCALE);
export_constant(INF2_IGNOREGTB);
/* skill no near npc flags */ /* skill no near npc flags */
export_constant(SKILL_NONEAR_WARPPORTAL); export_constant(SKILL_NONEAR_WARPPORTAL);

View File

@ -107,6 +107,7 @@ enum e_skill_inf2 : uint8 {
INF2_IGNOREAUTOGUARD , // Skill is not blocked by SC_AUTOGUARD (physical-skill only) INF2_IGNOREAUTOGUARD , // Skill is not blocked by SC_AUTOGUARD (physical-skill only)
INF2_IGNORECICADA, // Skill is not blocked by SC_UTSUSEMI or SC_BUNSINJYUTSU (physical-skill only) INF2_IGNORECICADA, // Skill is not blocked by SC_UTSUSEMI or SC_BUNSINJYUTSU (physical-skill only)
INF2_SHOWSCALE, // Skill shows AoE area while casting INF2_SHOWSCALE, // Skill shows AoE area while casting
INF2_IGNOREGTB, // Skill ignores effect of GTB
INF2_MAX, INF2_MAX,
}; };

View File

@ -10278,7 +10278,13 @@ t_tick status_get_sc_def(struct block_list *src, struct block_list *bl, enum sc_
if (status_isimmune(bl)) { if (status_isimmune(bl)) {
std::shared_ptr<s_skill_db> skill = skill_db.find(battle_getcurrentskill(src)); std::shared_ptr<s_skill_db> skill = skill_db.find(battle_getcurrentskill(src));
if (skill != nullptr && skill->nameid != AG_DEADLY_PROJECTION && skill->skill_type == BF_MAGIC) if (skill == nullptr) // Check for ground-type skills using the status when a player moves through units
skill = skill_db.find(status_sc2skill(type));
if (skill != nullptr && skill->skill_type == BF_MAGIC && // Basic magic skill
!skill->inf2[INF2_IGNOREGTB] && // Specific skill to bypass
((skill->inf == INF_ATTACK_SKILL || skill->inf == INF_GROUND_SKILL || skill->inf == INF_SUPPORT_SKILL) || // Target skills should get blocked even when cast on self
(skill->inf == INF_SELF_SKILL && src != bl))) // Self skills should get blocked on all targets except self
return 0; return 0;
} }