예제 #1
0
def test_default_normal_attack(transformer_atk: AttackingActionTransformer):
    # Sword Lv. 1 (100000)
    normal_attack_data = transformer_atk.transform_normal_attack_or_fs(
        100000).with_condition()

    combo_1 = normal_attack_data[0]
    assert combo_1.mods == pytest.approx([0.90])
    assert combo_1.sp_gain == 150
    assert combo_1.utp_gain == 0
    assert combo_1.od_rate == [1.0]

    combo_2 = normal_attack_data[1]
    assert combo_2.mods == pytest.approx([0.96])
    assert combo_2.sp_gain == 150
    assert combo_2.utp_gain == 0
    assert combo_2.od_rate == [1.0]

    combo_3 = normal_attack_data[2]
    assert combo_3.mods == pytest.approx([1.14])
    assert combo_3.sp_gain == 196
    assert combo_3.utp_gain == 0
    assert combo_3.od_rate == [1.0]

    combo_4 = normal_attack_data[3]
    assert combo_4.mods == pytest.approx([1.20])
    assert combo_4.sp_gain == 265
    assert combo_4.utp_gain == 0
    assert combo_4.od_rate == [1.0]

    combo_5 = normal_attack_data[4]
    assert combo_5.mods == pytest.approx([1.8])
    assert combo_5.sp_gain == 391
    assert combo_5.utp_gain == 0
    assert combo_5.od_rate == [1.0]
def test_normal_ranged(transformer_atk: AttackingActionTransformer):
    # Basileus (10750304)
    # - Action ID 701400
    data = transformer_atk.transform_normal_attack_or_fs(
        701400).with_condition()

    assert len(data) == 5

    combo_1 = data[0]
    assert combo_1.mods == pytest.approx([0.83] * 1 + [0.15] * 2)
    assert combo_1.sp_gain == 130

    combo_2 = data[1]
    assert combo_2.mods == pytest.approx([mod
                                          for mod in [0.42] + [0.15] * 2] * 2)
    assert combo_2.sp_gain == 200

    combo_3 = data[2]
    assert combo_3.mods == pytest.approx([mod
                                          for mod in [0.35] + [0.15] * 2] * 3)
    assert combo_3.sp_gain == 240

    combo_4 = data[3]
    assert combo_4.mods == pytest.approx([mod
                                          for mod in [0.79] + [0.15] * 2] * 2)
    assert combo_4.sp_gain == 430

    combo_5 = data[4]
    assert combo_5.mods == pytest.approx([mod
                                          for mod in [0.71] + [0.15] * 3] * 3)
    assert combo_5.sp_gain == 600
예제 #3
0
def test_default_normal_attack_lv2(
        transformer_atk: AttackingActionTransformer):
    # Sword Lv. 2 (100000)
    data = transformer_atk.transform_normal_attack_or_fs(100000,
                                                         2).with_condition()

    combo_1 = data[0]
    assert combo_1.mods == pytest.approx([1.08])
    assert combo_1.sp_gain == 150
    assert combo_1.utp_gain == 0
    assert combo_1.od_rate == [1.0]

    combo_2 = data[1]
    assert combo_2.mods == pytest.approx([1.15])
    assert combo_2.sp_gain == 150
    assert combo_2.utp_gain == 0
    assert combo_2.od_rate == [1.0]

    combo_3 = data[2]
    assert combo_3.mods == pytest.approx([1.37])
    assert combo_3.sp_gain == 196
    assert combo_3.utp_gain == 0
    assert combo_3.od_rate == [1.0]

    combo_4 = data[3]
    assert combo_4.mods == pytest.approx([1.44])
    assert combo_4.sp_gain == 265
    assert combo_4.utp_gain == 0
    assert combo_4.od_rate == [1.0]

    combo_5 = data[4]
    assert combo_5.mods == pytest.approx([2.16])
    assert combo_5.sp_gain == 391
    assert combo_5.utp_gain == 0
    assert combo_5.od_rate == [1.0]
