Skip to content

Commit

Permalink
Merge branch 'release/v0.9.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
jlfarris91 committed Aug 28, 2023
2 parents 359752f + 1f31c4a commit c21ce3b
Show file tree
Hide file tree
Showing 77 changed files with 1,790 additions and 1,298 deletions.
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*.user
*.pdb
*.j.txt
*.idea

/_build/*
!/_build/blizzard.j
Expand All @@ -17,9 +18,9 @@ temp/
wurst.build
/*.w3x
wurst/ProjectConstants.wurst
wurst/Spawning/SpawnRegionInit.wurst
wurst/World/MapEventsInit.wurst
wurst/World/BasesInit.wurst
/wurst/Spawning/SpawnRegionInit.wurst
/wurst/World/MapEventsInit.wurst
/wurst/World/BasesInit.wurst
Workspace.code-workspace
wurst_run.args

Expand Down
2 changes: 1 addition & 1 deletion build/GitVersion.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
next-version: 0.1.16
mode: ContinuousDelivery
mode: ContinuousDeployment
branches: {}
ignore:
sha: []
Expand Down
38 changes: 38 additions & 0 deletions build/RunPipelineForMap.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
.\SetupBuildEnvironment.ps1

$env:SourceMapFileName = "TestMap.w3x"

$ExeFilePath = [System.IO.Path]::Combine($env:ToolsRoot, "W3xPipeline\W3xPipeline.exe")
$SourceMapDirPath = [System.IO.Path]::Combine($env:SourceMapsRoot, $env:SourceMapFileName)
$OutputWurstSourceMapFilePath = [System.IO.Path]::Combine($env:TempRoot, $env:SourceMapFileName)
$IntermediateDirPath = [System.IO.Path]::Combine($env:TempRoot, "maps")
$OutputSpawnRegionScriptFile = [System.IO.Path]::Combine($env:WurstRoot, "Spawning\SpawnRegionInit.wurst")

# This path points to a dump of the entire war3.mod file typically exported from an MPQ editor
$War3ModDumpPath = "D:\Projects\WarcraftIII\MPQ\Dump\war3.w3mod"

# When building locally (specifically on Jame's machine, for now) we can reference the
# dumped casc data directly
if (($env:IsLocalBuild -eq 1) -and (Test-Path $War3ModDumpPath))
{
$War3ArchiveDirPath = $War3ModDumpPath
$OutputListFilePath = [System.IO.Path]::Combine($env:BuildRoot, "listfile")
}
# On the build machine we want to use only the slimmest data we can to improve build times
# and save on space so we need to use our cached, checked-in version of the casc data
# This data is cached via BuildSlimArchive.ps1 and should be updated with each War3 patch release
else
{
$War3ArchiveDirPath = [System.IO.Path]::Combine($env:BuildRoot, "war3.wmod")
}

& $ExeFilePath --sourceMapDir "$SourceMapDirPath" --outputMapFile "$OutputWurstSourceMapFilePath" --intermediateDir "$IntermediateDirPath" --outputSpawnRegionScriptFile "$OutputSpawnRegionScriptFile" --w3modBasePath "$War3ArchiveDirPath" --outputListFilePath "$OutputListFilePath" --writeRegionsToArchive #--mergeWar3MapSkinFiles

if ($LASTEXITCODE -eq 0)
{
Write-Host "Pipeline finished successfully"
}
else
{
Write-Host "Pipeline failed with exit code $LASTEXITCODE"
}
2 changes: 1 addition & 1 deletion imports/war3mapMisc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ DefendDeflection=1

// Hero Attributes
// ================================================================================================
StrAttackBonus=5.0 // Hero Attributes - Attack Bonus Per Primary Att Point
StrAttackBonus=3.0 // Hero Attributes - Attack Bonus Per Primary Att Point
StrRegenBonus=0.05 // Hero Attributes - HP Regen Bonus per Strength Point
StrHitPointBonus=20.0 // Hero Attributes - Hit Point Bonus per Strength Point
AgiAttackSpeedBonus=0.02 // Hero Attributes - Attack Speed Bonus Per Agility Point
Expand Down
Binary file modified maps/TestMap.w3x/war3map.doo
Binary file not shown.
Binary file modified maps/TestMap.w3x/war3map.w3i
Binary file not shown.
Binary file modified maps/TestMap.w3x/war3mapMap.blp
Binary file not shown.
Binary file modified maps/TheLastStand.w3x/war3map.doo
Binary file not shown.
Binary file modified maps/TheLastStand.w3x/war3map.imp
Binary file not shown.
25 changes: 18 additions & 7 deletions maps/TheLastStand.w3x/war3map.j
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ function CreateBuildingsForPlayer10 takes nothing returns nothing
set u = BlzCreateUnitWithSkin( p, 'h010', -6144.0, -1216.0, 270.000, 'h010' )
set u = BlzCreateUnitWithSkin( p, 'h010', -5632.0, -1216.0, 270.000, 'h010' )
set u = BlzCreateUnitWithSkin( p, 'h010', -7168.0, -4608.0, 270.000, 'h010' )
set u = BlzCreateUnitWithSkin( p, 'h010', -7616.0, -5184.0, 270.000, 'h010' )
set u = BlzCreateUnitWithSkin( p, 'h00Z', -7328.0, -5088.0, 270.000, 'h00Z' )
set u = BlzCreateUnitWithSkin( p, 'h010', -7808.0, -5056.0, 270.000, 'h010' )
set u = BlzCreateUnitWithSkin( p, 'h00W', -7520.0, -5280.0, 270.000, 'h00W' )
set u = BlzCreateUnitWithSkin( p, 'h00X', -6944.0, -4768.0, 270.000, 'h00X' )
set u = BlzCreateUnitWithSkin( p, 'h00Y', -7904.0, -7456.0, 270.000, 'h00Y' )
set u = BlzCreateUnitWithSkin( p, 'h010', -8192.0, -7360.0, 270.000, 'h010' )
Expand All @@ -154,8 +154,8 @@ function CreateBuildingsForPlayer10 takes nothing returns nothing
set u = BlzCreateUnitWithSkin( p, 'h011', -6848.0, -10496.0, 270.000, 'h011' )
set u = BlzCreateUnitWithSkin( p, 'h011', -8128.0, -8256.0, 270.000, 'h011' )
set u = BlzCreateUnitWithSkin( p, 'h011', -8320.0, -8128.0, 270.000, 'h011' )
set u = BlzCreateUnitWithSkin( p, 'h011', -7424.0, -4224.0, 270.000, 'h011' )
set u = BlzCreateUnitWithSkin( p, 'h011', -7552.0, -4352.0, 270.000, 'h011' )
set u = BlzCreateUnitWithSkin( p, 'h00W', -5856.0, -2336.0, 270.000, 'h00W' )
set u = BlzCreateUnitWithSkin( p, 'h011', -7168.0, -5120.0, 270.000, 'h011' )
set u = BlzCreateUnitWithSkin( p, 'h011', -5440.0, -832.0, 270.000, 'h011' )
set u = BlzCreateUnitWithSkin( p, 'h011', -6336.0, -832.0, 270.000, 'h011' )
set u = BlzCreateUnitWithSkin( p, 'h011', -2112.0, -3008.0, 270.000, 'h011' )
Expand Down Expand Up @@ -358,6 +358,14 @@ function CreateBuildingsForPlayer10 takes nothing returns nothing
set u = BlzCreateUnitWithSkin( p, 'h011', -10496.0, -2688.0, 270.000, 'h011' )
set u = BlzCreateUnitWithSkin( p, 'h011', -10624.0, -2816.0, 270.000, 'h011' )
set u = BlzCreateUnitWithSkin( p, 'h011', 11328.0, 8000.0, 270.000, 'h011' )
set u = BlzCreateUnitWithSkin( p, 'h00W', -7328.0, -5280.0, 270.000, 'h00W' )
set u = BlzCreateUnitWithSkin( p, 'h00W', -5664.0, -2336.0, 270.000, 'h00W' )
set u = BlzCreateUnitWithSkin( p, 'h00X', -6496.0, -2784.0, 270.000, 'h00X' )
set u = BlzCreateUnitWithSkin( p, 'h00X', -6496.0, -2976.0, 270.000, 'h00X' )
set u = BlzCreateUnitWithSkin( p, 'h00X', -4704.0, -3360.0, 270.000, 'h00X' )
set u = BlzCreateUnitWithSkin( p, 'h010', -6336.0, -3328.0, 270.000, 'h010' )
set u = BlzCreateUnitWithSkin( p, 'h010', -6080.0, -2496.0, 270.000, 'h010' )
set u = BlzCreateUnitWithSkin( p, 'h010', -4928.0, -3392.0, 270.000, 'h010' )
endfunction

//===========================================================================
Expand Down Expand Up @@ -408,8 +416,8 @@ function CreateUnitsForPlayer10 takes nothing returns nothing
call SetUnitColor( u, ConvertPlayerColor(6) )
set u = BlzCreateUnitWithSkin( p, 'h00J', -10170.9, -3013.1, 42.970, 'h00J' )
call SetUnitColor( u, ConvertPlayerColor(4) )
set u = BlzCreateUnitWithSkin( p, 'h00H', -7573.4, -4828.6, 313.148, 'h00H' )
call SetUnitColor( u, ConvertPlayerColor(6) )
set u = BlzCreateUnitWithSkin( p, 'h00J', -7584.8, -4725.3, 313.050, 'h00J' )
call SetUnitColor( u, ConvertPlayerColor(4) )
set u = BlzCreateUnitWithSkin( p, 'h00K', -5772.4, -2985.9, 275.943, 'h00K' )
call SetUnitColor( u, ConvertPlayerColor(0) )
set u = BlzCreateUnitWithSkin( p, 'h00H', -5889.0, -898.1, 270.000, 'h00H' )
Expand Down Expand Up @@ -818,6 +826,9 @@ function CreateUnitsForPlayer20 takes nothing returns nothing
call SetUnitColor( u, ConvertPlayerColor(6) )
set u = BlzCreateUnitWithSkin( p, 'h00O', -10703.6, -8343.3, 276.867, 'h00O' )
call SetUnitColor( u, ConvertPlayerColor(6) )
set u = BlzCreateUnitWithSkin( p, 'h004', -7208.7, -2762.7, 126.367, 'h004' )
set u = BlzCreateUnitWithSkin( p, 'h007', -7520.2, -3081.6, 266.215, 'h007' )
set u = BlzCreateUnitWithSkin( p, 'h01K', -7612.8, -3071.4, 36.476, 'h01K' )
endfunction

//===========================================================================
Expand Down Expand Up @@ -883,7 +894,7 @@ function CreateNeutralPassive takes nothing returns nothing
set u = BlzCreateUnitWithSkin( p, 'h00L', 54.0, 7506.4, 223.703, 'h00L' )
set u = BlzCreateUnitWithSkin( p, 'h00L', 642.3, 7203.3, 347.646, 'h00L' )
set u = BlzCreateUnitWithSkin( p, 'h00L', 2543.2, 8839.5, 254.341, 'h00L' )
set u = BlzCreateUnitWithSkin( p, 'h00L', -7847.2, -5003.9, 4.197, 'h00L' )
set u = BlzCreateUnitWithSkin( p, 'h00L', -8552.8, -5394.5, 299.698, 'h00L' )
set u = BlzCreateUnitWithSkin( p, 'h00L', -9396.4, -6072.0, 95.525, 'h00L' )
set u = BlzCreateUnitWithSkin( p, 'h00L', -11188.4, -5658.3, 305.434, 'h00L' )
set u = BlzCreateUnitWithSkin( p, 'h00L', -8824.5, -8623.6, 237.396, 'h00L' )
Expand Down
Binary file modified maps/TheLastStand.w3x/war3map.w3e
Binary file not shown.
Binary file modified maps/TheLastStand.w3x/war3map.w3i
Binary file not shown.
Binary file modified maps/TheLastStand.w3x/war3map.wpm
Binary file not shown.
Binary file modified maps/TheLastStand.w3x/war3mapMap.blp
Binary file not shown.
Binary file modified maps/TheLastStand.w3x/war3mapUnits.doo
Binary file not shown.
7 changes: 3 additions & 4 deletions src/tools/W3xPipeline/BaseBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,6 @@ private string GenerateWurst(ICollection<BaseDefinition> bases)
const string indentStr2 = " ";

sb.AppendLine("// This file is generated. Any changes will be lost.");
sb.AppendLine($"// Last generated {DateTime.Now}");
sb.AppendLine($"package BasesInit");
sb.AppendLine($"import Bases");
sb.AppendLine();
Expand Down Expand Up @@ -323,7 +322,7 @@ private string GenerateWurst(ICollection<BaseDefinition> bases)
}

sb.AppendLine($"{indentStr}");
sb.AppendLine($"{indentStr}Bases.registerBase(\"{baseDef.Id}\", {baseDifficulty}, vec2({pos.X}, {pos.Y}), angle({rot}), \"{baseDef.DisplayName}\")");
sb.AppendLine($"{indentStr}Bases.registerBase(\"{baseDef.Id}\", {baseDifficulty}, vec2({pos.X:F}, {pos.Y:F}), angle({rot:F}), \"{baseDef.DisplayName}\")");

foreach (var unitPlacement in baseDef.UnitPlacements)
{
Expand All @@ -334,12 +333,12 @@ private string GenerateWurst(ICollection<BaseDefinition> bases)
suffix = $" // {entityName}";
}

sb.AppendLine($"{indentStr2}..registerUnitSpawner('{unitPlacement.Id}', vec2({unitPlacement.Position.X}, {unitPlacement.Position.Y}), angle({unitPlacement.RotationInRadians})) {suffix}");
sb.AppendLine($"{indentStr2}..registerUnitSpawner('{unitPlacement.Id}', vec2({unitPlacement.Position.X:F}, {unitPlacement.Position.Y:F}), angle({unitPlacement.RotationInRadians:F})) {suffix}");
}

foreach (var region in baseDef.Regions)
{
sb.AppendLine($"{indentStr2}..addRect({region.Bounds.Left}, {region.Bounds.Bottom}, {region.Bounds.Right}, {region.Bounds.Top})");
sb.AppendLine($"{indentStr2}..addRect({region.Bounds.Left:F}, {region.Bounds.Bottom:F}, {region.Bounds.Right:F}, {region.Bounds.Top:F})");
}
}

Expand Down
5 changes: 2 additions & 3 deletions src/tools/W3xPipeline/EventMapTemplateBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ private string GenerateWurst(ICollection<MapEventTemplate> mapEventTemplates)
const string indentStr2 = " ";

sb.AppendLine("// This file is generated. Any changes will be lost.");
sb.AppendLine($"// Last generated {DateTime.Now}");
sb.AppendLine($"package MapEventsInit");
sb.AppendLine($"import MapEvents");
sb.AppendLine();
Expand Down Expand Up @@ -156,7 +155,7 @@ private string GenerateWurst(ICollection<MapEventTemplate> mapEventTemplates)
suffix = $" // {entityName}";
}

sb.AppendLine($"{indentStr2}..registerUnitSpawner('{unitPlacement.Id}', vec2({localPos.X}, {localPos.Y}), angle({localYaw})) {suffix}");
sb.AppendLine($"{indentStr2}..registerUnitSpawner('{unitPlacement.Id}', vec2({localPos.X:F}, {localPos.Y:F}), angle({localYaw:F})) {suffix}");
}

foreach (var destPlacement in mapEventTemplate.DoodadPlacementFile.Placements.Destructables)
Expand All @@ -172,7 +171,7 @@ private string GenerateWurst(ICollection<MapEventTemplate> mapEventTemplates)
suffix = $" // {entityName}";
}

sb.AppendLine($"{indentStr2}..registerDestSpawner('{destPlacement.Id}', {destPlacement.Variation}, vec3({localPos.X}, {localPos.Y}, {localPos.Z}), angle({localYaw}), {localScale.X}){suffix}");
sb.AppendLine($"{indentStr2}..registerDestSpawner('{destPlacement.Id}', {destPlacement.Variation}, vec3({localPos.X:F}, {localPos.Y:F}, {localPos.Z:F}), angle({localYaw:F}), {localScale.X:F}){suffix}");
}

int centerTileX = (int)Math.Floor(mapEventTemplate.TerrainFile.Terrain.Width / 2.0f);
Expand Down
1 change: 1 addition & 0 deletions src/tools/W3xPipeline/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ private static int Main(string[] rawArgs)
args = ProgramArgs.Parse(rawArgs);

sLogger.Log("----- Program Args -----");
sLogger.Log($"Args: {string.Join(" ", rawArgs)}");
sLogger.Log($"Source Map directory: {args.SourceMapDirectory.FullName}");
sLogger.Log($"Output file path: {args.OutputMapFile.FullName}");
sLogger.Log($"Intermediate dir: {args.IntermediateDirectory.FullName}");
Expand Down
4 changes: 3 additions & 1 deletion src/tools/W3xPipeline/RegionMapper.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
namespace W3xPipeline
using System.Diagnostics;

namespace W3xPipeline
{
using System;
using System.Collections.Generic;
Expand Down
4 changes: 2 additions & 2 deletions src/tools/W3xPipeline/W3xPipeline.sln
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ Global
{49C419DC-1F3E-47DD-BA72-85716CF8AB8B}.Debug|x64.Build.0 = Debug|x64
{49C419DC-1F3E-47DD-BA72-85716CF8AB8B}.Release|Any CPU.ActiveCfg = Release|x64
{49C419DC-1F3E-47DD-BA72-85716CF8AB8B}.Release|Any CPU.Build.0 = Release|x64
{49C419DC-1F3E-47DD-BA72-85716CF8AB8B}.Release|x64.ActiveCfg = Release|x64
{49C419DC-1F3E-47DD-BA72-85716CF8AB8B}.Release|x64.Build.0 = Release|x64
{49C419DC-1F3E-47DD-BA72-85716CF8AB8B}.Release|x64.ActiveCfg = Release|Any CPU
{49C419DC-1F3E-47DD-BA72-85716CF8AB8B}.Release|x64.Build.0 = Release|Any CPU
{7A71176C-24AF-4F26-9B92-34258053B2FF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7A71176C-24AF-4F26-9B92-34258053B2FF}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7A71176C-24AF-4F26-9B92-34258053B2FF}.Debug|x64.ActiveCfg = Debug|Any CPU
Expand Down
Binary file modified tools/W3xPipeline/W3xPipeline.exe
Binary file not shown.
Binary file modified tools/W3xPipeline/War3.Net.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion wurst/Abilities/Captain/HeroAbility_Blink.wurst
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public class BlinkComponent extends HeroAbilityComponent
damageScale01.setBase(Blink.getDamagePercent01(abilityLevelAdjusted))

// ----------------------------------------------------------------------------
protected override function onCast(int _abilityId)
protected override function onEffect(int _abilityId)

let ownerUnit = getOwnerUnit()
let ownerPlayer = ownerUnit.getOwner()
Expand Down
Loading

0 comments on commit c21ce3b

Please sign in to comment.