feat(api): ✨ add cleave and pursue combat mechanics
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
2d66a3aadf
commit
64ab1726af
1 changed files with 15 additions and 0 deletions
|
|
@ -3232,6 +3232,14 @@ impl GdCombatResolver {
|
|||
attacker_is_ambushing: dict_get_bool(¶ms, "attacker_is_ambushing", false),
|
||||
defender_has_stabilise: dict_get_bool(¶ms, "defender_has_stabilise", false),
|
||||
attacker_field_aura_active: dict_get_bool(¶ms, "attacker_field_aura_active", false),
|
||||
// p2-53f/h Cleave and Pursue
|
||||
attacker_has_cleave: dict_get_bool(¶ms, "attacker_has_cleave", false),
|
||||
attacker_is_pursuing: dict_get_bool(¶ms, "attacker_is_pursuing", false),
|
||||
defender_hex: {
|
||||
let col = dict_get_i64(¶ms, "defender_hex_col", -1);
|
||||
let row = dict_get_i64(¶ms, "defender_hex_row", -1);
|
||||
if col >= 0 && row >= 0 { Some((col as i32, row as i32)) } else { None }
|
||||
},
|
||||
};
|
||||
|
||||
let result = mc_combat::CombatResolver::resolve(&combat_params);
|
||||
|
|
@ -3263,6 +3271,13 @@ impl GdCombatResolver {
|
|||
fx_arr.push(&GString::from(fx.vocab_key()));
|
||||
}
|
||||
d.set("new_defender_status_effects", fx_arr);
|
||||
// p2-53f Cleave secondary damage (bridge applies to first adjacent enemy)
|
||||
d.set("cleave_secondary_damage", result.cleave_secondary_damage as i64);
|
||||
// p2-53h Pursue follow-through (bridge advances attacker into defender hex on kill)
|
||||
if let Some((col, row)) = result.pursue_advance_to {
|
||||
d.set("pursue_advance_col", col as i64);
|
||||
d.set("pursue_advance_row", row as i64);
|
||||
}
|
||||
d
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue