diff --git a/core/nexus_api.py b/core/nexus_api.py index 7e59a4b..45f4acc 100644 --- a/core/nexus_api.py +++ b/core/nexus_api.py @@ -190,7 +190,7 @@ MOCK_WEAPONS = { damage=Decimal("4.0"), decay_pec=Decimal("0.13"), ammo_pec=Decimal("1.07"), - dpp=Decimal("3.70"), + dpp=Decimal("3.33"), range=26, attacks_per_min=56, item_id="sollomate_opalo" @@ -812,12 +812,12 @@ def calculate_dpp(damage: Decimal, decay_pec: Decimal, ammo_pec: Decimal) -> Dec ammo_pec: Ammo cost per shot in PEC Returns: - DPP value + DPP value (damage per PEC spent) """ - total_cost_ped = (decay_pec + ammo_pec) / 100 - if total_cost_ped == 0: + total_cost_pec = decay_pec + ammo_pec + if total_cost_pec == 0: return Decimal("0") - return damage / total_cost_ped + return damage / total_cost_pec # ============================================================================= diff --git a/pytest.ini b/pytest.ini new file mode 100644 index 0000000..599aee5 --- /dev/null +++ b/pytest.ini @@ -0,0 +1,8 @@ +[tool:pytest] +testpaths = tests +python_files = test_*.py +python_classes = Test* +python_functions = test_* +asyncio_mode = auto +asyncio_default_fixture_loop_scope = function +addopts = -v --tb=short \ No newline at end of file