def test_atk_up_by_dragons_claws(transformer_ability: AbilityTransformer): # Gala Mym - 10550101 # https://dragalialost.wiki/w/Gala_Mym ex_ability_data = transformer_ability.transform_chained_ex_ability( 400000012) expected_info = { AbilityEffectInfo( 400000012, ConditionComposite( [Condition.TARGET_FLAME, Condition.SELF_SHAPESHIFTED_1_TIME]), BuffParameter.ATK_BUFF, 0.1), AbilityEffectInfo( 400000012, ConditionComposite( [Condition.TARGET_FLAME, Condition.SELF_SHAPESHIFTED_2_TIMES]), BuffParameter.ATK_BUFF, 0.1), AbilityEffectInfo( 400000012, ConditionComposite( [Condition.TARGET_FLAME, Condition.SELF_SHAPESHIFTED_3_TIMES]), BuffParameter.ATK_BUFF, 0.15), } check_ability_effect_unit_match(ex_ability_data.effect_units, expected_info)
def test_sophie(transformer_ability: AbilityTransformer): # Sophie - 10450404 # https://dragalialost.wiki/w/Sophie ex_ability_data = transformer_ability.transform_chained_ex_ability(400000868) expected_info = { AbilityEffectInfo( 400000868, ConditionComposite([Condition.TARGET_LIGHT]), BuffParameter.RP_UP, 0.2 ), } check_ability_effect_unit_match(ex_ability_data.effect_units, expected_info)
def test_valentines_chelsea(transformer_ability: AbilityTransformer): # Valentine's Chelsea - 10650304 # https://dragalialost.wiki/w/Valentine%27s_Chelsea ex_ability_data = transformer_ability.transform_chained_ex_ability(400000873) expected_info = { AbilityEffectInfo( 400000873, ConditionComposite([Condition.TARGET_WIND, Condition.ON_HIT_BY_ANY_AFFLICTION]), BuffParameter.SHIELD_SINGLE_DMG, 0.25, duration_count=1, cooldown_sec=20, ), } check_ability_effect_unit_match(ex_ability_data.effect_units, expected_info)
def test_panther(transformer_ability: AbilityTransformer): # Panther - 10550104 # https://dragalialost.wiki/w/Panther ex_ability_data = transformer_ability.transform_chained_ex_ability(400000817) expected_info = { AbilityEffectInfo( 400000817, ConditionComposite([Condition.TARGET_FLAME]), BuffParameter.DRAGON_TIME, 0.2 ), } check_ability_effect_unit_match(ex_ability_data.effect_units, expected_info)
def test_joker(transformer_ability: AbilityTransformer): # Joker - 10350505 # https://dragalialost.wiki/w/Joker ex_ability_data = transformer_ability.transform_chained_ex_ability(400000863) expected_info = { AbilityEffectInfo( 400000863, ConditionComposite([Condition.TARGET_SHADOW, Condition.ON_COMBO_GTE_10]), BuffParameter.RESISTANCE_LIGHT_BUFF, 0.1 ), } check_ability_effect_unit_match(ex_ability_data.effect_units, expected_info)
def test_mona(transformer_ability: AbilityTransformer): # Mona - 10150304 # https://dragalialost.wiki/w/Mona ex_ability_data = transformer_ability.transform_chained_ex_ability(400000879) expected_info = { AbilityEffectInfo( 400000879, ConditionComposite([Condition.TARGET_WIND, Condition.ON_COMBO_GTE_10]), BuffParameter.RESISTANCE_WATER_BUFF, 0.1 ), } check_ability_effect_unit_match(ex_ability_data.effect_units, expected_info)
def test_combo_time_extend(transformer_ability: AbilityTransformer): # Nobunaga - 10250103 # https://dragalialost.wiki/w/Nobunaga ex_ability_data = transformer_ability.transform_chained_ex_ability( 400000708) expected_info = { AbilityEffectInfo(400000708, ConditionComposite(Condition.TARGET_FLAME), BuffParameter.COMBO_TIME, 2.5), } check_ability_effect_unit_match(ex_ability_data.effect_units, expected_info)
def test_infliction_rate_up(transformer_ability: AbilityTransformer): # Delphi - 10350502 # https://dragalialost.wiki/w/Delphi ex_ability_data = transformer_ability.transform_chained_ex_ability( 400000627) expected_info = { # The effect of clearing the action condition when the combo counter resets is omitted AbilityEffectInfo(400000627, ConditionComposite([Condition.TARGET_SHADOW]), BuffParameter.INFLICT_PROB_POISON, 0.5), } check_ability_effect_unit_match(ex_ability_data.effect_units, expected_info)
def test_atk_up_in_buff_field(transformer_ability: AbilityTransformer): # Dragonyule Victor S2 # https://dragalialost.wiki/w/Dragonyule_Victor ex_ability_data = transformer_ability.transform_chained_ex_ability( 400000833) expected_info = { AbilityEffectInfo( 400000833, ConditionComposite( [Condition.TARGET_SHADOW, Condition.ON_ENTERED_BUFF_FIELD]), BuffParameter.ATK_BUFF, 0.13), } check_ability_effect_unit_match(ex_ability_data.effect_units, expected_info)
def test_shadowblight_punisher_in_buff_field( transformer_ability: AbilityTransformer): # Gala Chelle # https://dragalialost.wiki/w/Gala_Chelle ex_ability_data = transformer_ability.transform_chained_ex_ability( 400000858) expected_info = { AbilityEffectInfo( 400000858, ConditionComposite( [Condition.TARGET_SHADOW, Condition.ON_ENTERED_BUFF_FIELD]), BuffParameter.SHADOWBLIGHTED_PUNISHER, 0.08), } check_ability_effect_unit_match(ex_ability_data.effect_units, expected_info)
def test_inspire_level_up_on_energy_level_up( transformer_ability: AbilityTransformer): # Lucretia - 10750401 # https://dragalialost.wiki/w/Lucretia ex_ability_data = transformer_ability.transform_chained_ex_ability( 400000541) expected_info = { AbilityEffectInfo( 400000541, ConditionComposite( [Condition.TARGET_LIGHT, Condition.ON_ENERGY_LV_UP]), BuffParameter.INSPIRE_LEVEL, 1), } check_ability_effect_unit_match(ex_ability_data.effect_units, expected_info)
def test_elem_res_when_hp_above(transformer_ability: AbilityTransformer): # Forager Cleo - 10750203 # https://dragalialost.wiki/w/Forager_Cleo ex_ability_data = transformer_ability.transform_chained_ex_ability( 400000168) expected_info = { AbilityEffectInfo(400000168, ConditionComposite([ Condition.TARGET_WATER, Condition.SELF_HP_GTE_80 ]), BuffParameter.RESISTANCE_FLAME_PASSIVE, 0.06, duration_sec=0), } check_ability_effect_unit_match(ex_ability_data.effect_units, expected_info)
def test_grant_shield_upon_hp_below(transformer_ability: AbilityTransformer): # Grace - 10850503 # https://dragalialost.wiki/w/Grace ex_ability_data = transformer_ability.transform_chained_ex_ability( 400000657) expected_info = { AbilityEffectInfo(400000657, ConditionComposite( [Condition.TARGET_SHADOW, Condition.ON_HP_LT_40]), BuffParameter.SHIELD_SINGLE_DMG, 0.5, duration_sec=0), } check_ability_effect_unit_match(ex_ability_data.effect_units, expected_info)
def test_fs_dmg_up_on_got_hit(transformer_ability: AbilityTransformer): # MH Berserk - 10150104 # https://dragalialost.wiki/w/Hunter_Berserker ex_ability_data = transformer_ability.transform_chained_ex_ability( 400000706) expected_info = { AbilityEffectInfo( 400000706, ConditionComposite([Condition.TARGET_FLAME, Condition.ON_HIT]), BuffParameter.FS_DAMAGE_BUFF, 0.2, duration_count=1, ), } check_ability_effect_unit_match(ex_ability_data.effect_units, expected_info)
def test_atk_up_on_healed(transformer_ability: AbilityTransformer): # Dragonyule Lily - 10850202 # https://dragalialost.wiki/w/Dragonyule_Lily ex_ability_data = transformer_ability.transform_chained_ex_ability( 400000828) expected_info = { AbilityEffectInfo(400000828, ConditionComposite( [Condition.TARGET_WATER, Condition.ON_HEALED]), BuffParameter.ATK_BUFF, 0.08, duration_sec=15, cooldown_sec=10), } check_ability_effect_unit_match(ex_ability_data.effect_units, expected_info)
def test_atk_up_on_hp_below(transformer_ability: AbilityTransformer): # Emma - 10540103 # https://dragalialost.wiki/w/Emma ex_ability_data = transformer_ability.transform_chained_ex_ability( 400000017) expected_info = { # The effect of clearing the action condition when the HP drops below the threshold is omitted AbilityEffectInfo(400000017, ConditionComposite( [Condition.TARGET_FLAME, Condition.ON_HP_LT_40]), BuffParameter.ATK_BUFF, 0.14, duration_sec=0), } check_ability_effect_unit_match(ex_ability_data.effect_units, expected_info)
def test_elem_res_on_team_amp_up(transformer_ability: AbilityTransformer): # Myriam - 10750303 # https://dragalialost.wiki/w/Myriam ex_ability_data = transformer_ability.transform_chained_ex_ability( 400000906) expected_info = { AbilityEffectInfo(400000906, ConditionComposite([ Condition.TARGET_WIND, Condition.SELF_TEAM_AMP_UP ]), BuffParameter.RESISTANCE_WATER_PASSIVE, 0.06, duration_sec=0), } check_ability_effect_unit_match(ex_ability_data.effect_units, expected_info)
def test_regen_on_hp_below(transformer_ability: AbilityTransformer): # Lea - 10150103 # https://dragalialost.wiki/w/Nobunaga ex_ability_data = transformer_ability.transform_chained_ex_ability( 400000710) expected_info = { AbilityEffectInfo(400000710, ConditionComposite( [Condition.TARGET_FLAME, Condition.ON_HP_LT_60]), BuffParameter.HEAL_OVER_TIME_HP, 0.04, duration_sec=20, slip_interval_sec=3.9), } check_ability_effect_unit_match(ex_ability_data.effect_units, expected_info)
def test_regen_on_combo_above(transformer_ability: AbilityTransformer): # Summer Norwin - 10350302 # https://dragalialost.wiki/w/Summer_Norwin ex_ability_data = transformer_ability.transform_chained_ex_ability( 400000770) expected_info = { AbilityEffectInfo(400000770, ConditionComposite([ Condition.TARGET_WIND, Condition.ON_COMBO_GTE_10 ]), BuffParameter.HEAL_OVER_TIME_RP, 0.07200000000000001, slip_interval_sec=2.9), } check_ability_effect_unit_match(ex_ability_data.effect_units, expected_info)
def test_fill_dragon_gauge_by_combo_count( transformer_ability: AbilityTransformer): # Gala Leonidas - 10950101 # https://dragalialost.wiki/w/Gala_Leonidas ex_ability_data = transformer_ability.transform_chained_ex_ability( 400000823) expected_info = { # The effect of clearing the action condition when the combo counter resets is omitted AbilityEffectInfo( 400000823, ConditionComposite( [Condition.TARGET_FLAME, Condition.ON_COMBO_DIV_BY_50]), BuffParameter.DRAGON_GAUGE_FILL, 0.03), } check_ability_effect_unit_match(ex_ability_data.effect_units, expected_info)
def test_transform_all_character_chained_ex( transformer_ability: AbilityTransformer, asset_manager: AssetManager): unknown_abilities = UnknownAbilityDataCollection() counter: int = 0 # Not checking all abilities in the ability asset directly # because there are some unused or deprecated ability inside. # We don't want to spend time handling unused things. for chara_data in asset_manager.asset_chara_data.playable_data: cex_id = chara_data.cex_id_at_max_level counter += 1 try: chained_ex_ability_data = transformer_ability.transform_chained_ex_ability( cex_id) unknown_abilities.add_data_if_needed(chara_data, cex_id, chained_ex_ability_data, check_effective_for_team=True) except (AbilityConditionUnconvertibleError, AbilityVariantUnconvertibleError) as ex: # Condition/Variant unconvertible (most likely due to unknown/unhandled condition/variant) chained_ex_ability_data = asset_manager.asset_ability_data.get_data_by_id( cex_id) condition_ids = ({ cex_id: chained_ex_ability_data.condition.condition_code } if chained_ex_ability_data.condition.is_unknown_condition else {}) unknown_abilities.add_data( UnknownAbilityData( chara_id=chara_data.id, ability_id=cex_id, condition_ids=condition_ids, variant_ids={ cex_id: chained_ex_ability_data.unknown_variant_type_ids }, error=ex)) unknown_abilities.print_and_fail_if_any(counter)
def test_atk_up_on_hp_above(transformer_ability: AbilityTransformer): # Original Karina - 10440201 # https://dragalialost.wiki/w/Karina ex_ability_data = transformer_ability.transform_chained_ex_ability( 400000155) expected_info = { # The effect of clearing the action condition when the HP drops below the threshold is omitted AbilityEffectInfo(400000155, ConditionComposite( [Condition.TARGET_WATER, Condition.ON_HP_GTE_60]), BuffParameter.ATK_BUFF, 0.05, duration_sec=0), } check_ability_effect_unit_match(ex_ability_data.effect_units, expected_info)
def test_atk_up_on_team_amp_up(transformer_ability: AbilityTransformer): # Child Ranzal - 10450103 # https://dragalialost.wiki/w/Child_Ranzal ex_ability_data = transformer_ability.transform_chained_ex_ability( 400000912) expected_info = { AbilityEffectInfo(400000912, ConditionComposite([ Condition.TARGET_FLAME, Condition.SELF_TEAM_AMP_UP ]), BuffParameter.ATK_PASSIVE, 0.08, duration_sec=0), } check_ability_effect_unit_match(ex_ability_data.effect_units, expected_info)
def test_crt_up_by_combo_count(transformer_ability: AbilityTransformer): # Kimono Elisanne - 10550103 # https://dragalialost.wiki/w/Kimono_Elisanne ex_ability_data = transformer_ability.transform_chained_ex_ability( 400000838) expected_info = { AbilityEffectInfo(400000838, ConditionComposite([ Condition.TARGET_FLAME, Condition.ON_COMBO_DIV_BY_10 ]), BuffParameter.CRT_RATE_PASSIVE, 0.01, max_stack_count=20), } check_ability_effect_unit_match(ex_ability_data.effect_units, expected_info)
def test_elem_res_on_energy_level_up(transformer_ability: AbilityTransformer): # Elias - 10640403 # https://dragalialost.wiki/w/Elias ex_ability_data = transformer_ability.transform_chained_ex_ability( 400000751) expected_info = { AbilityEffectInfo(400000751, ConditionComposite([ Condition.TARGET_LIGHT, Condition.ON_ENERGY_LV_UP ]), BuffParameter.RESISTANCE_SHADOW_BUFF, 0.07, duration_sec=15, cooldown_sec=15), } check_ability_effect_unit_match(ex_ability_data.effect_units, expected_info)
def test_burn_res_on_team_amp_up(transformer_ability: AbilityTransformer): # Humanoid Mercury - 10350204 # https://dragalialost.wiki/w/Humanoid_Mercury ex_ability_data = transformer_ability.transform_chained_ex_ability( 400000922) expected_info = { AbilityEffectInfo(400000922, ConditionComposite([ Condition.TARGET_WATER, Condition.SELF_TEAM_AMP_UP ]), BuffParameter.RESISTANCE_BURN, 1, duration_sec=0), } check_ability_effect_unit_match(ex_ability_data.effect_units, expected_info)
def test_inflicted_target(transformer_ability: AbilityTransformer): # Valentine's Orion - 10130103 # https://dragalialost.wiki/w/Valentine%27s_Orion ex_ability_data = transformer_ability.transform_chained_ex_ability( 400000037) expected_info = { AbilityEffectInfo(400000037, ConditionComposite([ Condition.TARGET_FLAME, Condition.ON_INFLICTED_BURN ]), BuffParameter.ATK_BUFF, 0.08, duration_sec=15, cooldown_sec=10), } check_ability_effect_unit_match(ex_ability_data.effect_units, expected_info)
def test_atk_up_on_dodged(transformer_ability: AbilityTransformer): # Yoshitsune - 10950202 # https://dragalialost.wiki/w/Yoshitsune ex_ability_data = transformer_ability.transform_chained_ex_ability( 400000853) expected_info = { AbilityEffectInfo(400000853, ConditionComposite([ Condition.TARGET_WATER, Condition.ON_DODGE_SUCCESS ]), BuffParameter.ATK_BUFF, 0.1, duration_sec=15, cooldown_sec=15), } check_ability_effect_unit_match(ex_ability_data.effect_units, expected_info)
def test_elem_res_in_buff_field(transformer_ability: AbilityTransformer): # Opera Karina - 10650504 # https://dragalialost.wiki/w/Opera_Karina ex_ability_data = transformer_ability.transform_chained_ex_ability( 400000799) expected_info = { # The effect of clearing the action condition when leaving the buff field is omitted AbilityEffectInfo(400000799, ConditionComposite([ Condition.TARGET_SHADOW, Condition.ON_ENTERED_BUFF_FIELD ]), BuffParameter.RESISTANCE_LIGHT_BUFF, 0.07, duration_sec=0), } check_ability_effect_unit_match(ex_ability_data.effect_units, expected_info)
def test_elem_res_on_combo_count_above( transformer_ability: AbilityTransformer): # Summer Cleo - 10650401 # https://dragalialost.wiki/w/Karina ex_ability_data = transformer_ability.transform_chained_ex_ability( 400000489) expected_info = { # The effect of clearing the action condition when the combo counter resets is omitted AbilityEffectInfo(400000489, ConditionComposite([ Condition.TARGET_LIGHT, Condition.ON_COMBO_GTE_10 ]), BuffParameter.RESISTANCE_SHADOW_BUFF, 0.1, duration_sec=0), } check_ability_effect_unit_match(ex_ability_data.effect_units, expected_info)