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

Commit

Permalink
IMP - Renamed KATANA to BLADE, CANE to STAFF, GUN to `MANAC…
Browse files Browse the repository at this point in the history
…ASTER`

Signed-off-by: RaenonX <[email protected]>
  • Loading branch information
RaenonX committed Jan 25, 2021
1 parent dc3075f commit d4cbacf
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 24 deletions.
6 changes: 3 additions & 3 deletions .data/custom/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@
"text": "武器: 劍"
},
{
"id": "ENUM_COND_WEAPON_KATANA",
"id": "ENUM_COND_WEAPON_BLADE",
"text": "武器: 刀"
},
{
Expand All @@ -784,11 +784,11 @@
"text": "武器: 法"
},
{
"id": "ENUM_COND_WEAPON_CANE",
"id": "ENUM_COND_WEAPON_STAFF",
"text": "武器: 補"
},
{
"id": "ENUM_COND_WEAPON_GUN",
"id": "ENUM_COND_WEAPON_MANACASTER",
"text": "武器: 銃"
},
{
Expand Down
6 changes: 3 additions & 3 deletions .data/custom/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@
"text": "Weapon: Sword"
},
{
"id": "ENUM_COND_WEAPON_KATANA",
"id": "ENUM_COND_WEAPON_BLADE",
"text": "Weapon: Blade"
},
{
Expand All @@ -784,11 +784,11 @@
"text": "Weapon: Wand"
},
{
"id": "ENUM_COND_WEAPON_CANE",
"id": "ENUM_COND_WEAPON_STAFF",
"text": "Weapon: Staff"
},
{
"id": "ENUM_COND_WEAPON_GUN",
"id": "ENUM_COND_WEAPON_MANACASTER",
"text": "Weapon: Manacaster"
},
{
Expand Down
6 changes: 3 additions & 3 deletions .data/custom/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@
"text": "武器: 劍"
},
{
"id": "ENUM_COND_WEAPON_KATANA",
"id": "ENUM_COND_WEAPON_BLADE",
"text": "武器: 刀"
},
{
Expand All @@ -784,11 +784,11 @@
"text": "武器: 法"
},
{
"id": "ENUM_COND_WEAPON_CANE",
"id": "ENUM_COND_WEAPON_STAFF",
"text": "武器: 補"
},
{
"id": "ENUM_COND_WEAPON_GUN",
"id": "ENUM_COND_WEAPON_MANACASTER",
"text": "武器: 銃"
},
{
Expand Down
6 changes: 3 additions & 3 deletions dlparse/enums/condition/category.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,14 +401,14 @@ class ConditionCategories:
self_weapon_type = ConditionCategory[Weapon](
{
Condition.WEAPON_SWORD: Weapon.SWD,
Condition.WEAPON_KATANA: Weapon.KAT,
Condition.WEAPON_BLADE: Weapon.KAT,
Condition.WEAPON_DAGGER: Weapon.DAG,
Condition.WEAPON_AXE: Weapon.AXE,
Condition.WEAPON_LANCE: Weapon.LAN,
Condition.WEAPON_BOW: Weapon.BOW,
Condition.WEAPON_ROD: Weapon.ROD,
Condition.WEAPON_CANE: Weapon.CAN,
Condition.WEAPON_GUN: Weapon.GUN,
Condition.WEAPON_STAFF: Weapon.CAN,
Condition.WEAPON_MANACASTER: Weapon.GUN,
},
ConditionMaxCount.SINGLE,
"Self - weapon type",
Expand Down
6 changes: 3 additions & 3 deletions dlparse/enums/condition/items.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,14 @@ class Condition(TranslatableEnumMixin, Enum):

# region Weapon type
WEAPON_SWORD = 291
WEAPON_KATANA = 292
WEAPON_BLADE = 292
WEAPON_DAGGER = 293
WEAPON_AXE = 294
WEAPON_LANCE = 295
WEAPON_BOW = 296
WEAPON_ROD = 297
WEAPON_CANE = 298
WEAPON_GUN = 299
WEAPON_STAFF = 298
WEAPON_MANACASTER = 299
# endregion
# endregion

Expand Down
8 changes: 4 additions & 4 deletions dlparse/enums/weapon.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@ class Weapon(Enum):
NONE = 0

SWD = 1 # Sword
KAT = 2 # Katana
KAT = 2 # Blade (Katana)
DAG = 3 # Dagger
AXE = 4 # Axe
LAN = 5 # Lance
BOW = 6 # Bow
ROD = 7 # Rod (Damaging Mage)
CAN = 8 # Cane (Healing Mage)
GUN = 9 # Gun
CAN = 8 # Staff (Cane - Healing Mage)
GUN = 9 # Manacaster (Gun)

@property
def is_valid(self) -> bool:
"""
Check if the current weapon is valid.
"Valid" means that this needs to be one of Sword, Karana, Dagger, Axe, Lance, Bow, Row or Gun.
"Valid" means that this needs to be one of Sword, Blade, Dagger, Axe, Lance, Bow, Rod, Staff or Manacaster.
"""
return self in self.get_all_valid_weapons()

Expand Down
6 changes: 3 additions & 3 deletions notes/others/CharaSkillCameraDuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,14 @@ The implementations of these steps can be found [here](/dlparse/mono/asset/motio
### Weapon code

- `SWD`: Sword
- `KAT`: Katana
- `KAT`: Blade (Katana)
- `DAG`: Dagger
- `AXE`: Axe
- `LAN`: Lance
- `BOW`: Bow
- `ROD`: Rod (Damaging Mage)
- `CAN`: Cane (Healing Mage)
- `GUN`: Gun
- `CAN`: Staff (Cane - Healing Mage)
- `GUN`: Manacaster (Gun)

### Credits

Expand Down
4 changes: 2 additions & 2 deletions tests/test_transformer/test_ex/test_by_weapon.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def test_sword(transformer_ability: AbilityTransformer):
check_ability_effect_unit_match(ex_ability_data.effect_units, expected_info)


def test_katana(transformer_ability: AbilityTransformer):
def test_blade(transformer_ability: AbilityTransformer):
# Nobunaga - 10250103
# https://dragalialost.gamepedia.com/Nobunaga
ex_ability_data = transformer_ability.transform_ex_ability(101020010)
Expand Down Expand Up @@ -123,7 +123,7 @@ def test_staff(transformer_ability: AbilityTransformer):
check_ability_effect_unit_match(ex_ability_data.effect_units, expected_info)


def test_gun(transformer_ability: AbilityTransformer):
def test_manacaster(transformer_ability: AbilityTransformer):
# Ilia - 10950401
# https://dragalialost.gamepedia.com/Ilia
ex_ability_data = transformer_ability.transform_ex_ability(109000009)
Expand Down

0 comments on commit d4cbacf

Please sign in to comment.