func before_each(): add_child_autoqfree(SpecFactory.ChoiceBusResponder.new()) # give immediate response for choices game = add_child_autoqfree(SpecFactory.create_gamemaster()) unit = SpecFactory.create_unit(game.map) target = SpecFactory.create_unit(game.map) # will be moved to wherever we're attacking func subject(weapon_id:String, target_tile:Vector2i) -> void: unit.core.equip_system(weapon_id) gear = unit.core.loadout.get_by_compcon_id(weapon_id) var action:Action = gear.kit.get_action(weapon_id) assert_not_null(action, 'Has the attack action for %s.' % weapon_id) target.core.full_repair() UnitTile.move_to(target, target_tile) await X.execute_event('event_gear_activate', { action = action, unit = unit, gear = gear, target_tiles = [target_tile] })
https://xoxo-media.sfo2.cdn.digitaloceanspaces.com/media_attachments/files/112/447/454/919/782/078/original/8f937e2a7fd42f72.png