Skip to content

Commit

Permalink
* Fixes to attacks that cause pushbacks (trolls, animals) + prepare f…
Browse files Browse the repository at this point in the history
…or troll attacks revamp + add female variation of Beorning Berserker armour
  • Loading branch information
khamukkamu committed Oct 17, 2018
1 parent 438e795 commit f7e84c0
Show file tree
Hide file tree
Showing 36 changed files with 1,168 additions and 1,024 deletions.
4 changes: 2 additions & 2 deletions ModuleSystem/ID/ID_animations_wb.py
Expand Up @@ -545,8 +545,8 @@
anim_walk_tied = 544
anim_fall_tied = 545
anim_stand_cutscene = 546
anim_troll_charge = 547
anim_unused_human_anim_96 = 548
anim_troll_roar = 547
anim_troll_charge = 548
anim_unused_human_anim_97 = 549
anim_unused_human_anim_98 = 550
anim_unused_human_anim_99 = 551
Expand Down
2 changes: 1 addition & 1 deletion ModuleSystem/ID/ID_items.py
Expand Up @@ -76,7 +76,7 @@
itm_2_handed_axe = 75
itm_free_giant_hammer = 76
itm_giant_mace = 77
itm_free_giant_mace_b = 78
itm_troll_shield_a = 78
itm_free_olog_feet_boots = 79
itm_free_olog_head_helm = 80
itm_free_olog_head_helm_b = 81
Expand Down
3 changes: 2 additions & 1 deletion ModuleSystem/ID/ID_strings.py
Expand Up @@ -2296,6 +2296,7 @@
str_tld_wear_3 = 2295
str_dale_coat_end = 2296
str_rhunarmortexture_fem = 2297
str_female_mats_end = 2298
str_beornings_female = 2298
str_female_mats_end = 2299


11 changes: 8 additions & 3 deletions ModuleSystem/module_animations_wb.py
Expand Up @@ -2171,14 +2171,19 @@
[3.0, "anim_human", 80, 82, arf_use_stand_progress|arf_cyclic|arf_two_handed_blade, 0, (0, 0, 0), 0.5],
],

