share/hedgewars/Data/Missions/Challenge/User_Mission_-_Rope_Knock_Challenge.lua
changeset 12738 49c45424a333
parent 12586 7510fe66bfbb
child 12739 2f873afda0e2
equal deleted inserted replaced
12737:d08afea02908 12738:49c45424a333
     5 local endTimer = 1000
     5 local endTimer = 1000
     6 local hogsKilled = 0
     6 local hogsKilled = 0
     7 local finishTime
     7 local finishTime
     8 
     8 
     9 local HogData =	{
     9 local HogData =	{
       
    10 					{"amn",			"NinjaFull",false},
       
    11 					{"alfadur",		"NoHat",false},
       
    12 					{"Anachron",		"war_americanww2helmet",false},
    10 					{"Bufon", 			"ShaggyYeti",false},
    13 					{"Bufon", 			"ShaggyYeti",false},
    11 					{"burp", 			"lambda",false},
    14 					{"burp", 			"lambda",false},
    12 					{"Blue", 			"cap_blue",false},
    15 					{"Blue", 			"cap_blue",false},
    13 					{"bender", 			"NoHat",false},
    16 					{"bender", 			"NoHat",false},
    14 					{"Castell",			"NoHat",false},
    17 					{"Castell",			"NoHat",false},
    15 					{"cekoto", 			"NoHat",false},
    18 					{"cekoto", 			"NoHat",false},
    16 					{"CheezeMonkey",	"NoHat",false},
    19 					{"CheezeMonkey",	"NoHat",false},
    17 					{"claymore", 		"NoHat",false},
    20 					{"claymore", 		"NoHat",false},
    18 					{"CIA-144", 		"cyborg1",false},
    21 					{"CIA-144", 		"cyborg1",false},
       
    22 					{"cri.the.grinch",	"sf_blanka",false},
       
    23 					{"eldiablo",		"Evil",false},
       
    24 					{"Displacer",		"fr_lemon",false},
    19 					{"doomy ", 			"NoHat",false},
    25 					{"doomy ", 			"NoHat",false},
    20 					{"Falkenauge", 		"NoHat",false},
    26 					{"Falkenauge", 		"NoHat",false},
    21 					{"FadeOne", 		"NoHat",false},
    27 					{"FadeOne", 		"NoHat",false},
    22 					{"hayaa", 			"NoHat",false},
    28 					{"hayaa", 			"NoHat",false},
    23 					{"Hermes", 			"laurel",false},
    29 					{"Hermes", 			"laurel",false},
       
    30 					{"Henek", 		"WizardHat",false},
    24 					{"HedgeKing",		"NoHat",false},
    31 					{"HedgeKing",		"NoHat",false},
    25 					{"Izack1535", 		"NoHat",false},
    32 					{"Izack1535", 		"NoHat",false},
    26 					{"Kiofspa", 		"NoHat",false},
    33 					{"Kiofspa", 		"NoHat",false},
       
    34 					{"KoBeWi",		"NoHat",false},
    27 					{"Komplex", 		"NoHat",false},
    35 					{"Komplex", 		"NoHat",false},
    28 					{"koda", 			"poke_mudkip",false},
    36 					{"koda", 			"poke_mudkip",false},
    29 					{"Lalo", 			"NoHat",false},
    37 					{"Lalo", 			"NoHat",false},
    30 					{"Logan", 			"NoHat",false},
    38 					{"Logan", 			"NoHat",false},
    31 					{"lollkiller", 		"NoHat",false},
    39 					{"lollkiller", 		"NoHat",false},
    39 					{"Randy",			"zoo_Sheep",false},
    47 					{"Randy",			"zoo_Sheep",false},
    40 					{"rhino", 			"NinjaTriangle",false},
    48 					{"rhino", 			"NinjaTriangle",false},
    41 					{"Radissthor",  	"NoHat",false},
    49 					{"Radissthor",  	"NoHat",false},
    42 					{"Sami",			"sm_peach",false},
    50 					{"Sami",			"sm_peach",false},
    43 					{"soreau", 			"NoHat",false},
    51 					{"soreau", 			"NoHat",false},
       
    52 					{"Solar",		"pinksunhat",false},
       
    53 					{"szczur", 		"mp3",false},
    44 					{"sdw195", 			"NoHat",false},
    54 					{"sdw195", 			"NoHat",false},
    45 					{"sphrix", 			"TeamTopHat",false},
    55 					{"sphrix", 			"TeamTopHat",false},
    46 					{"sheepluva",		"zoo_Sheep",false},
    56 					{"sheepluva",		"zoo_Sheep",false},
    47 					{"Smaxx", 			"NoHat",false},
    57 					{"Smaxx", 			"NoHat",false},
    48 					{"shadowzero", 		"NoHat",false},
    58 					{"shadowzero", 		"NoHat",false},
    51 					{"TLD",				"NoHat",false},
    61 					{"TLD",				"NoHat",false},
    52 					{"Tiyuri", 			"sf_ryu",false},
    62 					{"Tiyuri", 			"sf_ryu",false},
    53 					{"unC0Rr", 			"cyborg1",false},
    63 					{"unC0Rr", 			"cyborg1",false},
    54 					{"Waldsau", 		"cyborg1",false},
    64 					{"Waldsau", 		"cyborg1",false},
    55 					{"wolfmarc", 		"knight",false},
    65 					{"wolfmarc", 		"knight",false},
       
    66 					{"Wuzzy",		"fr_orange",false},
    56 					{"Xeli", 			"android",false}
    67 					{"Xeli", 			"android",false}
    57 
    68 
    58 				}
    69 				}
    59 
    70 
    60 function GenericEnd()
    71 function GenericEnd()
    65 	missionWon = false
    76 	missionWon = false
    66 	ShowMission(loc("Rope-knocking Challenge"), loc("Challenge over!"), loc("Oh no! Just try again!"), -amSkip, 0)
    77 	ShowMission(loc("Rope-knocking Challenge"), loc("Challenge over!"), loc("Oh no! Just try again!"), -amSkip, 0)
    67 	SendStat(siGameResult, loc("Challenge over!"))
    78 	SendStat(siGameResult, loc("Challenge over!"))
    68 	local score = math.ceil((hogsKilled / 16)*6000)
    79 	local score = math.ceil((hogsKilled / 16)*6000)
    69 	SendStat(siCustomAchievement, string.format(loc("You have killed %d of 16 hedgehogs (+%d points)."), hogsKilled, score))
    80 	SendStat(siCustomAchievement, string.format(loc("You have killed %d of 16 hedgehogs (+%d points)."), hogsKilled, score))
    70 	SendStat(siPointType, "points")
    81 	SendStat(siPointType, loc("points"))
    71 	SendStat(siPlayerKills, tostring(score), loc("Wannabe Shoppsta"))
    82 	SendStat(siPlayerKills, tostring(score), loc("Wannabe Shoppsta"))
    72 	PlaySound(sndHellish)
    83 	PlaySound(sndHellish)
    73 end
    84 end
    74 
    85 
    75 function GG()
    86 function GG()
    81 	local hogScore = math.ceil((hogsKilled / 16)*6000)
    92 	local hogScore = math.ceil((hogsKilled / 16)*6000)
    82 	local timeScore = math.ceil((finishTime/TurnTime)*6000)
    93 	local timeScore = math.ceil((finishTime/TurnTime)*6000)
    83 	local score = hogScore + timeScore
    94 	local score = hogScore + timeScore
    84 	SendStat(siCustomAchievement, string.format(loc("You have killed %d of 16 hedgehogs (+%d points)."), hogsKilled, hogScore))
    95 	SendStat(siCustomAchievement, string.format(loc("You have killed %d of 16 hedgehogs (+%d points)."), hogsKilled, hogScore))
    85 	SendStat(siCustomAchievement, string.format(loc("You have completed this challenge in %.2f s (+%d points)."), completeTime, timeScore))
    96 	SendStat(siCustomAchievement, string.format(loc("You have completed this challenge in %.2f s (+%d points)."), completeTime, timeScore))
    86 	SendStat(siPointType, "points")
    97 	SendStat(siPointType, loc("points"))
    87 	SendStat(siPlayerKills, tostring(score), loc("Wannabe Shoppsta"))
    98 	SendStat(siPlayerKills, tostring(score), loc("Wannabe Shoppsta"))
    88 end
    99 end
    89 
   100 
    90 function AssignCharacter(p)
   101 function AssignCharacter(p)
    91 
   102