Fix team colors of most teams in A Space Adventure to denote correct ally status
authorWuzzy <almikes@aol.com>
Thu, 28 Sep 2017 07:09:18 +0200
changeset 12571 903a30fb49e6
parent 12570 0fb15ad40595
child 12572 5358c4f23643
Fix team colors of most teams in A Space Adventure to denote correct ally status A Space Adventure often gave different colors to allied teams, which is wrong! A few exceptions remain for technical reasons.
share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/cosmos.lua
share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/death01.lua
share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert01.lua
share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit01.lua
share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/ice01.lua
share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/ice02.lua
share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon01.lua
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/cosmos.lua	Thu Sep 28 02:42:10 2017 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/cosmos.lua	Thu Sep 28 07:09:18 2017 +0200
@@ -78,11 +78,11 @@
 guard2.x = 3400
 guard2.y = 1800
 teamA.name = loc("PAotH")
-teamA.color = tonumber("FF0000",16) -- red
+teamA.color = 0x38D61C -- green
 teamB.name = loc("Guards")
-teamB.color = tonumber("0072FF",16) -- blue
+teamB.color = 0x0072FF -- blue
 teamC.name = loc("Hog Solo")
-teamC.color = tonumber("38D61C",16) -- green
+teamC.color = 0x38D61C -- green
 
 -------------- LuaAPI EVENT HANDLERS ------------------
 function onGameInit()
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/death01.lua	Thu Sep 28 02:42:10 2017 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/death01.lua	Thu Sep 28 07:09:18 2017 +0200
@@ -79,11 +79,12 @@
 thug7.y = 1960
 thug7.health = 80
 teamA.name = loc("Hog Solo")
-teamA.color = tonumber("38D61C",16) -- green
+teamA.color = 0x38D61C -- green
 teamB.name = loc("PAotH")
-teamB.color = tonumber("0072FF",16) -- blue because otherwise enemies attack them
+-- FIXME: PAotH should share color with Hog Solo
+teamB.color = 0x0072FF -- blue because otherwise enemies attack them
 teamC.name = loc("Professor")
-teamC.color = tonumber("0072FF",16) -- blue
+teamC.color = 0x0072FF -- blue
 
 -------------- LuaAPI EVENT HANDLERS ------------------
 
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert01.lua	Thu Sep 28 02:42:10 2017 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert01.lua	Thu Sep 28 07:09:18 2017 +0200
@@ -75,11 +75,11 @@
 smuggler3.x = 1940
 smuggler3.y = 1625
 teamA.name = loc("PAotH")
-teamA.color = tonumber("FF0000",16) -- red
+teamA.color = 0x38D61C -- green
 teamB.name = loc("Smugglers")
-teamB.color = tonumber("0072FF",16) -- blues
+teamB.color = 0xFE8B0E -- orange
 teamC.name = loc("Hog Solo")
-teamC.color = tonumber("38D61C",16) -- green
+teamC.color = 0x38D61C -- green
 
 -------------- LuaAPI EVENT HANDLERS ------------------
 
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit01.lua	Thu Sep 28 02:42:10 2017 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit01.lua	Thu Sep 28 07:09:18 2017 +0200
@@ -88,13 +88,13 @@
 	{name = loc("Naranja Jed"), x = 960 , y = 516, health = 40},
 }
 teamA.name = loc("Hog Solo")
-teamA.color = tonumber("38D61C",16) -- green
+teamA.color = 0x38D61C -- green
 teamB.name = loc("Green Bananas")
-teamB.color = tonumber("38D61C",16) -- green
+teamB.color = 0x38D61C -- green
 teamC.name = loc("Yellow Watermelons")
-teamC.color = tonumber("DDFF00",16) -- yellow
+teamC.color = 0xFFFF01 -- yellow
 teamD.name = loc("Captain Lime")
-teamD.color = tonumber("38D61C",16) -- green
+teamD.color = 0x38D61C -- green
 
 function onGameInit()
 	Seed = 1
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/ice01.lua	Thu Sep 28 02:42:10 2017 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/ice01.lua	Thu Sep 28 07:09:18 2017 +0200
@@ -24,7 +24,7 @@
 -- mission objectives
 local goToThantaString = loc("Go to Thanta and get the device part!")
 local goals = {
-	[dialog01] = {missionName, loc("Getting ready"), loc("Collect the freezer and get the device part from Thanta") .. "|" .. loc("Mines time: 0 seconds"), 1, 4500},
+	[dialog01] = {missionName, loc("Getting ready"), loc("Collect the freezer and get the device part from Thanta.") .. "|" .. loc("Mines time: 0 seconds"), 1, 4500},
 	["checkpoint"] = {missionName, loc("Objectives"), goToThantaString .. "|" .. loc("Mines time: 0 seconds"), 1, 4500},
 }
 -- crates