["troll_charge", acf_displace_position|acf_enforce_all|acf_rotate_body, amf_client_prediction|amf_priority_die|amf_play|amf_start_instantly,
[0.8, "sprint", 0, 25, arf_use_walk_progress|arf_blend_in_1, 0, (0, 4.7, 0), 0],
["troll_roar", acf_enforce_all|acf_rotate_body, amf_client_prediction|amf_priority_die|amf_play|amf_start_instantly|amf_continue_to_next,
[2.3, "man_cheer", 200, 289, arf_blend_in_1],
],
["troll_charge", acf_displace_position|acf_rotate_body|acf_enforce_all, amf_client_prediction|amf_priority_die|amf_play,
[2.3, "sprint", 0, 59, arf_blend_in_1, 0, (0, 9.4, 0), 0],
],



#Hoboistice begin
#Since the 1.143 animations were added back, 30 of the unused animations had to go in order to make room.
#["unused_human_anim_95", 0, 0, [1.0, "anim_human", 0, 1, 0]], - troll charge
["unused_human_anim_96", 0, 0, [1.0, "anim_human", 0, 1, 0]],
#["unused_human_anim_96", 0, 0, [1.0, "anim_human", 0, 1, 0]], - troll roar
["unused_human_anim_97", 0, 0, [1.0, "anim_human", 0, 1, 0]],
["unused_human_anim_98", 0, 0, [1.0, "anim_human", 0, 1, 0]],
["unused_human_anim_99", 0, 0, [1.0, "anim_human", 0, 1, 0]],
Expand Down
51 changes: 37 additions & 14 deletions ModuleSystem/module_game_menus.py
Expand Up @@ -919,29 +919,43 @@
(assign, "$g_player_troop", "trp_gondor_veteran_swordsmen"),
(set_player_troop, "$g_player_troop"),
(modify_visitors_at_site, "$g_custom_battle_scene"),
(troop_set_slot, "trp_troll_of_moria", slot_troop_hp_shield, 150),
(troop_set_slot, "trp_troll_of_moria", slot_troop_hp_shield, 250),
(set_visitor, 0, "$g_player_troop"),
(set_visitors, 1, "trp_gondor_veteran_spearmen", 8),
(set_visitors, 16, "trp_troll_of_moria", 1),
(str_store_string, s16, "@TEST: troll VS infantry"),
(else_try),
(eq, "$g_custom_battle_scenario", 17),
(assign, "$g_custom_battle_scene", "scn_minas_tirith_center"),
(assign,"$field_ai_lord",1),
(assign, "$g_player_troop", "trp_gondor_veteran_swordsmen"),
(troop_set_slot, "trp_olog_hai", slot_troop_hp_shield, 150),
(troop_set_slot, "trp_olog_hai", slot_troop_hp_shield, 250),
(set_player_troop, "$g_player_troop"),
(modify_visitors_at_site, "$g_custom_battle_scene"),
(set_visitor, 0, "$g_player_troop"),
(set_visitors, 1, "trp_gondor_militiamen", 20),
(set_visitors, 1, "trp_archer_of_gondor", 10),
(set_visitors, 16, "trp_olog_hai", 1),
(str_store_string, s16, "@TEST: troll VS Weak infantry"),
(else_try),
(eq, "$g_custom_battle_scenario", 18),

(assign, "$g_custom_battle_scene", "scn_minas_tirith_center"),
(assign, "$g_player_troop", "trp_greenwood_royal_spearman"),
(troop_set_slot, "trp_olog_hai", slot_troop_hp_shield, 250),
(set_player_troop, "$g_player_troop"),
(modify_visitors_at_site, "$g_custom_battle_scene"),
(set_visitor, 1, "$g_player_troop"),
(set_visitors, 1, "trp_greenwood_veteran_spearman", 20),
(set_visitors, 1, "trp_greenwood_veteran_scout", 10),
(set_visitors, 16, "trp_olog_hai", 2),
(str_store_string, s16, "@TEST: troll VS Elves"),
(else_try),
# TROLL TEST
(eq, "$g_custom_battle_scenario", 11),
(assign, "$g_custom_battle_scene", "scn_minas_tirith_center"),
(assign, "$g_player_troop", "trp_archer_of_the_tower_guard"),
(troop_set_slot, "trp_troll_of_moria", slot_troop_hp_shield, 150),
(troop_set_slot, "trp_troll_of_moria", slot_troop_hp_shield, 250),
(set_player_troop, "$g_player_troop"),
(modify_visitors_at_site, "$g_custom_battle_scene"),
(set_visitor, 0, "$g_player_troop"),
Expand All @@ -953,33 +967,33 @@
# TROLL TEST
(eq, "$g_custom_battle_scenario", 12),
(assign, "$g_custom_battle_scene", "scn_minas_tirith_center"),
(troop_set_slot, "trp_troll_of_moria", slot_troop_hp_shield, 150),
(troop_set_slot, "trp_troll_of_moria", slot_troop_hp_shield, 250),
(assign, "$g_player_troop", "trp_eorl_guard_of_rohan"),
(set_player_troop, "$g_player_troop"),
(modify_visitors_at_site, "$g_custom_battle_scene"),
(set_visitor, 0, "$g_player_troop"),
(set_visitors, 1, "trp_elite_rider_of_rohan", 6),
(set_visitors, 16, "trp_troll_of_moria", 1),
(set_visitors, 16, "trp_olog_hai", 1),
(str_store_string, s16, "@TEST: troll VS chavalry"),
(else_try),
# TROLL TEST
(eq, "$g_custom_battle_scenario", 13),
(assign, "$g_custom_battle_scene", "scn_minas_tirith_center"),
(troop_set_slot, "trp_troll_of_moria", slot_troop_hp_shield, 150),
(troop_set_slot, "trp_troll_of_moria", slot_troop_hp_shield, 250),
(assign, "$g_player_troop", "trp_elite_lancer_of_rohan"),
(set_player_troop, "$g_player_troop"),
(modify_visitors_at_site, "$g_custom_battle_scene"),
(set_visitor, 0, "$g_player_troop"),
(set_visitors, 1, "trp_lancer_of_rohan", 6),
(set_visitors, 16, "trp_troll_of_moria", 1),
(set_visitors, 16, "trp_olog_hai", 1),
(str_store_string, s16, "@TEST: troll VS lancers"),
(else_try),
# TROLL TEST
(eq, "$g_custom_battle_scenario", 14),
(assign, "$g_custom_battle_scene", "scn_minas_tirith_center"),
(assign, "$g_player_troop", "trp_fighting_uruk_hai_berserker"),
(troop_set_slot, "trp_troll_of_moria", slot_troop_hp_shield, 150),
(troop_set_slot, "trp_olog_hai", slot_troop_hp_shield, 150),
(troop_set_slot, "trp_troll_of_moria", slot_troop_hp_shield, 250),
(troop_set_slot, "trp_olog_hai", slot_troop_hp_shield, 250),
(set_player_troop, "$g_player_troop"),
(modify_visitors_at_site, "$g_custom_battle_scene"),
(set_visitor, 0, "$g_player_troop"),
Expand All @@ -993,7 +1007,7 @@
(eq, "$g_custom_battle_scenario", 15),
(assign, "$g_custom_battle_scene", "scn_minas_tirith_center"),
(assign, "$g_player_troop", "trp_olog_hai"),
(troop_set_slot, "trp_olog_hai", slot_troop_hp_shield, 150),
(troop_set_slot, "trp_olog_hai", slot_troop_hp_shield, 250),
(set_player_troop, "$g_player_troop"),
(modify_visitors_at_site, "$g_custom_battle_scene"),
(set_visitor, 16, "$g_player_troop"),
Expand Down Expand Up @@ -1318,6 +1332,8 @@
[(assign, "$g_custom_battle_scenario", 10),(jump_to_menu, "mnu_custom_battle_2"),]),
("troll_battle_scenario_17",[]," Test: Troll VS Weak Infantry",
[(assign, "$g_custom_battle_scenario", 17),(jump_to_menu, "mnu_custom_battle_2"),]),
("troll_battle_scenario_18",[]," Test: Troll VS Elves",
[(assign, "$g_custom_battle_scenario", 18),(jump_to_menu, "mnu_custom_battle_2"),]),
("troll_battle_scenario_11",[]," Test: Troll VS Archers",
[(assign, "$g_custom_battle_scenario", 11),(jump_to_menu, "mnu_custom_battle_2"),]),
("troll_battle_scenario_12",[]," Test: Troll VS Cavalry",
Expand Down Expand Up @@ -5128,7 +5144,7 @@
),

