Skip to content

Commit

Permalink
Bug fixed, features added, code rewritten.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ev3nt committed Jul 8, 2022
1 parent 489bc03 commit 7a0915a
Show file tree
Hide file tree
Showing 59 changed files with 1,978 additions and 7,587 deletions.
Binary file removed Maps/lua.w3m
Binary file not shown.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# War3 Lua - 1.1.5 (<span style="color:green">Ashenvale</span> - Experimental)
# War3 Lua - 1.1.6 (<span style="color:orange">Outland</span>)

[![build](https://github.com/Ev3nt/war3_lua/actions/workflows/build.yml/badge.svg)](https://github.com/Ev3nt/war3_lua/actions/workflows/build.yml)

War3 Lua is a modification that allows you to run lua scripts at the JASS level. Lua does not replace the original scripting system in the game, but only expands its capabilities.

Some natives doesn't work (thx jass for beautiful VM).

Lua version: **5.4.4**

![](https://github.com/Ev3nt/war3_lua/blob/master/war3_lua.png)

---
Expand All @@ -23,5 +25,5 @@ Some natives doesn't work (thx jass for beautiful VM).
### Recommended build parameters
* Configuration **Release**
* Windows platform **x86**
* Platform **10.0.19041.0**
* Platform **10.0.19041.**0****
* Build tools **Visual Studio 2015 (v140)**
45 changes: 7 additions & 38 deletions Scripts/blizzard.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9823,7 +9823,7 @@ function InitBlizzardGlobals()
end

bj_FORCE_ALL_PLAYERS = CreateForce()
ForceEnumPlayers(bj_FORCE_ALL_PLAYERS, 0)
ForceEnumPlayers(bj_FORCE_ALL_PLAYERS, nil)

-- Init Cinematic Mode history
bj_cineModePriorSpeed = GetGameSpeed()
Expand Down Expand Up @@ -9897,17 +9897,17 @@ function InitSummonableCaps()
-- upgraded units
-- Note: Only do this if the corresponding upgrade is not yet researched
-- Barrage - Siege Engines
if (not GetPlayerTechResearched(Player(index), 'Rhrt', true)) then
SetPlayerTechMaxAllowed(Player(index), 'hrtt', 0)
if (not GetPlayerTechResearched(Player(index), StringToId('Rhrt'), true)) then
SetPlayerTechMaxAllowed(Player(index), StringToId('hrtt'), 0)
end

-- Berserker Upgrade - Troll Berserkers
if (not GetPlayerTechResearched(Player(index), 'Robk', true)) then
SetPlayerTechMaxAllowed(Player(index), 'otbk', 0)
if (not GetPlayerTechResearched(Player(index), StringToId('Robk'), true)) then
SetPlayerTechMaxAllowed(Player(index), StringToId('otbk'), 0)
end

-- max skeletons per player
SetPlayerTechMaxAllowed(Player(index), 'uske', bj_MAX_SKELETONS)
SetPlayerTechMaxAllowed(Player(index), StringToId('uske'), bj_MAX_SKELETONS)

index = index + 1
if index == bj_MAX_PLAYERS then break end
Expand Down Expand Up @@ -10046,7 +10046,7 @@ function InitNeutralBuildings()

-- Set up a trigger to fire whenever an item is sold.
bj_stockItemPurchased = CreateTrigger()
TriggerRegisterPlayerUnitEvent(bj_stockItemPurchased, Player(PLAYER_NEUTRAL_PASSIVE), EVENT_PLAYER_UNIT_SELL_ITEM, 0)
TriggerRegisterPlayerUnitEvent(bj_stockItemPurchased, Player(PLAYER_NEUTRAL_PASSIVE), EVENT_PLAYER_UNIT_SELL_ITEM, nil)
TriggerAddAction(bj_stockItemPurchased, RemovePurchasedItem)
end
-- ===========================================================================
Expand Down Expand Up @@ -10218,37 +10218,6 @@ end
--
-- ***************************************************************************

-- function GetEffectPos(effect)
-- return GetObjectPos(effect)
-- end

-- function GetEffectX(effect)
-- return GetObjectX(effect)
-- end

-- function GetEffectY(effect)
-- return GetObjectY(effect)
-- end

-- function GetEffectZ(effect)
-- return GetObjectZ(effect)
-- end

-- function SetEffectPos(effect, x, y, z)
-- SetObjectPos(effect, x, y, z)
-- end

-- function SetEffectX(effect, x)
-- SetObjectX(effect, x)
-- end

-- function SetEffectY(effect, y)
-- SetObjectY(effect, y)
-- end
-- function SetEffectZ(effect, z)
-- SetObjectZ(effect, z)
-- end

function _print(...)
local string = ""

Expand Down
2 changes: 1 addition & 1 deletion Scripts/common.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FALSE = false
TRUE = true
JASS_MAX_ARRAY_SIZE = 32768
JASS_MAX_ARRAY_SIZE = 8192
PLAYER_NEUTRAL_PASSIVE = 15
PLAYER_NEUTRAL_AGGRESSIVE = 12
PLAYER_COLOR_RED = ConvertPlayerColor(0)
Expand Down
27 changes: 0 additions & 27 deletions Src Backup/.vscode/settings.json

This file was deleted.

158 changes: 0 additions & 158 deletions Src Backup/FrameAPI.cpp

This file was deleted.

Loading

0 comments on commit 7a0915a

Please sign in to comment.