@@ -73,11 +73,11 @@
 bandit5.frozen = false
 bandit5.roundsToUnfreeze = 0
 teamA.name = loc("Allies")
-teamA.color = tonumber("FF0000",16) -- red
+teamA.color = 0x38D61C -- green
 teamB.name = loc("Frozen Bandits")
-teamB.color = tonumber("0072FF",16) -- blues
+teamB.color = 0x0072FF -- blue
 teamC.name = loc("Hog Solo")
-teamC.color = tonumber("38D61C",16) -- green
+teamC.color = 0x38D61C -- green
 
 -------------- LuaAPI EVENT HANDLERS ------------------
 
@@ -442,7 +442,7 @@
 	SendStat(siCustomAchievement, loc("To win the game you have to stand next to Thanta."))
 	SendStat(siCustomAchievement, loc("Most of the time you'll be able to use the freezer only."))
 	SendStat(siCustomAchievement, loc("Use the bazooka and the flying saucer to get the freezer."))
-	sendSimpleTeamRankings({teamB.name, teamC.name})
+	sendSimpleTeamRankings({teamB.name, teamC.name, teamA.name})
 	EndGame()
 end
 
@@ -473,7 +473,7 @@
 	SendStat(siCustomAchievement, loc("To win the game you have to go next to Thanta."))
 	SendStat(siCustomAchievement, loc("Most of the time you'll be able to use the freezer only."))
 	SendStat(siCustomAchievement, loc("Use the bazooka and the flying saucer to get the freezer."))
-	sendSimpleTeamRankings({teamB.name, teamC.name})
+	sendSimpleTeamRankings({teamB.name, teamC.name, teamA.name})
 	EndGame()
 end
 
@@ -542,7 +542,7 @@
 	SendStat(siGameResult, loc("Congratulations, you acquired the device part!"))
 	SendStat(siCustomAchievement, string.format(loc("At the end of the game your health was %d."), GetHealth(hero.gear)))
 	-- maybe add number of tries for each part?
-	sendSimpleTeamRankings({teamC.name, teamB.name})
+	sendSimpleTeamRankings({teamC.name, teamA.name, teamB.name})
 	resetCheckpoint() -- reset this mission
 	EndGame()
 end
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/ice02.lua	Thu Sep 28 02:42:10 2017 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/ice02.lua	Thu Sep 28 07:09:18 2017 +0200
@@ -44,9 +44,9 @@
 ally.x = 860
 ally.y = 130
 teamA.name = loc("Hog Solo")
-teamA.color = tonumber("38D61C",16) -- green
+teamA.color = 0x38D61C -- green
 teamB.name = loc("Allies")
-teamB.color = tonumber("FF0000",16) -- red
+teamB.color = 0x38D61C -- green
 -- way points
 local current waypoint = 1
 local waypoints = {
@@ -70,7 +70,7 @@
 -------------- LuaAPI EVENT HANDLERS ------------------
 
 function onGameInit()
-	GameFlags = gfInvulnerable
+	GameFlags = gfInvulnerable + gfOneClanMode
 	Seed = 1
 	TurnTime = 15000
 	CaseFreq = 0
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon01.lua	Thu Sep 28 02:42:10 2017 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon01.lua	Thu Sep 28 07:09:18 2017 +0200
@@ -87,13 +87,13 @@
 minion3.y = 1750
 
 teamA.name = loc("PAotH")
-teamA.color = tonumber("FF0000",16) -- red
+teamA.color = 0x38D61C -- green
 teamB.name = loc("Minions")
-teamB.color = tonumber("0072FF",16) -- blue
+teamB.color = 0x0072FF -- blue
 teamC.name = loc("Professor")
-teamC.color = tonumber("0072FF",16) -- blue
+teamC.color = 0x0072FF -- blue
 teamD.name = loc("Hog Solo")
-teamD.color = tonumber("38D61C",16) -- green
+teamD.color = 0x38D61C -- green
 
 -------------- LuaAPI EVENT HANDLERS ------------------