예제 #4
0
def test_default_normal_attack(transformer_atk: AttackingActionTransformer):
    # Staff Lv. 1 (800000)
    normal_attack_data = transformer_atk.transform_normal_attack_or_fs(
        800000).with_condition()

    combo_1 = normal_attack_data[0]
    assert combo_1.mods == pytest.approx([1.14])
    assert combo_1.sp_gain == 232
    assert combo_1.utp_gain == 0
    assert combo_1.od_rate == [1.0]

    combo_2 = normal_attack_data[1]
    assert combo_2.mods == pytest.approx([1.32])
    assert combo_2.sp_gain == 232
    assert combo_2.utp_gain == 0
    assert combo_2.od_rate == [1.0]

    combo_3 = normal_attack_data[2]
    assert combo_3.mods == pytest.approx([0.74] * 2)
    assert combo_3.sp_gain == 348
    assert combo_3.utp_gain == 0
    assert combo_3.od_rate == [1.0] * 2

    combo_4 = normal_attack_data[3]
    assert combo_4.mods == pytest.approx([2.48])
    assert combo_4.sp_gain == 464
    assert combo_4.utp_gain == 0
    assert combo_4.od_rate == [1.0]

    combo_5 = normal_attack_data[4]
    assert combo_5.mods == pytest.approx([3.23])
    assert combo_5.sp_gain == 696
    assert combo_5.utp_gain == 0
    assert combo_5.od_rate == [1.0]
예제 #5
0
def test_normal(transformer_atk: AttackingActionTransformer):
    # Meene (10650303)
    # - Mode 56: Normal
    # - Unique Combo 43
    # - Action ID 601700
    data = transformer_atk.transform_normal_attack_or_fs(
        601700).with_condition()

    combo_1 = data[0]
    assert combo_1.mods == pytest.approx([0.43] * 7)
    assert combo_1.sp_gain == 350
    assert combo_1.utp_gain == 0
    assert combo_1.od_rate == [1.0] * 7

    combo_2 = data[1]
    assert combo_2.mods == pytest.approx([0.43] * 14)
    assert combo_2.sp_gain == 400
    assert combo_2.utp_gain == 0
    assert combo_2.od_rate == [1.0] * 14

    combo_3 = data[2]
    assert combo_3.mods == pytest.approx([0.43] * 21)
    assert combo_3.sp_gain == 450
    assert combo_3.utp_gain == 0
    assert combo_3.od_rate == [1.0] * 21
예제 #6
0
def test_default_normal_attack(transformer_atk: AttackingActionTransformer):
    # Wand Lv. 1 (700000)
    data = transformer_atk.transform_normal_attack_or_fs(
        700000).with_condition()

    combo_1 = data[0]
    assert combo_1.mods == pytest.approx([1.18])
    assert combo_1.sp_gain == 130
    assert combo_1.utp_gain == 0
    assert combo_1.od_rate == [1.0]

    combo_2 = data[1]
    assert combo_2.mods == pytest.approx([0.64] * 2)
    assert combo_2.sp_gain == 200
    assert combo_2.utp_gain == 0
    assert combo_2.od_rate == [1.0] * 2

    combo_3 = data[2]
    assert combo_3.mods == pytest.approx([0.43] * 3)
    assert combo_3.sp_gain == 240
    assert combo_3.utp_gain == 0
    assert combo_3.od_rate == [1.0] * 3

    combo_4 = data[3]
    assert combo_4.mods == pytest.approx([0.94] * 2)
    assert combo_4.sp_gain == 430
    assert combo_4.utp_gain == 0
    assert combo_4.od_rate == [1.0] * 2

    combo_5 = data[4]
    assert combo_5.mods == pytest.approx([0.74] + [0.43] * 4)
    assert combo_5.sp_gain == 600
    assert combo_5.utp_gain == 0
    assert combo_5.od_rate == [1.0] * 5
예제 #7
0
def test_unique_dragon(asset_manager: AssetManager,
                       transformer_atk: AttackingActionTransformer):
    # Lathna (10550502)
    # - Unique Dragon ID 29900004
    # - Action ID 10071140
    ability_ids = asset_manager.asset_chara_data.get_data_by_id(
        10550502).ability_ids_all_level
    data = transformer_atk.transform_normal_attack_or_fs(
        10071140, ability_ids=ability_ids).with_condition()

    combo_1 = data[0]
    assert combo_1.mods == pytest.approx([2.10])
    assert combo_1.sp_gain == 5
    assert combo_1.utp_gain == 0
    assert combo_1.od_rate == [1.0]

    combo_2 = data[1]
    assert combo_2.mods == pytest.approx([2.31])
    assert combo_2.sp_gain == 5
    assert combo_2.utp_gain == 0
    assert combo_2.od_rate == [1.0]

    combo_3 = data[2]
    assert combo_3.mods == pytest.approx([1.47] * 2)
    assert combo_3.sp_gain == 5
    assert combo_3.utp_gain == 0
    assert combo_3.od_rate == [1.0] * 2
