Skip to content

Commit

Permalink
* Changes to how mounted units damage Trolls + added Salto anim when …
Browse files Browse the repository at this point in the history
…knocked back + added new troll pushback anim (not yet coded in) + other changes to troll attacks / damage behaviour
  • Loading branch information
khamukkamu committed Dec 17, 2018
1 parent 9c5cfe5 commit 3457932
Show file tree
Hide file tree
Showing 18 changed files with 835 additions and 781 deletions.
1 change: 1 addition & 0 deletions ModuleSystem/module_animations_wb.py
Expand Up @@ -2002,6 +2002,7 @@
],
["strike_fly_back_rise", acf_enforce_all|acf_align_with_ground|acf_displace_position, amf_priority_fall_from_horse|amf_play|amf_accurate_body|amf_restart|amf_client_prediction,
[2.09, "ani_fall_flyback1_med_rise", 0, 53, arf_blend_in_2|arf_make_custom_sound, pack2f(0.4, 0.0), ( 0.19, -2.7 ,0), 0.5],
[2.09, "human_salto_hit", 0, 53, arf_blend_in_2|arf_make_custom_sound, pack2f(0.4, 0.0), ( 0.19, -2.7 ,0), 0.5],
[2.214,"ani_fall_flyback1_far_rise", 0, 56, arf_blend_in_2|arf_make_custom_sound, pack2f(0.4, 0.0), ( 0.19, -4.4 ,0), 0.5],
[2.1, "ani_fall_flyback2_med_rise", 0, 49, arf_blend_in_2|arf_make_custom_sound, pack2f(0.4, 0.0), ( 0.933, -2.454,0), 0.5],
[2.1, "ani_fall_flyback2_far_rise", 0, 49, arf_blend_in_2|arf_make_custom_sound, pack2f(0.4, 0.0), ( 0.933, -3.80 ,0), 0.5],
Expand Down
2 changes: 1 addition & 1 deletion ModuleSystem/module_game_menus.py
Expand Up @@ -1127,7 +1127,7 @@
#(modify_visitors_at_site, "$g_custom_battle_scene"),
#(assign, "$g_player_troop", "$testbattle_team_a_troop"),
#(set_player_troop, "$g_player_troop"),
(troop_set_slot, "trp_olog_hai", slot_troop_hp_shield, 200),
(assign, "$g_player_troop", "trp_knight_3_6"),
(set_player_troop, "$g_player_troop"),
(modify_visitors_at_site, "$g_custom_battle_scene"),
Expand Down
51 changes: 44 additions & 7 deletions ModuleSystem/module_mission_templates.py
Expand Up @@ -8934,6 +8934,8 @@
(try_begin),
(eq, "$enemy_reinforcement_stage", 0),
(assign, "$enemy_reinforcement_stage", 1),
(entry_point_get_position, pos0, 4),
(play_sound_at_position, snd_ghost_ambient_long, pos0), #spooky
(else_try),
(entry_point_get_position, pos5, 4),
(position_set_z_to_ground_level, pos5),
Expand All @@ -8958,18 +8960,53 @@
[
]),

(ti_on_agent_killed_or_wounded, 0, 0, [

(ge, "$enemy_reinforcement_stage", 1),

(store_trigger_param_1, ":agent_victim"),
#(store_trigger_param_2, ":agent_killer"),

(agent_is_active, ":agent_victim"),
(agent_is_human, ":agent_victim"),

(agent_get_troop_id, ":troop_id", ":agent_victim"),
(eq, ":troop_id", "trp_dorwinion_spirit"),

],[


(ge, "$enemy_reinforcement_stage", 1),

(store_trigger_param_1, ":agent_victim"),
#(store_trigger_param_2, ":agent_killer"),
(store_trigger_param_3, ":result"),

(agent_is_active, ":agent_victim"),
(agent_is_human, ":agent_victim"),

(agent_get_troop_id, ":troop_id", ":agent_victim"),
(eq, ":troop_id", "trp_dorwinion_spirit"),

(this_or_next|eq, ":result", 0), #killed
(eq, ":result", 1), #or wounded

(agent_get_bone_position, pos33, ":agent_victim", human_thorax, 1), #chest
(particle_system_burst, "psys_dummy_smoke", pos33, 60),

(call_script, "script_find_exit_position_at_pos4", ":agent_victim"),
(agent_set_position, ":agent_victim", pos4),
(remove_agent, ":agent_victim"),

]),

(10, 0, 0, [], [(set_show_messages, 0), (team_give_order, 1, grc_everyone, mordr_charge), (set_show_messages, 1), (get_player_agent_no, ":player"),
(try_for_agents, ":agent"),
(neq, ":agent", ":player"),
(agent_is_alive, ":agent"),
(agent_is_active, ":agent"),
(agent_is_human, ":agent"),
(agent_set_look_target_agent, ":agent", ":player"),
(try_begin),
(ge, "$enemy_reinforcement_stage", 1),
(entry_point_get_position, pos0, 4),
(play_sound_at_position, snd_ghost_ambient_long, pos0, 0), #spooky
(try_end),
(try_end),]),

