# HG changeset patch # User mikade # Date 1369915693 -32400 # Node ID 5533554726753f841b493266bba25ecc2522e064 # Parent 52a8ee2e8324cd7622a385d00528cba38e93d136 Fix broken x/y values on Dangerous Ducklings Add two new mission-based achievements New mission 'Nobody Laugh' diff -r 52a8ee2e8324 -r 553355472675 share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_Nobody_Laugh.png Binary file share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_Nobody_Laugh.png has changed diff -r 52a8ee2e8324 -r 553355472675 share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_Nobody_Laugh@2x.png Binary file share/hedgewars/Data/Graphics/Missions/Training/User_Mission_-_Nobody_Laugh@2x.png has changed diff -r 52a8ee2e8324 -r 553355472675 share/hedgewars/Data/Locale/missions_en.txt --- a/share/hedgewars/Data/Locale/missions_en.txt Thu May 30 20:29:55 2013 +0900 +++ b/share/hedgewars/Data/Locale/missions_en.txt Thu May 30 21:08:13 2013 +0900 @@ -43,6 +43,9 @@ User_Mission_-_Rope_Knock_Challenge.name=Challenge: Rope Knocking User_Mission_-_Rope_Knock_Challenge.desc="Look behind you!" +User_Mission_-_Nobody_Laugh.name=Mission: Nobody Laugh +User_Mission_-_Nobody_Laugh.desc="This ain't no joke." + User_Mission_-_RCPlane_Challenge.name=Challenge: RC Plane User_Mission_-_RCPlane_Challenge.desc="Feeling pretty confident, eh, flyboy?" diff -r 52a8ee2e8324 -r 553355472675 share/hedgewars/Data/Missions/Training/User_Mission_-_Dangerous_Ducklings.lua --- a/share/hedgewars/Data/Missions/Training/User_Mission_-_Dangerous_Ducklings.lua Thu May 30 20:29:55 2013 +0900 +++ b/share/hedgewars/Data/Missions/Training/User_Mission_-_Dangerous_Ducklings.lua Thu May 30 21:08:13 2013 +0900 @@ -1,11 +1,9 @@ HedgewarsScriptLoad("/Scripts/Locale.lua") - local player = nil -- This variable will point to the hog's gear local instructor = nil local enemy = nil ---local givenSpeech = false local speechStage = 0 @@ -33,22 +31,18 @@ AddTeam(loc("Bloody Rookies"), 14483456, "Simple", "Island", "Default") player = AddHog(loc("Hunter"), 0, 1, "NoHat") + instructor = AddHog(loc("Instructor"), 0, 100, "sf_vega") - --AddTeam("Instructors", 14483456, "Simple", "Island", "Default") - instructor = AddHog(loc("Instructor"), 1, 1, "sf_vega") - - AddTeam("Blue Team", 29439, "Simple", "Island", "Default") - enemy = AddHog("Filthy Blue", 1, 100, "Skull") + AddTeam(loc("Blue Team"), 29439, "Simple", "Island", "Default") + enemy = AddHog(loc("Filthy Blue"), 1, 100, "Skull") SetGearPosition(player,146,902) SetGearPosition(instructor,317,902) SetGearPosition(enemy,1918,837) - HogSay(player, ".............................", SAY_THINK) HogTurnLeft(instructor, true) - end @@ -59,15 +53,7 @@ FollowGear(player) - --spawnTarget() - - -- Show some nice mission goals. - -- Parameters are: caption, sub caption, description, - -- extra text, icon and time to show. - -- A negative icon parameter (-n) represents the n-th weapon icon - -- A positive icon paramter (n) represents the (n+1)-th mission icon - -- A timeframe of 0 is replaced with the default time to show. - ShowMission(loc("Dangerous Ducklings"), "", loc("Eliminate the Blue Team"), -amRope, 1); + ShowMission(loc("Dangerous Ducklings"), "", loc("Eliminate the Blue Team"), -amRope, 5000); end @@ -101,15 +87,14 @@ end - -- if player falls in water or if player ignores speech if (CurrentHedgehog ~= nil) and (CurrentHedgehog == player) then - if (GetY(player) > 2060) and (gameLost == false) then + if (GetY(player) > WaterLine) and (gameLost == false) then HogSay(instructor, loc("DAMMIT, ROOKIE!"), SAY_SHOUT) gameLost = true end - if (GetX(player) > 1324) and (GetY(player) > 1908) and (notListening == false) and (speechStage < 3) then + if (GetX(player) > 300) and (GetY(player) > 880) and (notListening == false) and (speechStage < 3) then HogSay(instructor, loc("DAMMIT, ROOKIE! GET OFF MY HEAD!"), SAY_SHOUT) notListening = true end @@ -126,10 +111,11 @@ endTimer = endTimer + 1 if (CurrentHedgehog ~= nil) and (CurrentHedgehog == instructor) then if endTimer >= 3000 then - SetHealth(instructor,0) - TurnTimeLeft = 0 + --SetHealth(instructor,0) + TurnTimeLeft = 1 + ParseCommand("teamgone " .. loc("Bloody Rookies")) end - ShowMission(loc("MISSION FAILED"), loc(":("), loc("You've failed. Try again."), -amRope, 1); + ShowMission(loc("MISSION FAILED"), loc(":("), loc("You've failed. Try again."), -amRope, 5000); end end @@ -146,9 +132,12 @@ if GetGearType(gear) == gtHedgehog then if gear == player then gameLost = true - elseif gear == instructor then + elseif (gear == instructor) and (GetY(gear) > WaterLine) then HogSay(player, loc("See ya!"), SAY_THINK) TurnTimeLeft = 3000 + AddCaption(loc("Achievement Unlocked") .. ": " .. loc("Naughty Ninja"),0xffba00ff,capgrpMessage2) + ParseCommand("teamgone " .. loc("Blue Team")) + gameWon = true elseif gear == enemy then HogSay(player, loc("Enjoy the swim..."), SAY_THINK) gameWon = true diff -r 52a8ee2e8324 -r 553355472675 share/hedgewars/Data/Missions/Training/User_Mission_-_Nobody_Laugh.lua --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/share/hedgewars/Data/Missions/Training/User_Mission_-_Nobody_Laugh.lua Thu May 30 21:08:13 2013 +0900 @@ -0,0 +1,130 @@ +-------------------------------------- +-- NOBODY LAUGH +-- a hilarious (not really) adventure +-------------------------------------- + +HedgewarsScriptLoad("/Scripts/Locale.lua") +HedgewarsScriptLoad("/Scripts/Tracker.lua") + +local hhs = {} + +function onGameInit() + + Seed = 0 + GameFlags = gfInfAttack + gfPerHogAmmo +gfDisableWind + SuddenDeathTurns = 9999 + TurnTime = 180000 + CaseFreq = 0 + MinesNum = 0 + Explosives = 0 + Map = "Bath" + Theme = "Nature" + + AddTeam(loc("Nameless Heroes"), 14483456, "eyecross", "Wood", "HillBilly", "cm_birdy") + hhs[1] = AddHog(loc( "Hunter" ), 0, 1, "Skull") + SetGearPosition(hhs[1], 1267, 451) + hhs[2] = AddHog(loc("Drowner"), 0, 31, "mp3") + SetGearPosition(hhs[2], 1332, 451) + + AddTeam(loc("Clowns"), 1175851, "Duck2", "Tank", "Mobster", "cm_spider") + hhs[3] = AddHog("Poison", 5, 100, "WhySoSerious") + SetGearPosition(hhs[3], 1133, 446) + hhs[4] = AddHog("Bobo", 5, 100, "clown") + SetGearPosition(hhs[4], 1215, 553) + hhs[5] = AddHog("Copper", 5, 10, "clown-copper") + SetGearPosition(hhs[5], 414, 376) + hhs[6] = AddHog("Derp", 5, 100, "clown-crossed") + SetGearPosition(hhs[6], 1590, 886) + hhs[7] = AddHog("Eckles", 5, 100, "clown-copper") + SetGearPosition(hhs[7], 772, 754) + hhs[8] = AddHog("Frank", 5, 50, "clown-copper") + SetGearPosition(hhs[8], 1688, 714) + hhs[9] = AddHog("Harry", 5, 50, "clown-copper") + SetGearPosition(hhs[9], 1932, 837) + hhs[10] = AddHog("Igmund", 5, 50, "WhySoSerious") + SetGearPosition(hhs[10], 1601, 733) + +end + +function onGameStart() + + AddAmmo(enemy, amAirAttack, 100) + + ShowMission( loc("Nobody Laugh"), + loc("User Challenge"), + loc("Eliminate the enemy before the time runs out") + , 0, 0 + ) + + -- GIRDERS + PlaceGirder(1212, 710, 7) + PlaceGirder(1215, 570, 4) + PlaceGirder(1288, 520, 2) + PlaceGirder(1184, 468, 4) + PlaceGirder(1344, 468, 4) + PlaceGirder(1247, 346, 4) + + PlaceGirder(667, 438, 4) + PlaceGirder(507, 438, 4) + PlaceGirder(434, 487, 2) + PlaceGirder(505, 537, 4) + PlaceGirder(665, 537, 4) + PlaceGirder(737, 487, 2) + + PlaceGirder(416, 465, 6) + PlaceGirder(1415, 378, 6) + PlaceGirder(1300, 625, 3) + PlaceGirder(1359, 566, 3) + PlaceGirder(1436, 538, 0) + PlaceGirder(1505, 468, 4) + + ------ AMMO CRATE LIST ------ + tempG = SpawnAmmoCrate(1242, 315, amBaseballBat) + tempG = SpawnAmmoCrate(1309, 315, amAirAttack) + tempG = SpawnAmmoCrate(144, 895, amAirAttack) + tempG = SpawnAmmoCrate(664, 699, amIceGun) + tempG = SpawnAmmoCrate(1572, 444, amFirePunch) + tempG = SpawnAmmoCrate(1574, 382, amDynamite) + + ------ UTIL CRATE LIST ------ + tempG = SpawnUtilityCrate(654, 513, amParachute) + tempG = SpawnUtilityCrate(1569, 413, amParachute) + + -- HOG AMMO + AddAmmo(hhs[1],amParachute,1) + AddAmmo(hhs[1],amHammer,1) + AddAmmo(hhs[2],amWhip,1) + + for i = 3, 10 do + AddAmmo(hhs[i], amDeagle, 100) + AddAmmo(hhs[i], amShotgun, 100) + AddAmmo(hhs[i], amGrenade, 100) + AddAmmo(hhs[i], amBazooka, 100) + AddAmmo(hhs[i], amDrill, 100) + end + +end + +function onNewTurn() + SetWind(100) +end + +function onAmmoStoreInit() + + SetAmmo(amBaseballBat, 0, 0, 0, 1) + SetAmmo(amAirAttack, 0, 0, 0, 1) + SetAmmo(amFirePunch, 0, 0, 0, 1) + SetAmmo(amDynamite, 0, 0, 0, 1) + SetAmmo(amHammer, 0, 0, 0, 1) + SetAmmo(amIceGun, 0, 0, 0, 1) + + SetAmmo(amParachute, 0, 0, 0, 1) + + SetAmmo(amSwitch, 9, 0, 0, 0) + SetAmmo(amSkip, 9, 0, 0, 0) + +end + +------------------------------ +-- I'm in whitesppaaaaaaaaaacceeeee :D +------------------------------ diff -r 52a8ee2e8324 -r 553355472675 share/hedgewars/Data/Missions/Training/User_Mission_-_RCPlane_Challenge.lua --- a/share/hedgewars/Data/Missions/Training/User_Mission_-_RCPlane_Challenge.lua Thu May 30 20:29:55 2013 +0900 +++ b/share/hedgewars/Data/Missions/Training/User_Mission_-_RCPlane_Challenge.lua Thu May 30 21:08:13 2013 +0900 @@ -20,7 +20,7 @@ Explosives = 0 AddTeam(loc("Wannabe Flyboys"), 14483456, "Simple", "Island", "Default", "Hedgewars") - player = AddHog(loc("Ace"), 0, 80, "Gasmask") --NoHat + player = AddHog(loc("Ace"), 0, 80, "Gasmask") SetGearPosition(player, 1380, 1500) end @@ -314,6 +314,10 @@ if cratesLeft == 0 then + if planesUsed == 1 then + AddCaption(loc("Achievement Unlocked") .. ": " .. loc("Prestigious Pilot"),0xffba00ff,capgrpMessage2) + end + ShowMission ( loc("CHALLENGE COMPLETE"), loc("Congratulations!"),