예제 #8
0
def test_default_normal_attack(transformer_atk: AttackingActionTransformer):
    # Axe Lv. 1 (400000)
    data = transformer_atk.transform_normal_attack_or_fs(
        400000).with_condition()

    combo_1 = data[0]
    assert combo_1.mods == pytest.approx([1.37])
    assert combo_1.sp_gain == 200
    assert combo_1.utp_gain == 0
    assert combo_1.od_rate == [1.0]

    combo_2 = data[1]
    assert combo_2.mods == pytest.approx([1.46])
    assert combo_2.sp_gain == 240
    assert combo_2.utp_gain == 0
    assert combo_2.od_rate == [1.0]

    combo_3 = data[2]
    assert combo_3.mods == pytest.approx([2.45])
    assert combo_3.sp_gain == 360
    assert combo_3.utp_gain == 0
    assert combo_3.od_rate == [1.0]

    combo_4 = data[3]
    assert combo_4.mods == pytest.approx([2.59])
    assert combo_4.sp_gain == 380
    assert combo_4.utp_gain == 0
    assert combo_4.od_rate == [1.0]

    combo_5 = data[4]
    assert combo_5.mods == pytest.approx([2.74])
    assert combo_5.sp_gain == 420
    assert combo_5.utp_gain == 0
    assert combo_5.od_rate == [1.0]
예제 #9
0
def test_default_normal_attack(transformer_atk: AttackingActionTransformer):
    # Dagger Lv. 1 (300000)
    normal_attack_data = transformer_atk.transform_normal_attack_or_fs(
        300000).with_condition()

    combo_1 = normal_attack_data[0]
    assert combo_1.mods == pytest.approx([0.90])
    assert combo_1.sp_gain == 144
    assert combo_1.utp_gain == 0
    assert combo_1.od_rate == [1.0]

    combo_2 = normal_attack_data[1]
    assert combo_2.mods == pytest.approx([0.46, 0.46])
    assert combo_2.sp_gain == 144
    assert combo_2.utp_gain == 0
    assert combo_2.od_rate == [1.0, 1.0]

    combo_3 = normal_attack_data[2]
    assert combo_3.mods == pytest.approx([0.65, 0.65])
    assert combo_3.sp_gain == 264
    assert combo_3.utp_gain == 0
    assert combo_3.od_rate == [1.0, 1.0]

    combo_4 = normal_attack_data[3]
    assert combo_4.mods == pytest.approx([1.43])
    assert combo_4.sp_gain == 288
    assert combo_4.utp_gain == 0
    assert combo_4.od_rate == [1.0]

    combo_5 = normal_attack_data[4]
    assert combo_5.mods == pytest.approx([1.8])
    assert combo_5.sp_gain == 480
    assert combo_5.utp_gain == 0
    assert combo_5.od_rate == [1.0]
예제 #10
0
def test_dragondrive(transformer_atk: AttackingActionTransformer):
    # Bellina (10350503)
    # - Mode 12: Unique Transform
    # - Unique Combo 12
    # - Action ID 300300
    data = transformer_atk.transform_normal_attack_or_fs(
        300300).with_condition()

    combo_1 = data[0]
    assert combo_1.mods == pytest.approx([2.27])
    assert combo_1.sp_gain == 290
    assert combo_1.utp_gain == 180
    assert combo_1.od_rate == [1.0]

    combo_2 = data[1]
    assert combo_2.mods == pytest.approx([2.72])
    assert combo_2.sp_gain == 350
    assert combo_2.utp_gain == 180
    assert combo_2.od_rate == [1.0]

    combo_3 = data[2]
    assert combo_3.mods == pytest.approx([4.08])
    assert combo_3.sp_gain == 520
    assert combo_3.utp_gain == 240
    assert combo_3.od_rate == [1.0]
