Skip to content

Commit

Permalink
4.13.0 initial changes for 1.16
Browse files Browse the repository at this point in the history
  • Loading branch information
ProditorMagnus committed Oct 25, 2021
1 parent 9ae3042 commit c4ac308
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,5 @@ Icon
.Spotlight-V100
.Trashes

*.pbl
*.pbl
*.iml
4 changes: 4 additions & 0 deletions Ravana_changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,10 @@ Experimental menu item in top left corner to delay all waves 1 turn
4.12.4a
Fix error message after reloading

4.13.0
Update for 1.16


4.x todo
consider hp multiplier and delayed waves
dependencies=Ageless_Era,XP_Modification,Plan_Your_Advancements_Mod,Switch_Leader,Color_Modification,Ally_Village_Modification
Expand Down
18 changes: 10 additions & 8 deletions lua/adaptive_difficulty.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,24 @@

function ORM.fun.init_adaptive_difficulty()
local result = 0
if wesnoth.game_config.mp_settings.active_mods:find("StealingWeaponsMode") then
-- another way - f=wesnoth.require "functional", f.find(wesnoth.scenario.modifications, function (e) return e.id=="plan_unit_advance" end)
local modifications = ORM.fun.map(function(mod) return mod.id end, wesnoth.scenario.modifications)
if ORM.fun.table_contains(modifications, "StealingWeaponsMode") then
result = result + 0.2
end
if wesnoth.game_config.mp_settings.active_mods:find("BonusSpam") then
if ORM.fun.table_contains(modifications, "BonusSpam") then
result = result + 0.5
end
if wesnoth.game_config.mp_settings.active_mods:find("CanBeOnlyOne") then
if ORM.fun.table_contains(modifications, "CanBeOnlyOne") then
result = result + 6.66
end
if wesnoth.game_config.mp_settings.active_mods:find("EXI_Heroic_Mod") then
if ORM.fun.table_contains(modifications, "EXI_Heroic_Mod") then
result = result + 0.1
end
if wesnoth.game_config.mp_settings.active_mods:find("EXI_Rush_Mod") then
if ORM.fun.table_contains(modifications, "EXI_Rush_Mod") then
result = result + 0.1 -- maybe for the future find other solutions like better movecosts
end
if wesnoth.game_config.mp_settings.active_mods:find("Xara_Magic_Mod") then
if ORM.fun.table_contains(modifications, "Xara_Magic_Mod") then
result = result + 0.3
end

Expand Down Expand Up @@ -59,8 +61,8 @@ function ORM.fun.init_adaptive_difficulty()
result = result - 0.4
end

if (wesnoth.game_config.mp_settings.mp_era == "era_default" or wesnoth.game_config.mp_settings.mp_era == "era_heroes" or
wesnoth.game_config.mp_settings.mp_era == "era_dunefolk" or wesnoth.game_config.mp_settings.mp_era == "era_dunefolk_heroes") then
if (wesnoth.scenario.era.id == "era_default" or wesnoth.scenario.era.id == "era_heroes" or
wesnoth.scenario.era.id == "era_dunefolk" or wesnoth.scenario.era.id == "era_dunefolk_heroes") then
result = result - 0.4
if (V.ORM_random_ageless_waves) then
result = result - 0.2
Expand Down
2 changes: 1 addition & 1 deletion lua/events.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function ORM.event.start()

V.ORM_random_ageless_waves = ORM.fun.table_contains({"ageless_random_full", "ageless_random_mirrored"}, V.ORM_wave_choice_setting)

V.ORM_agelessunits_available = wesnoth.game_config.mp_settings.mp_era:find("Ageless") or V.ORM_wave_choice_setting:find("ageless") or false
V.ORM_agelessunits_available = wesnoth.scenario.era.id:find("Ageless") or V.ORM_wave_choice_setting:find("ageless") or false

ORM.fun.remove_turn_limit()
ORM.fun.initialise_difficulty_modes()
Expand Down
2 changes: 1 addition & 1 deletion utils/version.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#wmlindent: start ignoring
#define OROCIARM_VERSION
4.12.4a by Ravana
4.13.0 by Ravana
Leave feedback in is.gd/laelamp
#enddef
#wmlindent: stop ignoring

0 comments on commit c4ac308

Please sign in to comment.