diff --git a/config.json b/config.json index 10724348..d797e638 100644 --- a/config.json +++ b/config.json @@ -2,7 +2,7 @@ "mapFolder": "askellon-sector.w3x", "gameExecutable": "E:\\Warcraft III\\_retail_\\x86_64\\Warcraft III.exe", "outputFolder": "C:\\Users\\Travis\\Documents\\Warcraft III\\Maps\\Askellon", - "version": "0.0.41i", + "version": "0.0.42", "minifyScript": false, "launchArgs": [ "-launch", diff --git a/maps/askellon-sector.w3x/ReplaceableTextures/Commandbuttons/BTNElixir.dds b/maps/askellon-sector.w3x/ReplaceableTextures/Commandbuttons/BTNElixir.dds new file mode 100644 index 00000000..95785d37 Binary files /dev/null and b/maps/askellon-sector.w3x/ReplaceableTextures/Commandbuttons/BTNElixir.dds differ diff --git a/maps/askellon-sector.w3x/ReplaceableTextures/Commandbuttons/BTNWorldInfestation.dds b/maps/askellon-sector.w3x/ReplaceableTextures/Commandbuttons/BTNWorldInfestation.dds new file mode 100644 index 00000000..9d23b51d Binary files /dev/null and b/maps/askellon-sector.w3x/ReplaceableTextures/Commandbuttons/BTNWorldInfestation.dds differ diff --git a/maps/askellon-sector.w3x/ReplaceableTextures/CommandbuttonsDisabled/DISBTNElixir.dds b/maps/askellon-sector.w3x/ReplaceableTextures/CommandbuttonsDisabled/DISBTNElixir.dds new file mode 100644 index 00000000..4d02f245 Binary files /dev/null and b/maps/askellon-sector.w3x/ReplaceableTextures/CommandbuttonsDisabled/DISBTNElixir.dds differ diff --git a/maps/askellon-sector.w3x/ReplaceableTextures/CommandbuttonsDisabled/DISBTNWorldInfestation.dds b/maps/askellon-sector.w3x/ReplaceableTextures/CommandbuttonsDisabled/DISBTNWorldInfestation.dds new file mode 100644 index 00000000..15ad1d6c Binary files /dev/null and b/maps/askellon-sector.w3x/ReplaceableTextures/CommandbuttonsDisabled/DISBTNWorldInfestation.dds differ diff --git a/maps/askellon-sector.w3x/ReplaceableTextures/PassiveButtons/PASBTNWorldInfestation.dds b/maps/askellon-sector.w3x/ReplaceableTextures/PassiveButtons/PASBTNWorldInfestation.dds new file mode 100644 index 00000000..3327eae7 Binary files /dev/null and b/maps/askellon-sector.w3x/ReplaceableTextures/PassiveButtons/PASBTNWorldInfestation.dds differ diff --git a/maps/askellon-sector.w3x/ReplaceableTextures/PassiveButtonsDisabled/DISPASBTNWorldInfestation.dds b/maps/askellon-sector.w3x/ReplaceableTextures/PassiveButtonsDisabled/DISPASBTNWorldInfestation.dds new file mode 100644 index 00000000..b2840ecd Binary files /dev/null and b/maps/askellon-sector.w3x/ReplaceableTextures/PassiveButtonsDisabled/DISPASBTNWorldInfestation.dds differ diff --git a/maps/askellon-sector.w3x/Sc2/Doodads/Dominion Flag.mdx b/maps/askellon-sector.w3x/Sc2/Doodads/Dominion Flag.mdx new file mode 100644 index 00000000..e9d3738b Binary files /dev/null and b/maps/askellon-sector.w3x/Sc2/Doodads/Dominion Flag.mdx differ diff --git a/maps/askellon-sector.w3x/Sc2/Doodads/lab-room.mdx b/maps/askellon-sector.w3x/Sc2/Doodads/lab-room.mdx index 3212bcae..59f519c0 100644 Binary files a/maps/askellon-sector.w3x/Sc2/Doodads/lab-room.mdx and b/maps/askellon-sector.w3x/Sc2/Doodads/lab-room.mdx differ diff --git a/maps/askellon-sector.w3x/UI/CustomUI.toc b/maps/askellon-sector.w3x/UI/CustomUI.toc index 8e251fe8..4751c6be 100644 --- a/maps/askellon-sector.w3x/UI/CustomUI.toc +++ b/maps/askellon-sector.w3x/UI/CustomUI.toc @@ -1,2 +1,2 @@ +UI\Tooltips\Default.fdf UI\Chat\Chat.fdf -UI\Unit\Healthbar.fdf diff --git a/maps/askellon-sector.w3x/UI/Tooltips/Default.fdf b/maps/askellon-sector.w3x/UI/Tooltips/Default.fdf new file mode 100644 index 00000000..2b639f13 --- /dev/null +++ b/maps/askellon-sector.w3x/UI/Tooltips/Default.fdf @@ -0,0 +1,41 @@ + +// -- LOCAL TEMPLATES ------------------------------------------------------- +Frame "BACKDROP" "BoxedTextBackgroundTemplate" { + DecorateFileNames, //Look-Up Names in some String table (for example gameinterface) + BackdropTileBackground, //Tile mode enabled + BackdropBackground "ToolTipBackground", //BackgroundFile + BackdropCornerFlags "UL|UR|BL|BR|T|L|B|R", + BackdropCornerSize 0.008, //higher numbers make the corners bigger. + BackdropBackgroundInsets 0.0022 0.0022 0.0022 0.0022, //makes the background smaller, from the outside. + BackdropEdgeFile "ToolTipBorder", //the border File + BackdropBlendAll, +} +// -- Frames ------------------------------------------------------- +Frame "BACKDROP" "BoxedText" INHERITS "BoxedTextBackgroundTemplate" { + UseActiveContext, + + Frame "TEXT" "BoxedTextTitle" { + UseActiveContext, + DecorateFileNames, + SetPoint TOPLEFT, "BoxedText", TOPLEFT, 0.005, -0.005, //Positionate "BoxedTextSimpleTitle"'s TOPLEFT to "BoxedText"'s TOPLEFT with an offset + SetPoint TOPRIGHT, "BoxedText", TOPRIGHT, -0.005, -0.005, + FontFlags "FIXEDSIZE", + FrameFont "MasterFont", 0.011, "", + FontColor 1.0 1.0 1.0 1.0, //Red Green Blue Alpha 0.0 to 1.0 + FontShadowColor 0.0 0.0 0.0 0.9, + FontShadowOffset 0.001 -0.001, + } + + Frame "TEXT" "BoxedTextValue" { + UseActiveContext, + DecorateFileNames, + SetPoint TOPLEFT, "BoxedText", TOPLEFT, 0.005, -0.02, + SetPoint BOTTOMRIGHT, "BoxedText", BOTTOMRIGHT, -0.005, 0.005, + FontFlags "FIXEDSIZE", + FrameFont "MasterFont", 0.010, "", + FontColor 1.0 1.0 1.0 1.0, + FontShadowColor 0.0 0.0 0.0 0.9, + FontShadowOffset 0.001 -0.001, + } +} + \ No newline at end of file diff --git a/maps/askellon-sector.w3x/defenderscity_building_municipalflag_diff.dds b/maps/askellon-sector.w3x/defenderscity_building_municipalflag_diff.dds new file mode 100644 index 00000000..c7435914 Binary files /dev/null and b/maps/askellon-sector.w3x/defenderscity_building_municipalflag_diff.dds differ diff --git a/maps/askellon-sector.w3x/selecter1.mdx b/maps/askellon-sector.w3x/selecter1.mdx new file mode 100644 index 00000000..a4482301 Binary files /dev/null and b/maps/askellon-sector.w3x/selecter1.mdx differ diff --git a/maps/askellon-sector.w3x/war3map.doo b/maps/askellon-sector.w3x/war3map.doo index 155fc050..bda01fbe 100644 Binary files a/maps/askellon-sector.w3x/war3map.doo and b/maps/askellon-sector.w3x/war3map.doo differ diff --git a/maps/askellon-sector.w3x/war3map.imp b/maps/askellon-sector.w3x/war3map.imp index ecc6bec6..18fa857b 100644 Binary files a/maps/askellon-sector.w3x/war3map.imp and b/maps/askellon-sector.w3x/war3map.imp differ diff --git a/maps/askellon-sector.w3x/war3map.lua b/maps/askellon-sector.w3x/war3map.lua index 876414be..0ba2a8d9 100644 --- a/maps/askellon-sector.w3x/war3map.lua +++ b/maps/askellon-sector.w3x/war3map.lua @@ -168,9 +168,7 @@ gg_rct_spawninquisitor1 = nil gg_rct_spawnengineer1 = nil gg_rct_spawnsecurityguard1 = nil gg_rct_spawnsecurityguard2 = nil -gg_rct_spawnsecurityguard3 = nil gg_rct_spawnsecurityguard4 = nil -gg_rct_spawnpilot1 = nil gg_rct_spawnpilot2 = nil gg_rct_spawnpilot3 = nil gg_rct_spawnpilot4 = nil @@ -219,6 +217,12 @@ gg_rct_Kill_Zone_5 = nil gg_rct_Kill_Zone_6 = nil gg_rct_Kill_Zone_7 = nil gg_rct_Kill_Zone_8 = nil +gg_rct_zonearmory8 = nil +gg_rct_zonearmory9 = nil +gg_rct_zonearmory10 = nil +gg_rct_zonearmory11 = nil +gg_rct_spawnsecurityguard3 = nil +gg_rct_spawnpilot1 = nil gg_trg_SetKillzones = nil gg_trg_Set = nil gg_trg_SetHatch = nil @@ -479,6 +483,9 @@ function CreateBuildingsForPlayer21() gg_unit_h004_0479 = BlzCreateUnitWithSkin(p, FourCC("h004"), -24256.0, -13120.0, 270.000, FourCC("h004")) u = BlzCreateUnitWithSkin(p, FourCC("n00H"), -13248.0, -11071.9, 0.000, FourCC("n00H")) u = BlzCreateUnitWithSkin(p, FourCC("n00H"), -13832.4, -11371.0, 270.000, FourCC("n00H")) + u = BlzCreateUnitWithSkin(p, FourCC("n00H"), -7297.3, -14444.3, 270.000, FourCC("n00H")) + u = BlzCreateUnitWithSkin(p, FourCC("n00H"), -6529.3, -14444.3, 270.000, FourCC("n00H")) + u = BlzCreateUnitWithSkin(p, FourCC("n00H"), -7937.3, -13676.3, 270.000, FourCC("n00H")) end function CreateUnitsForPlayer21() @@ -558,6 +565,7 @@ function CreateBuildingsForPlayer22() u = BlzCreateUnitWithSkin(p, FourCC("h008"), -12736.0, -11968.0, 270.000, FourCC("h008")) u = BlzCreateUnitWithSkin(p, FourCC("h00C"), -14936.6, -5871.5, 0.000, FourCC("h00C")) u = BlzCreateUnitWithSkin(p, FourCC("h00C"), -3544.6, -17967.5, 0.000, FourCC("h00C")) + u = BlzCreateUnitWithSkin(p, FourCC("h008"), -7744.0, -13120.0, 270.000, FourCC("h008")) u = BlzCreateUnitWithSkin(p, FourCC("h008"), -5184.0, -13184.0, 270.000, FourCC("h008")) u = BlzCreateUnitWithSkin(p, FourCC("h008"), -5824.0, -13184.0, 270.000, FourCC("h008")) u = BlzCreateUnitWithSkin(p, FourCC("h008"), -7168.0, -13056.0, 270.000, FourCC("h008")) @@ -581,7 +589,7 @@ function CreateBuildingsForPlayer22() u = BlzCreateUnitWithSkin(p, FourCC("h00C"), -14552.2, -15774.2, 270.000, FourCC("h00C")) u = BlzCreateUnitWithSkin(p, FourCC("h00C"), -12322.2, -15417.3, 177.792, FourCC("h00C")) u = BlzCreateUnitWithSkin(p, FourCC("h00C"), -11793.0, -11937.4, 270.000, FourCC("h00C")) - u = BlzCreateUnitWithSkin(p, FourCC("h00C"), -8346.5, -11811.5, 270.000, FourCC("h00C")) + u = BlzCreateUnitWithSkin(p, FourCC("h00C"), -7835.7, -12319.7, 180.568, FourCC("h00C")) u = BlzCreateUnitWithSkin(p, FourCC("h00C"), -20514.2, -12473.3, 177.792, FourCC("h00C")) u = BlzCreateUnitWithSkin(p, FourCC("h00C"), -4682.1, -13218.9, 270.000, FourCC("h00C")) u = BlzCreateUnitWithSkin(p, FourCC("h00C"), -2516.0, -17696.7, 270.000, FourCC("h00C")) @@ -598,9 +606,15 @@ function CreateBuildingsForPlayer22() u = BlzCreateUnitWithSkin(p, FourCC("h008"), -12224.0, -11968.0, 270.000, FourCC("h008")) u = BlzCreateUnitWithSkin(p, FourCC("h00C"), -23976.6, -18031.5, 181.970, FourCC("h00C")) u = BlzCreateUnitWithSkin(p, FourCC("h00C"), -163.7, -17958.2, 180.000, FourCC("h00C")) - u = BlzCreateUnitWithSkin(p, FourCC("h00C"), -8667.7, -13343.7, 0.000, FourCC("h00C")) + u = BlzCreateUnitWithSkin(p, FourCC("h00C"), -7515.7, -13983.7, 0.000, FourCC("h00C")) u = BlzCreateUnitWithSkin(p, FourCC("h00C"), -15149.9, -17632.9, 86.556, FourCC("h00C")) u = BlzCreateUnitWithSkin(p, FourCC("h00C"), -11938.4, -11103.9, 180.000, FourCC("h00C")) + u = BlzCreateUnitWithSkin(p, FourCC("h008"), -7616.0, -14656.0, 270.000, FourCC("h008")) + u = BlzCreateUnitWithSkin(p, FourCC("h008"), -8768.0, -14912.0, 270.000, FourCC("h008")) + u = BlzCreateUnitWithSkin(p, FourCC("h00C"), -6747.7, -13983.7, 0.000, FourCC("h00C")) + u = BlzCreateUnitWithSkin(p, FourCC("h00C"), -8347.7, -14175.7, 180.568, FourCC("h00C")) + u = BlzCreateUnitWithSkin(p, FourCC("h00C"), -6299.7, -14879.7, 180.568, FourCC("h00C")) + u = BlzCreateUnitWithSkin(p, FourCC("h00C"), -8667.7, -15327.7, 358.847, FourCC("h00C")) end function CreateNeutralHostileBuildings() @@ -756,10 +770,8 @@ function CreateNeutralHostile() u = BlzCreateUnitWithSkin(p, FourCC("h005"), -12704.0, -23648.0, 270.000, FourCC("h005")) u = BlzCreateUnitWithSkin(p, FourCC("h005"), -13568.0, -20800.0, 270.000, FourCC("h005")) u = BlzCreateUnitWithSkin(p, FourCC("h005"), -13024.0, -23584.0, 270.000, FourCC("h005")) - u = BlzCreateUnitWithSkin(p, FourCC("h005"), -13376.0, -20832.0, 270.000, FourCC("h005")) u = BlzCreateUnitWithSkin(p, FourCC("h005"), -18528.0, -16480.0, 270.000, FourCC("h005")) u = BlzCreateUnitWithSkin(p, FourCC("h005"), -18784.0, -16352.0, 270.000, FourCC("h005")) - u = BlzCreateUnitWithSkin(p, FourCC("h005"), -13248.0, -20832.0, 270.000, FourCC("h005")) u = BlzCreateUnitWithSkin(p, FourCC("h005"), -12960.0, -23584.0, 270.000, FourCC("h005")) u = BlzCreateUnitWithSkin(p, FourCC("h005"), -12768.0, -23584.0, 270.000, FourCC("h005")) u = BlzCreateUnitWithSkin(p, FourCC("h005"), -12704.0, -23584.0, 270.000, FourCC("h005")) @@ -849,7 +861,6 @@ function CreateNeutralHostile() u = BlzCreateUnitWithSkin(p, FourCC("h005"), -8672.0, -13152.0, 269.179, FourCC("h005")) u = BlzCreateUnitWithSkin(p, FourCC("h005"), -8672.0, -13248.0, 149.972, FourCC("h005")) u = BlzCreateUnitWithSkin(p, FourCC("h005"), -8384.0, -13184.0, 149.972, FourCC("h005")) - u = BlzCreateUnitWithSkin(p, FourCC("h005"), -8288.0, -13504.0, 149.972, FourCC("h005")) u = BlzCreateUnitWithSkin(p, FourCC("h000"), -5575.5, -11134.2, 265.400, FourCC("h000")) u = BlzCreateUnitWithSkin(p, FourCC("h005"), -5888.0, -11104.0, 269.179, FourCC("h005")) u = BlzCreateUnitWithSkin(p, FourCC("h005"), -6656.0, -11744.0, 269.179, FourCC("h005")) @@ -947,6 +958,13 @@ function CreateNeutralHostile() u = BlzCreateUnitWithSkin(p, FourCC("h005"), -4000.0, -13248.0, 270.000, FourCC("h005")) u = BlzCreateUnitWithSkin(p, FourCC("h005"), -4000.0, -13312.0, 270.000, FourCC("h005")) u = BlzCreateUnitWithSkin(p, FourCC("h005"), -4064.0, -13248.0, 270.000, FourCC("h005")) + u = BlzCreateUnitWithSkin(p, FourCC("h005"), -7136.0, -13792.0, 269.189, FourCC("h005")) + u = BlzCreateUnitWithSkin(p, FourCC("h005"), -7072.0, -13792.0, 268.431, FourCC("h005")) + u = BlzCreateUnitWithSkin(p, FourCC("h005"), -7072.0, -13856.0, 268.410, FourCC("h005")) + u = BlzCreateUnitWithSkin(p, FourCC("h005"), -7488.0, -13824.0, 268.410, FourCC("h005")) + u = BlzCreateUnitWithSkin(p, FourCC("h005"), -7488.0, -13984.0, 268.410, FourCC("h005")) + u = BlzCreateUnitWithSkin(p, FourCC("h005"), -7488.0, -14144.0, 268.410, FourCC("h005")) + u = BlzCreateUnitWithSkin(p, FourCC("h005"), -7296.0, -13824.0, 268.410, FourCC("h005")) end function CreateNeutralPassiveBuildings() @@ -974,7 +992,7 @@ function CreateNeutralPassiveBuildings() gg_unit_n001_0053 = BlzCreateUnitWithSkin(p, FourCC("n001"), -14144.0, -6528.0, 270.000, FourCC("n001")) gg_unit_n002_0054 = BlzCreateUnitWithSkin(p, FourCC("n002"), -14848.0, -5888.0, 270.000, FourCC("n002")) gg_unit_n001_0055 = BlzCreateUnitWithSkin(p, FourCC("n001"), -20288.0, -13248.0, 270.000, FourCC("n001")) - u = BlzCreateUnitWithSkin(p, FourCC("n009"), -21696.0, -11392.0, 270.000, FourCC("n009")) + u = BlzCreateUnitWithSkin(p, FourCC("n009"), -13312.0, -20928.0, 270.000, FourCC("n009")) gg_unit_n002_0061 = BlzCreateUnitWithSkin(p, FourCC("n002"), -14720.0, -6528.0, 270.000, FourCC("n002")) u = BlzCreateUnitWithSkin(p, FourCC("n008"), -19968.0, -11392.0, 270.000, FourCC("n008")) gg_unit_n001_0064 = BlzCreateUnitWithSkin(p, FourCC("n001"), -21440.0, -13248.0, 270.000, FourCC("n001")) @@ -985,6 +1003,8 @@ function CreateNeutralPassiveBuildings() gg_unit_n004_0100 = BlzCreateUnitWithSkin(p, FourCC("n004"), -20609.3, -19334.6, 89.562, FourCC("n004")) gg_unit_n002_0152 = BlzCreateUnitWithSkin(p, FourCC("n002"), -10496.0, -12928.0, 270.000, FourCC("n002")) gg_unit_n001_0165 = BlzCreateUnitWithSkin(p, FourCC("n001"), -26560.0, -16640.0, 270.000, FourCC("n001")) + u = BlzCreateUnitWithSkin(p, FourCC("n00Y"), -15610.7, -11774.5, 270.000, FourCC("n00Y")) + u = BlzCreateUnitWithSkin(p, FourCC("n00Z"), -15782.9, -11732.8, 302.267, FourCC("n00Z")) gg_unit_n001_0227 = BlzCreateUnitWithSkin(p, FourCC("n001"), -11072.0, -11712.0, 270.000, FourCC("n001")) u = BlzCreateUnitWithSkin(p, FourCC("n005"), -13571.9, -4210.1, 0.220, FourCC("n005")) gg_unit_n00V_0253 = BlzCreateUnitWithSkin(p, FourCC("n00V"), -15520.0, -15008.0, 301.483, FourCC("n00V")) @@ -1101,7 +1121,7 @@ function CreateRegions() gg_rct_zonebiology12 = Rect(-16032.0, -14080.0, -11744.0, -12416.0) gg_rct_zonebiology13 = Rect(-13216.0, -12448.0, -10688.0, -11776.0) gg_rct_zonebiology14 = Rect(-16032.0, -12480.0, -13344.0, -11456.0) - gg_rct_zonearmory1 = Rect(-8736.0, -13632.0, -7680.0, -11776.0) + gg_rct_zonearmory1 = Rect(-8736.0, -15296.0, -7680.0, -11776.0) gg_rct_zonearmory2 = Rect(-7712.0, -13600.0, -3904.0, -13088.0) gg_rct_zonearmory3 = Rect(-6048.0, -14304.0, -3904.0, -13568.0) gg_rct_zonearmory4 = Rect(-7520.0, -13120.0, -6336.0, -11616.0) @@ -1183,7 +1203,7 @@ function CreateRegions() gg_rct_Kill_Zone_Copy_Copy_3 = Rect(-8224.0, -16992.0, -7488.0, -16672.0) gg_rct_Kill_Zone_Copy_Copy_3_Copy = Rect(-7072.0, -16992.0, -6208.0, -16672.0) gg_rct_Kill_Zone_Copy_Copy_3_Copy_Copy = Rect(-7968.0, -16224.0, -6976.0, -15904.0) - gg_rct_Kill_Zone_Copy_Copy_3_Copy_2 = Rect(-21312.0, -19168.0, -19904.0, -18944.0) + gg_rct_Kill_Zone_Copy_Copy_3_Copy_2 = Rect(-21312.0, -19168.0, -19904.0, -18976.0) gg_rct_Kill_Zone_Copy_Copy_3_Copy_2_Copy = Rect(-20416.0, -19648.0, -19904.0, -18496.0) gg_rct_zonebiologyvent4 = Rect(-11040.0, -14272.0, -10112.0, -13408.0) gg_rct_zonebiologyvent5 = Rect(-10848.0, -15424.0, -10176.0, -14240.0) @@ -1202,10 +1222,8 @@ function CreateRegions() gg_rct_spawninquisitor1 = Rect(-20160.0, -9728.0, -20032.0, -9632.0) gg_rct_spawnengineer1 = Rect(-13376.0, -25344.0, -13248.0, -25248.0) gg_rct_spawnsecurityguard1 = Rect(-13344.0, -21120.0, -13216.0, -21024.0) - gg_rct_spawnsecurityguard2 = Rect(-12608.0, -12544.0, -12480.0, -12448.0) - gg_rct_spawnsecurityguard3 = Rect(-8288.0, -12256.0, -8160.0, -12160.0) + gg_rct_spawnsecurityguard2 = Rect(-13792.0, -10976.0, -13664.0, -10880.0) gg_rct_spawnsecurityguard4 = Rect(-5568.0, -12032.0, -5440.0, -11936.0) - gg_rct_spawnpilot1 = Rect(-20928.0, -13504.0, -20800.0, -13408.0) gg_rct_spawnpilot2 = Rect(-25760.0, -18976.0, -25632.0, -18880.0) gg_rct_spawnpilot3 = Rect(-1024.0, -17248.0, -896.0, -17152.0) gg_rct_spawnpilot4 = Rect(-2944.0, -18944.0, -2816.0, -18848.0) @@ -1254,6 +1272,12 @@ function CreateRegions() gg_rct_Kill_Zone_6 = Rect(20416.0, 22176.0, 22144.0, 24384.0) gg_rct_Kill_Zone_7 = Rect(22144.0, 22240.0, 23872.0, 23872.0) gg_rct_Kill_Zone_8 = Rect(20416.0, 24352.0, 20992.0, 25760.0) + gg_rct_zonearmory8 = Rect(-7712.0, -15296.0, -6208.0, -13568.0) + gg_rct_zonearmory9 = Rect(-8768.0, -15552.0, -8160.0, -15296.0) + gg_rct_zonearmory10 = Rect(-8992.0, -15072.0, -8704.0, -13856.0) + gg_rct_zonearmory11 = Rect(-9280.0, -14656.0, -8832.0, -14272.0) + gg_rct_spawnsecurityguard3 = Rect(-7360.0, -14080.0, -7232.0, -13984.0) + gg_rct_spawnpilot1 = Rect(-11232.0, -16672.0, -11104.0, -16576.0) end function Trig_SetKillzones_Actions() diff --git a/maps/askellon-sector.w3x/war3map.mmp b/maps/askellon-sector.w3x/war3map.mmp index a8cb8bda..3e9e66a7 100644 Binary files a/maps/askellon-sector.w3x/war3map.mmp and b/maps/askellon-sector.w3x/war3map.mmp differ diff --git a/maps/askellon-sector.w3x/war3map.w3a b/maps/askellon-sector.w3x/war3map.w3a index 80737671..1dcac8c1 100644 Binary files a/maps/askellon-sector.w3x/war3map.w3a and b/maps/askellon-sector.w3x/war3map.w3a differ diff --git a/maps/askellon-sector.w3x/war3map.w3d b/maps/askellon-sector.w3x/war3map.w3d index 77aa0446..ebc7e223 100644 Binary files a/maps/askellon-sector.w3x/war3map.w3d and b/maps/askellon-sector.w3x/war3map.w3d differ diff --git a/maps/askellon-sector.w3x/war3map.w3e b/maps/askellon-sector.w3x/war3map.w3e index 8a2aa6ae..5fac80d1 100644 Binary files a/maps/askellon-sector.w3x/war3map.w3e and b/maps/askellon-sector.w3x/war3map.w3e differ diff --git a/maps/askellon-sector.w3x/war3map.w3h b/maps/askellon-sector.w3x/war3map.w3h index 1a9ec8c9..87e4f9ac 100644 Binary files a/maps/askellon-sector.w3x/war3map.w3h and b/maps/askellon-sector.w3x/war3map.w3h differ diff --git a/maps/askellon-sector.w3x/war3map.w3i b/maps/askellon-sector.w3x/war3map.w3i index a0390e08..3d51032c 100644 Binary files a/maps/askellon-sector.w3x/war3map.w3i and b/maps/askellon-sector.w3x/war3map.w3i differ diff --git a/maps/askellon-sector.w3x/war3map.w3q b/maps/askellon-sector.w3x/war3map.w3q index 90773502..ffd14a31 100644 Binary files a/maps/askellon-sector.w3x/war3map.w3q and b/maps/askellon-sector.w3x/war3map.w3q differ diff --git a/maps/askellon-sector.w3x/war3map.w3r b/maps/askellon-sector.w3x/war3map.w3r index d96573df..1fd94dae 100644 Binary files a/maps/askellon-sector.w3x/war3map.w3r and b/maps/askellon-sector.w3x/war3map.w3r differ diff --git a/maps/askellon-sector.w3x/war3map.w3t b/maps/askellon-sector.w3x/war3map.w3t index d6dc6d57..7be4013b 100644 Binary files a/maps/askellon-sector.w3x/war3map.w3t and b/maps/askellon-sector.w3x/war3map.w3t differ diff --git a/maps/askellon-sector.w3x/war3map.w3u b/maps/askellon-sector.w3x/war3map.w3u index 03b3d2cb..c5eb695a 100644 Binary files a/maps/askellon-sector.w3x/war3map.w3u and b/maps/askellon-sector.w3x/war3map.w3u differ diff --git a/maps/askellon-sector.w3x/war3map.wpm b/maps/askellon-sector.w3x/war3map.wpm index a38a915e..f805c067 100644 Binary files a/maps/askellon-sector.w3x/war3map.wpm and b/maps/askellon-sector.w3x/war3map.wpm differ diff --git a/maps/askellon-sector.w3x/war3map.wts b/maps/askellon-sector.w3x/war3map.wts index 506d2d45..483de528 100644 --- a/maps/askellon-sector.w3x/war3map.wts +++ b/maps/askellon-sector.w3x/war3map.wts @@ -173,13 +173,13 @@ A } STRING 48 -// Abilities: A004 (Equip Weapon), Ubertip (Tooltip - Normal - Extended) +// Abilities: A002 (Attack - Gauss Rifle), Ubertip (Tooltip - Normal - Extended) { |cff808080Powered by galvanic rails, this old rifle has been in active circulation since the Yulvin succession wars. Now many corporations produce upgrades and attachments that further improve upon its baseline functionality.|r|n|nFires a short burst of six bullets |cff00ffffACCURACY-MINACCURAC|rY away. Each bullet does |cff00ff00DAMAGE damage|r.|n|n|cffff0000If all six rounds hit the same target, this weapon will apply BREAK.|r } STRING 49 -// Abilities: A004 (Equip Weapon), Tip (Tooltip - Normal) +// Abilities: A002 (Attack - Gauss Rifle), Tip (Tooltip - Normal) { [|cffffff00A|r] - SI Battle Rifle } @@ -1560,7 +1560,7 @@ STRING 395 } STRING 396 -// Abilities: A00J (Repair), Tip (Tooltip - Normal) +// Abilities: A004 (Equip Weapon), Tip (Tooltip - Normal) { [|cffffff00A|r] - SI Battle Rifle } @@ -1812,7 +1812,7 @@ STRING 455 } STRING 456 -// Abilities: A00L (Emotion Inhibitors), Tip (Tooltip - Normal) +// Abilities: A00J (Repair), Tip (Tooltip - Normal) { [|cffffff00A|r] - SI Battle Rifle } @@ -2474,12 +2474,6 @@ STRING 637 ranged } -STRING 642 -// Units: n006 (|cff00ff00T|r|cff00ff32r|r|cff00ff65i|r|cff00ff98f|r|cff00ffcbe|r|cff00fffex|r ), Name (Name) -{ -|cff00ff00T|r|cff00ff32r|r|cff00ff65i|r|cff00ff98f|r|cff00ffcbe|r|cff00fffex|r Vendor|n|cff808080Right Click to use|r -} - STRING 643 // Units: n008 (Medical Supplies), Name (Name) { @@ -3907,7 +3901,7 @@ A } STRING 1042 -// Abilities: A01A (Attack - Minigun), Ubertip (Tooltip - Normal - Extended) +// Abilities: A004 (Equip Weapon), Ubertip (Tooltip - Normal - Extended) { |cff808080Powered by galvanic rails, this old rifle has been in active circulation since the Yulvin succession wars. Now many corporations produce upgrades and attachments that further improve upon its baseline functionality.|r|n|nFires a short burst of six bullets |cff00ffffACCURACY-MINACCURAC|rY away. Each bullet does |cff00ff00DAMAGE damage|r.|n|n|cffff0000If all six rounds hit the same target, this weapon will apply BREAK.|r } @@ -4296,12 +4290,6 @@ STRING 1123 S } -STRING 1124 -// Abilities: A01K (Xenophobic), Ubertip (Tooltip - Normal - Extended) -{ -|cff808080"Rot in hell, Alien scum."|r|n|nThe patient undergoes invasive surgery, gaining the |cffd45e19Come Get Some!|r power.|nAllowing them to taunt Aliens, applying |cff8a6df2Despair|r to all nearby Aliens and replacing their weapon with |cffd45e19Fists|r; a weak weapon that increases in power over time. Lasts |cff00ff0020 |rSeconds.|n|n|cff8a6df2Aliens cannot transform while under the effects of Despair|r|n|nAttribute Gain: |cff00ff00+3.5 Vitality|r and |cff00ff00-1 Will|r per level -} - STRING 1125 // Abilities: A01L (Xenophobic), Name (Name) { @@ -4351,13 +4339,13 @@ STRING 1134 } STRING 1138 -// Abilities: A01N (Adaptive Regeneration), Hotkey (Hotkey - Normal) +// Abilities: AC06 (Target Player 6), Hotkey (Hotkey - Normal) { S } STRING 1141 -// Upgrades: RGEN (Troll Regeneration,Improved Troll Regeneration,Advanced Troll Regeneration), EditorSuffix (Editor Suffix) +// Abilities: A02T (Remove Vocal Cords), EditorSuffix (Editor Suffix) { - GENE } @@ -4374,12 +4362,6 @@ STRING 1147 - Ability } -STRING 1148 -// Abilities: A01N (Adaptive Regeneration), Ubertip (Tooltip - Normal - Extended) -{ -|cff808080LORE TODO|r|n|nThe patient undergoes invasive surgery, gaining the |cffd45e19Adaptive Regeneration|r power.|nPassively |cff00ff00increases|r all stat gains, and can be activated to instantly |cff00ff00heal 40%|r of your maximum hitpoints.|r|n|nAttribute Gain: |cff00ff00+2 Vitality|r, |cff00ff00+2 Accuracy|r and |cff00ff001.5 Will|r per level -} - STRING 1149 // Abilities: A01N (Adaptive Regeneration), Tip (Tooltip - Normal) { @@ -4733,18 +4715,6 @@ STRING 1225 ( INFESTATION ) } -STRING 1226 -// Abilities: AGJP (Enhanced Mobility), Ubertip (Tooltip - Normal - Extended) -{ -|cff808080These symbiotic muscle grafts were originally developed to restore movement in injured personnel. |r|n|nSplices the |cffd45e19Enhanced Mobility|r power into your patient; |cff00ff00passively |rincreasing |cff00ff00movement speed|r by |cff00ff0010%|r and |cff00ff00Sprinting |rnow |cff00ff00jumps |rupon expiration.|n|nAttribute Gain: |cff00ff00+1 Vitality|r per level -} - -STRING 1227 -// Abilities: AGCM (Cosmic Sensitivity), Ubertip (Tooltip - Normal - Extended) -{ -|cff808080The Irqhart-Timms Procedure is supposed to be utterly discredited and totally illegal, but starship crewmen keep seeking it out and there's always surgeons ready to do it. Those who have the surgery claim to sense the shifting of the cosmos, but to onlookers, they appear blind to the world. The stories shared amongst starship crews talk of their uncanny awareness of the goings-on on their ships, but also of horrific incidents of cosmic-ray-hyperexposure and recurring incidents of madness, neural shutdown and monster attacks on the vessels they frequent.|r|n|nSupernaturally sensitive glands placed behind the cortex pick up the smallest of envornental changes.|n- |cffd45e19Receive Warning|r when the Askellon warps|n- |cffd45e19Receive Warning|r when an Alien Transforms|n- Cosmic Events affect you more|n- Gain 2 Will for each Warp|n- Gain the |cffd45e19Embrace the Cosmos|r ability.|n|nAttribute Gain: |cff00ff00+3 Will|r and |cff00ff00-2 Accuracy|r per level -} - STRING 1228 // Units: u006 (Egg), EditorSuffix (Name - Editor Suffix) { @@ -4854,7 +4824,7 @@ Infestation Aura } STRING 1246 -// Buffs/Effects: B00B (), Bufftip (Tooltip) +// Abilities: A02C (Genetics INFESTATION - Perma Spawn), Tip (Tooltip - Normal) { Infestation } @@ -5003,12 +4973,6 @@ STRING 1272 Target Player 6 } -STRING 1273 -// Abilities: AC06 (Target Player 6), Hotkey (Hotkey - Normal) -{ -S -} - STRING 1274 // Abilities: AC06 (Target Player 6), Ubertip (Tooltip - Normal - Extended) { @@ -5028,7 +4992,7 @@ Target Player 7 } STRING 1277 -// Abilities: AC07 (Target Player 7), Hotkey (Hotkey - Normal) +// Abilities: A01N (Adaptive Regeneration), Hotkey (Hotkey - Normal) { D } @@ -5806,7 +5770,7 @@ A } STRING 1437 -// Abilities: A022 (Attack - Neokatana), Ubertip (Tooltip - Normal - Extended) +// Abilities: A01A (Attack - Minigun), Ubertip (Tooltip - Normal - Extended) { |cff808080Powered by galvanic rails, this old rifle has been in active circulation since the Yulvin succession wars. Now many corporations produce upgrades and attachments that further improve upon its baseline functionality.|r|n|nFires a short burst of six bullets |cff00ffffACCURACY-MINACCURAC|rY away. Each bullet does |cff00ff00DAMAGE damage|r.|n|n|cffff0000If all six rounds hit the same target, this weapon will apply BREAK.|r } @@ -6034,7 +5998,7 @@ A } STRING 1478 -// Upgrades: RDAM (Iron Forged Swords,Steel Forged Swords,Mithril Forged Swords), Hotkey (Hotkey) +// Abilities: A02V (Comeback), Hotkey (Hotkey - Normal) { A } @@ -6444,12 +6408,6 @@ STRING 1547 |cff808080Eugh you feel sick|r|nUnable to enter ships for |cffc81e1e30 seconds|r. } -STRING 1548 -// Abilities: A01O (Adaptive Regeneration), Ubertip (Tooltip - Normal - Extended) -{ -|cff808080LORE TODO|r|n|nInstantly|cff00ff00 heal 40%|r of your maximum hit points.|n|n|cff80808080 Seconds Cooldown|r -} - STRING 1549 // Buffs/Effects: B004 (Despair), Buffubertip (Tooltip - Extended) { @@ -6546,30 +6504,12 @@ STRING 1566 Spawns canite every 25 seconds } -STRING 1567 -// Abilities: A00I (Night Eye), Ubertip (Tooltip - Normal - Extended) -{ -|cff808080A revolutionary mixture of Cybertech and Biotech; These "Night Eyes" leech off ambient electricity in the body, allowing for enhanced night vision.|r|n|nSplices the |cffd45e19Night Eyes|r power into your patient.|nWhen used, gain |cff00ff00night vision|r for |cff00ff0030 seconds|r. You are |cff00ff00immune |rto |cff8a6df2Despair|r caused by darkness.|n|nAttribute Gain: |cff00ff00+2.5 Accuracy|r and |cff00ff00+1 Will|r per level. -} - STRING 1568 // Abilities: A02C (Genetics INFESTATION - Perma Spawn), Name (Name) { Genetics INFESTATION - Perma Spawn } -STRING 1569 -// Abilities: A02C (Genetics INFESTATION - Perma Spawn), Tip (Tooltip - Normal) -{ -[ PASSIVE ] Mutated Genetics -} - -STRING 1570 -// Abilities: A02C (Genetics INFESTATION - Perma Spawn), Ubertip (Tooltip - Normal - Extended) -{ -|cff808080What is man but a bundle of easily manipulatable genetics?|r|n|nCompleting a |cff00ff00Tier 1 Genetic Splice|r now causes the target to turn into an |cff8a6df2Alien upon death|r, no matter the source|cffc81e1e ( Only effects non-alien players )|r.|n|n|cffd45e19You've unlocked this by Infesting Healthcare|r -} - STRING 1571 // Upgrades: RMED (Troll Regeneration,Improved Troll Regeneration,Advanced Troll Regeneration), Ubertip (Tooltip - Extended) { @@ -7268,13 +7208,13 @@ Repair Neokatana } STRING 1716 -// Abilities: A02N (Repair Neokatana), Ubertip (Tooltip - Normal - Extended) +// Abilities: A01A (Attack - Minigun), Ubertip (Tooltip - Normal - Extended) { |cff808080Powered by galvanic rails, this old rifle has been in active circulation since the Yulvin succession wars. Now many corporations produce upgrades and attachments that further improve upon its baseline functionality.|r|n|nFires a short burst of six bullets |cff00ffffACCURACY-MINACCURAC|rY away. Each bullet does |cff00ff00DAMAGE damage|r.|n|n|cffff0000If all six rounds hit the same target, this weapon will apply BREAK.|r } STRING 1717 -// Abilities: A02N (Repair Neokatana), Tip (Tooltip - Normal) +// Abilities: A00L (Emotion Inhibitors), Tip (Tooltip - Normal) { [|cffffff00A|r] - SI Battle Rifle } @@ -7711,3 +7651,321 @@ STRING 1807 There's no coming back from death. } +STRING 1808 +// Abilities: A00I (Night Eye), Ubertip (Tooltip - Normal - Extended) +{ +|cff808080A revolutionary mixture of Cybertech and Biotech; These "Night Eyes" leech off ambient electricity in the body, allowing for enhanced night vision.|r|n|nGrants the |cfff9a602Nightstalker|r power.|n|cff00ff00[+] Passively ignore despair caused by Darkness|n[+] Activate to gain Dark Vision|n|n|cfff9a602Attribute Gain Per Level:|n|cff00ff00+2.5 Will|r, |cff00ff00+1 Will|r and |cffb52166-2 Accuracy|r per level|n|N|cffd45e19Attribute changes are retroactive|r +} + +STRING 1809 +// Abilities: AGJP (Enhanced Mobility), Ubertip (Tooltip - Normal - Extended) +{ +|cff808080These symbiotic muscle grafts were originally developed to restore movement in injured personnel. |r|n|nGrants the |cfff9a602Enhanced Sprint|r power.|n|cff00ff00[+] Increased Sprint Duration and Speed|n[+] Jump after sprinting|r|n|n|cfff9a602Attribute Gain Per Level:|n|cff00ff00+1 Vitality|r per level|n|N|cffd45e19Attribute changes are retroactive|r +} + +STRING 1810 +// Abilities: AGCM (Cosmic Sensitivity), Ubertip (Tooltip - Normal - Extended) +{ +|cff808080The Irqhart-Timms Procedure is supposed to be utterly discredited and totally illegal, but starship crewmen keep seeking it out and there's always surgeons ready to do it. Those who have the surgery claim to sense the shifting of the cosmos, but to onlookers, they appear blind to the world. The stories shared amongst starship crews talk of their uncanny awareness of the goings-on on their ships, but also of horrific incidents of cosmic-ray-hyperexposure and recurring incidents of madness, neural shutdown and monster attacks on the vessels they frequent.|r|n|nGrants the |cfff9a602Cosmic Potential|r power.|n|cff00ff00[+] Know when an Alien Transforms|n[+] Damage and slow nearby units|n|r|cffb52166[−] Does self damage|r|r|n|n|cfff9a602Attribute Gain Per Level:|n|cff00ff00+3 Will|r and |cffb52166-2 Accuracy|r per level|n|N|cffd45e19Attribute changes are retroactive|r +} + +STRING 1811 +// Abilities: A01K (Xenophobic), Ubertip (Tooltip - Normal - Extended) +{ +|cff808080"Rot in hell, Alien scum."|r|n|nGrants the |cfff9a602Come Get Some!|r power.|n|cff00ff00[+] Can Punch Aliens|n[+] Punching Aliens grants permanent Hit Points|n|r|cffb52166[−] You have to Punch Aliens|r|r|n|n|cfff9a602Attribute Gain Per Level:|n|cff00ff00+3.5 Vitality|r and |cffb52166-1 Will|r per level|n|N|cffd45e19Attribute changes are retroactive|r +} + +STRING 1812 +// Abilities: A01N (Adaptive Regeneration), Ubertip (Tooltip - Normal - Extended) +{ +|cff808080LORE TODO|r|n|nGrants the |cfff9a602Adaptive Regeneration|r power.|n|cff00ff00[+] Instantly heal 33% of your maximum HP|r|n|n|cfff9a602Attribute Gain Per Level:|n|cff00ff00+2 Vitality|r, |cff00ff00+2 Accuracy|r and |cff00ff00+1.5 Will|r per level|n|N|cffd45e19Attribute changes are retroactive|r +} + +STRING 1813 +// Abilities: A02C (Genetics INFESTATION - Perma Spawn), Ubertip (Tooltip - Normal - Extended) +{ +|cff808080What is man but a bundle of easily manipulatable genetics?|r|n|nUsing the |cfff9a602Genetic Splicer|r now causes players to become |cff8a6df2Alien|r upon death from any source|n|n|cff8a6df2This is an Infestation ability|r +} + +STRING 1814 +// Abilities: A02T (Remove Vocal Cords), Name (Name) +{ +Remove Vocal Cords +} + +STRING 1816 +// Buffs/Effects: B00B (), Bufftip (Tooltip) +{ +Infestation +} + +STRING 1818 +// Upgrades: RGEN (Troll Regeneration,Improved Troll Regeneration,Advanced Troll Regeneration), EditorSuffix (Editor Suffix) +{ +- GENE +} + +STRING 1820 +// Abilities: A01O (Adaptive Regeneration), Ubertip (Tooltip - Normal - Extended) +{ +|cff808080LORE TODO|r|n|nInstantly|cff00ff00 heal 33%|r of your maximum hit points.|n|n|cff80808080 Seconds Cooldown|r +} + +STRING 1821 +// Abilities: A02T (Remove Vocal Cords), Hotkey (Hotkey - Normal) +{ +F +} + +STRING 1822 +// Abilities: A02T (Remove Vocal Cords), Ubertip (Tooltip - Normal - Extended) +{ +|cff808080He wont be needing these.|r|n|nGrants the |cfff9a602Removed Vocal Chords|r power.|n|cffb52166[−] Can no longer talk|r|n|n|cfff9a602Attribute Gain Per Level:|n|cffb52166-1 Vitality|r and |cffb52166-1 Will|r per level|n|N|cffd45e19Attribute changes are retroactive|r|n|cff8a6df2This is an Infestation ability|r +} + +STRING 1823 +// Abilities: A02T (Remove Vocal Cords), Tip (Tooltip - Normal) +{ +Remove Vocal Chords +} + +STRING 1824 +// Abilities: A02U (Mute), Name (Name) +{ +Mute +} + +STRING 1825 +// Abilities: A02U (Mute), Tip (Tooltip - Normal) +{ +Mute +} + +STRING 1827 +// Abilities: A02U (Mute), Researchhotkey (Hotkey - Learn) +{ +E +} + +STRING 1828 +// Abilities: A02U (Mute), Hotkey (Hotkey - Normal) +{ +E +} + +STRING 1829 +// Abilities: A02U (Mute), Unhotkey (Hotkey - Turn Off) +{ +E +} + +STRING 1830 +// Upgrades: R00N (Troll Regeneration,Improved Troll Regeneration,Advanced Troll Regeneration), Name (Name) +{ +No Vocal Cords +} + +STRING 1831 +// Abilities: A02U (Mute), Ubertip (Tooltip - Normal - Extended) +{ +|cff808080LORE TODO|r|n|nYou are unable to talk.|n|n|cffb52166This cannot be healed|n +} + +STRING 1832 +// Items: I00S ("Comeback" Thanomoxadryl), Name (Name) +{ +"Comeback" Thanomoxadryl +} + +STRING 1834 +// Items: I00S ("Comeback" Thanomoxadryl), Tip (Tooltip - Basic) +{ +Purchase "Comeback" Thanomoxadryl +} + +STRING 1835 +// Items: I00S ("Comeback" Thanomoxadryl), Description (Description) +{ +Grants hp, regeneration and movement speed. But at a cost. +} + +STRING 1836 +// Abilities: A02V (Comeback), Name (Name) +{ +Comeback +} + +STRING 1837 +// Abilities: A02V (Comeback), Ubertip (Tooltip - Normal - Extended) +{ +|cff808080Fluff TODO|r|n|nRepairs station property to |cff00ff00100%|r over |cff00ff005|r seconds.|n|n|cff80808010 Seconds Cooldown|r +} + +STRING 1838 +// Abilities: A02N (Repair Neokatana), Tip (Tooltip - Normal) +{ +[|cffffff00A|r] - SI Battle Rifle +} + +STRING 1839 +// Upgrades: RDAM (Iron Forged Swords,Steel Forged Swords,Mithril Forged Swords), Hotkey (Hotkey) +{ +A +} + +STRING 1841 +// Abilities: A02W (Life Regeneration), Name (Name) +{ +Life Regeneration +} + +STRING 1842 +// Abilities: A02W (Life Regeneration), EditorSuffix (Editor Suffix) +{ + (+25 Regen) +} + +STRING 1843 +// Abilities: A02X (Item Hit Point Bonus), Name (Name) +{ +Item Hit Point Bonus +} + +STRING 1844 +// Abilities: A02X (Item Hit Point Bonus), EditorSuffix (Editor Suffix) +{ +( +200 ) +} + +STRING 1845 +// Abilities: A02Y (Item Move Speed Bonus), EditorSuffix (Editor Suffix) +{ + ( +30 ) +} + +STRING 1847 +// Items: I00S ("Comeback" Thanomoxadryl), Ubertip (Tooltip - Extended) +{ +|cff808080The premier combat drug of Askellon's Enforcement Squads, Comeback provides soldiers with short-term cellular regeneration, allowing soldiers to survive massive injury. Not for use by everyone. Side effects include cellular disintegration, cellular malformation and genetic corruption. Hexcorp accepts no responsibility for reduced lifespan, early-onset senility or chronic addiction.|r|n|nIncreases your Maximum Hit Points by|cff00ff00 200|r, regeneration by |cff00ff0025 |rand movement speed by |cff00ff0010%|r; Lasts |cff00ff0030 |rseconds.|n|n|cffb52166Side Effect:|r While not using the drug, your Maximum Hit points are reduced by |cff00ff001|r for every |cff00ff0010 |rHealth this has regenerated.|n|n|cff808080200 Seconds Cooldown|r +} + +STRING 1848 +// Units: n006 (|cff00ff00T|r|cff00ff32r|r|cff00ff65i|r|cff00ff98f|r|cff00ffcbe|r|cff00fffex|r ), Name (Name) +{ +|cff00ff00T|r|cff00ff32r|r|cff00ff65i|r|cff00ff98f|r|cff00ffcbe|r|cff00fffex|r Vendor [ |cfff9a602Doctor Only|r ]|n|cff808080Right Click to use|r +} + +STRING 1849 +// Doodads: D01S (Lab Room), Name (Name) +{ +Lab Room +} + +STRING 1850 +// Doodads: D01T (Containment), Name (Name) +{ +Containment +} + +STRING 1851 +// Doodads: D01U (Support Column Medium), Name (Name) +{ +Support Column Medium +} + +STRING 1852 +// Doodads: D01V (Askellon Flag), Name (Name) +{ +Askellon Flag +} + +STRING 1853 +// Abilities: AC07 (Target Player 7), Hotkey (Hotkey - Normal) +{ +D +} + +STRING 1854 +// Abilities: A00H (Attack - Laser), Tip (Tooltip - Normal) +{ +[|cffffff00A|r] - Particle Accelerator +} + +STRING 1855 +// Abilities: ASHO (Attack - Harkon's Blitzer), Tip (Tooltip - Normal) +{ +[|cffffff00A|r] - Harkon's Blitzer +} + +STRING 1856 +// Abilities: A01A (Attack - Minigun), Tip (Tooltip - Normal) +{ +MG5-27 "Flamesaw" Pattern Minigun +} + +STRING 1857 +// Abilities: A01M (Attack - Fists), Tip (Tooltip - Normal) +{ +Fists +} + +STRING 1858 +// Abilities: A01M (Attack - Fists), Ubertip (Tooltip - Normal - Extended) +{ +Punch Shit Yo +} + +STRING 1859 +// Abilities: A022 (Attack - Neokatana), Ubertip (Tooltip - Normal - Extended) +{ +|cff808080Powered by galvanic rails, this old rifle has been in active circulation since the Yulvin succession wars. Now many corporations produce upgrades and attachments that further improve upon its baseline functionality.|r|n|nFires a short burst of six bullets |cff00ffffACCURACY-MINACCURAC|rY away. Each bullet does |cff00ff00DAMAGE damage|r.|n|n|cffff0000If all six rounds hit the same target, this weapon will apply BREAK.|r +} + +STRING 1860 +// Abilities: A022 (Attack - Neokatana), Tip (Tooltip - Normal) +{ +Katana +} + +STRING 1861 +// Abilities: A022 (Attack - Neokatana), Ubertip (Tooltip - Normal - Extended) +{ +|cff808080Powered by galvanic rails, this old rifle has been in active circulation since the Yulvin succession wars. Now many corporations produce upgrades and attachments that further improve upon its baseline functionality.|r|n|nFires a short burst of six bullets |cff00ffffACCURACY-MINACCURAC|rY away. Each bullet does |cff00ff00DAMAGE damage|r.|n|n|cffff0000If all six rounds hit the same target, this weapon will apply BREAK.|r +} + +STRING 1862 +// Abilities: A02N (Repair Neokatana), Ubertip (Tooltip - Normal - Extended) +{ +|cff808080Powered by galvanic rails, this old rifle has been in active circulation since the Yulvin succession wars. Now many corporations produce upgrades and attachments that further improve upon its baseline functionality.|r|n|nFires a short burst of six bullets |cff00ffffACCURACY-MINACCURAC|rY away. Each bullet does |cff00ff00DAMAGE damage|r.|n|n|cffff0000If all six rounds hit the same target, this weapon will apply BREAK.|r +} + +STRING 1863 +// Abilities: A02S (Attack - Flamer), Tip (Tooltip - Normal) +{ +Flamethrower +} + +STRING 1864 +// Abilities: A02S (Attack - Flamer), Ubertip (Tooltip - Normal - Extended) +{ +is flamethrower yah +} + +STRING 1865 +// Abilities: A02V (Comeback), Tip (Tooltip - Normal) +{ +[|cffffff00A|r] - SI Battle Rifle +} + +STRING 1866 +// Units: n00Y ("Spinout" Ron|n|cff808080May you rest in peace|r), Name (Name) +{ +"Spinout" Ron|n|cff808080May you rest in peace|r +} + +STRING 1867 +// Units: n00Z (Shane|n|cff808080May you rest in peace|r), Name (Name) +{ +Shane|n|cff808080May you rest in peace|r +} + diff --git a/maps/askellon-sector.w3x/war3mapMap.blp b/maps/askellon-sector.w3x/war3mapMap.blp index 60b21251..6248c55f 100644 Binary files a/maps/askellon-sector.w3x/war3mapMap.blp and b/maps/askellon-sector.w3x/war3mapMap.blp differ diff --git a/maps/askellon-sector.w3x/war3mapUnits.doo b/maps/askellon-sector.w3x/war3mapUnits.doo index 49b30724..15777b36 100644 Binary files a/maps/askellon-sector.w3x/war3mapUnits.doo and b/maps/askellon-sector.w3x/war3mapUnits.doo differ diff --git a/project.log b/project.log index cd77fa42..8a972bf9 100644 --- a/project.log +++ b/project.log @@ -850,3 +850,357 @@ [2021-01-10 02:43:06] info: Transpiling TypeScript to Lua... [2021-01-10 02:43:30] info: Building "askellon-sector.w3x"... [2021-01-10 02:43:31] info: Creating w3x archive... +[2021-01-14 03:46:01] info: Transpiling TypeScript to Lua... +[2021-01-14 03:46:28] info: Building "askellon-sector.w3x"... +[2021-01-14 03:46:29] info: Creating w3x archive... +[2021-01-14 03:48:46] info: Transpiling TypeScript to Lua... +[2021-01-14 03:49:08] info: Building "askellon-sector.w3x"... +[2021-01-14 03:49:09] info: Creating w3x archive... +[2021-01-17 01:52:06] info: Transpiling TypeScript to Lua... +[2021-01-17 01:52:37] info: Building "askellon-sector.w3x"... +[2021-01-17 01:53:05] info: Creating w3x archive... +[2021-01-17 04:54:34] info: Transpiling TypeScript to Lua... +[2021-01-17 04:54:56] info: Building "askellon-sector.w3x"... +[2021-01-17 04:55:02] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-18 05:14:02] info: Transpiling TypeScript to Lua... +[2021-01-18 05:14:27] info: Building "askellon-sector.w3x"... +[2021-01-18 05:14:38] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-18 05:16:21] info: Transpiling TypeScript to Lua... +[2021-01-18 05:16:43] info: Building "askellon-sector.w3x"... +[2021-01-18 05:16:44] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-18 05:18:54] info: Transpiling TypeScript to Lua... +[2021-01-18 05:19:16] info: Building "askellon-sector.w3x"... +[2021-01-18 05:19:16] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-18 05:23:51] info: Transpiling TypeScript to Lua... +[2021-01-18 05:24:13] info: Building "askellon-sector.w3x"... +[2021-01-18 05:24:13] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-18 05:28:53] info: Transpiling TypeScript to Lua... +[2021-01-18 05:29:15] info: Building "askellon-sector.w3x"... +[2021-01-18 05:29:16] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-18 05:33:29] info: Transpiling TypeScript to Lua... +[2021-01-18 05:33:51] info: Building "askellon-sector.w3x"... +[2021-01-18 05:33:51] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-18 07:05:32] info: Transpiling TypeScript to Lua... +[2021-01-18 07:05:55] info: Building "askellon-sector.w3x"... +[2021-01-18 07:05:57] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-18 07:09:40] info: Transpiling TypeScript to Lua... +[2021-01-18 07:10:03] info: Building "askellon-sector.w3x"... +[2021-01-18 07:10:04] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-18 07:36:12] info: Transpiling TypeScript to Lua... +[2021-01-18 07:36:35] info: Building "askellon-sector.w3x"... +[2021-01-18 07:36:36] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-18 07:39:21] info: Transpiling TypeScript to Lua... +[2021-01-18 07:39:46] info: Building "askellon-sector.w3x"... +[2021-01-18 07:39:47] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-18 07:43:19] info: Transpiling TypeScript to Lua... +[2021-01-18 07:43:44] info: Building "askellon-sector.w3x"... +[2021-01-18 07:43:44] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-18 07:46:18] info: Transpiling TypeScript to Lua... +[2021-01-18 07:46:41] info: Building "askellon-sector.w3x"... +[2021-01-18 07:46:41] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-18 07:50:16] info: Transpiling TypeScript to Lua... +[2021-01-18 07:50:40] info: Building "askellon-sector.w3x"... +[2021-01-18 07:50:41] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-18 07:55:46] info: Transpiling TypeScript to Lua... +[2021-01-18 07:56:09] info: Building "askellon-sector.w3x"... +[2021-01-18 07:56:10] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-18 11:01:11] info: Transpiling TypeScript to Lua... +[2021-01-18 11:01:35] info: Building "askellon-sector.w3x"... +[2021-01-18 11:01:36] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-18 11:38:17] info: Transpiling TypeScript to Lua... +[2021-01-18 11:38:42] info: Building "askellon-sector.w3x"... +[2021-01-18 11:38:43] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-18 11:57:13] info: Transpiling TypeScript to Lua... +[2021-01-18 11:57:35] info: Building "askellon-sector.w3x"... +[2021-01-18 11:57:35] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-18 22:19:10] info: Transpiling TypeScript to Lua... +[2021-01-18 22:19:37] info: Building "askellon-sector.w3x"... +[2021-01-18 22:19:55] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-18 22:22:17] info: Transpiling TypeScript to Lua... +[2021-01-18 22:22:40] info: Building "askellon-sector.w3x"... +[2021-01-18 22:22:40] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-18 22:25:14] info: Transpiling TypeScript to Lua... +[2021-01-18 22:25:36] info: Building "askellon-sector.w3x"... +[2021-01-18 22:25:37] info: Creating w3x archive... +[2021-01-19 00:40:24] info: Transpiling TypeScript to Lua... +[2021-01-19 00:40:46] info: Building "askellon-sector.w3x"... +[2021-01-19 00:40:47] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 06:29:59] info: Transpiling TypeScript to Lua... +[2021-01-19 06:30:22] info: Building "askellon-sector.w3x"... +[2021-01-19 06:30:23] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 06:34:21] info: Transpiling TypeScript to Lua... +[2021-01-19 06:34:43] info: Building "askellon-sector.w3x"... +[2021-01-19 06:34:44] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 06:36:32] info: Transpiling TypeScript to Lua... +[2021-01-19 06:36:54] info: Building "askellon-sector.w3x"... +[2021-01-19 06:36:55] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 06:39:43] info: Transpiling TypeScript to Lua... +[2021-01-19 06:40:06] info: Building "askellon-sector.w3x"... +[2021-01-19 06:40:06] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 06:45:45] info: Transpiling TypeScript to Lua... +[2021-01-19 06:46:07] info: Building "askellon-sector.w3x"... +[2021-01-19 06:46:07] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 06:52:59] info: Transpiling TypeScript to Lua... +[2021-01-19 06:53:21] info: Building "askellon-sector.w3x"... +[2021-01-19 06:53:22] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 06:59:07] info: Transpiling TypeScript to Lua... +[2021-01-19 06:59:29] info: Building "askellon-sector.w3x"... +[2021-01-19 06:59:30] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 07:05:12] info: Transpiling TypeScript to Lua... +[2021-01-19 07:05:34] info: Building "askellon-sector.w3x"... +[2021-01-19 07:05:35] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 07:08:16] info: Transpiling TypeScript to Lua... +[2021-01-19 07:08:39] info: Building "askellon-sector.w3x"... +[2021-01-19 07:08:40] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 07:11:35] info: Transpiling TypeScript to Lua... +[2021-01-19 07:11:58] info: Building "askellon-sector.w3x"... +[2021-01-19 07:11:58] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 07:16:36] info: Transpiling TypeScript to Lua... +[2021-01-19 07:16:58] info: Building "askellon-sector.w3x"... +[2021-01-19 07:16:58] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 07:18:30] info: Transpiling TypeScript to Lua... +[2021-01-19 07:18:52] info: Building "askellon-sector.w3x"... +[2021-01-19 07:18:53] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 07:40:32] info: Transpiling TypeScript to Lua... +[2021-01-19 07:40:56] info: Building "askellon-sector.w3x"... +[2021-01-19 07:40:57] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 07:45:01] info: Transpiling TypeScript to Lua... +[2021-01-19 07:45:23] info: Building "askellon-sector.w3x"... +[2021-01-19 07:45:24] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 07:46:42] info: Transpiling TypeScript to Lua... +[2021-01-19 07:47:04] info: Building "askellon-sector.w3x"... +[2021-01-19 07:47:05] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 07:48:35] info: Transpiling TypeScript to Lua... +[2021-01-19 07:48:57] info: Building "askellon-sector.w3x"... +[2021-01-19 07:48:57] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 07:50:29] info: Transpiling TypeScript to Lua... +[2021-01-19 07:50:51] info: Building "askellon-sector.w3x"... +[2021-01-19 07:50:51] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 07:54:14] info: Transpiling TypeScript to Lua... +[2021-01-19 07:54:36] info: Building "askellon-sector.w3x"... +[2021-01-19 07:54:36] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 07:55:58] info: Transpiling TypeScript to Lua... +[2021-01-19 07:56:20] info: Building "askellon-sector.w3x"... +[2021-01-19 07:56:20] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 07:57:43] info: Transpiling TypeScript to Lua... +[2021-01-19 07:58:05] info: Building "askellon-sector.w3x"... +[2021-01-19 07:58:05] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 07:59:17] info: Transpiling TypeScript to Lua... +[2021-01-19 07:59:39] info: Building "askellon-sector.w3x"... +[2021-01-19 07:59:39] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 08:03:13] info: Transpiling TypeScript to Lua... +[2021-01-19 08:03:35] info: Building "askellon-sector.w3x"... +[2021-01-19 08:03:36] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 08:08:01] info: Transpiling TypeScript to Lua... +[2021-01-19 08:08:23] info: Building "askellon-sector.w3x"... +[2021-01-19 08:08:23] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 08:11:27] info: Transpiling TypeScript to Lua... +[2021-01-19 08:11:49] info: Building "askellon-sector.w3x"... +[2021-01-19 08:11:50] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 08:13:51] info: Transpiling TypeScript to Lua... +[2021-01-19 08:14:13] info: Building "askellon-sector.w3x"... +[2021-01-19 08:14:14] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 08:17:20] info: Transpiling TypeScript to Lua... +[2021-01-19 08:17:43] info: Building "askellon-sector.w3x"... +[2021-01-19 08:17:43] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 08:19:36] info: Transpiling TypeScript to Lua... +[2021-01-19 08:19:58] info: Building "askellon-sector.w3x"... +[2021-01-19 08:19:59] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 08:31:18] info: Transpiling TypeScript to Lua... +[2021-01-19 08:31:40] info: Building "askellon-sector.w3x"... +[2021-01-19 08:31:41] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 08:34:36] info: Transpiling TypeScript to Lua... +[2021-01-19 08:34:58] info: Building "askellon-sector.w3x"... +[2021-01-19 08:34:59] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 08:35:44] info: Transpiling TypeScript to Lua... +[2021-01-19 08:36:05] info: Building "askellon-sector.w3x"... +[2021-01-19 08:36:05] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 08:39:27] info: Transpiling TypeScript to Lua... +[2021-01-19 08:39:48] info: Building "askellon-sector.w3x"... +[2021-01-19 08:39:49] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 08:41:50] info: Transpiling TypeScript to Lua... +[2021-01-19 08:42:12] info: Building "askellon-sector.w3x"... +[2021-01-19 08:42:13] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 08:43:57] info: Transpiling TypeScript to Lua... +[2021-01-19 08:44:19] info: Building "askellon-sector.w3x"... +[2021-01-19 08:44:20] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 08:47:50] info: Transpiling TypeScript to Lua... +[2021-01-19 08:48:12] info: Building "askellon-sector.w3x"... +[2021-01-19 08:48:12] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 08:57:35] info: Transpiling TypeScript to Lua... +[2021-01-19 08:57:57] info: Building "askellon-sector.w3x"... +[2021-01-19 08:57:58] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 08:59:52] info: Transpiling TypeScript to Lua... +[2021-01-19 09:00:14] info: Building "askellon-sector.w3x"... +[2021-01-19 09:00:15] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 09:01:56] info: Transpiling TypeScript to Lua... +[2021-01-19 09:02:17] info: Building "askellon-sector.w3x"... +[2021-01-19 09:02:18] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 09:04:06] info: Transpiling TypeScript to Lua... +[2021-01-19 09:04:27] info: Building "askellon-sector.w3x"... +[2021-01-19 09:04:28] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 09:05:51] info: Transpiling TypeScript to Lua... +[2021-01-19 09:06:12] info: Building "askellon-sector.w3x"... +[2021-01-19 09:06:13] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 09:07:43] info: Transpiling TypeScript to Lua... +[2021-01-19 09:08:06] info: Building "askellon-sector.w3x"... +[2021-01-19 09:08:06] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 09:09:31] info: Transpiling TypeScript to Lua... +[2021-01-19 09:09:53] info: Building "askellon-sector.w3x"... +[2021-01-19 09:09:53] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 09:35:18] info: Transpiling TypeScript to Lua... +[2021-01-19 09:35:41] info: Building "askellon-sector.w3x"... +[2021-01-19 09:35:42] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 09:36:35] info: Transpiling TypeScript to Lua... +[2021-01-19 09:36:58] info: Building "askellon-sector.w3x"... +[2021-01-19 09:36:58] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 09:38:15] info: Transpiling TypeScript to Lua... +[2021-01-19 09:38:38] info: Building "askellon-sector.w3x"... +[2021-01-19 09:38:39] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 09:39:55] info: Transpiling TypeScript to Lua... +[2021-01-19 09:40:17] info: Building "askellon-sector.w3x"... +[2021-01-19 09:40:18] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 09:41:15] info: Transpiling TypeScript to Lua... +[2021-01-19 09:41:36] info: Building "askellon-sector.w3x"... +[2021-01-19 09:41:37] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 09:43:02] info: Transpiling TypeScript to Lua... +[2021-01-19 09:43:24] info: Building "askellon-sector.w3x"... +[2021-01-19 09:43:25] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 09:43:51] info: Transpiling TypeScript to Lua... +[2021-01-19 09:44:13] info: Building "askellon-sector.w3x"... +[2021-01-19 09:44:16] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 09:45:53] info: Transpiling TypeScript to Lua... +[2021-01-19 09:46:16] info: Building "askellon-sector.w3x"... +[2021-01-19 09:46:16] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 09:46:39] info: Transpiling TypeScript to Lua... +[2021-01-19 09:47:01] info: Building "askellon-sector.w3x"... +[2021-01-19 09:47:02] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 09:49:19] info: Transpiling TypeScript to Lua... +[2021-01-19 09:49:40] info: Building "askellon-sector.w3x"... +[2021-01-19 09:49:41] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 09:59:35] info: Transpiling TypeScript to Lua... +[2021-01-19 09:59:58] info: Building "askellon-sector.w3x"... +[2021-01-19 09:59:58] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 10:04:28] info: Transpiling TypeScript to Lua... +[2021-01-19 10:04:51] info: Building "askellon-sector.w3x"... +[2021-01-19 10:04:51] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 10:05:55] info: Transpiling TypeScript to Lua... +[2021-01-19 10:06:17] info: Building "askellon-sector.w3x"... +[2021-01-19 10:06:18] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 10:06:46] info: Transpiling TypeScript to Lua... +[2021-01-19 10:07:08] info: Building "askellon-sector.w3x"... +[2021-01-19 10:07:08] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 10:07:42] info: Transpiling TypeScript to Lua... +[2021-01-19 10:08:04] info: Building "askellon-sector.w3x"... +[2021-01-19 10:08:04] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 10:08:26] info: Transpiling TypeScript to Lua... +[2021-01-19 10:08:48] info: Building "askellon-sector.w3x"... +[2021-01-19 10:08:49] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 10:09:07] info: Transpiling TypeScript to Lua... +[2021-01-19 10:09:30] info: Building "askellon-sector.w3x"... +[2021-01-19 10:09:31] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 10:10:46] info: Transpiling TypeScript to Lua... +[2021-01-19 10:11:08] info: Building "askellon-sector.w3x"... +[2021-01-19 10:11:08] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 10:12:44] info: Transpiling TypeScript to Lua... +[2021-01-19 10:13:06] info: Building "askellon-sector.w3x"... +[2021-01-19 10:13:06] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 10:13:53] info: Transpiling TypeScript to Lua... +[2021-01-19 10:14:16] info: Building "askellon-sector.w3x"... +[2021-01-19 10:14:16] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 10:14:40] info: Transpiling TypeScript to Lua... +[2021-01-19 10:15:03] info: Building "askellon-sector.w3x"... +[2021-01-19 10:15:04] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 10:16:19] info: Transpiling TypeScript to Lua... +[2021-01-19 10:16:42] info: Building "askellon-sector.w3x"... +[2021-01-19 10:16:43] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 10:18:52] info: Transpiling TypeScript to Lua... +[2021-01-19 10:19:13] info: Building "askellon-sector.w3x"... +[2021-01-19 10:19:14] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 10:21:26] info: Transpiling TypeScript to Lua... +[2021-01-19 10:21:48] info: Building "askellon-sector.w3x"... +[2021-01-19 10:21:48] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 11:27:25] info: Transpiling TypeScript to Lua... +[2021-01-19 11:27:50] info: Building "askellon-sector.w3x"... +[2021-01-19 11:27:50] info: Creating w3x archive... +[2021-01-19 11:30:00] info: Transpiling TypeScript to Lua... +[2021-01-19 11:30:21] info: Building "askellon-sector.w3x"... +[2021-01-19 11:30:22] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 11:32:57] info: Transpiling TypeScript to Lua... +[2021-01-19 11:33:20] info: Building "askellon-sector.w3x"... +[2021-01-19 11:33:21] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 11:38:57] info: Transpiling TypeScript to Lua... +[2021-01-19 11:39:19] info: Building "askellon-sector.w3x"... +[2021-01-19 11:39:20] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 11:44:37] info: Transpiling TypeScript to Lua... +[2021-01-19 11:44:59] info: Building "askellon-sector.w3x"... +[2021-01-19 11:45:00] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 12:09:40] info: Transpiling TypeScript to Lua... +[2021-01-19 12:10:03] info: Building "askellon-sector.w3x"... +[2021-01-19 12:10:03] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 12:11:38] info: Transpiling TypeScript to Lua... +[2021-01-19 12:11:59] info: Building "askellon-sector.w3x"... +[2021-01-19 12:12:00] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 12:14:35] info: Transpiling TypeScript to Lua... +[2021-01-19 12:14:56] info: Building "askellon-sector.w3x"... +[2021-01-19 12:14:57] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 12:16:50] info: Transpiling TypeScript to Lua... +[2021-01-19 12:17:12] info: Building "askellon-sector.w3x"... +[2021-01-19 12:17:13] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 12:17:56] info: Transpiling TypeScript to Lua... +[2021-01-19 12:18:18] info: Building "askellon-sector.w3x"... +[2021-01-19 12:18:19] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 12:20:49] info: Transpiling TypeScript to Lua... +[2021-01-19 12:21:11] info: Building "askellon-sector.w3x"... +[2021-01-19 12:21:12] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 12:22:31] info: Transpiling TypeScript to Lua... +[2021-01-19 12:22:54] info: Building "askellon-sector.w3x"... +[2021-01-19 12:22:55] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 12:33:05] info: Transpiling TypeScript to Lua... +[2021-01-19 12:33:27] info: Building "askellon-sector.w3x"... +[2021-01-19 12:33:28] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 12:41:14] info: Transpiling TypeScript to Lua... +[2021-01-19 12:41:36] info: Building "askellon-sector.w3x"... +[2021-01-19 12:41:37] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 12:44:57] info: Transpiling TypeScript to Lua... +[2021-01-19 12:45:19] info: Building "askellon-sector.w3x"... +[2021-01-19 12:45:20] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 12:46:48] info: Transpiling TypeScript to Lua... +[2021-01-19 12:47:10] info: Building "askellon-sector.w3x"... +[2021-01-19 12:47:11] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 12:48:27] info: Transpiling TypeScript to Lua... +[2021-01-19 12:48:49] info: Building "askellon-sector.w3x"... +[2021-01-19 12:48:50] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 12:50:22] info: Transpiling TypeScript to Lua... +[2021-01-19 12:50:44] info: Building "askellon-sector.w3x"... +[2021-01-19 12:50:45] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 13:00:21] info: Transpiling TypeScript to Lua... +[2021-01-19 13:00:43] info: Building "askellon-sector.w3x"... +[2021-01-19 13:00:44] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-19 13:02:38] info: Transpiling TypeScript to Lua... +[2021-01-19 13:03:01] info: Building "askellon-sector.w3x"... +[2021-01-19 13:03:02] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-20 00:23:54] info: Transpiling TypeScript to Lua... +[2021-01-20 00:24:31] info: Building "askellon-sector.w3x"... +[2021-01-20 00:24:53] info: Creating w3x archive... +[2021-01-20 00:50:45] info: Transpiling TypeScript to Lua... +[2021-01-20 00:51:07] info: Building "askellon-sector.w3x"... +[2021-01-20 00:51:08] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-20 00:53:13] info: Transpiling TypeScript to Lua... +[2021-01-20 00:53:35] info: Building "askellon-sector.w3x"... +[2021-01-20 00:53:36] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-20 01:01:41] info: Transpiling TypeScript to Lua... +[2021-01-20 01:02:04] info: Building "askellon-sector.w3x"... +[2021-01-20 01:02:04] info: Creating w3x archive... +[2021-01-20 01:15:55] info: Transpiling TypeScript to Lua... +[2021-01-20 01:16:17] info: Building "askellon-sector.w3x"... +[2021-01-20 01:16:18] info: Launching map "E:/codename-askellon/dist/askellon-sector.w3x"... +[2021-01-20 01:19:11] info: Transpiling TypeScript to Lua... +[2021-01-20 01:19:33] info: Building "askellon-sector.w3x"... +[2021-01-20 01:19:34] info: Creating w3x archive... +[2021-01-20 01:23:09] info: Transpiling TypeScript to Lua... +[2021-01-20 01:23:31] info: Building "askellon-sector.w3x"... +[2021-01-20 01:23:32] info: Creating w3x archive... +[2021-01-20 01:25:09] info: Transpiling TypeScript to Lua... +[2021-01-20 01:25:32] info: Building "askellon-sector.w3x"... +[2021-01-20 01:25:44] info: Creating w3x archive... diff --git a/src/app/abilities/ability-hooks.ts b/src/app/abilities/ability-hooks.ts index 5c7a1a34..d3dc15e5 100644 --- a/src/app/abilities/ability-hooks.ts +++ b/src/app/abilities/ability-hooks.ts @@ -56,7 +56,8 @@ import { ABIL_EGG_HATCH_NEUTRAL, ABIL_ALIEN_CREATE_TUMOR, ABIL_CULTIST_CEREMONIAL_DAGGER, - ABIL_CULTIST_GIFT_MADNESS + ABIL_CULTIST_GIFT_MADNESS, + ABIL_ITEM_DRUG_COMEBACK } from "resources/ability-ids"; import { AT_ABILITY_DRAGONFIRE_BLAST, SNIPER_ABILITY_ID } from "app/weapons/weapon-constants"; import { DragonFireBlastAbility } from "./human/dragonfire-blast"; @@ -109,6 +110,7 @@ import { MinionEggHatchAbility } from "./alien/minions/minion-egg-hatch"; import { SpawnTumorAbility } from "./alien/minions/create-tumor"; import { CeremonialDaggerItemAbility } from "./items/ceremonial-dagger"; import { GiftOfMadnessAbility } from "./cult/gift-of-madness"; +import { ComebackDrugAbility } from "./items/comeback-drug"; @@ -219,3 +221,4 @@ AbilityHooks.Add(ABIL_EGG_HATCH_NEUTRAL, () => new MinionEggHatchAbility()); AbilityHooks.Add(ABIL_ALIEN_CREATE_TUMOR, () => new SpawnTumorAbility()); AbilityHooks.Add(ABIL_CULTIST_GIFT_MADNESS, () => new GiftOfMadnessAbility()); AbilityHooks.Add(ABIL_CULTIST_CEREMONIAL_DAGGER, () => new CeremonialDaggerItemAbility()); +AbilityHooks.Add(ABIL_ITEM_DRUG_COMEBACK, () => new ComebackDrugAbility()); diff --git a/src/app/abilities/human/instant-heal.ts b/src/app/abilities/human/instant-heal.ts index 8ce5c44b..386930ef 100644 --- a/src/app/abilities/human/instant-heal.ts +++ b/src/app/abilities/human/instant-heal.ts @@ -12,7 +12,7 @@ export class InstantHealAbility implements Ability { private timeElapsed = 0; private healOver = 0.6; - private healPercent = 0.4; + private healPercent = 0.33; private sfx: effect; diff --git a/src/app/abilities/items/comeback-drug.ts b/src/app/abilities/items/comeback-drug.ts new file mode 100644 index 00000000..0f8d58e4 --- /dev/null +++ b/src/app/abilities/items/comeback-drug.ts @@ -0,0 +1,33 @@ +import { Ability } from "../ability-type"; +import { Unit } from "w3ts/handles/unit"; +import { BUFF_ID } from "resources/buff-ids"; +import { BuffInstanceDuration } from "app/buff/buff-instance-duration-type"; +import { DynamicBuffEntity } from "app/buff/dynamic-buff-entity"; + +export const COMEBACK_DURATION = 30; + +export class ComebackDrugAbility implements Ability { + + private unit: Unit | undefined; + + constructor() {} + + public initialise() { + this.unit = Unit.fromHandle(GetTriggerUnit()); + + DynamicBuffEntity.getInstance().addBuff( + BUFF_ID.DRUG_COMEBACK, + this.unit, + new BuffInstanceDuration(this.unit, COMEBACK_DURATION) + ); + return true; + }; + + public process(delta: number) { + return false; + }; + + public destroy() { + return true; + }; +} \ No newline at end of file diff --git a/src/app/abilities/station/vent-purge.ts b/src/app/abilities/station/vent-purge.ts index f04e3a01..0a7ee274 100644 --- a/src/app/abilities/station/vent-purge.ts +++ b/src/app/abilities/station/vent-purge.ts @@ -15,7 +15,7 @@ export class VentPurgeAbility implements Ability { private warmupTime = 10; - private purgeMaxDuration = 90; + private purgeMaxDuration = 120; constructor() {} diff --git a/src/app/buff/buffs/drug-comeback.ts b/src/app/buff/buffs/drug-comeback.ts new file mode 100644 index 00000000..f3a1d21a --- /dev/null +++ b/src/app/buff/buffs/drug-comeback.ts @@ -0,0 +1,87 @@ +import { getZFromXY, showOverheadText } from "lib/utils"; +import { ABIL_LIFE_REGEN_BONUS_25, ABIL_MOVESPEED_BONUS_30, FIRE_ARMOR_REDUCTION } from "resources/ability-ids"; +import { BUFF_ID } from "resources/buff-ids"; +import { SFX_FIRE, SFX_HEAL } from "resources/sfx-paths"; +import { Unit } from "w3ts/index"; +import { DynamicBuff } from "../dynamic-buff-type"; + + +/** + * Resolve is a buff applied to a unit + * Can be applied multiple times and from multiple sources + */ +export class ComebackDrugBuff extends DynamicBuff { + id = BUFF_ID.DRUG_COMEBACK; + + private static healthRegeneratedFromDrug: WeakMap; + private static currentHealthRegeneratedFromDrug: WeakMap; + + + constructor() { + super(); + + if (!ComebackDrugBuff.healthRegeneratedFromDrug) { + ComebackDrugBuff.healthRegeneratedFromDrug = new WeakMap(); + ComebackDrugBuff.currentHealthRegeneratedFromDrug = new WeakMap(); + } + + } + protected doesStack = false; + + private ticker = 0; + private sfx: effect; + + public process(gametime: number, delta: number): boolean { + const result = super.process(gametime, delta); + + if (!this.isActive) return result; + if (!this.who.isAlive()) return false; + if (!this.who.show) return false; + + this.ticker += delta; + + if (this.ticker > 2) { + this.ticker -= 2; + + const healing = Math.min(this.who.maxLife - this.who.life, 50); + this.who.life += healing; + ComebackDrugBuff.healthRegeneratedFromDrug.set(this.who, + (ComebackDrugBuff.healthRegeneratedFromDrug.get(this.who) || 0) + healing + ); + ComebackDrugBuff.currentHealthRegeneratedFromDrug.set(this.who, + (ComebackDrugBuff.currentHealthRegeneratedFromDrug.get(this.who) || 0) + healing + ); + if (healing > 0) { + showOverheadText(this.who.x, this.who.y, 119, 221, 119, 200, `+${MathRound(healing)}`); + + this.sfx = AddSpecialEffect(SFX_HEAL, this.who.x, this.who.y); + BlzSetSpecialEffectZ(this.sfx, getZFromXY(this.who.x, this.who.y) + 20); + DestroyEffect(this.sfx); + } + } + if (this.sfx) { + BlzSetSpecialEffectX(this.sfx, this.who.x); + BlzSetSpecialEffectY(this.sfx, this.who.y); + } + return result; + } + + public onStatusChange(newStatus: boolean) { + if (newStatus) { + this.who.addAbility(ABIL_MOVESPEED_BONUS_30); + const bonusMaxHp = 200 + MathRound((ComebackDrugBuff.healthRegeneratedFromDrug.get(this.who) || 0) / 10); + this.who.maxLife += bonusMaxHp; + this.who.life += bonusMaxHp; + // Reset current health regen + ComebackDrugBuff.currentHealthRegeneratedFromDrug.set(this.who, 0); + showOverheadText(this.who.x, this.who.y, 119, 221, 119, 200, `+${bonusMaxHp}`); + } + else { + this.who.removeAbility(ABIL_MOVESPEED_BONUS_30); + const bonusHealthLoss = MathRound((ComebackDrugBuff.currentHealthRegeneratedFromDrug.get(this.who) || 0) / 10); + const healthLoss = 200 + bonusHealthLoss; + this.who.maxLife -= healthLoss; + showOverheadText(this.who.x, this.who.y, 255, 105, 97, 200, `-${bonusHealthLoss} Max HP`); + } + } +} \ No newline at end of file diff --git a/src/app/buff/dynamic-buff-entity.ts b/src/app/buff/dynamic-buff-entity.ts index 34241efc..7f810616 100644 --- a/src/app/buff/dynamic-buff-entity.ts +++ b/src/app/buff/dynamic-buff-entity.ts @@ -18,6 +18,7 @@ import { VoidSickness } from "./buffs/void-sickness"; import { Madness } from "./buffs/madness"; import { EventEntity } from "app/events/event-entity"; import { EVENT_TYPE } from "app/events/event-enum"; +import { ComebackDrugBuff } from "./buffs/drug-comeback"; export class DynamicBuffEntity extends Entity { @@ -70,6 +71,7 @@ export class DynamicBuffEntity extends Entity { if (id === BUFF_ID.PURITY_SEAL) return new PuritySeal(); if (id === BUFF_ID.VOID_SICKNESS) return new VoidSickness(); if (id === BUFF_ID.MADNESS) return new Madness(who); + if (id === BUFF_ID.DRUG_COMEBACK) return new ComebackDrugBuff(); Log.Error("Creating new buff no instance for ID "+id); } diff --git a/src/app/chat/chat-entity.ts b/src/app/chat/chat-entity.ts index 7fe7b7cd..d4681f3d 100644 --- a/src/app/chat/chat-entity.ts +++ b/src/app/chat/chat-entity.ts @@ -30,6 +30,7 @@ import { PlayNewSoundOnUnit } from "lib/translators"; import { Quick } from "lib/Quick"; import { BUFF_ID } from "resources/buff-ids"; import { BuffInstanceDuration } from "app/buff/buff-instance-duration-type"; +import { SyncSaveLoad } from "lib/TreeLib/SaveLoad/SyncSaveLoad"; export class ChatEntity extends Entity { private static instance: ChatEntity; @@ -143,26 +144,24 @@ export class ChatEntity extends Entity { // this.game.galaxyModule.navigateToSector(dX, dY); // } // else - if (message.indexOf("-wa") === 0) { - EventEntity.send(EVENT_TYPE.WEAPON_MODE_CHANGE, { - source: crew.unit, - crewmember: crew, - data: { mode: WeaponEntityAttackType.ATTACK } - }); - } - else if (message.indexOf("-wc") === 0) { - EventEntity.send(EVENT_TYPE.WEAPON_MODE_CHANGE, { - source: crew.unit, - crewmember: crew, - data: { mode: WeaponEntityAttackType.CAST } - }); - } - else if (message.indexOf("-pmax") === 0) { + if (message.indexOf("-pmax") === 0) { AskellonEntity.addToPower(AskellonEntity.getMaxPower()); } else if (message.indexOf("-pmin") === 0) { AskellonEntity.addToPower(-AskellonEntity.getCurrentPower()); } + else if (message.indexOf("-save") === 0) { + const p = PlayerStateFactory.get(player).save(); + } + else if (message.indexOf("-load") === 0) { + const p = PlayerStateFactory.get(player).load(); + } + else if (message.indexOf("-plog") === 0) { + const p = PlayerStateFactory.get(MapPlayer.fromIndex(Number(message.split(" ")[1]))); + if (p) { + p.log(player); + } + } else if (message.indexOf("-god") === 0) { const idx = this.adminGodUsers.indexOf(player); if (idx >= 0) { @@ -431,6 +430,27 @@ export class ChatEntity extends Entity { } if (player.handle === GetLocalPlayer()) ClearTextMessages(); } + if (message.indexOf("-wa") === 0) { + EventEntity.send(EVENT_TYPE.WEAPON_MODE_CHANGE, { + source: crew.unit, + crewmember: crew, + data: { mode: WeaponEntityAttackType.ATTACK } + }); + } + else if (message.indexOf("-wc") === 0) { + EventEntity.send(EVENT_TYPE.WEAPON_MODE_CHANGE, { + source: crew.unit, + crewmember: crew, + data: { mode: WeaponEntityAttackType.CAST } + }); + } + else if (message.indexOf("-ws") === 0) { + EventEntity.send(EVENT_TYPE.WEAPON_MODE_CHANGE, { + source: crew.unit, + crewmember: crew, + data: { mode: WeaponEntityAttackType.SMART } + }); + } else if (message === "-h" || message === "-handles" || message === "-p" || message === "-players") { const pIsAlien = PlayerStateFactory.get(player).getForce().is(ALIEN_FORCE_NAME); const isObserver = PlayerStateFactory.get(player).getForce().is(OBSERVER_FORCE_NAME); diff --git a/src/app/crewmember/crewmember-factory.ts b/src/app/crewmember/crewmember-factory.ts index 4c9afd60..108bf3de 100644 --- a/src/app/crewmember/crewmember-factory.ts +++ b/src/app/crewmember/crewmember-factory.ts @@ -1,13 +1,13 @@ import { Crewmember } from "./crewmember-type"; import { ROLE_NAMES, ROLE_TYPES, ROLE_SPAWN_LOCATIONS } from "../../resources/crewmember-names"; import { Game } from "../game"; -import { Trigger, MapPlayer, Unit, Timer } from "w3ts"; +import { Trigger, MapPlayer, Unit, Timer, playerColors } from "w3ts"; import { BURST_RIFLE_ITEM_ID, SHOTGUN_ITEM_ID, ITEM_ID_EMO_INHIB, ITEM_ID_REPAIR, ITEM_ID_NANOMED } from "../weapons/weapon-constants"; import { ZONE_TYPE } from "../world/zone-id"; import { ForceType } from "app/force/forces/force-type"; import { TECH_WEP_DAMAGE, ABIL_INQUIS_PURITY_SEAL, TECH_MAJOR_RELIGION, ABIL_INQUIS_SMITE, ABIL_ITEM_EMOTIONAL_DAMP } from "resources/ability-ids"; import { CREWMEMBER_UNIT_ID } from "resources/unit-ids"; -import { ITEM_CAPTAINS_CIGAR, ITEM_GENETIC_SAMPLER, ITEM_SIGNAL_BOOSTER } from "resources/item-ids"; +import { ITEM_CAPTAINS_CIGAR, ITEM_COMEBACK_DRUG, ITEM_GENETIC_SAMPLER, ITEM_SIGNAL_BOOSTER } from "resources/item-ids"; import { AlienForce } from "app/force/forces/alien-force"; import { ForceEntity } from "app/force/force-entity"; import { EventEntity } from "app/events/event-entity"; @@ -25,6 +25,9 @@ import { Players } from "w3ts/globals/index"; import { Log } from "lib/serilog/serilog"; import { ChatEntity } from "app/chat/chat-entity"; import { PRIVS } from "app/chat/chat-privs-enum"; +import { Timers } from "app/timer-type"; +import { MessagePlayer } from "lib/utils"; +import { COL_GOOD } from "resources/colours"; const crwSkins = [FourCC('Crw0'), FourCC('Crw1')]; @@ -222,6 +225,11 @@ export class CrewFactory { source: crewmember.unit, data: { item } }); + + const drugs = CreateItem(ITEM_COMEBACK_DRUG, 0, 0); + SetItemCharges(drugs, 3); + UnitAddItem(crewmember.unit.handle, drugs); + } // Doctor begins with extra will and vigor else if (crewmember.role === ROLE_TYPES.DOCTOR) { @@ -283,6 +291,15 @@ export class CrewFactory { PanCameraToTimedForPlayer(nUnit.owner.handle, nUnit.x, nUnit.y, 0); this.allCrew.push(crewmember); + // Increment player "games" + Timers.addTimedAction(30, () => { + pData.log(); + // Increment games played + pData.gamesPlayed += 1; + pData.gamesLeft += 1; + pData.save(); + }); + return crewmember; } catch(e) { diff --git a/src/app/force/force-entity.ts b/src/app/force/force-entity.ts index 418080a1..9a12556a 100644 --- a/src/app/force/force-entity.ts +++ b/src/app/force/force-entity.ts @@ -111,6 +111,25 @@ export class ForceEntity extends Entity { GetEventDamageSource(), BlzGetEventDamageTarget() )); + + /** + * Now try to load in all the players + */ + players.forEach(p => { + const pData = PlayerStateFactory.get(p); + if (pData) { + pData.load(() => { + const crew = pData.getCrewmember(); + if (crew) { + EventEntity.send(EVENT_TYPE.WEAPON_MODE_CHANGE, { + source: undefined, + crewmember: crew, + data: { mode: pData.getAttackType() } + }); + } + }); + } + }); } public onForceTakeOrDealDamage(damagingUnit: unit, damagedUnit: unit) { @@ -380,8 +399,21 @@ export class ForceEntity extends Entity { else { losingSound.playSound(); } + Players.forEach(p => { + const pData = PlayerStateFactory.get(p); + if (pData && pData.getForce() && !pData.getForce().is(OBSERVER_FORCE_NAME)) { + pData.gamesLeft -= 1; + } + if (winningPlayers.indexOf(p) >= 0) { + pData.playerGamesWon += 1; + } + else { + pData.playerGamesLost += 1; + } + pData.save(); + }); - Timers.addSlowTimedAction(3, () => { + Timers.addSlowTimedAction(5, () => { winningPlayers.forEach(winner => { CustomVictoryBJ(winner.handle, true, true); }); diff --git a/src/app/force/forces/crewmember-force.ts b/src/app/force/forces/crewmember-force.ts index c798020c..a2c23c54 100644 --- a/src/app/force/forces/crewmember-force.ts +++ b/src/app/force/forces/crewmember-force.ts @@ -1,6 +1,6 @@ import { Log } from "../../../lib/serilog/serilog"; import { ForceType } from "./force-type"; -import { ABIL_CREWMEMBER_INFO } from "resources/ability-ids"; +import { ABIL_CREWMEMBER_INFO, UPGR_REMOVED_VOCAL_CHORDS } from "resources/ability-ids"; import { Crewmember } from "app/crewmember/crewmember-type"; import { MapPlayer, Unit, W3TS_HOOK, playerColors } from "w3ts"; import { resolveTooltip } from "resources/ability-tooltips"; @@ -28,6 +28,7 @@ import { ITEM_HUMAN_CORPSE } from "resources/item-ids"; import { Vector2 } from "app/types/vector2"; import { COL_ATTATCH, COL_GOOD, COL_MISC } from "resources/colours"; import { BuffInstanceDuration } from "app/buff/buff-instance-duration-type"; +import { ChatHook } from "app/chat/chat-hook-type"; export class CrewmemberForce extends ForceType { @@ -229,4 +230,16 @@ export class CrewmemberForce extends ForceType { public onTakeDamage(who: MapPlayer, attacker: MapPlayer, damagedUnit: unit, damagingUnit: unit) { } + + + /** + * Gets a list of who can see the chat messages + * Unless overridden returns all the players + */ + public getChatRecipients(chatEvent: ChatHook) { + if (chatEvent.who.getTechCount(UPGR_REMOVED_VOCAL_CHORDS, true) > 0) { + return chatEvent.recipients = []; + } + return chatEvent.recipients; + } } \ No newline at end of file diff --git a/src/app/force/forces/force-type.ts b/src/app/force/forces/force-type.ts index e1cc6d18..56adec94 100644 --- a/src/app/force/forces/force-type.ts +++ b/src/app/force/forces/force-type.ts @@ -13,6 +13,7 @@ import { EventListener } from "app/events/event-type"; import { ChatEntity } from "app/chat/chat-entity"; import { MessageAllPlayers, MessagePlayer } from "lib/utils"; import { ROLE_DESCRIPTIONS } from "resources/crewmember-names"; +import { UPGR_REMOVED_VOCAL_CHORDS } from "resources/ability-ids"; export const GENERIC_CHAT_SOUND_REF = new SoundWithCooldown(3, 'Sounds\\RadioChatter.mp3', true); @@ -65,6 +66,22 @@ export abstract class ForceType { this.playerDeathTriggers.delete(player); this.playerUnits.delete(player); + try { + if (killer) { + const wasTeamkill = this.hasPlayer(killer.owner); + const killData = PlayerStateFactory.get(killer.owner); + if (killData) { + killData.playerTeamkills += wasTeamkill ? 1 : 0; + killData.playerEnemyKills += wasTeamkill ? 0 : 1; + killData.save(); + } + } + } + catch (e) { + Log.Error("Error when saving player kill / death score"); + Log.Error(e); + } + // Check victory conds EventEntity.getInstance().sendEvent(EVENT_TYPE.CHECK_VICTORY_CONDS); } @@ -110,6 +127,9 @@ export abstract class ForceType { * Unless overridden returns all the players */ public getChatRecipients(chatEvent: ChatHook) { + if (chatEvent.who.getTechCount(UPGR_REMOVED_VOCAL_CHORDS, true) > 0) { + return chatEvent.recipients = []; + } return chatEvent.recipients; } diff --git a/src/app/force/forces/observer-force.ts b/src/app/force/forces/observer-force.ts index 8f34364a..dd2b6992 100644 --- a/src/app/force/forces/observer-force.ts +++ b/src/app/force/forces/observer-force.ts @@ -50,6 +50,13 @@ export class ObserverForce extends ForceType { MessagePlayer(who, `${COL_ATTATCH}You're dead!|r There's no coming back from this, so feel free to observe the game or quit.`); if (who.isLocal()) this.playerDiesSound.playSound(); }); + + // Joining the observer force lets you quit without penalty + const pData = PlayerStateFactory.get(who); + if (pData) { + pData.gamesLeft -= 1; + pData.save(); + } } /** diff --git a/src/app/force/player-type.ts b/src/app/force/player-type.ts index ede559d9..c4ffaa9d 100644 --- a/src/app/force/player-type.ts +++ b/src/app/force/player-type.ts @@ -1,7 +1,13 @@ -import { MapPlayer, Unit } from "w3ts/index"; +import { MapPlayer, playerColors, Unit } from "w3ts/index"; import { ForceType } from "./forces/force-type"; import { Crewmember } from "app/crewmember/crewmember-type"; import { WeaponEntityAttackType } from "app/weapons/weapon-attack-type"; +import { Log } from "lib/serilog/serilog"; +import { SyncSaveLoad } from "lib/TreeLib/SaveLoad/SyncSaveLoad"; +import { Quick } from "lib/Quick"; +import { MessagePlayer } from "lib/utils"; +import { COL_GOOD } from "resources/colours"; +import { COLOUR_CULT } from "./forces/cultist/constants"; export class PlayerState { @@ -20,7 +26,17 @@ export class PlayerState { public levelBonusAgility = 0; public levelBonusIntelligence = 0; + /** + * Save-able state items + */ private attackType = WeaponEntityAttackType.CAST; + public gamesPlayed = 0; + public gamesLeft = 0; + public playerDeaths = 0; + public playerTeamkills = 0; + public playerEnemyKills = 0; + public playerGamesWon = 0; + public playerGamesLost = 0; constructor(player: MapPlayer) { this.player = player; @@ -70,6 +86,88 @@ export class PlayerState { * not always a crewmember */ getUnit() { - return this.force.getActiveUnitFor(this.player); + return this.force ? this.force.getActiveUnitFor(this.player) : undefined; + } + + /** + * Saves the player's data to a text file + */ + public save() { + const saveLoad = SyncSaveLoad.getInstance(); + if (this.player.isLocal()) { + saveLoad.writeFile(`Codename Askellon\\${this.originalName}\\save.txt`, + `Player:${this.originalName}\n`+ + `WeaponTypeState:${this.attackType}\n`+ + `GamesPlayed:${this.gamesPlayed}\n`+ + `GamesLeft:${this.gamesLeft}\n`+ + `PlayerDeaths:${this.playerDeaths}\n`+ + `PlayerTeamKills:${this.playerTeamkills}\n`+ + `PlayerEnemyKills:${this.playerEnemyKills}\n`+ + `PlayerGamesWon:${this.playerGamesWon}\n`+ + `PlayerGamesLost:${this.playerGamesLost}\n` + ); + } + } + + public load(cb?: () => void) { + const saveLoad = SyncSaveLoad.getInstance(); + saveLoad.read(`Codename Askellon\\${this.originalName}\\save.txt`, this.player.handle, promise => { + try { + const result = Quick.UnpackStringNewlines(promise.finalString); + result.forEach(r => { + const split = r.split(":"); + const identifier = split[0]; + const value = split[1]; + + switch(identifier) { + case "WeaponTypeState": + const t = Number(value); + this.setAttackType(t); + break; + case "GamesPlayed": + this.gamesPlayed = Number(value); + break; + case "GamesLeft": + this.gamesLeft = Number(value); + break; + case "PlayerDeaths": + this.playerDeaths = Number(value); + break; + case "PlayerTeamKills": + this.playerTeamkills = Number(value); + break; + case "PlayerEnemyKills": + this.playerEnemyKills = Number(value); + break; + case "PlayerGamesWon": + this.playerGamesWon = Number(value); + break; + case "PlayerGamesLost": + this.playerGamesLost = Number(value); + break; + case "Player": + if (this.originalName != value) { + Log.Warning(`${this.originalName} HAS AN ALTERED SAVE FILE`); + } + } + }); + } + catch(e) { + Log.Warning("Error when loading player "+this.originalName); + Log.Warning(e); + } + if (cb) cb(); + }); + } + + public log(toWho: MapPlayer = this.player) { + MessagePlayer(this.player, `:: Ship Records [${playerColors[this.player.id].code}${this.originalName}|r] ::`); + MessagePlayer(this.player, `${COL_GOOD}Games Played ::|r ${this.gamesPlayed}`); + MessagePlayer(this.player, `${COL_GOOD}Games Won ::|r ${this.playerGamesWon}`); + MessagePlayer(this.player, `${COL_GOOD}Enemy Kills ::|r ${this.playerTeamkills}`); + + MessagePlayer(this.player, `${COLOUR_CULT}Games Left ::|r ${this.gamesLeft}`); + MessagePlayer(this.player, `${COLOUR_CULT}Games Lost ::|r ${this.playerGamesLost}`); + MessagePlayer(this.player, `${COLOUR_CULT}Team Kills ::|r ${this.playerTeamkills}`); } } \ No newline at end of file diff --git a/src/app/game.ts b/src/app/game.ts index 9c563a85..f18f50f7 100644 --- a/src/app/game.ts +++ b/src/app/game.ts @@ -83,8 +83,6 @@ export class Game { SuspendTimeOfDay(true); - labrynthIntro.setVolume(80); - labrynthIntro.playSound(); CinematicFilterGenericBJ(5, BLEND_MODE_NONE, "ReplaceableTextures\\CameraMasks\\Black_mask.blp", 0, 0, 0, 0, 0, 0 ,0 ,0); DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS, 5, `Loading, please wait`); BlzHideOriginFrames(true); @@ -135,6 +133,9 @@ export class Game { const mainShip = SpaceEntity.getInstance().mainShip; mainShip.onMoveOrder(new Vector2(mainShip.unit.x + 1500, mainShip.unit.y + 1500)); + labrynthIntro.setVolume(80); + labrynthIntro.playSound(); + Timers.addTimedAction(5, () => { // Init chat ChatEntity.getInstance().initialise(); @@ -311,7 +312,7 @@ export class Game { Players.forEach(p => p.setState(PLAYER_STATE_RESOURCE_GOLD, 999999)); } - // UIEntity.start(); + UIEntity.start(); } catch (e) { Log.Error(e); diff --git a/src/app/shops/gene-entity.ts b/src/app/shops/gene-entity.ts index c0fe66cd..694b0e82 100644 --- a/src/app/shops/gene-entity.ts +++ b/src/app/shops/gene-entity.ts @@ -17,7 +17,10 @@ import { TECH_NO_GENES_TIER_1, ABIL_GENE_XENOPHOBIC, GENE_INSTALL_OSBORNE_GENE, ABIL_GENE_INSTANT_HEAL, - GENE_INFESTED_1 + GENE_INFESTED_1, + ABIL_GENE_REMOVE_VOCAL, + UPGR_REMOVED_VOCAL_CHORDS, + ABIL_REMOVED_VOCAL_CHORDS } from "resources/ability-ids"; import { TOOLTIP_EMBRACE_COSMOS } from "resources/ability-tooltips"; import { Trigger, Unit, Timer } from "w3ts"; @@ -98,7 +101,11 @@ export class GeneEntity extends Entity { const infestedGenes1 = ResearchFactory.getInstance().isUpgradeInfested(TECH_MAJOR_HEALTHCARE, 2); if (infestedGenes1) { geneUiUnit.addAbility( GENE_INFESTED_1 ); - } + } + const infestedGenes2 = ResearchFactory.getInstance().isUpgradeInfested(TECH_MAJOR_HEALTHCARE, 3); + if (infestedGenes2) { + geneUiUnit.addAbility( ABIL_GENE_REMOVE_VOCAL ); + } } const instance = { @@ -319,6 +326,12 @@ export class GeneEntity extends Entity { crewmember.setIntGain( crewmember.getIntGain() + 1.5 ); instance.unitInGeneZone.unit.addAbility(ABIL_GENE_INSTANT_HEAL); } + else if (castAbil === ABIL_GENE_REMOVE_VOCAL) { + crewmember.setStrGain( crewmember.getStrGain() - 1 ); + crewmember.setIntGain( crewmember.getIntGain() - 1 ); + instance.unitInGeneZone.unit.addAbility(ABIL_REMOVED_VOCAL_CHORDS); + crewmember.player.setTechResearched(UPGR_REMOVED_VOCAL_CHORDS, 1); + } // Now grant XP if installed by doc and medicare 2 was researched @@ -370,6 +383,7 @@ export class GeneEntity extends Entity { case GENE_INSTALL_COSMIC_SENSITIVITY: case GENE_INSTALL_OSBORNE_GENE: case GENE_INSTALL_XENOPHOBIC: + case ABIL_GENE_REMOVE_VOCAL: return 2; } } diff --git a/src/app/weapons/attachment/rail-rifle.ts b/src/app/weapons/attachment/rail-rifle.ts index 9d390071..faaf68be 100644 --- a/src/app/weapons/attachment/rail-rifle.ts +++ b/src/app/weapons/attachment/rail-rifle.ts @@ -1,7 +1,5 @@ -import { Gun } from "../guns/gun"; import { Attachment } from "./attachment"; -import { Log } from "../../../lib/serilog/serilog"; -import { BURST_RIFLE_ABILITY_ID, EMS_RIFLING_ABILITY_ID, SNIPER_ABILITY_ID, SHOTGUN_ABILITY_ID } from "../weapon-constants"; +import { BURST_RIFLE_ABILITY_ID, SNIPER_ABILITY_ID, SHOTGUN_ABILITY_ID } from "../weapon-constants"; import { Crewmember } from "app/crewmember/crewmember-type"; import { GunItem } from "../guns/gun-item"; import { ABIL_WEP_FLAMETHROWER } from "resources/ability-ids"; diff --git a/src/app/weapons/guns/gun-item.ts b/src/app/weapons/guns/gun-item.ts index f77f3ab2..07d412f0 100644 --- a/src/app/weapons/guns/gun-item.ts +++ b/src/app/weapons/guns/gun-item.ts @@ -28,7 +28,7 @@ export abstract class GunItem extends Gun { // Update the equip tooltip const newTooltip = this.getTooltip(caster); if (GetLocalPlayer() === owner.handle) { - BlzSetAbilityExtendedTooltip(this.getAbilityId(), newTooltip, 0); + BlzSetAbilityExtendedTooltip(this.getAbilityId(), newTooltip, caster.getAbilityLevel(this.getAbilityId()) -1); } // Also update our weapon stats @@ -44,11 +44,23 @@ export abstract class GunItem extends Gun { BlzStartUnitAbilityCooldown( this.equippedTo.unit.handle, this.getAbilityId(), - BlzGetAbilityCooldown(this.getAbilityId(), 0) + BlzGetAbilityCooldown(this.getAbilityId(), caster.unit.getAbilityLevel(this.getAbilityId())) ); // Need to update the tooltip this.updateTooltip(caster.unit); } + else if (weaponMode == WeaponEntityAttackType.SMART) { + caster.unit.addAbility(this.getAbilityId()); + BlzStartUnitAbilityCooldown( + this.equippedTo.unit.handle, + this.getAbilityId(), + BlzGetAbilityCooldown(this.getAbilityId(), caster.unit.getAbilityLevel(this.getAbilityId())) + ); + caster.unit.setAbilityLevel(this.getAbilityId(), 2); + // Need to update the tooltip + this.updateTooltip(caster.unit); + + } // If we are in attack mode let the user attack else { UnitRemoveAbility(this.equippedTo.unit.handle, FourCC('Abun')); diff --git a/src/app/weapons/weapon-attack-type.ts b/src/app/weapons/weapon-attack-type.ts index 3698df08..a6cca73e 100644 --- a/src/app/weapons/weapon-attack-type.ts +++ b/src/app/weapons/weapon-attack-type.ts @@ -1,3 +1,3 @@ export enum WeaponEntityAttackType { - CAST, ATTACK + CAST, ATTACK, SMART } \ No newline at end of file diff --git a/src/app/weapons/weapon-entity.ts b/src/app/weapons/weapon-entity.ts index 47ea5ab4..9845251b 100644 --- a/src/app/weapons/weapon-entity.ts +++ b/src/app/weapons/weapon-entity.ts @@ -32,6 +32,8 @@ import { WepNeokatana } from "./guns/neokatana"; import { MeteorCanisterAttachment } from "./attachment/meteor-canister"; import { UNIT_ID_EGG_AUTO_HATCH, UNIT_ID_EGG_AUTO_HATCH_LARGE } from "resources/unit-ids"; import { Flamethrower } from "./guns/flamethrower"; +import { Vector2 } from "app/types/vector2"; +import { InputManager } from "lib/TreeLib/InputManager/InputManager"; export class WeaponEntity extends Entity { private static instance: WeaponEntity; @@ -310,39 +312,60 @@ export class WeaponEntity extends Entity { weaponShootTrigger = new Trigger(); weaponAttackTrigger = new Trigger(); + // For smart casting + weaponFacingTrigger = new Trigger(); initaliseWeaponShooting() { - // if (this.WEAPON_MODE === 'CAST') { - this.weaponShootTrigger.registerAnyUnitEvent(EVENT_PLAYER_UNIT_SPELL_EFFECT); - this.weaponShootTrigger.addCondition(Condition(() => this.weaponAbilityIds.indexOf(GetSpellAbilityId()) >= 0)) - this.weaponShootTrigger.addAction(() => { - let unit = Unit.fromHandle(GetTriggerUnit()); - - let targetLoc = new Vector3( - GetSpellTargetX(), - GetSpellTargetY(), - 0 - ); + this.weaponFacingTrigger.registerAnyUnitEvent(EVENT_PLAYER_UNIT_SPELL_CAST); + this.weaponFacingTrigger.addCondition(() => { + if (this.weaponAbilityIds.indexOf(GetSpellAbilityId()) >= 0) { + const pData = PlayerStateFactory.get(MapPlayer.fromHandle(GetOwningPlayer(GetTriggerUnit()))); + return (pData && pData.getAttackType() === WeaponEntityAttackType.SMART); + } + return false; + }); + this.weaponFacingTrigger.addAction(() => { + const u = Unit.fromHandle(GetTriggerUnit()); + const a = new Vector2(u.x, u.y).angleTo(InputManager.getLastMouseCoordinate(u.owner.handle)); - targetLoc.z = getZFromXY(targetLoc.x, targetLoc.y); + u.facing = a; + }); + + this.weaponShootTrigger.registerAnyUnitEvent(EVENT_PLAYER_UNIT_SPELL_EFFECT); + this.weaponShootTrigger.addCondition(Condition(() => this.weaponAbilityIds.indexOf(GetSpellAbilityId()) >= 0)) + this.weaponShootTrigger.addAction(() => { + let unit = Unit.fromHandle(GetTriggerUnit()); + + const pData = PlayerStateFactory.get(unit.owner); + const isSmartCast = (pData && pData.getAttackType() === WeaponEntityAttackType.SMART); + + const targetLoc : Vector3 = new Vector3(0, 0, 0); + if (isSmartCast) { + const mLoc = InputManager.getLastMouseCoordinate(unit.owner.handle); + targetLoc.x = mLoc.x; + targetLoc.y = mLoc.y; + } + else { + targetLoc.x = GetSpellTargetX(); + targetLoc.y = GetSpellTargetY(); + } + + targetLoc.z = getZFromXY(targetLoc.x, targetLoc.y); - // Get unit weapon instance - const weapon = this.getGunForUnit(unit); - if (weapon) { - // If we are targeting a unit pass the event over to the force module - const targetedUnit = GetSpellTargetUnit(); - if (targetedUnit) { - ForceEntity.getInstance().aggressionBetweenTwoPlayers(unit.owner, Unit.fromHandle(targetedUnit).owner); - } - - weapon.onShoot( - unit, - targetLoc - ); + // Get unit weapon instance + const weapon = this.getGunForUnit(unit); + if (weapon) { + // If we are targeting a unit pass the event over to the force module + const targetedUnit = GetSpellTargetUnit(); + if (targetedUnit) { + ForceEntity.getInstance().aggressionBetweenTwoPlayers(unit.owner, Unit.fromHandle(targetedUnit).owner); } - }) - // } - // // Handle auto attack - // else { + + weapon.onShoot( + unit, + targetLoc + ); + } + }) // Handle start of the attack const attackTrigger = new Trigger(); @@ -369,16 +392,7 @@ export class WeaponEntity extends Entity { this.weaponAttackTrigger.addAction(() => { let unit = Unit.fromHandle(GetEventDamageSource()); let targetUnit = Unit.fromHandle(BlzGetEventDamageTarget()) - - const validAggression = ForceEntity.getInstance().aggressionBetweenTwoPlayers( - unit.owner, - targetUnit.owner - ); - - // Log.Information("Unit takes damage!"); if (!this.unitsWithWeapon.has(GetEventDamageSource())) return; - - // Log.Information("Have damaging unit in struct"); let targetLocation = new Vector3(targetUnit.x, targetUnit.y, targetUnit.z); diff --git a/src/app/world/zone-types/vent-zone.ts b/src/app/world/zone-types/vent-zone.ts index a0102dcf..353c501d 100644 --- a/src/app/world/zone-types/vent-zone.ts +++ b/src/app/world/zone-types/vent-zone.ts @@ -121,7 +121,7 @@ export class VentZone extends ZoneWithExits { this.gasTicker = 0; for (let index = 0; index < this.unitsInside.length; index++) { const unit = this.unitsInside[index]; - UnitDamageTarget(unit.handle, unit.handle, 5 + unit.maxLife*0.01, false, false, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_UNKNOWN, WEAPON_TYPE_WHOKNOWS); + UnitDamageTarget(unit.handle, unit.handle, 10 + unit.maxLife*0.02, false, false, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_UNKNOWN, WEAPON_TYPE_WHOKNOWS); const sfx = AddSpecialEffect(SFX_CARRION_SWARM_HIT, unit.x, unit.y); BlzSetSpecialEffectZ(sfx, getZFromXY(unit.x, unit.y) + 30); diff --git a/src/lib/Quick.ts b/src/lib/Quick.ts index 45067d04..1e219fb5 100644 --- a/src/lib/Quick.ts +++ b/src/lib/Quick.ts @@ -1,5 +1,3 @@ -import { Log } from "./serilog/serilog"; - //!!!!! KEEP 0 DEPENDENCIES export namespace Quick { @@ -9,7 +7,6 @@ export namespace Quick { const str = string.gmatch(val, "%S+"); for (const [x, y, z] of str) { - // Log.Information(`${x} ${y} ${z}`) result.push(x); } return result; @@ -93,4 +90,45 @@ export namespace Quick { return result.slice(0, n); } + + + export function Clamp(value: number, min: number, max: number) { + if (value > max) { + value = max; + } else if (value < min) { + value = min; + } + return value; + } + + + export function isBlank(s: string) { + return ("\n ".indexOf(s) >= 0); + } + + export function UnpackStringNewlines(value: string) { + let allLines: string[] = []; + let currentLine = ""; + let previousChar = ""; + let skipToRealChar = true; + for (let i = 0; i < value.length; i++) { + let currentChar = value.charAt(i); + if (isBlank(currentChar) && previousChar == "\n") { + skipToRealChar = true; + continue; + } + if (currentChar == "\n" && !skipToRealChar) { + allLines.push(currentLine); + currentLine = ""; + } else { + currentLine += currentChar; + skipToRealChar = false; + } + + previousChar = currentChar; + } + if (currentLine.length > 0) allLines.push(currentLine); + + return allLines; + } } \ No newline at end of file diff --git a/src/lib/TreeLib/SaveLoad/SyncSaveLoad.ts b/src/lib/TreeLib/SaveLoad/SyncSaveLoad.ts new file mode 100644 index 00000000..86dbd490 --- /dev/null +++ b/src/lib/TreeLib/SaveLoad/SyncSaveLoad.ts @@ -0,0 +1,122 @@ +import { Hooks } from "lib/Hooks"; +import { Log } from "lib/serilog/serilog"; +import { EncodingBase64 } from "../Utility/Encoding/EncodingBase64"; +import { EncodingHex } from "../Utility/Encoding/EncodingHex"; +import { StringBuilder } from "../Utility/StringBuilder"; + +export class SyncSaveLoad { + private static instance: SyncSaveLoad; + + public static getInstance() { + if (this.instance == null) { + this.instance = new SyncSaveLoad(); + Hooks.set(this.name, this.instance); + } + return this.instance; + } + + public syncPrefix = "S_TIO"; + public syncPrefixFinish = "S_TIOF"; + public syncEvent: trigger = CreateTrigger(); + private allPromises: (FilePromise | undefined)[] = []; + + constructor() { + for (let i = 0; i < GetBJMaxPlayers(); i++) { + BlzTriggerRegisterPlayerSyncEvent(this.syncEvent, Player(i), this.syncPrefix, false); + BlzTriggerRegisterPlayerSyncEvent(this.syncEvent, Player(i), this.syncPrefixFinish, false); + } + TriggerAddAction(this.syncEvent, () => this.onSync()); + } + + + public writeFile(filename: string, ...data: string[]) { + PreloadGenClear(); + PreloadGenStart(); + + let rawData = new StringBuilder(...data).toString(); + let toCompile = EncodingBase64.Encode(rawData); + let chunkSize = 180; + let assemble = ""; + let noOfChunks = math.ceil(toCompile.length / chunkSize); + + xpcall(() => { + for (let i = 0; i < toCompile.length; i++) { + assemble += toCompile.charAt(i); + if (assemble.length >= chunkSize) { + let header = EncodingHex.To32BitHexString(noOfChunks) + EncodingHex.To32BitHexString(math.ceil(i / chunkSize)); + Preload(`")\ncall BlzSendSyncData("${this.syncPrefix}","${header + assemble}")\ncall S2I("`); + assemble = ""; + } + } + if (assemble.length > 0) { + let header = EncodingHex.To32BitHexString(noOfChunks) + EncodingHex.To32BitHexString(noOfChunks); + Preload(`")\ncall BlzSendSyncData("${this.syncPrefix}","${header + assemble}")\ncall S2I("`); + //Final curtain call + } + }, Log.Error); + PreloadGenEnd(filename); + } + + public isPlayerAllowedToRead(reader: player) { + return (this.allPromises[GetPlayerId(reader)] == null); + } + + public read(filename: string, reader: player, onFinish?: (promise: FilePromise) => void): FilePromise { + if (this.allPromises[GetPlayerId(reader)] == null) { + this.allPromises[GetPlayerId(reader)] = new FilePromise(reader, onFinish); + if (GetLocalPlayer() == reader) { + PreloadStart(); + Preloader(filename); + PreloadEnd(1); + + BlzSendSyncData(this.syncPrefixFinish, ""); + } + } else { + Log.Warning("Trying to read file when file read is already busy."); + } + return this.allPromises[GetPlayerId(reader)]; + } + + private onSync() { + xpcall(() => { + + const readData = BlzGetTriggerSyncData(); + let totalChunkSize = EncodingHex.ToNumber(readData.substr(0, 8)); + let currentChunk = EncodingHex.ToNumber(readData.substr(8, 8)); + let theRest = readData.substr(16); + + // Logger.verbose("Loading ", currentChunk, " out of ", totalChunkSize); + + let promise = this.allPromises[GetPlayerId(GetTriggerPlayer())]; + if (promise) { + if (BlzGetTriggerSyncPrefix() == this.syncPrefix) { + promise.buffer[currentChunk - 1] = theRest; + } else if (BlzGetTriggerSyncPrefix() == this.syncPrefixFinish) { + promise.finish(); + this.allPromises[GetPlayerId(promise.syncOwner)] = undefined; + // Logger.generic("Promise killed: ", this.allPromises[GetPlayerId(promise.syncOwner)]); + } + } else { + Log.Warning(`Syncronised data in ${SyncSaveLoad.name} when there is no promise present for player: ${GetPlayerName(GetTriggerPlayer())}`); + } + }, Log.Error); + } +} + + +export class FilePromise { + constructor(public syncOwner: player, public onFinish?: (promise: FilePromise) => void) { + } + + public hasLoaded: boolean = false; + public buffer: string[] = []; + public finalString: string = ""; + + public finish() { + this.hasLoaded = true; + let loadString = new StringBuilder(...this.buffer).toString(); + this.finalString = EncodingBase64.Decode(loadString); + + if (this.onFinish != null) this.onFinish(this); + } +} \ No newline at end of file diff --git a/src/lib/TreeLib/Utility/Encoding/EncodingBase64.ts b/src/lib/TreeLib/Utility/Encoding/EncodingBase64.ts new file mode 100644 index 00000000..3de9fc9f --- /dev/null +++ b/src/lib/TreeLib/Utility/Encoding/EncodingBase64.ts @@ -0,0 +1,93 @@ +const PADCHAR = '='; +const ALPHA = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + +export class EncodingBase64 { + private static getbyte64(s: string, i: number) { + let idx = ALPHA.indexOf(s.charAt(i)); + if (idx === -1) { + throw "Cannot decode base64"; + } + return idx; + } + + public static Decode(s: string) { + let pads: number, i: number, b10: number; + let imax = s.length; + if (imax === 0) { + return s; + } + + if (imax % 4 !== 0) { + throw "Cannot decode base64"; + } + + pads = 0; + if (s.charAt(imax - 1) === PADCHAR) { + pads = 1; + if (s.charAt(imax - 2) === PADCHAR) { + pads = 2; + } + // either way, we want to ignore this last block + imax -= 4; + } + + let x: string[] = []; + for (i = 0; i < imax; i += 4) { + b10 = (this.getbyte64(s, i) << 18) | (this.getbyte64(s, i + 1) << 12) | + (this.getbyte64(s, i + 2) << 6) | this.getbyte64(s, i + 3); + x.push(string.char(b10 >>> 16, (b10 >>> 8) & 0xff, b10 & 0xff)); + } + + switch (pads) { + case 1: + b10 = (this.getbyte64(s, i) << 18) | (this.getbyte64(s, i + 1) << 12) | (this.getbyte64(s, i + 2) << 6); + x.push(string.char(b10 >>> 16, (b10 >>> 8) & 0xff)); + break; + case 2: + b10 = (this.getbyte64(s, i) << 18) | (this.getbyte64(s, i + 1) << 12); + x.push(string.char(b10 >>> 16)); + break; + } + return x.join(''); + } + + private static getbyte(s: string, i: number) { + let x = s.charCodeAt(i); + if (x > 255) { + throw "INVALID_CHARACTER_ERR: DOM Exception 5"; + } + return x; + } + + public static Encode(s: string) { + let b10: number; + let i: number; + let x: string[] = []; + + let imax = s.length - s.length % 3; + + if (s.length === 0) { + return s; + } + for (i = 0; i < imax; i += 3) { + b10 = (this.getbyte(s, i) << 16) | (this.getbyte(s, i + 1) << 8) | this.getbyte(s, i + 2); + x.push(ALPHA.charAt(b10 >>> 18)); + x.push(ALPHA.charAt((b10 >>> 12) & 0x3F)); + x.push(ALPHA.charAt((b10 >>> 6) & 0x3f)); + x.push(ALPHA.charAt(b10 & 0x3f)); + } + switch (s.length - imax) { + case 1: + b10 = this.getbyte(s, i) << 16; + x.push(ALPHA.charAt(b10 >>> 18) + ALPHA.charAt((b10 >>> 12) & 0x3F) + + PADCHAR + PADCHAR); + break; + case 2: + b10 = (this.getbyte(s, i) << 16) | (this.getbyte(s, i + 1) << 8); + x.push(ALPHA.charAt(b10 >>> 18) + ALPHA.charAt((b10 >>> 12) & 0x3F) + + ALPHA.charAt((b10 >>> 6) & 0x3f) + PADCHAR); + break; + } + return x.join(''); + } +} \ No newline at end of file diff --git a/src/lib/TreeLib/Utility/Encoding/EncodingHex.ts b/src/lib/TreeLib/Utility/Encoding/EncodingHex.ts new file mode 100644 index 00000000..3b335def --- /dev/null +++ b/src/lib/TreeLib/Utility/Encoding/EncodingHex.ts @@ -0,0 +1,9 @@ +export class EncodingHex { + public static To32BitHexString(num: number) { + return string.format('%08X', num); + } + + public static ToNumber(someHexString: string) { + return tonumber(someHexString, 16) || 0; + } +} \ No newline at end of file diff --git a/src/lib/TreeLib/Utility/StringBuilder.ts b/src/lib/TreeLib/Utility/StringBuilder.ts new file mode 100644 index 00000000..b48a0d7e --- /dev/null +++ b/src/lib/TreeLib/Utility/StringBuilder.ts @@ -0,0 +1,65 @@ + +export class StringBuilder { + public contentArray: string[] = []; + public newLine = "\n"; + + constructor(...initialD: any[]) { + this.append(...initialD); + } + + public append(...input: any[]): this { + for (let i = 0; i < input.length; i++) { + this.contentArray.push(tostring(input[i])); + } + return this; + } + + public appendColored(input: any, color: any): this { + this.contentArray.push(rgbToString(color, tostring(input))); + return this; + } + + public appendLine(...input: any[]): this { + for (let i = 0; i < input.length; i++) { + this.contentArray.push(tostring(input[i])); + this.contentArray.push(this.newLine); + } + return this; + } + + public appendColoredLine(input: any, color: any): this { + this.contentArray.push(rgbToString(color, tostring(input))); + this.contentArray.push(this.newLine); + return this; + } + + public removeLine(): this { + let value = this.contentArray.pop(); + let len = this.contentArray.length; + for (let i = 0; i <= len; i--) { + value = this.contentArray[i]; + if (value == this.newLine || value == null) { + break; + } else { + this.contentArray.pop(); + } + } + + return this; + } + + + public toString() { + return table.concat(this.contentArray); + } +} + +export function rgbToString(color: any, ...input: any[]) { + let ret = "|cFF" + string.format('%02x', color.red) + string.format('%02x', color.green) + string.format('%02x', color.blue); + for (let i = 0; i < input.length; i++) { + ret += tostring(input[i]); + ret += " "; + } + ret += "|r"; + return ret; +} \ No newline at end of file diff --git a/src/lib/utils.ts b/src/lib/utils.ts index 4dde8462..644bd5b8 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -1,11 +1,23 @@ import { Vector2 } from "app/types/vector2"; -import { Rectangle, Item, Trigger, MapPlayer, Unit } from "w3ts/index" +import { Rectangle, Item, Trigger, MapPlayer, Unit, TextTag } from "w3ts/index" import { Log } from "./serilog/serilog"; import { Players } from "w3ts/globals/index"; import { SFX_BLOOD_1, SFX_BLOOD_2, SFX_BLOOD_3, SFX_BLOOD_4, SFX_BLOOD_5, SFX_BLOOD_6, SFX_BLOOD_7, SFX_BLOOD_8, SFX_BLOOD_9, SFX_BLOOD_10, SFX_BLOOD_11, SFX_BLOOD_12, SFX_FIRE } from "resources/sfx-paths"; import { Timers } from "app/timer-type"; import { TILE_SIZE } from "resources/data-consts"; +export function showOverheadText(x: number, y: number, r: number, g: number, b: number, a: number, text: string) { + const t = new TextTag(); + t.setText(text, 10, true); + t.setPos(x, y, 90); + t.setColor(r, g, b, a); + t.setPermanent(false); + t.setLifespan(4.5); + t.setFadepoint(2.5); + t.setVelocity(0, 7.1 / 128 * Sin(3.14159 / 2)); + return t; +} + export function randomWithinCircle(radius: number, x: number, y: number) { const _x = GetRandomReal(-radius, radius); const angle = Math.acos(_x/radius); diff --git a/src/resources/ability-ids.ts b/src/resources/ability-ids.ts index fefd8f9c..c6e25817 100644 --- a/src/resources/ability-ids.ts +++ b/src/resources/ability-ids.ts @@ -103,6 +103,9 @@ export const GENE_INSTALL_NIGHTEYE = FourCC('A00I'); export const ABIL_GENE_NIGHTEYE = FourCC('ANEG'); export const ABIL_GENE_COSMIC = FourCC('ACSM'); export const ABIL_GENE_XENOPHOBIC = FourCC('A01L'); +export const ABIL_GENE_REMOVE_VOCAL = FourCC('A02T'); +export const UPGR_REMOVED_VOCAL_CHORDS = FourCC('R00N'); +export const ABIL_REMOVED_VOCAL_CHORDS = FourCC('A02U'); export const GENE_INSTALL_MOBILITY = FourCC('AGJP'); export const GENE_TECH_MOBILITY = FourCC('R001'); @@ -127,6 +130,7 @@ export const ABIL_ITEM_CRYO_GRENADE = FourCC('A00M'); export const ABIL_ITEM_HELLFIRE_GRENADE = FourCC('A01F'); export const ABIL_ITEM_GENETIC_SAMPLER = FourCC('A017'); export const ABIL_ITEM_GENETIC_SAMPLE_INFESTED = FourCC('A018'); +export const ABIL_ITEM_DRUG_COMEBACK = FourCC('A02V'); export const ABIL_DEFEND = FourCC('Adef'); @@ -186,4 +190,8 @@ export const ABIL_CULTIST_CEREMONIAL_DAGGER = FourCC('A02K'); export const ABIL_REPAIR_NEOKATANA = FourCC('A02N'); export const ABIL_EGG_HATCH_NEUTRAL = FourCC('A02O'); export const ABIL_ALIEN_CREATE_TUMOR = FourCC('A02P'); -export const ABIL_CULTIST_GIFT_MADNESS = FourCC('A02Q'); \ No newline at end of file +export const ABIL_CULTIST_GIFT_MADNESS = FourCC('A02Q'); + +export const ABIL_MOVESPEED_BONUS_30 = FourCC('A02Y'); +export const ABIL_LIFE_REGEN_BONUS_25 = FourCC('A02Y'); +export const ABIL_MAX_LIFE_BONUS_200 = FourCC('A02X'); \ No newline at end of file diff --git a/src/resources/ability-tooltips.ts b/src/resources/ability-tooltips.ts index 066561d9..5bd0cc04 100644 --- a/src/resources/ability-tooltips.ts +++ b/src/resources/ability-tooltips.ts @@ -62,7 +62,7 @@ export const resolveTooltip = new DynamicAbilityTooltip( ABIL_CREWMEMBER_INFO, undefined, (who: Crewmember, abilLevel: number, data: any) => `${COL_MISC}Repair the ship and get out of this sector... before it is too late.|r -Your are the ${COL_TEAL}Human ${who.role}|r: +You are the ${COL_TEAL}Human ${who.role}|r: ${ROLE_DESCRIPTIONS.get(who.role)} As Human: @@ -84,7 +84,7 @@ export const alienTooltipToAlien = new DynamicAbilityTooltip( undefined, (who: Crewmember, abilLevel: number, data: any) => `${COL_MISC}Wipe out human life and claim this ship as yours.|r -Your are the ${COL_ALIEN}Alien ${who.role}|r: +You are the ${COL_ALIEN}Alien ${who.role}|r: ${ROLE_DESCRIPTIONS.get(who.role)} Consume, Assimilate or Destroy all humans! @@ -106,7 +106,7 @@ export const alienTooltipToHuman = new DynamicAbilityTooltip( undefined, (who: Crewmember, abilLevel: number, data: any) => `${COL_MISC}Wipe out human life and claim this ship as yours.|r -Your are the ${COL_ALIEN}Alien ${who.role}|r: +You are the ${COL_ALIEN}Alien ${who.role}|r: ${ROLE_DESCRIPTIONS.get(who.role)} Consume, Assimilate or Destroy all humans! @@ -128,7 +128,7 @@ export const cultistTooltip = new DynamicAbilityTooltip( undefined, (who: Crewmember, abilLevel: number, data: any) => `${COL_MISC}You hear a voice singing from across the void, its hands searching for another. If only you could reach for it.|r -Your are the ${COLOUR_CULT}Cultist ${who.role}|r: +You are the ${COLOUR_CULT}Cultist ${who.role}|r: ${ROLE_DESCRIPTIONS.get(who.role)} The ${COLOUR_CULT}Carrion One|r must be reborn! diff --git a/src/resources/buff-ids.ts b/src/resources/buff-ids.ts index 3ffc859b..038b5433 100644 --- a/src/resources/buff-ids.ts +++ b/src/resources/buff-ids.ts @@ -1,6 +1,7 @@ export enum BUFF_ID { RESOLVE, DESPAIR, + DRUG_COMEBACK, FLASH_FREEZE, FIRE, TRIFEX, diff --git a/src/resources/crewmember-names.ts b/src/resources/crewmember-names.ts index ba0149af..feae30bc 100644 --- a/src/resources/crewmember-names.ts +++ b/src/resources/crewmember-names.ts @@ -67,7 +67,7 @@ ROLE_NAMES.set(ROLE_TYPES.XENOBIOLOGIST, [ export const ROLE_DESCRIPTIONS = new Map(); ROLE_DESCRIPTIONS.set(ROLE_TYPES.CAPTAIN, `${COL_GOOD}[+] Gain passive experience while on the Bridge -[+] Easy Access to the the ${COL_TEAL}Security Terminal|r${COL_GOOD} +[+] Easy Access to the ${COL_TEAL}Security Terminal|r${COL_GOOD} [+] Start the game with bonus attributes|r`); ROLE_DESCRIPTIONS.set(ROLE_TYPES.NAVIGATOR, `As ${COL_GOLD}Navigator|r you must scan deep space and lead your ${COL_GOLD}Captain|r through deep space.|nYou are also in charge of the Cargo Bay's ships.`); ROLE_DESCRIPTIONS.set(ROLE_TYPES.DOCTOR, `${COL_GOOD}- Use your ${COL_TEAL}Genetic Sampler|r${COL_GOOD} to get Samples diff --git a/src/resources/item-ids.ts b/src/resources/item-ids.ts index 210ba939..2e6fc148 100644 --- a/src/resources/item-ids.ts +++ b/src/resources/item-ids.ts @@ -20,4 +20,5 @@ export const ITEM_MINERAL_VALUABLE = FourCC('I00I'); export const ITEM_HUMAN_CORPSE = FourCC('I00N'); export const ITEM_CEREMONIAL_DAGGER = FourCC('I00O'); export const ITEM_BROKEN_NEOKATANA = FourCC('I00Q'); -export const ITEM_CAPTAINS_CIGAR = FourCC('I00R'); \ No newline at end of file +export const ITEM_CAPTAINS_CIGAR = FourCC('I00R'); +export const ITEM_COMEBACK_DRUG = FourCC('I00S'); \ No newline at end of file diff --git a/src/resources/ui/ui-entity.ts b/src/resources/ui/ui-entity.ts index 65b044e8..3566bb1d 100644 --- a/src/resources/ui/ui-entity.ts +++ b/src/resources/ui/ui-entity.ts @@ -5,6 +5,7 @@ import { UiWidget } from "./widgets/widget"; import { WIDGET_KEYS } from "./ui-keys"; import { Trigger, MapPlayer } from "w3ts/index"; import { Entity } from "app/entity-type"; +import { WeaponModeWidget } from "./widgets/change-weapon-mode"; export class UIEntity extends Entity { private static instance: UIEntity; @@ -28,19 +29,23 @@ export class UIEntity extends Entity { public init() { try { - // Remove all our UI - BlzHideOriginFrames(true); - BlzFrameSetAllPoints(BlzGetOriginFrame(ORIGIN_FRAME_WORLD_FRAME, 0), BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0)); - BlzFrameSetVisible(BlzGetFrameByName("ConsoleUIBackdrop",0), false); + // // Remove all our UI + // BlzHideOriginFrames(true); + // BlzFrameSetAllPoints(BlzGetOriginFrame(ORIGIN_FRAME_WORLD_FRAME, 0), BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0)); + // BlzFrameSetVisible(BlzGetFrameByName("ConsoleUIBackdrop",0), false); // Show them all, one by one // Enable the Portrait // BlzFrameSetVisible(this.originPortraitFrame, true); // BlzFrameSetSize(this.originPortraitFrame, 1, 0.1); - const healthbar = new Healthbar(); - this.widgetByKey.set(WIDGET_KEYS.UI_HEALTHBAR, healthbar); - this.widgets.push(healthbar); + // const healthbar = new Healthbar(); + // this.widgetByKey.set(WIDGET_KEYS.UI_HEALTHBAR, healthbar); + // this.widgets.push(healthbar); + + const weaponModes = new WeaponModeWidget(); + this.widgetByKey.set(WIDGET_KEYS.UI_WEAPON_MODE, weaponModes); + this.widgets.push(weaponModes); } catch (e) { Log.Error("Error setting up ui"); diff --git a/src/resources/ui/ui-keys.ts b/src/resources/ui/ui-keys.ts index f8cb3ad9..1b76f33d 100644 --- a/src/resources/ui/ui-keys.ts +++ b/src/resources/ui/ui-keys.ts @@ -1,3 +1,3 @@ export const enum WIDGET_KEYS { - UI_HEALTHBAR + UI_HEALTHBAR, UI_WEAPON_MODE } \ No newline at end of file diff --git a/src/resources/ui/widgets/change-weapon-mode.ts b/src/resources/ui/widgets/change-weapon-mode.ts new file mode 100644 index 00000000..1a65a543 --- /dev/null +++ b/src/resources/ui/widgets/change-weapon-mode.ts @@ -0,0 +1,138 @@ +import { UiWidget } from "./widget"; +import { Frame, MapPlayer, Trigger } from "w3ts/index"; +import { EventEntity } from "app/events/event-entity"; +import { EVENT_TYPE } from "app/events/event-enum"; +import { Log } from "lib/serilog/serilog"; +import { WeaponEntityAttackType } from "app/weapons/weapon-attack-type"; +import { COL_ATTATCH, COL_GOLD, COL_MISC } from "resources/colours"; +import { COLOUR_CULT_GREEN } from "app/force/forces/cultist/constants"; +import { PlayerState } from "app/force/player-type"; +import { PlayerStateFactory } from "app/force/player-state-entity"; + +export class WeaponModeWidget extends UiWidget { + + private buttonActivateTargeted: Frame; + private buttonActivateSmart: Frame; + private buttonActivateAuto: Frame; + + private frameEventTrigger = new Trigger(); + + private buttonHeight = 0.02; + private tooltipHeight = 0.055; + private tooltipWidth = 0.2; + + constructor() { + super(); + + this.buttonActivateAuto = this.makeWidget("Automatic", WeaponEntityAttackType.ATTACK, 0); + this.buttonActivateSmart = this.makeWidget("Smart", WeaponEntityAttackType.SMART, 1); + this.buttonActivateTargeted = this.makeWidget("Targeted", WeaponEntityAttackType.CAST, 2); + + this.frameEventTrigger.addAction(() => { + const frame = Frame.fromEvent(); + if (MapPlayer.fromEvent().isLocal()) { + frame.enabled = false; + frame.enabled = true; + } + + const pData = PlayerStateFactory.get(MapPlayer.fromEvent()); + + if (pData && pData.getCrewmember()) { + const crew = pData.getCrewmember(); + let mode: WeaponEntityAttackType; + if (frame == this.buttonActivateAuto) + mode = WeaponEntityAttackType.ATTACK; + else if (frame == this.buttonActivateSmart) + mode = WeaponEntityAttackType.SMART; + else if (frame == this.buttonActivateTargeted) + mode = WeaponEntityAttackType.CAST; + + EventEntity.send(EVENT_TYPE.WEAPON_MODE_CHANGE, { source: crew.unit, crewmember: crew, data: { mode: mode }}); + } + }); + + // Listen to our "on change" event + EventEntity.listen(EVENT_TYPE.WEAPON_MODE_CHANGE, (self, data) => { + const crew = data.crewmember; + const mode = data.data.mode; + + if (crew.player.isLocal()) { + this.buttonActivateAuto.getChild(1).visible = false; + this.buttonActivateTargeted.getChild(1).visible = false; + this.buttonActivateSmart.getChild(1).visible = false; + + if (mode === WeaponEntityAttackType.ATTACK) { + this.buttonActivateAuto.getChild(1).visible = true; + } + else if (mode === WeaponEntityAttackType.CAST) { + this.buttonActivateTargeted.getChild(1).visible = true; + } + else if (mode === WeaponEntityAttackType.SMART) { + this.buttonActivateSmart.getChild(1).visible = true; + } + + } + }); + } + + private makeWidget(text: string, t: WeaponEntityAttackType, index: number = 0) { + const buttonFrame = BlzCreateFrameByType("GLUEBUTTON", "FaceButton", BlzGetOriginFrame(ORIGIN_FRAME_GAME_UI, 0), "IconButtonTemplate", 0); + const buttonIconFrame = BlzCreateFrameByType("BACKDROP", "FaceButtonIcon", buttonFrame, "", 0); + + BlzFrameSetAllPoints(buttonIconFrame, buttonFrame); + if (t === WeaponEntityAttackType.ATTACK) + BlzFrameSetTexture(buttonIconFrame, "ReplaceableTextures\\CommandButtons\\BTNAttack", 0, true); + else if (t === WeaponEntityAttackType.CAST) + BlzFrameSetTexture(buttonIconFrame, "ReplaceableTextures\\CommandButtons\\BTNAttackGround", 0, true); + else if (t === WeaponEntityAttackType.SMART) + BlzFrameSetTexture(buttonIconFrame, "ReplaceableTextures\\CommandButtons\\BTNMove", 0, true); + + const frame = Frame.fromHandle(buttonFrame); + frame.setSize(this.buttonHeight, this.buttonHeight); + frame.setAbsPoint(FRAMEPOINT_CENTER, 0.605, this.getFrameY(index)); + // frame.text = text; + this.frameEventTrigger.triggerRegisterFrameEvent(frame, FRAMEEVENT_CONTROL_CLICK); + + // Add tooltips + const tooltip = Frame.fromHandle(BlzCreateFrame("BoxedText", buttonFrame, 0, 0)); + frame.setTooltip(tooltip); + tooltip.setAbsPoint(FRAMEPOINT_CENTER, 0.81 - this.tooltipWidth / 2, 0.2); + tooltip.setSize(this.tooltipWidth, this.tooltipHeight); + + tooltip.getChild(0).text = `${COL_GOLD}Gameplay Option|r`; + if (t === WeaponEntityAttackType.ATTACK) { + tooltip.getChild(1).text = `Enables ${COL_GOLD}Auto Attacking|r for weapons|n|n${COLOUR_CULT_GREEN}Only one mode can be active|r`; + } else if (t === WeaponEntityAttackType.CAST) { + tooltip.getChild(1).text = `Enables ${COL_GOLD}Target Cast|r for weapons|n|n${COLOUR_CULT_GREEN}Only one mode can be active|r`; + } else if (t === WeaponEntityAttackType.SMART) { + tooltip.getChild(1).text = `Enables ${COL_GOLD}Smart Cast|r for weapons|n|n${COLOUR_CULT_GREEN}Only one mode can be active|r`; + } + + // Sprite frames + const spriteFrame = BlzCreateFrameByType("SPRITE", "justAName", buttonFrame, "WarCraftIIILogo", 0); + BlzFrameSetPoint(spriteFrame, FRAMEPOINT_BOTTOMLEFT, buttonFrame, FRAMEPOINT_BOTTOMLEFT, 0.02, 0.02); + BlzFrameSetSize(spriteFrame, 1, 1); + BlzFrameSetScale(spriteFrame, 0.5); + BlzFrameSetModel(spriteFrame, "selecter1.mdx", 0); + BlzFrameSetVisible(spriteFrame, false); + + + const pData = PlayerStateFactory.get(MapPlayer.fromLocal()); + if (pData) { + BlzFrameSetVisible(spriteFrame, t === pData.getAttackType()); + } + return frame; + } + + private getFrameY(index: number) { + return 0.07 + 0.001*0.66*index + this.buttonHeight * index; + } + + update(forWho: MapPlayer) { + // const unitsSelected = EnumUnitsSelected(); + // const selectedUnit = GetPlayerSelec + + // BlzFrameSetValue(this.healthBar, GetUnitLifePercent(selectedUnit)); + // BlzFrameSetValue(this.manaBar, GetUnitManaPercent(selectedUnit)); + } +} \ No newline at end of file