예제 #11
0
def test_default_normal_attack(transformer_atk: AttackingActionTransformer):
    # Blade Lv. 1 (200000)
    data = transformer_atk.transform_normal_attack_or_fs(200000).with_condition()

    combo_1 = data[0]
    assert combo_1.mods == pytest.approx([1.16])
    assert combo_1.sp_gain == 130
    assert combo_1.utp_gain == 0
    assert combo_1.od_rate == [1.0]

    combo_2 = data[1]
    assert combo_2.mods == pytest.approx([1.164])
    assert combo_2.sp_gain == 130
    assert combo_2.utp_gain == 0
    assert combo_2.od_rate == [1.0]

    combo_3 = data[2]
    assert combo_3.mods == pytest.approx([0.76] * 2)
    assert combo_3.sp_gain == 220
    assert combo_3.utp_gain == 0
    assert combo_3.od_rate == [1.0] * 2

    combo_4 = data[3]
    assert combo_4.mods == pytest.approx([1.55])
    assert combo_4.sp_gain == 360
    assert combo_4.utp_gain == 0
    assert combo_4.od_rate == [1.0]

    combo_5 = data[4]
    assert combo_5.mods == pytest.approx([1.72] * 2)
    assert combo_5.sp_gain == 900
    assert combo_5.utp_gain == 0
    assert combo_5.od_rate == [1.0] * 2
def test_normal_attack(transformer_atk: AttackingActionTransformer):
    # Gala Bahamut (20050525)
    # - Normal Attack AID: 10162140
    conditions = ConditionComposite()
    data = transformer_atk.transform_normal_attack_or_fs(
        10162140).with_condition(conditions)

    combo_1 = data[0]
    assert combo_1.mods == pytest.approx([1.8] * 4)
    assert combo_1.sp_gain == 5
    assert combo_1.utp_gain == 0
    assert combo_1.od_rate == [1.0] * 4

    combo_2 = data[1]
    assert combo_2.mods == pytest.approx([9.64])
    assert combo_2.sp_gain == 5
    assert combo_2.utp_gain == 0
    assert combo_2.od_rate == [1.0]

    combo_3 = data[2]
    assert combo_3.mods == pytest.approx([6.76] * 4)
    assert combo_3.sp_gain == 5
    assert combo_3.utp_gain == 0
    assert combo_3.od_rate == [1.0] * 4

    combo_4 = data[3]
    assert combo_4.mods == pytest.approx([18.26])
    assert combo_4.sp_gain == 15
    assert combo_4.utp_gain == 0
    assert combo_4.od_rate == [1.0]
예제 #13
0
def test_default_normal_attack(transformer_atk: AttackingActionTransformer):
    # Lance Lv. 1 (500000)
    data = transformer_atk.transform_normal_attack_or_fs(500000).with_condition()

    combo_1 = data[0]
    assert combo_1.mods == pytest.approx([1.01])
    assert combo_1.sp_gain == 120
    assert combo_1.utp_gain == 0
    assert combo_1.od_rate == [1.0]

    combo_2 = data[1]
    assert combo_2.mods == pytest.approx([0.54, 0.54])
    assert combo_2.sp_gain == 240
    assert combo_2.utp_gain == 0
    assert combo_2.od_rate == [1.0, 1.0]

    combo_3 = data[2]
    assert combo_3.mods == pytest.approx([1.30])
    assert combo_3.sp_gain == 120
    assert combo_3.utp_gain == 0
    assert combo_3.od_rate == [1.0]

    combo_4 = data[3]
    assert combo_4.mods == pytest.approx([1.80])
    assert combo_4.sp_gain == 480
    assert combo_4.utp_gain == 0
    assert combo_4.od_rate == [1.0]

    combo_5 = data[4]
    assert combo_5.mods == pytest.approx([1.34])
    assert combo_5.sp_gain == 600
    assert combo_5.utp_gain == 0
    assert combo_5.od_rate == [1.0]
