aboutsummaryrefslogtreecommitdiff
path: root/crates/fparkan-runtime/src/clan_script_init.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/fparkan-runtime/src/clan_script_init.rs')
-rw-r--r--crates/fparkan-runtime/src/clan_script_init.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/crates/fparkan-runtime/src/clan_script_init.rs b/crates/fparkan-runtime/src/clan_script_init.rs
index fedc8ee9..3e102be3 100644
--- a/crates/fparkan-runtime/src/clan_script_init.rs
+++ b/crates/fparkan-runtime/src/clan_script_init.rs
@@ -5,6 +5,10 @@ use fparkan_script::{
pub(super) enum InitOrder {
Patrol(ScriptPatrol),
+ Attack {
+ id: u32,
+ target: u32,
+ },
Move {
id: u32,
destination: [u32; 2],
@@ -46,6 +50,14 @@ pub(super) fn unit_order(
let order = declarations
.resolve_handler15_with_values(instruction, values)
.ok()?;
+ if let (3, 3, Handler15TargetPayload::ByLogicId(target)) =
+ (order.word_1, order.word_2, order.target)
+ {
+ return Some(InitOrder::Attack {
+ id: order.word_0,
+ target,
+ });
+ }
if let (2, insertion @ (1 | 3), Handler15TargetPayload::ByPlace { first, second }) =
(order.word_1, order.word_2, order.target)
{