share/hedgewars/Data/Scripts/Multiplayer/Mutant.lua
author unc0rr
Wed, 01 Jan 2014 00:45:28 +0400
branch0.9.20
changeset 9897 f705dc750df2
parent 9083 6d2efdca5da2
child 10017 de822cd3df3a
child 10036 3be36d2fdca6
permissions -rw-r--r--
This is the way I like it: - Only call fpc on hwengine.pas, let compiler rule the dependencies - Make hwengine.pas depend on all other source files, so 'make' always calls fpc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
9083
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
     1
local MUTANT_VERSION = "v0.9.5"
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
     2
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
     3
--[[                  ___                   ___
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
     4
                    (   )                 (   )
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
     5
___ .-. .-. ___  ___ | |_    .---. ___ .-. | |_
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
     6
(   )   '   (   )(   (   __) / .-, (   )   (   __)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
     7
|  .-.  .-. | |  | | | |   (__) ; ||  .-. .| |
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
     8
| |  | |  | | |  | | | | ___ .'`  || |  | || | ___
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
     9
| |  | |  | | |  | | | |(   / .'| || |  | || |(   )
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    10
| |  | |  | | |  | | | | | | /  | || |  | || | | |
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    11
| |  | |  | | |  ; ' | ' | ; |  ; || |  | || ' | |
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    12
| |  | |  | ' `-'  / ' `-' ' `-'  || |  | |' `-' ;
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    13
(___)(___)(___'.__.'   `.__.`.__.'_(___)(___)`.__.
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    14
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    15
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    16
----  Recommended settings:
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    17
----    * one hedgehog per team
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    18
----    * 'Small' one-island map
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    19
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    20
--]]
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    21
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    22
HedgewarsScriptLoad("/Scripts/Locale.lua")
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    23
HedgewarsScriptLoad("/Scripts/Tracker.lua")
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    24
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    25
--[[
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    26
    MUTANT SCRIPT
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    27
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    28
    To Do:  -Clean-up this fucking piece of code
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    29
            -Debug
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    30
            -Find a girlfriend
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    31
            -Fix Sheepluva's hat  +[p]
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    32
            -Cookies
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    33
-----------------------]]
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    34
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    35
local hhs = {}
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    36
local numhhs = 0
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    37
local meh = false
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    38
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    39
local gameOver=false
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    40
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    41
local mutant = nil
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    42
local mutant_base_health = 200
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    43
local mutant_base_disease = 25
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    44
local disease_timer = 2000
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    45
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    46
local kill_reward = nil
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    47
local mt_hurt=false
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    48
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    49
local killsCounter = 0
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    50
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    51
local team_fire_punishment = 3
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    52
local mutant_kill_reward = 2
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    53
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    54
local hh_weapons = { amBazooka, amGrenade, amShotgun, amMine}
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    55
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    56
local mt_weapons = {amWatermelon, amHellishBomb, amBallgun, amRCPlane, amTeleport}
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    57
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    58
local disease=0
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    59
local timer=0
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    60
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    61
local winScore = 15
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    62
local hogsLimit = 1
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    63
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    64
local teams = {}
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    65
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    66
local circles = {}
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    67
local circleFrame = -1
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    68
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    69
function showStartingInfo()
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    70
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    71
	ruleSet = loc("RULES") .. ": " ..
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    72
	" |" .. --" |" ..
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    73
	loc("The first player to kill someone becomes the Mutant.") .. "|" ..
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    74
	loc("The Mutant has super-weapons and a lot of health.") .. "|" ..
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    75
	loc("The Mutant loses health quickly if he doesn't keep scoring kills.") .. "|" ..
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    76
	" |" ..
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    77
	loc("Normal players can only score points by killing the mutant.") .. "|" ..
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    78
	" |" .. "" ..
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    79
	loc("The player with least points (or most deaths) becomes the Bottom Feeder.") .. "|" ..
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    80
	loc("The Bottom Feeder can score points by killing anyone.") .. "|" ..
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    81
	" |" ..
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    82
	loc("POINTS") .. ": " ..
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    83
	" |" ..
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    84
	loc("+2 for becoming a Mutant") .. "|" ..
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    85
	loc("+1 to a Mutant for killing anyone") .. "|" ..
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    86
	loc("+1 to a Bottom Feeder for killing anyone") .. "|" ..
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    87
	loc("-1 to anyone for a suicide") .. "|" ..
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    88
	loc("Other kills don't give you points.")
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    89
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    90
	ShowMission(loc("Mutant"),
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    91
                loc("a Hedgewars tag game"),
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    92
                ruleSet, 0, 5000)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    93
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    94
end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    95
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    96
function onGameInit()
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    97
    TurnTime = 20000
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    98
    WaterRise = 0
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
    99
    GameFlags = GameFlags + gfResetWeps + gfPerHogAmmo
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   100
    HealthCaseProb=0
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   101
    HealthCaseAmount=0
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   102
    MinesTime=1000
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   103
    CaseFreq = 2
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   104
end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   105
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   106
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   107
function limitHogs(gear)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   108
    cnthhs = cnthhs + 1
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   109
        if cnthhs > 1 then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   110
            hogLimitHit = true
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   111
            SetEffect(gear, heResurrectable, false)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   112
            --SetHealth(gear, 0)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   113
            SetGearPosition(gear, -100,LAND_HEIGHT)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   114
        end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   115
end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   116
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   117
function onGameStart()
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   118
    trackTeams()
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   119
    teamScan()
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   120
    runOnHogs(saveStuff)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   121
    --local str = "/say " .. MUTANT_VERSION
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   122
    --ParseCommand(str)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   123
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   124
    hogLimitHit = false
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   125
    for i=0 , TeamsCount - 1 do
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   126
        cnthhs = 0
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   127
        runOnHogsInTeam(limitHogs, teams[i])
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   128
    end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   129
    if hogLimitHit then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   130
        AddCaption(loc("ONE HOG PER TEAM! KILLING EXCESS HEDGES"))
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   131
    end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   132
    showStartingInfo()
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   133
end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   134
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   135
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   136
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   137
function giveWeapons(gear)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   138
    if gear == mutant then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   139
        AddAmmo(gear, amRope)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   140
        for i=1, #mt_weapons do
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   141
            AddAmmo(gear, mt_weapons[i])
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   142
        end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   143
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   144
    else
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   145
        for i=1, #hh_weapons do
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   146
            AddAmmo(gear,hh_weapons[i])
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   147
        end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   148
    end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   149
end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   150
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   151
function onAmmoStoreInit()
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   152
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   153
    SetAmmo(amSkip, 9, 0, 0, 0)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   154
    SetAmmo(amRope,0,1,0,5)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   155
    SetAmmo(amSnowball,0,1,0,1)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   156
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   157
    for i=1, #hh_weapons do
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   158
        SetAmmo(hh_weapons[i], 0, 0, 0, 1)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   159
    end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   160
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   161
    for i=1, #mt_weapons do
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   162
        SetAmmo(mt_weapons[i], 0, 3, 0, 1)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   163
    end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   164
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   165
end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   166
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   167
function drawCircles()
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   168
    for i = 0, #hhs do
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   169
        if circles[hhs[i]] ~= nil then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   170
            DeleteVisualGear(circles[hhs[i]])
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   171
            circles[hhs[i]] = nil
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   172
        end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   173
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   174
        if hhs[i] ~= CurrentHedgehog then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   175
            if mutant == nil then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   176
                circles[hhs[i]] = AddVisualGear(0, 0, vgtCircle, 0, false)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   177
                SetVisualGearValues(circles[hhs[i]], 0, 0, 0, 0, 0, 0, 0, 22, 5, 0xff000080)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   178
            elseif CurrentHedgehog == mutant then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   179
                circles[hhs[i]] = AddVisualGear(0, 0, vgtCircle, 0, false)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   180
                SetVisualGearValues(circles[hhs[i]], 0, 0, 0, 0, 0, 0, 0, 22, 3, 0xaa000070)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   181
            elseif getGearValue(CurrentHedgehog, "Feeder") and hhs[i] ~= mutant then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   182
                circles[hhs[i]] = AddVisualGear(0, 0, vgtCircle, 0, false)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   183
                SetVisualGearValues(circles[hhs[i]], 0, 0, 0, 0, 0, 0, 0, 22, 3, 0xaa000070)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   184
            elseif hhs[i] == mutant then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   185
                circles[hhs[i]] = AddVisualGear(0, 0, vgtCircle, 0, false)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   186
                SetVisualGearValues(circles[hhs[i]], 0, 0, 0, 0, 0, 0, 0, 22, 5, 0xff000080)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   187
            end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   188
        end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   189
    end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   190
    circleFrame = 0
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   191
end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   192
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   193
function onNewTurn()
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   194
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   195
    trackTeams()
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   196
    killsCounter = 0
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   197
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   198
    if mutant == nil then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   199
        AddCaption( loc("FIRST BLOOD MUTATES") )
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   200
    end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   201
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   202
    checkScore()
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   203
    giveWeapons(CurrentHedgehog)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   204
    drawCircles()
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   205
    setAIHints()
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   206
    kill_reward= numhhs*10
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   207
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   208
    if CurrentHedgehog == mutant then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   209
        mt_hurt=true
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   210
        disease= mutant_base_disease - numhhs
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   211
    else
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   212
        mt_hurt=false
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   213
    end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   214
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   215
    setGearValue(CurrentHedgehog, "Alive", true)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   216
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   217
end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   218
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   219
function countBodies()
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   220
        if killsCounter == 2 then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   221
            AddCaption(loc("DOUBLE KILL"))
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   222
        elseif killsCounter == 3 then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   223
            AddCaption(loc("MEGA KILL"))
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   224
            PlaySound(sndRegret)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   225
        elseif killsCounter == 4 then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   226
            AddCaption(loc("ULTRA KILL"))
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   227
        elseif killsCounter == 5 then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   228
            AddCaption(loc("MONSTER KILL"))
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   229
            PlaySound(sndIllGetYou)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   230
        elseif killsCounter == 6 then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   231
            AddCaption(loc("LUDICROUS KILL"))
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   232
            PlaySound(sndNutter)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   233
        elseif killsCounter == 7 then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   234
            AddCaption(loc("HOLY SHYTE!"))
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   235
            PlaySound(sndLaugh)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   236
        elseif killsCounter > 8 then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   237
            AddCaption(loc("INSANITY"))
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   238
        end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   239
end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   240
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   241
function onGameTick()
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   242
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   243
    if circleFrame > -1 then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   244
        for i = 0, #hhs do
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   245
            if circles[hhs[i]] ~= nil and hhs[i]~= nil then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   246
                hhx, hhy = GetGearPosition(hhs[i])
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   247
                X, Y, dX, dY, Angle, Frame, FrameTicks, State, Timer, Tint = GetVisualGearValues(circles[hhs[i]])
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   248
                SetVisualGearValues(circles[hhs[i]], hhx + 1, hhy - 3, 0, 0, 0, 0, 0, 40 - (circleFrame % 25), Timer, Tint)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   249
            end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   250
        end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   251
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   252
        circleFrame = circleFrame + 0.06
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   253
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   254
        if circleFrame >= 25 then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   255
            for i = 0, #hhs do
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   256
                if circles[hhs[i]] ~= nil then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   257
                    DeleteVisualGear(circles[hhs[i]])
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   258
                    circles[hhs[i]] = nil
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   259
                end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   260
            end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   261
        end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   262
    end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   263
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   264
    if TurnTimeLeft==0 and mt_hurt then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   265
        mt_hurt = false
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   266
    end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   267
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   268
    if mt_hurt and mutant~=nil then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   269
        timer = timer + 1
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   270
            if timer > disease_timer then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   271
                timer = 0
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   272
                SetHealth(mutant, GetHealth(mutant)-disease )
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   273
                AddVisualGear(GetX(mutant), GetY(mutant)-5, vgtHealthTag, disease, true)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   274
                    if GetHealth(mutant)<=0 then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   275
                        SetHealth(mutant,0)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   276
                        mt_hurt= false
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   277
                        setGearValue(mutant,"SelfDestruct",true)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   278
                        TurnTimeLeft = 0
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   279
                    end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   280
            end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   281
    end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   282
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   283
end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   284
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   285
function saveStuff(gear)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   286
    setGearValue(gear,"Name",GetHogName(gear))
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   287
    setGearValue(gear,"Hat",GetHogHat(gear))
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   288
end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   289
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   290
function armageddon(gear)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   291
    SetState(gear, gstLoser)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   292
    SetEffect(gear, heResurrectable, false)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   293
    SetHealth(gear, 0)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   294
end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   295
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   296
function updateScore()
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   297
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   298
    local showScore = ""
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   299
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   300
    for i=0, TeamsCount-1 do
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   301
        if teams[i]~= nil then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   302
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   303
            local curr_score = getTeamValue(teams[i], "Score")
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   304
            showScore = showScore .. teams[i] .. ": " .. curr_score .. " (deaths: " .. getTeamValue(teams[i], "DeadHogs") .. ") " .. "|"
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   305
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   306
        end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   307
    end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   308
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   309
    ShowMission(loc("Score"),
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   310
                "-------",
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   311
                showScore, 0, 200)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   312
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   313
    HideMission()
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   314
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   315
end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   316
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   317
function checkScore()
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   318
local showScore = ""
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   319
local lowest_score_team = nil
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   320
local min_score=nil
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   321
local winTeam = nil
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   322
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   323
local only_low_score = true
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   324
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   325
    for i=0, TeamsCount-1 do
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   326
        if teams[i]~=nil then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   327
            local curr_score = getTeamValue(teams[i], "Score")
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   328
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   329
            runOnHogsInTeam(removeFeeder, teams[i])
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   330
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   331
            showScore = showScore .. teams[i] ..": " .. curr_score .. " (deaths: " .. getTeamValue(teams[i], "DeadHogs") .. ") " .. "|"
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   332
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   333
            if curr_score >= winScore then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   334
                gameOver = true
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   335
                winTeam = teams[i]
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   336
            end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   337
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   338
            if min_score==nil then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   339
                min_score= curr_score
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   340
                lowest_score_team = teams[i]
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   341
            else
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   342
                if curr_score <= min_score then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   343
                    if curr_score == min_score then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   344
                        if getTeamValue(teams[i], "DeadHogs") == getTeamValue(lowest_score_team, "DeadHogs") then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   345
                            only_low_score = false
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   346
                        else
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   347
                            if getTeamValue(teams[i], "DeadHogs") > getTeamValue(lowest_score_team, "DeadHogs") then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   348
                                lowest_score_team = teams[i]
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   349
                            end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   350
                            only_low_score = true
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   351
                        end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   352
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   353
                    else
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   354
                        min_score= curr_score
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   355
                        lowest_score_team = teams[i]
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   356
                        only_low_score = true
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   357
                    end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   358
                end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   359
            end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   360
        end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   361
    end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   362
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   363
    if gameOver then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   364
        TurnTimeLeft = 0
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   365
        for i=0, #teams do
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   366
            if teams[i]~=winTeam then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   367
                runOnHogsInTeam(armageddon, teams[i])
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   368
            end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   369
        end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   370
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   371
    ShowMission(    loc("WINNER IS ") .. winTeam,
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   372
                    "~~~~~~~~~~~~~~~~~~~~~~~~~",
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   373
                    showScore, 0, 200)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   374
    else
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   375
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   376
    if only_low_score then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   377
        runOnHogsInTeam(setFeeder, lowest_score_team)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   378
    end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   379
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   380
    if meh == false then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   381
		meh = true
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   382
	else
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   383
		ShowMission(    loc("Score"),
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   384
                    loc("-------"),
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   385
                    showScore, 0, 200)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   386
	end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   387
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   388
    end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   389
end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   390
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   391
function backToNormal(gear)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   392
    SetHogName(gear, getGearValue(gear,"Name"))
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   393
    SetHogHat(gear, 'NoHat')
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   394
    SetHogHat(gear, getGearValue(gear,"Hat"))
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   395
    setGearValue(mutant,"SelfDestruct",false)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   396
    mt_hurt=false
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   397
    mutant=nil
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   398
end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   399
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   400
function setAIHints()
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   401
    for i = 0, #hhs do
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   402
        if mutant == nil or hhs[i] == mutant or CurrentHedgehog == mutant then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   403
            SetGearAIHints(hhs[i], aihUsual)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   404
        else
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   405
            SetGearAIHints(hhs[i], aihDoesntMatter)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   406
        end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   407
    end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   408
end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   409
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   410
function removeFeeder(gear)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   411
    if gear~=nil then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   412
        setGearValue(gear,"Feeder",false)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   413
        if gear~= mutant then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   414
            SetHogName(gear, getGearValue(gear,"Name") )
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   415
            SetHogHat(gear, 'NoHat')
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   416
            SetHogHat(gear, getGearValue(gear,"Hat"))
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   417
        end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   418
    end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   419
end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   420
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   421
function setFeeder(gear)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   422
    if gear~= mutant and gear~= nil then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   423
        SetHogName(gear,"BOTTOM FEEDER")
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   424
        SetHogHat(gear, 'poke_slowpoke')
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   425
        setGearValue(gear,"Feeder", true)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   426
    end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   427
end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   428
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   429
function setMutantStuff(gear)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   430
    mutant = gear
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   431
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   432
    SetHogName(gear,"MUTANT")
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   433
    SetHogHat(gear,'WhySoSerious')
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   434
    SetHealth(gear, ( mutant_base_health + numhhs*25) )
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   435
    SetEffect(gear, hePoisoned, 1)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   436
    setGearValue(mutant,"SelfDestruct",false)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   437
    setGearValue(gear, "Feeder", false)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   438
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   439
    AddCaption(getGearValue(gear, "Name") .. loc(" HAS MUTATED"))
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   440
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   441
    TurnTimeLeft=0
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   442
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   443
    AddVisualGear(GetX(gear), GetY(gear), vgtSmokeRing, 0, false)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   444
    AddVisualGear(GetX(gear), GetY(gear), vgtSmokeRing, 0, false)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   445
    AddVisualGear(GetX(gear), GetY(gear), vgtSmokeRing, 0, false)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   446
    AddVisualGear(GetX(gear), GetY(gear), vgtSmokeRing, 0, false)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   447
    AddVisualGear(GetX(gear), GetY(gear), vgtSmokeRing, 0, false)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   448
    PlaySound(sndSuddenDeath)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   449
end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   450
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   451
function teamScan()
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   452
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   453
        for i=0, TeamsCount-1 do --nil filling
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   454
        teams[i]=nil
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   455
        end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   456
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   457
        for i=0, #hhs do
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   458
            for j=0, TeamsCount-1 do
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   459
                if teams[j] ==nil and hhs[i]~=nil then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   460
                teams[j] = GetHogTeamName(hhs[i])
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   461
                setTeamValue(teams[j],"Score",0)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   462
                setTeamValue(teams[j], "DeadHogs",0)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   463
                break
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   464
                end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   465
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   466
                if teams[j] == GetHogTeamName(hhs[i]) then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   467
                    break
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   468
                end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   469
            end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   470
        end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   471
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   472
        ---***---
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   473
end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   474
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   475
function set_Mutant_and_Score(gear)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   476
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   477
local curr_team = GetHogTeamName(CurrentHedgehog)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   478
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   479
    if gear == CurrentHedgehog then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   480
        if CurrentHedgehog == mutant then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   481
            PlaySound(sndHomerun)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   482
            if getGearValue(gear, "SelfDestruct")==false then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   483
                decreaseTeamValue(curr_team,"Score")
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   484
            end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   485
            backToNormal(gear)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   486
        else
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   487
            decreaseTeamValue(curr_team,"Score")
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   488
        end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   489
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   490
    else
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   491
            if gear == mutant then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   492
                    backToNormal(mutant)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   493
                    if curr_team ~=GetHogTeamName(gear) then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   494
                            if  getGearValue(CurrentHedgehog, "Alive") then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   495
                            setMutantStuff(CurrentHedgehog)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   496
                            setTeamValue(curr_team,"Score",(getTeamValue(curr_team,"Score") + mutant_kill_reward))
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   497
                            end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   498
                    else
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   499
                        setTeamValue(curr_team,"Score",(getTeamValue(curr_team,"Score") - team_fire_punishment))
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   500
                    end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   501
            else
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   502
                if mutant==nil then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   503
                        if curr_team ~=GetHogTeamName(gear) then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   504
                            if getGearValue(CurrentHedgehog, "Alive") then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   505
                                    setMutantStuff(CurrentHedgehog)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   506
                                    setTeamValue(curr_team,"Score",(getTeamValue(curr_team,"Score") + mutant_kill_reward))
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   507
                            else
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   508
                                increaseTeamValue(curr_team,"Score")
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   509
                            end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   510
                        else
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   511
                            setTeamValue(curr_team,"Score",(getTeamValue(curr_team,"Score") - team_fire_punishment))
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   512
                        end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   513
                else
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   514
                    if curr_team ~=GetHogTeamName(gear) then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   515
                        if CurrentHedgehog==mutant and getGearValue(mutant,"SelfDestruct")==false then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   516
                            SetHealth(CurrentHedgehog, GetHealth(CurrentHedgehog)+kill_reward)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   517
                            AddCaption("+" .. kill_reward .. loc(" HP") )
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   518
                            increaseTeamValue(curr_team,"Score")
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   519
                        end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   520
                        if getGearValue(CurrentHedgehog,"Feeder") then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   521
                            increaseTeamValue(curr_team,"Score")
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   522
                        end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   523
                    else
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   524
                        setTeamValue(curr_team,"Score",(getTeamValue(curr_team,"Score") - team_fire_punishment))
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   525
                    end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   526
                end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   527
            end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   528
    end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   529
end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   530
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   531
function onGearResurrect(gear)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   532
if not gameOver then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   533
    if GetGearType(gear) == gtHedgehog then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   534
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   535
        increaseTeamValue(GetHogTeamName(gear), "DeadHogs")
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   536
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   537
        if gear==CurrentHedgehog then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   538
            setGearValue(CurrentHedgehog, "Alive", false)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   539
        end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   540
        set_Mutant_and_Score(gear)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   541
        if gear~=CurrentHedgehog then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   542
            killsCounter = killsCounter + 1
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   543
            countBodies()
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   544
        end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   545
        AddVisualGear(GetX(gear), GetY(gear), vgtSmokeRing, 0, false)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   546
        PlaySound(sndWhack)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   547
        updateScore()
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   548
    end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   549
end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   550
end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   551
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   552
function onGearAdd(gear)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   553
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   554
    -- Catch hedgehogs for the tracker
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   555
    if GetGearType(gear) == gtHedgehog then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   556
        trackGear(gear)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   557
        hhs[numhhs] = gear
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   558
        numhhs = numhhs + 1
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   559
        SetEffect(gear, heResurrectable, 1)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   560
    end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   561
end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   562
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   563
function checkEmptyTeam (teamName)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   564
    for i=0 , #hhs do
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   565
        if hhs[i]~=nil then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   566
            if teamName == GetHogTeamName(hhs[i]) then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   567
                return false
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   568
            end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   569
        end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   570
    end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   571
    return true
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   572
end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   573
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   574
function onGearDelete(gear)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   575
    -- Remove hogs that are gone
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   576
    if GetGearType(gear) == gtHedgehog then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   577
        numhhs = numhhs - 1
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   578
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   579
        local found
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   580
        for i=0, #hhs do
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   581
            if hhs[i] == gear then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   582
                found = i
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   583
                break
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   584
            end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   585
        end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   586
        for i = found, #hhs - 1 do
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   587
            hhs[i] = hhs[i + 1]
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   588
        end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   589
        hhs[#hhs] = nil
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   590
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   591
        local t_name = GetHogTeamName(gear)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   592
        if checkEmptyTeam(t_name) then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   593
            for i = 0, TeamsCount - 1 do
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   594
                if teams[i] == t_name then
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   595
                    found = i
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   596
                    break
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   597
                end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   598
            end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   599
            for i = found, TeamsCount - 2 do
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   600
                teams[i] = teams[i + 1]
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   601
            end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   602
            teams[TeamsCount - 1] = nil
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   603
            TeamsCount = TeamsCount - 1
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   604
        end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   605
        AddVisualGear(GetX(gear), GetY(gear), vgtBigExplosion, 0, false)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   606
        trackDeletion(gear)
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   607
    end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   608
end
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   609
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   610
--[[
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   611
S T A R R I N G
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   612
    prof - Coding, implementing and evangelism
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   613
    vos  - Initial idea and script improvements
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   614
    mikade - Moving the `how to play` into the game so that people know `how to play`, and whitespace :D
6d2efdca5da2 Add how to play description to Mutant
mikade <redgrinner@gmail.com>
parents: 8057
diff changeset
   615
--]]