예제 #14
0
def test_default_normal_attack_lv2(transformer_atk: AttackingActionTransformer):
    # Lance Lv. 2 (500000)
    normal_attack_data = transformer_atk.transform_normal_attack_or_fs(500000, 2).with_condition()

    combo_1 = normal_attack_data[0]
    assert combo_1.mods == pytest.approx([1.11])
    assert combo_1.sp_gain == 120
    assert combo_1.utp_gain == 0
    assert combo_1.od_rate == [1.0]

    combo_2 = normal_attack_data[1]
    assert combo_2.mods == pytest.approx([0.59, 0.59])
    assert combo_2.sp_gain == 240
    assert combo_2.utp_gain == 0
    assert combo_2.od_rate == [1.0, 1.0]

    combo_3 = normal_attack_data[2]
    assert combo_3.mods == pytest.approx([1.43])
    assert combo_3.sp_gain == 120
    assert combo_3.utp_gain == 0
    assert combo_3.od_rate == [1.0]

    combo_4 = normal_attack_data[3]
    assert combo_4.mods == pytest.approx([1.98])
    assert combo_4.sp_gain == 480
    assert combo_4.utp_gain == 0
    assert combo_4.od_rate == [1.0]

    combo_5 = normal_attack_data[4]
    assert combo_5.mods == pytest.approx([1.47])
    assert combo_5.sp_gain == 600
    assert combo_5.utp_gain == 0
    assert combo_5.od_rate == [1.0]
def test_normal_attack(transformer_atk: AttackingActionTransformer):
    # Gala Mascula (10250203)
    # - Mode 93: Normal
    # - Unique Combo 65
    # - Action ID 202700
    conditions = ConditionComposite()
    data = transformer_atk.transform_normal_attack_or_fs(202700).with_condition(conditions)

    combo_1 = data[0]
    assert combo_1.mods == pytest.approx([0.13] * 2 + [0.38])
    assert combo_1.sp_gain == 130
    assert combo_1.utp_gain == 0
    assert combo_1.od_rate == [1.0] * 3
    assert combo_1.cancel_to_next_action_sec == pytest.approx(0.63, rel=1E-2)

    combo_2 = data[1]
    assert combo_2.mods == pytest.approx([0.19, 0.56])
    assert combo_2.sp_gain == 220
    assert combo_2.utp_gain == 0
    assert combo_2.od_rate == [1.0] * 2
    assert combo_2.cancel_to_next_action_sec == pytest.approx(0.63, rel=1E-2)

    combo_3 = data[2]
    assert combo_3.mods == pytest.approx([0.13] * 3 + [0.37])
    assert combo_3.sp_gain == 360
    assert combo_3.utp_gain == 0
    assert combo_3.od_rate == [1.0] * 4
    assert combo_3.cancel_to_next_action_sec == pytest.approx(0.90, rel=1E-2)

    combo_4 = data[3]
    assert combo_4.mods == pytest.approx([0.57, 1.72])
    assert combo_4.sp_gain == 660
    assert combo_4.utp_gain == 0
    assert combo_4.od_rate == [1.0] * 2
    assert combo_4.cancel_to_next_action_sec == pytest.approx(1.17, rel=1E-2)
def test_s2_enhanced_attack(transformer_atk: AttackingActionTransformer):
    # Gala Mascula (10250203)
    # - Mode 94: S2 Effective
    # - Unique Combo 66
    # - Action ID 202800
    conditions = ConditionComposite()
    data = transformer_atk.transform_normal_attack_or_fs(202800).with_condition(conditions)

    combo_1 = data[0]
    assert combo_1.mods == pytest.approx([0.16] + [0.19] * 3 + [0.16] + [0.45])
    assert combo_1.sp_gain == 130
    assert combo_1.utp_gain == 0
    assert combo_1.od_rate == [1.0] * 6
    assert combo_1.cancel_to_next_action_sec == pytest.approx(0.63, rel=1E-2)

    combo_2 = data[1]
    assert combo_2.mods == pytest.approx([0.23] + [0.19] * 3 + [0.67])
    assert combo_2.sp_gain == 220
    assert combo_2.utp_gain == 0
    assert combo_2.od_rate == [1.0] * 5
    assert combo_2.cancel_to_next_action_sec == pytest.approx(0.63, rel=1E-2)

    combo_3 = data[2]
    assert combo_3.mods == pytest.approx([0.16] + [0.19] * 3 + [0.16] * 4 + [0.44])
    assert combo_3.sp_gain == 360
    assert combo_3.utp_gain == 0
    assert combo_3.od_rate == [1.0] * 9
    assert combo_3.cancel_to_next_action_sec == pytest.approx(0.90, rel=1E-2)

    combo_4 = data[3]
    assert combo_4.mods == pytest.approx([0.68] + [0.19] * 3 + [0.68] * 1 + [2.03])
    assert combo_4.sp_gain == 660
    assert combo_4.utp_gain == 0
    assert combo_4.od_rate == [1.0] * 6
    assert combo_4.cancel_to_next_action_sec == pytest.approx(1.17, rel=1E-2)
