Skip to content
This repository has been archived by the owner on Jun 9, 2022. It is now read-only.

Commit

Permalink
FIX - DY!Nefaria S2 recognized as having attacking hits (where it sho…
Browse files Browse the repository at this point in the history
…uld not)

Signed-off-by: RaenonX <[email protected]>
  • Loading branch information
RaenonX committed Dec 18, 2020
1 parent 754b562 commit 1ead2e8
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
20 changes: 17 additions & 3 deletions dlparse/mono/asset/master/action_hit_attr.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,13 @@ def is_effective_to_enemy(self, desired_effectiveness: bool) -> bool:
- Deals damage to the enemy
"""
if self.damage_modifier:
# Deals damage
return True
# Known priority rules:
# - Dummy hit count > Hit exec type
# - For Nadine S1 (`105501021`), the label used for counting the dummy hit is considered as buffing hit.
# However, such hit should not be considered as *not effective* to the enemy such early.
# - Hit exec type > Damage modifier
# - For Dragonyule Nefaria S2 (`106402022`), buffing hit attributes have damage modifiers,
# although seems not used. Such hit must be considered as *ineffective* to the enemy.

if self.dummy_hit_count:
# If the hit attribute adds dummy hit count, return the desired effectiveness because
Expand All @@ -218,6 +222,16 @@ def is_effective_to_enemy(self, desired_effectiveness: bool) -> bool:
# Therefore, returning the desired effectiveness to keep the effectiveness being the desired one
return desired_effectiveness

if self.hit_exec_type not in (HitExecType.DAMAGE, HitExecType.UNKNOWN):
# Not dealing damage
# > Some hit attributes (`BOW_CHR_09_H01_TENSION_LV03` and `BOW_CHR_09_H02_SIELD_LV03` of Nefaria S2
# > (`106402022`) has damage modifier yet it's a buffing hit
return False

if self.damage_modifier:
# Deals damage
return True

if self.target_group != HitTarget.ENEMY:
# Has action condition but the target is not enemy
return False
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import pytest

from dlparse.errors import HitDataUnavailableError
from dlparse.transformer import SkillTransformer


def test_s2_no_atk_data(transformer_skill: SkillTransformer):
# Dragonyule Nefaria S2
# https://dragalialost.gamepedia.com/Dragonyule_Nefaria
with pytest.raises(HitDataUnavailableError):
transformer_skill.transform_attacking(106402022)

0 comments on commit 1ead2e8

Please sign in to comment.