diff --git a/CVARINFO b/CVARINFO index 5adf924..2b305ea 100644 --- a/CVARINFO +++ b/CVARINFO @@ -1,12 +1,49 @@ +// 9mm Boss Rifle +server int boss9mm_boss_spawn_bias = 19; +server int boss9mm_pistol_spawn_bias = 24; +server int boss9mm_smg_spawn_bias = 14; +server bool boss9mm_allowBackpacks = true; +server bool boss9mm_persistent_spawning = false; + +server bool boss9mmmag_allowBackpacks = true; + +// 4mm Boss Rifle +server int boss4mm_boss_spawn_bias = 19; +server int boss4mm_chaingun_spawn_bias = 14; +server bool boss4mm_allowBackpacks = true; +server bool boss4mm_persistent_spawning = false; + +// 12ga Boss Rifle +server int bas_boss_spawn_bias = 19; +server int bas_hunter_spawn_bias = 14; +server int bas_slayer_spawn_bias = 14; +server bool bas_allowBackpacks = true; +server bool bas_persistent_spawning = false; + +// .50 OMG Boss Rifle +server int bog_boss_spawn_bias = 19; +server int bog_plasma_spawn_bias = 24; +server int bog_bfg_spawn_bias = 14; +server bool bog_allowBackpacks = true; +server bool bog_persistent_spawning = false; + +server bool bogmag_allowBackpacks = true; + +// 5mm Boss Rifle +server int boss5mm_boss_spawn_bias = 24; +server int boss5mm_chaingun_spawn_bias = 49; +server bool boss5mm_allowBackpacks = true; +server bool boss5mm_persistent_spawning = false; + // No-scope Boss Rifle server int nsb_boss_spawn_bias = 19; +server bool nsb_allowBackpacks = true; server bool nsb_persistent_spawning = false; -// .50 OMG Boss Rifle -server int bog_plasma_spawn_bias = 19; -server int bog_ssg_spawn_bias = 49; -server int bog_chaingun_spawn_bias = 19; -server bool bog_persistent_spawning = false; +// The Worst Boss Rifle +server int worstBoss_boss_spawn_bias = 99; +server bool worstBoss_allowBackpacks = true; +server bool worstBoss_persistent_spawning = false; // M1 Garand server int hd_garand_ammotype=1; @@ -14,18 +51,15 @@ server int hd_garand_reloadspeed=0; server int hd_garand_reloadcapacity=8; server int gar_shellbox_spawn_bias = 24; +server bool gar_allowBackpacks = true; server bool gar_persistent_spawning = false; -// Bossmerg -server int bas_hunter_spawn_bias = 14; -server bool bas_persistent_spawning = false; - -// Shotbossting -server bool hd_shitbossting_spawn = false; +server bool garmag_allowBackpacks = true; // Dedicated Medical Scanner server int dms_stimpack_bias = 49; server int dms_medikit_bias = 19; +server bool dms_allowBackpacks = true; server bool dms_persistent_spawning = false; // Speed Reloader diff --git a/KEYCONF b/KEYCONF index 53b92ce..3d30229 100644 --- a/KEYCONF +++ b/KEYCONF @@ -1,5 +1,12 @@ -alias nsb_reset_cvars "resetcvar nsb_boss_spawn_bias; resetcvar nsb_persistent_spawning" -alias bog_reset_cvars "resetcvar bog_plasma_spawn_bias; resetcvar bog_ssg_spawn_bias; resetcvar bog_chaingun_spawn_bias; resetcvar bog_persistent_spawning" -alias dms_reset_cvars "resetcvar dms_stimpack_bias; resetcvar dms_medikit_bias; resetcvar dms_persistent_spawning" +alias boss9mm_reset_cvars "resetcvar boss9mm_boss_spawn_bias; resetcvar boss9mm_pistol_spawn_bias; resetcvar boss9mm_smg_spawn_bias; resetcvar boss9mm_allowBackpacks; resetcvar boss9mm_persistent_spawning" +alias boss4mm_reset_cvars "resetcvar boss4mm_boss_spawn_bias; resetcvar boss4mm_chaingun_spawn_bias; resetcvar boss4mm_allowBackpacks; resetcvar boss4mm_persistent_spawning" +alias bas_reset_cvars "resetcvar bas_boss_spawn_bias; resetcvar bas_hunter_spawn_bias; resetcvar bas_slayer_spawn_bias; resetcvar bas_allowBackpacks; resetcvar bas_persistent_spawning" +alias bog_reset_cvars "resetcvar bog_boss_spawn_bias; resetcvar bog_plasma_spawn_bias; resetcvar bog_bfg_spawn_bias; resetcvar bog_allowBackpacks; resetcvar bogmag_allowBackpacks; resetcvar bog_persistent_spawning" +alias boss5mm_reset_cvars "resetcvar boss5mm_boss_spawn_bias; boss5mm_chaingun_spawn_bias; resetcvar boss5mm_allowBackpacks; resetcvar boss5mm_persistent_spawning" +alias nsb_reset_cvars "resetcvar nsb_boss_spawn_bias; resetcvar nsb_allowBackpacks; resetcvar nsb_persistent_spawning" +alias worstBoss_reset_cvars "resetcvar worstBoss_boss_spawn_bias; resetcvar worstBoss_allowBackpacks; resetcvar worstBoss_persistent_spawning" +alias gar_reset_cvars "resetcvar gar_boss_spawn_bias; resetcvar gar_allowBackpacks; resetcvar garmag_allowBackpacks; resetcvar gar_persistent_spawning" -alias Hexa_Reset_Cvars "nsb_reset_cvars; bog_reset_cvars; dms_reset_cvars" \ No newline at end of file +alias dms_reset_cvars "resetcvar dms_stimpack_bias; resetcvar dms_medikit_bias; resetcvar dms_persistent_spawning" + +alias Hexa_Reset_Cvars "boss9mm_reset_cvars; boss4mm_reset_cvars; bas_reset_cvars; bog_reset_cvars; boss5mm_reset_cvars; nsb_reset_cvars; gar_reset_cvars; dms_reset_cvars" \ No newline at end of file diff --git a/LANGUAGE b/LANGUAGE index 8e5d1ad..331341c 100644 --- a/LANGUAGE +++ b/LANGUAGE @@ -5,14 +5,14 @@ HEXA_MENU = "\c[Green]Ⓗ\c- Hexadoken's Legacy Continued"; // Weapon Tags TAG_NSB = "Scopeless Boss Rifle"; -TAG_OMGBOSS = ".50 OMG Boss Rifle"; +TAG_OMGBOSS = "Boss Rifle (.50 OMG)"; TAG_BOSSMERG = "Bossmerg 12 gauge Shotgun"; TAG_GARAND = "M1 Garand"; TAG_ShitbostDummy = "Boss Rifle Variants"; -TAG_HEXAPERSONAL = "HexaDoken's Personal Boss Rifle"; -TAG_4MMBOSS = "Boss Rifle (4mm)"; TAG_9MMBOSS = "Boss Rifle (9mm)"; +TAG_4MMBOSS = "Boss Rifle (4mm)"; +TAG_5MMBOSS = "HexaDoken's Personal Boss Rifle"; TAG_WORSTBOSS = "Boss Rifle But It's The Worst"; // Item Tags @@ -22,26 +22,51 @@ TAG_DMS = "Medical Scanner"; TAG_GARANDCLIP = "M1 Garand clip"; // Menu Titles -TITLE_NSBMENU = "------ Scopeless Boss Rifle Options ------"; -TITLE_BOGRIFLEMENU = "------ .50 OMG Boss Rifle Options ------"; +TITLE_9MMBOSSMENU = "------ 9mm Boss Rifle Options ------"; +TITLE_4MMBOSSMENU = "------ 4.26mm Boss Rifle Options ------"; TITLE_BOSSMERGMENU = "------ Bossmerg 12 gauge Shotgun Options ------"; +TITLE_BOGRIFLEMENU = "------ .50 OMG Boss Rifle Options ------"; +TITLE_5MMBOSSMENU = "------ Hexadoken's 5mm BR Boss Rifle Options ------"; +TITLE_NSBMENU = "------ Scopeless Boss Rifle Options ------"; +TITLE_WORSTMENU = "------ The Worst Boss Rifle Options ------"; TITLE_GARANDMENU = "------ M1 Garand Options ------"; TITLE_DMSMENU = "------ Medical Scanner Options ------"; -// Scopeless Boss -MENU_NSBSPAWNTEXT = "Control the spawn rate of the No-Scope Boss on Boss Rifles"; -MENU_NSBSPAWN = "No-Scope Boss Spawn Rate: "; -MENU_RESETNSBSPAWN = "Reset Boss spawn options"; +// 9mm Boss +MENU_9MMBOSSSPAWNTEXT = "Control the spawn rate of the 9mm Boss on Boss Rifles"; +MENU_9MMBOSSPISTOLTEXT = "Control the spawn rate of the 9mm Boss on Pistols"; +MENU_9MMBOSSSMGTEXT = "Control the spawn rate of the 9mm Boss on SMGs"; +MENU_9MMBOSSSPAWN = "9mm Boss Spawn Rate: "; + +// 4mm Boss +MENU_4MMBOSSSPAWNTEXT = "Control the spawn rate of the 4.26mm Boss on Boss Rifles"; +MENU_4MMBOSSCHAINGUNTEXT = "Control the spawn rate of the 4.26mm Boss on Vulcanettes"; +MENU_4MMBOSSSPAWN = "4.26mm Boss Spawn Rate: "; + +// Bossmerg +MENU_BASSPAWNTEXT = "Control the spawn rate of the Bossmerg on Boss Rifles"; +MENU_BASHUNTERTEXT = "Control the spawn rate of the Bossmerg on Hunters"; +MENU_BASSLAYERTEXT = "Control the spawn rate of the Bossmerg on Slayers"; +MENU_BASSPAWNRATE = "Bossmerg Spawn Rate: "; // .50 OMG Boss +MENU_BOGSPAWNTEXT = "Control the spawn rate of the .50 OMG Boss on Boss Rifles"; MENU_BOGTHUNDERBUSTERTEXT = "Control the spawn rate of the .50 OMG Boss on Thunderbusters"; -MENU_BOGSLAYERTEXT = "Control the spawn rate of the .50 OMG Boss on Slayer shotguns"; -MENU_BOGVULCTEXT = "Control the spawn rate of the .50 OMG Boss on Vulcanettes"; +MENU_BOGBFGTEXT = "Control the spawn rate of the .50 OMG Boss on BFG-9000s"; MENU_BOGSPAWNRATE = ".50 OMG Boss Spawn Rate: "; -// Bossmerg -MENU_BASHUNTER = "Control the spawn rate of the Bossmerg on Hunters"; -MENU_BASSPAWNRATE = "Bossmerg Spawn Rate: "; +// 5mm Boss +MENU_5MMBOSSSPAWNTEXT = "Control the spawn rate of Hexadoken's Personal Boss on Boss Rifles"; +MENU_5MMBOSSCHAINGUNTEXT = "Control the spawn rate of Hexadoken's Personal Boss on Vulcanettes"; +MENU_5MMBOSSSPAWN = "Hexadoken's Personal Boss Spawn Rate: "; + +// Scopeless Boss +MENU_NSBSPAWNTEXT = "Control the spawn rate of the No-Scope Boss on Boss Rifles"; +MENU_NSBSPAWN = "No-Scope Boss Spawn Rate: "; + +// 5mm Boss +MENU_WORSTSPAWNTEXT = "Control the spawn rate of the Worst Boss on Boss Rifles"; +MENU_WORSTSPAWN = "The Worst Boss Spawn Rate: "; // M1 Garand MENU_GARANDLIBERATOR = "Control the spawn rate of the M1 Garand on Liberators"; @@ -59,44 +84,83 @@ MENU_RESETGARANDRELOADERCAPACITY = "Reset Reloader Capacity"; // Medical Scanner MENU_DMSSTIMPACK = "Control the spawn rate of the Medical Scanner on Stimpacks"; MENU_DMSMEDIKIT = "Control the spawn rate of the Medical Scanner on Medikits"; -MENU_DMSSPAWNRATE = "Bossmerg Spawn Rate: "; +MENU_DMSSPAWNRATE = "Medical Scanner Spawn Rate: "; // Various Resets +MENU_RESETPISTOL = "Reset Pistol spawn options"; +MENU_RESETSMG = "Reset SMG spawn options"; +MENU_RESETBOSS = "Reset Boss Rifle spawn options"; MENU_RESETTB = "Reset Thunderbuster spawn options"; MENU_RESETSLAYER = "Reset Slayer spawn options"; MENU_RESETVULC = "Reset Vulcanette spawn options"; MENU_RESETHUNTER = "Reset Hunter spawn options"; +MENU_RESETBFG = "Reset BFG-9000 spawn options"; MENU_RESETLIB = "Reset Liberator spawn options"; MENU_RESETSTIMPACK = "Reset Stimpack spawn options"; MENU_RESETMEDIKIT = "Reset Medikit spawn options"; +// Backpack & Ammo Box Tables +MENU_BACKPACKTEXT = "Control whether to allow this weapon to spawn in Backpacks & Ammo Boxes"; +MENU_9MMBOSSBACKPACK = "Allow 9mm Boss Rifles: "; +MENU_9MMBOSSMAGBACKPACK = "Allow 9mm Clips: "; +MENU_4MMBOSSBACKPACK = "Allow 4mm Boss Rifles: "; +MENU_BASBACKPACK = "Allow Bossmerg Shotguns: "; +MENU_BOGBACKPACK = "Allow .50 OMG Boss Rifles: "; +MENU_BOGMAGBACKPACK = "Allow .50 OMG Clips: "; +MENU_5MMBOSSBACKPACK = "Allow Hexadoken's Personal Boss Rifles: "; +MENU_NSBBACKPACK = "Allow No-Scope Boss Rifles: "; +MENU_WORSTBACKPACK = "Allow the Worst Boss Rifles: "; +MENU_GARANDBACKPACK = "Allow M1 Garands: "; +MENU_GARANDMAGBACKPACK = "Allow M1 Garand Magazines: "; +MENU_DMSBACKPACK = "Allow Medical Scanners: "; + // Persistency MENU_REPLACEAFTERMAPLOAD = "Control whether replacements happen after a mapload."; MENU_PERSISTENCY = "Persistent Spawns: "; MENU_RESETPERSISTENCY = "Reset persistence options"; // Deepest Lore -NSB_LORE1 = "A Boss rifle that has been stripped of its main scope, leaving only its irons left."; -NSB_LORE2 = "Little is known why these rifles have appeared with only irons, especially as they're not easily replaceable."; -NSB_LORE3 = "Some speculate that they're for civilian use while others say that they're for infantry use."; -NSB_LORE4 = "All we can say for certain is that it's still as effective as the regular boss rifle, for better or for worse."; +9MMBOSS_LORE1 = "TODO: Enter Lore."; +9MMBOSS_LORE2 = ""; +9MMBOSS_LORE3 = ""; +9MMBOSS_LORE4 = ""; -BOG_LORE1 = "A Boss rifle that has been rechambered for the .50 OMG Cartridge."; -BOG_LORE2 = "These rifles are usually impractical, though incredibly fun to shoot."; -BOG_LORE3 = "If you do manage to hit your target with this it'll most certainly take some hefty damage,"; -BOG_LORE4 = "though getting the munitions to feed this beast is another ordeal."; +4MMBOSS_LORE1 = "TODO: Enter Lore."; +4MMBOSS_LORE2 = ""; +4MMBOSS_LORE3 = ""; +4MMBOSS_LORE4 = ""; BAS_LORE1 = "What appears to be a boss rifle rechambered to fit 12-Gauge shells."; BAS_LORE2 = "Not much is known where these came from or why they were created in the first place,"; BAS_LORE3 = "Though they most certainly do exist. For better or for worst."; BAS_LORE4 = "If you get one, make sure it's the custom chamber version. These'll gunk up fast..."; +BOG_LORE1 = "A Boss rifle that has been rechambered for the .50 OMG Cartridge."; +BOG_LORE2 = "These rifles are usually impractical, though incredibly fun to shoot."; +BOG_LORE3 = "If you do manage to hit your target with this it'll most certainly take some hefty damage,"; +BOG_LORE4 = "though getting the munitions to feed this beast is another ordeal."; + +NSB_LORE1 = "A Boss rifle that has been stripped of its main scope, leaving only its irons left."; +NSB_LORE2 = "Little is known why these rifles have appeared with only irons, especially as they're not easily replaceable."; +NSB_LORE3 = "Some speculate that they're for civilian use while others say that they're for infantry use."; +NSB_LORE4 = "All we can say for certain is that it's still as effective as the regular boss rifle, for better or for worse."; + +5MMBOSS_LORE1 = "TODO: Enter Lore."; +5MMBOSS_LORE2 = ""; +5MMBOSS_LORE3 = ""; +5MMBOSS_LORE4 = ""; + GARAND_LORE1 = "An old M1 Garand from the early 1X40 times. Some have been recently rechambered to 7.76mm also."; GARAND_LORE2 = "It mostly serves now as an inbetween of the Mk. IV Boss Rifle and the ZM7 Liberator."; GARAND_LORE3 = "The original cartridge it was chambered for of .30-06 hits a hefty punch,"; GARAND_LORE4 = "though its rarity and incompatibility with other 7.76mm guns makes the 7.76mm version a bit more economical."; +WORSTBOSS_LORE1 = "TODO: Enter Lore."; +WORSTBOSS_LORE2 = ""; +WORSTBOSS_LORE3 = ""; +WORSTBOSS_LORE4 = ""; + DMS_LORE1 = "TODO: Enter Lore."; DMS_LORE2 = ""; DMS_LORE3 = ""; -DMS_LORE4 = ""; \ No newline at end of file +DMS_LORE4 = ""; diff --git a/MAPINFO b/MAPINFO index 5cf92bc..7300538 100644 --- a/MAPINFO +++ b/MAPINFO @@ -1,4 +1,4 @@ GameInfo { - AddEventHandlers = "HexaDokenHandler", "HDShitbostHandler" + AddEventHandlers = "HexaDokenHandler" } \ No newline at end of file diff --git a/MENUDEF b/MENUDEF index 3be1ddc..bd43fa4 100644 --- a/MENUDEF +++ b/MENUDEF @@ -18,15 +18,23 @@ OptionMenu HexadokenLegacyContinued StaticText "" StaticText "--- Rifles ---", "orange" StaticText "" - Submenu "$TAG_NSB", "NoScopeBoss", 0, 1 + Submenu "$TAG_9MMBOSS", "9mmBoss", 0, 1 StaticText "" - Submenu "$TAG_OMGBOSS", "BogRifle", 0, 1 + Submenu "$TAG_4MMBOSS", "4mmBoss", 0, 1 StaticText "" Submenu "$TAG_BOSSMERG", "BasRifle", 0, 1 StaticText "" + Submenu "$TAG_OMGBOSS", "BogRifle", 0, 1 + StaticText "" + Submenu "$TAG_5MMBOSS", "5mmBoss", 0, 1 + StaticText "" + Submenu "$TAG_NSB", "NoScopeBoss", 0, 1 + StaticText "" + Submenu "$TAG_WORSTBOSS", "WorstBoss", 0, 1 + StaticText "" Submenu "$TAG_GARAND", "M1Garand", 0, 1 StaticText "" - Option "Spawn boss variants (TEMP)","hd_shitbossting_spawn","YesNo" + StaticText "--- Items ---", "green" StaticText "" Submenu "$TAG_DMS", "DMS", 0, 1 StaticText "" @@ -35,32 +43,118 @@ OptionMenu HexadokenLegacyContinued SafeCommand "Reset every option", "Hexa_Reset_Cvars", "This resets every option for Hexa's Legacy Continued, are you sure you want to do this?" } -OptionMenu NoScopeBoss +OptionMenu 9mmBoss { - Title "$TITLE_NSBMENU" + Title "$TITLE_9MMBOSSMENU" StaticText "Notice:", "Orange" StaticText "Setting 'spawn rate' to Replace All will suppress", "white" StaticText "all spawns of that given type.", "white" StaticText "" StaticText "Spawn Options", "Orange" - StaticText "$MENU_NSBSPAWNTEXT", "white" - Option "$MENU_NSBSPAWN", "nsb_boss_spawn_bias", "SpawnBias" - SafeCommand "$MENU_RESETNSBSPAWN", "resetcvar nsb_boss_spawn_bias" + StaticText "$MENU_9MMBOSSSPAWNTEXT", "white" + Option "$MENU_9MMBOSSSPAWN", "boss9mm_boss_spawn_bias", "SpawnBias" + SafeCommand "$MENU_RESETBOSS", "resetcvar boss9mm_boss_spawn_bias" + StaticText "" + StaticText "$MENU_9MMBOSSPISTOLTEXT", "white" + Option "$MENU_9MMBOSSSPAWN", "boss9mm_pistol_spawn_bias", "SpawnBias" + SafeCommand "$MENU_RESETPISTOL", "resetcvar boss9mm_pistol_spawn_bias" + StaticText "" + StaticText "$MENU_9MMBOSSSMGTEXT", "white" + Option "$MENU_9MMBOSSSPAWN", "boss9mm_smg_spawn_bias", "SpawnBias" + SafeCommand "$MENU_RESETSMG", "resetcvar boss9mm_smg_spawn_bias" + StaticText "" + StaticText "$MENU_BACKPACKTEXT", "Orange" + Option "$MENU_9MMBOSSBACKPACK", "boss9mm_allowBackpacks", "OnOff" + /* Option "$MENU_9MMBOSSMAGBACKPACK", "boss9mmmag_allowBackpacks", "OnOff" */ StaticText "" StaticText "$MENU_REPLACEAFTERMAPLOAD", "white" - Option "$MENU_PERSISTENCY", "nsb_persistent_spawning", "OnOff" - SafeCommand "$MENU_RESETPERSISTENCY", "resetcvar nsb_persistent_spawning" + Option "$MENU_PERSISTENCY", "boss9mm_persistent_spawning", "OnOff" + SafeCommand "$MENU_RESETPERSISTENCY", "resetcvar boss9mm_persistent_spawning" StaticText "" StaticText "" StaticText "Reset Options", "Orange" - SafeCommand "Reset all options", "nsb_reset_cvars" + SafeCommand "Reset all options", "boss9mm_reset_cvars" StaticText "" StaticText "--- Lore ---", "Orange" StaticText "" - StaticText "$NSB_LORE1", "white" - StaticText "$NSB_LORE2", "white" - StaticText "$NSB_LORE3", "white" - StaticText "$NSB_LORE4", "white" + StaticText "$9MMBOSS_LORE1", "white" + StaticText "$9MMBOSS_LORE2", "white" + StaticText "$9MMBOSS_LORE3", "white" + StaticText "$9MMBOSS_LORE4", "white" +} + +OptionMenu 4mmBoss +{ + Title "$TITLE_4MMBOSSMENU" + StaticText "Notice:", "Orange" + StaticText "Setting 'spawn rate' to Replace All will suppress", "white" + StaticText "all spawns of that given type.", "white" + StaticText "" + StaticText "Spawn Options", "Orange" + StaticText "$MENU_4MMBOSSSPAWNTEXT", "white" + Option "$MENU_4MMBOSSSPAWN", "boss4mm_boss_spawn_bias", "SpawnBias" + SafeCommand "$MENU_RESETBOSS", "resetcvar boss4mm_boss_spawn_bias" + StaticText "" + StaticText "$MENU_4MMBOSSCHAINGUNTEXT", "white" + Option "$MENU_4MMBOSSSPAWN", "boss4mm_chaingun_spawn_bias", "SpawnBias" + SafeCommand "$MENU_RESETVULC", "resetcvar boss4mm_chaingun_spawn_bias" + StaticText "" + StaticText "$MENU_BACKPACKTEXT", "Orange" + Option "$MENU_4MMBOSSBACKPACK", "boss4mm_allowBackpacks", "OnOff" + StaticText "" + StaticText "$MENU_REPLACEAFTERMAPLOAD", "white" + Option "$MENU_PERSISTENCY", "boss4mm_persistent_spawning", "OnOff" + SafeCommand "$MENU_RESETPERSISTENCY", "resetcvar boss4mm_persistent_spawning" + StaticText "" + StaticText "" + StaticText "Reset Options", "Orange" + SafeCommand "Reset all options", "boss4mm_reset_cvars" + StaticText "" + StaticText "--- Lore ---", "Orange" + StaticText "" + StaticText "$4MMBOSS_LORE1", "white" + StaticText "$4MMBOSS_LORE2", "white" + StaticText "$4MMBOSS_LORE3", "white" + StaticText "$4MMBOSS_LORE4", "white" +} + +OptionMenu BasRifle +{ + Title "$TITLE_BOSSMERGMENU" + StaticText "Notice:", "Orange" + StaticText "Setting 'spawn rate' to Replace All will suppress", "white" + StaticText "all spawns of that given type.", "white" + StaticText "" + StaticText "Spawn Options", "Orange" + StaticText "$MENU_BASSPAWNTEXT", "white" + Option "$MENU_BASSPAWNRATE", "bas_boss_spawn_bias", "SpawnBias" + SafeCommand "$MENU_RESETHUNTER", "resetcvar bas_boss_spawn_bias" + StaticText "" + StaticText "$MENU_BASHUNTERTEXT", "white" + Option "$MENU_BASSPAWNRATE", "bas_hunter_spawn_bias", "SpawnBias" + SafeCommand "$MENU_RESETHUNTER", "resetcvar bas_hunter_spawn_bias" + StaticText "" + StaticText "$MENU_BASSLAYERTEXT", "white" + Option "$MENU_BASSPAWNRATE", "bas_slayer_spawn_bias", "SpawnBias" + SafeCommand "$MENU_RESETSLAYER", "resetcvar bas_slayer_spawn_bias" + StaticText "" + StaticText "$MENU_BACKPACKTEXT", "Orange" + Option "$MENU_BASBACKPACK", "bas_allowBackpacks", "OnOff" + StaticText "" + StaticText "$MENU_REPLACEAFTERMAPLOAD", "white" + Option "$MENU_PERSISTENCY", "bas_persistent_spawning", "OnOff" + SafeCommand "$MENU_RESETPERSISTENCY", "resetcvar bas_persistent_spawning" + StaticText "" + StaticText "" + StaticText "Reset Options", "Orange" + SafeCommand "Reset all options", "bas_reset_cvars" + StaticText "" + StaticText "--- Lore ---", "Orange" + StaticText "" + StaticText "$BAS_LORE1", "white" + StaticText "$BAS_LORE2", "white" + StaticText "$BAS_LORE3", "white" + StaticText "$BAS_LORE4", "white" } OptionMenu BogRifle @@ -71,17 +165,21 @@ OptionMenu BogRifle StaticText "all spawns of that given type.", "white" StaticText "" StaticText "Spawn Options", "Orange" + StaticText "$MENU_BOGSPAWNTEXT", "white" + Option "$MENU_BOGSPAWNRATE", "bog_boss_spawn_bias", "SpawnBias" + SafeCommand "$MENU_RESETTB", "resetcvar bog_boss_spawn_bias" + StaticText "" StaticText "$MENU_BOGTHUNDERBUSTERTEXT", "white" Option "$MENU_BOGSPAWNRATE", "bog_plasma_spawn_bias", "SpawnBias" SafeCommand "$MENU_RESETTB", "resetcvar bog_plasma_spawn_bias" StaticText "" - StaticText "$MENU_BOGSLAYERTEXT", "white" - Option "$MENU_BOGSPAWNRATE", "bog_ssg_spawn_bias", "SpawnBias" - SafeCommand "$MENU_RESETSLAYER", "resetcvar bog_ssg_spawn_bias" + StaticText "$MENU_BOGBFGTEXT", "white" + Option "$MENU_BOGSPAWNRATE", "bog_bfg_spawn_bias", "SpawnBias" + SafeCommand "$MENU_RESETBFG", "resetcvar bog_bfg_spawn_bias" StaticText "" - StaticText "$MENU_BOGVULCTEXT", "white" - Option "$MENU_BOGSPAWNRATE", "bog_chaingun_spawn_bias", "SpawnBias" - SafeCommand "$MENU_RESETVULC", "resetcvar bog_chaingun_spawn_bias" + StaticText "$MENU_BACKPACKTEXT", "Orange" + Option "$MENU_BOGBACKPACK", "bog_allowBackpacks", "OnOff" + Option "$MENU_BOGMAGBACKPACK", "bogmag_allowBackpacks", "OnOff" StaticText "" StaticText "$MENU_REPLACEAFTERMAPLOAD", "white" Option "$MENU_PERSISTENCY", "bog_persistent_spawning", "OnOff" @@ -99,32 +197,101 @@ OptionMenu BogRifle StaticText "$BOG_LORE4", "white" } -OptionMenu BasRifle +OptionMenu 5mmBoss { - Title "$TITLE_BOSSMERGMENU" + Title "$TITLE_5MMBOSSMENU" StaticText "Notice:", "Orange" StaticText "Setting 'spawn rate' to Replace All will suppress", "white" StaticText "all spawns of that given type.", "white" StaticText "" StaticText "Spawn Options", "Orange" - StaticText "$MENU_BASHUNTER", "white" - Option "$MENU_BASSPAWNRATE", "bas_hunter_spawn_bias", "SpawnBias" - SafeCommand "$MENU_RESETHUNTER", "resetcvar bas_hunter_spawn_bias" + StaticText "$MENU_5MMBOSSSPAWNTEXT", "white" + Option "$MENU_5MMBOSSSPAWN", "boss5mm_boss_spawn_bias", "SpawnBias" + SafeCommand "$MENU_RESETBOSS", "resetcvar boss5mm_boss_spawn_bias" + StaticText "" + StaticText "$MENU_5MMBOSSCHAINGUNTEXT", "white" + Option "$MENU_5MMBOSSSPAWN", "boss5mm_chaingun_spawn_bias", "SpawnBias" + SafeCommand "$MENU_RESETVULC", "resetcvar boss5mm_chaingun_spawn_bias" + StaticText "" + StaticText "$MENU_BACKPACKTEXT", "Orange" + Option "$MENU_5MMBOSSBACKPACK", "boss5mm_allowBackpacks", "OnOff" + StaticText "" + StaticText "$MENU_REPLACEAFTERMAPLOAD", "white" + Option "$MENU_PERSISTENCY", "boss5mm_persistent_spawning", "OnOff" + SafeCommand "$MENU_RESETPERSISTENCY", "resetcvar boss5mm_persistent_spawning" + StaticText "" + StaticText "" + StaticText "Reset Options", "Orange" + SafeCommand "Reset all options", "5mmboss_reset_cvars" + StaticText "" + StaticText "--- Lore ---", "Orange" + StaticText "" + StaticText "$5MMBOSS_LORE1", "white" + StaticText "$5MMBOSS_LORE2", "white" + StaticText "$5MMBOSS_LORE3", "white" + StaticText "$5MMBOSS_LORE4", "white" +} + +OptionMenu NoScopeBoss +{ + Title "$TITLE_NSBMENU" + StaticText "Notice:", "Orange" + StaticText "Setting 'spawn rate' to Replace All will suppress", "white" + StaticText "all spawns of that given type.", "white" StaticText "" + StaticText "Spawn Options", "Orange" + StaticText "$MENU_NSBSPAWNTEXT", "white" + Option "$MENU_NSBSPAWN", "nsb_boss_spawn_bias", "SpawnBias" + SafeCommand "$MENU_RESETBOSS", "resetcvar nsb_boss_spawn_bias" + StaticText "" + StaticText "$MENU_BACKPACKTEXT", "Orange" + Option "$MENU_NSBBACKPACK", "nsb_allowBackpacks", "OnOff" + StaticText "" StaticText "$MENU_REPLACEAFTERMAPLOAD", "white" - Option "$MENU_PERSISTENCY", "bas_persistent_spawning", "OnOff" - SafeCommand "$MENU_RESETPERSISTENCY", "resetcvar bas_persistent_spawning" + Option "$MENU_PERSISTENCY", "nsb_persistent_spawning", "OnOff" + SafeCommand "$MENU_RESETPERSISTENCY", "resetcvar nsb_persistent_spawning" StaticText "" StaticText "" StaticText "Reset Options", "Orange" - SafeCommand "Reset all options", "bog_reset_cvars" + SafeCommand "Reset all options", "nsb_reset_cvars" StaticText "" StaticText "--- Lore ---", "Orange" StaticText "" - StaticText "$BAS_LORE1", "white" - StaticText "$BAS_LORE2", "white" - StaticText "$BAS_LORE3", "white" - StaticText "$BAS_LORE4", "white" + StaticText "$NSB_LORE1", "white" + StaticText "$NSB_LORE2", "white" + StaticText "$NSB_LORE3", "white" + StaticText "$NSB_LORE4", "white" +} + +OptionMenu WorstBoss +{ + Title "$TITLE_WORSTMENU" + StaticText "Notice:", "Orange" + StaticText "Setting 'spawn rate' to Replace All will suppress", "white" + StaticText "all spawns of that given type.", "white" + StaticText "" + StaticText "Spawn Options", "Orange" + StaticText "$MENU_WORSTSPAWNTEXT", "white" + Option "$MENU_WORSTSPAWN", "worstBoss_boss_spawn_bias", "SpawnBias" + SafeCommand "$MENU_RESETBOSS", "resetcvar worstBoss_boss_spawn_bias" + StaticText "" + StaticText "$MENU_BACKPACKTEXT", "Orange" + Option "$MENU_WORSTBACKPACK", "worstBoss_allowBackpacks", "OnOff" + StaticText "" + StaticText "$MENU_REPLACEAFTERMAPLOAD", "white" + Option "$MENU_PERSISTENCY", "worstBoss_persistent_spawning", "OnOff" + SafeCommand "$MENU_RESETPERSISTENCY", "resetcvar worstBoss_persistent_spawning" + StaticText "" + StaticText "" + StaticText "Reset Options", "Orange" + SafeCommand "Reset all options", "worstBoss_reset_cvars" + StaticText "" + StaticText "--- Lore ---", "Orange" + StaticText "" + StaticText "$WORSTBOSS_LORE1", "white" + StaticText "$WORSTBOSS_LORE2", "white" + StaticText "$WORSTBOSS_LORE3", "white" + StaticText "$WORSTBOSS_LORE4", "white" } OptionMenu M1Garand @@ -138,6 +305,14 @@ OptionMenu M1Garand StaticText "$MENU_GARANDLIBERATOR", "white" Option "$MENU_GARANDSPAWNRATE", "gar_shellbox_spawn_bias", "SpawnBias" SafeCommand "$MENU_RESETLIB", "resetcvar gar_shellbox_spawn_bias" + StaticText "" + StaticText "$MENU_BACKPACKTEXT", "Orange" + Option "$MENU_GARANDBACKPACK", "gar_allowBackpacks", "OnOff" + Option "$MENU_GARANDMAGBACKPACK", "garmag_allowBackpacks", "OnOff" + StaticText "" + StaticText "$MENU_REPLACEAFTERMAPLOAD", "white" + Option "$MENU_PERSISTENCY", "gar_persistent_spawning", "OnOff" + SafeCommand "$MENU_RESETPERSISTENCY", "resetcvar gar_persistent_spawning" StaticText "" StaticText "Misc Options", "Orange" StaticText "$MENU_GARANDAMMO", "white" @@ -167,11 +342,11 @@ OptionMenu M1Garand OptionMenu DMS { Title "$TITLE_DMSMENU" - StaticText "Notice:", "Orange" + StaticText "Notice:", "Green" StaticText "Setting 'spawn rate' to Replace All will suppress", "white" StaticText "all spawns of that given type.", "white" StaticText "" - StaticText "Spawn Options", "Orange" + StaticText "Spawn Options", "Green" StaticText "$MENU_DMSSTIMPACK", "white" Option "$MENU_DMSSPAWNRATE", "dms_stimpack_bias", "SpawnBias" SafeCommand "$MENU_RESETSTIMPACK", "resetcvar dms_stimpack_bias" @@ -179,16 +354,19 @@ OptionMenu DMS StaticText "$MENU_DMSMEDIKIT", "white" Option "$MENU_DMSSPAWNRATE", "dms_medikit_bias", "SpawnBias" SafeCommand "$MENU_RESETMEDIKIT", "resetcvar dms_medikit_bias" + StaticText "" + StaticText "$MENU_BACKPACKTEXT", "Green" + Option "$MENU_DMSBACKPACK", "dms_allowBackpacks", "OnOff" StaticText "" StaticText "$MENU_REPLACEAFTERMAPLOAD", "white" Option "$MENU_PERSISTENCY", "dms_persistent_spawning", "OnOff" SafeCommand "$MENU_RESETPERSISTENCY", "resetcvar dms_persistent_spawning" StaticText "" StaticText "" - StaticText "Reset Options", "Orange" + StaticText "Reset Options", "Green" SafeCommand "Reset all options", "dms_reset_cvars" StaticText "" - StaticText "--- Lore ---", "Orange" + StaticText "--- Lore ---", "Green" StaticText "" StaticText "$DMS_LORE1", "white" StaticText "$DMS_LORE2", "white" diff --git a/readme.md b/readme.md index fe1b385..a941cdc 100644 --- a/readme.md +++ b/readme.md @@ -1,4 +1,5 @@ # HexaDoken Legacy Continued +_Requires [HDBulletLib-Recasted](https://github.com/HDest-Community/HDBulletLib-Recasted), supports the 9mm Clip from [Peppergrinder](https://gitlab.com/hdiscord-saltmines/hd-peppergrinder)_ This is a fix/update of HexaDoken's original 'Hideous Destructor' addons. It currently adds both recast support and proper spawners for the No-Scope Boss. diff --git a/zscript.zsc b/zscript.zsc index 378e877..142778e 100644 --- a/zscript.zsc +++ b/zscript.zsc @@ -5,11 +5,16 @@ Version "4.10" #include "zscript/Hexadoken/Items/SpeedReloader.zsc" #include "zscript/Hexadoken/Items/DedicatedMedicalScanner.zsc" -#include "zscript/Hexadoken/Weapons/50OMGBoss.zsc" -#include "zscript/Hexadoken/Weapons/ScopelessBoss.zsc" -#include "zscript/Hexadoken/Weapons/Bossmerg.zsc" -#include "zscript/Hexadoken/Weapons/M1 Garand.zsc" -#include "zscript/Hexadoken/Weapons/Shitbossting.zsc" +#include "zscript/Hexadoken/Weapons/M1 Garand/M1 Garand.zsc" + +#include "zscript/Hexadoken/Weapons/Boss Rifle Variants/4mm Boss.zsc" +#include "zscript/Hexadoken/Weapons/Boss Rifle Variants/9mm Boss.zsc" +#include "zscript/Hexadoken/Weapons/Boss Rifle Variants/12ga Boss.zsc" +#include "zscript/Hexadoken/Weapons/Boss Rifle Variants/50 OMG Boss.zsc" +#include "zscript/Hexadoken/Weapons/Boss Rifle Variants/Hexadoken's Boss.zsc" +#include "zscript/Hexadoken/Weapons/Boss Rifle Variants/Scopeless Boss.zsc" +#include "zscript/Hexadoken/Weapons/Boss Rifle Variants/Variant Loadout Giver.zsc" +#include "zscript/Hexadoken/Weapons/Boss Rifle Variants/Worst Boss.zsc" enum bossstatus{ BOSSF_FRONTRETICLE=1, diff --git a/zscript/Hexadoken/Items/DedicatedMedicalScanner.zsc b/zscript/Hexadoken/Items/DedicatedMedicalScanner.zsc index 3fceaa7..ae068fd 100644 --- a/zscript/Hexadoken/Items/DedicatedMedicalScanner.zsc +++ b/zscript/Hexadoken/Items/DedicatedMedicalScanner.zsc @@ -170,10 +170,9 @@ class HDScanner:HDWoundFixer{ double(slf.bloodloss)/(HDCONST_BLOODBAGAMOUNT<<2) +frandom(0,thrownoff*0.2) ); - playerspecs=" -\ccBurns: \cq"..slf.burncount.." -\ccTissue Damage: \cq"..slf.oldwoundcount.." -\ccBlood loss: \ca"..bloodloss.." \cctransfusion units"; + playerspecs="\n\ccBurns: \cq"..slf.burncount + .."\n\ccTissue Damage: \cq"..slf.oldwoundcount + .."\n\ccBlood loss: \ca"..bloodloss.." \cctransfusion units"; } string openwounds=""; diff --git a/zscript/Hexadoken/SpawnHandler.zsc b/zscript/Hexadoken/SpawnHandler.zsc index 2501269..5d08dd3 100644 --- a/zscript/Hexadoken/SpawnHandler.zsc +++ b/zscript/Hexadoken/SpawnHandler.zsc @@ -13,7 +13,7 @@ class HexaSpawnItem play { // Whether or not to persistently spawn. bool isPersistent; - // Whether or not to replace the original item. + // Whether or not to replace the original item. bool replaceItem; string toString() { @@ -22,7 +22,7 @@ class HexaSpawnItem play { if (spawnReplaces.size()) { replacements = replacements..spawnReplaces[0].toString(); - foreach (spawnReplace : spawnReplaces) replacements = replacements..", "..spawnReplace.toString(); + foreach (spawnReplace : spawnReplaces) replacements = replacements..", "..spawnReplace.toString(); } replacements = replacements.."]"; @@ -54,7 +54,7 @@ class HexaSpawnAmmo play { if (weaponNames.size()) { weapons = weapons..weaponNames[0]; - foreach (weaponName : weaponNames) weapons = weapons..", "..weaponName; + foreach (weaponName : weaponNames) weapons = weapons..", "..weaponName; } weapons = weapons.."]"; @@ -86,6 +86,12 @@ class HexaDokenHandler : EventHandler { "HDLadderSection" }; + // List of CVARs for Backpack Spawns + array > backpackBlacklist; + + // Cache of Ammo Box Loot Table + private HDAmBoxList ammoBoxList; + // List of weapon-ammo associations. // Used for ammo-use association on ammo spawn (happens very often). array ammoSpawnList; @@ -102,7 +108,7 @@ class HexaDokenHandler : EventHandler { if (hd_debug) { let msg = "Adding "..(persists ? "Persistent" : "Non-Persistent").." Replacement Entry for "..name..": ["..replacees[0].toString(); - if (replacees.size() > 1) foreach (replacee : replacees) msg = msg..", "..replacee.toString(); + if (replacees.size() > 1) foreach (replacee : replacees) msg = msg..", "..replacee.toString(); console.printf(msg.."]"); } @@ -115,7 +121,7 @@ class HexaDokenHandler : EventHandler { spawnee.isPersistent = persists; spawnee.replaceItem = rep; - foreach (replacee : replacees) spawnee.spawnReplaces.push(replacee); + foreach (replacee : replacees) spawnee.spawnReplaces.push(replacee); // Pushes the finished struct to the array. itemSpawnList.push(spawnee); @@ -137,7 +143,7 @@ class HexaDokenHandler : EventHandler { spawnee.ammoName = name.makeLower(); // Populates the struct with relevant information, - foreach (weapon : weapons) spawnee.weaponNames.push(weapon.makeLower()); + foreach (weapon : weapons) spawnee.weaponNames.push(weapon.makeLower()); // Pushes the finished struct to the array. ammoSpawnList.push(spawnee); @@ -149,15 +155,70 @@ class HexaDokenHandler : EventHandler { cvarsAvailable = true; + //----------------- + // Backpack Spawns + //----------------- + + if (!boss9mm_allowBackpacks) backpackBlacklist.push((Class)("BossRifleButIts9mm")); + if (!boss4mm_allowBackpacks) backpackBlacklist.push((Class)("BossRifleButIts4mm")); + if (!bas_allowBackpacks) backpackBlacklist.push((Class)("Bossmerg")); + if (!bog_allowBackpacks) backpackBlacklist.push((Class)("BogRifle")); + if (!boss5mm_allowBackpacks) backpackBlacklist.push((Class)("BossRifleButItsFuckingPink")); + if (!nsb_allowBackpacks) backpackBlacklist.push((Class)("NoScopeBoss")); + if (!worstBoss_allowBackpacks) backpackBlacklist.push((Class)("BossRifleButItsTheWorst")); + if (!gar_allowBackpacks) backpackBlacklist.push((Class)("HDGarand")); + + // if (!boss9mmmag_allowBackpacks) backpackBlacklist.push((Class)("HD9mClip")); + if (!bogmag_allowBackpacks) backpackBlacklist.push((Class)("HDOmgClip")); + if (!garmag_allowBackpacks) backpackBlacklist.push((Class)("HDGarandClip")); + if (!garmag_allowBackpacks) backpackBlacklist.push((Class)("HDGarand3006Clip")); + + //------------ // Ammunition //------------ + // 9mm Clips + Array wep_9mmClip; + wep_9mmClip.push("BossRifleButIts9mm"); + addAmmo('HD9mClip', wep_9mmClip); + // 7mm Clips Array wep_7mmClip; wep_7mmClip.push("NoScopeBoss"); addAmmo('HD7mClip', wep_7mmClip); + // .50 OMG Clips + Array wep_omgClip; + wep_omgClip.push("BogRifle"); + addAmmo('HDOmgClip', wep_omgClip); + + // M1 Garand Clips + Array wep_garandClip; + wep_garandClip.push("HDGarand"); + addAmmo('HDGarandClip', wep_garandClip); + + // M1 Garand .30-06 Clips + Array wep_3006Clip; + wep_3006Clip.push("HDGarand"); + addAmmo('HDGarand3006Clip', wep_3006Clip); + + // 9mm + Array wep_9mm; + wep_9mm.push("BossRifleButIts9mm"); + addAmmo('HDPistolAmmo', wep_9mm); + + // 4mm + Array wep_4mm; + wep_4mm.push("BossRifleButIts4mm"); + wep_4mm.push("SpeedRunLoader"); + addAmmo('FourMilAmmo', wep_4mm); + + // 12 Gauge Shells + Array wep_Shells; + wep_Shells.push("Bossmerg"); + addAmmo('HDShellAmmo', wep_Shells); + // 7mm Array wep_7mm; wep_7mm.push("NoScopeBoss"); @@ -174,18 +235,6 @@ class HexaDokenHandler : EventHandler { wep_7mmB.push("SpeedRunLoader"); addAmmo('SevenMilBrass', wep_7mmB); - // 9mm - Array wep_9mm; - wep_9mm.push("BossRifleButIts9mm"); - addAmmo('HDPistolAmmo', wep_9mm); - - // 4mm - Array wep_4mm; - wep_4mm.push("BossRifleButIts4mm"); - addAmmo('FourMilAmmo', wep_4mm); - wep_4mm.push("SpeedRunLoader"); - addAmmo('FourMilAmmo', wep_4mm); - // 5mm Array wep_5mm; wep_5mm.push("BossRifleButItsFuckingPink"); @@ -198,47 +247,68 @@ class HexaDokenHandler : EventHandler { // .30-06 Array wep_3006; - wep_3006.push("M1Garand"); + wep_3006.push("HDGarand"); addAmmo('ThirtyAughtSixAmmo', wep_3006); - // 12 Gauge Shells - Array wep_Shells; - wep_Shells.push("Bossmerg"); - addAmmo('HDShellAmmo', wep_Shells); - //------------ // Weaponry //------------ - // No-scope Boss Rifle - Array spawns_NoScopeBoss; - spawns_NoScopeBoss.push(addItemEntry('BossRifle', nsb_boss_spawn_bias)); - addItem('NoScopeBossSpawner', spawns_NoScopeBoss, nsb_persistent_spawning); + // 9mm Boss Rifle + Array spawns_9mmBoss; + spawns_9mmBoss.push(addItemEntry('BossRifleSpawner', boss9mm_boss_spawn_bias)); + spawns_9mmBoss.push(addItemEntry('HDPistol', boss9mm_pistol_spawn_bias)); + spawns_9mmBoss.push(addItemEntry('HDSMG', boss9mm_smg_spawn_bias)); + addItem('BossRifleNine', spawns_9mmBoss, boss9mm_persistent_spawning); + + // 4mm Boss Rifle + Array spawns_4mmBoss; + spawns_4mmBoss.push(addItemEntry('BossRifleSpawner', boss4mm_boss_spawn_bias)); + spawns_4mmBoss.push(addItemEntry('Vulcanette', boss4mm_chaingun_spawn_bias)); + addItem('BossRifleFour', spawns_4mmBoss, boss4mm_persistent_spawning); - // Bossmerg + // 12ga Boss Rifle Array spawns_Bossmerg; + spawns_Bossmerg.push(addItemEntry('BossRifleSpawner', bas_boss_spawn_bias)); spawns_Bossmerg.push(addItemEntry('Hunter', bas_hunter_spawn_bias)); + spawns_Bossmerg.push(addItemEntry('Slayer', bas_slayer_spawn_bias)); addItem('Bossmerg', spawns_Bossmerg, bas_persistent_spawning); - // M1 Garand - Array spawns_Garand; - spawns_Garand.push(addItemEntry('LiberatorRandom', gar_shellbox_spawn_bias)); - addItem('HDGarandRandom', spawns_Garand, gar_persistent_spawning); - // .50 OMG Boss Rifle Array spawns_BogRifle; + spawns_BogRifle.push(addItemEntry('BossRifleSpawner', bog_boss_spawn_bias)); spawns_BogRifle.push(addItemEntry('ThunderBuster', bog_plasma_spawn_bias)); - spawns_BogRifle.push(addItemEntry('Slayer', bog_ssg_spawn_bias)); - spawns_BogRifle.push(addItemEntry('Vulcanette', bog_chaingun_spawn_bias)); + spawns_BogRifle.push(addItemEntry('BFG9K', bog_bfg_spawn_bias)); addItem('BogRifleSpawner', spawns_BogRifle, bog_persistent_spawning); + // 5mm Boss Rifle + Array spawns_5mmBoss; + spawns_5mmBoss.push(addItemEntry('BossRifleSpawner', boss5mm_boss_spawn_bias)); + spawns_5mmBoss.push(addItemEntry('Vulcanette', boss5mm_chaingun_spawn_bias)); + addItem('BossRifleButItsFuckingPink', spawns_5mmBoss, boss5mm_persistent_spawning); + + // No-scope Boss Rifle + Array spawns_NoScopeBoss; + spawns_NoScopeBoss.push(addItemEntry('BossRifleSpawner', nsb_boss_spawn_bias)); + addItem('NoScopeBossSpawner', spawns_NoScopeBoss, nsb_persistent_spawning); + + // The Worst Boss Rifle + Array spawns_WorstBoss; + spawns_WorstBoss.push(addItemEntry('BossRifleSpawner', worstBoss_boss_spawn_bias)); + addItem('BossRifleButItsTheWorst', spawns_WorstBoss, worstBoss_persistent_spawning); + + // M1 Garand + Array spawns_Garand; + spawns_Garand.push(addItemEntry('LiberatorRandom', gar_shellbox_spawn_bias)); + addItem('HDGarandRandom', spawns_Garand, gar_persistent_spawning); + //------------ // Items //------------ Array spawns_scanner; - spawns_scanner.push(additementry('PortableStimpack', dms_stimpack_bias)); - spawns_scanner.push(additementry('PortableMedikit', dms_medikit_bias)); + spawns_scanner.push(additementry('PortableStimpack', dms_stimpack_bias)); + spawns_scanner.push(additementry('PortableMedikit', dms_medikit_bias)); addItem('HDScanner', spawns_scanner, dms_persistent_spawning); } @@ -247,7 +317,7 @@ class HexaDokenHandler : EventHandler { if (chance > -1) { let result = random(0, chance); - if (hd_debug) console.printf("Rolled a "..(result + 1).." out of "..(chance + 1)); + if (hd_debug) console.printf("Rolled a "..(result + 1).." out of "..(chance + 1)); return result == 0; } @@ -270,21 +340,31 @@ class HexaDokenHandler : EventHandler { return false; } - override void worldThingSpawned(WorldEvent e) { + override void worldLoaded(WorldEvent e) { + // Populates the main arrays if they haven't been already. if (!cvarsAvailable) init(); + foreach (bl : backpackBlacklist) { + if (hd_debug) console.printf("Removing "..bl.getClassName().." from Backpack Spawn Pool"); + + BPSpawnPool.removeItem(bl); + } + } + + override void worldThingSpawned(WorldEvent e) { + // If thing spawned doesn't exist, quit - if (!e.thing) return; + if (!e.thing) return; // If thing spawned is blacklisted, quit - foreach (bl : blacklist) if (e.thing is bl) return; + foreach (bl : blacklist) if (e.thing is bl) return; - string candidateName = e.thing.getClassName(); - candidateName = candidateName.makeLower(); + string candidateName = e.thing.getClassName(); + candidateName = candidateName.makeLower(); // Pointers for specific classes. - let ammo = HDAmmo(e.thing); + let ammo = HDAmmo(e.thing); // If the thing spawned is an ammunition, add any and all items that can use this. if (ammo) handleAmmoUses(ammo, candidateName); @@ -292,11 +372,31 @@ class HexaDokenHandler : EventHandler { // Return if range before replacing things. if (level.MapName ~== "RANGE") return; + if (e.thing is 'HDAmBox') { + handleAmmoBoxLootTable(); + } else { handleWeaponReplacements(e.thing, ammo, candidateName); + } + } + + private void handleAmmoBoxLootTable() { + if (!ammoBoxList) { + ammoBoxList = HDAmBoxList.Get(); + + foreach (bl : backpackBlacklist) { + let index = ammoBoxList.invClasses.find(bl.getClassName()); + + if (index != ammoBoxList.invClasses.Size()) { + if (hd_debug) console.printf("Removing "..bl.getClassName().." from Ammo Box Loot Table"); + + ammoBoxList.invClasses.Delete(index); + } + } + } } private void handleAmmoUses(HDAmmo ammo, string candidateName) { - foreach (ammoSpawn : ammoSpawnList) if (candidateName == ammoSpawn.ammoName) ammo.itemsThatUseThis.copy(ammoSpawn.weaponNames); + foreach (ammoSpawn : ammoSpawnList) if (candidateName == ammoSpawn.ammoName) ammo.itemsThatUseThis.copy(ammoSpawn.weaponNames); } private void handleWeaponReplacements(Actor thing, HDAmmo ammo, string candidateName) { @@ -305,15 +405,15 @@ class HexaDokenHandler : EventHandler { bool prespawn = !(level.maptime > 1); // Iterates through the list of item candidates for e.thing. - foreach (itemSpawn : itemSpawnList) { + foreach (itemSpawn : itemSpawnList) { // if an item is owned or is an ammo (doesn't retain owner ptr), // do not replace it. let item = Inventory(thing); if ((prespawn || itemSpawn.isPersistent) && (!(item && item.owner) && (!ammo || prespawn))) { - foreach (spawnReplace : itemSpawn.spawnReplaces) { - if (spawnReplace.name == candidateName) { - if (hd_debug) console.printf("Attempting to replace "..candidateName.." with "..itemSpawn.spawnName.."..."); + foreach (spawnReplace : itemSpawn.spawnReplaces) { + if (spawnReplace.name == candidateName) { + if (hd_debug) console.printf("Attempting to replace "..candidateName.." with "..itemSpawn.spawnName.."..."); if (tryCreateItem(thing, itemSpawn.spawnName, spawnReplace.chance, itemSpawn.replaceItem)) return; } diff --git a/zscript/Hexadoken/Weapons/Bossmerg.zsc b/zscript/Hexadoken/Weapons/Boss Rifle Variants/12ga Boss.zsc similarity index 100% rename from zscript/Hexadoken/Weapons/Bossmerg.zsc rename to zscript/Hexadoken/Weapons/Boss Rifle Variants/12ga Boss.zsc diff --git a/zscript/Hexadoken/Weapons/Boss Rifle Variants/4mm Boss.zsc b/zscript/Hexadoken/Weapons/Boss Rifle Variants/4mm Boss.zsc new file mode 100644 index 0000000..8401a59 --- /dev/null +++ b/zscript/Hexadoken/Weapons/Boss Rifle Variants/4mm Boss.zsc @@ -0,0 +1,481 @@ +class BossRifleButIts4mm:BossRifle{ + default{ + tag "$TAG_4MMBOSS"; + hdweapon.refid ""; + } + + override string pickupmessage(){ + return "You got the "..gettag().."! Surprisingly light."; + } + + override double weaponbulk(){ + return 144+weaponstatus[BOSSS_MAG]*ENC_426_LOADED; + } + override void DropOneAmmo(int amt){ + if(owner){ + if(owner.countinv("FourMilAmmo"))owner.A_DropInventory("FourMilAmmo",10); + //else owner.A_DropInventory("HD7mClip",1); + } + } + override void ForceBasicAmmo(){ + owner.A_SetInventory("FourMilAmmo",11); + } + override string gethelptext(){ + return + WEPHELP_FIRESHOOT + ..WEPHELP_ALTFIRE.." Work bolt\n" + ..WEPHELP_RELOADRELOAD + ..WEPHELP_ZOOM.."+"..WEPHELP_FIREMODE.." Zoom\n" + ..WEPHELP_ZOOM.."+"..WEPHELP_USE.." Bullet drop\n" + ..WEPHELP_ALTFIRE.."+"..WEPHELP_UNLOAD.." Unload chamber/Clean rifle\n" + ..WEPHELP_UNLOADUNLOAD + ; + } + override string,double getpickupsprite(){return "BOJGZ0",1.;} + override void DrawHUDStuff(HDStatusBar sb,HDWeapon hdw,HDPlayerPawn hpl){ + if(sb.hudlevel==1){ + sb.drawimage("RCLSA3A7",(-54,-10),sb.DI_SCREEN_CENTER_BOTTOM,scale:(2.1,2.1)); + sb.drawnum(hpl.countinv("FourMilAmmo"),-51,-8,sb.DI_SCREEN_CENTER_BOTTOM); + } + sb.drawwepnum(hdw.weaponstatus[BOSSS_MAG],10); + sb.drawwepcounter(hdw.weaponstatus[BOSSS_CHAMBER], + -16,-10,"blank","RBRSA1A5","RBRSA3A7","RBRSA4A6" + ); + sb.drawstring( + sb.mAmountFont,string.format("%.1f",hdw.weaponstatus[BOSSS_ZOOM]*0.1), + (-36,-18),sb.DI_SCREEN_CENTER_BOTTOM|sb.DI_TEXT_ALIGN_RIGHT,Font.CR_DARKGRAY + ); + sb.drawstring( + sb.mAmountFont,string.format("%.1f",hdw.weaponstatus[BOSSS_DROPADJUST]*0.1), + (-16,-18),sb.DI_SCREEN_CENTER_BOTTOM|sb.DI_TEXT_ALIGN_RIGHT,Font.CR_WHITE + ); + } + override void InitializeWepStats(bool idfa){ + weaponspecial = 1337; //UaS sling compatbility + super.InitializeWepStats(idfa); + } + states{ + select0: + BOJG K 0; + goto select0bfg; + deselect0: + BOJG K 0; + goto deselect0big; + + ready: + BOJG K 1{ + if(pressingzoom()){ + if(player.cmd.buttons&BT_USE){ + A_ZoomAdjust(BOSSS_DROPADJUST,0,600,BT_USE); + }else if(invoker.weaponstatus[0]&BOSSF_FRONTRETICLE)A_ZoomAdjust(BOSSS_ZOOM,12,40); + else A_ZoomAdjust(BOSSS_ZOOM,5,60); + A_WeaponReady(WRF_NONE); + }else A_WeaponReady(WRF_ALL); + }goto readyend; + user3: + ---- A 0 A_MagManager("HDBattery"); + goto ready; + fire: + BOJG K 1 A_JumpIf(invoker.weaponstatus[BOSSS_CHAMBER]==2,"shoot"); + goto ready; + shoot: + BOJG K 1{ + A_Gunflash(); + invoker.weaponstatus[BOSSS_CHAMBER]=0; + A_StartSound("weapons/4mmboss",CHAN_WEAPON,CHANF_OVERLAP, + pitch:!(invoker.weaponstatus[0]&BOSSF_CUSTOMCHAMBER)?1.1:1. + ); + A_AlertMonsters(); + + HDBulletActor.FireBullet(self,"HDB_426", + aimoffy:(-1./600.)*invoker.weaponstatus[BOSSS_DROPADJUST], + speedfactor:(invoker.weaponstatus[0]&BOSSF_CUSTOMCHAMBER)?0.99:1.07 + ); + A_MuzzleClimb( + 0,0, + -frandom(0.15,0.3),-frandom(0.3,0.5), + -frandom(0.3,0.6),-frandom(0.6,1.1), + -frandom(0.3,0.6),-frandom(0.6,1.1) + ); + } + BOJG W 1; + BOJG W 1 A_JumpIf(gunbraced(),"ready"); + goto ready; + flash: + BARF A 1 bright{ + A_Light1(); + HDFlashAlpha(-96); + A_ZoomRecoil(0.96); + A_ChamberGrit(randompick(0,0,0,0,0,1,1,1,1,-1)); + } + TNT1 A 0 A_Light0(); + stop; + altfire: + BOJG K 1 offset(0,34) A_WeaponBusy(); + BOJG L 2 offset(2,36) A_JumpIf(invoker.weaponstatus[0]&BOSSF_CUSTOMCHAMBER,1); + BOJG L 1 offset(4,38){ + if(invoker.weaponstatus[BOSSS_CHAMBER]>2)setweaponstate("jamderp"); + } + BOJG L 1 offset(0,34); + BOJG L 0 A_ChamberGrit(randompick(0,0,0,0,-1,1,2),true); + BOJG L 0 A_Refire("chamber"); + goto ready; + althold: + BOJG O 1 A_WeaponReady(WRF_NOFIRE); + BOJG O 1{ + A_ClearRefire(); + bool eww=invoker.weaponstatus[BOSSS_GRIME]>10; + bool chempty=invoker.weaponstatus[BOSSS_CHAMBER]<1; + if(pressingunload()){ + if(chempty){ + return resolvestate("altholdclean"); + }else{ + invoker.weaponstatus[0]|=BOSSF_UNLOADONLY; + return resolvestate("loadchamber"); + } + }else if(pressingreload()){ + if( + !chempty + ){ + invoker.weaponstatus[0]|=BOSSF_UNLOADONLY; + return resolvestate("loadchamber"); + }else if( + eww + ){ + return resolvestate("altholdclean"); + }else if( + countinv("SevenMilAmmo") + ){ + invoker.weaponstatus[0]&=~BOSSF_UNLOADONLY; + return resolvestate("loadchamber"); + } + } + if(pressingaltfire())return resolvestate("althold"); + return resolvestate("altholdend"); + } + altholdend: + BOJG O 0 A_StartSound("weapons/boltfwd",8); + BOJG NM 2 A_WeaponReady(WRF_NOFIRE); + BOJG L 3 offset(2,36){ + A_WeaponReady(WRF_NOFIRE); + if(invoker.weaponstatus[0]&BOSSF_CUSTOMCHAMBER)A_SetTics(1); + } + goto ready; + loadchamber: + BOJG O 1 offset(2,36) A_ClearRefire(); + BOJG O 1 offset(3,38); + BOJG O 1 offset(5,42); + BOJG O 1 offset(8,48) A_StartSound("weapons/pocket",9); + BOJG O 1 offset(9,52) A_MuzzleClimb(frandom(-0.2,0.2),0.2,frandom(-0.2,0.2),0.2,frandom(-0.2,0.2),0.2); + BOJG O 2 offset(8,60); + BOJG O 2 offset(7,72); + TNT1 A 18 A_StartSound("weapons/pocket",9); + TNT1 A 4{ + A_StartSound("weapons/bossload",8,volume:0.7); + if(invoker.weaponstatus[0]&BOSSF_UNLOADONLY){ + int chm=invoker.weaponstatus[BOSSS_CHAMBER]; + invoker.weaponstatus[BOSSS_CHAMBER]=0; + if(chm<2||A_JumpIfInventory("FourMilAmmo",0,"null")){ + if (chm==2){ + actor rrr=spawn("ZM66DroppedRound",pos+(cos(angle)*10,sin(angle)*10,height-12),ALLOW_REPLACE); + rrr.angle=angle;rrr.A_ChangeVelocity(1,2,1,CVF_RELATIVE); + } + }else HDF.Give(self,"FourMilAmmo",1); + A_ChamberGrit(randompick(0,0,0,0,-1,1),true); + }else{ + A_TakeInventory("FourMilAmmo",1,TIF_NOTAKEINFINITE); + invoker.weaponstatus[BOSSS_CHAMBER]=2; + } + } + BOJG O 2 offset(7,72); + BOJG O 2 offset(8,60); + BOJG O 1 offset(7,52); + BOJG O 1 offset(5,42); + BOJG O 1 offset(3,38); + BOJG O 1 offset(3,35); + goto althold; + altholdclean: + BOJG O 1 offset(2,36) A_ClearRefire(); + BOJG O 1 offset(3,38); + BOJG O 1 offset(5,42) A_Log("Looking inside that chamber...",true); + BOJG O 1 offset(8,48) A_StartSound("weapons/pocket",9); + BOJG O 1 offset(7,52) A_MuzzleClimb(frandom(-0.2,0.2),0.2,frandom(-0.2,0.2),0.2,frandom(-0.2,0.2),0.2); + TNT1 A 3 A_StartSound("weapons/pocket",10); + TNT1 AAAA 4 A_MuzzleClimb(frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2)); + TNT1 A 3 A_StartSound("weapons/pocket",9); + TNT1 AAAA 4 A_MuzzleClimb(frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2)); + TNT1 A 40{ + A_StartSound("weapons/pocket",9); + int amt=invoker.weaponstatus[BOSSS_GRIME]; + string amts="There doesn't seem to be much. "; + if(amt>40)amts="What the FUCK. "; + else if(amt>30)amts="About time - this gun is barely functional. "; + else if(amt>20)amts="This is starting to gum up badly. "; + else if(amt>10)amts="It can use some cleaning. "; + + static const string cleanverbs[]={"extract","scrape off","wipe away","carefully remove","dump out","pick out","blow off","shake out","scrub off","fish out"}; + static const string contaminants[]={"some dust","a lot of dust","a bit of powder residue","a disturbing amount of powder residue","some excess grease","a layer of soot","some iron filings","a bit of hair","an eyelash","a patch of dried blood","a bit of rust","a crumb","a dead insect","ashes","some loose bits of skin","a sticky fluid of some sort","wow some fucking *gunk*","a booger","trace fecal matter","yet even more of that anonymous grey debris that all those bullet impacts make","a dollop of strawberry jam","the dried husk of a pinto bean with residual hog components","a tiny cancerous nodule of Second Flesh","some crystalline buildup of congealed Frag","a nesting queen space ant","a single modern-day transistor","a tiny Boss rifle (also jammed)","a colourless film of darkness made visible"}; + static const string actionparts[]={"bolt carrier","main extractor","auxiliary extractor","cam pin","bolt head","striker","firing pin spring","ejector slot","striker spring","ejector spring"}; + for(int i=amt;i>0;i-=random(8,16))amts.appendformat("You %s %s from the %s. ", + cleanverbs[random(0,cleanverbs.size()-1)], + contaminants[random(0,random(0,contaminants.size()-1))], + actionparts[random(0,random((actionparts.size()>>1),actionparts.size()-1))] + ); + amts.appendformat("\n"); + + amt=randompick(-3,-5,-5,-random(8,16)); + + A_ChamberGrit(amt,true); + amt=invoker.weaponstatus[BOSSS_GRIME]; + if(amt>40)amts.appendformat("You barely scrape the surface of this all-encrusting abomination."); + else if(amt>30)amts.appendformat("The gun will need a lot more work than this before it can be deployed again."); + else if(amt>20)amts.appendformat("You might get a few shots out of it now."); + else if(amt>10)amts.appendformat("It's better, but still not good."); + else amts.appendformat("Good to go."); + A_Log(amts,true); + } + BOJG O 1 offset(7,52); + BOJG O 1 offset(8,48); + BOJG O 1 offset(5,42); + BOJG O 1 offset(3,38); + BOJG O 1 offset(2,36); + goto althold; + jam: + BOJG K 0{ + int chm=invoker.weaponstatus[BOSSS_CHAMBER]; + if(chm<1)setweaponstate("chamber"); + else if(chm<3)invoker.weaponstatus[BOSSS_CHAMBER]+=2; + } + jamderp: + BOJG K 0 A_StartSound("weapons/rifleclick",8,CHANF_OVERLAP); + BOJG N 1 offset(4,38); + BOJG N 2 offset(2,36); + BOJG N 2 offset(4,38)A_MuzzleClimb(frandom(-0.5,0.6),frandom(-0.3,0.6)); + BOJG N 3 offset(2,36){ + A_MuzzleClimb(frandom(-0.5,0.6),frandom(-0.3,0.6)); + if(random(0,invoker.jamchance())<12){ + setweaponstate("chamber"); + if(invoker.weaponstatus[BOSSS_CHAMBER]>2) + invoker.weaponstatus[BOSSS_CHAMBER]-=2; + } + } + BOJG N 2 offset(4,38); + BOJG N 3 offset(2,36); + BOJG K 0 A_Refire("jamderp"); + goto ready; + chamber: + BOJG M 2 offset(4,38){ + if( + random(0,max(2,invoker.weaponstatus[BOSSS_GRIME]>>3)) + &&invoker.weaponstatus[BOSSS_CHAMBER]>2 + ){ + invoker.weaponstatus[BOSSS_CHAMBER]+=2; + A_MuzzleClimb( + -frandom(0.6,2.3),-frandom(0.6,2.3), + -frandom(0.6,1.3),-frandom(0.6,1.3), + -frandom(0.6,1.3),-frandom(0.6,1.3) + ); + setweaponstate("jamderp"); + }else A_StartSound("weapons/boltback",8); + } + BOJG N 2 offset(6,42)A_JumpIf(invoker.weaponstatus[0]&BOSSF_CUSTOMCHAMBER,1); + BOJG N 1 offset(6,42){ + if(gunbraced())A_MuzzleClimb( + frandom(-0.1,0.3),frandom(-0.1,0.3) + );else A_MuzzleClimb( + frandom(-0.2,0.8),frandom(-0.4,0.8) + ); + int jamch=invoker.jamchance(); + if(hd_debug)A_Log("jam chance: "..jamch); + if(random(0,100)1){ + A_SpawnItemEx( + "ZM66DroppedRound",cos(pitch)*8,1,height-7-sin(pitch)*8, + cos(pitch)*cos(angle-80)*4+vel.x, + cos(pitch)*sin(angle-80)*4+vel.y, + -sin(pitch)*4+vel.z, + 0,SXF_ABSOLUTEMOMENTUM|SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH + ); + } + //cycle new + if(invoker.weaponstatus[BOSSS_MAG]>0){ + invoker.weaponstatus[BOSSS_CHAMBER]=2; + invoker.weaponstatus[BOSSS_MAG]--; + }else invoker.weaponstatus[BOSSS_CHAMBER]=0; + } + BOJG O 1 offset(6,42) A_WeaponReady(WRF_NOFIRE); + BOJG O 0 A_Refire("althold"); + goto altholdend; + reload: + ---- A 0{invoker.weaponstatus[0]&=~BOSSF_DONTUSECLIPS;} + goto reloadstart; + altreload: + ---- A 0{invoker.weaponstatus[0]|=BOSSF_DONTUSECLIPS;} + goto reloadstart; + reloadstart: + BOJG K 1 offset(0,34); + BOJG K 1 offset(2,36); + BOJG K 1 offset(4,40); + BOJG K 2 offset(8,42){ + A_StartSound("weapons/rifleclick2",8,CHANF_OVERLAP,0.9,pitch:0.95); + A_MuzzleClimb(-frandom(0.4,0.8),frandom(0.4,1.4)); + } + BOJG K 4 offset(14,46){ + A_StartSound("weapons/rifleload",8,CHANF_OVERLAP); + A_MuzzleClimb(-frandom(0.4,0.8),frandom(0.4,1.4)); + } + BOJG K 0{ + int mg=invoker.weaponstatus[BOSSS_MAG]; + if(mg==10)setweaponstate("reloaddone"); + else if(invoker.weaponstatus[0]&BOSSF_DONTUSECLIPS)setweaponstate("loadhand"); + /*else if( + ( + mg<1 + ||!countinv("SevenMilAmmo") + )&&!HDMagAmmo.NothingLoaded(self,"HD7mClip") + )setweaponstate("loadclip");*/ + } + loadhand: + BOJG K 0 A_JumpIfInventory("FourMilAmmo",1,"loadhandloop"); + goto reloaddone; + loadhandloop: + BOJG K 4{ + int hnd=min( + countinv("FourMilAmmo"),6, + 10-invoker.weaponstatus[BOSSS_MAG] + ); + if(hnd<1){ + setweaponstate("reloaddone"); + return; + }else{ + A_TakeInventory("FourMilAmmo",hnd,TIF_NOTAKEINFINITE); + invoker.weaponstatus[BOSSS_HAND]=hnd; + A_StartSound("weapons/pocket",9); + } + } + loadone: + BOJG K 2 offset(16,50) A_JumpIf(invoker.weaponstatus[BOSSS_HAND]<1,"loadhandnext"); + BOJG K 4 offset(14,46){ + invoker.weaponstatus[BOSSS_HAND]--; + if(!random(0,40)){ + invoker.owner.A_StartSound("weapons/bigcrack",8,CHANF_OVERLAP); + invoker.owner.A_SpawnItemEx("WallChunk",12,0,invoker.owner.height-12,4,frandom(-2,2),frandom(2,4)); + } + else { + invoker.weaponstatus[BOSSS_MAG]++; + A_StartSound("weapons/rifleclick2",8); + } + }loop; + loadhandnext: + BOJG K 8 offset(16,48){ + if( + PressingReload()|| + PressingFire()|| + PressingAltFire()|| + PressingZoom()|| + !countinv("FourMilAmmo") //don't strip clips automatically + )setweaponstate("reloaddone"); + else A_StartSound("weapons/pocket",9); + }goto loadhandloop; + reloaddone: + BOJG K 1 offset(4,40); + BOJG K 1 offset(2,36); + BOJG K 1 offset(0,34); + goto nope; + unload: + BOJG K 1 offset(0,34); + BOJG K 1 offset(2,36); + BOJG K 1 offset(4,40); + BOJG K 2 offset(8,42){ + A_MuzzleClimb(-frandom(0.4,0.8),frandom(0.4,1.4)); + A_StartSound("weapons/rifleclick2",8); + } + BOJG K 4 offset (14,46){ + A_MuzzleClimb(-frandom(0.4,0.8),frandom(0.4,1.4)); + A_StartSound("weapons/rifleload",8); + } + unloadloop: + BOJG K 4 offset(3,41){ + if(invoker.weaponstatus[BOSSS_MAG]<1)setweaponstate("unloaddone"); + else{ + A_StartSound("weapons/rifleclick2",8); + invoker.weaponstatus[BOSSS_MAG]--; + if(A_JumpIfInventory("FourMilAmmo",0,"null")){ + A_SpawnItemEx( + "ZM66DroppedRound",cos(pitch)*8,0,height-7-sin(pitch)*8, + cos(pitch)*cos(angle-40)*1+vel.x, + cos(pitch)*sin(angle-40)*1+vel.y, + -sin(pitch)*1+vel.z, + 0,SXF_ABSOLUTEMOMENTUM| + SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH + ); + }else A_GiveInventory("FourMilAmmo",1); + } + } + BOJG K 2 offset(2,42); + BOJG K 0{ + if( + PressingReload()|| + PressingFire()|| + PressingAltFire()|| + PressingZoom() + )setweaponstate("unloaddone"); + }loop; + unloaddone: + BOJG K 2 offset(2,42); + BOJG K 3 offset(3,41); + BOJG K 1 offset(4,40) A_StartSound("weapons/rifleclick",8); + BOJG K 1 offset(2,36); + BOJG K 1 offset(0,34); + goto ready; + + spawn: + BOJG Z -1; + } +} + +class BossRifleFour:IdleDummy{ + states{ + spawn: + TNT1 A 0 nodelay{ + double px = pos.x+randompick(-3,3); + double py = pos.y+randompick(-3,3); + let ass = HDMagAmmo(spawn("HD4mMag",(px,py,pos.z),ALLOW_REPLACE)); + if(ass) { + ass.mags.clear(); + ass.amount=0; + ass.AddAMag(50-randomiseamount()); + } + px = pos.x+randompick(-2,2); + py = pos.y+randompick(-2,2); + ass = HDMagAmmo(spawn("HD4mMag",(px,py,pos.z),ALLOW_REPLACE)); + if(ass) { + ass.mags.clear(); + ass.amount=0; + ass.AddAMag(50-randomiseamount()); + } + px = pos.x+randompick(-1,1); + py = pos.y+randompick(-1,1); + ass = HDMagAmmo(spawn("HD4mMag",(px,py,pos.z),ALLOW_REPLACE)); + if(ass) { + ass.mags.clear(); + ass.amount=0; + ass.AddAMag(50-randomiseamount()); + } + + let ggg=BossRifle(spawn("BossRifleButIts4mm",pos,ALLOW_REPLACE)); + if(!ggg)return; + ggg.special=special; + ggg.vel=vel; + for(int i=0;i<5;i++)ggg.args[i]=args[i]; + }stop; + } + int randomiseamount(){ + if (!random(0,3)) return 1+randomiseamount(); + else return 0; + } +} \ No newline at end of file diff --git a/zscript/Hexadoken/Weapons/50OMGBoss.zsc b/zscript/Hexadoken/Weapons/Boss Rifle Variants/50 OMG Boss.zsc similarity index 100% rename from zscript/Hexadoken/Weapons/50OMGBoss.zsc rename to zscript/Hexadoken/Weapons/Boss Rifle Variants/50 OMG Boss.zsc diff --git a/zscript/Hexadoken/Weapons/Boss Rifle Variants/9mm Boss.zsc b/zscript/Hexadoken/Weapons/Boss Rifle Variants/9mm Boss.zsc new file mode 100644 index 0000000..3c1ed51 --- /dev/null +++ b/zscript/Hexadoken/Weapons/Boss Rifle Variants/9mm Boss.zsc @@ -0,0 +1,556 @@ +class BossRifleButIts9mm:BossRifle{ + default{ + tag "$TAG_9MMBOSS"; + hdweapon.refid ""; + } + + override string pickupmessage(){ + return "You got the "..gettag().."! It's a bit greasy..."; + } + + class nineclip; + override void postbeginplay(){ + super.postbeginplay(); + string lol = "HD9mClip"; + nineclip = lol; + } + override double weaponbulk(){ + return 144+weaponstatus[BOSSS_MAG]*ENC_9_LOADED; + } + override void DropOneAmmo(int amt){ + if(owner){ + if(owner.countinv("HDPistolAmmo"))owner.A_DropInventory("HDPistolAmmo",10); + //else owner.A_DropInventory("HD7mClip",1); + } + } + override string gethelptext(){ + return + WEPHELP_FIRESHOOT + ..WEPHELP_ALTFIRE.." Work bolt\n" + ..WEPHELP_RELOADRELOAD + ..WEPHELP_ZOOM.."+"..WEPHELP_FIREMODE.." Zoom\n" + ..WEPHELP_ZOOM.."+"..WEPHELP_USE.." Bullet drop\n" + ..WEPHELP_ALTFIRE.."+"..WEPHELP_UNLOAD.." Unload chamber/Clean rifle\n" + ..WEPHELP_UNLOADUNLOAD + ; + } + override void ForceBasicAmmo(){ + owner.A_SetInventory("HDPistolAmmo",11); + } + override string,double getpickupsprite(){return "BOJGY0",1.;} + override void DrawHUDStuff(HDStatusBar sb,HDWeapon hdw,HDPlayerPawn hpl){ + if(sb.hudlevel==1){ + if (nineclip) { + sb.drawimage("9CLPA0",(-54,-10),sb.DI_SCREEN_CENTER_BOTTOM,scale:(2.1,2.1)); + sb.drawnum(hpl.countinv(nineclip),-51,-8,sb.DI_SCREEN_CENTER_BOTTOM); + } + else { + sb.drawimage("PRNDA0",(-54,-10),sb.DI_SCREEN_CENTER_BOTTOM,scale:(2.1,2.1)); + sb.drawnum(hpl.countinv("HDPistolAmmo"),-51,-8,sb.DI_SCREEN_CENTER_BOTTOM); + } + } + sb.drawwepnum(hdw.weaponstatus[BOSSS_MAG],10); + sb.drawwepcounter(hdw.weaponstatus[BOSSS_CHAMBER], + -16,-10,"blank","RBRSA1A5","RBRSA3A7","RBRSA4A6" + ); + sb.drawstring( + sb.mAmountFont,string.format("%.1f",hdw.weaponstatus[BOSSS_ZOOM]*0.1), + (-36,-18),sb.DI_SCREEN_CENTER_BOTTOM|sb.DI_TEXT_ALIGN_RIGHT,Font.CR_DARKGRAY + ); + sb.drawstring( + sb.mAmountFont,string.format("%.1f",hdw.weaponstatus[BOSSS_DROPADJUST]*0.1), + (-16,-18),sb.DI_SCREEN_CENTER_BOTTOM|sb.DI_TEXT_ALIGN_RIGHT,Font.CR_WHITE + ); + } + override void InitializeWepStats(bool idfa){ + weaponspecial = 1337; //UaS sling compatbility + super.InitializeWepStats(idfa); + } + states{ + select0: + BOJG F 0; + goto select0bfg; + deselect0: + BOJG F 0; + goto deselect0big; + + ready: + BOJG F 1{ + if(pressingzoom()){ + if(player.cmd.buttons&BT_USE){ + A_ZoomAdjust(BOSSS_DROPADJUST,0,600,BT_USE); + }else if(invoker.weaponstatus[0]&BOSSF_FRONTRETICLE)A_ZoomAdjust(BOSSS_ZOOM,12,40); + else A_ZoomAdjust(BOSSS_ZOOM,5,60); + A_WeaponReady(WRF_NONE); + }else A_WeaponReady(WRF_ALL); + }goto readyend; + user3: + ---- A 0 { + //if (invoker.nineclip) A_MagManager(invoker.nineclip); + //else A_MagManager("HDBattery"); + A_MagManager("HD9mClip"); + } + goto ready; + fire: + BOJG F 1 A_JumpIf(invoker.weaponstatus[BOSSS_CHAMBER]==2,"shoot"); + goto ready; + shoot: + BOJG F 1{ + A_Gunflash(); + invoker.weaponstatus[BOSSS_CHAMBER]=1; + A_StartSound("weapons/9mmboss",CHAN_WEAPON,CHANF_OVERLAP, + pitch:!(invoker.weaponstatus[0]&BOSSF_CUSTOMCHAMBER)?1.1:1. + ); + A_AlertMonsters(); + + HDBulletActor.FireBullet(self,"HDB_9", + aimoffy:(-1./600.)*invoker.weaponstatus[BOSSS_DROPADJUST], + speedfactor:1.1*(invoker.weaponstatus[0]&BOSSF_CUSTOMCHAMBER)?0.99:1.07 + ); + A_MuzzleClimb( + 0,0, + -frandom(0.06,0.12),-frandom(0.09,0.15), + -frandom(0.12,0.2),-frandom(0.18,0.3), + -frandom(0.12,0.2),-frandom(0.18,0.3) + ); + } + BOJG V 1; + BOJG V 1 A_JumpIf(gunbraced(),"ready"); + goto ready; + flash: + BARF A 1 bright{ + A_Light1(); + HDFlashAlpha(-96); + A_ZoomRecoil(0.98); + A_ChamberGrit(randompick(0,0,0,0,0,1,1,1,1,-1)); + } + TNT1 A 0 A_Light0(); + stop; + altfire: + BOJG F 1 offset(0,34) A_WeaponBusy(); + BOJG G 2 offset(2,36) A_JumpIf(invoker.weaponstatus[0]&BOSSF_CUSTOMCHAMBER,1); + BOJG G 1 offset(4,38){ + if(invoker.weaponstatus[BOSSS_CHAMBER]>2)setweaponstate("jamderp"); + } + BOJG G 1 offset(0,34); + BOJG G 0 A_ChamberGrit(randompick(0,0,0,0,-1,1,2),true); + BOJG G 0 A_Refire("chamber"); + goto ready; + althold: + BOJG J 1 A_WeaponReady(WRF_NOFIRE); + BOJG J 1{ + A_ClearRefire(); + bool eww=invoker.weaponstatus[BOSSS_GRIME]>10; + bool chempty=invoker.weaponstatus[BOSSS_CHAMBER]<1; + if(pressingunload()){ + if(chempty){ + return resolvestate("altholdclean"); + }else{ + invoker.weaponstatus[0]|=BOSSF_UNLOADONLY; + return resolvestate("loadchamber"); + } + }else if(pressingreload()){ + if( + !chempty + ){ + invoker.weaponstatus[0]|=BOSSF_UNLOADONLY; + return resolvestate("loadchamber"); + }else if( + eww + ){ + return resolvestate("altholdclean"); + }else if( + countinv("SevenMilAmmo") + ){ + invoker.weaponstatus[0]&=~BOSSF_UNLOADONLY; + return resolvestate("loadchamber"); + } + } + if(pressingaltfire())return resolvestate("althold"); + return resolvestate("altholdend"); + } + altholdend: + BOJG J 0 A_StartSound("weapons/boltfwd",8); + BOJG IH 2 A_WeaponReady(WRF_NOFIRE); + BOJG G 3 offset(2,36){ + A_WeaponReady(WRF_NOFIRE); + if(invoker.weaponstatus[0]&BOSSF_CUSTOMCHAMBER)A_SetTics(1); + } + goto ready; + loadchamber: + BOJG J 1 offset(2,36) A_ClearRefire(); + BOJG J 1 offset(3,38); + BOJG J 1 offset(5,42); + BOJG J 1 offset(8,48) A_StartSound("weapons/pocket",9); + BOJG J 1 offset(9,52) A_MuzzleClimb(frandom(-0.2,0.2),0.2,frandom(-0.2,0.2),0.2,frandom(-0.2,0.2),0.2); + BOJG J 2 offset(8,60); + BOJG J 2 offset(7,72); + TNT1 A 18 A_StartSound("weapons/pocket",9); + TNT1 A 4{ + A_StartSound("weapons/bossload",8,volume:0.7); + if(invoker.weaponstatus[0]&BOSSF_UNLOADONLY){ + int chm=invoker.weaponstatus[BOSSS_CHAMBER]; + invoker.weaponstatus[BOSSS_CHAMBER]=0; + if(chm<2||A_JumpIfInventory("HDPistolAmmo",0,"null")){ + class whatkind=chm==2?"HDLoose9mm":"HDSpent9mm"; + actor rrr=spawn(whatkind,pos+(cos(angle)*10,sin(angle)*10,height-12),ALLOW_REPLACE); + rrr.angle=angle;rrr.A_ChangeVelocity(1,2,1,CVF_RELATIVE); + }else HDF.Give(self,"HDPistolAmmo",1); + A_ChamberGrit(randompick(0,0,0,0,-1,1),true); + }else{ + A_TakeInventory("HDPistolAmmo",1,TIF_NOTAKEINFINITE); + invoker.weaponstatus[BOSSS_CHAMBER]=2; + } + } + BOJG J 2 offset(7,72); + BOJG J 2 offset(8,60); + BOJG J 1 offset(7,52); + BOJG J 1 offset(5,42); + BOJG J 1 offset(3,38); + BOJG J 1 offset(3,35); + goto althold; + altholdclean: + BOJG J 1 offset(2,36) A_ClearRefire(); + BOJG J 1 offset(3,38); + BOJG J 1 offset(5,42) A_Log("Looking inside that chamber...",true); + BOJG J 1 offset(8,48) A_StartSound("weapons/pocket",9); + BOJG J 1 offset(7,52) A_MuzzleClimb(frandom(-0.2,0.2),0.2,frandom(-0.2,0.2),0.2,frandom(-0.2,0.2),0.2); + TNT1 A 3 A_StartSound("weapons/pocket",10); + TNT1 AAAA 4 A_MuzzleClimb(frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2)); + TNT1 A 3 A_StartSound("weapons/pocket",9); + TNT1 AAAA 4 A_MuzzleClimb(frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2)); + TNT1 A 40{ + A_StartSound("weapons/pocket",9); + int amt=invoker.weaponstatus[BOSSS_GRIME]; + string amts="There doesn't seem to be much. "; + if(amt>40)amts="What the FUCK. "; + else if(amt>30)amts="About time - this gun is barely functional. "; + else if(amt>20)amts="This is starting to gum up badly. "; + else if(amt>10)amts="It can use some cleaning. "; + + static const string cleanverbs[]={"extract","scrape off","wipe away","carefully remove","dump out","pick out","blow off","shake out","scrub off","fish out"}; + static const string contaminants[]={"some dust","a lot of dust","a bit of powder residue","a disturbing amount of powder residue","some excess grease","a layer of soot","some iron filings","a bit of hair","an eyelash","a patch of dried blood","a bit of rust","a crumb","a dead insect","ashes","some loose bits of skin","a sticky fluid of some sort","wow some fucking *gunk*","a booger","trace fecal matter","yet even more of that anonymous grey debris that all those bullet impacts make","a dollop of strawberry jam","the dried husk of a pinto bean with residual hog components","a tiny cancerous nodule of Second Flesh","some crystalline buildup of congealed Frag","a nesting queen space ant","a single modern-day transistor","a tiny Boss rifle (also jammed)","a colourless film of darkness made visible"}; + static const string actionparts[]={"bolt carrier","main extractor","auxiliary extractor","cam pin","bolt head","striker","firing pin spring","ejector slot","striker spring","ejector spring"}; + for(int i=amt;i>0;i-=random(8,16))amts.appendformat("You %s %s from the %s. ", + cleanverbs[random(0,cleanverbs.size()-1)], + contaminants[random(0,random(0,contaminants.size()-1))], + actionparts[random(0,random((actionparts.size()>>1),actionparts.size()-1))] + ); + amts.appendformat("\n"); + + amt=randompick(-3,-5,-5,-random(8,16)); + + A_ChamberGrit(amt,true); + amt=invoker.weaponstatus[BOSSS_GRIME]; + if(amt>40)amts.appendformat("You barely scrape the surface of this all-encrusting abomination."); + else if(amt>30)amts.appendformat("The gun will need a lot more work than this before it can be deployed again."); + else if(amt>20)amts.appendformat("You might get a few shots out of it now."); + else if(amt>10)amts.appendformat("It's better, but still not good."); + else amts.appendformat("Good to go."); + A_Log(amts,true); + } + BOJG J 1 offset(7,52); + BOJG J 1 offset(8,48); + BOJG J 1 offset(5,42); + BOJG J 1 offset(3,38); + BOJG J 1 offset(2,36); + goto althold; + jam: + BOJG F 0{ + int chm=invoker.weaponstatus[BOSSS_CHAMBER]; + if(chm<1)setweaponstate("chamber"); + else if(chm<3)invoker.weaponstatus[BOSSS_CHAMBER]+=2; + } + jamderp: + BOJG F 0 A_StartSound("weapons/rifleclick",8,CHANF_OVERLAP); + BOJG I 1 offset(4,38); + BOJG I 2 offset(2,36); + BOJG I 2 offset(4,38)A_MuzzleClimb(frandom(-0.5,0.6),frandom(-0.3,0.6)); + BOJG I 3 offset(2,36){ + A_MuzzleClimb(frandom(-0.5,0.6),frandom(-0.3,0.6)); + if(random(0,invoker.jamchance())<12){ + setweaponstate("chamber"); + if(invoker.weaponstatus[BOSSS_CHAMBER]>2) + invoker.weaponstatus[BOSSS_CHAMBER]-=2; + } + } + BOJG I 2 offset(4,38); + BOJG I 3 offset(2,36); + BOJG F 0 A_Refire("jamderp"); + goto ready; + chamber: + BOJG H 2 offset(4,38){ + if( + random(0,max(2,invoker.weaponstatus[BOSSS_GRIME]>>3)) + &&invoker.weaponstatus[BOSSS_CHAMBER]>2 + ){ + invoker.weaponstatus[BOSSS_CHAMBER]+=2; + A_MuzzleClimb( + -frandom(0.6,2.3),-frandom(0.6,2.3), + -frandom(0.6,1.3),-frandom(0.6,1.3), + -frandom(0.6,1.3),-frandom(0.6,1.3) + ); + setweaponstate("jamderp"); + }else A_StartSound("weapons/boltback",8); + } + BOJG I 2 offset(6,42)A_JumpIf(invoker.weaponstatus[0]&BOSSF_CUSTOMCHAMBER,1); + BOJG I 1 offset(6,42){ + if(gunbraced())A_MuzzleClimb( + frandom(-0.1,0.3),frandom(-0.1,0.3) + );else A_MuzzleClimb( + frandom(-0.2,0.8),frandom(-0.4,0.8) + ); + int jamch=invoker.jamchance(); + if(hd_debug)A_Log("jam chance: "..jamch); + if(random(0,100)1){ + A_SpawnItemEx( + "HDLoose9mm",cos(pitch)*8,1,height-7-sin(pitch)*8, + cos(pitch)*cos(angle-80)*4+vel.x, + cos(pitch)*sin(angle-80)*4+vel.y, + -sin(pitch)*4+vel.z, + 0,SXF_ABSOLUTEMOMENTUM|SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH + ); + }else if(chm==1){ + A_SpawnItemEx( + "HDSpent9mm",cos(pitch)*8,1,height-7-sin(pitch)*8, + cos(pitch)*cos(angle-80)*6+vel.x, + cos(pitch)*sin(angle-80)*6+vel.y, + -sin(pitch)*6+vel.z, + 0,SXF_ABSOLUTEMOMENTUM|SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH + ); + } + //cycle new + if(invoker.weaponstatus[BOSSS_MAG]>0){ + invoker.weaponstatus[BOSSS_CHAMBER]=2; + invoker.weaponstatus[BOSSS_MAG]--; + }else invoker.weaponstatus[BOSSS_CHAMBER]=0; + } + BOJG J 1 offset(6,42) A_WeaponReady(WRF_NOFIRE); + BOJG J 0 A_Refire("althold"); + goto altholdend; + reload: + ---- A 0{invoker.weaponstatus[0]&=~BOSSF_DONTUSECLIPS;} + goto reloadstart; + altreload: + ---- A 0{invoker.weaponstatus[0]|=BOSSF_DONTUSECLIPS;} + goto reloadstart; + reloadstart: + BOJG F 1 offset(0,34); + BOJG F 1 offset(2,36); + BOJG F 1 offset(4,40); + BOJG F 2 offset(8,42){ + A_StartSound("weapons/rifleclick2",8,CHANF_OVERLAP,0.9,pitch:0.95); + A_MuzzleClimb(-frandom(0.4,0.8),frandom(0.4,1.4)); + } + BOJG F 4 offset(14,46){ + A_StartSound("weapons/rifleload",8,CHANF_OVERLAP); + A_MuzzleClimb(-frandom(0.4,0.8),frandom(0.4,1.4)); + } + BOJG F 0{ + int mg=invoker.weaponstatus[BOSSS_MAG]; + if(mg==10)setweaponstate("reloaddone"); + else if(invoker.weaponstatus[0]&BOSSF_DONTUSECLIPS)setweaponstate("loadhand"); + else if(invoker.nineclip && + ( + mg<1 + ||!countinv("HDPistolAmmo") + )&&!HDMagAmmo.NothingLoaded(self,invoker.nineclip) + )setweaponstate("loadclip"); + } + loadhand: + BOJG F 0 A_JumpIfInventory("HDPistolAmmo",1,"loadhandloop"); + goto reloaddone; + loadhandloop: + BOJG F 4{ + int hnd=min( + countinv("HDPistolAmmo"),4, + 10-invoker.weaponstatus[BOSSS_MAG] + ); + if(hnd<1){ + setweaponstate("reloaddone"); + return; + }else{ + A_TakeInventory("HDPistolAmmo",hnd,TIF_NOTAKEINFINITE); + invoker.weaponstatus[BOSSS_HAND]=hnd; + A_StartSound("weapons/pocket",9); + } + } + loadone: + BOJG F 2 offset(16,50) A_JumpIf(invoker.weaponstatus[BOSSS_HAND]<1,"loadhandnext"); + BOJG F 4 offset(14,46){ + invoker.weaponstatus[BOSSS_HAND]--; + invoker.weaponstatus[BOSSS_MAG]++; + A_StartSound("weapons/rifleclick2",8); + }loop; + loadhandnext: + BOJG F 8 offset(16,48){ + if( + PressingReload()|| + PressingFire()|| + PressingAltFire()|| + PressingZoom()|| + !countinv("HDPistolAmmo") //don't strip clips automatically + )setweaponstate("reloaddone"); + else A_StartSound("weapons/pocket",9); + }goto loadhandloop; + loadclip: + BOJG F 0 A_JumpIf(invoker.weaponstatus[BOSSS_MAG]>9,"reloaddone"); + BOJG F 3 offset(16,50){ + let ccc=hdmagammo(findinventory(invoker.nineclip)); + if(ccc){ + //find the last mag that has anything in it and load from that + bool fullmag=false; + int magindex=-1; + for(int i=ccc.mags.size()-1;i>=0;i--){ + if(ccc.mags[i]>=10)fullmag=true; + if(magindex<0&&ccc.mags[i]>0)magindex=i; + if(fullmag&&magindex>0)break; + } + if(magindex<0){ + setweaponstate("reloaddone"); + return; + } + + //load the whole clip at once if possible + if( + fullmag + &&invoker.weaponstatus[BOSSS_MAG]<1 + ){ + setweaponstate("loadwholeclip"); + return; + } + + //strip one round and load it + A_StartSound("weapons/rifleclick2",CHAN_WEAPONBODY); + invoker.weaponstatus[BOSSS_MAG]++; + ccc.mags[magindex]--; + } + } + BOJG F 5 offset(16,52) A_JumpIf( + PressingReload()|| + PressingFire()|| + PressingAltFire()|| + PressingZoom() + ,"reloaddone"); + loop; + loadwholeclip: + BOJG F 4 offset(16,50) A_StartSound("weapons/rifleclick2",8); + BOJG FFF 3 offset(17,52) A_StartSound("weapons/rifleclick2",8,pitch:1.01); + BOJG FFF 2 offset(16,50) A_StartSound("weapons/rifleclick2",8,CHANF_OVERLAP,pitch:1.02); + BOJG FFF 1 offset(15,48) A_StartSound("weapons/rifleclick2",8,CHANF_OVERLAP,pitch:1.02); + BOJG F 2 offset(14,46){ + A_StartSound("weapons/rifleclick",CHAN_WEAPONBODY); + let ccc=hdmagammo(findinventory(invoker.nineclip)); + if(ccc){ + invoker.weaponstatus[BOSSS_MAG]=ccc.TakeMag(true); + if(pressingreload()){ + ccc.addamag(0); + A_SetTics(10); + A_StartSound("weapons/pocket",CHAN_POCKETS); + }else HDMagAmmo.SpawnMag(self,invoker.nineclip,0); + } + }goto reloaddone; + reloaddone: + BOJG F 1 offset(4,40); + BOJG F 1 offset(2,36); + BOJG F 1 offset(0,34); + goto nope; + unload: + BOJG F 1 offset(0,34); + BOJG F 1 offset(2,36); + BOJG F 1 offset(4,40); + BOJG F 2 offset(8,42){ + A_MuzzleClimb(-frandom(0.4,0.8),frandom(0.4,1.4)); + A_StartSound("weapons/rifleclick2",8); + } + BOJG F 4 offset (14,46){ + A_MuzzleClimb(-frandom(0.4,0.8),frandom(0.4,1.4)); + A_StartSound("weapons/rifleload",8); + } + unloadloop: + BOJG F 4 offset(3,41){ + if(invoker.weaponstatus[BOSSS_MAG]<1)setweaponstate("unloaddone"); + else{ + A_StartSound("weapons/rifleclick2",8); + invoker.weaponstatus[BOSSS_MAG]--; + if(A_JumpIfInventory("HDPistolAmmo",0,"null")){ + A_SpawnItemEx( + "HDLoose9mm",cos(pitch)*8,0,height-7-sin(pitch)*8, + cos(pitch)*cos(angle-40)*1+vel.x, + cos(pitch)*sin(angle-40)*1+vel.y, + -sin(pitch)*1+vel.z, + 0,SXF_ABSOLUTEMOMENTUM| + SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH + ); + }else A_GiveInventory("HDPistolAmmo",1); + } + } + BOJG F 2 offset(2,42); + BOJG F 0{ + if( + PressingReload()|| + PressingFire()|| + PressingAltFire()|| + PressingZoom() + )setweaponstate("unloaddone"); + }loop; + unloaddone: + BOJG F 2 offset(2,42); + BOJG F 3 offset(3,41); + BOJG F 1 offset(4,40) A_StartSound("weapons/rifleclick",8); + BOJG F 1 offset(2,36); + BOJG F 1 offset(0,34); + goto ready; + + spawn: + BOJG Y -1; + } +} + +class BossRifleNine:IdleDummy{ + states{ + spawn: + TNT1 A 0 nodelay{ + string lol = "HD9mClip"; + class nineclip = lol; + + let ass = spawn("HD9mBoxPickup",(pos.x+randompick(-4,-2,2,4),pos.y+randompick(-4,-2,2,4),pos.z),ALLOW_REPLACE); + HDUPK box = HDUPK(ass); + HDMagAmmo mag = HDMagAmmo(ass); + if(box) { + if (nineclip) { + box.amount = 30; + } + else box.amount = 60; + } + else if (mag) { + if (nineclip) { + mag.mags.clear(); + mag.amount=0; + mag.AddAMag(30); + } + else { + mag.mags.clear(); + mag.amount=0; + mag.AddAMag(60); + } + } + if (nineclip) { + spawn(nineclip,(pos.x+randompick(-1,1),pos.y+randompick(-1,1),pos.z),ALLOW_REPLACE); + spawn(nineclip,(pos.x+randompick(-3,3),pos.y+randompick(-3,3),pos.z),ALLOW_REPLACE); + spawn(nineclip,(pos.x+randompick(-5,5),pos.y+randompick(-5,5),pos.z),ALLOW_REPLACE); + } + + let ggg=BossRifle(spawn("BossRifleButIts9mm",pos,ALLOW_REPLACE)); + if(!ggg)return; + ggg.special=special; + ggg.vel=vel; + for(int i=0;i<5;i++)ggg.args[i]=args[i]; + }stop; + } +} \ No newline at end of file diff --git a/zscript/Hexadoken/Weapons/Boss Rifle Variants/Hexadoken's Boss.zsc b/zscript/Hexadoken/Weapons/Boss Rifle Variants/Hexadoken's Boss.zsc new file mode 100644 index 0000000..6f8a6c2 --- /dev/null +++ b/zscript/Hexadoken/Weapons/Boss Rifle Variants/Hexadoken's Boss.zsc @@ -0,0 +1,482 @@ +class BossRifleButItsFuckingPink:BossRifle{ + default{ + tag "$TAG_5MMBOSS"; + hdweapon.refid ""; + } + + override string pickupmessage(){ + return "You got "..gettag().."!"; + } + + class lrammo, actualammo; + class looseammo, spentammo; + override void postbeginplay(){ + super.postbeginplay(); + string lol = "HD5MM_Ammo"; lrammo = lol; + lol = "HDSpent5mmMR"; spentammo = lol; + if (lrammo) { + actualammo = lrammo; + looseammo = "HDLoose5mmMR"; + } + else { + actualammo = "HDPistolAmmo"; + looseammo = "HDLoose9mm"; + spentammo = "HDSpent9mm"; + } + } + override double weaponbulk(){ + return 144+weaponstatus[BOSSS_MAG]*ENC_9_LOADED*0.05; + } + override void DropOneAmmo(int amt){ + if(owner){ + if(owner.countinv(actualammo))owner.A_DropInventory(actualammo,10); + } + } + override void ForceBasicAmmo(){ + owner.A_SetInventory(actualammo,28); + } + override string gethelptext(){ + return + WEPHELP_FIRESHOOT + ..WEPHELP_ALTFIRE.." Work bolt\n" + ..WEPHELP_RELOADRELOAD + ..WEPHELP_ZOOM.."+"..WEPHELP_FIREMODE.." Zoom\n" + ..WEPHELP_ZOOM.."+"..WEPHELP_USE.." Bullet drop\n" + ..WEPHELP_ALTFIRE.."+"..WEPHELP_UNLOAD.." Unload chamber/Clean rifle\n" + ..WEPHELP_UNLOADUNLOAD + ; + } + override string,double getpickupsprite(){return "BOJG]0",1.;} + override void DrawHUDStuff(HDStatusBar sb,HDWeapon hdw,HDPlayerPawn hpl){ + if(sb.hudlevel==1){ + if (lrammo) + sb.drawimage("5MMZA0",(-54,-10),sb.DI_SCREEN_CENTER_BOTTOM,scale:(2.1,2.1)); + else + sb.drawimage("PRNDA0",(-54,-10),sb.DI_SCREEN_CENTER_BOTTOM,scale:(2.1,2.1)); + sb.drawnum(hpl.countinv(actualammo),-51,-8,sb.DI_SCREEN_CENTER_BOTTOM); + } + sb.drawwepnum(hdw.weaponstatus[BOSSS_MAG],27); + sb.drawwepcounter(hdw.weaponstatus[BOSSS_CHAMBER], + -16,-10,"blank","RBRSA1A5","RBRSA3A7","RBRSA4A6" + ); + sb.drawstring( + sb.mAmountFont,string.format("%.1f",hdw.weaponstatus[BOSSS_ZOOM]*0.1), + (-36,-18),sb.DI_SCREEN_CENTER_BOTTOM|sb.DI_TEXT_ALIGN_RIGHT,Font.CR_DARKGRAY + ); + sb.drawstring( + sb.mAmountFont,string.format("%.1f",hdw.weaponstatus[BOSSS_DROPADJUST]*0.1), + (-16,-18),sb.DI_SCREEN_CENTER_BOTTOM|sb.DI_TEXT_ALIGN_RIGHT,Font.CR_WHITE + ); + } + states{ + select0: + BOJG P 0; + goto select0bfg; + deselect0: + BOJG P 0; + goto deselect0big; + + ready: + BOJG P 1{ + if(pressingzoom()){ + if(player.cmd.buttons&BT_USE){ + A_ZoomAdjust(BOSSS_DROPADJUST,0,600,BT_USE); + }else if(invoker.weaponstatus[0]&BOSSF_FRONTRETICLE)A_ZoomAdjust(BOSSS_ZOOM,12,40); + else A_ZoomAdjust(BOSSS_ZOOM,5,60); + A_WeaponReady(WRF_NONE); + }else A_WeaponReady(WRF_ALL); + }goto readyend; + user3: + ---- A 0 A_MagManager("HDBattery"); + goto ready; + fire: + BOJG P 1 A_JumpIf(invoker.weaponstatus[BOSSS_CHAMBER]==2,"shoot"); + goto ready; + shoot: + BOJG P 1{ + A_Gunflash(); + invoker.weaponstatus[BOSSS_CHAMBER]=1; + A_StartSound("weapons/pinkboss",CHAN_WEAPON,CHANF_OVERLAP, + pitch:!(invoker.weaponstatus[0]&BOSSF_CUSTOMCHAMBER)?1.1:1. + ); + A_AlertMonsters(); + + HDBulletActor.FireBullet(self,"HDB_Pink", + aimoffy:(-1./600.)*invoker.weaponstatus[BOSSS_DROPADJUST], + speedfactor:(invoker.weaponstatus[0]&BOSSF_CUSTOMCHAMBER)?0.99:1.07 + ); + A_MuzzleClimb( + 0,0, + -frandom(0.03,0.06),-frandom(0.04,0.08), + -frandom(0.06,0.1),-frandom(0.09,0.15), + -frandom(0.06,0.1),-frandom(0.09,0.15) + ); + } + BOJG X 1; + BOJG X 1 A_JumpIf(gunbraced(),"ready"); + goto ready; + flash: + BARF A 1 bright{ + A_Light1(); + HDFlashAlpha(-96); + A_ZoomRecoil(0.99); + A_ChamberGrit(randompick(0,0,0,0,0,1,1,1,1,-1)); + } + TNT1 A 0 A_Light0(); + stop; + altfire: + BOJG P 1 offset(0,34) A_WeaponBusy(); + BOJG Q 2 offset(2,36) A_JumpIf(invoker.weaponstatus[0]&BOSSF_CUSTOMCHAMBER,1); + BOJG Q 1 offset(4,38){ + if(invoker.weaponstatus[BOSSS_CHAMBER]>2)setweaponstate("jamderp"); + } + BOJG Q 1 offset(0,34); + BOJG Q 0 A_ChamberGrit(randompick(0,0,0,0,-1,1,2),true); + BOJG Q 0 A_Refire("chamber"); + goto ready; + althold: + BOJG T 1 A_WeaponReady(WRF_NOFIRE); + BOJG T 1{ + A_ClearRefire(); + bool eww=invoker.weaponstatus[BOSSS_GRIME]>10; + bool chempty=invoker.weaponstatus[BOSSS_CHAMBER]<1; + if(pressingunload()){ + if(chempty){ + return resolvestate("altholdclean"); + }else{ + invoker.weaponstatus[0]|=BOSSF_UNLOADONLY; + return resolvestate("loadchamber"); + } + }else if(pressingreload()){ + if( + !chempty + ){ + invoker.weaponstatus[0]|=BOSSF_UNLOADONLY; + return resolvestate("loadchamber"); + }else if( + eww + ){ + return resolvestate("altholdclean"); + }else if( + countinv("SevenMilAmmo") + ){ + invoker.weaponstatus[0]&=~BOSSF_UNLOADONLY; + return resolvestate("loadchamber"); + } + } + if(pressingaltfire())return resolvestate("althold"); + return resolvestate("altholdend"); + } + altholdend: + BOJG T 0 A_StartSound("weapons/boltfwd",8); + BOJG SR 2 A_WeaponReady(WRF_NOFIRE); + BOJG Q 3 offset(2,36){ + A_WeaponReady(WRF_NOFIRE); + if(invoker.weaponstatus[0]&BOSSF_CUSTOMCHAMBER)A_SetTics(1); + } + goto ready; + loadchamber: + BOJG T 1 offset(2,36) A_ClearRefire(); + BOJG T 1 offset(3,38); + BOJG T 1 offset(5,42); + BOJG T 1 offset(8,48) A_StartSound("weapons/pocket",9); + BOJG T 1 offset(9,52) A_MuzzleClimb(frandom(-0.2,0.2),0.2,frandom(-0.2,0.2),0.2,frandom(-0.2,0.2),0.2); + BOJG T 2 offset(8,60); + BOJG T 2 offset(7,72); + TNT1 A 18 A_StartSound("weapons/pocket",9); + TNT1 A 4{ + A_StartSound("weapons/bossload",8,volume:0.7); + if(invoker.weaponstatus[0]&BOSSF_UNLOADONLY){ + int chm=invoker.weaponstatus[BOSSS_CHAMBER]; + invoker.weaponstatus[BOSSS_CHAMBER]=0; + if(chm<2||A_JumpIfInventory(invoker.actualammo,0,"null")){ + class whatkind=chm==2?invoker.looseammo:invoker.spentammo; + actor rrr=spawn(whatkind,pos+(cos(angle)*10,sin(angle)*10,height-12),ALLOW_REPLACE); + rrr.angle=angle;rrr.A_ChangeVelocity(1,2,1,CVF_RELATIVE); + }else HDF.Give(self,invoker.actualammo,1); + A_ChamberGrit(randompick(0,0,0,0,-1,1),true); + }else{ + A_TakeInventory(invoker.actualammo,1,TIF_NOTAKEINFINITE); + invoker.weaponstatus[BOSSS_CHAMBER]=2; + } + } + BOJG T 2 offset(7,72); + BOJG T 2 offset(8,60); + BOJG T 1 offset(7,52); + BOJG T 1 offset(5,42); + BOJG T 1 offset(3,38); + BOJG T 1 offset(3,35); + goto althold; + altholdclean: + BOJG T 1 offset(2,36) A_ClearRefire(); + BOJG T 1 offset(3,38); + BOJG T 1 offset(5,42) A_Log("Looking inside that chamber...",true); + BOJG T 1 offset(8,48) A_StartSound("weapons/pocket",9); + BOJG T 1 offset(7,52) A_MuzzleClimb(frandom(-0.2,0.2),0.2,frandom(-0.2,0.2),0.2,frandom(-0.2,0.2),0.2); + TNT1 A 3 A_StartSound("weapons/pocket",10); + TNT1 AAAA 4 A_MuzzleClimb(frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2)); + TNT1 A 3 A_StartSound("weapons/pocket",9); + TNT1 AAAA 4 A_MuzzleClimb(frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2)); + TNT1 A 40{ + A_StartSound("weapons/pocket",9); + int amt=invoker.weaponstatus[BOSSS_GRIME]; + string amts="There doesn't seem to be much. "; + if(amt>40)amts="What the FUCK. "; + else if(amt>30)amts="About time - this gun is barely functional. "; + else if(amt>20)amts="This is starting to gum up badly. "; + else if(amt>10)amts="It can use some cleaning. "; + + static const string cleanverbs[]={"extract","scrape off","wipe away","carefully remove","dump out","pick out","blow off","shake out","scrub off","fish out"}; + static const string contaminants[]={"some dust","a lot of dust","a bit of powder residue","a disturbing amount of powder residue","some excess grease","a layer of soot","some iron filings","a bit of hair","an eyelash","a patch of dried blood","a bit of rust","a crumb","a dead insect","ashes","some loose bits of skin","a sticky fluid of some sort","wow some fucking *gunk*","a booger","trace fecal matter","yet even more of that anonymous grey debris that all those bullet impacts make","a dollop of strawberry jam","the dried husk of a pinto bean with residual hog components","a tiny cancerous nodule of Second Flesh","some crystalline buildup of congealed Frag","a nesting queen space ant","a single modern-day transistor","a tiny Boss rifle (also jammed)","a colourless film of darkness made visible"}; + static const string actionparts[]={"bolt carrier","main extractor","auxiliary extractor","cam pin","bolt head","striker","firing pin spring","ejector slot","striker spring","ejector spring"}; + for(int i=amt;i>0;i-=random(8,16))amts.appendformat("You %s %s from the %s. ", + cleanverbs[random(0,cleanverbs.size()-1)], + contaminants[random(0,random(0,contaminants.size()-1))], + actionparts[random(0,random((actionparts.size()>>1),actionparts.size()-1))] + ); + amts.appendformat("\n"); + + amt=randompick(-3,-5,-5,-random(8,16)); + + A_ChamberGrit(amt,true); + amt=invoker.weaponstatus[BOSSS_GRIME]; + if(amt>40)amts.appendformat("You barely scrape the surface of this all-encrusting abomination."); + else if(amt>30)amts.appendformat("The gun will need a lot more work than this before it can be deployed again."); + else if(amt>20)amts.appendformat("You might get a few shots out of it now."); + else if(amt>10)amts.appendformat("It's better, but still not good."); + else amts.appendformat("Good to go."); + A_Log(amts,true); + } + BOJG T 1 offset(7,52); + BOJG T 1 offset(8,48); + BOJG T 1 offset(5,42); + BOJG T 1 offset(3,38); + BOJG T 1 offset(2,36); + goto althold; + jam: + BOJG P 0{ + int chm=invoker.weaponstatus[BOSSS_CHAMBER]; + if(chm<1)setweaponstate("chamber"); + else if(chm<3)invoker.weaponstatus[BOSSS_CHAMBER]+=2; + } + jamderp: + BOJG P 0 A_StartSound("weapons/rifleclick",8,CHANF_OVERLAP); + BOJG S 1 offset(4,38); + BOJG S 2 offset(2,36); + BOJG S 2 offset(4,38)A_MuzzleClimb(frandom(-0.5,0.6),frandom(-0.3,0.6)); + BOJG S 3 offset(2,36){ + A_MuzzleClimb(frandom(-0.5,0.6),frandom(-0.3,0.6)); + if(random(0,invoker.jamchance())<12){ + setweaponstate("chamber"); + if(invoker.weaponstatus[BOSSS_CHAMBER]>2) + invoker.weaponstatus[BOSSS_CHAMBER]-=2; + } + } + BOJG S 2 offset(4,38); + BOJG S 3 offset(2,36); + BOJG P 0 A_Refire("jamderp"); + goto ready; + chamber: + BOJG R 2 offset(4,38){ + if( + random(0,max(2,invoker.weaponstatus[BOSSS_GRIME]>>3)) + &&invoker.weaponstatus[BOSSS_CHAMBER]>2 + ){ + invoker.weaponstatus[BOSSS_CHAMBER]+=2; + A_MuzzleClimb( + -frandom(0.6,2.3),-frandom(0.6,2.3), + -frandom(0.6,1.3),-frandom(0.6,1.3), + -frandom(0.6,1.3),-frandom(0.6,1.3) + ); + setweaponstate("jamderp"); + }else A_StartSound("weapons/boltback",8); + } + BOJG S 2 offset(6,42)A_JumpIf(invoker.weaponstatus[0]&BOSSF_CUSTOMCHAMBER,1); + BOJG S 1 offset(6,42){ + if(gunbraced())A_MuzzleClimb( + frandom(-0.1,0.3),frandom(-0.1,0.3) + );else A_MuzzleClimb( + frandom(-0.2,0.8),frandom(-0.4,0.8) + ); + int jamch=invoker.jamchance(); + if(hd_debug)A_Log("jam chance: "..jamch); + if(random(0,100)1){ + A_SpawnItemEx( + invoker.looseammo,cos(pitch)*8,1,height-7-sin(pitch)*8, + cos(pitch)*cos(angle-80)*4+vel.x, + cos(pitch)*sin(angle-80)*4+vel.y, + -sin(pitch)*4+vel.z, + 0,SXF_ABSOLUTEMOMENTUM|SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH + ); + }else if(chm==1){ + A_SpawnItemEx( + invoker.spentammo,cos(pitch)*8,1,height-7-sin(pitch)*8, + cos(pitch)*cos(angle-80)*6+vel.x, + cos(pitch)*sin(angle-80)*6+vel.y, + -sin(pitch)*6+vel.z, + 0,SXF_ABSOLUTEMOMENTUM|SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH + ); + } + //cycle new + if(invoker.weaponstatus[BOSSS_MAG]>0){ + invoker.weaponstatus[BOSSS_CHAMBER]=2; + invoker.weaponstatus[BOSSS_MAG]--; + }else invoker.weaponstatus[BOSSS_CHAMBER]=0; + } + BOJG T 1 offset(6,42) A_WeaponReady(WRF_NOFIRE); + BOJG T 0 A_Refire("althold"); + goto altholdend; + reload: + ---- A 0{invoker.weaponstatus[0]&=~BOSSF_DONTUSECLIPS;} + goto reloadstart; + altreload: + ---- A 0{invoker.weaponstatus[0]|=BOSSF_DONTUSECLIPS;} + goto reloadstart; + reloadstart: + BOJG P 1 offset(0,34); + BOJG P 1 offset(2,36); + BOJG P 1 offset(4,40); + BOJG P 2 offset(8,42){ + A_StartSound("weapons/rifleclick2",8,CHANF_OVERLAP,0.9,pitch:0.95); + A_MuzzleClimb(-frandom(0.4,0.8),frandom(0.4,1.4)); + } + BOJG P 4 offset(14,46){ + A_StartSound("weapons/rifleload",8,CHANF_OVERLAP); + A_MuzzleClimb(-frandom(0.4,0.8),frandom(0.4,1.4)); + } + BOJG P 0{ + int mg=invoker.weaponstatus[BOSSS_MAG]; + if(mg==27)setweaponstate("reloaddone"); + else if(invoker.weaponstatus[0]&BOSSF_DONTUSECLIPS)setweaponstate("loadhand"); + /*else if( + ( + mg<1 + ||!countinv("SevenMilAmmo") + )&&!HDMagAmmo.NothingLoaded(self,"HD7mClip") + )setweaponstate("loadclip");*/ + } + loadhand: + BOJG P 0 A_JumpIfInventory(invoker.actualammo,1,"loadhandloop"); + goto reloaddone; + loadhandloop: + BOJG P 4{ + int hnd=min( + countinv(invoker.actualammo),9, + 27-invoker.weaponstatus[BOSSS_MAG] + ); + if(hnd<1){ + setweaponstate("reloaddone"); + return; + }else{ + A_TakeInventory(invoker.actualammo,hnd,TIF_NOTAKEINFINITE); + invoker.weaponstatus[BOSSS_HAND]=hnd; + A_StartSound("weapons/pocket",9); + } + } + loadone: + BOJG P 2 offset(16,50) A_JumpIf(invoker.weaponstatus[BOSSS_HAND]<1,"loadhandnext"); + BOJG P 4 offset(14,46){ + invoker.weaponstatus[BOSSS_HAND]--; + invoker.weaponstatus[BOSSS_MAG]++; + A_StartSound("weapons/rifleclick2",8); + }loop; + loadhandnext: + BOJG P 8 offset(16,48){ + if( + PressingReload()|| + PressingFire()|| + PressingAltFire()|| + PressingZoom()|| + !countinv(invoker.actualammo) //don't strip clips automatically + )setweaponstate("reloaddone"); + else A_StartSound("weapons/pocket",9); + }goto loadhandloop; + reloaddone: + BOJG P 1 offset(4,40); + BOJG P 1 offset(2,36); + BOJG P 1 offset(0,34); + goto nope; + unload: + BOJG P 1 offset(0,34); + BOJG P 1 offset(2,36); + BOJG P 1 offset(4,40); + BOJG P 2 offset(8,42){ + A_MuzzleClimb(-frandom(0.4,0.8),frandom(0.4,1.4)); + A_StartSound("weapons/rifleclick2",8); + } + BOJG P 4 offset (14,46){ + A_MuzzleClimb(-frandom(0.4,0.8),frandom(0.4,1.4)); + A_StartSound("weapons/rifleload",8); + } + unloadloop: + BOJG P 4 offset(3,41){ + if(invoker.weaponstatus[BOSSS_MAG]<1)setweaponstate("unloaddone"); + else{ + A_StartSound("weapons/rifleclick2",8); + invoker.weaponstatus[BOSSS_MAG]--; + if(A_JumpIfInventory(invoker.actualammo,0,"null")){ + A_SpawnItemEx( + invoker.looseammo,cos(pitch)*8,0,height-7-sin(pitch)*8, + cos(pitch)*cos(angle-40)*1+vel.x, + cos(pitch)*sin(angle-40)*1+vel.y, + -sin(pitch)*1+vel.z, + 0,SXF_ABSOLUTEMOMENTUM| + SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH + ); + }else A_GiveInventory(invoker.actualammo,1); + } + } + BOJG P 2 offset(2,42); + BOJG P 0{ + if( + PressingReload()|| + PressingFire()|| + PressingAltFire()|| + PressingZoom() + )setweaponstate("unloaddone"); + }loop; + unloaddone: + BOJG P 2 offset(2,42); + BOJG P 3 offset(3,41); + BOJG P 1 offset(4,40) A_StartSound("weapons/rifleclick",8); + BOJG P 1 offset(2,36); + BOJG P 1 offset(0,34); + goto ready; + + spawn: + BOJG ] -1; + } + override void InitializeWepStats(bool idfa){ + weaponspecial = 1337; //UaS sling compatbility + weaponstatus[BOSSS_CHAMBER]=2; + weaponstatus[BOSSS_MAG]=27; + if(!idfa){ + weaponstatus[BOSSS_HEAT]=0; + } + if(!owner){ + if(randompick(0,0,1))weaponstatus[0]&=~BOSSF_FRONTRETICLE; + else weaponstatus[0]|=BOSSF_FRONTRETICLE; + if(random(0,3))weaponstatus[0]&=~BOSSF_CUSTOMCHAMBER; + else weaponstatus[0]|=BOSSF_CUSTOMCHAMBER; + weaponstatus[BOSSS_ZOOM]=20; + weaponstatus[BOSSS_DROPADJUST]=160; + } + } +} + +class HDB_Pink:HDBulletActor{ + default{ + pushfactor 0.45; + mass 26; + speed 600; + accuracy 270; + stamina 570; + woundhealth 10; + hdbulletactor.hardness 3; + } +} \ No newline at end of file diff --git a/zscript/Hexadoken/Weapons/ScopelessBoss.zsc b/zscript/Hexadoken/Weapons/Boss Rifle Variants/Scopeless Boss.zsc similarity index 100% rename from zscript/Hexadoken/Weapons/ScopelessBoss.zsc rename to zscript/Hexadoken/Weapons/Boss Rifle Variants/Scopeless Boss.zsc diff --git a/zscript/Hexadoken/Weapons/Boss Rifle Variants/Variant Loadout Giver.zsc b/zscript/Hexadoken/Weapons/Boss Rifle Variants/Variant Loadout Giver.zsc new file mode 100644 index 0000000..1d0ccf7 --- /dev/null +++ b/zscript/Hexadoken/Weapons/Boss Rifle Variants/Variant Loadout Giver.zsc @@ -0,0 +1,95 @@ +// Honestly i'm probably not going to put much work into this. +// It's a meme mod, if it breaks take it as an unintended feature. +// I doubt it will all of this stuff inherets from BossRifle so it'll probably be fine tbh. - [Ted] + +class HDShitbostDummy:HDWeapon{ + default{ + -hdweapon.fitsinbackpack + hdweapon.refid "boj"; + tag "$TAG_ShitbostDummy"; + inventory.icon "BOJGY0"; + + hdweapon.loadoutcodes " + \cuNine - 0/1, 9mm Boss Rifle + \cuFour - 0/1, 4mm Boss Rifle + \cuHexadoken - 0/1, Hexadoken's Personal Rifle + \cuWorst - 0/1, Lightspeed Boss Rifle + \cucustomchamber - 0/1, whether to reduce jam for less power + \cufrontreticle - 0/1, whether crosshair scales with zoom + \cubulletdrop - 0-600, amount of compensation for bullet drop + \cuzoom - 5-60, 10x the resulting FOV in degrees"; + } + override bool AddSpareWeapon(actor newowner){return AddSpareWeaponRegular(newowner);} + override hdweapon GetSpareWeapon(actor newowner,bool reverse,bool doselect){return GetSpareWeaponRegular(newowner,reverse,doselect);} + override double weaponbulk(){ + return 144; + } + override void PostBeginPlay(){ + if(!owner) return; + GiveWeapon(owner, weaponstatus[0],weaponstatus[1],weaponstatus[2],weaponstatus[3],weaponstatus[4],weaponstatus[5]); + let spw=spareweapons(owner.findinventory("spareweapons")); + if(spw) { + for(int i=0;i0;--i) + if(spw.weapontype[i-1]=="HDShitbostDummy"){ + spw.weapontype.Delete(i-1); + spw.weaponstatus.Delete(i-1); + spw.weaponbulk.Delete(i-1); + } + } + owner.takeinventory("HDShitbostDummy", 1); + } + void GiveWeapon(actor plr, int type, int custom, int front, int drop, int zoom, int YEET){ + string wn; + switch(type) { + default: + case 0: wn="BossRifleButIts9mm"; break; + case 1: wn="BossRifleButIts4mm"; break; + case 2: wn="BossRifleButItsTheWorst"; break; + case 3: wn="BossRifleButItsFuckingPink"; break; + } + let newwep=hdweapon(hdweapon.spawn(wn,plr.pos)); + if(newwep){ + if(custom) newwep.weaponstatus[0]|=BOSSF_CUSTOMCHAMBER; + if(front) newwep.weaponstatus[0]|=BOSSF_FRONTRETICLE; + if(yeet) newwep.weaponstatus[0]|=BOSSF_YEETABLE; + if(drop>=0) newwep.weaponstatus[BOSSS_DROPADJUST]=clamp(drop,0,600); + else newwep.weaponstatus[BOSSS_DROPADJUST]=160; + if(zoom>0) newwep.weaponstatus[BOSSS_ZOOM]= + (newwep.weaponstatus[0]&BOSSF_FRONTRETICLE)? + clamp(zoom,12,40): + clamp(zoom,5,60); + else newwep.weaponstatus[BOSSS_ZOOM]=20; + newwep.actualpickup(plr,true); + } + } + override void loadoutconfigure(string input){ + int nine=getloadoutvar(input,"nine",1); + int four=getloadoutvar(input,"four",1); + int gold=getloadoutvar(input,"worst",1); + int pink=getloadoutvar(input,"hexadoken",1); + + if(gold>0 && nine<0 && four<0 && pink<0) weaponstatus[0]=2; + else if (pink>0 && nine<0 && four<0 && gold<0) weaponstatus[0]=3; + else if (four>0 && nine<0 && gold<0 && pink<0) weaponstatus[0]=1; + else if (nine>0 && four<0 && gold<0 && pink<0) weaponstatus[0]=0; + else weaponstatus[0]=random(0,1); + + int customchamber=getloadoutvar(input,"customchamber",1); + int frontreticle=getloadoutvar(input,"frontreticle",1); + int bulletdrop=getloadoutvar(input,"bulletdrop",3); + int zoom=getloadoutvar(input,"zoom",3); + int yeetable=getloadoutvar(input,"yeetable",1); + + + if(customchamber>0)weaponstatus[1]=1; + if(frontreticle>0)weaponstatus[2]=1; + weaponstatus[3]=bulletdrop; + if(zoom>0)weaponstatus[4]=zoom; + if(yeetable>0)weaponstatus[5]=1; + } +} \ No newline at end of file diff --git a/zscript/Hexadoken/Weapons/Boss Rifle Variants/Worst Boss.zsc b/zscript/Hexadoken/Weapons/Boss Rifle Variants/Worst Boss.zsc new file mode 100644 index 0000000..2365fa0 --- /dev/null +++ b/zscript/Hexadoken/Weapons/Boss Rifle Variants/Worst Boss.zsc @@ -0,0 +1,403 @@ +class BossRifleButItsTheWorst:BossRifle{ + default{ + hdweapon.refid ""; + tag "$TAG_WORSTBOSS"; + } + + override string pickupmessage(){ + return "You found a... "..gettag()..". Oh no..."; + } + + override void GunBounce(){ + HDWeapon.GunBounce(); + if(weaponstatus[0]&BOSSF_YEETABLE){ + weaponstatus[BOSSS_GRIME]+=random(-7,3); + if(weaponstatus[BOSSS_CHAMBER]>2&&!random(0,7))weaponstatus[BOSSS_CHAMBER]-=2; + } + else { + if(!random(0,100)) weaponstatus[BOSSS_GRIME]+=randompick(-1,-1,-1,-1,-1,1); + } + } + action void A_ChamberGrit(int amt,bool onlywhileempty=false){ + bool customchamber=(invoker.weaponstatus[0]&BOSSF_CUSTOMCHAMBER); + if(customchamber){ + invoker.weaponstatus[BOSSS_GRIME]=0; + return; + } + int ibg=invoker.weaponstatus[BOSSS_GRIME]; + if(!onlywhileempty||invoker.weaponstatus[BOSSS_CHAMBER]<1)ibg+=amt; + else if(!random(0,4))ibg++; + invoker.weaponstatus[BOSSS_GRIME]=clamp(ibg,0,100); + //if(hd_debug)A_Log(string.format("Boss grit level: %i",invoker.weaponstatus[BOSSS_GRIME])); + } + override double weaponbulk(){ + return 144; + } + override void consolidate(){ + //weaponstatus[BOSSS_GRIME]=random(0,20); + } + override void DropOneAmmo(int amt){ + if(owner){ + amt=clamp(amt,1,10); + if(owner.countinv("SevenMilAmmo"))owner.A_DropInventory("SevenMilAmmo",10); + } + } + override void ForceBasicAmmo(){ + owner.A_GiveInventory("SevenMilAmmo"); + } + int jamchance(){ + if(weaponstatus[0]&BOSSF_CUSTOMCHAMBER) return 0; + int jc= + weaponstatus[BOSSS_GRIME] + +(weaponstatus[BOSSS_HEAT]>>2) + +weaponstatus[BOSSS_CHAMBER] + ; + return jc; + } + override string,double getpickupsprite(){return "BOJG[0",1.;} + override void DrawHUDStuff(HDStatusBar sb,HDWeapon hdw,HDPlayerPawn hpl){ + if(sb.hudlevel==1){ + sb.drawimage("RBRSA3A7",(-54,-10),sb.DI_SCREEN_CENTER_BOTTOM,scale:(2.1,2.1)); + sb.drawnum(hpl.countinv("SevenMilAmmo"),-51,-8,sb.DI_SCREEN_CENTER_BOTTOM); + } + if(hdw.weaponstatus[BOSSS_CHAMBER]) { + if(!(hdw.weaponstatus[BOSSS_CHAMBER]%2)) + {sb.drawrect(-40,-8,1,2); sb.drawrect(-39,-9,6,4);} + sb.drawrect(-32,-9,12,4); sb.drawrect(-19,-9,2,4); + } + sb.drawstring( + sb.mAmountFont,string.format("%.1f",hdw.weaponstatus[BOSSS_ZOOM]*0.1), + (-36,-18),sb.DI_SCREEN_CENTER_BOTTOM|sb.DI_TEXT_ALIGN_RIGHT,Font.CR_DARKGRAY + ); + sb.drawstring( + sb.mAmountFont,string.format("%.1f",hdw.weaponstatus[BOSSS_DROPADJUST]*0.1), + (-16,-18),sb.DI_SCREEN_CENTER_BOTTOM|sb.DI_TEXT_ALIGN_RIGHT,Font.CR_WHITE + ); + } + override string gethelptext(){ + if(weaponstatus[0]&BOSSF_CUSTOMCHAMBER) + return "\cfMAN IS ONLY SEPARATED FROM THE HEAVENS\nBY THAT WHICH HE WILL NOT GUN."; + else + return "You are beyond help."; + } + states{ + select0: + BOJG A 0; + goto select0bfg; + deselect0: + BOJG A 0; + goto deselect0big; + ready: + BOJG A 1{ + if(pressingzoom()){ + if(player.cmd.buttons&BT_USE){ + A_ZoomAdjust(BOSSS_DROPADJUST,0,600,BT_USE); + }else if(invoker.weaponstatus[0]&BOSSF_FRONTRETICLE)A_ZoomAdjust(BOSSS_ZOOM,12,40); + else A_ZoomAdjust(BOSSS_ZOOM,5,60); + A_WeaponReady(WRF_NONE); + }else A_WeaponReady(WRF_ALL); + }goto readyend; + user3: + ---- A 0 A_MagManager("HDBattery"); + goto ready; + fire: + BOJG A 1 A_JumpIf(invoker.weaponstatus[BOSSS_CHAMBER]==2,"shoot"); + goto ready; + shoot: + BOJG A 1{ + A_Gunflash(); + invoker.weaponstatus[BOSSS_CHAMBER]=1; + A_StartSound("weapons/bronto",CHAN_WEAPON); + A_StartSound("weapons/bronto",CHAN_WEAPON,CHANF_OVERLAP); + A_StartSound("weapons/bronto",CHAN_WEAPON,CHANF_OVERLAP, volume:0.75, attenuation:ATTN_NONE); + A_StartSound("weapons/bronto2",CHAN_WEAPON,CHANF_OVERLAP); + A_StartSound("weapons/bronto2",CHAN_WEAPON,CHANF_OVERLAP, volume:0.75, attenuation:ATTN_NONE); + invoker.owner.Vel3DFromAngle(gunbraced()?45:90,invoker.owner.angle+180,-invoker.owner.pitch); + //A_AlertMonsters(); + ThinkerIterator Alerter = ThinkerIterator.Create("Actor"); + Actor mo; + while (mo = Actor(Alerter.Next())) + if (mo.bismonster) mo.SoundAlert(invoker.owner); + + if(!(invoker.weaponstatus[0]&BOSSF_CUSTOMCHAMBER)) { + HDBulletActor.FireBullet(self,"HDB_776", + aimoffy:(-1./600.)*invoker.weaponstatus[BOSSS_DROPADJUST], + speedfactor:327.000 + ); + A_ChamberGrit(99); + } + damagemobj(invoker,self,random(130,170)/(gunbraced()?2:1),"falling"); + A_MuzzleClimb( + -50,-frandom(50.,130.), + -50,-frandom(50.,130.) + ); + A_MuzzleClimb( + -50,-frandom(50.,130.), + -50,-frandom(50.,130.), + wepdot:true + ); + } + BOJG U 1 {HDPlayerPawn(invoker.owner).Disarm(invoker.owner);} + BOJG U 1 A_JumpIf(gunbraced(),"ready"); + goto ready; + flash: + BARF A 1 bright{ + A_Light1(); + HDFlashAlpha(-96); + A_ZoomRecoil(0.0); + A_ChamberGrit(randompick(0,0,0,0,0,1,1,1,1,-1)); + } + TNT1 A 0 A_Light0(); + stop; + altfire: + BOJG A 1 offset(0,34) A_WeaponBusy(); + BOJG B 2 offset(2,36) A_JumpIf(invoker.weaponstatus[0]&BOSSF_CUSTOMCHAMBER,1); + BOJG B 1 offset(4,38){ + if(invoker.weaponstatus[BOSSS_CHAMBER]>2)setweaponstate("jamderp"); + } + BOJG B 1 offset(0,34); + BOJG B 0 A_ChamberGrit(randompick(0,0,0,0,-1,1,2),true); + BOJG B 0 A_Refire("chamber"); + goto ready; + althold: + BOJG E 1 A_WeaponReady(WRF_NOFIRE); + BOJG E 1{ + A_ClearRefire(); + bool eww=invoker.weaponstatus[BOSSS_GRIME]>10; + bool chempty=invoker.weaponstatus[BOSSS_CHAMBER]<1; + if(pressingunload()){ + if(chempty){ + return resolvestate("altholdclean"); + }else{ + invoker.weaponstatus[0]|=BOSSF_UNLOADONLY; + return resolvestate("loadchamber"); + } + }else if(pressingreload()){ + if( + !chempty + ){ + invoker.weaponstatus[0]|=BOSSF_UNLOADONLY; + return resolvestate("loadchamber"); + }else if( + eww + ){ + return resolvestate("altholdclean"); + }else if( + countinv("SevenMilAmmo") + ){ + invoker.weaponstatus[0]&=~BOSSF_UNLOADONLY; + return resolvestate("loadchamber"); + } + } + if(pressingaltfire())return resolvestate("althold"); + return resolvestate("altholdend"); + } + altholdend: + BOJG E 0 A_StartSound("weapons/boltfwd",8); + BOJG DC 2 A_WeaponReady(WRF_NOFIRE); + BOJG B 3 offset(2,36){ + A_WeaponReady(WRF_NOFIRE); + if(invoker.weaponstatus[0]&BOSSF_CUSTOMCHAMBER)A_SetTics(1); + } + goto ready; + loadchamber: + BOJG E 1 offset(2,36) A_ClearRefire(); + BOJG E 1 offset(3,38); + BOJG E 1 offset(5,42); + BOJG E 1 offset(8,48) A_StartSound("weapons/pocket",9); + BOJG E 1 offset(9,52) A_MuzzleClimb(frandom(-0.2,0.2),0.2,frandom(-0.2,0.2),0.2,frandom(-0.2,0.2),0.2); + BOJG E 2 offset(8,60); + BOJG E 2 offset(7,72); + TNT1 A 18 A_StartSound("weapons/pocket",9); + TNT1 A 4{ + A_StartSound("weapons/bossload",8,volume:0.7); + if(invoker.weaponstatus[0]&BOSSF_UNLOADONLY){ + int chm=invoker.weaponstatus[BOSSS_CHAMBER]; + invoker.weaponstatus[BOSSS_CHAMBER]=0; + if(chm<2||A_JumpIfInventory("SevenMilAmmo",0,"null")){ + class whatkind=chm==2?"HDLoose7mm":"HDSpent7mm"; + actor rrr=spawn(whatkind,pos+(cos(angle)*10,sin(angle)*10,height-12),ALLOW_REPLACE); + rrr.angle=angle;rrr.A_ChangeVelocity(1,2,1,CVF_RELATIVE); + }else HDF.Give(self,"SevenMilAmmo",1); + A_ChamberGrit(randompick(0,0,0,0,-1,1),true); + }else{ + A_TakeInventory("SevenMilAmmo",1,TIF_NOTAKEINFINITE); + invoker.weaponstatus[BOSSS_CHAMBER]=2; + } + } + BOJG E 2 offset(7,72); + BOJG E 2 offset(8,60); + BOJG E 1 offset(7,52); + BOJG E 1 offset(5,42); + BOJG E 1 offset(3,38); + BOJG E 1 offset(3,35); + goto althold; + altholdclean: + BOJG E 1 offset(2,36) A_ClearRefire(); + BOJG E 1 offset(3,38); + BOJG E 1 offset(5,42) A_Log("Looking inside that chamber...",true); + BOJG E 1 offset(8,48) A_StartSound("weapons/pocket",9); + BOJG E 1 offset(7,52) A_MuzzleClimb(frandom(-0.2,0.2),0.2,frandom(-0.2,0.2),0.2,frandom(-0.2,0.2),0.2); + TNT1 A 3 A_StartSound("weapons/pocket",10); + TNT1 AAAA 4 A_MuzzleClimb(frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2)); + TNT1 A 3 A_StartSound("weapons/pocket",9); + TNT1 AAAA 4 A_MuzzleClimb(frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2)); + TNT1 A 40{ + A_StartSound("weapons/pocket",9); + int amt=invoker.weaponstatus[BOSSS_GRIME]; + string amts="There doesn't seem to be much. "; + if(amt>40)amts="What the FUCK. "; + else if(amt>30)amts="About time - this gun is barely functional. "; + else if(amt>20)amts="This is starting to gum up badly. "; + else if(amt>10)amts="It can use some cleaning. "; + + static const string cleanverbs[]={"extract","scrape off","wipe away","carefully remove","dump out","pick out","blow off","shake out","scrub off","fish out"}; + static const string contaminants[]={"some dust","a lot of dust","a bit of powder residue","a disturbing amount of powder residue","some excess grease","a layer of soot","some iron filings","a bit of hair","an eyelash","a patch of dried blood","a bit of rust","a crumb","a dead insect","ashes","some loose bits of skin","a sticky fluid of some sort","wow some fucking *gunk*","a booger","trace fecal matter","yet even more of that anonymous grey debris that all those bullet impacts make","a dollop of strawberry jam","the dried husk of a pinto bean with residual hog components","a tiny cancerous nodule of Second Flesh","some crystalline buildup of congealed Frag","a nesting queen space ant","a single modern-day transistor","a tiny Boss rifle (also jammed)","a colourless film of darkness made visible"}; + static const string actionparts[]={"bolt carrier","main extractor","auxiliary extractor","cam pin","bolt head","striker","firing pin spring","ejector slot","striker spring","ejector spring"}; + for(int i=amt;i>0;i-=random(8,16))amts.appendformat("You %s %s from the %s. ", + cleanverbs[random(0,cleanverbs.size()-1)], + contaminants[random(0,random(0,contaminants.size()-1))], + actionparts[random(0,random((actionparts.size()>>1),actionparts.size()-1))] + ); + amts.appendformat("\n"); + + amt=randompick(-3,-5,-5,-random(8,16)); + + A_ChamberGrit(amt,true); + amt=invoker.weaponstatus[BOSSS_GRIME]; + if(amt>40)amts.appendformat("You barely scrape the surface of this all-encrusting abomination."); + else if(amt>30)amts.appendformat("The gun will need a lot more work than this before it can be deployed again."); + else if(amt>20)amts.appendformat("You might get a few shots out of it now."); + else if(amt>10)amts.appendformat("It's better, but still not good."); + else amts.appendformat("Good to go."); + A_Log(amts,true); + } + BOJG E 1 offset(7,52); + BOJG E 1 offset(8,48); + BOJG E 1 offset(5,42); + BOJG E 1 offset(3,38); + BOJG E 1 offset(2,36); + goto althold; + jam: + BOJG A 0{ + int chm=invoker.weaponstatus[BOSSS_CHAMBER]; + if(chm<1)setweaponstate("chamber"); + else if(chm<3)invoker.weaponstatus[BOSSS_CHAMBER]+=2; + } + jamderp: + BOJG A 0 A_StartSound("weapons/rifleclick",8,CHANF_OVERLAP); + BOJG D 1 offset(4,38); + BOJG D 2 offset(2,36); + BOJG D 2 offset(4,38)A_MuzzleClimb(frandom(-0.5,0.6),frandom(-0.3,0.6)); + BOJG D 3 offset(2,36){ + A_MuzzleClimb(frandom(-0.5,0.6),frandom(-0.3,0.6)); + if(random(0,invoker.jamchance())<12){ + setweaponstate("chamber"); + if(invoker.weaponstatus[BOSSS_CHAMBER]>2) + invoker.weaponstatus[BOSSS_CHAMBER]-=2; + } + } + BOJG D 2 offset(4,38); + BOJG D 3 offset(2,36); + BOJG A 0 A_Refire("jamderp"); + goto ready; + chamber: + BOJG C 2 offset(4,38){ + if( + random(0,max(2,invoker.weaponstatus[BOSSS_GRIME]>>3)) + &&invoker.weaponstatus[BOSSS_CHAMBER]>2 + ){ + invoker.weaponstatus[BOSSS_CHAMBER]+=2; + A_MuzzleClimb( + -frandom(0.6,2.3),-frandom(0.6,2.3), + -frandom(0.6,1.3),-frandom(0.6,1.3), + -frandom(0.6,1.3),-frandom(0.6,1.3) + ); + setweaponstate("jamderp"); + }else A_StartSound("weapons/boltback",8); + } + BOJG D 2 offset(6,42)A_JumpIf(invoker.weaponstatus[0]&BOSSF_CUSTOMCHAMBER,1); + BOJG D 1 offset(6,42){ + if(gunbraced())A_MuzzleClimb( + frandom(-0.1,0.3),frandom(-0.1,0.3) + );else A_MuzzleClimb( + frandom(-0.2,0.8),frandom(-0.4,0.8) + ); + int jamch=invoker.jamchance(); + if(hd_debug)A_Log("jam chance: "..jamch); + if(random(0,100)1){ + A_SpawnItemEx( + "HDLoose7mm",cos(pitch)*8,1,height-7-sin(pitch)*8, + cos(pitch)*cos(angle-80)*4+vel.x, + cos(pitch)*sin(angle-80)*4+vel.y, + -sin(pitch)*4+vel.z, + 0,SXF_ABSOLUTEMOMENTUM|SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH + ); + }else if(chm==1){ + A_SpawnItemEx( + "HDSpent7mm",cos(pitch)*8,1,height-7-sin(pitch)*8, + cos(pitch)*cos(angle-80)*6+vel.x, + cos(pitch)*sin(angle-80)*6+vel.y, + -sin(pitch)*6+vel.z, + 0,SXF_ABSOLUTEMOMENTUM|SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH + ); + } + //cycle new + invoker.weaponstatus[BOSSS_CHAMBER]=0; + } + BOJG E 1 offset(6,42) A_WeaponReady(WRF_NOFIRE); + BOJG E 0 A_Refire("althold"); + goto altholdend; + reload: + ---- A 1; + goto nope; + altreload: + ---- A 1; + goto nope; + unload: + ---- A 1; + goto nope; + spawn: + BOJG [ -1; + } + override void InitializeWepStats(bool idfa){ + weaponspecial = 1337; //UaS sling compatbility + weaponstatus[BOSSS_CHAMBER]=0; + if(!idfa){ + weaponstatus[BOSSS_HEAT]=0; + } + if(!owner){ + if(randompick(0,0,1))weaponstatus[0]&=~BOSSF_FRONTRETICLE; + else weaponstatus[0]|=BOSSF_FRONTRETICLE; + weaponstatus[BOSSS_ZOOM]=20; + weaponstatus[BOSSS_DROPADJUST]=160; + } + } + override void loadoutconfigure(string input){ + int yeet=getloadoutvar(input,"yeetable",1); + if(!yeet)weaponstatus[0]&=~BOSSF_YEETABLE; + else if(yeet>0)weaponstatus[0]|=BOSSF_YEETABLE; + + int customchamber=getloadoutvar(input,"customchamber",1); + if(!customchamber)weaponstatus[0]&=~BOSSF_CUSTOMCHAMBER; + else if(customchamber>0)weaponstatus[0]|=BOSSF_CUSTOMCHAMBER; + + int frontreticle=getloadoutvar(input,"frontreticle",1); + if(!frontreticle)weaponstatus[0]&=~BOSSF_FRONTRETICLE; + else if(frontreticle>0)weaponstatus[0]|=BOSSF_FRONTRETICLE; + + int bulletdrop=getloadoutvar(input,"bulletdrop",3); + if(bulletdrop>=0)weaponstatus[BOSSS_DROPADJUST]=clamp(bulletdrop,0,600); + + int zoom=getloadoutvar(input,"zoom",3); + if(zoom>0)weaponstatus[BOSSS_ZOOM]= + (weaponstatus[0]&BOSSF_FRONTRETICLE)? + clamp(zoom,12,40): + clamp(zoom,5,60); + } +} \ No newline at end of file diff --git a/zscript/Hexadoken/Weapons/M1 Garand.zsc b/zscript/Hexadoken/Weapons/M1 Garand/M1 Garand.zsc similarity index 100% rename from zscript/Hexadoken/Weapons/M1 Garand.zsc rename to zscript/Hexadoken/Weapons/M1 Garand/M1 Garand.zsc diff --git a/zscript/Hexadoken/Weapons/Shitbossting.zsc b/zscript/Hexadoken/Weapons/Shitbossting.zsc deleted file mode 100644 index dc0e0a9..0000000 --- a/zscript/Hexadoken/Weapons/Shitbossting.zsc +++ /dev/null @@ -1,2080 +0,0 @@ -// Honestly i'm probably not going to put much work into this. -// It's a meme mod, if it breaks take it as an unintended feature. -// I doubt it will all of this stuff inherets from BossRifle so it'll probably be fine tbh. - [Ted] - -// Worst boss rifle. -class BossRifleButItsTheWorst:BossRifle{ - default{ - hdweapon.refid ""; - tag "$TAG_WORSTBOSS"; - } - - override string pickupmessage(){ - return "You found a... "..gettag()..". Oh no..."; - } - - override void GunBounce(){ - HDWeapon.GunBounce(); - if(weaponstatus[0]&BOSSF_YEETABLE){ - weaponstatus[BOSSS_GRIME]+=random(-7,3); - if(weaponstatus[BOSSS_CHAMBER]>2&&!random(0,7))weaponstatus[BOSSS_CHAMBER]-=2; - } - else { - if(!random(0,100)) weaponstatus[BOSSS_GRIME]+=randompick(-1,-1,-1,-1,-1,1); - } - } - action void A_ChamberGrit(int amt,bool onlywhileempty=false){ - bool customchamber=(invoker.weaponstatus[0]&BOSSF_CUSTOMCHAMBER); - if(customchamber){ - invoker.weaponstatus[BOSSS_GRIME]=0; - return; - } - int ibg=invoker.weaponstatus[BOSSS_GRIME]; - if(!onlywhileempty||invoker.weaponstatus[BOSSS_CHAMBER]<1)ibg+=amt; - else if(!random(0,4))ibg++; - invoker.weaponstatus[BOSSS_GRIME]=clamp(ibg,0,100); - //if(hd_debug)A_Log(string.format("Boss grit level: %i",invoker.weaponstatus[BOSSS_GRIME])); - } - override double weaponbulk(){ - return 144; - } - override void consolidate(){ - //weaponstatus[BOSSS_GRIME]=random(0,20); - } - override void DropOneAmmo(int amt){ - if(owner){ - amt=clamp(amt,1,10); - if(owner.countinv("SevenMilAmmo"))owner.A_DropInventory("SevenMilAmmo",10); - } - } - override void ForceBasicAmmo(){ - owner.A_GiveInventory("SevenMilAmmo"); - } - int jamchance(){ - if(weaponstatus[0]&BOSSF_CUSTOMCHAMBER) return 0; - int jc= - weaponstatus[BOSSS_GRIME] - +(weaponstatus[BOSSS_HEAT]>>2) - +weaponstatus[BOSSS_CHAMBER] - ; - return jc; - } - override string,double getpickupsprite(){return "BOJG[0",1.;} - override void DrawHUDStuff(HDStatusBar sb,HDWeapon hdw,HDPlayerPawn hpl){ - if(sb.hudlevel==1){ - sb.drawimage("RBRSA3A7",(-54,-10),sb.DI_SCREEN_CENTER_BOTTOM,scale:(2.1,2.1)); - sb.drawnum(hpl.countinv("SevenMilAmmo"),-51,-8,sb.DI_SCREEN_CENTER_BOTTOM); - } - if(hdw.weaponstatus[BOSSS_CHAMBER]) { - if(!(hdw.weaponstatus[BOSSS_CHAMBER]%2)) - {sb.drawrect(-40,-8,1,2); sb.drawrect(-39,-9,6,4);} - sb.drawrect(-32,-9,12,4); sb.drawrect(-19,-9,2,4); - } - sb.drawstring( - sb.mAmountFont,string.format("%.1f",hdw.weaponstatus[BOSSS_ZOOM]*0.1), - (-36,-18),sb.DI_SCREEN_CENTER_BOTTOM|sb.DI_TEXT_ALIGN_RIGHT,Font.CR_DARKGRAY - ); - sb.drawstring( - sb.mAmountFont,string.format("%.1f",hdw.weaponstatus[BOSSS_DROPADJUST]*0.1), - (-16,-18),sb.DI_SCREEN_CENTER_BOTTOM|sb.DI_TEXT_ALIGN_RIGHT,Font.CR_WHITE - ); - } - override string gethelptext(){ - if(weaponstatus[0]&BOSSF_CUSTOMCHAMBER) - return "\cfMAN IS ONLY SEPARATED FROM THE HEAVENS\nBY THAT WHICH HE WILL NOT GUN."; - else - return "You are beyond help."; - } - states{ - select0: - BOJG A 0; - goto select0bfg; - deselect0: - BOJG A 0; - goto deselect0big; - ready: - BOJG A 1{ - if(pressingzoom()){ - if(player.cmd.buttons&BT_USE){ - A_ZoomAdjust(BOSSS_DROPADJUST,0,600,BT_USE); - }else if(invoker.weaponstatus[0]&BOSSF_FRONTRETICLE)A_ZoomAdjust(BOSSS_ZOOM,12,40); - else A_ZoomAdjust(BOSSS_ZOOM,5,60); - A_WeaponReady(WRF_NONE); - }else A_WeaponReady(WRF_ALL); - }goto readyend; - user3: - ---- A 0 A_MagManager("HDBattery"); - goto ready; - fire: - BOJG A 1 A_JumpIf(invoker.weaponstatus[BOSSS_CHAMBER]==2,"shoot"); - goto ready; - shoot: - BOJG A 1{ - A_Gunflash(); - invoker.weaponstatus[BOSSS_CHAMBER]=1; - A_StartSound("weapons/bronto",CHAN_WEAPON); - A_StartSound("weapons/bronto",CHAN_WEAPON,CHANF_OVERLAP); - A_StartSound("weapons/bronto",CHAN_WEAPON,CHANF_OVERLAP, volume:0.75, attenuation:ATTN_NONE); - A_StartSound("weapons/bronto2",CHAN_WEAPON,CHANF_OVERLAP); - A_StartSound("weapons/bronto2",CHAN_WEAPON,CHANF_OVERLAP, volume:0.75, attenuation:ATTN_NONE); - invoker.owner.Vel3DFromAngle(gunbraced()?45:90,invoker.owner.angle+180,-invoker.owner.pitch); - //A_AlertMonsters(); - ThinkerIterator Alerter = ThinkerIterator.Create("Actor"); - Actor mo; - while (mo = Actor(Alerter.Next())) - if (mo.bismonster) mo.SoundAlert(invoker.owner); - - if(!(invoker.weaponstatus[0]&BOSSF_CUSTOMCHAMBER)) { - HDBulletActor.FireBullet(self,"HDB_776", - aimoffy:(-1./600.)*invoker.weaponstatus[BOSSS_DROPADJUST], - speedfactor:327.000 - ); - A_ChamberGrit(99); - } - damagemobj(invoker,self,random(130,170)/(gunbraced()?2:1),"falling"); - A_MuzzleClimb( - -50,-frandom(50.,130.), - -50,-frandom(50.,130.) - ); - A_MuzzleClimb( - -50,-frandom(50.,130.), - -50,-frandom(50.,130.), - wepdot:true - ); - } - BOJG U 1 {HDPlayerPawn(invoker.owner).Disarm(invoker.owner);} - BOJG U 1 A_JumpIf(gunbraced(),"ready"); - goto ready; - flash: - BARF A 1 bright{ - A_Light1(); - HDFlashAlpha(-96); - A_ZoomRecoil(0.0); - A_ChamberGrit(randompick(0,0,0,0,0,1,1,1,1,-1)); - } - TNT1 A 0 A_Light0(); - stop; - altfire: - BOJG A 1 offset(0,34) A_WeaponBusy(); - BOJG B 2 offset(2,36) A_JumpIf(invoker.weaponstatus[0]&BOSSF_CUSTOMCHAMBER,1); - BOJG B 1 offset(4,38){ - if(invoker.weaponstatus[BOSSS_CHAMBER]>2)setweaponstate("jamderp"); - } - BOJG B 1 offset(0,34); - BOJG B 0 A_ChamberGrit(randompick(0,0,0,0,-1,1,2),true); - BOJG B 0 A_Refire("chamber"); - goto ready; - althold: - BOJG E 1 A_WeaponReady(WRF_NOFIRE); - BOJG E 1{ - A_ClearRefire(); - bool eww=invoker.weaponstatus[BOSSS_GRIME]>10; - bool chempty=invoker.weaponstatus[BOSSS_CHAMBER]<1; - if(pressingunload()){ - if(chempty){ - return resolvestate("altholdclean"); - }else{ - invoker.weaponstatus[0]|=BOSSF_UNLOADONLY; - return resolvestate("loadchamber"); - } - }else if(pressingreload()){ - if( - !chempty - ){ - invoker.weaponstatus[0]|=BOSSF_UNLOADONLY; - return resolvestate("loadchamber"); - }else if( - eww - ){ - return resolvestate("altholdclean"); - }else if( - countinv("SevenMilAmmo") - ){ - invoker.weaponstatus[0]&=~BOSSF_UNLOADONLY; - return resolvestate("loadchamber"); - } - } - if(pressingaltfire())return resolvestate("althold"); - return resolvestate("altholdend"); - } - altholdend: - BOJG E 0 A_StartSound("weapons/boltfwd",8); - BOJG DC 2 A_WeaponReady(WRF_NOFIRE); - BOJG B 3 offset(2,36){ - A_WeaponReady(WRF_NOFIRE); - if(invoker.weaponstatus[0]&BOSSF_CUSTOMCHAMBER)A_SetTics(1); - } - goto ready; - loadchamber: - BOJG E 1 offset(2,36) A_ClearRefire(); - BOJG E 1 offset(3,38); - BOJG E 1 offset(5,42); - BOJG E 1 offset(8,48) A_StartSound("weapons/pocket",9); - BOJG E 1 offset(9,52) A_MuzzleClimb(frandom(-0.2,0.2),0.2,frandom(-0.2,0.2),0.2,frandom(-0.2,0.2),0.2); - BOJG E 2 offset(8,60); - BOJG E 2 offset(7,72); - TNT1 A 18 A_StartSound("weapons/pocket",9); - TNT1 A 4{ - A_StartSound("weapons/bossload",8,volume:0.7); - if(invoker.weaponstatus[0]&BOSSF_UNLOADONLY){ - int chm=invoker.weaponstatus[BOSSS_CHAMBER]; - invoker.weaponstatus[BOSSS_CHAMBER]=0; - if(chm<2||A_JumpIfInventory("SevenMilAmmo",0,"null")){ - class whatkind=chm==2?"HDLoose7mm":"HDSpent7mm"; - actor rrr=spawn(whatkind,pos+(cos(angle)*10,sin(angle)*10,height-12),ALLOW_REPLACE); - rrr.angle=angle;rrr.A_ChangeVelocity(1,2,1,CVF_RELATIVE); - }else HDF.Give(self,"SevenMilAmmo",1); - A_ChamberGrit(randompick(0,0,0,0,-1,1),true); - }else{ - A_TakeInventory("SevenMilAmmo",1,TIF_NOTAKEINFINITE); - invoker.weaponstatus[BOSSS_CHAMBER]=2; - } - } - BOJG E 2 offset(7,72); - BOJG E 2 offset(8,60); - BOJG E 1 offset(7,52); - BOJG E 1 offset(5,42); - BOJG E 1 offset(3,38); - BOJG E 1 offset(3,35); - goto althold; - altholdclean: - BOJG E 1 offset(2,36) A_ClearRefire(); - BOJG E 1 offset(3,38); - BOJG E 1 offset(5,42) A_Log("Looking inside that chamber...",true); - BOJG E 1 offset(8,48) A_StartSound("weapons/pocket",9); - BOJG E 1 offset(7,52) A_MuzzleClimb(frandom(-0.2,0.2),0.2,frandom(-0.2,0.2),0.2,frandom(-0.2,0.2),0.2); - TNT1 A 3 A_StartSound("weapons/pocket",10); - TNT1 AAAA 4 A_MuzzleClimb(frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2)); - TNT1 A 3 A_StartSound("weapons/pocket",9); - TNT1 AAAA 4 A_MuzzleClimb(frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2)); - TNT1 A 40{ - A_StartSound("weapons/pocket",9); - int amt=invoker.weaponstatus[BOSSS_GRIME]; - string amts="There doesn't seem to be much. "; - if(amt>40)amts="What the FUCK. "; - else if(amt>30)amts="About time - this gun is barely functional. "; - else if(amt>20)amts="This is starting to gum up badly. "; - else if(amt>10)amts="It can use some cleaning. "; - - static const string cleanverbs[]={"extract","scrape off","wipe away","carefully remove","dump out","pick out","blow off","shake out","scrub off","fish out"}; - static const string contaminants[]={"some dust","a lot of dust","a bit of powder residue","a disturbing amount of powder residue","some excess grease","a layer of soot","some iron filings","a bit of hair","an eyelash","a patch of dried blood","a bit of rust","a crumb","a dead insect","ashes","some loose bits of skin","a sticky fluid of some sort","wow some fucking *gunk*","a booger","trace fecal matter","yet even more of that anonymous grey debris that all those bullet impacts make","a dollop of strawberry jam","the dried husk of a pinto bean with residual hog components","a tiny cancerous nodule of Second Flesh","some crystalline buildup of congealed Frag","a nesting queen space ant","a single modern-day transistor","a tiny Boss rifle (also jammed)","a colourless film of darkness made visible"}; - static const string actionparts[]={"bolt carrier","main extractor","auxiliary extractor","cam pin","bolt head","striker","firing pin spring","ejector slot","striker spring","ejector spring"}; - for(int i=amt;i>0;i-=random(8,16))amts.appendformat("You %s %s from the %s. ", - cleanverbs[random(0,cleanverbs.size()-1)], - contaminants[random(0,random(0,contaminants.size()-1))], - actionparts[random(0,random((actionparts.size()>>1),actionparts.size()-1))] - ); - amts.appendformat("\n"); - - amt=randompick(-3,-5,-5,-random(8,16)); - - A_ChamberGrit(amt,true); - amt=invoker.weaponstatus[BOSSS_GRIME]; - if(amt>40)amts.appendformat("You barely scrape the surface of this all-encrusting abomination."); - else if(amt>30)amts.appendformat("The gun will need a lot more work than this before it can be deployed again."); - else if(amt>20)amts.appendformat("You might get a few shots out of it now."); - else if(amt>10)amts.appendformat("It's better, but still not good."); - else amts.appendformat("Good to go."); - A_Log(amts,true); - } - BOJG E 1 offset(7,52); - BOJG E 1 offset(8,48); - BOJG E 1 offset(5,42); - BOJG E 1 offset(3,38); - BOJG E 1 offset(2,36); - goto althold; - jam: - BOJG A 0{ - int chm=invoker.weaponstatus[BOSSS_CHAMBER]; - if(chm<1)setweaponstate("chamber"); - else if(chm<3)invoker.weaponstatus[BOSSS_CHAMBER]+=2; - } - jamderp: - BOJG A 0 A_StartSound("weapons/rifleclick",8,CHANF_OVERLAP); - BOJG D 1 offset(4,38); - BOJG D 2 offset(2,36); - BOJG D 2 offset(4,38)A_MuzzleClimb(frandom(-0.5,0.6),frandom(-0.3,0.6)); - BOJG D 3 offset(2,36){ - A_MuzzleClimb(frandom(-0.5,0.6),frandom(-0.3,0.6)); - if(random(0,invoker.jamchance())<12){ - setweaponstate("chamber"); - if(invoker.weaponstatus[BOSSS_CHAMBER]>2) - invoker.weaponstatus[BOSSS_CHAMBER]-=2; - } - } - BOJG D 2 offset(4,38); - BOJG D 3 offset(2,36); - BOJG A 0 A_Refire("jamderp"); - goto ready; - chamber: - BOJG C 2 offset(4,38){ - if( - random(0,max(2,invoker.weaponstatus[BOSSS_GRIME]>>3)) - &&invoker.weaponstatus[BOSSS_CHAMBER]>2 - ){ - invoker.weaponstatus[BOSSS_CHAMBER]+=2; - A_MuzzleClimb( - -frandom(0.6,2.3),-frandom(0.6,2.3), - -frandom(0.6,1.3),-frandom(0.6,1.3), - -frandom(0.6,1.3),-frandom(0.6,1.3) - ); - setweaponstate("jamderp"); - }else A_StartSound("weapons/boltback",8); - } - BOJG D 2 offset(6,42)A_JumpIf(invoker.weaponstatus[0]&BOSSF_CUSTOMCHAMBER,1); - BOJG D 1 offset(6,42){ - if(gunbraced())A_MuzzleClimb( - frandom(-0.1,0.3),frandom(-0.1,0.3) - );else A_MuzzleClimb( - frandom(-0.2,0.8),frandom(-0.4,0.8) - ); - int jamch=invoker.jamchance(); - if(hd_debug)A_Log("jam chance: "..jamch); - if(random(0,100)1){ - A_SpawnItemEx( - "HDLoose7mm",cos(pitch)*8,1,height-7-sin(pitch)*8, - cos(pitch)*cos(angle-80)*4+vel.x, - cos(pitch)*sin(angle-80)*4+vel.y, - -sin(pitch)*4+vel.z, - 0,SXF_ABSOLUTEMOMENTUM|SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH - ); - }else if(chm==1){ - A_SpawnItemEx( - "HDSpent7mm",cos(pitch)*8,1,height-7-sin(pitch)*8, - cos(pitch)*cos(angle-80)*6+vel.x, - cos(pitch)*sin(angle-80)*6+vel.y, - -sin(pitch)*6+vel.z, - 0,SXF_ABSOLUTEMOMENTUM|SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH - ); - } - //cycle new - invoker.weaponstatus[BOSSS_CHAMBER]=0; - } - BOJG E 1 offset(6,42) A_WeaponReady(WRF_NOFIRE); - BOJG E 0 A_Refire("althold"); - goto altholdend; - reload: - ---- A 1; - goto nope; - altreload: - ---- A 1; - goto nope; - unload: - ---- A 1; - goto nope; - spawn: - BOJG [ -1; - } - override void InitializeWepStats(bool idfa){ - weaponspecial = 1337; //UaS sling compatbility - weaponstatus[BOSSS_CHAMBER]=0; - if(!idfa){ - weaponstatus[BOSSS_HEAT]=0; - } - if(!owner){ - if(randompick(0,0,1))weaponstatus[0]&=~BOSSF_FRONTRETICLE; - else weaponstatus[0]|=BOSSF_FRONTRETICLE; - weaponstatus[BOSSS_ZOOM]=20; - weaponstatus[BOSSS_DROPADJUST]=160; - } - } - override void loadoutconfigure(string input){ - int yeet=getloadoutvar(input,"yeetable",1); - if(!yeet)weaponstatus[0]&=~BOSSF_YEETABLE; - else if(yeet>0)weaponstatus[0]|=BOSSF_YEETABLE; - - int customchamber=getloadoutvar(input,"customchamber",1); - if(!customchamber)weaponstatus[0]&=~BOSSF_CUSTOMCHAMBER; - else if(customchamber>0)weaponstatus[0]|=BOSSF_CUSTOMCHAMBER; - - int frontreticle=getloadoutvar(input,"frontreticle",1); - if(!frontreticle)weaponstatus[0]&=~BOSSF_FRONTRETICLE; - else if(frontreticle>0)weaponstatus[0]|=BOSSF_FRONTRETICLE; - - int bulletdrop=getloadoutvar(input,"bulletdrop",3); - if(bulletdrop>=0)weaponstatus[BOSSS_DROPADJUST]=clamp(bulletdrop,0,600); - - int zoom=getloadoutvar(input,"zoom",3); - if(zoom>0)weaponstatus[BOSSS_ZOOM]= - (weaponstatus[0]&BOSSF_FRONTRETICLE)? - clamp(zoom,12,40): - clamp(zoom,5,60); - } -} - -// 9mm Boss Rifle -class BossRifleButIts9mm:BossRifle{ - default{ - tag "$TAG_9MMBOSS"; - hdweapon.refid ""; - } - - override string pickupmessage(){ - return "You got the "..gettag().."! It's a bit greasy..."; - } - - class nineclip; - override void postbeginplay(){ - super.postbeginplay(); - string lol = "HD9mClip"; - nineclip = lol; - } - override double weaponbulk(){ - return 144+weaponstatus[BOSSS_MAG]*ENC_9_LOADED; - } - override void DropOneAmmo(int amt){ - if(owner){ - if(owner.countinv("HDPistolAmmo"))owner.A_DropInventory("HDPistolAmmo",10); - //else owner.A_DropInventory("HD7mClip",1); - } - } - override string gethelptext(){ - return - WEPHELP_FIRESHOOT - ..WEPHELP_ALTFIRE.." Work bolt\n" - ..WEPHELP_RELOADRELOAD - ..WEPHELP_ZOOM.."+"..WEPHELP_FIREMODE.." Zoom\n" - ..WEPHELP_ZOOM.."+"..WEPHELP_USE.." Bullet drop\n" - ..WEPHELP_ALTFIRE.."+"..WEPHELP_UNLOAD.." Unload chamber/Clean rifle\n" - ..WEPHELP_UNLOADUNLOAD - ; - } - override void ForceBasicAmmo(){ - owner.A_SetInventory("HDPistolAmmo",11); - } - override string,double getpickupsprite(){return "BOJGY0",1.;} - override void DrawHUDStuff(HDStatusBar sb,HDWeapon hdw,HDPlayerPawn hpl){ - if(sb.hudlevel==1){ - if (nineclip) { - sb.drawimage("9CLPA0",(-54,-10),sb.DI_SCREEN_CENTER_BOTTOM,scale:(2.1,2.1)); - sb.drawnum(hpl.countinv(nineclip),-51,-8,sb.DI_SCREEN_CENTER_BOTTOM); - } - else { - sb.drawimage("PRNDA0",(-54,-10),sb.DI_SCREEN_CENTER_BOTTOM,scale:(2.1,2.1)); - sb.drawnum(hpl.countinv("HDPistolAmmo"),-51,-8,sb.DI_SCREEN_CENTER_BOTTOM); - } - } - sb.drawwepnum(hdw.weaponstatus[BOSSS_MAG],10); - sb.drawwepcounter(hdw.weaponstatus[BOSSS_CHAMBER], - -16,-10,"blank","RBRSA1A5","RBRSA3A7","RBRSA4A6" - ); - sb.drawstring( - sb.mAmountFont,string.format("%.1f",hdw.weaponstatus[BOSSS_ZOOM]*0.1), - (-36,-18),sb.DI_SCREEN_CENTER_BOTTOM|sb.DI_TEXT_ALIGN_RIGHT,Font.CR_DARKGRAY - ); - sb.drawstring( - sb.mAmountFont,string.format("%.1f",hdw.weaponstatus[BOSSS_DROPADJUST]*0.1), - (-16,-18),sb.DI_SCREEN_CENTER_BOTTOM|sb.DI_TEXT_ALIGN_RIGHT,Font.CR_WHITE - ); - } - override void InitializeWepStats(bool idfa){ - weaponspecial = 1337; //UaS sling compatbility - super.InitializeWepStats(idfa); - } - states{ - select0: - BOJG F 0; - goto select0bfg; - deselect0: - BOJG F 0; - goto deselect0big; - - ready: - BOJG F 1{ - if(pressingzoom()){ - if(player.cmd.buttons&BT_USE){ - A_ZoomAdjust(BOSSS_DROPADJUST,0,600,BT_USE); - }else if(invoker.weaponstatus[0]&BOSSF_FRONTRETICLE)A_ZoomAdjust(BOSSS_ZOOM,12,40); - else A_ZoomAdjust(BOSSS_ZOOM,5,60); - A_WeaponReady(WRF_NONE); - }else A_WeaponReady(WRF_ALL); - }goto readyend; - user3: - ---- A 0 { - //if (invoker.nineclip) A_MagManager(invoker.nineclip); - //else A_MagManager("HDBattery"); - A_MagManager("HD9mClip"); - } - goto ready; - fire: - BOJG F 1 A_JumpIf(invoker.weaponstatus[BOSSS_CHAMBER]==2,"shoot"); - goto ready; - shoot: - BOJG F 1{ - A_Gunflash(); - invoker.weaponstatus[BOSSS_CHAMBER]=1; - A_StartSound("weapons/9mmboss",CHAN_WEAPON,CHANF_OVERLAP, - pitch:!(invoker.weaponstatus[0]&BOSSF_CUSTOMCHAMBER)?1.1:1. - ); - A_AlertMonsters(); - - HDBulletActor.FireBullet(self,"HDB_9", - aimoffy:(-1./600.)*invoker.weaponstatus[BOSSS_DROPADJUST], - speedfactor:1.1*(invoker.weaponstatus[0]&BOSSF_CUSTOMCHAMBER)?0.99:1.07 - ); - A_MuzzleClimb( - 0,0, - -frandom(0.06,0.12),-frandom(0.09,0.15), - -frandom(0.12,0.2),-frandom(0.18,0.3), - -frandom(0.12,0.2),-frandom(0.18,0.3) - ); - } - BOJG V 1; - BOJG V 1 A_JumpIf(gunbraced(),"ready"); - goto ready; - flash: - BARF A 1 bright{ - A_Light1(); - HDFlashAlpha(-96); - A_ZoomRecoil(0.98); - A_ChamberGrit(randompick(0,0,0,0,0,1,1,1,1,-1)); - } - TNT1 A 0 A_Light0(); - stop; - altfire: - BOJG F 1 offset(0,34) A_WeaponBusy(); - BOJG G 2 offset(2,36) A_JumpIf(invoker.weaponstatus[0]&BOSSF_CUSTOMCHAMBER,1); - BOJG G 1 offset(4,38){ - if(invoker.weaponstatus[BOSSS_CHAMBER]>2)setweaponstate("jamderp"); - } - BOJG G 1 offset(0,34); - BOJG G 0 A_ChamberGrit(randompick(0,0,0,0,-1,1,2),true); - BOJG G 0 A_Refire("chamber"); - goto ready; - althold: - BOJG J 1 A_WeaponReady(WRF_NOFIRE); - BOJG J 1{ - A_ClearRefire(); - bool eww=invoker.weaponstatus[BOSSS_GRIME]>10; - bool chempty=invoker.weaponstatus[BOSSS_CHAMBER]<1; - if(pressingunload()){ - if(chempty){ - return resolvestate("altholdclean"); - }else{ - invoker.weaponstatus[0]|=BOSSF_UNLOADONLY; - return resolvestate("loadchamber"); - } - }else if(pressingreload()){ - if( - !chempty - ){ - invoker.weaponstatus[0]|=BOSSF_UNLOADONLY; - return resolvestate("loadchamber"); - }else if( - eww - ){ - return resolvestate("altholdclean"); - }else if( - countinv("SevenMilAmmo") - ){ - invoker.weaponstatus[0]&=~BOSSF_UNLOADONLY; - return resolvestate("loadchamber"); - } - } - if(pressingaltfire())return resolvestate("althold"); - return resolvestate("altholdend"); - } - altholdend: - BOJG J 0 A_StartSound("weapons/boltfwd",8); - BOJG IH 2 A_WeaponReady(WRF_NOFIRE); - BOJG G 3 offset(2,36){ - A_WeaponReady(WRF_NOFIRE); - if(invoker.weaponstatus[0]&BOSSF_CUSTOMCHAMBER)A_SetTics(1); - } - goto ready; - loadchamber: - BOJG J 1 offset(2,36) A_ClearRefire(); - BOJG J 1 offset(3,38); - BOJG J 1 offset(5,42); - BOJG J 1 offset(8,48) A_StartSound("weapons/pocket",9); - BOJG J 1 offset(9,52) A_MuzzleClimb(frandom(-0.2,0.2),0.2,frandom(-0.2,0.2),0.2,frandom(-0.2,0.2),0.2); - BOJG J 2 offset(8,60); - BOJG J 2 offset(7,72); - TNT1 A 18 A_StartSound("weapons/pocket",9); - TNT1 A 4{ - A_StartSound("weapons/bossload",8,volume:0.7); - if(invoker.weaponstatus[0]&BOSSF_UNLOADONLY){ - int chm=invoker.weaponstatus[BOSSS_CHAMBER]; - invoker.weaponstatus[BOSSS_CHAMBER]=0; - if(chm<2||A_JumpIfInventory("HDPistolAmmo",0,"null")){ - class whatkind=chm==2?"HDLoose9mm":"HDSpent9mm"; - actor rrr=spawn(whatkind,pos+(cos(angle)*10,sin(angle)*10,height-12),ALLOW_REPLACE); - rrr.angle=angle;rrr.A_ChangeVelocity(1,2,1,CVF_RELATIVE); - }else HDF.Give(self,"HDPistolAmmo",1); - A_ChamberGrit(randompick(0,0,0,0,-1,1),true); - }else{ - A_TakeInventory("HDPistolAmmo",1,TIF_NOTAKEINFINITE); - invoker.weaponstatus[BOSSS_CHAMBER]=2; - } - } - BOJG J 2 offset(7,72); - BOJG J 2 offset(8,60); - BOJG J 1 offset(7,52); - BOJG J 1 offset(5,42); - BOJG J 1 offset(3,38); - BOJG J 1 offset(3,35); - goto althold; - altholdclean: - BOJG J 1 offset(2,36) A_ClearRefire(); - BOJG J 1 offset(3,38); - BOJG J 1 offset(5,42) A_Log("Looking inside that chamber...",true); - BOJG J 1 offset(8,48) A_StartSound("weapons/pocket",9); - BOJG J 1 offset(7,52) A_MuzzleClimb(frandom(-0.2,0.2),0.2,frandom(-0.2,0.2),0.2,frandom(-0.2,0.2),0.2); - TNT1 A 3 A_StartSound("weapons/pocket",10); - TNT1 AAAA 4 A_MuzzleClimb(frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2)); - TNT1 A 3 A_StartSound("weapons/pocket",9); - TNT1 AAAA 4 A_MuzzleClimb(frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2)); - TNT1 A 40{ - A_StartSound("weapons/pocket",9); - int amt=invoker.weaponstatus[BOSSS_GRIME]; - string amts="There doesn't seem to be much. "; - if(amt>40)amts="What the FUCK. "; - else if(amt>30)amts="About time - this gun is barely functional. "; - else if(amt>20)amts="This is starting to gum up badly. "; - else if(amt>10)amts="It can use some cleaning. "; - - static const string cleanverbs[]={"extract","scrape off","wipe away","carefully remove","dump out","pick out","blow off","shake out","scrub off","fish out"}; - static const string contaminants[]={"some dust","a lot of dust","a bit of powder residue","a disturbing amount of powder residue","some excess grease","a layer of soot","some iron filings","a bit of hair","an eyelash","a patch of dried blood","a bit of rust","a crumb","a dead insect","ashes","some loose bits of skin","a sticky fluid of some sort","wow some fucking *gunk*","a booger","trace fecal matter","yet even more of that anonymous grey debris that all those bullet impacts make","a dollop of strawberry jam","the dried husk of a pinto bean with residual hog components","a tiny cancerous nodule of Second Flesh","some crystalline buildup of congealed Frag","a nesting queen space ant","a single modern-day transistor","a tiny Boss rifle (also jammed)","a colourless film of darkness made visible"}; - static const string actionparts[]={"bolt carrier","main extractor","auxiliary extractor","cam pin","bolt head","striker","firing pin spring","ejector slot","striker spring","ejector spring"}; - for(int i=amt;i>0;i-=random(8,16))amts.appendformat("You %s %s from the %s. ", - cleanverbs[random(0,cleanverbs.size()-1)], - contaminants[random(0,random(0,contaminants.size()-1))], - actionparts[random(0,random((actionparts.size()>>1),actionparts.size()-1))] - ); - amts.appendformat("\n"); - - amt=randompick(-3,-5,-5,-random(8,16)); - - A_ChamberGrit(amt,true); - amt=invoker.weaponstatus[BOSSS_GRIME]; - if(amt>40)amts.appendformat("You barely scrape the surface of this all-encrusting abomination."); - else if(amt>30)amts.appendformat("The gun will need a lot more work than this before it can be deployed again."); - else if(amt>20)amts.appendformat("You might get a few shots out of it now."); - else if(amt>10)amts.appendformat("It's better, but still not good."); - else amts.appendformat("Good to go."); - A_Log(amts,true); - } - BOJG J 1 offset(7,52); - BOJG J 1 offset(8,48); - BOJG J 1 offset(5,42); - BOJG J 1 offset(3,38); - BOJG J 1 offset(2,36); - goto althold; - jam: - BOJG F 0{ - int chm=invoker.weaponstatus[BOSSS_CHAMBER]; - if(chm<1)setweaponstate("chamber"); - else if(chm<3)invoker.weaponstatus[BOSSS_CHAMBER]+=2; - } - jamderp: - BOJG F 0 A_StartSound("weapons/rifleclick",8,CHANF_OVERLAP); - BOJG I 1 offset(4,38); - BOJG I 2 offset(2,36); - BOJG I 2 offset(4,38)A_MuzzleClimb(frandom(-0.5,0.6),frandom(-0.3,0.6)); - BOJG I 3 offset(2,36){ - A_MuzzleClimb(frandom(-0.5,0.6),frandom(-0.3,0.6)); - if(random(0,invoker.jamchance())<12){ - setweaponstate("chamber"); - if(invoker.weaponstatus[BOSSS_CHAMBER]>2) - invoker.weaponstatus[BOSSS_CHAMBER]-=2; - } - } - BOJG I 2 offset(4,38); - BOJG I 3 offset(2,36); - BOJG F 0 A_Refire("jamderp"); - goto ready; - chamber: - BOJG H 2 offset(4,38){ - if( - random(0,max(2,invoker.weaponstatus[BOSSS_GRIME]>>3)) - &&invoker.weaponstatus[BOSSS_CHAMBER]>2 - ){ - invoker.weaponstatus[BOSSS_CHAMBER]+=2; - A_MuzzleClimb( - -frandom(0.6,2.3),-frandom(0.6,2.3), - -frandom(0.6,1.3),-frandom(0.6,1.3), - -frandom(0.6,1.3),-frandom(0.6,1.3) - ); - setweaponstate("jamderp"); - }else A_StartSound("weapons/boltback",8); - } - BOJG I 2 offset(6,42)A_JumpIf(invoker.weaponstatus[0]&BOSSF_CUSTOMCHAMBER,1); - BOJG I 1 offset(6,42){ - if(gunbraced())A_MuzzleClimb( - frandom(-0.1,0.3),frandom(-0.1,0.3) - );else A_MuzzleClimb( - frandom(-0.2,0.8),frandom(-0.4,0.8) - ); - int jamch=invoker.jamchance(); - if(hd_debug)A_Log("jam chance: "..jamch); - if(random(0,100)1){ - A_SpawnItemEx( - "HDLoose9mm",cos(pitch)*8,1,height-7-sin(pitch)*8, - cos(pitch)*cos(angle-80)*4+vel.x, - cos(pitch)*sin(angle-80)*4+vel.y, - -sin(pitch)*4+vel.z, - 0,SXF_ABSOLUTEMOMENTUM|SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH - ); - }else if(chm==1){ - A_SpawnItemEx( - "HDSpent9mm",cos(pitch)*8,1,height-7-sin(pitch)*8, - cos(pitch)*cos(angle-80)*6+vel.x, - cos(pitch)*sin(angle-80)*6+vel.y, - -sin(pitch)*6+vel.z, - 0,SXF_ABSOLUTEMOMENTUM|SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH - ); - } - //cycle new - if(invoker.weaponstatus[BOSSS_MAG]>0){ - invoker.weaponstatus[BOSSS_CHAMBER]=2; - invoker.weaponstatus[BOSSS_MAG]--; - }else invoker.weaponstatus[BOSSS_CHAMBER]=0; - } - BOJG J 1 offset(6,42) A_WeaponReady(WRF_NOFIRE); - BOJG J 0 A_Refire("althold"); - goto altholdend; - reload: - ---- A 0{invoker.weaponstatus[0]&=~BOSSF_DONTUSECLIPS;} - goto reloadstart; - altreload: - ---- A 0{invoker.weaponstatus[0]|=BOSSF_DONTUSECLIPS;} - goto reloadstart; - reloadstart: - BOJG F 1 offset(0,34); - BOJG F 1 offset(2,36); - BOJG F 1 offset(4,40); - BOJG F 2 offset(8,42){ - A_StartSound("weapons/rifleclick2",8,CHANF_OVERLAP,0.9,pitch:0.95); - A_MuzzleClimb(-frandom(0.4,0.8),frandom(0.4,1.4)); - } - BOJG F 4 offset(14,46){ - A_StartSound("weapons/rifleload",8,CHANF_OVERLAP); - A_MuzzleClimb(-frandom(0.4,0.8),frandom(0.4,1.4)); - } - BOJG F 0{ - int mg=invoker.weaponstatus[BOSSS_MAG]; - if(mg==10)setweaponstate("reloaddone"); - else if(invoker.weaponstatus[0]&BOSSF_DONTUSECLIPS)setweaponstate("loadhand"); - else if(invoker.nineclip && - ( - mg<1 - ||!countinv("HDPistolAmmo") - )&&!HDMagAmmo.NothingLoaded(self,invoker.nineclip) - )setweaponstate("loadclip"); - } - loadhand: - BOJG F 0 A_JumpIfInventory("HDPistolAmmo",1,"loadhandloop"); - goto reloaddone; - loadhandloop: - BOJG F 4{ - int hnd=min( - countinv("HDPistolAmmo"),4, - 10-invoker.weaponstatus[BOSSS_MAG] - ); - if(hnd<1){ - setweaponstate("reloaddone"); - return; - }else{ - A_TakeInventory("HDPistolAmmo",hnd,TIF_NOTAKEINFINITE); - invoker.weaponstatus[BOSSS_HAND]=hnd; - A_StartSound("weapons/pocket",9); - } - } - loadone: - BOJG F 2 offset(16,50) A_JumpIf(invoker.weaponstatus[BOSSS_HAND]<1,"loadhandnext"); - BOJG F 4 offset(14,46){ - invoker.weaponstatus[BOSSS_HAND]--; - invoker.weaponstatus[BOSSS_MAG]++; - A_StartSound("weapons/rifleclick2",8); - }loop; - loadhandnext: - BOJG F 8 offset(16,48){ - if( - PressingReload()|| - PressingFire()|| - PressingAltFire()|| - PressingZoom()|| - !countinv("HDPistolAmmo") //don't strip clips automatically - )setweaponstate("reloaddone"); - else A_StartSound("weapons/pocket",9); - }goto loadhandloop; - loadclip: - BOJG F 0 A_JumpIf(invoker.weaponstatus[BOSSS_MAG]>9,"reloaddone"); - BOJG F 3 offset(16,50){ - let ccc=hdmagammo(findinventory(invoker.nineclip)); - if(ccc){ - //find the last mag that has anything in it and load from that - bool fullmag=false; - int magindex=-1; - for(int i=ccc.mags.size()-1;i>=0;i--){ - if(ccc.mags[i]>=10)fullmag=true; - if(magindex<0&&ccc.mags[i]>0)magindex=i; - if(fullmag&&magindex>0)break; - } - if(magindex<0){ - setweaponstate("reloaddone"); - return; - } - - //load the whole clip at once if possible - if( - fullmag - &&invoker.weaponstatus[BOSSS_MAG]<1 - ){ - setweaponstate("loadwholeclip"); - return; - } - - //strip one round and load it - A_StartSound("weapons/rifleclick2",CHAN_WEAPONBODY); - invoker.weaponstatus[BOSSS_MAG]++; - ccc.mags[magindex]--; - } - } - BOJG F 5 offset(16,52) A_JumpIf( - PressingReload()|| - PressingFire()|| - PressingAltFire()|| - PressingZoom() - ,"reloaddone"); - loop; - loadwholeclip: - BOJG F 4 offset(16,50) A_StartSound("weapons/rifleclick2",8); - BOJG FFF 3 offset(17,52) A_StartSound("weapons/rifleclick2",8,pitch:1.01); - BOJG FFF 2 offset(16,50) A_StartSound("weapons/rifleclick2",8,CHANF_OVERLAP,pitch:1.02); - BOJG FFF 1 offset(15,48) A_StartSound("weapons/rifleclick2",8,CHANF_OVERLAP,pitch:1.02); - BOJG F 2 offset(14,46){ - A_StartSound("weapons/rifleclick",CHAN_WEAPONBODY); - let ccc=hdmagammo(findinventory(invoker.nineclip)); - if(ccc){ - invoker.weaponstatus[BOSSS_MAG]=ccc.TakeMag(true); - if(pressingreload()){ - ccc.addamag(0); - A_SetTics(10); - A_StartSound("weapons/pocket",CHAN_POCKETS); - }else HDMagAmmo.SpawnMag(self,invoker.nineclip,0); - } - }goto reloaddone; - reloaddone: - BOJG F 1 offset(4,40); - BOJG F 1 offset(2,36); - BOJG F 1 offset(0,34); - goto nope; - unload: - BOJG F 1 offset(0,34); - BOJG F 1 offset(2,36); - BOJG F 1 offset(4,40); - BOJG F 2 offset(8,42){ - A_MuzzleClimb(-frandom(0.4,0.8),frandom(0.4,1.4)); - A_StartSound("weapons/rifleclick2",8); - } - BOJG F 4 offset (14,46){ - A_MuzzleClimb(-frandom(0.4,0.8),frandom(0.4,1.4)); - A_StartSound("weapons/rifleload",8); - } - unloadloop: - BOJG F 4 offset(3,41){ - if(invoker.weaponstatus[BOSSS_MAG]<1)setweaponstate("unloaddone"); - else{ - A_StartSound("weapons/rifleclick2",8); - invoker.weaponstatus[BOSSS_MAG]--; - if(A_JumpIfInventory("HDPistolAmmo",0,"null")){ - A_SpawnItemEx( - "HDLoose9mm",cos(pitch)*8,0,height-7-sin(pitch)*8, - cos(pitch)*cos(angle-40)*1+vel.x, - cos(pitch)*sin(angle-40)*1+vel.y, - -sin(pitch)*1+vel.z, - 0,SXF_ABSOLUTEMOMENTUM| - SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH - ); - }else A_GiveInventory("HDPistolAmmo",1); - } - } - BOJG F 2 offset(2,42); - BOJG F 0{ - if( - PressingReload()|| - PressingFire()|| - PressingAltFire()|| - PressingZoom() - )setweaponstate("unloaddone"); - }loop; - unloaddone: - BOJG F 2 offset(2,42); - BOJG F 3 offset(3,41); - BOJG F 1 offset(4,40) A_StartSound("weapons/rifleclick",8); - BOJG F 1 offset(2,36); - BOJG F 1 offset(0,34); - goto ready; - - spawn: - BOJG Y -1; - } -} - -// 4mm Boss Rifle -class BossRifleButIts4mm:BossRifle{ - default{ - tag "$TAG_4MMBOSS"; - hdweapon.refid ""; - } - - override string pickupmessage(){ - return "You got the "..gettag().."! Surprisingly light."; - } - - override double weaponbulk(){ - return 144+weaponstatus[BOSSS_MAG]*ENC_426_LOADED; - } - override void DropOneAmmo(int amt){ - if(owner){ - if(owner.countinv("FourMilAmmo"))owner.A_DropInventory("FourMilAmmo",10); - //else owner.A_DropInventory("HD7mClip",1); - } - } - override void ForceBasicAmmo(){ - owner.A_SetInventory("FourMilAmmo",11); - } - override string gethelptext(){ - return - WEPHELP_FIRESHOOT - ..WEPHELP_ALTFIRE.." Work bolt\n" - ..WEPHELP_RELOADRELOAD - ..WEPHELP_ZOOM.."+"..WEPHELP_FIREMODE.." Zoom\n" - ..WEPHELP_ZOOM.."+"..WEPHELP_USE.." Bullet drop\n" - ..WEPHELP_ALTFIRE.."+"..WEPHELP_UNLOAD.." Unload chamber/Clean rifle\n" - ..WEPHELP_UNLOADUNLOAD - ; - } - override string,double getpickupsprite(){return "BOJGZ0",1.;} - override void DrawHUDStuff(HDStatusBar sb,HDWeapon hdw,HDPlayerPawn hpl){ - if(sb.hudlevel==1){ - sb.drawimage("RCLSA3A7",(-54,-10),sb.DI_SCREEN_CENTER_BOTTOM,scale:(2.1,2.1)); - sb.drawnum(hpl.countinv("FourMilAmmo"),-51,-8,sb.DI_SCREEN_CENTER_BOTTOM); - } - sb.drawwepnum(hdw.weaponstatus[BOSSS_MAG],10); - sb.drawwepcounter(hdw.weaponstatus[BOSSS_CHAMBER], - -16,-10,"blank","RBRSA1A5","RBRSA3A7","RBRSA4A6" - ); - sb.drawstring( - sb.mAmountFont,string.format("%.1f",hdw.weaponstatus[BOSSS_ZOOM]*0.1), - (-36,-18),sb.DI_SCREEN_CENTER_BOTTOM|sb.DI_TEXT_ALIGN_RIGHT,Font.CR_DARKGRAY - ); - sb.drawstring( - sb.mAmountFont,string.format("%.1f",hdw.weaponstatus[BOSSS_DROPADJUST]*0.1), - (-16,-18),sb.DI_SCREEN_CENTER_BOTTOM|sb.DI_TEXT_ALIGN_RIGHT,Font.CR_WHITE - ); - } - override void InitializeWepStats(bool idfa){ - weaponspecial = 1337; //UaS sling compatbility - super.InitializeWepStats(idfa); - } - states{ - select0: - BOJG K 0; - goto select0bfg; - deselect0: - BOJG K 0; - goto deselect0big; - - ready: - BOJG K 1{ - if(pressingzoom()){ - if(player.cmd.buttons&BT_USE){ - A_ZoomAdjust(BOSSS_DROPADJUST,0,600,BT_USE); - }else if(invoker.weaponstatus[0]&BOSSF_FRONTRETICLE)A_ZoomAdjust(BOSSS_ZOOM,12,40); - else A_ZoomAdjust(BOSSS_ZOOM,5,60); - A_WeaponReady(WRF_NONE); - }else A_WeaponReady(WRF_ALL); - }goto readyend; - user3: - ---- A 0 A_MagManager("HDBattery"); - goto ready; - fire: - BOJG K 1 A_JumpIf(invoker.weaponstatus[BOSSS_CHAMBER]==2,"shoot"); - goto ready; - shoot: - BOJG K 1{ - A_Gunflash(); - invoker.weaponstatus[BOSSS_CHAMBER]=0; - A_StartSound("weapons/4mmboss",CHAN_WEAPON,CHANF_OVERLAP, - pitch:!(invoker.weaponstatus[0]&BOSSF_CUSTOMCHAMBER)?1.1:1. - ); - A_AlertMonsters(); - - HDBulletActor.FireBullet(self,"HDB_426", - aimoffy:(-1./600.)*invoker.weaponstatus[BOSSS_DROPADJUST], - speedfactor:(invoker.weaponstatus[0]&BOSSF_CUSTOMCHAMBER)?0.99:1.07 - ); - A_MuzzleClimb( - 0,0, - -frandom(0.15,0.3),-frandom(0.3,0.5), - -frandom(0.3,0.6),-frandom(0.6,1.1), - -frandom(0.3,0.6),-frandom(0.6,1.1) - ); - } - BOJG W 1; - BOJG W 1 A_JumpIf(gunbraced(),"ready"); - goto ready; - flash: - BARF A 1 bright{ - A_Light1(); - HDFlashAlpha(-96); - A_ZoomRecoil(0.96); - A_ChamberGrit(randompick(0,0,0,0,0,1,1,1,1,-1)); - } - TNT1 A 0 A_Light0(); - stop; - altfire: - BOJG K 1 offset(0,34) A_WeaponBusy(); - BOJG L 2 offset(2,36) A_JumpIf(invoker.weaponstatus[0]&BOSSF_CUSTOMCHAMBER,1); - BOJG L 1 offset(4,38){ - if(invoker.weaponstatus[BOSSS_CHAMBER]>2)setweaponstate("jamderp"); - } - BOJG L 1 offset(0,34); - BOJG L 0 A_ChamberGrit(randompick(0,0,0,0,-1,1,2),true); - BOJG L 0 A_Refire("chamber"); - goto ready; - althold: - BOJG O 1 A_WeaponReady(WRF_NOFIRE); - BOJG O 1{ - A_ClearRefire(); - bool eww=invoker.weaponstatus[BOSSS_GRIME]>10; - bool chempty=invoker.weaponstatus[BOSSS_CHAMBER]<1; - if(pressingunload()){ - if(chempty){ - return resolvestate("altholdclean"); - }else{ - invoker.weaponstatus[0]|=BOSSF_UNLOADONLY; - return resolvestate("loadchamber"); - } - }else if(pressingreload()){ - if( - !chempty - ){ - invoker.weaponstatus[0]|=BOSSF_UNLOADONLY; - return resolvestate("loadchamber"); - }else if( - eww - ){ - return resolvestate("altholdclean"); - }else if( - countinv("SevenMilAmmo") - ){ - invoker.weaponstatus[0]&=~BOSSF_UNLOADONLY; - return resolvestate("loadchamber"); - } - } - if(pressingaltfire())return resolvestate("althold"); - return resolvestate("altholdend"); - } - altholdend: - BOJG O 0 A_StartSound("weapons/boltfwd",8); - BOJG NM 2 A_WeaponReady(WRF_NOFIRE); - BOJG L 3 offset(2,36){ - A_WeaponReady(WRF_NOFIRE); - if(invoker.weaponstatus[0]&BOSSF_CUSTOMCHAMBER)A_SetTics(1); - } - goto ready; - loadchamber: - BOJG O 1 offset(2,36) A_ClearRefire(); - BOJG O 1 offset(3,38); - BOJG O 1 offset(5,42); - BOJG O 1 offset(8,48) A_StartSound("weapons/pocket",9); - BOJG O 1 offset(9,52) A_MuzzleClimb(frandom(-0.2,0.2),0.2,frandom(-0.2,0.2),0.2,frandom(-0.2,0.2),0.2); - BOJG O 2 offset(8,60); - BOJG O 2 offset(7,72); - TNT1 A 18 A_StartSound("weapons/pocket",9); - TNT1 A 4{ - A_StartSound("weapons/bossload",8,volume:0.7); - if(invoker.weaponstatus[0]&BOSSF_UNLOADONLY){ - int chm=invoker.weaponstatus[BOSSS_CHAMBER]; - invoker.weaponstatus[BOSSS_CHAMBER]=0; - if(chm<2||A_JumpIfInventory("FourMilAmmo",0,"null")){ - if (chm==2){ - actor rrr=spawn("ZM66DroppedRound",pos+(cos(angle)*10,sin(angle)*10,height-12),ALLOW_REPLACE); - rrr.angle=angle;rrr.A_ChangeVelocity(1,2,1,CVF_RELATIVE); - } - }else HDF.Give(self,"FourMilAmmo",1); - A_ChamberGrit(randompick(0,0,0,0,-1,1),true); - }else{ - A_TakeInventory("FourMilAmmo",1,TIF_NOTAKEINFINITE); - invoker.weaponstatus[BOSSS_CHAMBER]=2; - } - } - BOJG O 2 offset(7,72); - BOJG O 2 offset(8,60); - BOJG O 1 offset(7,52); - BOJG O 1 offset(5,42); - BOJG O 1 offset(3,38); - BOJG O 1 offset(3,35); - goto althold; - altholdclean: - BOJG O 1 offset(2,36) A_ClearRefire(); - BOJG O 1 offset(3,38); - BOJG O 1 offset(5,42) A_Log("Looking inside that chamber...",true); - BOJG O 1 offset(8,48) A_StartSound("weapons/pocket",9); - BOJG O 1 offset(7,52) A_MuzzleClimb(frandom(-0.2,0.2),0.2,frandom(-0.2,0.2),0.2,frandom(-0.2,0.2),0.2); - TNT1 A 3 A_StartSound("weapons/pocket",10); - TNT1 AAAA 4 A_MuzzleClimb(frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2)); - TNT1 A 3 A_StartSound("weapons/pocket",9); - TNT1 AAAA 4 A_MuzzleClimb(frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2)); - TNT1 A 40{ - A_StartSound("weapons/pocket",9); - int amt=invoker.weaponstatus[BOSSS_GRIME]; - string amts="There doesn't seem to be much. "; - if(amt>40)amts="What the FUCK. "; - else if(amt>30)amts="About time - this gun is barely functional. "; - else if(amt>20)amts="This is starting to gum up badly. "; - else if(amt>10)amts="It can use some cleaning. "; - - static const string cleanverbs[]={"extract","scrape off","wipe away","carefully remove","dump out","pick out","blow off","shake out","scrub off","fish out"}; - static const string contaminants[]={"some dust","a lot of dust","a bit of powder residue","a disturbing amount of powder residue","some excess grease","a layer of soot","some iron filings","a bit of hair","an eyelash","a patch of dried blood","a bit of rust","a crumb","a dead insect","ashes","some loose bits of skin","a sticky fluid of some sort","wow some fucking *gunk*","a booger","trace fecal matter","yet even more of that anonymous grey debris that all those bullet impacts make","a dollop of strawberry jam","the dried husk of a pinto bean with residual hog components","a tiny cancerous nodule of Second Flesh","some crystalline buildup of congealed Frag","a nesting queen space ant","a single modern-day transistor","a tiny Boss rifle (also jammed)","a colourless film of darkness made visible"}; - static const string actionparts[]={"bolt carrier","main extractor","auxiliary extractor","cam pin","bolt head","striker","firing pin spring","ejector slot","striker spring","ejector spring"}; - for(int i=amt;i>0;i-=random(8,16))amts.appendformat("You %s %s from the %s. ", - cleanverbs[random(0,cleanverbs.size()-1)], - contaminants[random(0,random(0,contaminants.size()-1))], - actionparts[random(0,random((actionparts.size()>>1),actionparts.size()-1))] - ); - amts.appendformat("\n"); - - amt=randompick(-3,-5,-5,-random(8,16)); - - A_ChamberGrit(amt,true); - amt=invoker.weaponstatus[BOSSS_GRIME]; - if(amt>40)amts.appendformat("You barely scrape the surface of this all-encrusting abomination."); - else if(amt>30)amts.appendformat("The gun will need a lot more work than this before it can be deployed again."); - else if(amt>20)amts.appendformat("You might get a few shots out of it now."); - else if(amt>10)amts.appendformat("It's better, but still not good."); - else amts.appendformat("Good to go."); - A_Log(amts,true); - } - BOJG O 1 offset(7,52); - BOJG O 1 offset(8,48); - BOJG O 1 offset(5,42); - BOJG O 1 offset(3,38); - BOJG O 1 offset(2,36); - goto althold; - jam: - BOJG K 0{ - int chm=invoker.weaponstatus[BOSSS_CHAMBER]; - if(chm<1)setweaponstate("chamber"); - else if(chm<3)invoker.weaponstatus[BOSSS_CHAMBER]+=2; - } - jamderp: - BOJG K 0 A_StartSound("weapons/rifleclick",8,CHANF_OVERLAP); - BOJG N 1 offset(4,38); - BOJG N 2 offset(2,36); - BOJG N 2 offset(4,38)A_MuzzleClimb(frandom(-0.5,0.6),frandom(-0.3,0.6)); - BOJG N 3 offset(2,36){ - A_MuzzleClimb(frandom(-0.5,0.6),frandom(-0.3,0.6)); - if(random(0,invoker.jamchance())<12){ - setweaponstate("chamber"); - if(invoker.weaponstatus[BOSSS_CHAMBER]>2) - invoker.weaponstatus[BOSSS_CHAMBER]-=2; - } - } - BOJG N 2 offset(4,38); - BOJG N 3 offset(2,36); - BOJG K 0 A_Refire("jamderp"); - goto ready; - chamber: - BOJG M 2 offset(4,38){ - if( - random(0,max(2,invoker.weaponstatus[BOSSS_GRIME]>>3)) - &&invoker.weaponstatus[BOSSS_CHAMBER]>2 - ){ - invoker.weaponstatus[BOSSS_CHAMBER]+=2; - A_MuzzleClimb( - -frandom(0.6,2.3),-frandom(0.6,2.3), - -frandom(0.6,1.3),-frandom(0.6,1.3), - -frandom(0.6,1.3),-frandom(0.6,1.3) - ); - setweaponstate("jamderp"); - }else A_StartSound("weapons/boltback",8); - } - BOJG N 2 offset(6,42)A_JumpIf(invoker.weaponstatus[0]&BOSSF_CUSTOMCHAMBER,1); - BOJG N 1 offset(6,42){ - if(gunbraced())A_MuzzleClimb( - frandom(-0.1,0.3),frandom(-0.1,0.3) - );else A_MuzzleClimb( - frandom(-0.2,0.8),frandom(-0.4,0.8) - ); - int jamch=invoker.jamchance(); - if(hd_debug)A_Log("jam chance: "..jamch); - if(random(0,100)1){ - A_SpawnItemEx( - "ZM66DroppedRound",cos(pitch)*8,1,height-7-sin(pitch)*8, - cos(pitch)*cos(angle-80)*4+vel.x, - cos(pitch)*sin(angle-80)*4+vel.y, - -sin(pitch)*4+vel.z, - 0,SXF_ABSOLUTEMOMENTUM|SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH - ); - } - //cycle new - if(invoker.weaponstatus[BOSSS_MAG]>0){ - invoker.weaponstatus[BOSSS_CHAMBER]=2; - invoker.weaponstatus[BOSSS_MAG]--; - }else invoker.weaponstatus[BOSSS_CHAMBER]=0; - } - BOJG O 1 offset(6,42) A_WeaponReady(WRF_NOFIRE); - BOJG O 0 A_Refire("althold"); - goto altholdend; - reload: - ---- A 0{invoker.weaponstatus[0]&=~BOSSF_DONTUSECLIPS;} - goto reloadstart; - altreload: - ---- A 0{invoker.weaponstatus[0]|=BOSSF_DONTUSECLIPS;} - goto reloadstart; - reloadstart: - BOJG K 1 offset(0,34); - BOJG K 1 offset(2,36); - BOJG K 1 offset(4,40); - BOJG K 2 offset(8,42){ - A_StartSound("weapons/rifleclick2",8,CHANF_OVERLAP,0.9,pitch:0.95); - A_MuzzleClimb(-frandom(0.4,0.8),frandom(0.4,1.4)); - } - BOJG K 4 offset(14,46){ - A_StartSound("weapons/rifleload",8,CHANF_OVERLAP); - A_MuzzleClimb(-frandom(0.4,0.8),frandom(0.4,1.4)); - } - BOJG K 0{ - int mg=invoker.weaponstatus[BOSSS_MAG]; - if(mg==10)setweaponstate("reloaddone"); - else if(invoker.weaponstatus[0]&BOSSF_DONTUSECLIPS)setweaponstate("loadhand"); - /*else if( - ( - mg<1 - ||!countinv("SevenMilAmmo") - )&&!HDMagAmmo.NothingLoaded(self,"HD7mClip") - )setweaponstate("loadclip");*/ - } - loadhand: - BOJG K 0 A_JumpIfInventory("FourMilAmmo",1,"loadhandloop"); - goto reloaddone; - loadhandloop: - BOJG K 4{ - int hnd=min( - countinv("FourMilAmmo"),6, - 10-invoker.weaponstatus[BOSSS_MAG] - ); - if(hnd<1){ - setweaponstate("reloaddone"); - return; - }else{ - A_TakeInventory("FourMilAmmo",hnd,TIF_NOTAKEINFINITE); - invoker.weaponstatus[BOSSS_HAND]=hnd; - A_StartSound("weapons/pocket",9); - } - } - loadone: - BOJG K 2 offset(16,50) A_JumpIf(invoker.weaponstatus[BOSSS_HAND]<1,"loadhandnext"); - BOJG K 4 offset(14,46){ - invoker.weaponstatus[BOSSS_HAND]--; - if(!random(0,40)){ - invoker.owner.A_StartSound("weapons/bigcrack",8,CHANF_OVERLAP); - invoker.owner.A_SpawnItemEx("WallChunk",12,0,invoker.owner.height-12,4,frandom(-2,2),frandom(2,4)); - } - else { - invoker.weaponstatus[BOSSS_MAG]++; - A_StartSound("weapons/rifleclick2",8); - } - }loop; - loadhandnext: - BOJG K 8 offset(16,48){ - if( - PressingReload()|| - PressingFire()|| - PressingAltFire()|| - PressingZoom()|| - !countinv("FourMilAmmo") //don't strip clips automatically - )setweaponstate("reloaddone"); - else A_StartSound("weapons/pocket",9); - }goto loadhandloop; - reloaddone: - BOJG K 1 offset(4,40); - BOJG K 1 offset(2,36); - BOJG K 1 offset(0,34); - goto nope; - unload: - BOJG K 1 offset(0,34); - BOJG K 1 offset(2,36); - BOJG K 1 offset(4,40); - BOJG K 2 offset(8,42){ - A_MuzzleClimb(-frandom(0.4,0.8),frandom(0.4,1.4)); - A_StartSound("weapons/rifleclick2",8); - } - BOJG K 4 offset (14,46){ - A_MuzzleClimb(-frandom(0.4,0.8),frandom(0.4,1.4)); - A_StartSound("weapons/rifleload",8); - } - unloadloop: - BOJG K 4 offset(3,41){ - if(invoker.weaponstatus[BOSSS_MAG]<1)setweaponstate("unloaddone"); - else{ - A_StartSound("weapons/rifleclick2",8); - invoker.weaponstatus[BOSSS_MAG]--; - if(A_JumpIfInventory("FourMilAmmo",0,"null")){ - A_SpawnItemEx( - "ZM66DroppedRound",cos(pitch)*8,0,height-7-sin(pitch)*8, - cos(pitch)*cos(angle-40)*1+vel.x, - cos(pitch)*sin(angle-40)*1+vel.y, - -sin(pitch)*1+vel.z, - 0,SXF_ABSOLUTEMOMENTUM| - SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH - ); - }else A_GiveInventory("FourMilAmmo",1); - } - } - BOJG K 2 offset(2,42); - BOJG K 0{ - if( - PressingReload()|| - PressingFire()|| - PressingAltFire()|| - PressingZoom() - )setweaponstate("unloaddone"); - }loop; - unloaddone: - BOJG K 2 offset(2,42); - BOJG K 3 offset(3,41); - BOJG K 1 offset(4,40) A_StartSound("weapons/rifleclick",8); - BOJG K 1 offset(2,36); - BOJG K 1 offset(0,34); - goto ready; - - spawn: - BOJG Z -1; - } -} - -// Hexa's Personal Rifle -class BossRifleButItsFuckingPink:BossRifle{ - default{ - tag "$TAG_HEXAPERSONAL"; - hdweapon.refid ""; - } - - override string pickupmessage(){ - return "You got "..gettag().."!"; - } - - class lrammo, actualammo; - class looseammo, spentammo; - override void postbeginplay(){ - super.postbeginplay(); - string lol = "HD5MM_Ammo"; lrammo = lol; - lol = "HDSpent5mmMR"; spentammo = lol; - if (lrammo) { - actualammo = lrammo; - looseammo = "HDLoose5mmMR"; - } - else { - actualammo = "HDPistolAmmo"; - looseammo = "HDLoose9mm"; - spentammo = "HDSpent9mm"; - } - } - override double weaponbulk(){ - return 144+weaponstatus[BOSSS_MAG]*ENC_9_LOADED*0.05; - } - override void DropOneAmmo(int amt){ - if(owner){ - if(owner.countinv(actualammo))owner.A_DropInventory(actualammo,10); - } - } - override void ForceBasicAmmo(){ - owner.A_SetInventory(actualammo,28); - } - override string gethelptext(){ - return - WEPHELP_FIRESHOOT - ..WEPHELP_ALTFIRE.." Work bolt\n" - ..WEPHELP_RELOADRELOAD - ..WEPHELP_ZOOM.."+"..WEPHELP_FIREMODE.." Zoom\n" - ..WEPHELP_ZOOM.."+"..WEPHELP_USE.." Bullet drop\n" - ..WEPHELP_ALTFIRE.."+"..WEPHELP_UNLOAD.." Unload chamber/Clean rifle\n" - ..WEPHELP_UNLOADUNLOAD - ; - } - override string,double getpickupsprite(){return "BOJG]0",1.;} - override void DrawHUDStuff(HDStatusBar sb,HDWeapon hdw,HDPlayerPawn hpl){ - if(sb.hudlevel==1){ - if (lrammo) - sb.drawimage("5MMZA0",(-54,-10),sb.DI_SCREEN_CENTER_BOTTOM,scale:(2.1,2.1)); - else - sb.drawimage("PRNDA0",(-54,-10),sb.DI_SCREEN_CENTER_BOTTOM,scale:(2.1,2.1)); - sb.drawnum(hpl.countinv(actualammo),-51,-8,sb.DI_SCREEN_CENTER_BOTTOM); - } - sb.drawwepnum(hdw.weaponstatus[BOSSS_MAG],27); - sb.drawwepcounter(hdw.weaponstatus[BOSSS_CHAMBER], - -16,-10,"blank","RBRSA1A5","RBRSA3A7","RBRSA4A6" - ); - sb.drawstring( - sb.mAmountFont,string.format("%.1f",hdw.weaponstatus[BOSSS_ZOOM]*0.1), - (-36,-18),sb.DI_SCREEN_CENTER_BOTTOM|sb.DI_TEXT_ALIGN_RIGHT,Font.CR_DARKGRAY - ); - sb.drawstring( - sb.mAmountFont,string.format("%.1f",hdw.weaponstatus[BOSSS_DROPADJUST]*0.1), - (-16,-18),sb.DI_SCREEN_CENTER_BOTTOM|sb.DI_TEXT_ALIGN_RIGHT,Font.CR_WHITE - ); - } - states{ - select0: - BOJG P 0; - goto select0bfg; - deselect0: - BOJG P 0; - goto deselect0big; - - ready: - BOJG P 1{ - if(pressingzoom()){ - if(player.cmd.buttons&BT_USE){ - A_ZoomAdjust(BOSSS_DROPADJUST,0,600,BT_USE); - }else if(invoker.weaponstatus[0]&BOSSF_FRONTRETICLE)A_ZoomAdjust(BOSSS_ZOOM,12,40); - else A_ZoomAdjust(BOSSS_ZOOM,5,60); - A_WeaponReady(WRF_NONE); - }else A_WeaponReady(WRF_ALL); - }goto readyend; - user3: - ---- A 0 A_MagManager("HDBattery"); - goto ready; - fire: - BOJG P 1 A_JumpIf(invoker.weaponstatus[BOSSS_CHAMBER]==2,"shoot"); - goto ready; - shoot: - BOJG P 1{ - A_Gunflash(); - invoker.weaponstatus[BOSSS_CHAMBER]=1; - A_StartSound("weapons/pinkboss",CHAN_WEAPON,CHANF_OVERLAP, - pitch:!(invoker.weaponstatus[0]&BOSSF_CUSTOMCHAMBER)?1.1:1. - ); - A_AlertMonsters(); - - HDBulletActor.FireBullet(self,"HDB_Pink", - aimoffy:(-1./600.)*invoker.weaponstatus[BOSSS_DROPADJUST], - speedfactor:(invoker.weaponstatus[0]&BOSSF_CUSTOMCHAMBER)?0.99:1.07 - ); - A_MuzzleClimb( - 0,0, - -frandom(0.03,0.06),-frandom(0.04,0.08), - -frandom(0.06,0.1),-frandom(0.09,0.15), - -frandom(0.06,0.1),-frandom(0.09,0.15) - ); - } - BOJG X 1; - BOJG X 1 A_JumpIf(gunbraced(),"ready"); - goto ready; - flash: - BARF A 1 bright{ - A_Light1(); - HDFlashAlpha(-96); - A_ZoomRecoil(0.99); - A_ChamberGrit(randompick(0,0,0,0,0,1,1,1,1,-1)); - } - TNT1 A 0 A_Light0(); - stop; - altfire: - BOJG P 1 offset(0,34) A_WeaponBusy(); - BOJG Q 2 offset(2,36) A_JumpIf(invoker.weaponstatus[0]&BOSSF_CUSTOMCHAMBER,1); - BOJG Q 1 offset(4,38){ - if(invoker.weaponstatus[BOSSS_CHAMBER]>2)setweaponstate("jamderp"); - } - BOJG Q 1 offset(0,34); - BOJG Q 0 A_ChamberGrit(randompick(0,0,0,0,-1,1,2),true); - BOJG Q 0 A_Refire("chamber"); - goto ready; - althold: - BOJG T 1 A_WeaponReady(WRF_NOFIRE); - BOJG T 1{ - A_ClearRefire(); - bool eww=invoker.weaponstatus[BOSSS_GRIME]>10; - bool chempty=invoker.weaponstatus[BOSSS_CHAMBER]<1; - if(pressingunload()){ - if(chempty){ - return resolvestate("altholdclean"); - }else{ - invoker.weaponstatus[0]|=BOSSF_UNLOADONLY; - return resolvestate("loadchamber"); - } - }else if(pressingreload()){ - if( - !chempty - ){ - invoker.weaponstatus[0]|=BOSSF_UNLOADONLY; - return resolvestate("loadchamber"); - }else if( - eww - ){ - return resolvestate("altholdclean"); - }else if( - countinv("SevenMilAmmo") - ){ - invoker.weaponstatus[0]&=~BOSSF_UNLOADONLY; - return resolvestate("loadchamber"); - } - } - if(pressingaltfire())return resolvestate("althold"); - return resolvestate("altholdend"); - } - altholdend: - BOJG T 0 A_StartSound("weapons/boltfwd",8); - BOJG SR 2 A_WeaponReady(WRF_NOFIRE); - BOJG Q 3 offset(2,36){ - A_WeaponReady(WRF_NOFIRE); - if(invoker.weaponstatus[0]&BOSSF_CUSTOMCHAMBER)A_SetTics(1); - } - goto ready; - loadchamber: - BOJG T 1 offset(2,36) A_ClearRefire(); - BOJG T 1 offset(3,38); - BOJG T 1 offset(5,42); - BOJG T 1 offset(8,48) A_StartSound("weapons/pocket",9); - BOJG T 1 offset(9,52) A_MuzzleClimb(frandom(-0.2,0.2),0.2,frandom(-0.2,0.2),0.2,frandom(-0.2,0.2),0.2); - BOJG T 2 offset(8,60); - BOJG T 2 offset(7,72); - TNT1 A 18 A_StartSound("weapons/pocket",9); - TNT1 A 4{ - A_StartSound("weapons/bossload",8,volume:0.7); - if(invoker.weaponstatus[0]&BOSSF_UNLOADONLY){ - int chm=invoker.weaponstatus[BOSSS_CHAMBER]; - invoker.weaponstatus[BOSSS_CHAMBER]=0; - if(chm<2||A_JumpIfInventory(invoker.actualammo,0,"null")){ - class whatkind=chm==2?invoker.looseammo:invoker.spentammo; - actor rrr=spawn(whatkind,pos+(cos(angle)*10,sin(angle)*10,height-12),ALLOW_REPLACE); - rrr.angle=angle;rrr.A_ChangeVelocity(1,2,1,CVF_RELATIVE); - }else HDF.Give(self,invoker.actualammo,1); - A_ChamberGrit(randompick(0,0,0,0,-1,1),true); - }else{ - A_TakeInventory(invoker.actualammo,1,TIF_NOTAKEINFINITE); - invoker.weaponstatus[BOSSS_CHAMBER]=2; - } - } - BOJG T 2 offset(7,72); - BOJG T 2 offset(8,60); - BOJG T 1 offset(7,52); - BOJG T 1 offset(5,42); - BOJG T 1 offset(3,38); - BOJG T 1 offset(3,35); - goto althold; - altholdclean: - BOJG T 1 offset(2,36) A_ClearRefire(); - BOJG T 1 offset(3,38); - BOJG T 1 offset(5,42) A_Log("Looking inside that chamber...",true); - BOJG T 1 offset(8,48) A_StartSound("weapons/pocket",9); - BOJG T 1 offset(7,52) A_MuzzleClimb(frandom(-0.2,0.2),0.2,frandom(-0.2,0.2),0.2,frandom(-0.2,0.2),0.2); - TNT1 A 3 A_StartSound("weapons/pocket",10); - TNT1 AAAA 4 A_MuzzleClimb(frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2)); - TNT1 A 3 A_StartSound("weapons/pocket",9); - TNT1 AAAA 4 A_MuzzleClimb(frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2),frandom(-0.2,0.2)); - TNT1 A 40{ - A_StartSound("weapons/pocket",9); - int amt=invoker.weaponstatus[BOSSS_GRIME]; - string amts="There doesn't seem to be much. "; - if(amt>40)amts="What the FUCK. "; - else if(amt>30)amts="About time - this gun is barely functional. "; - else if(amt>20)amts="This is starting to gum up badly. "; - else if(amt>10)amts="It can use some cleaning. "; - - static const string cleanverbs[]={"extract","scrape off","wipe away","carefully remove","dump out","pick out","blow off","shake out","scrub off","fish out"}; - static const string contaminants[]={"some dust","a lot of dust","a bit of powder residue","a disturbing amount of powder residue","some excess grease","a layer of soot","some iron filings","a bit of hair","an eyelash","a patch of dried blood","a bit of rust","a crumb","a dead insect","ashes","some loose bits of skin","a sticky fluid of some sort","wow some fucking *gunk*","a booger","trace fecal matter","yet even more of that anonymous grey debris that all those bullet impacts make","a dollop of strawberry jam","the dried husk of a pinto bean with residual hog components","a tiny cancerous nodule of Second Flesh","some crystalline buildup of congealed Frag","a nesting queen space ant","a single modern-day transistor","a tiny Boss rifle (also jammed)","a colourless film of darkness made visible"}; - static const string actionparts[]={"bolt carrier","main extractor","auxiliary extractor","cam pin","bolt head","striker","firing pin spring","ejector slot","striker spring","ejector spring"}; - for(int i=amt;i>0;i-=random(8,16))amts.appendformat("You %s %s from the %s. ", - cleanverbs[random(0,cleanverbs.size()-1)], - contaminants[random(0,random(0,contaminants.size()-1))], - actionparts[random(0,random((actionparts.size()>>1),actionparts.size()-1))] - ); - amts.appendformat("\n"); - - amt=randompick(-3,-5,-5,-random(8,16)); - - A_ChamberGrit(amt,true); - amt=invoker.weaponstatus[BOSSS_GRIME]; - if(amt>40)amts.appendformat("You barely scrape the surface of this all-encrusting abomination."); - else if(amt>30)amts.appendformat("The gun will need a lot more work than this before it can be deployed again."); - else if(amt>20)amts.appendformat("You might get a few shots out of it now."); - else if(amt>10)amts.appendformat("It's better, but still not good."); - else amts.appendformat("Good to go."); - A_Log(amts,true); - } - BOJG T 1 offset(7,52); - BOJG T 1 offset(8,48); - BOJG T 1 offset(5,42); - BOJG T 1 offset(3,38); - BOJG T 1 offset(2,36); - goto althold; - jam: - BOJG P 0{ - int chm=invoker.weaponstatus[BOSSS_CHAMBER]; - if(chm<1)setweaponstate("chamber"); - else if(chm<3)invoker.weaponstatus[BOSSS_CHAMBER]+=2; - } - jamderp: - BOJG P 0 A_StartSound("weapons/rifleclick",8,CHANF_OVERLAP); - BOJG S 1 offset(4,38); - BOJG S 2 offset(2,36); - BOJG S 2 offset(4,38)A_MuzzleClimb(frandom(-0.5,0.6),frandom(-0.3,0.6)); - BOJG S 3 offset(2,36){ - A_MuzzleClimb(frandom(-0.5,0.6),frandom(-0.3,0.6)); - if(random(0,invoker.jamchance())<12){ - setweaponstate("chamber"); - if(invoker.weaponstatus[BOSSS_CHAMBER]>2) - invoker.weaponstatus[BOSSS_CHAMBER]-=2; - } - } - BOJG S 2 offset(4,38); - BOJG S 3 offset(2,36); - BOJG P 0 A_Refire("jamderp"); - goto ready; - chamber: - BOJG R 2 offset(4,38){ - if( - random(0,max(2,invoker.weaponstatus[BOSSS_GRIME]>>3)) - &&invoker.weaponstatus[BOSSS_CHAMBER]>2 - ){ - invoker.weaponstatus[BOSSS_CHAMBER]+=2; - A_MuzzleClimb( - -frandom(0.6,2.3),-frandom(0.6,2.3), - -frandom(0.6,1.3),-frandom(0.6,1.3), - -frandom(0.6,1.3),-frandom(0.6,1.3) - ); - setweaponstate("jamderp"); - }else A_StartSound("weapons/boltback",8); - } - BOJG S 2 offset(6,42)A_JumpIf(invoker.weaponstatus[0]&BOSSF_CUSTOMCHAMBER,1); - BOJG S 1 offset(6,42){ - if(gunbraced())A_MuzzleClimb( - frandom(-0.1,0.3),frandom(-0.1,0.3) - );else A_MuzzleClimb( - frandom(-0.2,0.8),frandom(-0.4,0.8) - ); - int jamch=invoker.jamchance(); - if(hd_debug)A_Log("jam chance: "..jamch); - if(random(0,100)1){ - A_SpawnItemEx( - invoker.looseammo,cos(pitch)*8,1,height-7-sin(pitch)*8, - cos(pitch)*cos(angle-80)*4+vel.x, - cos(pitch)*sin(angle-80)*4+vel.y, - -sin(pitch)*4+vel.z, - 0,SXF_ABSOLUTEMOMENTUM|SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH - ); - }else if(chm==1){ - A_SpawnItemEx( - invoker.spentammo,cos(pitch)*8,1,height-7-sin(pitch)*8, - cos(pitch)*cos(angle-80)*6+vel.x, - cos(pitch)*sin(angle-80)*6+vel.y, - -sin(pitch)*6+vel.z, - 0,SXF_ABSOLUTEMOMENTUM|SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH - ); - } - //cycle new - if(invoker.weaponstatus[BOSSS_MAG]>0){ - invoker.weaponstatus[BOSSS_CHAMBER]=2; - invoker.weaponstatus[BOSSS_MAG]--; - }else invoker.weaponstatus[BOSSS_CHAMBER]=0; - } - BOJG T 1 offset(6,42) A_WeaponReady(WRF_NOFIRE); - BOJG T 0 A_Refire("althold"); - goto altholdend; - reload: - ---- A 0{invoker.weaponstatus[0]&=~BOSSF_DONTUSECLIPS;} - goto reloadstart; - altreload: - ---- A 0{invoker.weaponstatus[0]|=BOSSF_DONTUSECLIPS;} - goto reloadstart; - reloadstart: - BOJG P 1 offset(0,34); - BOJG P 1 offset(2,36); - BOJG P 1 offset(4,40); - BOJG P 2 offset(8,42){ - A_StartSound("weapons/rifleclick2",8,CHANF_OVERLAP,0.9,pitch:0.95); - A_MuzzleClimb(-frandom(0.4,0.8),frandom(0.4,1.4)); - } - BOJG P 4 offset(14,46){ - A_StartSound("weapons/rifleload",8,CHANF_OVERLAP); - A_MuzzleClimb(-frandom(0.4,0.8),frandom(0.4,1.4)); - } - BOJG P 0{ - int mg=invoker.weaponstatus[BOSSS_MAG]; - if(mg==27)setweaponstate("reloaddone"); - else if(invoker.weaponstatus[0]&BOSSF_DONTUSECLIPS)setweaponstate("loadhand"); - /*else if( - ( - mg<1 - ||!countinv("SevenMilAmmo") - )&&!HDMagAmmo.NothingLoaded(self,"HD7mClip") - )setweaponstate("loadclip");*/ - } - loadhand: - BOJG P 0 A_JumpIfInventory(invoker.actualammo,1,"loadhandloop"); - goto reloaddone; - loadhandloop: - BOJG P 4{ - int hnd=min( - countinv(invoker.actualammo),9, - 27-invoker.weaponstatus[BOSSS_MAG] - ); - if(hnd<1){ - setweaponstate("reloaddone"); - return; - }else{ - A_TakeInventory(invoker.actualammo,hnd,TIF_NOTAKEINFINITE); - invoker.weaponstatus[BOSSS_HAND]=hnd; - A_StartSound("weapons/pocket",9); - } - } - loadone: - BOJG P 2 offset(16,50) A_JumpIf(invoker.weaponstatus[BOSSS_HAND]<1,"loadhandnext"); - BOJG P 4 offset(14,46){ - invoker.weaponstatus[BOSSS_HAND]--; - invoker.weaponstatus[BOSSS_MAG]++; - A_StartSound("weapons/rifleclick2",8); - }loop; - loadhandnext: - BOJG P 8 offset(16,48){ - if( - PressingReload()|| - PressingFire()|| - PressingAltFire()|| - PressingZoom()|| - !countinv(invoker.actualammo) //don't strip clips automatically - )setweaponstate("reloaddone"); - else A_StartSound("weapons/pocket",9); - }goto loadhandloop; - reloaddone: - BOJG P 1 offset(4,40); - BOJG P 1 offset(2,36); - BOJG P 1 offset(0,34); - goto nope; - unload: - BOJG P 1 offset(0,34); - BOJG P 1 offset(2,36); - BOJG P 1 offset(4,40); - BOJG P 2 offset(8,42){ - A_MuzzleClimb(-frandom(0.4,0.8),frandom(0.4,1.4)); - A_StartSound("weapons/rifleclick2",8); - } - BOJG P 4 offset (14,46){ - A_MuzzleClimb(-frandom(0.4,0.8),frandom(0.4,1.4)); - A_StartSound("weapons/rifleload",8); - } - unloadloop: - BOJG P 4 offset(3,41){ - if(invoker.weaponstatus[BOSSS_MAG]<1)setweaponstate("unloaddone"); - else{ - A_StartSound("weapons/rifleclick2",8); - invoker.weaponstatus[BOSSS_MAG]--; - if(A_JumpIfInventory(invoker.actualammo,0,"null")){ - A_SpawnItemEx( - invoker.looseammo,cos(pitch)*8,0,height-7-sin(pitch)*8, - cos(pitch)*cos(angle-40)*1+vel.x, - cos(pitch)*sin(angle-40)*1+vel.y, - -sin(pitch)*1+vel.z, - 0,SXF_ABSOLUTEMOMENTUM| - SXF_NOCHECKPOSITION|SXF_TRANSFERPITCH - ); - }else A_GiveInventory(invoker.actualammo,1); - } - } - BOJG P 2 offset(2,42); - BOJG P 0{ - if( - PressingReload()|| - PressingFire()|| - PressingAltFire()|| - PressingZoom() - )setweaponstate("unloaddone"); - }loop; - unloaddone: - BOJG P 2 offset(2,42); - BOJG P 3 offset(3,41); - BOJG P 1 offset(4,40) A_StartSound("weapons/rifleclick",8); - BOJG P 1 offset(2,36); - BOJG P 1 offset(0,34); - goto ready; - - spawn: - BOJG ] -1; - } - override void InitializeWepStats(bool idfa){ - weaponspecial = 1337; //UaS sling compatbility - weaponstatus[BOSSS_CHAMBER]=2; - weaponstatus[BOSSS_MAG]=27; - if(!idfa){ - weaponstatus[BOSSS_HEAT]=0; - } - if(!owner){ - if(randompick(0,0,1))weaponstatus[0]&=~BOSSF_FRONTRETICLE; - else weaponstatus[0]|=BOSSF_FRONTRETICLE; - if(random(0,3))weaponstatus[0]&=~BOSSF_CUSTOMCHAMBER; - else weaponstatus[0]|=BOSSF_CUSTOMCHAMBER; - weaponstatus[BOSSS_ZOOM]=20; - weaponstatus[BOSSS_DROPADJUST]=160; - } - } -} - -class HDLoose5mmMR:HDDebris{ - override void postbeginplay(){ - HDDebris.postbeginplay(); - } - default{ - bouncesound "misc/casing3";scale 0.55; bouncefactor 0.5; - } - states{ - spawn: - 5MMR Z 2 nodelay{ - A_SetRoll(roll+45,SPF_INTERPOLATE); - }loop; - death: - TNT1 A 1{ - string lol = "HD5mm_Ammo"; - Class b = lol; - if (b) { - actor a=spawn(b,self.pos,ALLOW_REPLACE); - a.roll=self.roll;a.vel=self.vel; - } - }stop; - } -} - -class HDShitbostHandler : StaticEventHandler { - override void WorldThingSpawned(WorldEvent e) { - if (e.Thing && e.Thing.GetClassName() == "BossRifleSpawner" && !random(0,4) - && cvar.getcvar("hd_shitbossting_spawn").getbool()){ - if(!random(0,99)) actor.spawn("BossRifleButItsTheWorst", e.thing.pos); - else if(random(0,1)) actor.spawn("BossRifleNine", e.thing.pos); - else actor.spawn("BossRifleFour", e.thing.pos); - e.Thing.Destroy(); - } - else { - let a = HDAmmo(e.Thing); - string lol = "HD5mm_Ammo"; - class b = lol; - if(a) { - if (a.GetClassName() == "HDPistolAmmo") { - a.ItemsThatUseThis.Push("BossRifleButIts9mm"); - if (!b) - a.ItemsThatUseThis.Push("BossRifleButItsFuckingPink"); - } - else if (a.GetClassName() == "FourMilAmmo") - a.ItemsThatUseThis.Push("BossRifleButIts4mm"); - else if (a.GetClassName() == "SevenMilAmmo") - a.ItemsThatUseThis.Push("BossRifleButItsTheWorst"); - else if (a.GetClassName() == "HD9MClip") - a.ItemsThatUseThis.Push("BossRifleButIts9mm"); - else if (a.GetClassName() == "HD5mm_Ammo") - a.ItemsThatUseThis.Push("BossRifleButItsFuckingPink"); - } - } - } -} - -class BossRifleNine:IdleDummy{ - states{ - spawn: - TNT1 A 0 nodelay{ - string lol = "HD9mClip"; - class nineclip = lol; - - let ass = spawn("HD9mBoxPickup",(pos.x+randompick(-4,-2,2,4),pos.y+randompick(-4,-2,2,4),pos.z),ALLOW_REPLACE); - HDUPK box = HDUPK(ass); - HDMagAmmo mag = HDMagAmmo(ass); - if(box) { - if (nineclip) { - box.amount = 30; - } - else box.amount = 60; - } - else if (mag) { - if (nineclip) { - mag.mags.clear(); - mag.amount=0; - mag.AddAMag(30); - } - else { - mag.mags.clear(); - mag.amount=0; - mag.AddAMag(60); - } - } - if (nineclip) { - spawn(nineclip,(pos.x+randompick(-1,1),pos.y+randompick(-1,1),pos.z),ALLOW_REPLACE); - spawn(nineclip,(pos.x+randompick(-3,3),pos.y+randompick(-3,3),pos.z),ALLOW_REPLACE); - spawn(nineclip,(pos.x+randompick(-5,5),pos.y+randompick(-5,5),pos.z),ALLOW_REPLACE); - } - - let ggg=BossRifle(spawn("BossRifleButIts9mm",pos,ALLOW_REPLACE)); - if(!ggg)return; - ggg.special=special; - ggg.vel=vel; - for(int i=0;i<5;i++)ggg.args[i]=args[i]; - }stop; - } -} -class BossRifleFour:IdleDummy{ - states{ - spawn: - TNT1 A 0 nodelay{ - double px = pos.x+randompick(-3,3); - double py = pos.y+randompick(-3,3); - let ass = HDMagAmmo(spawn("HD4mMag",(px,py,pos.z),ALLOW_REPLACE)); - if(ass) { - ass.mags.clear(); - ass.amount=0; - ass.AddAMag(50-randomiseamount()); - } - px = pos.x+randompick(-2,2); - py = pos.y+randompick(-2,2); - ass = HDMagAmmo(spawn("HD4mMag",(px,py,pos.z),ALLOW_REPLACE)); - if(ass) { - ass.mags.clear(); - ass.amount=0; - ass.AddAMag(50-randomiseamount()); - } - px = pos.x+randompick(-1,1); - py = pos.y+randompick(-1,1); - ass = HDMagAmmo(spawn("HD4mMag",(px,py,pos.z),ALLOW_REPLACE)); - if(ass) { - ass.mags.clear(); - ass.amount=0; - ass.AddAMag(50-randomiseamount()); - } - - let ggg=BossRifle(spawn("BossRifleButIts4mm",pos,ALLOW_REPLACE)); - if(!ggg)return; - ggg.special=special; - ggg.vel=vel; - for(int i=0;i<5;i++)ggg.args[i]=args[i]; - }stop; - } - int randomiseamount(){ - if (!random(0,3)) return 1+randomiseamount(); - else return 0; - } -} - -class HDShitbostDummy:HDWeapon{ - default{ - -hdweapon.fitsinbackpack - hdweapon.refid "boj"; - tag "$TAG_ShitbostDummy"; - inventory.icon "BOJGY0"; - - hdweapon.loadoutcodes " - \cuNine - 0/1, 9mm Boss Rifle - \cuFour - 0/1, 4mm Boss Rifle - \cuHexadoken - 0/1, Hexadoken's Personal Rifle - \cuWorst - 0/1, Lightspeed Boss Rifle - \cucustomchamber - 0/1, whether to reduce jam for less power - \cufrontreticle - 0/1, whether crosshair scales with zoom - \cubulletdrop - 0-600, amount of compensation for bullet drop - \cuzoom - 5-60, 10x the resulting FOV in degrees"; - } - override bool AddSpareWeapon(actor newowner){return AddSpareWeaponRegular(newowner);} - override hdweapon GetSpareWeapon(actor newowner,bool reverse,bool doselect){return GetSpareWeaponRegular(newowner,reverse,doselect);} - override double weaponbulk(){ - return 144; - } - override void PostBeginPlay(){ - if(!owner) return; - GiveWeapon(owner, weaponstatus[0],weaponstatus[1],weaponstatus[2],weaponstatus[3],weaponstatus[4],weaponstatus[5]); - let spw=spareweapons(owner.findinventory("spareweapons")); - if(spw) { - for(int i=0;i0;--i) - if(spw.weapontype[i-1]=="HDShitbostDummy"){ - spw.weapontype.Delete(i-1); - spw.weaponstatus.Delete(i-1); - spw.weaponbulk.Delete(i-1); - } - } - owner.takeinventory("HDShitbostDummy", 1); - } - void GiveWeapon(actor plr, int type, int custom, int front, int drop, int zoom, int YEET){ - string wn; - switch(type) { - default: - case 0: wn="BossRifleButIts9mm"; break; - case 1: wn="BossRifleButIts4mm"; break; - case 2: wn="BossRifleButItsTheWorst"; break; - case 3: wn="BossRifleButItsFuckingPink"; break; - } - let newwep=hdweapon(hdweapon.spawn(wn,plr.pos)); - if(newwep){ - if(custom) newwep.weaponstatus[0]|=BOSSF_CUSTOMCHAMBER; - if(front) newwep.weaponstatus[0]|=BOSSF_FRONTRETICLE; - if(yeet) newwep.weaponstatus[0]|=BOSSF_YEETABLE; - if(drop>=0) newwep.weaponstatus[BOSSS_DROPADJUST]=clamp(drop,0,600); - else newwep.weaponstatus[BOSSS_DROPADJUST]=160; - if(zoom>0) newwep.weaponstatus[BOSSS_ZOOM]= - (newwep.weaponstatus[0]&BOSSF_FRONTRETICLE)? - clamp(zoom,12,40): - clamp(zoom,5,60); - else newwep.weaponstatus[BOSSS_ZOOM]=20; - newwep.actualpickup(plr,true); - } - } - override void loadoutconfigure(string input){ - int nine=getloadoutvar(input,"nine",1); - int four=getloadoutvar(input,"four",1); - int gold=getloadoutvar(input,"worst",1); - int pink=getloadoutvar(input,"hexadoken",1); - - if(gold>0 && nine<0 && four<0 && pink<0) weaponstatus[0]=2; - else if (pink>0 && nine<0 && four<0 && gold<0) weaponstatus[0]=3; - else if (four>0 && nine<0 && gold<0 && pink<0) weaponstatus[0]=1; - else if (nine>0 && four<0 && gold<0 && pink<0) weaponstatus[0]=0; - else weaponstatus[0]=random(0,1); - - int customchamber=getloadoutvar(input,"customchamber",1); - int frontreticle=getloadoutvar(input,"frontreticle",1); - int bulletdrop=getloadoutvar(input,"bulletdrop",3); - int zoom=getloadoutvar(input,"zoom",3); - int yeetable=getloadoutvar(input,"yeetable",1); - - - if(customchamber>0)weaponstatus[1]=1; - if(frontreticle>0)weaponstatus[2]=1; - weaponstatus[3]=bulletdrop; - if(zoom>0)weaponstatus[4]=zoom; - if(yeetable>0)weaponstatus[5]=1; - } -} - -class HDB_Pink:HDBulletActor{ - default{ - pushfactor 0.45; - mass 26; - speed 600; - accuracy 270; - stamina 570; - woundhealth 10; - hdbulletactor.hardness 3; - } -} \ No newline at end of file