# Pastebin 2uSZrPWE ("crpg_nudge_connect", [ (try_begin), #(display_message, "@TEST1", 0xEECC00), (store_script_param, ":nudging_player_id", 1), (store_script_param, ":requested_nudge_type", 2), #(display_message, "@Nudge check 4!"), (try_begin), (multiplayer_is_server), (player_get_agent_id, ":nudging_agent_id", ":nudging_player_id"), (agent_is_human, ":nudging_agent_id"), (agent_is_alive, ":nudging_agent_id"), (agent_is_active, ":nudging_agent_id"), (agent_get_troop_id, ":nudging_troop_id", ":nudging_agent_id"), #(neg|troop_is_mounted, ":nudging_troop_id"),#doesnt work (agent_get_horse, ":nudging_agent_horse_id",":nudging_agent_id"), (lt, ":nudging_agent_horse_id", 0), #agent is not mounted (player_get_agent_id, ":nudging_agent_id", ":nudging_player_id"), #(display_message, "@Nudge check 5!"), (agent_get_position, pos25, ":nudging_agent_id"), (agent_get_look_position, pos28, ":nudging_agent_id"), (set_fixed_point_multiplier, 100), #(agent_get_action_dir, ":nudger_action", ":nudging_agent_id"), #(assign, reg10, ":nudger_action"), #(display_message, "@Nudger action dir={reg10}!"), (agent_get_animation, ":anim_lower", ":nudging_agent_id", 0), #(neq, ":anim_lower", "anim_kick_right_leg"), #(neg|is_between, ":anim_lower", "anim_jump", "anim_jump_hard"), #(neg|is_between, ":anim_lower", "anim_prepare_kick_0", "anim_kick_left_leg"), #(neg|is_between, ":anim_lower", "anim_ride_0", "anim_lancer_ride_0"), #(neg|is_between, ":anim_lower", "anim_ride_0", "anim_strike_fall_back_rise_upper"), #(neg|is_between, ":anim_fall_face_hold", "anim_ride_0", "anim_lancer_ride_0"), #(this_or_next|eq, ":anim_lower", "anim_stand_single"), #(this_or_next|eq, ":anim_lower", "anim_stand_staff"), #(this_or_next|eq, ":anim_lower", "anim_stand_greatsword"), (this_or_next|is_between, ":anim_lower", "anim_stand_unarmed", "anim_prepare_kick_0"), (is_between, ":anim_lower", "anim_run_forward", "anim_walk_forward_crouch"), #(is_between, ":anim_lower", "anim_run_forward", "anim_walk_backward"), (agent_get_animation, ":anim_upper", ":nudging_agent_id", 1), (agent_get_wielded_item, ":nudging_agent_shield",":nudging_agent_id",1), (agent_get_wielded_item, ":nudging_agent_weapon",":nudging_agent_id",0), (try_begin), (gt, ":nudging_agent_weapon", 0), (item_get_type, ":weapon_type", ":nudging_agent_weapon"), (else_try), (assign, ":weapon_type", 0), (try_end), #get nudge str (troop_get_slot, ":nudging_troop_str", ":nudging_troop_id", slot_troop_crpg_atr_str), #(this_or_next|eq, "$g_multiplayer_game_type", multiplayer_game_type_rabbit), #rageball or dtv only #(this_or_next|eq, "$g_multiplayer_game_type", multiplayer_game_type_defend_the_village), #(eq, ":weapon_type", itp_type_one_handed_wpn), #nudge only for shieldless 1h or on dtv/rageball for all #(this_or_next|eq, "$g_multiplayer_game_type", multiplayer_game_type_rabbit), #rageball or dtv only #(this_or_next|eq, "$g_multiplayer_game_type", multiplayer_game_type_defend_the_village), #(le, ":nudging_agent_shield", 0), #nudge only for shieldless 1h or on dtv/rageball for all #(agent_get_defend_action, ":nudging_agent_defend_action", ":nudging_agent_id"), #returned values: free = 0, parrying = 1, blocking = 2 #(agent_get_attack_action, ":nudging_agent_attack_action", ":nudging_agent_id"), #returned values: free = 0, readying_attack = 1, releasing_attack = 2, completing_attack_after_hit = 3, attack_parried = 4, reloading = 5, after_release = 6, cancelling_attack = 7 (try_begin), #check if requested nudge connect fits with actual anim (eq, ":requested_nudge_type", 10), (this_or_next|eq, ":anim_upper" ,"anim_nudge_shield_shove"), (eq, ":anim_upper", "anim_nudge_shove"), #is doing 1h shove or shield shove anim (assign, ":nudge_kind", 10), (else_try), (eq, ":requested_nudge_type", 12), (eq, ":anim_upper", "anim_nudge_pole_shove"), #is doing pole shove anim (assign, ":nudge_kind", 12), (else_try), (eq, ":requested_nudge_type", 20), (this_or_next|eq, ":anim_upper" ,"anim_nudge_shield_backhand"), (eq, ":anim_upper" ,"anim_direct_fist_mirrored"), #is doing nudge attack anim (assign, ":nudge_kind", 20), (else_try), (eq, ":requested_nudge_type", 21), (eq, ":weapon_type", itp_type_two_handed_wpn), #check if still 2h is used (eq, ":anim_upper" ,"anim_nudge_pommel_strike"), #is doing nudge attack anim (assign, ":nudge_kind", 21), (else_try), (eq, ":requested_nudge_type", 30), (assign, ":nudge_kind", 30), #normal nudge (else_try), (assign, ":nudge_kind", 0), (try_end), (gt, ":nudge_kind", 0), (try_for_agents, ":nudgeable_agent_id", pos25, 80), #(display_message, "@Nudge check 6!"), (agent_is_human, ":nudgeable_agent_id"), (agent_is_alive, ":nudgeable_agent_id"), (assign, ":stop_nudge", 0), #(agent_get_team, ":nudging_agent_team", ":nudging_agent_id"), #get dealer agent team #(agent_get_team, ":nudgeable_agent_team", ":nudgeable_agent_id"), #get victim agent team (neq, ":nudgeable_agent_id", ":nudging_agent_id"), (try_begin), #for duel mode: check if target is in duel with nudger (eq, "$g_multiplayer_game_type", multiplayer_game_type_duel), (agent_get_slot, ":duel_agent", ":nudgeable_agent_id", slot_agent_in_duel_with), (neq, ":duel_agent", ":nudging_agent_id"), (assign, ":stop_nudge", 1), #(break_loop), (try_end), (eq, ":stop_nudge", 0), #(this_or_next|neq, "$g_multiplayer_game_type", multiplayer_game_type_defend_the_village), #(neq, ":nudging_agent_team", ":nudgeable_agent_team"),#not nudging teammates on DTV (agent_get_troop_id, ":nudgeable_troop_id", ":nudgeable_agent_id"), #(neg|troop_is_mounted, ":nudgeable_troop_id"), #does not work (agent_get_horse, ":nudgeable_agent_horse_id",":nudgeable_agent_id"), (lt, ":nudgeable_agent_horse_id", 0), #agent is not mounted (agent_get_animation, ":anim_lower_victim", ":nudgeable_agent_id", 0), (neg|is_between, ":anim_lower_victim", "anim_strike_head_left", "anim_cheer"), #dont allow it on already staggered or knocked down agents #get attack/defend/nothing status of victim (agent_get_position, pos26, ":nudgeable_agent_id"), (try_begin),#check if victim is nudged from behind for later use in counter nudge (position_is_behind_position,pos25,pos26), (assign, ":victim_is_facing_nudger", 0), (else_try), (assign, ":victim_is_facing_nudger", 1), (try_end), (neg|position_is_behind_position, pos26, pos25), #(position_has_line_of_sight_to_position, pos25, pos26), (get_distance_between_positions, ":distance", pos25, pos26), (get_distance_between_positions, ":distance_look", pos28, pos26), #(assign, reg10, ":distance"), #(assign, reg11, ":distance_look"), #(display_message, "@Nudge check 7! distance={reg10}, distance look={reg11}"), (this_or_next|lt, ":distance", crpg_nudge_distance_simple),#100 (lt, ":distance_look", crpg_nudge_distance),#140 (copy_position, pos27, pos25), (position_move_y, pos27, ":distance"), #(position_get_z,":nudgeable_agent_z",pos26), #(position_set_z, pos27,":nudgeable_agent_z"), (get_distance_between_positions, ":new_distance", pos27, pos26), (copy_position, pos29, pos28), (position_move_y, pos29, ":distance_look"), #(position_get_z,":nudgeable_agent_z",pos28), #(position_set_z, pos29,":nudgeable_agent_z"), (get_distance_between_positions, ":new_distance_look", pos29, pos26), #(assign, reg10, ":new_distance"), #(assign, reg11, ":new_distance_look"), #(display_message, "@Nudge check 8! new distance={reg10}; new distance look={reg11}"), (this_or_next|lt, ":new_distance", crpg_nudge_cone_distance_simple), #60 (lt, ":new_distance_look", crpg_nudge_cone_distance), #60 (agent_get_animation, ":anim_lower_victim", ":nudgeable_agent_id", 0), (agent_get_animation, ":anim_upper_victim", ":nudgeable_agent_id", 1), #(agent_get_animation, ":anim_lower_dealer", ":nudging_agent_id", 0), #(agent_get_animation, ":anim_upper_dealer", ":nudging_agent_id", 0), (try_begin), (gt, ":nudging_agent_weapon", 0), (item_get_type, ":weapon_type", ":nudging_agent_weapon"), (else_try), (assign, ":weapon_type", 0), (try_end), (agent_get_attack_action, ":nudgeable_agent_attack", ":nudgeable_agent_id"), (agent_get_defend_action, ":nudgeable_agent_defend", ":nudgeable_agent_id"), (try_begin), (gt, ":nudgeable_agent_defend", 0), (assign, ":victim_status", 1), #is defending (else_try), (gt, ":nudgeable_agent_attack", 0), (assign, ":victim_status", 2), #is attacking (else_try), (assign, ":victim_status", 0), #not attacking or defending (try_end), #determine offhand damage with glove weight (try_begin), (ge, ":nudging_agent_id", 0), (agent_get_item_slot, ":nudging_agent_gloves", ":nudging_agent_id", 7), (ge, ":nudging_agent_gloves", 0), (item_get_slot, ":nudging_agent_gloves_weight", ":nudging_agent_gloves", slot_item_crpg_weight), (val_div, ":nudging_agent_gloves_weight", 2), (store_add, ":offhand_punch_damage", ":nudging_agent_gloves_weight", 5), (else_try), (assign, ":offhand_punch_damage", 5), (try_end), (val_clamp, ":offhand_punch_damage", 5, 25), (assign, ":stop_nudge", 0), #get str difference for shove distance (try_begin), (ge, ":nudgeable_agent_id", 0), (agent_get_troop_id, ":nudgeable_troop", ":nudgeable_agent_id"), (troop_get_slot, ":nudgeable_troop_str",":nudgeable_troop", slot_troop_crpg_atr_str), (store_sub, ":str_difference_modifier", ":nudging_troop_str", ":nudgeable_troop_str"), (val_mul, ":str_difference_modifier", 3), (val_clamp, ":str_difference_modifier", -100, 100), (try_end), #(display_message, "@Nudge check 9!"), (try_begin), #always knockdown when connecting with a jumper or ranged - no matter what nudge; doesn't work for shove (neq, ":requested_nudge_type", 10),#not 1h or shield shove (neq, ":requested_nudge_type", 12),#not polearm shove (this_or_next|is_between, ":anim_lower_victim", "anim_jump", "anim_jump_end"), #jumper (is_between, ":anim_upper_victim", "anim_ready_bow", "anim_ready_swingright_fist"),#ranged aiming or releasing (call_script, "script_crpg_rabbit_play_anim", 9, ":nudgeable_agent_id", 1), #knockdown #(call_script, "script_crpg_rabbit_ball_sound", 5, 2), #(play_sound_at_position, "snd_player_hit_by_arrow", pos25), (agent_play_sound, ":nudging_agent_id", "snd_body_fall_big"), (agent_play_sound, ":nudgeable_agent_id", "snd_body_fall_big"), (agent_deliver_damage_to_agent, ":nudging_agent_id", ":nudgeable_agent_id", 1), #deal damage to make it reportable (else_try), #shield -> shieldbash with knockback (gt, ":nudging_agent_shield", 0), #(display_message, "@Nudge check 8! shield"), (try_begin), (eq, ":nudge_kind", 10),#shove (try_begin),#first check if the victim is doing the counter nudge(attack nudge/pommel strike/shield backhand) and if yes, punish the nudge instead (eq, ":victim_is_facing_nudger", 1), #no counter nudging when hit from behind (this_or_next|eq, ":anim_upper_victim", "anim_nudge_shield_backhand"), #shield attack nudge (this_or_next|eq, ":anim_upper_victim", "anim_nudge_pommel_strike"), #shield attack nudge (eq, ":anim_upper_victim", "anim_direct_fist_mirrored"), #shield attack nudge (assign, ":stop_nudge", 1), (call_script, "script_crpg_rabbit_play_anim", 26, ":nudging_agent_id", 1),#med stagger for nudger (else_try), (eq, ":victim_status", 1),#is defending (call_script, "script_crpg_rabbit_play_anim", 12, ":nudgeable_agent_id", 1),#short stagger (else_try), (eq, ":victim_status", 2),#is attacking (call_script, "script_crpg_rabbit_play_anim", 14, ":nudgeable_agent_id", 1),#med stagger (else_try), (call_script, "script_crpg_rabbit_play_anim", 25, ":nudgeable_agent_id", 1),#med short stagger (try_end), (else_try), (eq, ":nudge_kind", 20),#attack nudge (try_begin),#first check if the victim is doing the counter nudge(normal nudge/bash) and if yes, punish the nudge instead (eq, ":victim_is_facing_nudger", 1), #no counter nudging when hit from behind (this_or_next|eq, ":anim_upper_victim", "anim_nudge_shield_bash"), #shield nudge (eq, ":anim_upper_victim", "anim_swingright_fist_mirrored"), #1h nudge (assign, ":stop_nudge", 1), (call_script, "script_crpg_rabbit_play_anim", 26, ":nudging_agent_id", 0),#med stagger for nudger (else_try), (eq, ":victim_status", 1),#is defending (call_script, "script_crpg_rabbit_play_anim", 14, ":nudgeable_agent_id", 0),#med stagger (else_try), (eq, ":victim_status", 2),#is attacking (call_script, "script_crpg_rabbit_play_anim", 18, ":nudgeable_agent_id", 0),#long stagger (else_try), (call_script, "script_crpg_rabbit_play_anim", 26, ":nudgeable_agent_id", 0),#med long stagger (try_end), (else_try), (eq, ":nudge_kind", 30),#normal nudge (try_begin),#first check if the victim is doing the counter nudge(1h shove/pole shove/shield shove) and if yes, punish the nudge instead (eq, ":victim_is_facing_nudger", 1), #no counter nudging when hit from behind (this_or_next|eq, ":anim_upper_victim", "anim_nudge_shield_shove"), #shield defend nudge (this_or_next|eq, ":anim_upper_victim", "anim_nudge_pole_shove"), #pole defend nudge (eq, ":anim_upper_victim", "anim_nudge_shove"), #1h defend nudge (assign, ":stop_nudge", 1), (call_script, "script_crpg_rabbit_play_anim", 26, ":nudging_agent_id", 0),#med stagger for nudger (else_try), (eq, ":victim_status", 1),#is defending (call_script, "script_crpg_rabbit_play_anim", 24, ":nudgeable_agent_id", 0),#very short stagger (else_try), (eq, ":victim_status", 2),#is attacking (call_script, "script_crpg_rabbit_play_anim", 25, ":nudgeable_agent_id", 0),#med short stagger (else_try), (call_script, "script_crpg_rabbit_play_anim", 12, ":nudgeable_agent_id", 0),#short (try_end), (try_end), (neq, ":stop_nudge", 1), #(agent_play_sound, ":nudging_agent_id", "snd_wooden_hit_high_armor_low_damage"), #(call_script, "script_crpg_rabbit_ball_sound", 5, 1), (agent_play_sound, ":nudging_agent_id", "snd_shield_hit_wood_wood"), (agent_play_sound, ":nudgeable_agent_id", "snd_shield_hit_wood_wood"), #(play_sound_at_position, "snd_wooden_hit_high_armor_low_damage", pos25), (troop_get_slot, ":nudging_agent_str", ":nudging_troop_id", slot_troop_crpg_atr_str), (troop_get_slot, ":nudging_agent_shield_skill", ":nudging_troop_id", slot_troop_crpg_skl_shield), (val_div, ":nudging_agent_str", 3), (val_mul, ":nudging_agent_shield_skill", 2), (store_add, ":shieldbash_damage", ":nudging_agent_str", ":nudging_agent_shield_skill"), (assign, ":acc_jump_x", 0), (store_mul, ":acc_jump_y", ":shieldbash_damage", 3), (store_mul, ":acc_jump_z", ":shieldbash_damage", 5), (try_begin), (eq, ":nudge_kind", 10),#shove, less damage, more knockback (val_div, ":shieldbash_damage", 5), (val_mul, ":acc_jump_y", 10), (val_mul, ":acc_jump_z", 3), (else_try), (eq, ":nudge_kind", 20),#backhand, side knockback #(val_div, ":shieldbash_damage", 2), (val_mul, ":acc_jump_y", 2), (val_mul, ":acc_jump_z", 2), (store_mul, ":acc_jump_x", ":shieldbash_damage", -20), (try_end), (assign, ":ghosting_time", 700), (val_add, ":ghosting_time", ":str_difference_modifier"), (try_begin),#let victim status influence knockback distance (eq, ":victim_status", 1),#is defending (val_div, ":acc_jump_x", 4), (val_div, ":acc_jump_y", 4), (val_div, ":acc_jump_z", 4), (val_sub, ":ghosting_time", 100), (else_try), (neq, ":victim_status", 2),#is not attacking (val_div, ":acc_jump_x", 2), (val_div, ":acc_jump_y", 2), (val_div, ":acc_jump_z", 2), (val_sub, ":ghosting_time", 50), (try_end), (val_clamp, ":shieldbash_damage", 0, 30), (try_begin), (eq, ":victim_status", 1),#enemy is defending (assign, ":shieldbash_damage", 1),#(almost)no damage (try_end), (agent_deliver_damage_to_agent, ":nudging_agent_id", ":nudgeable_agent_id", ":shieldbash_damage"), (copy_position, pos28, pos25), (init_position, pos29), (position_copy_origin, pos28, pos29), #(assign, reg10, ":acc_jump_y"), #(display_message, "@push = {reg10}"), #(position_set_x, pos28, ":acc_jump_x"), #-n<0<+n, left to right #(position_set_y, pos28, ":acc_jump_y"), #-n<0<+n, backwards to forwards #(position_set_z, pos28, ":acc_jump_z"), #-n<0<+n, downwards to upwards (store_wse_version, ":wse_version", 0),#check if wse1(=2) or wse2(=3) (try_begin), (eq, ":wse_version", 2), #(display_message, "@WSE1!"), (val_div, ":acc_jump_x", 2), (val_div, ":acc_jump_y", 2), (val_div, ":acc_jump_z", 2), (position_move_x, pos28, ":acc_jump_x"), (position_move_y, pos28, ":acc_jump_y"), (position_set_z, pos28, ":acc_jump_z"), #z component for ballistic throw (agent_accelerate, ":nudgeable_agent_id", pos28), (else_try), (eq, ":wse_version", 3), #(display_message, "@WSE2!"), (position_move_x, pos28, ":acc_jump_x"), (position_move_y, pos28, ":acc_jump_y"), (position_set_z, pos28, -1000), #z component for ballistic throw (set_fixed_point_multiplier, 1000), (agent_accelerate, ":nudgeable_agent_id", pos28, ":ghosting_time"),#extra parameter for ghosting time - no need for ballistic throw then (try_end), #(try_begin), # (ge, ":nudgeable_agent_id", 0), # (assign, ":acc_jump_z_and_agent_no", ":acc_jump_z"), # (val_mul, ":acc_jump_z_and_agent_no", 32768), # (val_add, ":acc_jump_z_and_agent_no", ":nudgeable_agent_id"), #(else_try), # (assign, ":acc_jump_z_and_agent_no", 0), #(try_end), #(assign, reg10, ":acc_jump_x"), #(assign, reg11, ":acc_jump_y"), #(assign, reg12, ":acc_jump_z"), #(display_message, "@x={reg10}; y={reg11}; z={reg12};"), #(call_script, "script_crpg_rabbit_accelerate_agent", ":acc_jump_x", ":acc_jump_y", ":acc_jump_z_and_agent_no"), (else_try), (le, ":nudging_agent_shield", 0),#no shield (try_begin), (eq, ":nudge_kind", 10),#shove #(display_message, "@Nudge check 8! Shove!"), (try_begin),#first check if the victim is doing the counter nudge(attack nudge/pommel strike/shield backhand) and if yes, punish the nudge instead (eq, ":victim_is_facing_nudger", 1), #no counter nudging when hit from behind (this_or_next|eq, ":anim_upper_victim", "anim_nudge_shield_backhand"), #shield attack nudge (this_or_next|eq, ":anim_upper_victim", "anim_nudge_pommel_strike"), #shield attack nudge (eq, ":anim_upper_victim", "anim_direct_fist_mirrored"), #shield attack nudge (assign, ":stop_nudge", 1), (call_script, "script_crpg_rabbit_play_anim", 18, ":nudging_agent_id", 1),#long stagger for nudger (else_try), (eq, ":victim_status", 1),#is defending (call_script, "script_crpg_rabbit_play_anim", 12, ":nudgeable_agent_id", 1),#short stagger (else_try), (eq, ":victim_status", 2),#is attacking (call_script, "script_crpg_rabbit_play_anim", 14, ":nudgeable_agent_id", 1),#med stagger (else_try), (call_script, "script_crpg_rabbit_play_anim", 25, ":nudgeable_agent_id", 1),#med short stagger (try_end), #(call_script, "script_crpg_rabbit_ball_sound", 5, 3), (agent_play_sound, ":nudging_agent_id", "snd_blunt_hit"), (agent_play_sound, ":nudgeable_agent_id", "snd_blunt_hit"), (neq, ":stop_nudge", 1), (agent_deliver_damage_to_agent, ":nudging_agent_id", ":nudgeable_agent_id", 1), (troop_get_slot, ":nudging_agent_str", ":nudging_troop_id", slot_troop_crpg_atr_str), (assign, ":acc_jump_x", 0), (store_mul, ":acc_jump_y", ":nudging_agent_str", 30), (store_mul, ":acc_jump_z", ":nudging_agent_str", 10), (assign, ":ghosting_time", 900), (val_add, ":ghosting_time", ":str_difference_modifier"), (try_begin),#let victim status influence knockback distance (eq, ":victim_status", 1),#is defending (val_div, ":acc_jump_x", 4), (val_div, ":acc_jump_y", 4), (val_div, ":acc_jump_z", 4), (val_sub, ":ghosting_time", 100), (else_try), (neq, ":victim_status", 2),#is not attacking (val_div, ":acc_jump_x", 2), (val_div, ":acc_jump_y", 2), (val_div, ":acc_jump_z", 2), (val_sub, ":ghosting_time", 50), (try_end), (copy_position, pos28, pos25), (init_position, pos29), (position_copy_origin, pos28, pos29), (position_move_y, pos28, ":acc_jump_y"), #(position_set_x, pos28, ":acc_jump_x"), #-n<0<+n, left to right #(position_set_y, pos28, ":acc_jump_y"), #-n<0<+n, backwards to forwards (position_move_z, pos1, 20, 0), (store_wse_version, ":wse_version", 0),#check if wse1(=2) or wse2(=3) (try_begin), (eq, ":wse_version", 2), #(display_message, "@WSE1 knockback!"), (position_set_z, pos28, ":acc_jump_z"), #z component for ballistic throw (agent_accelerate, ":nudgeable_agent_id", pos28), (else_try), (eq, ":wse_version", 3), #(display_message, "@WSE2 knockback!"), (position_set_z, pos28, -1000), #z component for ballistic throw (set_fixed_point_multiplier, 1000), (agent_accelerate, ":nudgeable_agent_id", pos28, ":ghosting_time"),#extra parameter for ghosting time - no need for ballistic throw then (try_end), (else_try),#pole shove (eq, ":nudge_kind", 12),#pole shove #(display_message, "@Nudge check 8! Pole shove!"), (try_begin),#first check if the victim is doing the counter nudge(attack nudge/pommel strike/shield backhand) and if yes, punish the nudge instead (eq, ":victim_is_facing_nudger", 1), #no counter nudging when hit from behind (this_or_next|eq, ":anim_upper_victim", "anim_nudge_shield_backhand"), #shield attack nudge (this_or_next|eq, ":anim_upper_victim", "anim_nudge_pommel_strike"), #shield attack nudge (eq, ":anim_upper_victim", "anim_direct_fist_mirrored"), #shield attack nudge (assign, ":stop_nudge", 1), (call_script, "script_crpg_rabbit_play_anim", 18, ":nudging_agent_id", 1),#long stagger for nudger (else_try), (eq, ":victim_status", 1),#is defending (call_script, "script_crpg_rabbit_play_anim", 14, ":nudgeable_agent_id", 1),#med stagger (else_try), (eq, ":victim_status", 1),#is defending (call_script, "script_crpg_rabbit_play_anim", 12, ":nudgeable_agent_id", 1),#short stagger (else_try), (eq, ":victim_status", 2),#is attacking (call_script, "script_crpg_rabbit_play_anim", 14, ":nudgeable_agent_id", 1),#med stagger (else_try), (call_script, "script_crpg_rabbit_play_anim", 25, ":nudgeable_agent_id", 1),#med short stagger (try_end), #(call_script, "script_crpg_rabbit_ball_sound", 5, 3), (agent_play_sound, ":nudging_agent_id", "snd_blunt_hit"), (agent_play_sound, ":nudgeable_agent_id", "snd_blunt_hit"), (neq, ":stop_nudge", 1), (agent_deliver_damage_to_agent, ":nudging_agent_id", ":nudgeable_agent_id", 1), (troop_get_slot, ":nudging_agent_str", ":nudging_troop_id", slot_troop_crpg_atr_str), (assign, ":acc_jump_x", 0), (store_mul, ":acc_jump_y", ":nudging_agent_str", 30), (store_mul, ":acc_jump_z", ":nudging_agent_str", 10), (assign, ":ghosting_time", 800), (val_add, ":ghosting_time", ":str_difference_modifier"), (try_begin),#let victim status influence knockback distance (eq, ":victim_status", 1),#is defending (val_div, ":acc_jump_x", 4), (val_div, ":acc_jump_y", 4), (val_div, ":acc_jump_z", 4), (val_sub, ":ghosting_time", 100), (else_try), (neq, ":victim_status", 2),#is not attacking (val_div, ":acc_jump_x", 2), (val_div, ":acc_jump_y", 2), (val_div, ":acc_jump_z", 2), (val_sub, ":ghosting_time", 50), (try_end), (copy_position, pos28, pos25), (init_position, pos29), (position_copy_origin, pos28, pos29), #(position_move_y, pos28, ":acc_jump_y"), #(position_set_x, pos28, ":acc_jump_x"), #-n<0<+n, left to right #(position_set_y, pos28, ":acc_jump_y"), #-n<0<+n, backwards to forwards (position_move_z, pos1, 20, 0), (store_wse_version, ":wse_version", 0),#check if wse1(=2) or wse2(=3) (try_begin), (eq, ":wse_version", 2), #(display_message, "@WSE1 knockback!"), (val_div, ":acc_jump_x", 2), (val_div, ":acc_jump_y", 2), (val_div, ":acc_jump_z", 2), (position_move_x, pos28, ":acc_jump_x"), (position_move_y, pos28, ":acc_jump_y"), (position_set_z, pos28, ":acc_jump_z"), #z component for ballistic throw (agent_accelerate, ":nudgeable_agent_id", pos28), (else_try), (eq, ":wse_version", 3), #(display_message, "@WSE2 knockback!"), (position_move_x, pos28, ":acc_jump_x"), (position_move_y, pos28, ":acc_jump_y"), (position_set_z, pos28, -1000), #z component for ballistic throw (set_fixed_point_multiplier, 1000), (agent_accelerate, ":nudgeable_agent_id", pos28, ":ghosting_time"),#extra parameter for ghosting time - no need for ballistic throw then (try_end), (else_try),#left straight (eq, ":nudge_kind", 20),#attack nudge #(display_message, "@Nudge check 8! Straight!"), (try_begin),#first check if the victim is doing the counter nudge(normal nudge/bash) and if yes, punish the nudge instead (eq, ":victim_is_facing_nudger", 1), #no counter nudging when hit from behind (this_or_next|eq, ":anim_upper_victim", "anim_nudge_shield_bash"), #shield nudge (eq, ":anim_upper_victim", "anim_swingright_fist_mirrored"), #1h nudge (assign, ":stop_nudge", 1), (call_script, "script_crpg_rabbit_play_anim", 18, ":nudging_agent_id", 0),#long stagger for nudger (else_try), (eq, ":weapon_type", itp_type_one_handed_wpn), #only for shieldless 1h (this_or_next|is_between, ":anim_lower_victim", "anim_run_backward", "anim_run_right"), #backpaddling run (this_or_next|is_between, ":anim_lower_victim", "anim_walk_backward", "anim_walk_right"), #backpaddling walk (is_between, ":anim_lower_victim", "anim_walk_backward_left", "anim_walk_forward_crouch"), #backpaddling walk (agent_get_attack_action, ":attack_dir", ":nudgeable_agent_id"), (gt, ":attack_dir", 0), #backpaddling agent is attacking (call_script, "script_crpg_rabbit_play_anim", 9, ":nudgeable_agent_id", 1), #knockdown for backpaddling attacker #(call_script, "script_crpg_rabbit_ball_sound", 5, 2), #(play_sound_at_position, "snd_player_hit_by_arrow", pos25), (agent_play_sound, ":nudging_agent_id", "snd_body_fall_big"), (agent_play_sound, ":nudgeable_agent_id", "snd_body_fall_big"), (store_add, ":offhand_punch_damage_2" ,":offhand_punch_damage", 20), (val_clamp, ":offhand_punch_damage_2", 0, 35), (try_begin), (eq, ":victim_status", 1),#enemy is defending (assign, ":offhand_punch_damage_2", 1),#(almost)no damage (try_end), (agent_deliver_damage_to_agent, ":nudging_agent_id", ":nudgeable_agent_id", ":offhand_punch_damage_2"), (else_try), (agent_play_sound, ":nudging_agent_id", "snd_blunt_hit"), (try_begin), (eq, ":victim_status", 1),#is defending (call_script, "script_crpg_rabbit_play_anim", 14, ":nudgeable_agent_id", 0),#med stagger (else_try), (eq, ":victim_status", 2),#is attacking (call_script, "script_crpg_rabbit_play_anim", 18, ":nudgeable_agent_id", 0),#long stagger (else_try), (call_script, "script_crpg_rabbit_play_anim", 26, ":nudgeable_agent_id", 0),#med long stagger (try_end), (store_add, ":offhand_punch_damage_2" ,":offhand_punch_damage", 10), (val_clamp, ":offhand_punch_damage_2", 0, 20), (try_begin), (eq, ":victim_status", 1),#enemy is defending (assign, ":offhand_punch_damage_2", 1),#(almost)no damage (try_end), (agent_deliver_damage_to_agent, ":nudging_agent_id", ":nudgeable_agent_id", ":offhand_punch_damage_2"), (try_end), (else_try),#pommel #(display_message, "@Nudge check 9!"), (eq, ":nudge_kind", 21),#2h pommel strike #(display_message, "@Nudge check 10!"), #(display_message, "@Nudge check 8! Pommel strike!"), (troop_get_slot, ":nudging_agent_power_strike", ":nudging_troop_id", slot_troop_crpg_skl_power_strike), (troop_get_slot, ":nudging_agent_weapon_master", ":nudging_troop_id", slot_troop_crpg_skl_weapon_master), #(store_add, ":offhand_punch_damage_2", ":nudging_agent_power_strike", ":nudging_agent_weapon_master"), #(val_mul, ":offhand_punch_damage_2", 2), (troop_get_slot, ":attacker_str", ":nudging_troop_id", slot_troop_crpg_atr_str), (troop_get_slot, ":victim_str", ":nudgeable_troop_id", slot_troop_crpg_atr_str), (store_sub, ":str_difference", ":attacker_str", ":victim_str"), #(assign, reg10, ":str_difference"), #(display_message, "@STR diff= {reg10}"), (item_get_slot, ":2h_weight", ":nudging_agent_weapon", slot_item_crpg_weight), (store_div, ":offhand_punch_damage_2", ":2h_weight", 2), (val_add, ":offhand_punch_damage_2", ":nudging_agent_power_strike"), (val_add, ":offhand_punch_damage_2", ":nudging_agent_weapon_master"), (val_div, ":offhand_punch_damage_2", 2), #(assign, reg10, ":2h_weight"), #(display_message, "@weapon weight = {reg10}"), (val_div, ":2h_weight", 3), (store_add, ":knock_into_crouch_decider", ":2h_weight", ":str_difference"), #(assign, reg10, ":knock_into_crouch_decider"), #(display_message, "@knock into crouch decider = {reg10}"), (agent_play_sound, ":nudging_agent_id", "snd_blunt_hit"), #(display_message, "@Nudge check 10!"), (try_begin),#first check if the victim is doing the counter nudge(normal nudge/bash) and if yes, punish the nudge instead (eq, ":victim_is_facing_nudger", 1), #no counter nudging when hit from behind (this_or_next|eq, ":anim_upper_victim", "anim_nudge_shield_bash"), #shield nudge (eq, ":anim_upper_victim", "anim_swingright_fist_mirrored"), #1h nudge (assign, ":stop_nudge", 1), (call_script, "script_crpg_rabbit_play_anim", 18, ":nudging_agent_id", 0),#long stagger for nudger (else_try), (eq, ":victim_status", 1),#is defending (call_script, "script_crpg_rabbit_play_anim", 14, ":nudgeable_agent_id", 0),#med stagger (else_try), (eq, ":victim_status", 2),#is attacking (try_begin), #knock into crouch(and freeze) when str and weight is big enough (gt, ":knock_into_crouch_decider", crpg_nudge_knock_into_crouch_threshold), #(call_script, "script_crpg_rabbit_play_anim", 28, ":nudgeable_agent_id", 1),#to crouch (call_script, "script_crpg_rabbit_play_anim", 29, ":nudgeable_agent_id", 0), #very long stagger (else_try),# else to stagger (call_script, "script_crpg_rabbit_play_anim", 18, ":nudgeable_agent_id", 0),#long stagger (try_end), (else_try), (call_script, "script_crpg_rabbit_play_anim", 26, ":nudgeable_agent_id", 0),#med long stagger (try_end), (try_begin),#let str difference influence pommel strike dam (gt, ":str_difference_modifier", 0), (store_div, ":str_difference_pommel_strike_damage_bonus", ":str_difference_modifier", 5), (val_add, ":offhand_punch_damage_2", ":str_difference_pommel_strike_damage_bonus"), (try_end), (val_clamp, ":offhand_punch_damage_2", 0, 60), (try_begin), (eq, ":victim_status", 1),#enemy is defending (assign, ":offhand_punch_damage_2", 1),#(almost)no damage (try_end), (agent_deliver_damage_to_agent, ":nudging_agent_id", ":nudgeable_agent_id", ":offhand_punch_damage_2"), (else_try),#low hook (eq, ":nudge_kind", 30),#normal nudge #(display_message, "@Nudge check 8! Low hook!"), (try_begin),#first check if the victim is doing the counter nudge(1h shove/pole shove/shield shove) and if yes, punish the nudge instead (eq, ":victim_is_facing_nudger", 1), #no counter nudging when hit from behind (this_or_next|eq, ":anim_upper_victim", "anim_nudge_shield_shove"), #shield defend nudge (this_or_next|eq, ":anim_upper_victim", "anim_nudge_pole_shove"), #pole defend nudge (eq, ":anim_upper_victim", "anim_nudge_shove"), #1h defend nudge (assign, ":stop_nudge", 1), (call_script, "script_crpg_rabbit_play_anim", 18, ":nudging_agent_id", 0),#long stagger for nudger (else_try), (eq, ":weapon_type", itp_type_one_handed_wpn), #only for shieldless 1h (is_between, ":anim_lower_victim", "anim_prepare_kick_0", "anim_run_forward"), #kicking (call_script, "script_crpg_rabbit_play_anim", 9, ":nudgeable_agent_id", 1), #knockdown for kicker #(call_script, "script_crpg_rabbit_ball_sound", 5, 2), #(play_sound_at_position, "snd_player_hit_by_arrow", pos25), (agent_play_sound, ":nudging_agent_id", "snd_body_fall_big"), (agent_play_sound, ":nudgeable_agent_id", "snd_body_fall_big"), (val_clamp, ":offhand_punch_damage", 0, 25), (try_begin), (eq, ":victim_status", 1),#enemy is defending (assign, ":offhand_punch_damage", 1),#(almost)no damage (try_end), (agent_deliver_damage_to_agent, ":nudging_agent_id", ":nudgeable_agent_id", ":offhand_punch_damage"), (else_try), (try_begin), (eq, ":victim_status", 1),#is defending (call_script, "script_crpg_rabbit_play_anim", 24, ":nudgeable_agent_id", 0),#very short stagger (else_try), (eq, ":victim_status", 2),#is attacking (call_script, "script_crpg_rabbit_play_anim", 25, ":nudgeable_agent_id", 0),#med short stagger (else_try), (call_script, "script_crpg_rabbit_play_anim", 12, ":nudgeable_agent_id", 0),#med short (try_end), #(call_script, "script_crpg_rabbit_ball_sound", 5, 3), #(play_sound_at_position, "snd_blunt_hit", pos25), (agent_play_sound, ":nudging_agent_id", "snd_blunt_hit"), (agent_play_sound, ":nudgeable_agent_id", "snd_blunt_hit"), (val_clamp, ":offhand_punch_damage", 0, 15), (try_begin), (eq, ":victim_status", 1),#enemy is defending (assign, ":offhand_punch_damage", 1),#(almost)no damage (try_end), (agent_deliver_damage_to_agent, ":nudging_agent_id", ":nudgeable_agent_id", ":offhand_punch_damage"), (try_end), (try_end), (try_end), (break_loop), (try_end), (try_end), (try_end), ]),