# HG changeset patch # User nemo # Date 1293395324 18000 # Node ID 8d58de7127388677eb67faf7e962c208d2fb6abb # Parent c27bea52efac58f18bf98dc84e062d18a920d242# Parent e8fd20b2d66be5f5a68645ec6670a65700820a7d merge 0.9.15 with default diff -r c27bea52efac -r 8d58de712738 CMakeLists.txt diff -r c27bea52efac -r 8d58de712738 ChangeLog.txt --- a/ChangeLog.txt Sun Dec 26 20:17:15 2010 +0300 +++ b/ChangeLog.txt Sun Dec 26 15:28:44 2010 -0500 @@ -1,6 +1,31 @@ + features * bugfixes +0.9.14 -> 0.9.15: + + Ability to create, save and load hand drawn maps + + New maps: Capture the Flag (Blizzard) Map + + New themes: Christmas + + Snowflakes on Christmas/Snow themes accumulates on the ground + + New game modifiers: No wind, More wind + + New missions: Dangerous ducklings, Diver, Spooky tree, Teamwork + + New weapons: Mudball, Drill strike + + Many more Lua hooks + + Readytimer + + Ability to edit seed + + Ability to select gameplay scripts + + New gameplay scripts: Capture the Flag, No jumping, Random weapon + + New Lua unified translation framework + + Code refactoring + + Max teams upped to 8 + + Cosmetic enhancements to Napalm strike + + Selecting a game scheme selects the corresponding weapon set + + Dust when drills dig + + New hats: beaver, porkey, sheep + + Add density property to Gears + + Reworked management of schemes and weapon sets + + Explosions detach rope from land + + Allow hog speech when not your turn + 0.9.13 -> 0.9.14: + New audio tracks + New forts: EvilChicken, Tank diff -r c27bea52efac -r 8d58de712738 doc/Release.txt --- a/doc/Release.txt Sun Dec 26 20:17:15 2010 +0300 +++ b/doc/Release.txt Sun Dec 26 15:28:44 2010 -0500 @@ -8,4 +8,5 @@ 8. Make packages 9. Test packages 10. Upload (hedgewars.org, fireforge.net, gna.org (rsync --delete -avr --rsh="ssh" . unc0rr@download.gna.org:/upload/hedgewars)) -11. Post news +11. Post news (hedgewars.org, hedgewars forum, fireforge.net, gna.org, happypenguin, etc.) +12. Make tag (svn copy svn+ssh://unc0rr@svn.fireforge.net/svnroot/hedgewars/branches/0.9.7 svn+ssh://unc0rr@svn.fireforge.net/svnroot/hedgewars/tags/0.9.7 -m "Tag for 0.9.7 release") \ No newline at end of file diff -r c27bea52efac -r 8d58de712738 gameServer/HWProtoInRoomState.hs --- a/gameServer/HWProtoInRoomState.hs Sun Dec 26 20:17:15 2010 +0300 +++ b/gameServer/HWProtoInRoomState.hs Sun Dec 26 15:28:44 2010 -0500 @@ -37,7 +37,7 @@ handleCmd_inRoom clID clients rooms ("ADD_TEAM" : name : color : grave : fort : voicepack : flag : difStr : hhsInfo) | length hhsInfo == 15 && clientProto client < 30 = handleCmd_inRoom clID clients rooms ("ADD_TEAM" : name : color : grave : fort : voicepack : " " : flag : difStr : hhsInfo) | length hhsInfo /= 16 = [ProtocolError "Corrupted hedgehogs info"] - | length (teams room) == 6 = [Warning "too many teams"] + | length (teams room) == 8 = [Warning "too many teams"] | canAddNumber <= 0 = [Warning "too many hedgehogs"] | isJust findTeam = [Warning "There's already a team with same name in the list"] | gameinprogress room = [Warning "round in progress"] diff -r c27bea52efac -r 8d58de712738 hedgewars/GSHandlers.inc --- a/hedgewars/GSHandlers.inc Sun Dec 26 20:17:15 2010 +0300 +++ b/hedgewars/GSHandlers.inc Sun Dec 26 15:28:44 2010 -0500 @@ -1038,7 +1038,7 @@ if (Gear^.Timer mod 47) = 0 then begin // ok. this was an attempt to turn off dust if not actually drilling land. I have no idea why it isn't working as expected - //if ((y + 12 and LAND_HEIGHT_MASK) = 0) and ((x and LAND_WIDTH_MASK) = 0) and (Land[y + 12, x] > 255) then + if (( (y + 12) and LAND_HEIGHT_MASK) = 0) and ((x and LAND_WIDTH_MASK) = 0) and (Land[y + 12, x] > 255) then for i:= 0 to 1 do AddVisualGear(x - 5 + Random(10), y + 12, vgtDust); diff -r c27bea52efac -r 8d58de712738 hedgewars/uLandGraphics.pas --- a/hedgewars/uLandGraphics.pas Sun Dec 26 20:17:15 2010 +0300 +++ b/hedgewars/uLandGraphics.pas Sun Dec 26 15:28:44 2010 -0500 @@ -199,7 +199,7 @@ LandPixels[t div 2, i div 2]:= LandBackPixel(i, t) end else - if ((Land[t, i] and lfObject) <> 0) or disableLandBack then + if ((Land[t, i] and lfObject) <> 0) or (disableLandBack and ((Land[t, i] and lfIndestructible) = 0)) then if (cReducedQuality and rqBlurryLand) = 0 then LandPixels[t, i]:= 0 else @@ -217,7 +217,7 @@ LandPixels[t div 2, i div 2]:= LandBackPixel(i, t) end else - if ((Land[t, i] and lfObject) <> 0) or disableLandBack then + if ((Land[t, i] and lfObject) <> 0) or (disableLandBack and ((Land[t, i] and lfIndestructible) = 0)) then if (cReducedQuality and rqBlurryLand) = 0 then LandPixels[t, i]:= 0 else @@ -235,7 +235,7 @@ LandPixels[t div 2, i div 2]:= LandBackPixel(i, t) end else - if ((Land[t, i] and lfObject) <> 0) or disableLandBack then + if ((Land[t, i] and lfObject) <> 0) or (disableLandBack and ((Land[t, i] and lfIndestructible) = 0)) then if (cReducedQuality and rqBlurryLand) = 0 then LandPixels[t, i]:= 0 else @@ -253,7 +253,7 @@ LandPixels[t div 2, i div 2]:= LandBackPixel(i, t) end else - if ((Land[t, i] and lfObject) <> 0) or disableLandBack then + if ((Land[t, i] and lfObject) <> 0) or (disableLandBack and ((Land[t, i] and lfIndestructible) = 0)) then if (cReducedQuality and rqBlurryLand) = 0 then LandPixels[t, i]:= 0 else @@ -415,7 +415,7 @@ else LandPixels[ty div 2, tx div 2]:= LandBackPixel(tx, ty) else - if ((Land[ty, tx] and lfObject) <> 0) or disableLandBack then + if ((Land[ty, tx] and lfObject) <> 0) or (disableLandBack and ((Land[ty, tx] and lfIndestructible) = 0)) then if (cReducedQuality and rqBlurryLand) = 0 then LandPixels[ty, tx]:= 0 else @@ -527,7 +527,7 @@ else LandPixels[ty div 2, tx div 2]:= LandBackPixel(tx, ty) else - if ((Land[ty, tx] and lfObject) <> 0) or disableLandBack then + if ((Land[ty, tx] and lfObject) <> 0) or (disableLandBack and ((Land[ty, tx] and lfIndestructible) = 0)) then if (cReducedQuality and rqBlurryLand) = 0 then LandPixels[ty, tx]:= 0 else diff -r c27bea52efac -r 8d58de712738 share/hedgewars/Data/Graphics/missions.png Binary file share/hedgewars/Data/Graphics/missions.png has changed diff -r c27bea52efac -r 8d58de712738 share/hedgewars/Data/Graphics/missions.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Graphics/missions.svg Sun Dec 26 15:28:44 2010 -0500 @@ -0,0 +1,179 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r c27bea52efac -r 8d58de712738 share/hedgewars/Data/Maps/Blizzard/CMakeLists.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Maps/Blizzard/CMakeLists.txt Sun Dec 26 15:28:44 2010 -0500 @@ -0,0 +1,7 @@ +install(FILES + map.png + map.cfg + mask.png + preview.png + DESTINATION ${SHAREPATH}Data/Maps/Blizzard) + diff -r c27bea52efac -r 8d58de712738 share/hedgewars/Data/Maps/Blizzard/map.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Maps/Blizzard/map.cfg Sun Dec 26 15:28:44 2010 -0500 @@ -0,0 +1,1 @@ +Snow diff -r c27bea52efac -r 8d58de712738 share/hedgewars/Data/Maps/Blizzard/map.png Binary file share/hedgewars/Data/Maps/Blizzard/map.png has changed diff -r c27bea52efac -r 8d58de712738 share/hedgewars/Data/Maps/Blizzard/mask.png Binary file share/hedgewars/Data/Maps/Blizzard/mask.png has changed diff -r c27bea52efac -r 8d58de712738 share/hedgewars/Data/Maps/Blizzard/preview.png Binary file share/hedgewars/Data/Maps/Blizzard/preview.png has changed diff -r c27bea52efac -r 8d58de712738 share/hedgewars/Data/Maps/CMakeLists.txt --- a/share/hedgewars/Data/Maps/CMakeLists.txt Sun Dec 26 20:17:15 2010 +0300 +++ b/share/hedgewars/Data/Maps/CMakeLists.txt Sun Dec 26 15:28:44 2010 -0500 @@ -4,6 +4,7 @@ Basketball Bath Battlefield + Blizzard Blox Bubbleflow Cake diff -r c27bea52efac -r 8d58de712738 share/hedgewars/Data/Maps/CTF_Blizzard/map.lua --- a/share/hedgewars/Data/Maps/CTF_Blizzard/map.lua Sun Dec 26 20:17:15 2010 +0300 +++ b/share/hedgewars/Data/Maps/CTF_Blizzard/map.lua Sun Dec 26 15:28:44 2010 -0500 @@ -49,30 +49,19 @@ -- removed poisoning of flag carriers -- removed health adjustments for flag carriers due to aforementioned poisons --------------- ---game text --------------- - -local caption = { - ["en"] = "CTF: Blizzard v0.4" - } - -local subcaption = { - ["en"] = "by Mikade" - } +--------- +-- 0.5 +--------- -local goal = { - ["en"] = "Capture the enemy flag." - } +-- added translation support, hopefully +-- added ctf rules +-- added effects to the teleporters +-- added aura round spawning area +-- changed the aura around the flag carrier / flag to an aura and added some support for this +-- changed things so the seed is no longer always the same... --- To handle missing texts we define a small wrapper function that --- we'll use to retrieve text. -local function loc(text) - if text == nil then return "**missing**" - elseif text[L] == nil then return text["en"] - else return text[L] - end -end + +loadfile(GetDataPath() .. "Scripts/Locale.lua")() --------------------------------------------------------------- ----------lots of bad variables and things @@ -85,6 +74,7 @@ local roundsCounter = 0 -- used to determine when to spawn more crates -- currently every 6 TURNS, should this work -- on ROUNDS instead? +local effectTimer = 0 -------------------------- -- hog and team tracking variales @@ -115,9 +105,22 @@ local FTTC = 0 -- flag thief tracker counter --local fThiefsHealed = false +local fSpawnC = {} local fCirc = {} -- flag/carrier marker circles local fCol = {} -- colour of the clans +local vCircX = {} +local vCircY = {} +local vCircMinA = {} +local vCircMaxA = {} +local vCircType = {} +local vCircPulse = {} +local vCircFuckAll = {} +local vCircRadius = {} +local vCircWidth = {} +local vCircCol = {} + + -------------------------------- --zone and teleporter variables -------------------------------- @@ -138,6 +141,25 @@ ------------------------ -- see on gameTick also +function ManageTeleporterEffects() + effectTimer = effectTimer + 1 + if effectTimer > 50 then -- 100 + effectTimer = 0 + + for i = 0,1 do + eX = 10 + zXMin[i] + GetRandom(zWidth[i]-10) + eY = 50 + zYMin[i] + GetRandom(zHeight[i]-110) + + -- steam and smoke and DUST look good, smokering looks trippy + -- smoketrace and eviltrace are not effected by wind? + -- chunk is a LR falling gear + tempE = AddVisualGear(eX, eY, vgtDust, 0, false) + g1, g2, g3, g4, g5, g6, g7, g8, g9, g10 = GetVisualGearValues(tempE) + SetVisualGearValues(tempE, eX, eY, g3, g4, g5, g6, g7, g8, g9, fCol[i]) + end + end +end + function CreateZone(xMin, yMin, width, height) @@ -179,14 +201,15 @@ winner = "Blue" end - if fCaptures[teamID] == 3 then + if fCaptures[teamID] == 2 then for i = 0, (numhhs-1) do if GetHogClan(hhs[i]) == alt then SetEffect(hhs[i], heResurrectable, false) SetHealth(hhs[i],0) end end - ShowMission("GAME OVER!", "Victory for the " .. winner .. " Team!", "Hooray!", 0, 0) + --ShowMission("GAME OVER!", "Victory for the " .. winner .. " Team!", "Hooray!", 0, 0) + ShowMission(loc("GAME OVER!"), loc("Victory for the ") .. GetHogTeamName(CurrentHedgehog), loc("Hooray!"), 0, 0) end end @@ -200,7 +223,7 @@ --fGear[i] = SpawnHealthCrate(fSpawnX[i],fSpawnY[i]) fNeedsRespawn[i] = false fIsMissing[i] = false -- new, this should solve problems of a respawned flag being "returned" when a player tries to score - AddCaption("Flag respawned!") + AddCaption(loc("Flag respawned!")) end end @@ -234,7 +257,10 @@ fIsMissing[bbq] = false fNeedsRespawn[bbq] = true fCaptures[wtf] = fCaptures[wtf] +1 --fCaptures[wtf] - ShowMission("You have SCORED!!", "Red Team: " .. fCaptures[0], "Blue Team: " .. fCaptures[1], -amBazooka, 0) + + --ShowMission(loc("You have SCORED!!"), "Red Team: " .. fCaptures[0], "Blue Team: " .. fCaptures[1], -amBazooka, 0) + ShowMission(loc("You have SCORED!!"), GetHogTeamName(CurrentHedgehog) .. ": " .. fCaptures[wtf], loc("Opposing Team: ") .. fCaptures[bbq], 0, 0) + PlaySound(sndVictory) --SetEffect(fThief[bbq], hePoisoned, false) fThief[bbq] = nil -- player no longer has the enemy flag @@ -248,9 +274,9 @@ -- NEW ADDIITON, does this work? Should make it possible to return your flag and then score in the same turn if fIsMissing[wtf] == true then HandleRespawns() -- this will set fIsMissing[wtf] to false :) - AddCaption("Flag returned!") + AddCaption(loc("Flag returned!")) elseif fIsMissing[wtf] == false then - AddCaption("That was pointless. The flag will respawn next round.") + AddCaption(loc("That was pointless.") .. loc("The flag will respawn next round.")) end --fIsMissing[wtf] = false @@ -266,7 +292,7 @@ end end - AddCaption("Flag captured!") + AddCaption(loc("Flag captured!")) else --below line doesnt usually get called AddCaption("Hmm... that wasn't supposed to happen...") @@ -285,7 +311,7 @@ fGear[wtf] = nil fIsMissing[wtf] = true fNeedsRespawn[wtf] = true - AddCaption("Boom! The flag will respawn next round.") + AddCaption(loc("Boom!") .. " " .. loc("The flag will respawn next round.")) end end @@ -298,7 +324,7 @@ fGear[wtf] = nil fIsMissing[wtf] = true fNeedsRespawn[wtf] = true - AddCaption("The flag will respawn next round.") + AddCaption(loc("The flag will respawn next round.")) end end @@ -326,12 +352,15 @@ for i = 0, 1 do if fIsMissing[i] == false then -- draw a circle at the flag's spawning place - SetVisualGearValues(fCirc[i], fSpawnX[i],fSpawnY[i], 20, 200, 0, 0, 100, 33, 2, fCol[i]) + --SetVisualGearValues(fCirc[i], fSpawnX[i],fSpawnY[i], 20, 200, 0, 0, 100, 33, 2, fCol[i]) + SetVisualGearValues(fCirc[i], fSpawnX[i],fSpawnY[i], vCircMinA[i], vCircMaxA[i], vCircType[i], vCircPulse[i], vCircFuckAll[i], vCircRadius[i], vCircWidth[i], vCircCol[i]) elseif (fIsMissing[i] == true) and (fNeedsRespawn[i] == false) then if fThief[i] ~= nil then -- draw circle round flag carrier - SetVisualGearValues(fCirc[i], fThiefX[i], fThiefY[i], 20, 200, 0, 0, 100, 33, 2, fCol[i]) + --SetVisualGearValues(fCirc[i], fThiefX[i], fThiefY[i], 20, 200, 0, 0, 100, 33, 2, fCol[i]) + SetVisualGearValues(fCirc[i], fThiefX[i], fThiefY[i], vCircMinA[i], vCircMaxA[i], vCircType[i], vCircPulse[i], vCircFuckAll[i], vCircRadius[i], vCircWidth[i], vCircCol[i]) elseif fThief[i] == nil then -- draw cirle round dropped flag - SetVisualGearValues(fCirc[i], GetX(fGear[i]), GetY(fGear[i]), 20, 200, 0, 0, 100, 33, 2, fCol[i]) + --SetVisualGearValues(fCirc[i], GetX(fGear[i]), GetY(fGear[i]), 20, 200, 0, 0, 100, 33, 2, fCol[i]) + SetVisualGearValues(fCirc[i], GetX(fGear[i]),GetY(fGear[i]), vCircMinA[i], vCircMaxA[i], vCircType[i], vCircPulse[i], vCircFuckAll[i], vCircRadius[i], vCircWidth[i], vCircCol[i]) end end @@ -466,21 +495,21 @@ r = GetRandom(8) if r == 0 then - SpawnAmmoCrate(0,0,amSwitch) + SpawnUtilityCrate(0,0,amSwitch) elseif r == 1 then - SpawnAmmoCrate(0,0,amTeleport) + SpawnUtilityCrate(0,0,amTeleport) elseif r == 2 then - SpawnAmmoCrate(0,0,amJetpack) + SpawnUtilityCrate(0,0,amJetpack) elseif r == 3 then SpawnUtilityCrate(0,0,amExtraTime) elseif r == 4 then - SpawnAmmoCrate(0,0,amGirder) + SpawnUtilityCrate(0,0,amGirder) elseif r == 5 then SpawnAmmoCrate(0,0,amDynamite) elseif r == 6 then SpawnAmmoCrate(0,0,amFlamethrower) elseif r == 7 then - SpawnAmmoCrate(0,0,amPortalGun) + SpawnUtilityCrate(0,0,amPortalGun) end end @@ -494,7 +523,6 @@ function onGameInit() -- Things we don't modify here will use their default values. - Seed = 0 -- The base number for the random number generator GameFlags = gfDivideTeams -- Game settings and rules TurnTime = 30000 -- (was 30) The time the player has to move each round (in ms) CaseFreq = 0 -- The frequency of crate drops @@ -503,7 +531,7 @@ Explosives = 0 -- The number of explosives being placed Delay = 10 -- The delay between each round SuddenDeathTurns = 99 -- suddendeath is off, effectively - Map = "CTF_Blizzard" -- The map to be played + Map = "Blizzard" -- The map to be played Theme = "Snow" -- The theme to be used "Nature" end @@ -511,7 +539,9 @@ function onGameStart() - ShowMission(loc(caption), loc(subcaption), loc(goal), 0, 0) + --ShowMission(loc(caption), loc(subcaption), loc(goal), 0, 0) + ShowMission(loc("CTF_BLIZZARD") .. " 0.5", loc("by mikade"), loc(" - Return the enemy flag to your base to score | - First team to 3 captures wins | - You may only score when your flag is in your base | - Hogs will drop the flag if killed, or drowned | - Dropped flags may be returned or recaptured | - Hogs respawn when killed"), 0, 0) + -- initialize teleporters redTel = CreateZone(342,1316,42,449) -- red teleporter @@ -556,10 +586,27 @@ for i = 0, 1 do fGear[i] = SpawnAmmoCrate(fSpawnX[i],fSpawnY[i],amSkip) fCirc[i] = AddVisualGear(fSpawnX[i],fSpawnY[i],vgtCircle,0,true) - fCol[i] = GetClanColor(i) + fCol[i] = GetClanColor(i) + + fSpawnC[i] = AddVisualGear(fSpawnX[i],fSpawnY[i],vgtCircle,0,true) + SetVisualGearValues(fSpawnC[i], fSpawnX[i],fSpawnY[i], 10, 200, 1, 10, 0, 300, 5, fCol[i]) + + fIsMissing[i] = false fNeedsRespawn[i] = false fCaptures[i] = 0 + + vCircMinA[i] = 20 + vCircMaxA[i] = 255 + vCircType[i] = 1 + vCircPulse[i] = 10 + vCircFuckAll[i] = 0 + vCircRadius[i] = 150 + vCircWidth[i] = 5 + vCircCol[i] = fCol[i] + + SetVisualGearValues(fCirc[i], fSpawnX[i],fSpawnY[i], vCircMinA[i], vCircMaxA[i], vCircType[i], vCircPulse[i], vCircFuckAll[i], vCircRadius[i], vCircWidth[i], vCircCol[i]) + end end @@ -612,6 +659,7 @@ end HandleCircles() + ManageTeleporterEffects() end @@ -641,7 +689,7 @@ SetAmmo(amParachute, 9, 0, 0, 0) SetAmmo(amRope, 9, 0, 0, 0) - SetAmmo(amTeleport, 0, 0, 0, 1) + SetAmmo(amTeleport, 1, 0, 0, 1) SetAmmo(amJetpack, 1, 0, 0, 1) SetAmmo(amSwitch, 2, 0, 0, 1) diff -r c27bea52efac -r 8d58de712738 share/hedgewars/Data/Maps/CTF_Blizzard/map.png Binary file share/hedgewars/Data/Maps/CTF_Blizzard/map.png has changed diff -r c27bea52efac -r 8d58de712738 share/hedgewars/Data/Maps/Control/map.lua --- a/share/hedgewars/Data/Maps/Control/map.lua Sun Dec 26 20:17:15 2010 +0300 +++ b/share/hedgewars/Data/Maps/Control/map.lua Sun Dec 26 15:28:44 2010 -0500 @@ -24,6 +24,12 @@ -- added translation support +-------- +-- 0.4 +-------- + +-- added scaling scoring based on clans: 300 points to win - 25 per team in game + ----------------- --script begins ----------------- @@ -37,6 +43,7 @@ ------------------ "Oh well, they probably have the memory" local gameWon = false +local pointLimit = 300 local vCirc = {} local vCircCount = 0 @@ -279,8 +286,7 @@ function onGameStart() - ShowMission(loc("CONTROL v0.3"), loc("by mikade"), loc("Control pillars to score points."), 0, 0) - + -- build zones cPoint[0] = CreateZone(571,47,120,80) @@ -318,7 +324,9 @@ --new improved placement schematics aw yeah RebuildTeamInfo() - + for i = 0, (numTeams-1) do + pointLimit = pointLimit - 25 + end --SetGearPosition(hhs[0], 631, 82) --SetGearPosition(hhs[1], 1088, 684) --SetGearPosition(hhs[2], 381, 1569) @@ -337,6 +345,9 @@ --AddCaption(zz) -- number of times it took to work end + ShowMission(loc("CONTROL v0.3"), loc("by mikade"), loc("Control pillars to score points.") .. "|" .. loc("Goal:") .. " " .. pointLimit .. " " .. loc("points"), 0, 0) + + end @@ -350,7 +361,7 @@ if gameWon == false then for i = 0, (numTeams-1) do - if teamScore[i] >= 150 then + if teamScore[i] >= pointLimit then --150 gameWon = true winnerClan = i end