## Enemy Swarm Triggers:
Expand Down Expand Up @@ -9036,8 +9073,8 @@
(agent_set_team, reg0, 1),
(agent_set_is_alarmed, reg0, 1),
(agent_ai_set_aggressiveness, reg0, 1000),
(agent_set_damage_modifier, reg0, 40),
(store_random_in_range, ":random_location", 600, 1000),
(agent_set_damage_modifier, reg0, 20),
(store_random_in_range, ":random_location", 400, 700),
(try_begin),
(eq, "$enemy_reinforcement_stage", 1),
(lt, ":random_position", 85),
Expand Down
4 changes: 3 additions & 1 deletion ModuleSystem/module_mission_templates_TLD.py
Expand Up @@ -2442,6 +2442,7 @@
(try_begin),
(this_or_next|eq, ":troll_troop_id", "trp_olog_hai"),
(eq, ":troll_troop_id", "trp_armoured_troll"),
(agent_refill_wielded_shield_hit_points, ":troll"),
(agent_unequip_item, ":troll", "itm_troll_shield_a"),
(agent_equip_item, ":troll", "itm_troll_shield_a"), #Moves shield to back
(try_end),
Expand Down Expand Up @@ -2476,7 +2477,7 @@
(ge, ":time", ":knocked_down_time"),
(agent_set_slot, ":troll", slot_agent_knocked_down, 0),
(try_end),

(agent_get_troop_id,":troll_troop_id",":troll"), # is it a troll?
(troop_get_type, ":troll_type", ":troll_troop_id"),
(eq, ":troll_type", tf_troll),
Expand All @@ -2495,6 +2496,7 @@
(this_or_next|eq, ":troop_id", "trp_olog_hai"),
(eq, ":troop_id", "trp_armoured_troll"),
(agent_set_wielded_item, ":troll", "itm_troll_shield_a"),
(agent_refill_wielded_shield_hit_points, ":troll"),
(try_end),
(try_end),

Expand Down
25 changes: 18 additions & 7 deletions ModuleSystem/module_mission_templates_TLD_wb.py
Expand Up @@ -1900,11 +1900,15 @@
(gt, ":current_hp_shield", 0),
(try_begin),
(ge, ":horse", 0),
(val_min, ":damage", 30),
(val_min, ":damage", 50),
(try_end),
(try_begin),
(lt, ":damage", 15),
(assign, ":damage", 0),
(else_try),
(ge, ":damage", 50),
(val_sub, ":damage", 15),
(agent_set_animation, ":agent", "anim_strike3_abdomen_front"),
(else_try),
(val_sub, ":damage", 15),
(try_end),
Expand All @@ -1913,14 +1917,18 @@
(gt, ":current_hp_shield", 0),
(try_begin),
(ge, ":horse", 0),
(val_min, ":damage", 60),
(val_min, ":damage", 80),
(try_end),
(try_begin),
(lt, ":damage", 40),
(assign, ":damage", 0),
(else_try),
(else_try),
(ge, ":damage", 80),
(val_sub, ":damage", 40),
(try_end),
(agent_set_animation, ":agent", "anim_strike3_abdomen_front"),
(else_try),
(val_sub, ":damage", 40),
(try_end),
(try_end),

(try_begin),
Expand All @@ -1940,12 +1948,15 @@

(try_begin),
(eq, ":dealer", ":player"),
(neq, ":troop_id", "trp_nazgul"),
(val_div, ":damage", 2),
(set_trigger_result, ":damage"),
(assign, reg60, ":damage"),
(display_message, "@Delivered {reg60} damage."),
(set_show_messages, 0),
(set_trigger_result, 0),
(else_try),
(set_trigger_result, 0),
(try_end),

(set_show_messages, 1),
])

## Health Restore on Kill Begin - Credit to Windyplains (Kham)
Expand Down
2 changes: 1 addition & 1 deletion ModuleSystem/module_sounds.py
Expand Up @@ -352,7 +352,7 @@

("woman_yell",sf_priority_5|sf_vol_10, ["woman_yell_1.ogg", "woman_yell_2.ogg"]),

("ghost_ambient_long" ,sf_2d|sf_priority_8|sf_vol_3|sf_looping|sf_stream_from_hd, ["ghost_ambient_long02.wav"]),
("ghost_ambient_long" ,sf_2d|sf_priority_15|sf_vol_1|sf_looping, ["ghost_ambient_long02.wav"]),

("bear_strike", sf_priority_6|sf_vol_10, ["warg_howl02.wav", "warg_howl03.wav", "troll_growl.wav",]),
("spider_strike", sf_priority_6|sf_vol_10, ["spider_battle01.wav", "trollSnarl.wav",]),
Expand Down
Binary file modified Resource/tld_animations.brf
Binary file not shown.
3 changes: 2 additions & 1 deletion _wb/actions.txt
Expand Up @@ -1032,8 +1032,9 @@
1.4 man_walk 0 32 805306628 58726 0 0 0 0
strike_fly_back_near_rise 16642 192938065 1
1.7 ani_fall_flyback1_near_rise 0 43 515 102 0.19 -1.6 0 0.5
strike_fly_back_rise 17410 192938065 6
strike_fly_back_rise 17410 192938065 7
2.09 ani_fall_flyback1_med_rise 0 53 515 102 0.19 -2.7 0 0.5
2.09 human_salto_hit 0 53 515 102 0.19 -2.7 0 0.5
2.214 ani_fall_flyback1_far_rise 0 56 515 102 0.19 -4.4 0 0.5
2.1 ani_fall_flyback2_med_rise 0 49 515 102 0.933 -2.454 0 0.5
2.1 ani_fall_flyback2_far_rise 0 49 515 102 0.933 -3.8 0 0.5
Expand Down

0 comments on commit 3457932

Please sign in to comment.