SystemK v2.03: Bunker Buster #18
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/accesory-shot"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bunker Buster
The Bunker Buster is an accessory-switch weapon that turns the player it hits into a bomb. The shooter fires a White Dubuque IR tag. The device it hits broadcasts a BLE splash to everyone nearby, then takes its own direct damage. It is a new accessory mode, joining the BLE Bomb. Both weapons draw from the same special-weapon charges and share one cooldown.
Related PRs:
Gameplay behavior
A hit sets off the splash before it applies the direct damage, so the target splashes even when the hit tags it out.
AUDIO_PLAY_BONKand nothing is fired.Splash_Damage, shown in white.Bunker_Buster_Direct_Damagehealth.Splash_Damage, filtered by team and RSSI (see Protocol). Receiving a splash never starts another splash, so there are no chain reactions.A Dubuque Protocol tag can't say who fired it, so White hits every team. To keep the shooter from busting itself, it ignores White tags for
OWN_TAG_REFLECTION_WINDOW_in_ms(1000 ms) after firing one.Compared with the BLE Bomb: the Bomb splashes directly from the shooter's position, in yellow, with no IR. The Bunker Buster needs line-of-sight, then splashes from the target's position.
Settings
Accessory_ModeBunker_Buster_Direct_DamageSplash_DamageSplash_Min_RSSISplash_Target_TeamsT_Special_Weapon_Cooldown_in_msSplash_HopsN_Special_Weapons_On_ReentryThe splash settings that apply are the ones on the hit device, since it originates the splash. Only devices set to Bunker Buster react to a White tag.
Protocol
The IR side is an ordinary Dubuque tag (team White, color White, damage 0). The splash is a broadcast BLE TAG packet whose splash fields sit in bytes 26-30, which were unused before.
0xFF(legacy)splash_target_teamssplash_min_rssihops_remainingsplash_ID0xFFFF: noneBLE_Splash_Tracker); legacy TAGs by sender and event number.hops_remaining - 1. Devices in every Playing substate relay it, whether or not it affected them. A relay heard while a splash is on the air waits in a one-slot queue.SPLASH_MAX_HOPS(5) to prevent relay storms.Relaying applies to every TAG, so a Medic's targeted heal can also travel beyond its sender's range.
SystemK implementation
The tag is prepared once at game start, fired from the Interacting substate, and recognized by the address of the prepared tag when
KEVENT_TAG_SENTcomes back.Game/Accessory.hAccessoryMode_T(Off / BLE Bomb / Bunker Buster),SplashTargetTeams_T,SPLASH_MAX_HOPSGame/Game.h,Game/Game.cGAME_Build_Bunker_Buster_Tag_Packet(),GAME_Prepared_Bunker_Buster_Tag, and a weakPrepare_Special_Tag()that returnsNULLIR/IR_HW_Interface.hPrepare_Special_Tag(): prepares a second tag in separate storage so the regular shot stays validState_Starting_Game__Counting_Down.cNULLif the platform can'tState_Playing__Interacting.cHandleAccessoryWeapon()fires it;HandleBunkerBusterHit()splashes then applies damage;KEVENT_TAG_SENTskips the holdoff and shot count for itState_Playing.c,BLE/BLE_Packets.*,BLE/BLE_Splash_Tracker.*Settings/Settings.csv,State_Configuring.cTests/Tests/test_accessory_splash.cPorting note: a host platform gets the Bunker Buster only by implementing
Prepare_Special_Tag(). Without it the weak default returnsNULLand the accessory switch bonks.Hardware coverage comes from six HIL tests in
KTag-HIL-Tester/components/Tests/Test_Bunker_Buster.c.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.