예제 #17
0
def test_default_normal_attack_lv2(
        transformer_atk: AttackingActionTransformer):
    # Staff Lv. 2 (800000)
    data = transformer_atk.transform_normal_attack_or_fs(800000,
                                                         2).with_condition()

    combo_1 = data[0]
    assert combo_1.mods == pytest.approx([1.24])
    assert combo_1.sp_gain == 232
    assert combo_1.utp_gain == 0
    assert combo_1.od_rate == [1.0]

    combo_2 = data[1]
    assert combo_2.mods == pytest.approx([1.44])
    assert combo_2.sp_gain == 232
    assert combo_2.utp_gain == 0
    assert combo_2.od_rate == [1.0]

    combo_3 = data[2]
    assert combo_3.mods == pytest.approx([0.81] * 2)
    assert combo_3.sp_gain == 348
    assert combo_3.utp_gain == 0
    assert combo_3.od_rate == [1.0] * 2

    combo_4 = data[3]
    assert combo_4.mods == pytest.approx([2.70])
    assert combo_4.sp_gain == 464
    assert combo_4.utp_gain == 0
    assert combo_4.od_rate == [1.0]

    combo_5 = data[4]
    assert combo_5.mods == pytest.approx([3.53])
    assert combo_5.sp_gain == 696
    assert combo_5.utp_gain == 0
    assert combo_5.od_rate == [1.0]
예제 #18
0
def test_default_normal_attack_lv2(
        transformer_atk: AttackingActionTransformer):
    # Dagger Lv. 2 (300000)
    data = transformer_atk.transform_normal_attack_or_fs(300000,
                                                         2).with_condition()

    combo_1 = data[0]
    assert combo_1.mods == pytest.approx([1.08])
    assert combo_1.sp_gain == 144
    assert combo_1.utp_gain == 0
    assert combo_1.od_rate == [1.0]

    combo_2 = data[1]
    assert combo_2.mods == pytest.approx([0.55, 0.55])
    assert combo_2.sp_gain == 144
    assert combo_2.utp_gain == 0
    assert combo_2.od_rate == [1.0, 1.0]

    combo_3 = data[2]
    assert combo_3.mods == pytest.approx([0.78, 0.78])
    assert combo_3.sp_gain == 264
    assert combo_3.utp_gain == 0
    assert combo_3.od_rate == [1.0, 1.0]

    combo_4 = data[3]
    assert combo_4.mods == pytest.approx([1.71])
    assert combo_4.sp_gain == 288
    assert combo_4.utp_gain == 0
    assert combo_4.od_rate == [1.0]

    combo_5 = data[4]
    assert combo_5.mods == pytest.approx([2.16])
    assert combo_5.sp_gain == 480
    assert combo_5.utp_gain == 0
    assert combo_5.od_rate == [1.0]
예제 #19
0
def test_default_normal_attack(transformer_atk: AttackingActionTransformer):
    # Bow Lv. 1 (600000)
    data = transformer_atk.transform_normal_attack_or_fs(
        600000).with_condition()

    combo_1 = data[0]
    assert combo_1.mods == pytest.approx([0.35] * 3)
    assert combo_1.sp_gain == 184
    assert combo_1.utp_gain == 0
    assert combo_1.od_rate == [1.0] * 3

    combo_2 = data[1]
    assert combo_2.mods == pytest.approx([0.44] * 2)
    assert combo_2.sp_gain == 92
    assert combo_2.utp_gain == 0
    assert combo_2.od_rate == [1.0] * 2

    combo_3 = data[2]
    assert combo_3.mods == pytest.approx([0.50] * 3)
    assert combo_3.sp_gain == 276
    assert combo_3.utp_gain == 0
    assert combo_3.od_rate == [1.0] * 3

    combo_4 = data[3]
    assert combo_4.mods == pytest.approx([0.76] * 2)
    assert combo_4.sp_gain == 414
    assert combo_4.utp_gain == 0
    assert combo_4.od_rate == [1.0] * 2

    combo_5 = data[4]
    assert combo_5.mods == pytest.approx([0.42] * 5)
    assert combo_5.sp_gain == 529
    assert combo_5.utp_gain == 0
    assert combo_5.od_rate == [1.0] * 5
