survival updates

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7329 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Bukz
2013-03-09 05:56:03 +00:00
parent 73017f445e
commit d015af0cd2
2 changed files with 17 additions and 7 deletions
+2 -2
View File
@@ -23,10 +23,10 @@ old_editbinds = 1
nickhighlight = 0
survMap = (rnd (listlen $defaultmaps))
survDifficulty = 0
survNumBots = 12
survNumBots = 6
survBotsToAdd = 1
timeBetChkPts = 60000
timeUntilTele = 120000
timeUntilTele = 90000
survMaxBots = 32
spamSurvMsgs = 0
nonSurvDefaults = 0
+15 -5
View File
@@ -16,10 +16,10 @@ const resetSurvAliases [
forceinit $survResetAliases 0
check2initlist [spamSurvMsgs survDifficulty nonSurvDefaults] 0
check2initlist [survBotsToAdd survDamageEffects] 1
check2init survNumBots 12; check2init survMaxBots 32; check2init timeBetChkPts 60000; check2init timeUntilTele 120000
check2init survNumBots 6; check2init survMaxBots 20; check2init timeBetChkPts 60000; check2init timeUntilTele 90000
]
checkinit afterinit [ resetSurvAliases; check2init survMap (rnd (listlen $defaultmaps)) ]
checkinit afterinit resetSurvAliases
const genSurvDifStr [
if $nonSurvDefaults [ result "[CUSTOM]" ] [
@@ -54,7 +54,7 @@ checkinit onHit [if $startedSurvival [survOnHit $arg1 $arg2 $arg3 $arg4]]
const survival [
if (> $numargs 1) [ survSetDif $arg2 ]; kickallbots; if (! (player1 team)) [ team RVSF ]
tmpSurvSets = $survNumBots; curSurvDifficulty = 0; survLastKill = []; survTimeBetKills = []; resetSurvAliases
tmpSurvSets = $survNumBots; curSurvDifficulty = 0; forceinit [survLastKill survTimeBetKills] []; resetSurvAliases
checkinit mapstartonce [
startPreSurvMillis = (millis); add2list tmpSurvSets (curmap 1); sleep 3 [ storesets gamma survOrigSets ]
echo (genSurvDifStr) (yellow)Bot survival mode prepared, gather items and find the arena to start! (orange)You have (white) (div $timeUntilTele 1000) (orange)seconds to prepare!
@@ -138,7 +138,17 @@ const findCenter [
midZoneY = (+f (divf (-f (at $tmpSurvZone 3) (at $tmpSurvZone 2)) 2) (at $tmpSurvZone 2))
]
const teleportPlayer [ if (! (player1 alive)) attack; if (!= $gamespeed 100) [ gamespeed 100 ]; survTeleported = 1; findCenter; if (! $editing) edittoggle; go_to $midZoneX $midZoneY; sleep 25 edittoggle ]
const teleportPlayer [
if (&& (! $survIsFinished) (&& $startPreSurvMillis (>= (- (millis) $startPreSurvMillis) 500))) [
if (! (player1 alive)) attack
if (!= $gamespeed 100) [ gamespeed 100 ]
survTeleported = 1
findCenter
if (! $editing) edittoggle
go_to $midZoneX $midZoneY
sleep 25 edittoggle
]
]
const isInZone [ result (&& (checkrange (player1 x) (at $zone 0) (at $zone 1)) (checkrange (player1 y) (at $zone 2) (at $zone 3))) ]
@@ -217,7 +227,7 @@ const increaseDifficulty [
lastCheckPoint = (millis)
if (curmodeattr bot) [
if (<= (+ $survNumBots $survBotsToAdd) $survMaxBots) [ += survNumBots $survBotsToAdd; addnbot $survBotsToAdd CLA best ] [ tmpSurvInt = (- $survMaxBots $survNumBots); += survNumBots $tmpSurvInt; addnbot $tmpSurvInt CLA best ]
if (< $curSurvDifficulty 4) [ += curSurvDifficulty 1; botskillall (at [bad worse medium good best] $curSurvDifficulty) ]
if (< $curSurvDifficulty 4) [ ++ curSurvDifficulty; botskillall (at [bad worse medium good best] $curSurvDifficulty) ]
]
]