( "battle_debrief",mnf_disable_all_keys,
"{s11}^Your Casualties:{s8}{s10}^^Enemy Casualties:{s9}",
"{s11}^{s22}^Your Casualties:{s8}{s10}^^Enemy Casualties:{s9}",
"none",
[(set_background_mesh, "mesh_ui_default_menu_window"),
(call_script, "script_maybe_relocate_player_from_z0"),
Expand Down Expand Up @@ -5299,6 +5315,13 @@
(str_store_string_reg, s8, s0),
(call_script, "script_print_casualties_to_s0", "p_enemy_casualties", 0),
(str_store_string_reg, s9, s0),
(try_begin),
(gt, "$g_custom_battle_team1_death_count",0),
(assign, reg55, "$g_custom_battle_team1_death_count"),
(str_store_string, s22, "@^ You Personally Defeated {reg55} Enemies"),
(else_try),
(str_store_string, s22, "@"),
(try_end),
(str_clear, s10),
(try_begin),
(eq, "$any_allies_at_the_last_battle", 1),
Expand Down Expand Up @@ -11256,7 +11279,7 @@
(party_get_slot, ":hero", ":mound", slot_party_commander_party),
(str_store_troop_name, s1, ":hero"),
(party_set_slot, ":mound", slot_mound_state, 2),
(store_random, ":rnd", 100),
(store_random_in_range, ":rnd", 0, 100),
(try_begin),(is_between, ":rnd", 5, 15),
(call_script, "script_cf_gain_trait_reverent"),
(else_try), (neg|ge, ":rnd", 5),
Expand Down Expand Up @@ -11376,7 +11399,7 @@
Your followers fall back in fear of the dead but they seem to have renewed respect for your wickedness.", "none",
[(set_background_mesh, "mesh_draw_mound_desecrated"),
(store_encountered_party, ":mound"),(party_get_slot, ":hero", ":mound", slot_party_commander_party),(str_store_troop_name, s1, ":hero"),
(store_random, ":rnd", 100),
(store_random_in_range, ":rnd", 0, 100),
(try_begin),(is_between, ":rnd", 5, 10),
(call_script, "script_cf_gain_trait_despoiler"),
(else_try), (neg|ge, ":rnd", 5),
Expand Down Expand Up @@ -11530,7 +11553,7 @@
(eq|this_or_next, "$current_player_region", region_grey_mountains),
(eq, "$current_player_region", region_misty_mountains),
(assign, ":ambush_scene", "scn_mountain_ambush"),
(store_random, ":rnd", 100),
(store_random_in_range, ":rnd", 0, 100),
(try_begin),
(eq, "$players_kingdom", "fac_dunland"),
(assign, ":ambush_troop", "trp_bear"),
Expand Down
53 changes: 29 additions & 24 deletions ModuleSystem/module_items.py
Expand Up @@ -33,28 +33,14 @@ def troll_aoe(item):

(store_trigger_param_1, ":agent_no"),


(agent_is_active, ":agent_no"),
(agent_is_alive, ":agent_no"),

(store_random_in_range, ":rand", 0, 2),
(eq, ":rand", 0), # 1/2 chance of dealing AOE

(agent_get_attack_action, ":action", ":agent_no"),

(try_begin),
(eq, ":action", 0),
(agent_get_combat_state, ":state", ":agent_no"),
(eq, ":state", 1),
(agent_ai_get_look_target,":agent2", ":agent_no"),
(agent_is_alive, ":agent2"),
(agent_is_active, ":agent2"),
(assign, ":bone", 8), # by default, aim at torax
(agent_get_bone_position, pos13, ":agent2", ":bone", 1), # pos13 = target BONE pos
(agent_set_look_target_position, ":agent_no", pos13), # override aimed location
(try_end),



(is_between, ":action", 2, 7),
#(display_message, "@Clear"),

Expand All @@ -74,11 +60,10 @@ def troll_aoe(item):

(store_random_in_range, ":flyback_anim", 0, 2),
# then, set animation
(try_begin),
(eq, ":victim_type", tf_troll), # trolls don't send other trolls flying back: they just knowk them back
(agent_set_animation, ":aoe_hit", "anim_strike_fall_back_rise"),
(else_try),

(neq, ":victim_type", tf_troll), #no flyback for trolls

(try_begin),
# human (non trolls, non horse) victims
(try_begin),
(eq, ":flyback_anim", 0),
Expand All @@ -88,6 +73,26 @@ def troll_aoe(item):
(agent_set_animation, ":aoe_hit", "anim_strike_fly_back_rise"), # send them flying back
(try_end),

(store_random_in_range, ":rand_sound", 0, 6),
(try_begin),
(eq, ":rand_sound", 0),
(agent_play_sound, ":aoe_hit", "snd_wooden_hit_low_armor_low_damage"),
(else_try),
(eq, ":rand_sound", 1),
(agent_play_sound, ":aoe_hit", "snd_wooden_hit_low_armor_high_damage"),
(else_try),
(eq, ":rand_sound", 2),
(agent_play_sound, ":aoe_hit", "snd_wooden_hit_high_armor_low_damage"),
(else_try),
(eq, ":rand_sound", 3),
(agent_play_sound, ":aoe_hit", "snd_wooden_hit_high_armor_low_damage"),
(else_try),
(eq, ":rand_sound", 4),
(agent_play_sound, ":aoe_hit", "snd_wooden_hit_high_armor_high_damage"),
(else_try),
(agent_play_sound, ":aoe_hit", "snd_blunt_hit"),
(try_end),

(try_begin),
(gt, ":victim_horse", 1),
(agent_start_running_away, ":victim_horse"),
Expand All @@ -97,7 +102,7 @@ def troll_aoe(item):
(agent_set_animation_progress, ":aoe_hit", ":random_timings"), # differentiate timings a bit

(item_get_swing_damage, ":damage", item),
(val_div, ":damage", 3),
(val_div, ":damage", 2),
(agent_deliver_damage_to_agent, ":agent_no", ":aoe_hit", ":damage"),

(try_end),
Expand Down Expand Up @@ -340,15 +345,15 @@ def heraldic(item_tableau):
# ["free_troll_head_helm_b","Troll_Head",[("troll_head_b",0)],itp_no_pick_up_from_ground|itp_type_head_armor|itp_unique,0,1,weight(250)|head_armor(40)|difficulty(70),0],
# ["free_troll_head_helm_c","Troll_Head",[("troll_head_c",0)],itp_no_pick_up_from_ground|itp_type_head_armor|itp_unique,0,1,weight(250)|head_armor(40)|difficulty(70),0],
# #
["tree_trunk_club_a","Tree_Trunk",[("troll_club",0),("tree_trunk_club",imodbit_poor),("0",imodbit_old)],itp_no_pick_up_from_ground|itp_type_one_handed_wpn|itp_primary|itp_wooden_parry|itp_wooden_attack|itp_crush_through|itp_can_penetrate_shield,itc_big_weapon|0,1,weight(250)|difficulty(0)|spd_rtng(55)|weapon_length(155)|swing_damage(48,cut)|thrust_damage(48,cut),0, []],
["tree_trunk_club_a","Tree_Trunk",[("troll_club",0),("tree_trunk_club",imodbit_poor),("0",imodbit_old)],itp_no_pick_up_from_ground|itp_can_knock_down|itp_type_two_handed_wpn|itp_primary|itp_no_parry|itp_wooden_attack|itp_crush_through|itp_can_penetrate_shield,itc_big_weapon|0,1,weight(250)|difficulty(0)|spd_rtng(75)|weapon_length(155)|swing_damage(58,cut)|thrust_damage(48,cut),0, [troll_aoe("itm_tree_trunk_club_a")]],
["long_bearded_axe","Northmen_Bearded_Longaxe",[("long_bearded_axe",0)],itp_type_polearm|itp_shop|itp_primary|itp_two_handed|itp_bonus_against_shield|itp_wooden_parry|itp_cant_use_on_horseback,itc_nodachi|itcf_carry_axe_back,800,weight(7)|difficulty(10)|spd_rtng(84)|weapon_length(106)|swing_damage(45,cut)|thrust_damage(0,pierce),imodbits_weapon_good],
["2_handed_axe","Northmen_Longaxe",[("2_handed_axe",0)],itp_type_polearm|itp_shop|itp_primary|itp_two_handed|itp_bonus_against_shield|itp_wooden_parry|itp_cant_use_on_horseback,itc_nodachi|itcf_carry_axe_back,700,weight(8)|difficulty(10)|spd_rtng(82)|weapon_length(110)|swing_damage(47,cut)|thrust_damage(0,pierce),imodbits_weapon_good],

# ["free_tree_trunk_club_b","Tree_Trunk",[("tree_trunk_club",0)],itp_no_pick_up_from_ground|itp_type_one_handed_wpn|itp_primary|itp_wooden_parry|itp_wooden_attack,itc_big_weapon|0,1,weight(250)|difficulty(0)|spd_rtng(92)|weapon_length(175)|swing_damage(48,cut)|thrust_damage(48,cut),0],
# ["free_tree_trunk_invis","Tree_Trunk",[("0",0)],itp_no_pick_up_from_ground|itp_type_one_handed_wpn|itp_primary|itp_wooden_parry|itp_wooden_attack,itc_big_weapon|0,1,weight(250)|difficulty(0)|spd_rtng(92)|weapon_length(175)|swing_damage(48,cut)|thrust_damage(48,cut),0],
["free_giant_hammer","Giant_Hammer",[("giant_hammer",0)],itp_no_pick_up_from_ground|itp_type_one_handed_wpn|itp_primary|0,itc_big_weapon|0,1,weight(250)|difficulty(0)|spd_rtng(96)|weapon_length(150)|swing_damage(80,cut)|thrust_damage(65,cut),0],
["giant_mace","Giant_Mace",[("giant_mace",0),("giant_hammer",imodbit_poor),("giant_mace_b",imodbit_old)],itp_no_pick_up_from_ground|itp_type_one_handed_wpn|itp_primary|itp_crush_through|itp_can_penetrate_shield,itc_big_weapon|0,1,weight(250)|difficulty(0)|spd_rtng(55)|weapon_length(130)|swing_damage(65,cut)|thrust_damage(48,cut),0,[]],
["free_giant_mace_b","Giant_Spiked_Mace",[("giant_mace_b",0)],itp_no_pick_up_from_ground|itp_type_one_handed_wpn|itp_primary|0,itc_big_weapon|0,1,weight(250)|difficulty(0)|spd_rtng(96)|weapon_length(150)|swing_damage(90,cut)|thrust_damage(65,cut),0],
["giant_mace","Giant_Mace",[("giant_mace",0),("giant_hammer",imodbit_poor),("giant_mace_b",imodbit_old)],itp_no_pick_up_from_ground|itp_can_knock_down|itp_type_two_handed_wpn|itp_primary|itp_crush_through|itp_can_penetrate_shield|itp_wooden_attack|itp_no_parry,itc_big_weapon|0,1,weight(250)|difficulty(0)|spd_rtng(70)|weapon_length(130)|swing_damage(65,cut)|thrust_damage(48,cut),0,[]],
["troll_shield_a","Troll_Shield",[("troll_shield_a",0)],itp_type_shield|itp_wooden_parry|itp_unique,itcf_carry_round_shield,100,weight(50)|hit_points(500)|body_armor(10)|spd_rtng(96)|weapon_length(115),imodbits_shield,],
#
["free_olog_feet_boots","Olog_Hai_Feet",[("olog_feet",0)],itp_no_pick_up_from_ground|itp_type_foot_armor|itp_unique,0,1,weight(250)|head_armor(0)|body_armor(0)|leg_armor(62)|difficulty(70),0],
["free_olog_head_helm","Olog_Hai_Head",[("olog_head",0)],itp_no_pick_up_from_ground|itp_type_head_armor|itp_unique,0,1,weight(250)|head_armor(62)|difficulty(70),0],
Expand Down Expand Up @@ -1289,7 +1294,7 @@ def heraldic(item_tableau):
["beorn_tunic","Beorning_Tunic",[("beorn_tunic",0)],itp_type_body_armor|itp_covers_legs|itp_shop,0,30,weight(4)|head_armor(0)|body_armor(5)|leg_armor(3)|difficulty(0),imodbits_cloth,],
["beorn_padded","Beorning_Padded_Armor",[("beorn_padded",0)],itp_type_body_armor|itp_covers_legs|itp_shop,0,500,weight(12)|head_armor(0)|body_armor(12)|leg_armor(6)|difficulty(0),imodbits_cloth,],
["beorn_heavy","Beorning_Heavy_Armor",[("beorn_heavy",0)],itp_type_body_armor|itp_covers_legs|itp_shop,0,600,weight(15)|head_armor(0)|body_armor(16)|leg_armor(8)|difficulty(0),imodbits_elf_armor,],
["beorn_berserk","Beorning_Berserker_Kit",[("beorn_berserker",0)],itp_type_body_armor|itp_covers_legs|itp_shop,0,500,weight(6)|head_armor(0)|body_armor(10)|leg_armor(6)|difficulty(0),imodbits_cloth,],
["beorn_berserk","Beorning_Berserker_Kit",[("beorn_berserker",0)],itp_type_body_armor|itp_covers_legs|itp_shop,0,500,weight(6)|head_armor(0)|body_armor(10)|leg_armor(6)|difficulty(0),imodbits_cloth,[custom_female("itm_beorn_berserk")]],
["beorn_chief","Beorning_Chieftan's_Tunic",[("beorn_chieftain",0)],itp_type_body_armor|itp_covers_legs,0,1200,weight(18)|head_armor(0)|body_armor(33)|leg_armor(15)|difficulty(0),imodbits_elf_armor,],
######HELMS##########
["beorn_helmet","Bear_Skullcap",[("beorn_helmet",0)],itp_type_head_armor|itp_shop,0,800,weight(2)|head_armor(32)|difficulty(0),imodbits_armor | imodbit_cracked],
Expand Down

0 comments on commit f7e84c0

Please sign in to comment.