예제 #20
0
def test_possible_conditions_is_sorted_smym(
        transformer_atk: AttackingActionTransformer):
    # Summer Mym (10950502)
    # - Mode 100: Unique Transform
    # - Unique Combo 69
    # - Action ID 901300
    data = transformer_atk.transform_normal_attack_or_fs(901300)

    assert data.possible_conditions == [
        ConditionComposite(Condition.SELF_SMYM_COMBO_NOT_BOOSTED),
        ConditionComposite(Condition.SELF_SMYM_COMBO_BOOSTED)
    ]
예제 #21
0
def test_possible_conditions_is_sorted_gmascula(
        transformer_atk: AttackingActionTransformer):
    # Gala Mascula (10250203)
    # - Mode 94: S2 Effective
    # - Unique Combo 66
    # - Action ID 202800
    data = transformer_atk.transform_normal_attack_or_fs(202800)

    assert data.possible_conditions == [
        ConditionComposite(),
        ConditionComposite(Condition.SELF_GMASCULA_S1_LV3)
    ]
예제 #22
0
def test_sigil_released(transformer_atk: AttackingActionTransformer):
    # Faris (10950102)
    # - Mode 83: Sigil Released
    # - Unique Combo 62
    # - Action ID 901000
    # -------------
    # - Sigil Locked = Mode 82 = Action ID 900000 = Same as long gun
    data = transformer_atk.transform_normal_attack_or_fs(
        901000).with_condition()

    combo_1 = data[0]
    assert combo_1.mods == pytest.approx([0.97] * 5)
    assert combo_1.sp_gain == 600
    assert combo_1.utp_gain == 0
    assert combo_1.od_rate == [1.0] * 5
예제 #23
0
def test_sigil_released_target_scorchrent(
        transformer_atk: AttackingActionTransformer):
    # Faris (10950102)
    # - Mode 83: Sigil Released
    # - Unique Combo 62
    # - Action ID 901000
    # -------------
    # - Sigil Locked = Mode 82 = Action ID 900000 = Same as long gun
    conditions = ConditionComposite(Condition.TARGET_SCORCHRENT)
    data = transformer_atk.transform_normal_attack_or_fs(
        901000).with_condition(conditions)

    combo_1 = data[0]
    assert combo_1.mods == pytest.approx([0.97 * 1.35] * 5)
    assert combo_1.sp_gain == 600
    assert combo_1.utp_gain == 0
    assert combo_1.od_rate == [1.0] * 5
예제 #24
0
def test_default_normal_attack_close(
        transformer_atk: AttackingActionTransformer):
    # Manacaster (900100 - Close)
    normal_attack_data = transformer_atk.transform_normal_attack_or_fs(
        900100).with_condition()

    combo_1 = normal_attack_data[0]
    assert combo_1.mods == pytest.approx([0.48] * 8)
    assert combo_1.sp_gain == 340
    assert combo_1.utp_gain == 0
    assert combo_1.od_rate == [1.0] * 8

    combo_2 = normal_attack_data[1]
    assert combo_2.mods == pytest.approx([0.48] * 8)
    assert combo_2.sp_gain == 340
    assert combo_2.utp_gain == 0
    assert combo_2.od_rate == [1.0] * 8
예제 #25
0
def test_default_normal_attack_long(
        transformer_atk: AttackingActionTransformer):
    # Manacaster (900000 - Long)
    data = transformer_atk.transform_normal_attack_or_fs(
        900000).with_condition()

    combo_1 = data[0]
    assert combo_1.mods == pytest.approx([0.67] * 5)
    assert combo_1.sp_gain == 545
    assert combo_1.utp_gain == 0
    assert combo_1.od_rate == [1.0] * 5

    combo_2 = data[1]
    assert combo_2.mods == pytest.approx([0.67] * 5)
    assert combo_2.sp_gain == 545
    assert combo_2.utp_gain == 0
    assert combo_2.od_rate == [1.0] * 5
def test_mode_switched(transformer_atk: AttackingActionTransformer):
    # Gala Zethia (10250504)
    # - Mode 115: Normal
    # - Unique Combo 72
    # - Action ID 202900
    conditions = ConditionComposite(Condition.MODE_1)
    data = transformer_atk.transform_normal_attack_or_fs(202900).with_condition(conditions)

    assert data[0].mods == pytest.approx([0.59])
    assert data[1].mods == pytest.approx([0.34] * 2)
    assert data[2].mods == pytest.approx([0.73] * 3)
    assert data[3].mods == pytest.approx([0.67] * 5)
    assert data[4].mods == pytest.approx([1.55] * 3)
    assert data[5].mods == pytest.approx([1.14] * 2)
    assert data[6].mods == pytest.approx([0.88] * 2 + [1.32])
    assert data[7].mods == pytest.approx([1.44] * 2 + [2.14])
    assert data[8].mods == pytest.approx([0.95] * 6 + [2.84] * 2)
def test_normal(transformer_atk: AttackingActionTransformer):
    # Gala Zethia (10250504)
    # - Mode 115: Normal
    # - Unique Combo 72
    # - Action ID 202900
    # - Not summoned
    conditions = ConditionComposite(Condition.MODE_0)
    data = transformer_atk.transform_normal_attack_or_fs(202900).with_condition(conditions)

    assert data[0].mods == pytest.approx([0.59])
    assert data[1].mods == pytest.approx([0.34] * 2)
    assert data[2].mods == pytest.approx([0.49] * 3)
    assert data[3].mods == pytest.approx([0.67] * 5)
    assert data[4].mods == pytest.approx([1.04] * 3)
    assert data[5].mods == pytest.approx([1.14] * 2)
    assert data[6].mods == pytest.approx([0.88] * 3)
    assert data[7].mods == pytest.approx([1.44] * 3)
    assert data[8].mods == pytest.approx([0.95] * 6 + [1.89] * 2)
예제 #28
0
def test_dragondrive(transformer_atk: AttackingActionTransformer):
    # Summer Mym (10950502)
    # - Mode 100: Unique Transform
    # - Unique Combo 69
    # - Action ID 901300
    conditions = ConditionComposite(Condition.SELF_SMYM_COMBO_NOT_BOOSTED)
    data = transformer_atk.transform_normal_attack_or_fs(
        901300).with_condition(conditions)

    combo_1 = data[0]
    assert combo_1.mods == pytest.approx([0.66, 1.49])
    assert combo_1.sp_gain == 480
    assert combo_1.utp_gain == 150
    assert combo_1.od_rate == [1.0, 1.0]

    combo_2 = data[1]
    assert combo_2.mods == pytest.approx([0.66, 1.49])
    assert combo_2.sp_gain == 480
    assert combo_2.utp_gain == 150
    assert combo_2.od_rate == [1.0, 1.0]
예제 #29
0
def test_default_normal_attack_rapid(
        transformer_atk: AttackingActionTransformer):
    # Manacaster (900200 - Rapid)
    normal_attack_data = transformer_atk.transform_normal_attack_or_fs(
        900200).with_condition()

    combo_1 = normal_attack_data[0]
    assert combo_1.mods == pytest.approx([0.45] * 3)
    assert combo_1.sp_gain == 200
    assert combo_1.utp_gain == 0
    assert combo_1.od_rate == [1.0] * 3

    combo_2 = normal_attack_data[1]
    assert combo_2.mods == pytest.approx([0.60] * 3)
    assert combo_2.sp_gain == 200
    assert combo_2.utp_gain == 0
    assert combo_2.od_rate == [1.0] * 3

    combo_3 = normal_attack_data[2]
    assert combo_3.mods == pytest.approx([0.60] * 5)
    assert combo_3.sp_gain == 200
    assert combo_3.utp_gain == 0
    assert combo_3.od_rate == [1.0] * 5
예제 #30
0
def test_normal_attack(transformer_atk: AttackingActionTransformer):
    # Tiki in Divine Dragon (10350203 - 29900006)
    # - Normal Attack AID: 10093140
    conditions = ConditionComposite()
    data = transformer_atk.transform_normal_attack_or_fs(10093140).with_condition(conditions)

    combo_1 = data[0]
    assert combo_1.mods == pytest.approx([3.17])
    assert combo_1.sp_gain == 290
    assert combo_1.utp_gain == 0
    assert combo_1.od_rate == [1.0]

    combo_2 = data[1]
    assert combo_2.mods == pytest.approx([3.78])
    assert combo_2.sp_gain == 350
    assert combo_2.utp_gain == 0
    assert combo_2.od_rate == [1.0]

    combo_3 = data[2]
    assert combo_3.mods == pytest.approx([5.37])
    assert combo_3.sp_gain == 520
    assert combo_3.utp_gain == 0
    assert combo_3.od_rate == [1.0]