STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
229595
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2595 · P5190

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/43689596?noj=FRM43689596-22DC" width="1" height="1"></div>

madness project nexus.swf

This is the info page for
Flash #199014

(Click the ID number above for more basic data on this flash file.)


ActionScript [AS1/AS2]
Combined Code
// unknown tag 88 length 110 movieClip 3 { } button 5 { on (press) { pressSkip(); } on (rollOver) { SwainAudioPlayer.playSound('menu2', 0); } } movieClip 6 madness_cutscene { #initclip Object.registerClass('madness_cutscene', MadnessCutscene); #endinitclip } movieClip 7 pulse_timer { #initclip Object.registerClass('pulse_timer', PulseTimer); #endinitclip } movieClip 8 key_manager { #initclip Object.registerClass('key_manager', KeyManager); #endinitclip } movieClip 20 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _root.myGameSpeed); } onEnterFrame = tick; } frame 23 { _parent.removeMovieClip(); delete _parent; } } movieClip 34 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _root.myGameSpeed); } onEnterFrame = tick; } frame 27 { _parent.removeMovieClip(); delete _parent; } } movieClip 49 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _root.myGameSpeed); } onEnterFrame = tick; } frame 29 { _parent.removeMovieClip(); delete _parent; } } movieClip 70 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _root.myGameSpeed); } onEnterFrame = tick; } frame 41 { _parent.removeMovieClip(); delete _parent; } } movieClip 88 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _root.myGameSpeed); } onEnterFrame = tick; } frame 35 { _parent.removeMovieClip(); delete _parent; } } movieClip 108 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _root.myGameSpeed); } onEnterFrame = tick; } frame 39 { _parent.removeMovieClip(); delete _parent; } } movieClip 133 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _root.myGameSpeed); } onEnterFrame = tick; } frame 25 { _parent.removeMovieClip(); delete _parent; } } movieClip 152 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _root.myGameSpeed); } onEnterFrame = tick; } frame 36 { _parent.removeMovieClip(); delete _parent; } } movieClip 153 madness_effect { } movieClip 155 { } movieClip 159 { } movieClip 161 { } movieClip 163 { } // unknown tag 88 length 68 movieClip 167 { frame 1 { stop(); } } movieClip 173 { } movieClip 175 { frame 1 { _visible = false; } } movieClip 201 { frame 1 { stop(); } } movieClip 202 { frame 1 { function createWound(inNumber) { this['wound' + String(inNumber)] = attachMovie('madness_wound', 'wound' + String(inNumber), getNextHighestDepth()); } } } movieClip 204 { frame 1 { _visible = false; } } movieClip 230 { frame 1 { stop(); } } movieClip 231 { frame 1 { function createWound(inNumber) { this['wound' + String(inNumber)] = attachMovie('madness_wound', 'wound' + String(inNumber), getNextHighestDepth()); } } } movieClip 232 icon_sprite { } movieClip 234 { frame 1 { _visible = false; } } movieClip 236 ui_mug { } movieClip 238 { } movieClip 241 { frame 1 { _visible = MadnessCharacter.myPartOn(this, 'upgradeLaser', 0); } } movieClip 243 { frame 1 { _visible = MadnessCharacter.myPartOn(this, 'upgradeSight', 0); } } movieClip 246 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 247 { } movieClip 249 { } movieClip 253 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 254 { } movieClip 256 { } movieClip 260 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 261 { } movieClip 263 { } movieClip 267 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 268 { } movieClip 270 { } movieClip 273 { frame 1 { _visible = MadnessCharacter.myPartOn(this, 'upgradeLaser', 0); } } movieClip 276 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 277 { } movieClip 281 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 282 { } movieClip 284 { } movieClip 288 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 289 { } movieClip 291 { } movieClip 295 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 296 { } movieClip 298 { } movieClip 302 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 303 { } movieClip 305 { } movieClip 309 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 311 { } movieClip 315 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 319 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 320 { } movieClip 324 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 325 { } movieClip 329 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 330 { } movieClip 334 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 335 { } movieClip 339 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 340 { } movieClip 344 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 345 { } movieClip 349 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 350 { } movieClip 352 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 353 { } movieClip 354 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 355 { } movieClip 358 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 362 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 366 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 370 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 371 { } movieClip 373 { } movieClip 377 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 381 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 382 { } movieClip 384 { } movieClip 388 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 389 { } movieClip 391 { } movieClip 395 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 396 { } movieClip 398 { } movieClip 402 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 403 { } movieClip 405 { } movieClip 409 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 410 { } movieClip 412 { } movieClip 416 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 417 { } movieClip 419 { } movieClip 423 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 424 { } movieClip 428 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 429 { } movieClip 430 { } movieClip 434 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 435 { } movieClip 439 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 440 { } movieClip 442 { } movieClip 444 { } movieClip 446 { } movieClip 447 { } movieClip 449 { } movieClip 453 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 454 { } movieClip 458 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 460 { } movieClip 464 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 466 { } movieClip 470 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 474 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 478 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 479 { } movieClip 483 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 487 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 488 { } movieClip 492 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 496 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 497 { } movieClip 501 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 505 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 506 { } movieClip 510 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 514 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 515 { } movieClip 519 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 523 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 524 { } movieClip 528 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 532 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 533 { } movieClip 535 { } movieClip 539 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 543 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 544 { } movieClip 546 { } movieClip 550 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 554 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 555 { } movieClip 559 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 563 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 564 { } movieClip 568 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 572 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 573 { } movieClip 578 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 582 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 583 { } movieClip 587 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 591 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 592 { } movieClip 596 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 597 { } movieClip 601 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 602 { } movieClip 606 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 607 { } movieClip 611 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 613 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 614 { } movieClip 615 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 616 { } movieClip 618 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 619 { } movieClip 620 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 621 { } movieClip 623 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 624 { } movieClip 628 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 632 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 633 { } movieClip 637 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 638 { } movieClip 642 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 646 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 647 { } movieClip 651 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 652 { } movieClip 654 { } movieClip 656 { } movieClip 658 { } movieClip 659 { } movieClip 660 { } movieClip 664 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 666 { } movieClip 668 { } movieClip 669 { } movieClip 671 { } movieClip 676 { } movieClip 682 { } movieClip 687 { } movieClip 692 { } movieClip 697 { } movieClip 702 { } movieClip 707 { } movieClip 712 { } movieClip 717 { } movieClip 722 { } movieClip 727 { } movieClip 732 { } movieClip 737 { } movieClip 742 { } movieClip 748 { } movieClip 753 { } movieClip 758 { } movieClip 763 { } movieClip 768 { } movieClip 773 { } movieClip 778 { } movieClip 780 { } movieClip 782 { } movieClip 784 { } movieClip 789 { } movieClip 794 { } movieClip 798 { } movieClip 803 { } movieClip 808 { } movieClip 813 { } movieClip 814 Particle_Guns { } movieClip 815 { } movieClip 816 { } movieClip 819 { } movieClip 823 { } movieClip 824 { } // unknown tag 88 length 64 movieClip 829 { } movieClip 831 { } movieClip 833 { } movieClip 835 { } movieClip 837 { } movieClip 838 { } movieClip 840 { } movieClip 842 { } movieClip 844 { } movieClip 846 { } movieClip 848 { } movieClip 850 { } movieClip 852 { } movieClip 854 { } movieClip 856 { } movieClip 857 { } movieClip 859 { } movieClip 861 { } movieClip 863 { } movieClip 865 { } movieClip 867 { } movieClip 870 { } movieClip 871 ParticleClips { } movieClip 872 { } movieClip 873 { } movieClip 879 { } button 881 { on (press) { pressMenu(); } on (rollOver) { SwainAudioPlayer.playSound('menu2', 0); } } movieClip 883 { frame 1 { _visible = false; } } movieClip 884 madness_game_menu { #initclip Object.registerClass('madness_game_menu', MadnessMenu); #endinitclip } movieClip 887 { } // unknown tag 88 length 64 button 894 { on (press) { init2(); } } movieClip 897 { } movieClip 898 { } movieClip 905 { } movieClip 907 { frame 1 { stop(); if (_parent._parent._parent._parent.myDataRef.myCharacter != undefined) { gotoAndStop(_parent._parent._parent._parent.myDataRef.myCharacter); } } } movieClip 908 { } movieClip 909 { } movieClip 910 { } movieClip 918 { } movieClip 919 { } movieClip 951 { } movieClip 952 { } // unknown tag 88 length 111 button 959 { on (press) { _parent._parent.pressMyGear(); } on (rollOver) { SwainAudioPlayer.playSound('menu2', 0); } } movieClip 960 { } button 967 { on (press) { _parent._parent.pressConfirm(); } on (rollOver) { SwainAudioPlayer.playSound('menu2', 0); } } button 970 { on (press) { _parent._parent.pressRemove(); } on (rollOver) { SwainAudioPlayer.playSound('menu2', 0); } } movieClip 978 { } button 984 { on (press) { _parent._parent.pressStats(''); } } movieClip 992 { frame 39 { stop(); } } movieClip 996 { } button 1002 { on (press) { _parent._parent.pressEquip(); } on (rollOver) { SwainAudioPlayer.playSound('menu2', 0); } } button 1005 { on (press) { _parent._parent.pressUnequip(); } on (rollOver) { SwainAudioPlayer.playSound('menu2', 0); } } button 1008 { on (press) { _parent._parent.pressConfirm(); } on (rollOver) { SwainAudioPlayer.playSound('menu2', 0); } } button 1012 { on (press) { SwainAudioPlayer.playSound('nobuy', 0); } } button 1015 { on (press) { SwainAudioPlayer.playSound('nobuy', 0); } } button 1018 { on (press) { SwainAudioPlayer.playSound('nobuy', 0); } } movieClip 1020 { } button 1026 { on (press) { _parent._parent.pressClose(); } on (rollOver) { SwainAudioPlayer.playSound('menu2', 0); } } movieClip 1033 { } movieClip 1034 { frame 2 { this.shift; } } movieClip 1036 { } button 1039 { on (press) { pressNext(); } } button 1040 { on (press) { pressPrev(); } } button 1044 { on (press) { pressStore(); } } button 1050 { on (press) { pressNext2(); } } button 1051 { on (press) { pressPrev2(); } } button 1057 { on (press) { _parent._parent.pressStats('stat'); } on (rollOver) { SwainAudioPlayer.playSound('menu2', 0); } } movieClip 1058 { } button 1063 { on (press) { _parent._parent.pressStats('skill'); } on (rollOver) { SwainAudioPlayer.playSound('menu2', 0); } } movieClip 1064 { } movieClip 1065 { } movieClip 1066 madness_team_setup { #initclip Object.registerClass('madness_team_setup', MadnessTeamSetup); #endinitclip frame 1 { stop(); } } movieClip 1069 { } movieClip 1074 { } movieClip 1075 madness_store_hire { #initclip Object.registerClass('madness_store_hire', MadnessStoreHire); #endinitclip frame 1 { stop(); } } button 1078 { on (press) { _root.pickMap(); } } button 1079 { on (press) { _root.pickStore(); } } button 1080 { on (press) { _root.pickTeam(); } } // unknown tag 88 length 79 movieClip 1092 { } movieClip 1108 { frame 25 { gotoAndPlay('loop'); } } button 1110 { on (press) { MadnessWorldMap.pickArena(MadnessLevel.currentLevel.totalWaves); } on (rollOver) { SwainAudioPlayer.playSound('menu2', 0); } } movieClip 1128 { frame 25 { gotoAndPlay('loop'); } } button 1130 { on (press) { if (!MadnessTransition.transitionLock) { SwainAudioPlayer.playSound('menu4', 0); MadnessSaveData.saveGame(); _root.createTransition('fade', 'quit', null); } } on (rollOver) { SwainAudioPlayer.playSound('menu2', 0); } } button 1138 { on (press) { _root.pickTeam(); } on (rollOver) { SwainAudioPlayer.playSound('menu2', 0); } } button 1142 { on (press) { _root.pickStore(); } on (rollOver) { SwainAudioPlayer.playSound('menu2', 0); } } button 1146 { on (press) { _root.pickItems(false); } on (rollOver) { SwainAudioPlayer.playSound('menu2', 0); } } movieClip 1149 madness_menu_top_bar { frame 8 { function arenaTick() { this.myCashTEXT.text = '$' + MadnessRoster.playerRoster.myCash; } onEnterFrame = arenaTick; } } movieClip 1152 { } movieClip 1153 { } movieClip 1154 { } movieClip 1156 { frame 1 { stop(); } } movieClip 1159 { } movieClip 1160 { } movieClip 1163 { } movieClip 1166 { frame 1 { stop(); } } movieClip 1167 Preloader { frame 1 { function enterFrameHandler() { var v2 = 0; v2 = _root.getBytesLoaded() / _root.getBytesTotal(); if (loadingBar) { loadingBar.gotoAndStop(int(v2 * (loadingBar._totalframes - 1)) + 1); } if (v2 >= 1) { onEnterFrame = null; gotoAndStop('loaded'); } } stop(); var autoPlay; var className; onEnterFrame = enterFrameHandler; } frame 10 { function _onPlayClick() { _root.nextFrame(); _root.play(); _parent._onLoaded(); } if (playButton) { playButton.onRelease = _onPlayClick; playButton.stop(); } if (autoPlay) { _onPlayClick(null); } } } movieClip 1169 Newgrounds API Classes { #initclip Object.registerClass('Newgrounds API Classes', com.newgrounds.shims.APIShim); #endinitclip } movieClip 1209 { } movieClip 1212 { } movieClip 1217 { } movieClip 1221 { } movieClip 1222 { } movieClip 1223 { } movieClip 1224 FlashAd { #initclip Object.registerClass('FlashAd', com.newgrounds.components.FlashAdBase); #endinitclip frame 1 { function initPlayButton() { if (this.playButton) { this.playButton.onRelease = onPlayClick; if (!this.showPlayButton) { this.playButton._visible = false; } } } function onPlayClick() { removeAd(); _visible = false; } stop(); } frame 2 { initPlayButton(); } } movieClip 1225 APIConnector { frame 1 { function _onLoaded() { gotoAndStop('invisible'); if (_redirect) { com.newgrounds.API.loadOfficialVersion(); return undefined; } } function _apiConnect() { var v2 = com.newgrounds.API; if (v2 && !v2.connected) { if (!apiId) { com.newgrounds.Logger.logError('No API ID entered in the API Connector component.', 'You can create an API ID for this submission at http://newgrounds.com/account/flashapi', 'Enter your API ID into the API Connector using the Component Inspector (Window -> Component Inspector).'); return undefined; } switch (debugMode) { case 'Off': default: v2.debugMode = v2.RELEASE_MODE; goto 1299; case 'Simulate Logged-in User': //Invalid switch } v2.debugMode = v2.DEBUG_MODE_LOGGED_IN; goto 1299; case 'Off': v2.debugMode = v2.DEBUG_MODE_LOGGED_OUT; goto 1299; case 'Simulate Logged-in User': v2.debugMode = v2.DEBUG_MODE_NEW_VERSION; goto 1299; case 'Simulate Logged-out User': v2.debugMode = v2.DEBUG_MODE_HOST_BLOCKED; label 1299: v2.addEventListener(com.newgrounds.APIEvent.API_CONNECTED, _onConnected); v2.connect(_root, apiId, encryptionKey, movieVersion); } } function _onConnected(event) { if (redirectOnNewVersion && event.__get__success() && (event.__get__data()).newVersion) { _redirect = true; } if (redirectOnHostBlocked && !event.__get__success() && event.__get__error() == com.newgrounds.APIEvent.ERROR_HOST_BLOCKED) { _redirect = true; } if (_redirect) { gotoAndStop('adPreloader'); forceAlwaysOnTop(); } } function forceAlwaysOnTop() { var v2 = getNextHighestDepth(); swapDepths(v2); if (Stage) { _x = (Stage.width - _width) / 2; _y = (Stage.height - _height) / 2; _visible = true; } if (_root && _root instanceof MovieClip) { (MovieClip(_root)).stop(); } } stop(); if (_root && _root instanceof MovieClip) { (MovieClip(_root)).stop(); } var apiId; var encryptionKey; var movieVersion; var debugMode; var connectorType; var redirectOnHostBlocked; var redirectOnNewVersion; var adType; var className; var _redirect; _x = int(_x); _y = int(_y); if (!debugMode) { debugMode = 'Simulate Logged-in User'; } if (!connectorType) { connectorType = 'Flash Ad + Preloader'; } if (!adType) { adType = 'Video'; } if (ad) { ad.adType = adType; } switch (connectorType) { case 'Flash Ad + Preloader': gotoAndStop('adPreloader'); break; case 'Flash Ad Only': gotoAndStop('ad'); break; case 'Invisible': gotoAndStop('invisible'); } _apiConnect(); } instance ad of movieClip 1224 FlashAd { onClipEvent (construct) { apiId = ''; showBorder = true; adType = 'Video'; } } instance loader of movieClip 1167 Preloader { onClipEvent (construct) { autoPlay = false; mainClass = ''; } } } movieClip 1241 Sound - Music { } // unknown tag 88 length 110 movieClip 1366 Sound - Box { frame 2 { stop(); } } movieClip 1390 { frame 1 { stop(); } } movieClip 1392 { } movieClip 1394 { } movieClip 1396 { } movieClip 1398 { } movieClip 1400 { } movieClip 1402 { } movieClip 1404 { } movieClip 1406 { } movieClip 1408 { } movieClip 1410 { } movieClip 1412 { } movieClip 1414 { } movieClip 1416 { } movieClip 1418 { } movieClip 1420 { } movieClip 1422 { } movieClip 1424 { } movieClip 1425 { } movieClip 1427 { } movieClip 1429 { } movieClip 1431 { } movieClip 1433 { } movieClip 1435 { } movieClip 1437 { } movieClip 1440 { } movieClip 1442 { } movieClip 1444 { } movieClip 1447 { } movieClip 1448 { } movieClip 1450 { } movieClip 1452 { } movieClip 1454 { } movieClip 1456 { } movieClip 1458 { } movieClip 1461 { } movieClip 1463 { } movieClip 1465 { } movieClip 1467 { } movieClip 1469 { } movieClip 1472 { } movieClip 1474 { } movieClip 1476 { } movieClip 1478 { } movieClip 1480 { } movieClip 1482 { } movieClip 1484 { } movieClip 1486 { } movieClip 1488 { } movieClip 1490 { } movieClip 1492 { } movieClip 1494 { } movieClip 1497 { } movieClip 1498 { } movieClip 1504 { } movieClip 1506 { } movieClip 1508 { } movieClip 1511 { } movieClip 1513 { } movieClip 1515 { } movieClip 1517 { } movieClip 1519 { } movieClip 1521 { } movieClip 1523 { } movieClip 1527 { } movieClip 1529 { } movieClip 1546 { } movieClip 1548 { } movieClip 1550 { } movieClip 1552 { } movieClip 1554 { } movieClip 1556 { } movieClip 1558 { } movieClip 1560 { } movieClip 1562 { } movieClip 1564 { } movieClip 1566 { } movieClip 1568 { } movieClip 1570 { } movieClip 1572 { } movieClip 1574 { } movieClip 1577 { } movieClip 1579 { } movieClip 1581 { } movieClip 1583 { } movieClip 1585 { } movieClip 1587 { } movieClip 1589 { } movieClip 1591 { } movieClip 1593 { } movieClip 1595 { } movieClip 1597 { } movieClip 1599 { } movieClip 1601 { } movieClip 1602 { } movieClip 1625 { frame 1 { stop(); } } movieClip 1645 { frame 1 { stop(); } } movieClip 1660 { frame 1 { stop(); } } movieClip 1688 { frame 1 { stop(); } } movieClip 1712 { frame 1 { stop(); } } movieClip 1738 { frame 1 { stop(); } } movieClip 1764 { frame 1 { stop(); } } movieClip 1795 { } movieClip 1826 { } movieClip 1849 { frame 1 { stop(); } } movieClip 1875 { frame 1 { stop(); } } movieClip 1900 { frame 1 { stop(); } } movieClip 1924 { frame 1 { stop(); } } movieClip 1946 { frame 1 { stop(); } } movieClip 1972 { frame 1 { stop(); } } movieClip 1998 { frame 1 { stop(); } } movieClip 2001 { frame 1 { stop(); } } movieClip 2004 { frame 1 { stop(); } } movieClip 2030 { frame 1 { stop(); } } movieClip 2056 { frame 1 { stop(); } } movieClip 2085 { frame 1 { stop(); } } movieClip 2114 { frame 1 { stop(); } } movieClip 2139 { } movieClip 2159 { } movieClip 2185 { } movieClip 2210 { } movieClip 2231 { } movieClip 2241 { } movieClip 2267 { } movieClip 2290 { } movieClip 2313 { frame 1 { stop(); } } movieClip 2328 { frame 1 { stop(); } } movieClip 2350 { frame 1 { stop(); } } movieClip 2374 { frame 1 { stop(); } } movieClip 2396 { frame 1 { stop(); } } movieClip 2413 { frame 1 { stop(); } } movieClip 2422 { frame 1 { stop(); } } movieClip 2447 { frame 1 { stop(); } } movieClip 2458 { frame 1 { stop(); } } movieClip 2482 { frame 1 { stop(); } } movieClip 2496 { frame 1 { stop(); } } movieClip 2519 { frame 1 { stop(); } } movieClip 2540 { frame 1 { stop(); } } movieClip 2559 { frame 1 { stop(); } } movieClip 2566 { frame 1 { stop(); } } movieClip 2585 { frame 1 { stop(); } } movieClip 2605 { frame 1 { stop(); } } movieClip 2617 { frame 1 { stop(); } } movieClip 2624 { frame 1 { stop(); } } movieClip 2649 { } movieClip 2673 { } movieClip 2699 { frame 1 { stop(); } } movieClip 2707 { frame 1 { stop(); } } movieClip 2708 Parts - Head { frame 1 { function createWound(inNumber) {} } } movieClip 2712 { frame 1 { _visible = false; } } movieClip 2731 { frame 1 { stop(); } } movieClip 2732 { frame 1 { _parent._parent._parent.forceSpriteUpdate(); } } movieClip 2740 { } movieClip 2741 { frame 1 { stop(); if (_parent._parent._parent._parent.myDataRef.myCharacter != undefined) { gotoAndStop(_parent._parent._parent._parent.myDataRef.myCharacter); } _parent._parent._parent.forceSpriteUpdate(); } } movieClip 2749 { } movieClip 2750 { frame 1 { stop(); if (_parent._parent._parent._parent.myDataRef.myCharacter != undefined) { gotoAndStop(_parent._parent._parent._parent.myDataRef.myCharacter); } _parent._parent._parent.forceSpriteUpdate(); } } movieClip 2752 { frame 1 { _visible = false; } } movieClip 2778 { frame 1 { stop(); } } movieClip 2779 { frame 1 { _parent._parent._parent.forceSpriteUpdate(); } } movieClip 2787 { } movieClip 2788 { frame 1 { stop(); if (_parent._parent._parent._parent.myDataRef.myCharacter != undefined) { gotoAndStop(_parent._parent._parent._parent.myDataRef.myCharacter); } _parent._parent._parent.forceSpriteUpdate(); } } movieClip 2790 { } movieClip 2791 { frame 64 { _parent._parent.playSound('metalbang'); _parent._parent.playSound('blunt'); } frame 104 { _parent._parent.playSound('metalbang'); _parent._parent.playSound('blunt'); } frame 130 { _parent._parent.playSound('metalbang'); _parent._parent.playSound('blunt'); } frame 158 { _parent._parent.playSound('land'); } frame 174 { stop(); } } movieClip 2794 { } movieClip 2796 { } movieClip 2798 { } movieClip 2800 { } movieClip 2802 { } movieClip 2803 { frame 1 { _parent.forceSpriteUpdate(); } frame 174 { stop(); _parent.spawnUnit(); } } movieClip 2815 { } movieClip 2816 { frame 1 { stop(); if (_parent._parent._parent._parent.myDataRef.myCharacter != undefined) { gotoAndStop(_parent._parent._parent._parent.myDataRef.myCharacter); } _parent._parent._parent.forceSpriteUpdate(); } } movieClip 2817 { } movieClip 2818 { frame 27 { _parent._parent.forceSpriteUpdate(); } frame 47 { _parent._parent.forceSpriteUpdate(); } } movieClip 2819 { frame 2 { _parent.playSound('earth'); } frame 76 { stop(); _parent.spawnUnit(); } } movieClip 2825 { } movieClip 2826 { } movieClip 2827 { frame 2 { _parent.playSound('earth'); } frame 64 { stop(); _parent.spawnUnit(); } } movieClip 2833 { } movieClip 2834 { } movieClip 2835 { frame 2 { _parent.playSound('earth'); } frame 84 { stop(); _parent.spawnUnit(); } } movieClip 2836 { frame 1 { stop(); if (_parent._parent._parent._parent.myDataRef.myCharacter != undefined) { gotoAndStop(_parent._parent._parent._parent.myDataRef.myCharacter); } } } movieClip 2837 { frame 66 { trace('CHECKPOINT'); _parent._parent.forceSpriteUpdate(); } frame 116 { trace('CHECKPOINT 2 '); _parent._parent.forceSpriteUpdate(); } } movieClip 2838 { frame 187 { stop(); _parent.spawnUnit(); } } movieClip 2866 { } movieClip 2867 { frame 2 { _parent.playSound('swish'); } frame 54 { stop(); _parent.spawnUnit(); } } movieClip 2890 { } movieClip 2892 { frame 2 { _parent.playSound('zipline'); } frame 64 { stop(); _parent.spawnUnit(); } } movieClip 2893 madness_spawner { #initclip Object.registerClass('madness_spawner', MadnessSpawner); #endinitclip } movieClip 2897 { } movieClip 2898 { } movieClip 2901 { } movieClip 2903 { } movieClip 2905 { } movieClip 2907 { } movieClip 2909 { } movieClip 2911 { } movieClip 2913 { } movieClip 2915 { } movieClip 2917 { } movieClip 2918 { } // unknown tag 88 length 110 movieClip 2925 { } button 2927 { on (release) { pressMenu(); } on (rollOver) { SwainAudioPlayer.playSound('menu2', 0); } } button 2929 { on (press) { pickStage(0, 0); } on (rollOver) { buttonRollOver(0, true); } on (rollOut) { buttonRollOver(0, false); } } button 2930 { on (press) { pickStage(0, 1); } on (rollOver) { buttonRollOver(1, true); } on (rollOut) { buttonRollOver(1, false); } } button 2931 { on (press) { pickStage(0, 2); } on (rollOver) { buttonRollOver(2, true); } on (rollOut) { buttonRollOver(2, false); } } button 2932 { on (press) { pickStage(0, 3); } on (rollOver) { buttonRollOver(3, true); } on (rollOut) { buttonRollOver(3, false); } } button 2933 { on (press) { pickStage(0, 4); } on (rollOver) { buttonRollOver(4, true); } on (rollOut) { buttonRollOver(4, false); } } button 2934 { on (press) { pickStage(0, 5); } on (rollOver) { buttonRollOver(5, true); } on (rollOut) { buttonRollOver(5, false); } } button 2935 { on (press) { pickStage(0, 6); } on (rollOver) { buttonRollOver(6, true); } on (rollOut) { buttonRollOver(6, false); } } button 2936 { on (press) { pickStage(0, 7); } on (rollOver) { buttonRollOver(7, true); } on (rollOut) { buttonRollOver(7, false); } } // unknown tag 88 length 110 movieClip 2940 { } button 2941 { on (release) { cheatOpenAll(0); } } // unknown tag 88 length 110 button 2946 { on (press) { _parent.pressChangeWorld(1); } on (rollOver) { SwainAudioPlayer.playSound('menu2', 0); } } // unknown tag 88 length 110 // unknown tag 88 length 110 movieClip 2950 { } movieClip 2954 { } movieClip 2955 { } // unknown tag 88 length 64 movieClip 2961 { } movieClip 2962 { } // unknown tag 88 length 64 movieClip 2964 { frame 1 { var randomWords = ['KILL', 'DESTROY', 'OBEY', 'ELIMINATE', 'OVERCOME', 'TRAITOR', 'NEXUS', 'FOOLISH', 'SURVIVE', 'ANNIHILATE', 'MADNESS']; var thisWord = randomWords[SwainMath.randomNumber(0, randomWords.length - 1)]; } } movieClip 2968 { frame 11 { stop(); } } movieClip 2970 { } movieClip 2973 { } movieClip 2975 { } movieClip 2976 { } movieClip 2979 { } movieClip 2981 { } movieClip 2983 { } movieClip 2985 { } movieClip 2987 { } movieClip 2989 { } // unknown tag 88 length 110 button 2992 { on (press) { pickStage(1, 0); } on (rollOver) { buttonRollOver(0, true); } on (rollOut) { buttonRollOver(0, false); } } button 2993 { on (press) { pickStage(1, 1); } on (rollOver) { buttonRollOver(1, true); } on (rollOut) { buttonRollOver(1, false); } } button 2994 { on (press) { pickStage(1, 2); } on (rollOver) { buttonRollOver(2, true); } on (rollOut) { buttonRollOver(2, false); } } button 2995 { on (press) { pickStage(1, 3); } on (rollOver) { buttonRollOver(3, true); } on (rollOut) { buttonRollOver(3, false); } } button 2996 { on (press) { pickStage(1, 4); } on (rollOver) { buttonRollOver(4, true); } on (rollOut) { buttonRollOver(4, false); } } button 2997 { on (press) { pickStage(1, 5); } on (rollOver) { buttonRollOver(5, true); } on (rollOut) { buttonRollOver(5, false); } } // unknown tag 88 length 110 button 3000 { on (press) { _parent.pressChangeWorld(0); } on (rollOver) { SwainAudioPlayer.playSound('menu2', 0); } } // unknown tag 88 length 110 movieClip 3003 { } button 3004 { on (release) { cheatOpenAll(1); } } movieClip 3005 world_map { } movieClip 3007 { } movieClip 3009 { frame 1 { _visible = false; } } movieClip 3011 start_point { } movieClip 3013 { frame 1 { _visible = false; } } movieClip 3015 { frame 1 { _visible = false; } } movieClip 3017 { } movieClip 3019 { frame 1 { _visible = false; } } movieClip 3022 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _root.myGameSpeed); } onEnterFrame = tick; } } movieClip 3024 { } movieClip 3026 { } movieClip 3027 { } movieClip 3029 { } movieClip 3031 { } movieClip 3034 { } movieClip 3035 { } movieClip 3037 { } movieClip 3040 { } movieClip 3042 { } movieClip 3043 { } // unknown tag 88 length 67 movieClip 3047 { frame 1 { _visible = false; } } movieClip 3049 { } movieClip 3051 { } movieClip 3053 { } movieClip 3057 { } movieClip 3058 { } movieClip 3059 { } movieClip 3061 { } movieClip 3062 { } movieClip 3065 { frame 1 { _visible = false; } } movieClip 3066 { } movieClip 3069 { } movieClip 3070 { } movieClip 3075 { } movieClip 3076 { } movieClip 3077 { } movieClip 3079 { } movieClip 3082 { } movieClip 3083 { } movieClip 3085 { } movieClip 3088 { } movieClip 3089 { } movieClip 3091 { } movieClip 3093 { } movieClip 3095 { } movieClip 3096 { } movieClip 3097 { } movieClip 3098 { } movieClip 3100 { } movieClip 3102 { } movieClip 3104 { } movieClip 3106 { } movieClip 3108 { } movieClip 3111 { } movieClip 3114 { frame 1 { _visible = false; } } movieClip 3115 { frame 1 { _visible = false; } } // unknown tag 88 length 88 // unknown tag 88 length 88 movieClip 3120 { } movieClip 3122 { } movieClip 3123 { } movieClip 3125 { } movieClip 3127 { } movieClip 3129 { } movieClip 3131 { } movieClip 3133 { } movieClip 3135 { } movieClip 3137 { } movieClip 3139 { } movieClip 3141 { } movieClip 3143 { } movieClip 3145 { } movieClip 3147 { } movieClip 3150 { } movieClip 3151 { } movieClip 3153 { } movieClip 3155 { } movieClip 3157 { } movieClip 3159 { } movieClip 3161 { } movieClip 3163 { } movieClip 3165 { } movieClip 3167 { } movieClip 3169 { } movieClip 3171 { } movieClip 3173 { } movieClip 3175 { } movieClip 3178 { } movieClip 3179 { } movieClip 3181 { } movieClip 3184 { } movieClip 3185 { } movieClip 3187 { } movieClip 3189 { } movieClip 3192 { } movieClip 3193 { } movieClip 3195 { } movieClip 3197 { } movieClip 3199 { } movieClip 3201 { } movieClip 3203 { } movieClip 3205 { } movieClip 3207 { } movieClip 3209 { } movieClip 3211 { } movieClip 3213 { } movieClip 3215 { } movieClip 3217 { } movieClip 3219 { } movieClip 3221 { } movieClip 3223 { } movieClip 3225 { } movieClip 3227 { } movieClip 3229 { } movieClip 3231 { } movieClip 3233 { } movieClip 3235 { } movieClip 3237 { } movieClip 3239 { } movieClip 3241 { } movieClip 3243 { } movieClip 3245 { } movieClip 3248 { } movieClip 3251 { } movieClip 3252 { } movieClip 3254 { } movieClip 3257 { } movieClip 3259 { } movieClip 3261 { } movieClip 3263 { } movieClip 3265 { } movieClip 3267 { } movieClip 3269 { } movieClip 3271 { } movieClip 3273 { } movieClip 3275 { } movieClip 3277 { } movieClip 3279 { } movieClip 3281 { } movieClip 3283 { } movieClip 3285 { } movieClip 3288 { } movieClip 3289 { } movieClip 3292 { } movieClip 3293 { } movieClip 3295 { } movieClip 3297 { } movieClip 3299 { } movieClip 3302 { } movieClip 3303 { } movieClip 3305 { } movieClip 3307 { } movieClip 3309 { } movieClip 3311 { } movieClip 3313 { } movieClip 3316 { } movieClip 3317 { } movieClip 3318 { } movieClip 3321 { } movieClip 3322 { } movieClip 3324 { } movieClip 3327 { } movieClip 3329 { } movieClip 3331 { } movieClip 3333 { } // unknown tag 88 length 64 movieClip 3336 { } movieClip 3338 { } movieClip 3340 { } movieClip 3342 { } // unknown tag 88 length 64 movieClip 3345 { } movieClip 3347 { } movieClip 3348 { } // unknown tag 88 length 64 movieClip 3351 { } movieClip 3353 { } movieClip 3354 { } // unknown tag 88 length 64 movieClip 3357 { } movieClip 3359 { } movieClip 3361 { } movieClip 3363 { } movieClip 3365 { } movieClip 3367 { } movieClip 3369 { } movieClip 3371 { } movieClip 3373 { } movieClip 3375 { } movieClip 3377 { } movieClip 3379 { } movieClip 3381 { } movieClip 3383 { } movieClip 3385 { } movieClip 3387 { } movieClip 3390 { } movieClip 3391 { } movieClip 3393 { } movieClip 3396 { } movieClip 3398 { } movieClip 3399 { } movieClip 3401 { } movieClip 3403 { } movieClip 3405 { } movieClip 3407 { } movieClip 3409 { } movieClip 3411 { } movieClip 3413 { } movieClip 3415 { } movieClip 3417 { } movieClip 3419 { } movieClip 3421 { } movieClip 3423 { } movieClip 3425 { } movieClip 3427 { } movieClip 3429 { } movieClip 3430 { } movieClip 3432 { } movieClip 3435 { } movieClip 3436 { } movieClip 3438 { } movieClip 3440 { } movieClip 3442 { } movieClip 3444 { } movieClip 3446 { } movieClip 3448 { } movieClip 3450 { } movieClip 3452 { } movieClip 3454 { } movieClip 3456 { } movieClip 3458 { } movieClip 3460 { } movieClip 3462 { } movieClip 3464 { } movieClip 3466 { } movieClip 3468 { } movieClip 3470 { } movieClip 3472 { } movieClip 3474 { } movieClip 3476 { } movieClip 3478 { } movieClip 3480 { } movieClip 3482 { } movieClip 3484 { } movieClip 3486 { } movieClip 3488 { } movieClip 3490 { } movieClip 3492 { } movieClip 3494 { } movieClip 3497 { } movieClip 3499 { } movieClip 3501 { } movieClip 3506 { } movieClip 3508 { } movieClip 3510 { } movieClip 3512 { } movieClip 3514 { } movieClip 3516 { } movieClip 3518 { } movieClip 3519 { } movieClip 3521 { } movieClip 3524 { } movieClip 3525 { } movieClip 3527 { } movieClip 3529 { } movieClip 3531 { } movieClip 3533 { } movieClip 3535 { } movieClip 3537 { } movieClip 3539 { } movieClip 3541 { } movieClip 3543 { } movieClip 3545 { } movieClip 3547 { } movieClip 3549 { } movieClip 3551 { } movieClip 3553 { } movieClip 3555 { } movieClip 3557 { } movieClip 3559 { } movieClip 3561 { } movieClip 3563 { } movieClip 3565 { } movieClip 3567 { } movieClip 3569 { } movieClip 3571 { } movieClip 3572 { } movieClip 3574 { } movieClip 3576 { } movieClip 3578 { } movieClip 3580 { } movieClip 3582 { } movieClip 3584 { } movieClip 3586 { } movieClip 3588 { } movieClip 3590 { } movieClip 3592 { } movieClip 3594 { } movieClip 3596 { } movieClip 3598 { } movieClip 3600 { } movieClip 3602 { } movieClip 3604 { } movieClip 3606 { } movieClip 3608 { } movieClip 3610 { } movieClip 3612 { } movieClip 3614 { } movieClip 3616 { } movieClip 3618 { } movieClip 3620 { } movieClip 3622 { } movieClip 3624 { } movieClip 3626 { } movieClip 3629 { } movieClip 3631 { } movieClip 3632 { } movieClip 3634 { } movieClip 3637 { } movieClip 3639 { } movieClip 3641 { } movieClip 3644 { } movieClip 3646 { } movieClip 3648 { } movieClip 3651 { } movieClip 3652 { } movieClip 3654 { } movieClip 3656 { } movieClip 3658 { } movieClip 3660 { } movieClip 3662 { } movieClip 3665 { } movieClip 3666 { } movieClip 3668 { } movieClip 3670 { } movieClip 3672 { } movieClip 3674 { } movieClip 3676 { } movieClip 3678 { } movieClip 3680 { } movieClip 3682 { } movieClip 3684 { } movieClip 3686 { } movieClip 3688 { } movieClip 3690 { } movieClip 3692 { } movieClip 3694 { } movieClip 3696 { } movieClip 3698 { } movieClip 3700 { } movieClip 3702 { } movieClip 3704 { } movieClip 3706 { } movieClip 3708 { } movieClip 3710 { } movieClip 3712 { } movieClip 3713 { } movieClip 3716 { } movieClip 3718 { } movieClip 3720 { } movieClip 3721 { instance of movieClip 3713 { onClipEvent (load) { if (MadnessGameSelect.backgroundQuality == 'high') { } else { stop(); } } } } movieClip 3723 { } movieClip 3728 { } movieClip 3730 { } movieClip 3732 { } movieClip 3733 { } movieClip 3734 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _root.myGameSpeed); } onEnterFrame = tick; } frame 5 { gotoAndPlay(SwainMath.randomNumber(2, 40)); } } movieClip 3735 { } movieClip 3737 { } movieClip 3739 { } movieClip 3741 { } movieClip 3742 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _root.myGameSpeed); } onEnterFrame = tick; } frame 6 { if (SwainMath.randomNumber(0, 200) != 0) { gotoAndPlay(2); } } } movieClip 3744 { } movieClip 3746 { } movieClip 3748 { } movieClip 3749 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _root.myGameSpeed); } onEnterFrame = tick; } frame 6 { if (SwainMath.randomNumber(0, 200) != 0) { gotoAndPlay(2); } } } movieClip 3751 { } movieClip 3753 { } movieClip 3755 { } movieClip 3757 { } movieClip 3759 { } movieClip 3761 { } movieClip 3763 { } movieClip 3765 { } movieClip 3766 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _root.myGameSpeed); } onEnterFrame = tick; } frame 328 { _parent.gotoAndStop(1); } } movieClip 3768 { } movieClip 3770 { } movieClip 3771 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _root.myGameSpeed); } onEnterFrame = tick; } frame 190 { _parent.gotoAndStop(1); } } movieClip 3773 { } movieClip 3774 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _root.myGameSpeed); } onEnterFrame = tick; } frame 385 { _parent.gotoAndStop(1); } } movieClip 3775 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _root.myGameSpeed); } onEnterFrame = tick; } frame 234 { _parent.gotoAndStop(1); } } movieClip 3776 { frame 1 { function tick() { if (_currentframe == 1 && SwainMath.randomNumber(0, 180) == 0) { gotoAndStop(SwainMath.randomNumber(2, 5)); } } stop(); onEnterFrame = tick; } } movieClip 3779 { frame 1 { if (MadnessGameSelect.backgroundQuality == 'high') { stop(); cacheAsBitmap = false; } else { gotoAndStop(2); cacheAsBitmap = true; } } } movieClip 3782 { } movieClip 3783 { } movieClip 3784 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _root.myGameSpeed); } onEnterFrame = tick; } } movieClip 3787 { } movieClip 3788 { frame 1 { if (MadnessGameSelect.backgroundQuality == 'high') { stop(); cacheAsBitmap = false; } else { gotoAndStop(2); cacheAsBitmap = true; } } } movieClip 3790 { } movieClip 3792 { } // unknown tag 88 length 60 // unknown tag 88 length 60 movieClip 3800 { } movieClip 3801 { } movieClip 3803 { } movieClip 3808 { } // unknown tag 88 length 159 // unknown tag 88 length 159 movieClip 3815 { } movieClip 3816 { } movieClip 3818 { } movieClip 3821 madness_world { } movieClip 3826 { } // unknown tag 88 length 64 movieClip 3830 { } // unknown tag 88 length 64 movieClip 3834 { } movieClip 3838 { } movieClip 3839 { } movieClip 3841 { } movieClip 3843 { } movieClip 3845 { } movieClip 3847 { } movieClip 3848 { } movieClip 3849 { } movieClip 3851 { } movieClip 3853 { } // unknown tag 88 length 64 movieClip 3856 { } movieClip 3860 { } movieClip 3861 { } movieClip 3863 { } // unknown tag 88 length 64 movieClip 3866 { } // unknown tag 88 length 64 movieClip 3871 { } // unknown tag 88 length 64 movieClip 3875 { } movieClip 3876 cutscene_world1_start { } movieClip 3878 { } movieClip 3882 { } // unknown tag 88 length 64 movieClip 3885 { } // unknown tag 88 length 64 movieClip 3889 { } // unknown tag 88 length 64 movieClip 3891 { } movieClip 3892 { } movieClip 3894 { } movieClip 3895 { } movieClip 3898 { } movieClip 3900 { } movieClip 3902 { } movieClip 3904 { } movieClip 3906 { } movieClip 3908 { } movieClip 3910 { } movieClip 3912 { } movieClip 3913 { frame 830 { _parent.play(); stop(); } } movieClip 3914 cutscene_world1_end { frame 677 { stop(); SwainAudioPlayer.playTrack('club1'); } frame 682 { stop(); } } movieClip 3916 { } movieClip 3918 { } movieClip 3919 { } movieClip 3921 { } movieClip 3923 { } movieClip 3925 { } movieClip 3927 { } movieClip 3928 { } movieClip 3929 { } movieClip 3931 { } movieClip 3933 { } movieClip 3934 { } movieClip 3936 { } movieClip 3938 { } movieClip 3940 { } movieClip 3942 { } movieClip 3944 { } movieClip 3946 { } movieClip 3948 { } movieClip 3950 { } movieClip 3952 { } movieClip 3954 { } movieClip 3956 { } movieClip 3958 { } movieClip 3960 { } movieClip 3962 { } movieClip 3964 { } movieClip 3966 { } movieClip 3968 { } movieClip 3970 { } movieClip 3972 { } movieClip 3974 { } movieClip 3976 { } movieClip 3978 { } movieClip 3980 { } movieClip 3982 { } movieClip 3984 { } movieClip 3986 { } movieClip 4005 { } movieClip 4007 { } movieClip 4009 { } movieClip 4011 { } movieClip 4013 { } movieClip 4015 { } movieClip 4018 { } movieClip 4020 { } movieClip 4022 { } movieClip 4023 { } movieClip 4024 cutscene_world0_start { frame 456 { SwainAudioPlayer.playSound('paper2', 0); } frame 619 { SwainAudioPlayer.playSound('paper1', 0); } frame 647 { SwainAudioPlayer.playSound('swapgun', 0); } frame 692 { SwainAudioPlayer.playSound('swapgun', 0); } frame 705 { SwainAudioPlayer.playSound('landhard', -30); } frame 733 { SwainAudioPlayer.playSound('explode', 30); } frame 796 { SwainAudioPlayer.playSound('swapgun', 0); } frame 807 { SwainAudioPlayer.playSound('swish', 0); } frame 973 { stop(); } } movieClip 4026 { } movieClip 4027 { } movieClip 4029 { } movieClip 4032 { } movieClip 4033 { } movieClip 4035 { } movieClip 4036 { } movieClip 4038 { } movieClip 4039 { } movieClip 4041 { } // unknown tag 88 length 64 movieClip 4044 { } movieClip 4045 { } // unknown tag 88 length 64 movieClip 4047 { } movieClip 4048 { } // unknown tag 88 length 64 movieClip 4050 { } movieClip 4051 { } movieClip 4053 { } // unknown tag 88 length 64 // unknown tag 88 length 64 movieClip 4055 { } movieClip 4056 { } // unknown tag 88 length 64 movieClip 4058 { } movieClip 4059 { } movieClip 4062 { } movieClip 4063 { } movieClip 4064 cutscene_world0_end { frame 789 { stop(); } } movieClip 4078 { frame 56 { stop(); } } movieClip 4080 { } movieClip 4082 { } movieClip 4084 { } movieClip 4086 { } movieClip 4089 { } movieClip 4091 { } movieClip 4093 { } movieClip 4096 { } movieClip 4097 { } movieClip 4098 { } movieClip 4100 { } movieClip 4102 { } movieClip 4103 { } movieClip 4108 { } movieClip 4109 { } movieClip 4113 { } movieClip 4115 { } movieClip 4117 { } movieClip 4118 { } movieClip 4119 { } movieClip 4128 { } movieClip 4130 { } movieClip 4131 { } movieClip 4133 { } movieClip 4135 { } movieClip 4137 { } movieClip 4138 cutscene_arena1 { frame 328 { stop(); } } movieClip 4141 { } movieClip 4143 { } movieClip 4145 { } movieClip 4147 { } movieClip 4148 { } movieClip 4150 { } movieClip 4152 { } movieClip 4154 { } movieClip 4156 { } movieClip 4158 { } movieClip 4160 { } movieClip 4161 { } movieClip 4168 { } movieClip 4178 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _root.myGameSpeed); } onEnterFrame = tick; } frame 28 { _parent._parent.myCategory = 'sparksdone'; _parent._parent.killMe(); } } movieClip 4187 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _root.myGameSpeed); } onEnterFrame = tick; } frame 34 { _parent._parent.myCategory = 'sparksdone'; _parent._parent.killMe(); } } movieClip 4188 { } movieClip 4189 { } movieClip 4191 { } movieClip 4193 { } movieClip 4195 { } movieClip 4197 { } movieClip 4199 { } movieClip 4201 { } movieClip 4202 { } movieClip 4204 { } movieClip 4206 { } movieClip 4208 { } movieClip 4210 { } movieClip 4212 { } movieClip 4214 { } movieClip 4216 { } movieClip 4218 { } movieClip 4220 { } movieClip 4221 { } movieClip 4228 { } movieClip 4239 { } movieClip 4265 { } movieClip 4272 { } movieClip 4279 { } movieClip 4281 { } movieClip 4283 { } movieClip 4284 { } movieClip 4285 { } movieClip 4286 { } movieClip 4287 { } movieClip 4288 { } movieClip 4289 { } movieClip 4290 { } movieClip 4292 { } movieClip 4296 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 4297 { } movieClip 4298 { } movieClip 4299 { } movieClip 4300 { } movieClip 4301 { } movieClip 4302 { } movieClip 4303 { } movieClip 4304 { } movieClip 4305 { } movieClip 4306 { } movieClip 4307 { } movieClip 4308 { } movieClip 4309 { } movieClip 4310 { } movieClip 4311 { } movieClip 4312 { } movieClip 4313 { } movieClip 4314 { } movieClip 4315 { } movieClip 4316 { } movieClip 4317 { } movieClip 4318 { } movieClip 4319 { } movieClip 4320 { } movieClip 4321 { } movieClip 4322 { } movieClip 4323 { } movieClip 4327 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 4329 { } movieClip 4330 { } movieClip 4333 { } movieClip 4335 { } movieClip 4337 { } movieClip 4339 { } movieClip 4341 { } movieClip 4343 { } movieClip 4345 { } movieClip 4347 { } movieClip 4349 { } movieClip 4351 { } movieClip 4353 { } movieClip 4355 { } movieClip 4357 { } movieClip 4359 { } movieClip 4361 { } movieClip 4363 { } movieClip 4365 { } movieClip 4367 { } movieClip 4369 { } movieClip 4371 { } movieClip 4373 { } movieClip 4376 { } movieClip 4378 { } movieClip 4380 { } movieClip 4382 { } movieClip 4384 { } movieClip 4386 { } movieClip 4388 { } movieClip 4390 { } movieClip 4392 { } movieClip 4394 { } movieClip 4397 { } movieClip 4399 { } movieClip 4401 { } movieClip 4402 { } movieClip 4404 { } movieClip 4406 { } movieClip 4411 { } movieClip 4413 { } movieClip 4415 { } movieClip 4418 { } movieClip 4420 { } movieClip 4422 { } movieClip 4424 { } movieClip 4426 { } movieClip 4428 { } movieClip 4432 { } movieClip 4434 { } movieClip 4451 { } movieClip 4453 { } movieClip 4455 { } movieClip 4457 { } movieClip 4459 { } movieClip 4461 { } movieClip 4463 { } movieClip 4465 { } movieClip 4467 { } movieClip 4469 { } movieClip 4471 { } movieClip 4473 { } movieClip 4476 { } movieClip 4478 { } movieClip 4480 { } movieClip 4482 { } movieClip 4484 { } movieClip 4486 { } movieClip 4488 { } movieClip 4490 { } movieClip 4492 { } movieClip 4494 { } movieClip 4496 { } movieClip 4498 { } movieClip 4499 { } movieClip 4500 madness_particle { } movieClip 4504 { } movieClip 4506 { frame 1 { _visible = false; } } movieClip 4510 { } movieClip 4512 { } movieClip 4514 { } movieClip 4516 { } movieClip 4517 { frame 6 { stop(); _parent._parent.spikesOpen(); } } movieClip 4518 { } movieClip 4519 madness_obstacle { } movieClip 4522 { } movieClip 4528 { } movieClip 4529 { } movieClip 4531 { frame 1 { stop(); } } movieClip 4532 { frame 1 { _parent.myStatus = 'closed'; stop(); } frame 7 { _parent.myStatus = 'open'; stop(); } } movieClip 4534 { frame 1 { _visible = false; } } movieClip 4540 { frame 9 { stop(); } } movieClip 4541 { frame 9 { stop(); } } movieClip 4542 { } movieClip 4544 { } movieClip 4548 { frame 1 { _parent.myStatus = 'closed'; stop(); } frame 7 { _parent.myStatus = 'open'; stop(); } } movieClip 4551 { frame 1 { _parent.myStatus = 'closed'; stop(); } frame 7 { _parent.myStatus = 'open'; stop(); } } movieClip 4558 { frame 9 { stop(); } } movieClip 4559 { frame 9 { stop(); } } movieClip 4560 { } movieClip 4562 { } movieClip 4565 { frame 1 { stop(); } } movieClip 4567 { } movieClip 4568 { frame 1 { stop(); } } movieClip 4569 { frame 1 { _parent.myStatus = 'closed'; stop(); } frame 7 { _parent.myStatus = 'open'; stop(); } } movieClip 4576 { frame 9 { stop(); } } movieClip 4578 { frame 9 { stop(); } } movieClip 4579 { } movieClip 4580 { frame 1 { _parent.myStatus = 'closed'; stop(); } frame 7 { _parent.myStatus = 'open'; stop(); } } movieClip 4581 { frame 1 { _parent.myStatus = 'closed'; stop(); } frame 7 { _parent.myStatus = 'open'; stop(); } } movieClip 4583 { } movieClip 4587 { } movieClip 4594 { } movieClip 4595 { frame 1 { _parent.myStatus = 'closed'; stop(); } frame 7 { _parent.myStatus = 'open'; stop(); } } movieClip 4600 { frame 1 { _parent.myStatus = 'closed'; stop(); } frame 7 { _parent.myStatus = 'open'; stop(); } } movieClip 4601 madness_doors { } movieClip 4603 { } movieClip 4606 { frame 1 { _parent._parent.myGameSpeed; } } movieClip 4607 { } movieClip 4610 { } movieClip 4613 { } movieClip 4616 { } movieClip 4620 { } movieClip 4621 { frame 1 { stop(); } frame 6 { stop(); } } movieClip 4623 { } movieClip 4626 { } movieClip 4633 { frame 1 { stop(); } frame 6 { stop(); } } movieClip 4634 { } movieClip 4640 { } movieClip 4642 { } movieClip 4643 { } movieClip 4647 { } // unknown tag 88 length 70 // unknown tag 88 length 70 // unknown tag 88 length 70 // unknown tag 88 length 70 // unknown tag 88 length 70 // unknown tag 88 length 70 // unknown tag 88 length 70 movieClip 4658 { } movieClip 4660 { } movieClip 4662 { } movieClip 4664 { } movieClip 4665 { } movieClip 4668 { } movieClip 4669 { } movieClip 4674 { } movieClip 4678 { } movieClip 4679 { } movieClip 4704 { } movieClip 4705 { } movieClip 4710 { } movieClip 4714 { } movieClip 4717 { } movieClip 4718 { } // unknown tag 88 length 67 // unknown tag 88 length 67 // unknown tag 88 length 67 // unknown tag 88 length 67 movieClip 4727 { } movieClip 4730 { } movieClip 4732 { } movieClip 4733 { } // unknown tag 88 length 67 // unknown tag 88 length 67 // unknown tag 88 length 67 // unknown tag 88 length 67 movieClip 4740 { } movieClip 4741 { } movieClip 4742 { } movieClip 4743 { } movieClip 4744 { } movieClip 4745 { } movieClip 4746 { } movieClip 4750 { } movieClip 4751 { } movieClip 4753 { } movieClip 4755 { } movieClip 4756 { } movieClip 4757 { } movieClip 4759 { } movieClip 4764 { } movieClip 4768 { } movieClip 4769 { } movieClip 4770 { } movieClip 4772 { } movieClip 4794 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _root.myGameSpeed); } onEnterFrame = tick; } } movieClip 4795 { } movieClip 4818 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _root.myGameSpeed); } if (!_parent._parent.myDataRef.asploded) { onEnterFrame = tick; } } frame 2 { _parent._parent.bombSetup(); _parent._parent.bombBeep(); } frame 37 { _parent._parent.bombBeep(); } frame 65 { _parent._parent.bombBeep(); } frame 85 { _parent._parent.bombBeep(); } frame 97 { _parent._parent.bombBeep(); } frame 105 { _parent._parent.bombBeep(); } frame 108 { _parent._parent.bombBeep(); } frame 111 { _parent._parent.bombBeep(); } frame 118 { _parent._parent.asplodeMe(); } frame 141 { onEnterFrame = null; } frame 144 { stop(); } } movieClip 4819 { } movieClip 4821 { } movieClip 4826 { } movieClip 4827 { } movieClip 4830 { } movieClip 4831 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _root.myGameSpeed); } if (!_parent._parent.myDataRef.asploded) { onEnterFrame = tick; } } frame 2 { _parent._parent.bombSetup(); _parent._parent.bombBeep(); } frame 37 { _parent._parent.bombBeep(); } frame 65 { _parent._parent.bombBeep(); } frame 85 { _parent._parent.bombBeep(); } frame 97 { _parent._parent.bombBeep(); } frame 105 { _parent._parent.bombBeep(); } frame 108 { _parent._parent.bombBeep(); } frame 111 { _parent._parent.bombBeep(); } frame 118 { _parent._parent.asplodeMe(); } frame 141 { onEnterFrame = null; } frame 144 { stop(); } } movieClip 4832 { } movieClip 4837 { } movieClip 4839 { } movieClip 4845 { frame 22 { stop(); } } movieClip 4846 { } movieClip 4847 madness_activator { } movieClip 4849 { } movieClip 4850 { frame 1 { stop(); if (_parent._parent._parent._parent.myDataRef.myCharacter != undefined) { gotoAndStop(_parent._parent._parent._parent.myDataRef.myCharacter); } } } movieClip 4854 { } movieClip 4855 { frame 1 { stop(); if (_parent._parent._parent._parent.myDataRef.myCharacter != undefined) { gotoAndStop(_parent._parent._parent._parent.myDataRef.myCharacter); } } } movieClip 4858 { frame 1 { stop(); } } movieClip 4861 { frame 1 { stop(); } } movieClip 4864 { } movieClip 4871 { } movieClip 4872 { frame 1 { stop(); if (_parent._parent._parent._parent.myDataRef.myCharacter != undefined) { gotoAndStop(_parent._parent._parent._parent.myDataRef.myCharacter); } } } movieClip 4874 { frame 1 { _visible = false; } } movieClip 4879 { frame 9 { stop(); } } movieClip 4880 { } movieClip 4881 Pistol - PPK - Fire R { frame 20 { stop(); } } movieClip 4888 { } movieClip 4889 { frame 1 { stop(); if (_parent._parent._parent._parent.myDataRef.myCharacter != undefined) { gotoAndStop(_parent._parent._parent._parent.myDataRef.myCharacter); } } } movieClip 4890 Pistol - PPK - Fire L { frame 20 { stop(); } } movieClip 4891 Pistol - PPK - Reload R { frame 11 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 65 { _parent._parent._parent.reloadMe(); } } movieClip 4892 Pistol - PPK - Reload L { frame 17 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 65 { _parent._parent._parent.reloadMe(); } } movieClip 4893 { } movieClip 4894 Pistol - PPK_Silencer - Fire R { frame 17 { stop(); } } movieClip 4895 Pistol - PPK_Silencer - Fire L { frame 17 { stop(); } } movieClip 4896 Pistol - PPK_Silencer - Reload R { frame 20 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 65 { _parent._parent._parent.reloadMe(); } } movieClip 4897 Pistol - PPK_Silencer - Reload L { frame 20 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 65 { _parent._parent._parent.reloadMe(); } } movieClip 4898 { } movieClip 4899 Pistol - Beretta - Fire R { frame 17 { stop(); } } movieClip 4900 Pistol - Beretta - Fire L { frame 17 { stop(); } } movieClip 4901 Pistol - Beretta - Reload R { frame 20 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 65 { _parent._parent._parent.reloadMe(); } } movieClip 4902 Pistol - Beretta - Reload L { frame 20 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 65 { _parent._parent._parent.reloadMe(); } } movieClip 4903 { } movieClip 4904 Pistol - Beretta_Silencer - Fire R { frame 17 { stop(); } } movieClip 4905 Pistol - Beretta_Silencer - Fire L { frame 17 { stop(); } } movieClip 4906 Pistol - Beretta_Silencer - Reload R { frame 20 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 65 { _parent._parent._parent.reloadMe(); } } movieClip 4907 Pistol - Beretta_Silencer - Reload L { frame 20 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 65 { _parent._parent._parent.reloadMe(); } } movieClip 4908 { } movieClip 4909 Pistol - Glock20 - Fire R { frame 17 { stop(); } } movieClip 4910 Pistol - Glock20 - Fire L { frame 17 { stop(); } } movieClip 4911 Pistol - Glock20 - Reload R { frame 11 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 65 { _parent._parent._parent.reloadMe(); } } movieClip 4912 Pistol - Glock20 - Reload L { frame 11 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 65 { _parent._parent._parent.reloadMe(); } } movieClip 4913 { } movieClip 4914 Pistol - Glock20_Silencer - Fire R { frame 17 { stop(); } } movieClip 4915 Pistol - Glock20_Silencer - Fire L { frame 17 { stop(); } } movieClip 4916 Pistol - Glock20_Silencer - Reload R { frame 11 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 65 { _parent._parent._parent.reloadMe(); } } movieClip 4917 Pistol - Glock20_Silencer - Reload L { frame 11 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 65 { _parent._parent._parent.reloadMe(); } } movieClip 4920 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 4922 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 4923 { } movieClip 4929 { frame 11 { stop(); } } movieClip 4930 { } movieClip 4931 Pistol - Prokiller460 - Fire R { frame 26 { stop(); } } movieClip 4932 Pistol - Prokiller460 - Fire L { frame 26 { stop(); } } movieClip 4933 { } movieClip 4934 Pistol - Prokiller460 - Reload R { frame 16 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 61 { _parent._parent._parent.reloadMe(); } } movieClip 4935 Pistol - Prokiller460 - Reload L { frame 15 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 61 { _parent._parent._parent.reloadMe(); } } movieClip 4936 { } movieClip 4937 Pistol - Deagle - Fire R { frame 21 { stop(); } } movieClip 4938 Pistol - Deagle - Fire L { frame 21 { stop(); } } movieClip 4939 Pistol - Deagle - Reload R { frame 15 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 61 { _parent._parent._parent.reloadMe(); } } movieClip 4940 Pistol - Deagle - Reload L { frame 15 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 61 { _parent._parent._parent.reloadMe(); } } movieClip 4941 Pistol - 500_Snub - Fire R { frame 31 { stop(); } } movieClip 4942 Pistol - 500_Snub - Fire L { frame 31 { stop(); } } movieClip 4943 Pistol - 500_Snub - Reload R { frame 23 { if (_parent._visible) { _parent._parent._parent.ejectShell(); _parent._parent._parent.ejectShell(); _parent._parent._parent.ejectShell(); _parent._parent._parent.ejectShell(); _parent._parent._parent.ejectShell(); } } frame 55 { _parent._parent._parent.reloadMe(); } } movieClip 4944 Pistol - 500_Snub - Reload L { frame 23 { if (_parent._visible) { _parent._parent._parent.ejectShell(); _parent._parent._parent.ejectShell(); _parent._parent._parent.ejectShell(); _parent._parent._parent.ejectShell(); _parent._parent._parent.ejectShell(); } } frame 55 { _parent._parent._parent.reloadMe(); } } movieClip 4945 Pistol - 500 - Fire R { frame 38 { stop(); } } movieClip 4946 Pistol - 500 - Fire L { frame 37 { stop(); } } movieClip 4947 Pistol - 500 - Reload R { frame 23 { if (_parent._visible) { _parent._parent._parent.ejectShell(); _parent._parent._parent.ejectShell(); _parent._parent._parent.ejectShell(); _parent._parent._parent.ejectShell(); _parent._parent._parent.ejectShell(); } } frame 55 { _parent._parent._parent.reloadMe(); } } movieClip 4948 Pistol - 500 - Reload L { frame 23 { if (_parent._visible) { _parent._parent._parent.ejectShell(); _parent._parent._parent.ejectShell(); _parent._parent._parent.ejectShell(); _parent._parent._parent.ejectShell(); _parent._parent._parent.ejectShell(); } } frame 55 { _parent._parent._parent.reloadMe(); } } movieClip 4949 Pistol - 357 - Fire R { frame 31 { stop(); } } movieClip 4950 Pistol - 357 - Fire L { frame 31 { stop(); } } movieClip 4951 Pistol - 357 - Reload R { frame 23 { if (_parent._visible) { _parent._parent._parent.ejectShell(); _parent._parent._parent.ejectShell(); _parent._parent._parent.ejectShell(); _parent._parent._parent.ejectShell(); _parent._parent._parent.ejectShell(); _parent._parent._parent.ejectShell(); } } frame 55 { _parent._parent._parent.reloadMe(); } } movieClip 4952 Pistol - 357 - Reload L { frame 23 { if (_parent._visible) { _parent._parent._parent.ejectShell(); _parent._parent._parent.ejectShell(); _parent._parent._parent.ejectShell(); _parent._parent._parent.ejectShell(); _parent._parent._parent.ejectShell(); _parent._parent._parent.ejectShell(); } } frame 55 { _parent._parent._parent.reloadMe(); } } movieClip 4957 { frame 9 { stop(); } } movieClip 4958 SMG - HK2 - Fire R { frame 14 { stop(); } } movieClip 4959 SMG - HK2 - Fire L { frame 14 { stop(); } } movieClip 4961 { } movieClip 4962 { frame 1 { stop(); if (_parent._parent._parent._parent.myDataRef.myCharacter != undefined) { gotoAndStop(_parent._parent._parent._parent.myDataRef.myCharacter); } } } movieClip 4963 SMG - HK2 - Reload R { frame 25 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 59 { _parent._parent._parent.reloadMe(); } } movieClip 4965 { } movieClip 4966 { frame 1 { stop(); if (_parent._parent._parent._parent.myDataRef.myCharacter != undefined) { gotoAndStop(_parent._parent._parent._parent.myDataRef.myCharacter); } } } movieClip 4967 SMG - HK2 - Reload L { frame 25 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 59 { _parent._parent._parent.reloadMe(); } } movieClip 4968 SMG - TMP - Fire R { frame 10 { stop(); } } movieClip 4969 SMG - TMP - Fire L { frame 10 { stop(); } } movieClip 4970 SMG - TMP - Reload R { frame 37 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 67 { _parent._parent._parent.reloadMe(); } } movieClip 4971 SMG - TMP - Reload L { frame 37 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 67 { _parent._parent._parent.reloadMe(); } } movieClip 4976 { frame 9 { stop(); } } movieClip 4977 SMG - TMP_Silencer - Fire R { frame 10 { stop(); } } movieClip 4978 SMG - TMP_Silencer - Fire L { frame 10 { stop(); } } movieClip 4979 SMG - TMP_Silencer - Reload R { frame 37 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 67 { _parent._parent._parent.reloadMe(); } } movieClip 4980 SMG - TMP_Silencer - Reload L { frame 37 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 67 { _parent._parent._parent.reloadMe(); } } movieClip 4981 SMG - MP7 - Fire R { frame 16 { stop(); } } movieClip 4982 SMG - MP7 - Fire L { frame 16 { stop(); } } movieClip 4983 SMG - MP7 - Reload R { frame 37 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 67 { _parent._parent._parent.reloadMe(); } } movieClip 4984 SMG - MP7 - Reload L { frame 37 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 67 { _parent._parent._parent.reloadMe(); } } movieClip 4985 SMG - MP7_Silencer - Fire R { frame 10 { stop(); } } movieClip 4986 SMG - MP7_Silencer - Fire L { frame 10 { stop(); } } movieClip 4987 SMG - MP7_Silencer - Reload R { frame 37 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 67 { _parent._parent._parent.reloadMe(); } } movieClip 4988 SMG - MP7_Silencer - Reload L { frame 37 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 67 { _parent._parent._parent.reloadMe(); } } movieClip 4989 SMG - MP5K - Fire R { frame 16 { stop(); } } movieClip 4990 SMG - MP5K - Fire L { frame 17 { stop(); } } movieClip 4991 SMG - MP5K - Reload R { frame 27 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 59 { _parent._parent._parent.reloadMe(); } } movieClip 4992 SMG - MP5K - Reload L { frame 27 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 59 { _parent._parent._parent.reloadMe(); } } movieClip 4993 SMG - MP5K_Silencer - Fire R { frame 10 { stop(); } } movieClip 4994 SMG - MP5K_Silencer - Fire L { frame 10 { stop(); } } movieClip 4995 SMG - MP5K_Silencer - Reload R { frame 27 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 59 { _parent._parent._parent.reloadMe(); } } movieClip 4996 SMG - MP5K_Silencer - Reload L { frame 27 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 59 { _parent._parent._parent.reloadMe(); } } movieClip 5003 { } movieClip 5004 { } movieClip 5005 SMG - MP5 - Fire R { frame 10 { stop(); } } movieClip 5012 { } movieClip 5013 { } movieClip 5014 SMG - MP5 - Fire L { frame 10 { stop(); } } movieClip 5015 SMG - MP5 - Reload R { frame 25 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 59 { _parent._parent._parent.reloadMe(); } } movieClip 5016 SMG - MP5 - Reload L { frame 25 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 59 { _parent._parent._parent.reloadMe(); } } movieClip 5017 SMG - MP5_Silencer - Fire R { frame 10 { stop(); } } movieClip 5018 SMG - MP5_Silencer - Fire L { } movieClip 5019 SMG - MP5_Silencer - Reload R { frame 25 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 59 { _parent._parent._parent.reloadMe(); } } movieClip 5020 SMG - MP5_Silencer - Reload L { frame 25 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 59 { _parent._parent._parent.reloadMe(); } } movieClip 5021 SMG - Mineaba PM9 - Fire R { frame 10 { stop(); } } movieClip 5022 SMG - Mineaba PM9 - Fire L { frame 10 { stop(); } } movieClip 5023 SMG - Mineaba PM9 - Reload R { frame 37 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 67 { _parent._parent._parent.reloadMe(); } } movieClip 5024 SMG - Mineaba PM9 - Reload L { frame 37 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 67 { _parent._parent._parent.reloadMe(); } } movieClip 5025 SMG - Mineaba PM9_Silencer - Fire R { frame 10 { stop(); } } movieClip 5026 SMG - Mineaba PM9_Silencer - Fire L { frame 10 { stop(); } } movieClip 5027 SMG - Mineaba PM9_Silencer - Reload R { frame 37 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 67 { _parent._parent._parent.reloadMe(); } } movieClip 5028 SMG - Mineaba PM9_Silencer - Reload L { frame 37 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 67 { _parent._parent._parent.reloadMe(); } } movieClip 5034 { frame 11 { stop(); } } movieClip 5035 Rifle - AK74 - Fire R { frame 14 { stop(); } } movieClip 5036 Rifle - AK74 - Fire L { frame 14 { stop(); } } movieClip 5037 Rifle - AK74 - Reload R { frame 33 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 77 { _parent._parent._parent.reloadMe(); } } movieClip 5038 Rifle - AK74 - Reload L { frame 33 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 77 { _parent._parent._parent.reloadMe(); } } movieClip 5044 { frame 11 { stop(); } } movieClip 5045 Rifle - AR15 - Fire R { frame 18 { stop(); } } movieClip 5046 Rifle - AR15 - Fire L { frame 17 { stop(); } } movieClip 5047 Rifle - AR15 - Reload R { frame 25 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 59 { _parent._parent._parent.reloadMe(); } } movieClip 5048 Rifle - AR15 - Reload L { frame 25 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 59 { _parent._parent._parent.reloadMe(); } } movieClip 5049 Rifle - SR3 - Fire R { frame 21 { stop(); } } movieClip 5050 Rifle - SR3 - Fire L { frame 22 { stop(); } } movieClip 5051 Rifle - SR3 - Reload R { frame 33 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 71 { _parent._parent._parent.reloadMe(); } } movieClip 5052 Rifle - SR3 - Reload L { frame 33 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 71 { _parent._parent._parent.reloadMe(); } } movieClip 5053 Rifle - M16 - Fire R { frame 12 { stop(); } } movieClip 5054 Rifle - M16 - Fire L { frame 12 { stop(); } } movieClip 5055 Rifle - M16 - Reload R { frame 25 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 59 { _parent._parent._parent.reloadMe(); } } movieClip 5056 Rifle - M16 - Reload L { frame 25 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 59 { _parent._parent._parent.reloadMe(); } } movieClip 5057 { } movieClip 5058 Shotgun - Norinco97k - Fire R { frame 18 { if (_parent._visible) { _parent._parent._parent.ejectShell(); } } frame 24 { _parent._parent._parent.playSound('shotguncock'); } frame 40 { stop(); } } movieClip 5059 Shotgun - Norinco97k - Fire L { frame 18 { if (_parent._visible) { _parent._parent._parent.ejectShell(); } } frame 24 { _parent._parent._parent.playSound('shotguncock'); } frame 40 { stop(); } } movieClip 5060 Shotgun - Norinco97k - Reload R { frame 27 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 61 { _parent._parent._parent.reloadMe(); } } movieClip 5061 Shotgun - Norinco97k - Reload L { frame 27 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 61 { _parent._parent._parent.reloadMe(); } } movieClip 5062 Rifle - Aug - Fire L { } movieClip 5063 Rifle - Aug - Fire R { } movieClip 5064 Rifle - Aug - Reload L { frame 27 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 73 { _parent._parent._parent.reloadMe(); } } movieClip 5065 Rifle - Aug - Reload R { frame 27 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 73 { _parent._parent._parent.reloadMe(); } } movieClip 5066 Rifle - AK74U - Fire R { } movieClip 5067 Rifle - AK74U - Fire L { } movieClip 5068 Rifle - AK74U - Reload L { frame 33 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 77 { _parent._parent._parent.reloadMe(); } } movieClip 5069 Rifle - AK74U - Reload R { frame 33 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 77 { _parent._parent._parent.reloadMe(); } } movieClip 5070 SMG - HK2_Silencer - Reload R { frame 25 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 59 { _parent._parent._parent.reloadMe(); } } movieClip 5071 SMG - HK2_Silencer - Reload L { frame 25 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 59 { _parent._parent._parent.reloadMe(); } } movieClip 5072 SMG - HK2_Silencer - Fire L { } movieClip 5073 SMG - HK2_Silencer - Fire R { } movieClip 5074 SMG - OA93 - Reload R { frame 25 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 57 { _parent._parent._parent.reloadMe(); } } movieClip 5075 SMG - OA93 - Reload L { frame 25 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 57 { _parent._parent._parent.reloadMe(); } } movieClip 5076 SMG - OA93 - Fire R { } movieClip 5077 SMG - OA93 - Fire L { } movieClip 5078 SMG - OA93_Silencer - Reload R { frame 25 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 57 { _parent._parent._parent.reloadMe(); } } movieClip 5079 SMG - OA93_Silencer - Reload L { frame 25 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 57 { _parent._parent._parent.reloadMe(); } } movieClip 5080 SMG - OA93_Silencer - Fire R { } movieClip 5081 SMG - OA93_Silencer - Fire L { } movieClip 5082 Rifle - FN FAL - Fire R { } movieClip 5083 Rifle - FN FAL - Fire L { } movieClip 5084 Rifle - FN FAL - Reload L { frame 33 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 75 { _parent._parent._parent.reloadMe(); } } movieClip 5085 Rifle - FN FAL - Reload R { frame 33 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 75 { _parent._parent._parent.reloadMe(); } } movieClip 5086 Pistol - 357_Snub - Fire L { } movieClip 5087 Pistol - 357_Snub - Fire R { } movieClip 5088 Pistol - 357_Snub - Reload L { frame 23 { if (_parent._visible) { _parent._parent._parent.ejectShell(); _parent._parent._parent.ejectShell(); _parent._parent._parent.ejectShell(); _parent._parent._parent.ejectShell(); _parent._parent._parent.ejectShell(); _parent._parent._parent.ejectShell(); } } frame 55 { _parent._parent._parent.reloadMe(); } } movieClip 5089 Pistol - 357_Snub - Reload R { frame 23 { if (_parent._visible) { _parent._parent._parent.ejectShell(); _parent._parent._parent.ejectShell(); _parent._parent._parent.ejectShell(); _parent._parent._parent.ejectShell(); _parent._parent._parent.ejectShell(); _parent._parent._parent.ejectShell(); } } frame 55 { _parent._parent._parent.reloadMe(); } } movieClip 5090 Rifle - HK416 - Reload R { frame 25 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 59 { _parent._parent._parent.reloadMe(); } } movieClip 5091 Rifle - HK416 - Reload L { frame 25 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 59 { _parent._parent._parent.reloadMe(); } } movieClip 5092 Rifle - HK416 - Fire R { } movieClip 5093 Rifle - HK416 - Fire L { } movieClip 5094 Shotgun - SPAS12 - Reload R { } movieClip 5095 Shotgun - SPAS12 - Reload L { } movieClip 5096 { } movieClip 5097 Shotgun - SPAS12 - Fire R { frame 16 { if (_parent._visible) { _parent._parent._parent.ejectShell(); } } frame 25 { _parent._parent._parent.playSound('shotguncock'); } } movieClip 5098 Shotgun - SPAS12 - Fire L { frame 16 { if (_parent._visible) { _parent._parent._parent.ejectShell(); } } frame 25 { _parent._parent._parent.playSound('shotguncock'); } } movieClip 5099 Rifle - M249 - Fire L { } movieClip 5100 Rifle - M249 - Fire R { } movieClip 5101 Rifle - M249 - Reload L { frame 39 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 183 { _parent._parent._parent.reloadMe(); } } movieClip 5102 Rifle - M249 - Reload R { frame 39 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 183 { _parent._parent._parent.reloadMe(); } } movieClip 5107 { frame 6 { stop(); } } movieClip 5108 Heavy - Chaingun - Fire L { } movieClip 5109 Heavy - Chaingun - Fire R { } movieClip 5110 Shotgun - USAS12 - Fire R { frame 2 { if (_parent._visible) { _parent._parent._parent.ejectShell(); } } } movieClip 5111 Shotgun - USAS12 - Fire L { frame 2 { if (_parent._visible) { _parent._parent._parent.ejectShell(); } } } movieClip 5112 Shotgun - USAS12 - Reload L { frame 33 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 73 { _parent._parent._parent.reloadMe(); } } movieClip 5113 Shotgun - USAS12 - Reload R { frame 33 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 73 { _parent._parent._parent.reloadMe(); } } movieClip 5114 { } movieClip 5115 Pistol - Prokiller460_Silencer - Fire L { frame 19 { stop(); } } movieClip 5116 Pistol - Prokiller460_Silencer - Fire R { frame 19 { stop(); } } movieClip 5117 Pistol - Prokiller460_Silencer - Reload L { frame 16 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 61 { _parent._parent._parent.reloadMe(); } } movieClip 5118 Pistol - Prokiller460_Silencer - Reload R { frame 16 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 61 { _parent._parent._parent.reloadMe(); } } movieClip 5119 Rifle - FAMAS - Fire L { } movieClip 5120 Rifle - FAMAS - Fire R { } movieClip 5121 Rifle - FAMAS - Reload L { frame 27 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 71 { _parent._parent._parent.reloadMe(); } } movieClip 5122 Rifle - FAMAS - Reload R { frame 27 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 71 { _parent._parent._parent.reloadMe(); } } movieClip 5123 Heavy - M203 - Fire L { } movieClip 5124 Heavy - M203 - Fire R { } movieClip 5126 { } movieClip 5127 Heavy - M203 - Reload L { frame 21 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 101 { _parent._parent._parent.reloadMe(); } } movieClip 5128 Heavy - M203 - Reload R { frame 21 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 101 { _parent._parent._parent.reloadMe(); } } movieClip 5148 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _root.myGameSpeed); } onEnterFrame = tick; } frame 25 { _parent.removeMovieClip(); delete _parent; } } movieClip 5150 { } movieClip 5151 Melee - R { } movieClip 5152 Melee - L { } movieClip 5153 Melee - Block { frame 63 { _parent._parent._parent.actionTimer = 10; stop(); } } movieClip 5154 Melee - Block2 { frame 65 { _parent._parent._parent.actionTimer = 12; stop(); } } movieClip 5155 Melee - Block3 { frame 65 { _parent._parent._parent.actionTimer = 12; stop(); } } movieClip 5156 Melee - Block4 { frame 65 { _parent._parent._parent.actionTimer = 12; stop(); } } movieClip 5157 Melee - Block5 { frame 65 { _parent._parent._parent.actionTimer = 12; stop(); } } movieClip 5158 Melee - Block6 { frame 65 { _parent._parent._parent.actionTimer = 12; stop(); } } movieClip 5159 { } movieClip 5160 Pistol - BrowningHP - Reload L { frame 17 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 65 { _parent._parent._parent.reloadMe(); } } movieClip 5161 Pistol - BrowningHP - Reload R { frame 17 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 65 { _parent._parent._parent.reloadMe(); } } movieClip 5162 Pistol - BrowningHP - Fire R { } movieClip 5163 Pistol - BrowningHP - Fire L { } movieClip 5164 { } movieClip 5165 Pistol - Fiveseven - Reload L { frame 17 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 65 { _parent._parent._parent.reloadMe(); } } movieClip 5166 Pistol - Fiveseven - Reload R { frame 17 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 65 { _parent._parent._parent.reloadMe(); } } movieClip 5167 Pistol - Fiveseven - Fire R { } movieClip 5168 Pistol - Fiveseven - Fire L { } movieClip 5169 { } movieClip 5170 Pistol - BrowningHP_Silencer - Reload L { frame 17 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 65 { _parent._parent._parent.reloadMe(); } } movieClip 5171 Pistol - BrowningHP_Silencer - Reload R { frame 17 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 65 { _parent._parent._parent.reloadMe(); } } movieClip 5172 Pistol - BrowningHP_Silencer - Fire R { } movieClip 5173 Pistol - BrowningHP_Silencer - Fire L { } movieClip 5174 { } movieClip 5175 Pistol - Fiveseven_Silencer - Reload L { frame 17 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 65 { _parent._parent._parent.reloadMe(); } } movieClip 5176 Pistol - Fiveseven_Silencer - Reload R { frame 17 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 65 { _parent._parent._parent.reloadMe(); } } movieClip 5177 Pistol - Fiveseven_Silencer - Fire R { } movieClip 5178 Pistol - Fiveseven_Silencer - Fire L { } movieClip 5179 SMG - Uzi - Reload R { frame 37 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 71 { _parent._parent._parent.reloadMe(); } } movieClip 5180 SMG - Uzi - Reload L { frame 37 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 71 { _parent._parent._parent.reloadMe(); } } movieClip 5181 SMG - Uzi - Fire R { } movieClip 5182 SMG - Uzi - Fire L { } movieClip 5183 SMG - Uzi_Silencer - Reload R { frame 37 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 71 { _parent._parent._parent.reloadMe(); } } movieClip 5184 SMG - Uzi_Silencer - Reload L { frame 37 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 71 { _parent._parent._parent.reloadMe(); } } movieClip 5185 SMG - Uzi_Silencer - Fire R { } movieClip 5186 SMG - Uzi_Silencer - Fire L { } movieClip 5187 SMG - M11 - Reload R { frame 37 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 71 { _parent._parent._parent.reloadMe(); } } movieClip 5188 SMG - M11 - Reload L { frame 37 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 71 { _parent._parent._parent.reloadMe(); } } movieClip 5189 SMG - M11 - Fire R { } movieClip 5190 SMG - M11 - Fire L { } movieClip 5191 SMG - M11_Silencer - Reload R { frame 37 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 71 { _parent._parent._parent.reloadMe(); } } movieClip 5192 SMG - M11_Silencer - Reload L { frame 37 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 71 { _parent._parent._parent.reloadMe(); } } movieClip 5193 SMG - M11_Silencer - Fire R { } movieClip 5194 SMG - M11_Silencer - Fire L { } movieClip 5195 { } movieClip 5197 { } movieClip 5198 Pistol - Luger - Reload L { frame 17 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 65 { _parent._parent._parent.reloadMe(); } } movieClip 5199 Pistol - Luger - Reload R { frame 17 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 65 { _parent._parent._parent.reloadMe(); } } movieClip 5200 { } movieClip 5201 Pistol - Luger - Fire R { } movieClip 5202 Pistol - Luger - Fire L { } movieClip 5203 Pistol - OTs33 - Reload L { frame 29 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 57 { _parent._parent._parent.reloadMe(); } } movieClip 5204 Pistol - OTs33 - Reload R { frame 29 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 57 { _parent._parent._parent.reloadMe(); } } movieClip 5205 { } movieClip 5206 Pistol - OTs33 - Fire R { } movieClip 5207 Pistol - OTs33 - Fire L { } movieClip 5208 { } movieClip 5209 Pistol - USPMatch - Reload L { frame 17 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 65 { _parent._parent._parent.reloadMe(); } } movieClip 5210 Pistol - USPMatch - Reload R { frame 17 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 65 { _parent._parent._parent.reloadMe(); } } movieClip 5211 Pistol - USPMatch - Fire R { } movieClip 5212 Pistol - USPMatch - Fire L { } movieClip 5213 { } movieClip 5214 Pistol - USPMatch_Silencer - Reload L { frame 17 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 65 { _parent._parent._parent.reloadMe(); } } movieClip 5215 Pistol - USPMatch_Silencer - Reload R { frame 17 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 65 { _parent._parent._parent.reloadMe(); } } movieClip 5216 Pistol - USPMatch_Silencer - Fire R { } movieClip 5217 Pistol - USPMatch_Silencer - Fire L { } movieClip 5218 Rifle - TAR21 - Fire L { } movieClip 5219 Rifle - TAR21 - Fire R { } movieClip 5220 Rifle - TAR21 - Reload L { frame 27 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 73 { _parent._parent._parent.reloadMe(); } } movieClip 5221 Rifle - TAR21 - Reload R { frame 27 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 73 { _parent._parent._parent.reloadMe(); } } movieClip 5222 SMG - Thompson - Reload R { frame 27 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 57 { _parent._parent._parent.reloadMe(); } } movieClip 5223 SMG - Thompson - Reload L { frame 27 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 57 { _parent._parent._parent.reloadMe(); } } movieClip 5224 { } movieClip 5225 SMG - Thompson - Fire R { } movieClip 5226 SMG - Thompson - Fire L { } movieClip 5227 SMG - Thompson_Silencer - Reload R { frame 27 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 57 { _parent._parent._parent.reloadMe(); } } movieClip 5228 SMG - Thompson_Silencer - Reload L { frame 27 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 57 { _parent._parent._parent.reloadMe(); } } movieClip 5229 { } movieClip 5230 SMG - Thompson_Silencer - Fire R { } movieClip 5231 SMG - Thompson_Silencer - Fire L { } movieClip 5232 { } movieClip 5233 SMG - MP40 - Fire L { } movieClip 5234 SMG - MP40 - Fire R { } movieClip 5235 SMG - MP40 - Reload L { frame 25 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 59 { _parent._parent._parent.reloadMe(); } } movieClip 5236 SMG - MP40 - Reload R { frame 25 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 59 { _parent._parent._parent.reloadMe(); } } movieClip 5237 { } movieClip 5238 SMG - MP40_Silencer - Fire L { } movieClip 5239 SMG - MP40_Silencer - Fire R { } movieClip 5240 SMG - MP40_Silencer - Reload L { frame 25 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 59 { _parent._parent._parent.reloadMe(); } } movieClip 5241 SMG - MP40_Silencer - Reload R { frame 25 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 59 { _parent._parent._parent.reloadMe(); } } movieClip 5242 Pistol - AutomagV - Reload L { frame 19 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 61 { _parent._parent._parent.reloadMe(); } } movieClip 5243 Pistol - AutomagV - Reload R { frame 19 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 61 { _parent._parent._parent.reloadMe(); } } movieClip 5244 { } movieClip 5245 Pistol - AutomagV - Fire R { } movieClip 5246 Pistol - AutomagV - Fire L { } movieClip 5247 { } movieClip 5248 Pistol - P1445 - Fire R { } movieClip 5249 Pistol - P1445 - Fire L { } movieClip 5250 Pistol - P1445 - Reload L { frame 19 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 61 { _parent._parent._parent.reloadMe(); } } movieClip 5251 Pistol - P1445 - Reload R { frame 19 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 61 { _parent._parent._parent.reloadMe(); } } movieClip 5252 { } movieClip 5253 Pistol - P1445_Silencer - Fire R { } movieClip 5254 Pistol - P1445_Silencer - Fire L { } movieClip 5255 Pistol - P1445_Silencer - Reload L { frame 19 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 61 { _parent._parent._parent.reloadMe(); } } movieClip 5256 Pistol - P1445_Silencer - Reload R { frame 19 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 61 { _parent._parent._parent.reloadMe(); } } movieClip 5257 { } movieClip 5258 Rifle - G36 - Fire L { } movieClip 5259 Rifle - G36 - Fire R { } movieClip 5260 Rifle - G36 - Reload L { frame 25 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 59 { _parent._parent._parent.reloadMe(); } } movieClip 5261 Rifle - G36 - Reload R { frame 25 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 59 { _parent._parent._parent.reloadMe(); } } movieClip 5262 { } movieClip 5263 Pistol - Auto9 - Reload L { frame 19 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 65 { _parent._parent._parent.reloadMe(); } } movieClip 5264 Pistol - Auto9 - Reload R { frame 19 { if (_parent._visible) { _parent._parent._parent.ejectClip(); } } frame 65 { _parent._parent._parent.reloadMe(); } } movieClip 5265 Pistol - Auto9 - Fire R { } movieClip 5266 Pistol - Auto9 - Fire L { } movieClip 5267 Heavy - ElectroCannon - Fire L { } movieClip 5268 Heavy - ElectroCannon - Fire R { } movieClip 5269 Heavy - ElectroCannon - Reload L { } movieClip 5270 Heavy - ElectroCannon - Reload R { } movieClip 5271 MadnessGunDump { } movieClip 5273 myHitBox { frame 1 { _visible = false; } } movieClip 5274 { } movieClip 5299 { frame 1 { stop(); } } movieClip 5300 { frame 1 { function createWound(inNumber) { this['wound' + String(inNumber)] = attachMovie('madness_wound', 'wound' + String(inNumber), getNextHighestDepth()); } } } movieClip 5315 { frame 1 { stop(); } } movieClip 5316 { frame 1 { function createWound(inNumber) { this['wound' + String(inNumber)] = attachMovie('madness_wound', 'wound' + String(inNumber), getNextHighestDepth()); } } } movieClip 5317 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } } movieClip 5323 { frame 11 { stop(); } } movieClip 5325 { frame 11 { stop(); } } movieClip 5326 { } movieClip 5334 { frame 11 { stop(); } } movieClip 5338 { frame 11 { stop(); } } movieClip 5339 { } movieClip 5340 { frame 1 { stop(); } } movieClip 5342 { } movieClip 5344 { } movieClip 5346 { } movieClip 5347 { } movieClip 5348 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } } movieClip 5349 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } } movieClip 5350 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } } movieClip 5351 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } } movieClip 5352 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } } movieClip 5353 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } } movieClip 5354 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 14 { _parent.useActivator(); } } movieClip 5355 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } } movieClip 5356 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } } movieClip 5357 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 53 { gotoAndPlay('loop'); } } movieClip 5358 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 53 { gotoAndPlay('loop'); } } movieClip 5359 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 2 { _parent.applyYMove(3); } frame 21 { stop(); } } movieClip 5360 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 2 { _parent.applyYMove(3); } frame 21 { stop(); } } movieClip 5361 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } } movieClip 5362 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } } movieClip 5363 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } } movieClip 5364 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } } movieClip 5365 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } } movieClip 5366 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } } movieClip 5367 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } } movieClip 5368 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } } movieClip 5369 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } } movieClip 5370 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } } movieClip 5371 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } } movieClip 5372 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 21 { _parent.checkMeleeHit('unarmed', 'mid'); } frame 41 { stop(); } frame 42 { stop(); } } movieClip 5373 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 9 { _parent.checkMeleeHit('unarmed', 'high'); } frame 29 { stop(); } frame 30 { stop(); } } movieClip 5374 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 21 { _parent.checkMeleeHit('unarmed', 'mid'); } frame 51 { stop(); } frame 52 { stop(); } } movieClip 5375 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 29 { _parent.checkMeleeHit('unarmed', 'mid'); } frame 53 { stop(); } frame 54 { stop(); } } movieClip 5376 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 33 { _parent.checkMeleeHit('unarmed', 'high'); } frame 57 { stop(); } frame 58 { stop(); } } movieClip 5377 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 3 { _parent.playSound('swish'); } frame 7 { _parent.checkMeleeHit('unarmed', 'mid'); } frame 47 { stop(); } frame 48 { stop(); } } movieClip 5378 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 3 { _parent.playSound('swish'); } frame 9 { _parent.checkMeleeHit('unarmed', 'mid'); } frame 67 { stop(); } frame 68 { stop(); } } movieClip 5379 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 11 { _parent.playSound('swapmelee'); } frame 25 { _parent.playSound('swapmelee'); } frame 39 { _parent.playSound('swapmelee'); } frame 59 { stop(); } } movieClip 5381 { } movieClip 5384 { } movieClip 5385 { } movieClip 5386 { frame 1 { stop(); if (_parent._parent._parent._parent.myDataRef.myCharacter != undefined) { gotoAndStop(_parent._parent._parent._parent.myDataRef.myCharacter); } } } movieClip 5391 { frame 1 { stop(); if (_parent._parent._parent._parent.myDataRef.myCharacter != undefined) { gotoAndStop(_parent._parent._parent._parent.myDataRef.myCharacter); } } } movieClip 5395 { frame 1 { stop(); if (_parent._parent._parent._parent.myDataRef.myCharacter != undefined) { gotoAndStop(_parent._parent._parent._parent.myDataRef.myCharacter); } } } movieClip 5397 { frame 1 { stop(); if (_parent._parent._parent._parent.myDataRef.myCharacter != undefined) { gotoAndStop(_parent._parent._parent._parent.myDataRef.myCharacter); } } } movieClip 5398 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } } movieClip 5399 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } } movieClip 5400 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 12 { _parent.playSound('swish'); } } movieClip 5401 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 197 { stop(); } } movieClip 5402 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 87 { stop(); } } movieClip 5407 { } movieClip 5408 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 209 { stop(); } } movieClip 5409 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 83 { stop(); } } movieClip 5415 { } movieClip 5416 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 56 { gotoAndPlay('loop'); } } movieClip 5417 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 5 { _parent.generalStaggerMovement(); } frame 15 { _parent.generalStaggerMovement(); } frame 25 { stop(); } } movieClip 5418 { } movieClip 5419 { } movieClip 5420 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 15 { _parent.playSound('land'); } frame 16 { _parent.killMe(); } frame 17 { _parent.actionSlowdown = true; } frame 46 { nextFrame(); onEnterFrame = null; } frame 47 { stop(); stop(); onEnterFrame = null; } } movieClip 5421 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 21 { _parent.actionSlowdown = true; _parent.playSound('land'); } frame 27 { _parent.killMe(); } frame 117 { nextFrame(); onEnterFrame = null; } frame 118 { stop(); stop(); onEnterFrame = null; } } movieClip 5422 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 23 { _parent.actionSlowdown = true; _parent.playSound('land'); } frame 27 { _parent.killMe(); } frame 47 { nextFrame(); onEnterFrame = null; } frame 48 { stop(); stop(); onEnterFrame = null; } } movieClip 5423 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 21 { _parent.actionSlowdown = true; _parent.playSound('land'); } frame 37 { _parent.killMe(); } frame 65 { nextFrame(); onEnterFrame = null; } frame 66 { stop(); stop(); onEnterFrame = null; } } movieClip 5424 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 17 { _parent.actionSlowdown = true; _parent.playSound('land'); } frame 22 { _parent.killMe(); } frame 41 { nextFrame(); onEnterFrame = null; } frame 42 { stop(); stop(); onEnterFrame = null; } } movieClip 5425 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; _parent.actionSlowdown = true; } frame 3 { _parent.generalStaggerMovement(); } frame 9 { _parent.generalStaggerMovement(); } frame 17 { _parent.applySpeed(2); } frame 19 { _parent.applySpeed(2); } frame 21 { _parent.applySpeed(2); } frame 23 { _parent.applySpeed(2); } frame 25 { _parent.applySpeed(2); } frame 27 { _parent.killMe(); } frame 28 { _parent.playSound('land'); } frame 47 { nextFrame(); onEnterFrame = null; } frame 48 { stop(); stop(); onEnterFrame = null; } } movieClip 5426 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 25 { _parent.actionSlowdown = true; _parent.playSound('land'); } frame 32 { _parent.killMe(); } frame 53 { nextFrame(); onEnterFrame = null; } frame 54 { stop(); stop(); onEnterFrame = null; } } movieClip 5427 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; _parent.actionSlowdown = true; } frame 14 { _parent.applySpeed(3); } frame 16 { _parent.applySpeed(4); } frame 18 { _parent.applySpeed(5); } frame 20 { _parent.applySpeed(5); } frame 22 { _parent.applySpeed(5); } frame 24 { _parent.playSound('land'); } frame 25 { _parent.killMe(); } frame 101 { nextFrame(); onEnterFrame = null; } frame 102 { stop(); stop(); onEnterFrame = null; } } movieClip 5428 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; _parent.actionSlowdown = true; } frame 11 { _parent.generalStaggerMovement(); } frame 17 { _parent.generalStaggerMovement(); } frame 24 { _parent.generalStaggerMovement(); } frame 30 { _parent.generalStaggerMovement(); } frame 33 { _parent.applySpeed(3); } frame 35 { _parent.applySpeed(4); } frame 37 { _parent.applySpeed(5); } frame 39 { _parent.applySpeed(5); } frame 41 { _parent.applySpeed(5); } frame 45 { _parent.killMe(); } frame 46 { _parent.playSound('land'); } frame 58 { nextFrame(); onEnterFrame = null; } frame 59 { stop(); stop(); onEnterFrame = null; } } movieClip 5429 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; _parent.actionSlowdown = true; } frame 15 { _parent.applySpeed(-2); } frame 21 { _parent.applySpeed(-2); } frame 23 { _parent.applySpeed(-2); } frame 25 { _parent.applySpeed(-2); } frame 27 { _parent.applySpeed(-4); } frame 29 { _parent.applySpeed(-4); } frame 32 { _parent.killMe(); _parent.playSound('land'); } frame 55 { nextFrame(); onEnterFrame = null; } frame 56 { stop(); stop(); onEnterFrame = null; } } movieClip 5430 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; _parent.actionSlowdown = true; } frame 11 { _parent.generalStaggerMovement(); } frame 25 { _parent.generalStaggerMovement(); } frame 35 { _parent.applySpeed(-2); } frame 37 { _parent.applySpeed(-2); } frame 39 { _parent.applySpeed(-2); } frame 41 { _parent.applySpeed(-4); } frame 42 { _parent.killMe(); _parent.playSound('land'); } frame 43 { _parent.applySpeed(-5); } frame 59 { nextFrame(); onEnterFrame = null; } frame 60 { stop(); stop(); onEnterFrame = null; } } movieClip 5431 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; _parent.actionSlowdown = true; } frame 3 { _parent.applySpeed(-3); } frame 6 { _parent.applySpeed(-4); } frame 8 { _parent.applySpeed(-4); } frame 10 { _parent.applySpeed(-5); } frame 12 { _parent.applySpeed(-5); } frame 14 { _parent.applySpeed(-4); } frame 17 { _parent.playSound('land'); } frame 19 { _parent.killMe(); } frame 80 { nextFrame(); onEnterFrame = null; } frame 81 { stop(); stop(); onEnterFrame = null; } } movieClip 5432 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; _parent.actionSlowdown = true; } frame 25 { _parent.applySpeed(3); } frame 27 { _parent.applySpeed(4); } frame 29 { _parent.applySpeed(4); } frame 31 { _parent.applySpeed(5); } frame 33 { _parent.applySpeed(3); } frame 38 { _parent.playSound('land'); } frame 40 { _parent.killMe(); } frame 75 { _parent.generalStaggerMovement(); } frame 98 { nextFrame(); onEnterFrame = null; } frame 99 { stop(); stop(); onEnterFrame = null; } } movieClip 5433 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; _parent.actionSlowdown = true; _parent.applySpeed(-2); } frame 66 { _parent.noDamage = true; } frame 67 { _parent.applySpeed(2); } frame 69 { _parent.applySpeed(3); } frame 71 { _parent.applySpeed(4); } frame 73 { _parent.applySpeed(5); } frame 75 { _parent.applySpeed(6); } frame 77 { _parent.applySpeed(7); } frame 79 { _parent.applySpeed(7); } frame 85 { _parent.killMe(); _parent.playSound('land'); } frame 93 { nextFrame(); onEnterFrame = null; } frame 94 { stop(); stop(); onEnterFrame = null; } } movieClip 5434 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; _parent.actionSlowdown = true; _parent.applySpeed(-6); } frame 20 { _parent.generalStaggerMovement(); } frame 29 { _parent.generalStaggerMovement(); } frame 40 { _parent.generalStaggerMovement(); } frame 50 { _parent.generalStaggerMovement(); } frame 61 { _parent.generalStaggerMovement(); } frame 74 { _parent.generalStaggerMovement(); } frame 85 { _parent.generalStaggerMovement(); } frame 97 { _parent.generalStaggerMovement(); } frame 106 { _parent.generalStaggerMovement(); } frame 116 { _parent.generalStaggerMovement(); } frame 127 { _parent.generalStaggerMovement(); } frame 134 { _parent.generalStaggerMovement(); } frame 145 { _parent.generalStaggerMovement(); } frame 153 { _parent.generalStaggerMovement(); } frame 177 { _parent.generalStaggerMovement(); } frame 187 { _parent.noDamage = true; } frame 188 { _parent.applySpeed(-3); } frame 190 { _parent.applySpeed(-4); } frame 192 { _parent.applySpeed(-5); } frame 194 { _parent.applySpeed(-6); } frame 196 { _parent.applySpeed(-6); } frame 201 { _parent.killMe(); _parent.playSound('land'); } frame 223 { nextFrame(); onEnterFrame = null; } frame 224 { stop(); stop(); onEnterFrame = null; } } movieClip 5435 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; _parent.actionSlowdown = true; } frame 15 { _parent.generalStaggerMovement(); } frame 23 { _parent.generalStaggerMovement(); } frame 29 { _parent.noDamage = true; } frame 30 { _parent.applySpeed(-3); } frame 32 { _parent.applySpeed(-4); } frame 34 { _parent.applySpeed(-5); } frame 36 { _parent.applySpeed(-6); } frame 38 { _parent.applySpeed(-6); } frame 39 { _parent.killMe(); _parent.playSound('land'); } frame 61 { nextFrame(); onEnterFrame = null; } frame 62 { stop(); stop(); onEnterFrame = null; } } movieClip 5436 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; _parent.actionSlowdown = true; } frame 12 { _parent.applySpeed(-3); } frame 18 { _parent.applySpeed(-3); } frame 24 { _parent.applySpeed(-3); } frame 30 { _parent.applySpeed(-3); } frame 36 { _parent.applySpeed(-3); } frame 43 { _parent.applySpeed(-3); } frame 52 { _parent.applySpeed(-3); } frame 55 { _parent.applySpeed(-3); } frame 59 { _parent.noDamage = true; } frame 60 { _parent.applySpeed(-4); } frame 62 { _parent.applySpeed(-5); } frame 64 { _parent.applySpeed(-6); } frame 66 { _parent.applySpeed(-6); } frame 73 { _parent.killMe(); _parent.playSound('land'); } frame 87 { nextFrame(); onEnterFrame = null; } frame 88 { stop(); stop(); onEnterFrame = null; } } movieClip 5437 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; _parent.actionSlowdown = true; } frame 11 { _parent.generalStaggerMovement(); } frame 23 { _parent.generalStaggerMovement(); } frame 36 { _parent.generalStaggerMovement(); } frame 46 { _parent.generalStaggerMovement(); } frame 59 { _parent.generalStaggerMovement(); } frame 69 { _parent.generalStaggerMovement(); } frame 76 { _parent.noDamage = true; } frame 77 { _parent.applySpeed(-4); } frame 79 { _parent.applySpeed(-5); } frame 81 { _parent.applySpeed(-5); } frame 83 { _parent.applySpeed(-6); } frame 85 { _parent.applySpeed(-6); } frame 86 { _parent.killMe(); _parent.playSound('land'); } frame 109 { nextFrame(); onEnterFrame = null; } frame 110 { stop(); stop(); onEnterFrame = null; } } movieClip 5438 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; _parent.actionSlowdown = true; } frame 74 { _parent.applySpeed(-2); } frame 76 { _parent.applySpeed(-2); } frame 77 { _parent.noDamage = true; } frame 78 { _parent.applySpeed(-2); } frame 80 { _parent.applySpeed(-3); } frame 83 { _parent.applySpeed(-4); } frame 86 { _parent.applySpeed(-5); } frame 89 { _parent.applySpeed(-5); } frame 91 { _parent.applySpeed(-5); } frame 93 { _parent.applySpeed(-4); } frame 94 { _parent.killMe(); _parent.playSound('land'); } frame 117 { nextFrame(); onEnterFrame = null; } frame 118 { stop(); stop(); onEnterFrame = null; } } movieClip 5439 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 6 { _parent.playSound('land'); } frame 23 { gotoAndPlay('loop'); } frame 24 { gotoAndPlay('loop'); } frame 25 { gotoAndPlay('loop'); } } movieClip 5440 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 13 { _parent.playSound('land'); } frame 29 { gotoAndPlay('loop'); } frame 30 { gotoAndPlay('loop'); } frame 31 { gotoAndPlay('loop'); } } movieClip 5441 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 6 { _parent.killMe(); } frame 8 { _parent.actionSlowdown = true; } frame 14 { _parent.playSound('land'); } frame 20 { stop(); } frame 21 { stop(); } } movieClip 5442 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 28 { _parent.actionSlowdown = true; } frame 29 { _parent.killMe(); _parent.playSound('land'); } frame 43 { stop(); } frame 44 { stop(); } } movieClip 5443 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 3 { _parent.killMe(); _parent.playSound('land'); } frame 4 { _parent.actionSlowdown = true; } frame 16 { stop(); } frame 17 { stop(); } } movieClip 5444 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; _parent.actionSlowdown = true; } frame 19 { _parent.applySpeed(-2); } frame 21 { _parent.applySpeed(-2); } frame 23 { _parent.applySpeed(-2); } frame 25 { _parent.applySpeed(-4); } frame 27 { _parent.applySpeed(-5); } frame 28 { _parent.killMe(); _parent.playSound('land'); } frame 49 { nextFrame(); onEnterFrame = null; } frame 50 { stop(); stop(); onEnterFrame = null; } } movieClip 5445 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; _parent.actionSlowdown = false; } frame 28 { _parent.killMe(); _parent.playSound('land'); } frame 29 { _parent.actionSlowdown = true; } frame 49 { nextFrame(); onEnterFrame = null; } frame 50 { stop(); stop(); onEnterFrame = null; } } movieClip 5446 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 34 { _parent.spitBlood(false); } frame 70 { _parent.spitBlood(false); } frame 75 { _parent.spitBlood(false); } frame 112 { _parent.spitBlood(true); } frame 115 { _parent.spitBlood(false); } frame 118 { _parent.spitBlood(false); } frame 121 { _parent.spitBlood(false); } frame 124 { _parent.spitBlood(false); } frame 144 { } frame 157 { stop(); } frame 158 { stop(); } } movieClip 5482 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; _parent.actionSlowdown = true; } frame 14 { _parent.killMe(); } frame 75 { nextFrame(); onEnterFrame = null; } frame 76 { stop(); stop(); onEnterFrame = null; } } movieClip 5483 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 17 { _parent.actionSlowdown = true; } frame 69 { _parent.wounded = 2; } frame 70 { _parent.wounded = 2; } frame 71 { _parent.wounded = 2; gotoAndPlay('loop'); } frame 72 { gotoAndPlay('loop'); } } movieClip 5484 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } } movieClip 5485 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } } movieClip 5488 { } movieClip 5489 { } movieClip 5490 { } movieClip 5492 { frame 1 { _visible = false; } } movieClip 5493 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; var flipPartner = true; } } movieClip 5494 { } movieClip 5495 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 21 { _parent.playSound('swish'); } frame 27 { _parent.checkMeleeHit('full', 'mid'); } frame 47 { stop(); } frame 48 { stop(); } } movieClip 5496 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 21 { _parent.playSound('swish'); } frame 27 { _parent.checkMeleeHit('full', 'mid'); } frame 47 { stop(); } frame 48 { stop(); } } movieClip 5497 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; _parent.playSound('swish'); } frame 5 { _parent.checkMeleeHit('full', 'mid'); } frame 29 { stop(); } frame 30 { stop(); } } movieClip 5498 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; _parent.playSound('swish'); } frame 5 { _parent.checkMeleeHit('full', 'mid'); } frame 23 { stop(); } frame 24 { stop(); } } movieClip 5499 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 3 { _parent.playSound('swish'); } frame 7 { _parent.checkMeleeHit('full', 'high'); } frame 24 { stop(); } frame 25 { stop(); } } movieClip 5500 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 3 { _parent.playSound('swish'); } frame 7 { _parent.checkMeleeHit('full', 'low'); } frame 25 { stop(); } frame 26 { stop(); } } movieClip 5501 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 5 { _parent.playSound('swish'); } frame 9 { _parent.checkMeleeHit('full', 'mid'); } frame 24 { stop(); } frame 25 { stop(); } } movieClip 5502 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 5 { _parent.playSound('swish'); } frame 9 { _parent.checkMeleeHit('full', 'high'); } frame 27 { stop(); } frame 28 { stop(); } } movieClip 5503 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 3 { _parent.playSound('swish'); } frame 7 { _parent.checkMeleeHit('full', 'mid'); } frame 19 { stop(); } frame 20 { stop(); } } movieClip 5504 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 2 { _parent.playSound('swish'); } frame 7 { _parent.checkMeleeHit('full', 'high'); } frame 25 { _parent.playSound('swish'); } frame 29 { _parent.checkMeleeHit('full', 'high'); } frame 43 { stop(); } frame 44 { stop(); } } movieClip 5505 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 9 { _parent.playSound('swish'); } frame 13 { _parent.checkMeleeHit('full', 'mid'); } frame 22 { _parent.playSound('swish'); } frame 25 { _parent.checkMeleeHit('full', 'mid'); } frame 35 { stop(); } frame 36 { stop(); } } movieClip 5506 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 7 { _parent.checkMeleeHit('unarmed', 'mid'); } frame 17 { _parent.playSound('swish'); } frame 21 { _parent.checkMeleeHit('full', 'mid'); } frame 37 { stop(); } frame 38 { stop(); } } movieClip 5507 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; _parent.playSound('swish'); } frame 5 { _parent.checkMeleeHit('full', 'mid'); } frame 21 { _parent.playSound('swish'); } frame 25 { _parent.checkMeleeHit('unarmed', 'mid'); } frame 37 { stop(); } frame 38 { stop(); } } movieClip 5508 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 5 { _parent.checkMeleeHit('unarmed', 'mid'); } frame 23 { _parent.playSound('swish'); } frame 27 { _parent.checkMeleeHit('full', 'mid'); } frame 39 { stop(); } frame 40 { stop(); } } movieClip 5509 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 5 { _parent.checkMeleeHit('unarmed', 'mid'); } frame 31 { _parent.playSound('swish'); } frame 37 { _parent.checkMeleeHit('full', 'high'); } frame 57 { stop(); } frame 58 { stop(); } } movieClip 5510 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 4 { _parent.playSound('swish'); } frame 9 { _parent.checkMeleeHit('full', 'mid'); } frame 15 { _parent.playSound('swish'); } frame 19 { _parent.checkMeleeHit('full', 'mid'); } frame 26 { _parent.playSound('swish'); } frame 29 { _parent.checkMeleeHit('full', 'high'); } frame 41 { stop(); } frame 42 { stop(); } } movieClip 5511 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 12 { _parent.playSound('swish'); } frame 17 { _parent.checkMeleeHit('full', 'mid'); } frame 28 { _parent.playSound('swish'); } frame 32 { _parent.checkMeleeHit('full', 'high'); } frame 49 { stop(); } frame 50 { stop(); } } movieClip 5512 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 4 { _parent.playSound('swish'); } frame 9 { _parent.checkMeleeHit('unarmed', 'high'); } frame 25 { stop(); } frame 26 { stop(); } } movieClip 5513 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 6 { _parent.playSound('swish'); } frame 9 { _parent.checkMeleeHit('unarmed', 'high'); } frame 25 { stop(); } frame 26 { stop(); } } movieClip 5514 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 11 { _parent.playSound('swish'); } frame 15 { _parent.throwWeapon(); } frame 47 { stop(); } } movieClip 5515 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 13 { _parent.playSound('swishlow'); } frame 18 { _parent.checkMeleeHit('full', 'mid'); _parent.shakeyCam(8); } frame 59 { stop(); } frame 60 { stop(); } } movieClip 5516 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 13 { _parent.playSound('swish'); } frame 19 { _parent.checkMeleeHit('unarmed', 'mid'); } frame 20 { _parent.checkMeleeHit('unarmed', 'mid'); } frame 37 { stop(); } frame 38 { stop(); } } movieClip 5517 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; _parent.playSound('swish'); } frame 5 { _parent.checkMeleeHit('full', 'mid'); } frame 43 { stop(); } frame 44 { stop(); } } movieClip 5518 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 12 { _parent.playSound('swish'); } frame 21 { _parent.checkMeleeHit('unarmed', 'high'); _parent.checkMeleeHit('unarmed', 'high'); } frame 39 { _parent.playSound('land'); } frame 55 { stop(); } frame 56 { stop(); } } movieClip 5519 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 16 { _parent.checkMeleeHit('unarmed', 'high'); _parent.checkMeleeHit('unarmed', 'mid'); } frame 37 { stop(); } frame 38 { stop(); } } movieClip 5520 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 12 { _parent.playSound('swish'); } frame 37 { _parent.checkMeleeHit('unarmed', 'high'); _parent.checkMeleeHit('unarmed', 'high'); } frame 38 { _parent.playSound('landhard'); } frame 39 { _parent.shakeyCam(19); } frame 73 { _parent.shakeyCam(8); } frame 91 { stop(); } frame 92 { stop(); } } movieClip 5521 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 27 { _parent.checkMeleeHit('unarmed', 'mid'); } frame 47 { stop(); } frame 48 { stop(); } } movieClip 5522 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 27 { _parent.checkMeleeHit('unarmed', 'mid'); } frame 47 { stop(); } frame 48 { stop(); } } movieClip 5523 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 5 { _parent.checkMeleeHit('unarmed', 'mid'); } frame 25 { stop(); } frame 26 { stop(); } } movieClip 5524 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 5 { _parent.checkMeleeHit('unarmed', 'mid'); } frame 25 { stop(); } frame 26 { stop(); } } movieClip 5525 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 7 { _parent.checkMeleeHit('unarmed', 'high'); } frame 30 { stop(); } frame 31 { stop(); } } movieClip 5526 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 7 { _parent.checkMeleeHit('unarmed', 'high'); } frame 29 { stop(); } frame 30 { stop(); } } movieClip 5527 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 7 { _parent.checkMeleeHit('unarmed', 'low'); } frame 23 { stop(); } frame 24 { stop(); } } movieClip 5528 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 7 { _parent.checkMeleeHit('unarmed', 'low'); } frame 23 { stop(); } frame 24 { stop(); } } movieClip 5529 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 7 { _parent.checkMeleeHit('unarmed', 'high'); } frame 21 { stop(); } frame 22 { stop(); } } movieClip 5530 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 7 { _parent.checkMeleeHit('unarmed', 'high'); } frame 21 { stop(); } frame 22 { stop(); } } movieClip 5531 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 5 { _parent.checkMeleeHit('unarmed', 'high'); } frame 21 { stop(); } frame 22 { stop(); } } movieClip 5532 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 3 { _parent.checkMeleeHit('unarmed', 'mid'); } frame 13 { stop(); } frame 14 { stop(); } } movieClip 5533 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 3 { _parent.checkMeleeHit('unarmed', 'mid'); } frame 13 { stop(); } frame 14 { stop(); } } movieClip 5534 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 5 { _parent.checkMeleeHit('unarmed', 'mid'); } frame 31 { stop(); } frame 32 { stop(); } } movieClip 5535 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 7 { _parent.checkMeleeHit('unarmed', 'mid'); } frame 31 { stop(); } frame 32 { stop(); } } movieClip 5536 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 7 { _parent.checkMeleeHit('unarmed', 'low'); } frame 8 { _parent.checkMeleeHit('unarmed', 'mid'); } frame 9 { _parent.checkMeleeHit('unarmed', 'high'); } frame 37 { stop(); } frame 38 { stop(); } } movieClip 5537 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 19 { _parent.checkMeleeHit('unarmed', 'low'); _parent.checkMeleeHit('unarmed', 'verylow'); _parent.shakeyCam(8); } frame 44 { stop(); } frame 45 { stop(); } } movieClip 5538 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 25 { _parent.checkMeleeHit('unarmed', 'low'); _parent.checkMeleeHit('unarmed', 'verylow'); } frame 26 { _parent.shakeyCam(8); } frame 52 { stop(); } frame 53 { stop(); } } movieClip 5539 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 30 { _parent.checkMeleeHit('unarmed', 'low'); _parent.checkMeleeHit('unarmed', 'verylow'); _parent.shakeyCam(8); } frame 55 { stop(); } frame 56 { stop(); } } movieClip 5540 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 12 { _parent.checkMeleeHit('unarmed', 'high'); } frame 27 { stop(); } frame 28 { stop(); } } movieClip 5541 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 12 { _parent.checkMeleeHit('unarmed', 'high'); } frame 27 { stop(); } frame 28 { stop(); } } movieClip 5542 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 11 { _parent.checkMeleeHit('unarmed', 'mid'); } frame 35 { stop(); } frame 36 { stop(); } } movieClip 5543 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } } movieClip 5544 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 20 { _parent.zombieBite(); } frame 66 { _parent.zombieBite(); } } movieClip 5545 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } } movieClip 5546 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; _parent.actionSlowdown = true; } frame 79 { _parent.applySpeed(-4); } frame 81 { _parent.applySpeed(-5); } frame 83 { _parent.applySpeed(-5); } frame 85 { _parent.applySpeed(-4); } frame 87 { _parent.playSound('land'); } frame 127 { _parent.turnZombie(); } frame 181 { nextFrame(); onEnterFrame = null; } frame 182 { stop(); stop(); onEnterFrame = null; } } movieClip 5547 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; _parent.actionSlowdown = true; } frame 21 { nextFrame(); onEnterFrame = null; } frame 22 { stop(); stop(); onEnterFrame = null; } } movieClip 5548 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 5 { _parent.grappleSmack('unarmed'); } } movieClip 5549 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } } movieClip 5550 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; _parent.actionSlowdown = true; _parent.applySpeed(-4); } frame 2 { _parent.applySpeed(-3); } frame 8 { _parent.applySpeed(-2); } frame 22 { _parent.applySpeed(2); } frame 26 { _parent.applySpeed(3); } frame 43 { _parent.applySpeed(4); } frame 63 { _parent.bossEvents('death1'); } } movieClip 5551 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } } movieClip 5552 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } } movieClip 5553 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } } movieClip 5554 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; _parent.actionSlowdown = true; } frame 31 { _parent.applySpeed(4); } frame 33 { _parent.applySpeed(12); } frame 35 { _parent.applySpeed(12); } frame 37 { _parent.applySpeed(12); } frame 40 { _parent.applySpeed(12); } frame 41 { _parent.checkMeleeHit('unarmed', 'verylow'); } frame 42 { _parent.playSound('landhard'); } frame 43 { _parent.shakeyCam(19); } frame 43 { _parent.applySpeed(1); } frame 85 { _parent.playSound('swapgun'); } frame 125 { _parent.bossEvents('death2'); } } movieClip 5555 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } } movieClip 5556 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } if (onEnterFrame == null) { onEnterFrame = tick; } _parent.actionSlowdown = true; } frame 29 { _parent.killMe(); _parent.playSound('landhard'); } frame 30 { _parent.shakeyCam(10); } frame 51 { _parent.bossEvents('death3'); } } movieClip 5557 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; _parent.actionSlowdown = true; } frame 32 { _parent.applySpeed(1); } frame 36 { _parent.applySpeed(2); } frame 41 { _parent.applySpeed(3); } frame 46 { _parent.applySpeed(4); } frame 57 { _parent.applySpeed(6); } frame 58 { _parent.checkMeleeHit('unarmed', 'verylow'); } frame 62 { _parent.playSound('landhard'); } frame 63 { _parent.shakeyCam(19); } frame 63 { _parent.applySpeed(1); } frame 209 { MadnessEvents.bossEvents(MadnessCharacter(_parent), 'death1'); } } movieClip 5558 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; _parent.actionSlowdown = false; } frame 23 { _parent.actionSlowdown = true; _parent.playSound('land'); } frame 81 { stop(); } frame 82 { stop(); } } movieClip 5559 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; _parent.actionSlowdown = false; } frame 23 { _parent.actionSlowdown = true; _parent.playSound('land'); } frame 81 { stop(); } frame 82 { stop(); } } movieClip 5560 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; _parent.actionSlowdown = true; } frame 27 { _parent.playSound('land'); } frame 58 { _parent.resurrectFlash(); } frame 84 { _parent.resurrectExplode(); } frame 106 { stop(); } frame 107 { stop(); } } movieClip 5561 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; _parent.actionSlowdown = true; } frame 27 { _parent.playSound('land'); } frame 57 { _parent.resurrectFlash(); } frame 73 { _parent.resurrectExplode(); } frame 97 { stop(); } frame 98 { stop(); } } movieClip 5562 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; _parent.actionSlowdown = false; } frame 19 { _parent.playSound('land'); _parent.actionSlowdown = true; } frame 45 { _parent.playSound('swish'); } frame 51 { _parent.freeHands(); } frame 83 { stop(); } frame 84 { stop(); } } movieClip 5563 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; _parent.actionSlowdown = false; } frame 17 { _parent.playSound('land'); _parent.actionSlowdown = true; } frame 45 { _parent.playSound('swish'); } frame 51 { _parent.freeHands(); } frame 85 { stop(); } frame 86 { stop(); } } movieClip 5564 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; _parent.actionSlowdown = false; } frame 11 { _parent.actionSlowdown = true; _parent.playSound('land'); } frame 71 { stop(); } frame 72 { stop(); } } movieClip 5565 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; _parent.actionSlowdown = false; } frame 9 { _parent.actionSlowdown = true; _parent.playSound('land'); } frame 59 { stop(); } frame 60 { stop(); } } movieClip 5566 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 17 { stop(); } frame 18 { stop(); } } movieClip 5567 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 21 { stop(); } frame 22 { stop(); } } movieClip 5568 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 18 { stop(); } frame 19 { stop(); } } movieClip 5569 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 2 { _parent.generalStaggerMovement(); } frame 5 { _parent.generalStaggerMovement(); } frame 17 { _parent.generalStaggerMovement(); } frame 27 { _parent.generalStaggerMovement(); } frame 37 { _parent.generalStaggerMovement(); } frame 53 { stop(); } frame 54 { stop(); } } movieClip 5570 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 29 { stop(); } frame 30 { stop(); } } movieClip 5571 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 25 { stop(); } frame 26 { stop(); } } movieClip 5572 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 33 { stop(); } } movieClip 5573 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 32 { stop(); } } movieClip 5574 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 2 { _parent.generalStaggerMovement(); } frame 5 { _parent.generalStaggerMovement(); } frame 17 { _parent.generalStaggerMovement(); } frame 27 { _parent.generalStaggerMovement(); } frame 37 { _parent.generalStaggerMovement(); } frame 53 { stop(); } frame 54 { stop(); } } movieClip 5575 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 67 { stop(); } frame 68 { stop(); } } movieClip 5576 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; _parent.playSound('swish'); } frame 9 { nextFrame(); onEnterFrame = null; } frame 10 { stop(); stop(); onEnterFrame = null; } } movieClip 5577 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; _parent.playSound('swish'); } frame 9 { nextFrame(); onEnterFrame = null; } frame 10 { stop(); stop(); onEnterFrame = null; } } movieClip 5578 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 9 { _parent.playSound('swish'); } frame 33 { _parent.actionSlowdown = true; _parent.amDodging = false; _parent.playSound('land'); } frame 47 { nextFrame(); onEnterFrame = null; } frame 48 { stop(); stop(); onEnterFrame = null; } } movieClip 5579 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 13 { _parent.playSound('swish'); } frame 31 { _parent.actionSlowdown = true; _parent.amDodging = false; _parent.playSound('land'); } frame 43 { nextFrame(); onEnterFrame = null; } frame 44 { stop(); stop(); onEnterFrame = null; } } movieClip 5580 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 4 { _parent.playSound('land'); _parent.playSound('blunt'); } frame 10 { _parent.actionSlowdown = true; } frame 33 { _parent.amDodging = false; } frame 51 { _parent.applySpeed(-7); } frame 71 { nextFrame(); onEnterFrame = null; } frame 72 { stop(); stop(); onEnterFrame = null; } } movieClip 5581 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 5 { _parent.playSound('land'); } frame 15 { _parent.actionSlowdown = true; } frame 23 { _parent.applySpeed(7); _parent.actionSlowdown = false; _parent.playSound('swish'); } frame 41 { _parent.actionSlowdown = true; _parent.amDodging = false; _parent.playSound('land'); } frame 55 { nextFrame(); onEnterFrame = null; } frame 56 { stop(); stop(); onEnterFrame = null; } } movieClip 5582 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 8 { _parent.playSound('land'); _parent.playSound('blunt'); } frame 13 { _parent.actionSlowdown = true; } frame 33 { _parent.amDodging = false; } frame 43 { _parent.applySpeed(7); } frame 63 { nextFrame(); onEnterFrame = null; } frame 64 { stop(); stop(); onEnterFrame = null; } } movieClip 5583 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 6 { _parent.playSound('land'); } frame 17 { _parent.actionSlowdown = true; } frame 29 { _parent.applySpeed(-7); _parent.actionSlowdown = false; } frame 32 { _parent.playSound('swish'); } frame 47 { _parent.actionSlowdown = true; _parent.amDodging = false; _parent.playSound('land'); } frame 61 { nextFrame(); onEnterFrame = null; } frame 62 { stop(); stop(); onEnterFrame = null; } } movieClip 5584 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 52 { _parent.playSound('land'); } frame 53 { _parent.actionSlowdown = true; } frame 61 { _parent.amDodging = false; } frame 64 { nextFrame(); onEnterFrame = null; } frame 65 { stop(); stop(); onEnterFrame = null; } } movieClip 5585 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 53 { _parent.playSound('land'); } frame 54 { _parent.actionSlowdown = true; } frame 62 { _parent.amDodging = false; } frame 65 { nextFrame(); onEnterFrame = null; } frame 66 { stop(); stop(); onEnterFrame = null; } } movieClip 5587 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 47 { _parent.actionSlowdown = true; _parent.playSound('land'); } frame 49 { _parent.amDodging = false; } frame 57 { nextFrame(); onEnterFrame = null; } frame 58 { stop(); stop(); onEnterFrame = null; } } movieClip 5588 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 47 { _parent.actionSlowdown = true; _parent.playSound('land'); } frame 49 { _parent.amDodging = false; } frame 57 { nextFrame(); onEnterFrame = null; } frame 58 { stop(); stop(); onEnterFrame = null; } } movieClip 5589 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 15 { _parent.pickupGun(); } frame 22 { stop(); } } movieClip 5590 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 16 { _parent.swapGear(); } frame 24 { stop(); } } movieClip 5591 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 67 { _parent.useActivator(); } frame 131 { _parent.wearHalo(); } } movieClip 5614 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 23 { _parent.castSpell(); } frame 50 { stop(); } } movieClip 5627 { frame 1 { function tick() { SpeedFrameSkipper.adjustFrames(this, _parent.myGameSpeed); } onEnterFrame = tick; } frame 5 { _parent.castSpell(); } frame 28 { stop(); } } movieClip 5628 madness_character { } movieClip 5630 { frame 1 { _visible = MadnessCharacter.myPartOn(this, 'upgradeSight', 0); } } movieClip 5633 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5634 { } movieClip 5638 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5639 { } movieClip 5643 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5644 { } movieClip 5648 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5649 { } movieClip 5652 { frame 1 { _visible = MadnessCharacter.myPartOn(this, 'upgradeLaser', 0); } } movieClip 5655 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5656 { } movieClip 5660 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5661 { } movieClip 5665 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5666 { } movieClip 5670 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5671 { } movieClip 5675 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5676 { } movieClip 5680 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5684 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5688 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5689 { } movieClip 5693 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5694 { } movieClip 5697 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5698 { } movieClip 5701 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5702 { } movieClip 5705 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5706 { } movieClip 5710 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5711 { } movieClip 5715 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5716 { } movieClip 5718 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5719 { } movieClip 5720 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5721 { } movieClip 5723 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5725 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5729 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5733 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5734 { } movieClip 5738 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5739 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5740 { } movieClip 5744 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5745 { } movieClip 5749 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5750 { } movieClip 5754 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5755 { } movieClip 5759 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5760 { } movieClip 5764 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5765 { } movieClip 5769 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5770 { } movieClip 5774 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5775 { } movieClip 5779 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5780 { } movieClip 5784 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5785 { } movieClip 5787 { } movieClip 5789 { } movieClip 5790 { } movieClip 5794 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5795 { } movieClip 5799 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5803 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5807 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5809 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5813 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5814 { } movieClip 5816 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5819 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5820 { } movieClip 5824 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5825 { } movieClip 5829 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5833 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5834 { } movieClip 5838 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5842 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5843 { } movieClip 5846 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5849 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5850 { } movieClip 5854 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5858 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5859 { } movieClip 5863 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5867 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5868 { } movieClip 5869 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5870 { } movieClip 5874 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5875 { } movieClip 5879 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5882 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5883 { } movieClip 5886 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5889 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5890 { } movieClip 5893 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5897 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5898 { } movieClip 5903 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5904 { } movieClip 5908 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5909 { } movieClip 5913 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5914 { } movieClip 5918 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5920 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5921 { } movieClip 5922 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5923 { } movieClip 5925 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5926 { } movieClip 5927 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5928 { } movieClip 5929 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5932 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5933 { } movieClip 5937 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5938 { } movieClip 5942 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5943 { } movieClip 5947 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5948 { } movieClip 5952 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5953 { } movieClip 5955 { } movieClip 5957 { } movieClip 5959 { } movieClip 5960 { } movieClip 5961 { } movieClip 5965 { frame 1 { gotoAndStop(MadnessCharacter.myPartOn(this, 'myColor', 0)); } } movieClip 5967 { } movieClip 5969 { } movieClip 5970 { } movieClip 5975 { } movieClip 5980 { } movieClip 5985 { } movieClip 5989 { } movieClip 5994 { } movieClip 5998 { } movieClip 6003 { } movieClip 6008 { } movieClip 6013 { } movieClip 6018 { } movieClip 6023 { } movieClip 6028 { } movieClip 6032 { } movieClip 6038 { } movieClip 6043 { } movieClip 6048 { } movieClip 6053 { } movieClip 6057 { } movieClip 6061 { } movieClip 6063 { } movieClip 6065 { } movieClip 6067 { } movieClip 6072 { } movieClip 6075 { } movieClip 6079 { } movieClip 6083 { } movieClip 6087 { } movieClip 6090 { } movieClip 6091 { } movieClip 6115 { frame 1 { stop(); } } movieClip 6117 { } movieClip 6119 { } movieClip 6121 { } movieClip 6123 { } movieClip 6125 { } movieClip 6127 { } movieClip 6129 { } movieClip 6131 { } movieClip 6133 { } movieClip 6135 { } movieClip 6137 { } movieClip 6139 { } movieClip 6141 { } movieClip 6143 { } movieClip 6145 { } movieClip 6147 { } movieClip 6149 { } movieClip 6162 { } movieClip 6164 { } movieClip 6169 { } movieClip 6171 { } movieClip 6174 { } movieClip 6175 { } movieClip 6181 { } movieClip 6206 { frame 1 { stop(); } } movieClip 6232 { frame 1 { stop(); } } movieClip 6258 { frame 1 { stop(); } } movieClip 6284 { frame 1 { stop(); } } movieClip 6310 { frame 1 { stop(); } } movieClip 6335 { frame 1 { stop(); } } movieClip 6360 { frame 1 { stop(); } } movieClip 6363 { frame 1 { stop(); } } movieClip 6365 { frame 1 { stop(); } } movieClip 6367 { frame 1 { stop(); } } movieClip 6392 { frame 1 { stop(); } } movieClip 6418 { frame 1 { stop(); } } movieClip 6444 { frame 1 { stop(); } } movieClip 6468 { frame 1 { stop(); } } movieClip 6494 { frame 1 { stop(); } } movieClip 6511 { frame 1 { stop(); } } movieClip 6537 { frame 1 { stop(); } } movieClip 6561 { frame 1 { stop(); } } movieClip 6587 { frame 1 { stop(); } } movieClip 6610 { frame 1 { stop(); } } movieClip 6636 { frame 1 { stop(); } } movieClip 6652 { frame 1 { stop(); } } movieClip 6677 { frame 1 { stop(); } } movieClip 6703 { frame 1 { stop(); } } movieClip 6729 { frame 1 { stop(); } } movieClip 6735 { frame 1 { stop(); } } movieClip 6741 { frame 1 { stop(); } } movieClip 6747 { frame 1 { stop(); } } movieClip 6773 { frame 1 { stop(); } } movieClip 6792 { frame 1 { stop(); } } movieClip 6816 { frame 1 { stop(); } } movieClip 6835 { frame 1 { stop(); } } movieClip 6858 { frame 1 { stop(); } } movieClip 6881 { frame 1 { stop(); } } movieClip 6904 { frame 1 { stop(); } } movieClip 6925 { frame 1 { stop(); } } movieClip 6934 { frame 1 { stop(); } } movieClip 6946 { frame 1 { stop(); } } movieClip 6971 { frame 1 { stop(); } } movieClip 6995 { frame 1 { stop(); } } movieClip 7021 { frame 1 { stop(); } } movieClip 7027 { frame 1 { stop(); } } movieClip 7046 { frame 1 { stop(); } } movieClip 7070 { frame 1 { stop(); } } movieClip 7095 { frame 1 { stop(); } } movieClip 7119 { frame 1 { stop(); } } movieClip 7143 { frame 1 { stop(); } } movieClip 7155 { frame 1 { stop(); } } movieClip 7176 { frame 1 { stop(); } } movieClip 7197 { frame 1 { stop(); } } movieClip 7223 { } movieClip 7240 { } movieClip 7265 { frame 1 { stop(); } } movieClip 7288 { frame 1 { stop(); } } movieClip 7289 Parts - Body { frame 1 { function createWound(inNumber) {} stop(); } } movieClip 7291 { frame 1 { stop(); if (_parent._parent._parent._parent.myDataRef.myCharacter != undefined) { gotoAndStop(_parent._parent._parent._parent.myDataRef.myCharacter); } } } movieClip 7292 character_hand { } movieClip 7294 { } movieClip 7295 Outfit - Body - Core { } movieClip 7297 { } movieClip 7299 { } movieClip 7301 { } movieClip 7303 { } movieClip 7305 { } movieClip 7307 { } movieClip 7309 { } movieClip 7311 { } movieClip 7313 { } movieClip 7315 { } movieClip 7317 { } movieClip 7318 MouthsAll { } movieClip 7320 { } movieClip 7322 { } movieClip 7324 { } movieClip 7326 { } movieClip 7328 { } movieClip 7331 { } movieClip 7333 { } movieClip 7335 { } movieClip 7337 { } movieClip 7339 { } movieClip 7342 { } movieClip 7344 { } movieClip 7346 { } movieClip 7348 { } movieClip 7350 { } movieClip 7352 { } movieClip 7354 { } movieClip 7356 { } movieClip 7358 MasksAll { } movieClip 7362 { } movieClip 7363 HatsAll { } movieClip 7368 { } movieClip 7370 { } movieClip 7371 { } movieClip 7372 { } movieClip 7378 { } movieClip 7384 { } movieClip 7386 { } movieClip 7388 { } movieClip 7389 { } movieClip 7391 { } movieClip 7392 { frame 1 { stop(); if (_parent._parent._parent._parent.myDataRef.myCharacter != undefined) { gotoAndStop(_parent._parent._parent._parent.myDataRef.myCharacter); } } } movieClip 7393 { } movieClip 7413 { frame 1 { stop(); } } movieClip 7414 { frame 1 { function createWound(inNumber) { this['wound' + String(inNumber)] = attachMovie('madness_wound', 'wound' + String(inNumber), getNextHighestDepth()); } } } movieClip 7428 { frame 1 { stop(); } } movieClip 7429 { frame 1 { function createWound(inNumber) { this['wound' + String(inNumber)] = attachMovie('madness_wound', 'wound' + String(inNumber), getNextHighestDepth()); } } } movieClip 7430 { } movieClip 7431 { } // unknown tag 88 length 110 button 7438 { on (release) { pressStory(); } on (rollOver) { SwainAudioPlayer.playSound('menu2', 0); } } // unknown tag 88 length 110 button 7443 { on (release) { pressArena(); } on (rollOver) { SwainAudioPlayer.playSound('menu2', 0); } } // unknown tag 88 length 110 button 7447 { on (release) { pressOptions(); } on (rollOver) { SwainAudioPlayer.playSound('menu2', 0); } } movieClip 7451 { frame 7 { stop(); } } // unknown tag 88 length 110 // unknown tag 88 length 110 // unknown tag 88 length 110 // unknown tag 88 length 110 // unknown tag 88 length 110 // unknown tag 88 length 110 button 7459 { on (press) { getURL('http://www.theswain.com', '_blank'); } } // unknown tag 88 length 110 // unknown tag 88 length 110 button 7463 { on (press) { getURL('http://www.krinkels.net', '_blank'); } } // unknown tag 88 length 110 // unknown tag 88 length 110 button 7467 { on (press) { getURL('http://cheshyre.newgrounds.com', '_blank'); } } // unknown tag 88 length 110 // unknown tag 88 length 110 button 7471 { on (press) { getURL('http://www.newgrounds.com/games', '_blank'); } } // unknown tag 88 length 110 // unknown tag 88 length 110 // unknown tag 88 length 110 // unknown tag 88 length 110 movieClip 7479 { } // unknown tag 88 length 110 // unknown tag 88 length 110 // unknown tag 88 length 110 movieClip 7487 { frame 35 { stop(); } } button 7490 { on (press) { getURL('https://www.kickstarter.com/projects/500655604/madness-project-nexus-2', '_blank'); } } // unknown tag 88 length 110 // unknown tag 88 length 110 // unknown tag 88 length 110 movieClip 7496 { } button 7498 { on (release) { pressNew(); } on (rollOver) { SwainAudioPlayer.playSound('menu2', 0); } } // unknown tag 88 length 110 // unknown tag 88 length 110 button 7501 { on (release) { pressContinue(); } on (rollOver) { SwainAudioPlayer.playSound('menu2', 0); } } // unknown tag 88 length 110 // unknown tag 88 length 110 movieClip 7505 { } button 7507 { on (release) { pressMoarMadness(); } on (rollOver) { SwainAudioPlayer.playSound('menu2', 0); } } // unknown tag 88 length 110 // unknown tag 88 length 110 // unknown tag 88 length 110 // unknown tag 88 length 110 // unknown tag 88 length 110 // unknown tag 88 length 110 button 7518 { on (release) { pressQuality('MEDIUM'); } on (rollOver) { SwainAudioPlayer.playSound('menu2', 0); } } // unknown tag 88 length 110 // unknown tag 88 length 110 // unknown tag 88 length 110 // unknown tag 88 length 110 // unknown tag 88 length 110 button 7525 { on (release) { pressMusic(true); } on (rollOver) { SwainAudioPlayer.playSound('menu2', 0); } } // unknown tag 88 length 110 // unknown tag 88 length 110 button 7529 { on (release) { pressMusic(false); } on (rollOver) { SwainAudioPlayer.playSound('menu2', 0); } } // unknown tag 88 length 110 // unknown tag 88 length 110 // unknown tag 88 length 110 // unknown tag 88 length 110 button 7536 { on (release) { pressQuality('HIGH'); } on (rollOver) { SwainAudioPlayer.playSound('menu2', 0); } } // unknown tag 88 length 110 // unknown tag 88 length 110 button 7540 { on (release) { pressQuality('LOW'); } on (rollOver) { SwainAudioPlayer.playSound('menu2', 0); } } // unknown tag 88 length 110 // unknown tag 88 length 110 button 7544 { on (release) { pressBackground('high'); } on (rollOver) { SwainAudioPlayer.playSound('menu2', 0); } } button 7545 { on (release) { pressBackground('low'); } on (rollOver) { SwainAudioPlayer.playSound('menu2', 0); } } movieClip 7547 madness_game_select { frame 13 { SwainAudioPlayer.playSound('menu5', 0); } instance charIcon of movieClip 7431 { onClipEvent (load) { _parent.assignRandomCharacter(); } } frame 26 { stop(); } } frame 1 { var rightClick = new ContextMenu(); rightClick.hideBuiltInItems(); _root.menu = rightClick; Object.registerClass('world_map', MadnessWorldMap); Object.registerClass('madness_world', MadWorld); Object.registerClass('madness_particle', MadnessParticle); Object.registerClass('madness_obstacle', MadnessObstacle); Object.registerClass('madness_game_select', MadnessGameSelect); Object.registerClass('madness_doors', MadnessDoors); Object.registerClass('madness_character', MadnessCharacter); Object.registerClass('madness_activator', MadnessActivator); } movieClip 7551 { } movieClip 7552 { } movieClip 7556 { } movieClip 7558 { } movieClip 7560 { } movieClip 7562 { } movieClip 7564 { } movieClip 7566 { } movieClip 7568 { } movieClip 7570 { } movieClip 7572 { } movieClip 7574 { } movieClip 7576 { } movieClip 7578 { } movieClip 7580 { } movieClip 7582 { } movieClip 7584 { } movieClip 7586 { } movieClip 7588 { } movieClip 7590 { } movieClip 7592 { } movieClip 7594 { } movieClip 7595 { } movieClip 7596 { } instance of movieClip 1225 APIConnector { onClipEvent (construct) { apiId = '23857:DC2U4SHl'; encryptionKey = 'XY9W27V37yBW0WYVIHbHOPvxYnwPp1wt'; debugMode = 'Off'; movieVersion = ''; connectorType = 'Flash Ad Only'; redirectOnNewVersion = true; redirectOnHostBlocked = true; adType = 'Video'; } } movieClip 7599 { } movieClip 7602 { } movieClip 7603 { } // unknown tag 88 length 78 movieClip 7607 { } button 7609 { on (press) { getURL('https://www.kickstarter.com/projects/500655604/madness-project-nexus-2', '_blank'); } } movieClip 7610 { } movieClip 7619 { } button 7622 { on (release) { _root.play(); } } movieClip 7626 { } movieClip 7628 { } movieClip 7630 { } movieClip 7632 { } instance preloaderSwain of movieClip 7632 { onClipEvent (load) { _parent.myLaunch._visible = false; myBar._xscale = 0; } onClipEvent (enterFrame) { var pctLoaded = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 100); myBar._xscale = pctLoaded; if (_root.getBytesLoaded() == _root.getBytesTotal()) { _parent.myLaunch._visible = true; } } } movieClip 7635 { } movieClip 7638 { } movieClip 7642 { } movieClip 7646 { } movieClip 7652 { } movieClip 7654 { } movieClip 7656 { } movieClip 7658 { } movieClip 7660 { } movieClip 7662 MedalPopup { frame 1 { function onMedalUnlocked(event) { if (event.__get__success()) { _medalQueue.push(event.__get__data()); showNextUnlock(); } } function showNextUnlock() { if (_unlockedMedal) { return undefined; } if (!_medalQueue.length) { gotoAndStop('hidden'); onEnterFrame = null; return undefined; } _unlockedMedal = com.newgrounds.Medal(_medalQueue.shift()); gotoAndPlay('medalUnlocked'); } gotoAndStop('hidden'); com.newgrounds.API.addEventListener(com.newgrounds.APIEvent.MEDAL_UNLOCKED, onMedalUnlocked); var alwaysOnTop; _x = int(_x); _y = int(_y); var _unlockedMedal; var _medalQueue = []; var _alwaysOnTop = true; if (alwaysOnTop) { _alwaysOnTop = alwaysOnTop == 'true'; } } frame 15 { function medalPopupEnterFrame() { if (_alwaysOnTop) { var v2 = _parent.getNextHighestDepth(); if (getDepth() != v2 - 1) { swapDepths(v2); } } if (_medalScrollRect) { _medalScrollRect.offset(2, 0); medalNameClip.scrollRect = _medalScrollRect; if (_medalScrollRect.left >= medalNameClip.textField.textWidth + 10) { _medalScrollRect = null; play(); } } } var _medalScrollRect; if (_unlockedMedal) { if (medalNameClip && medalNameClip.textField) { medalNameClip.textField.text = _unlockedMedal.name; } if (medalPointsText) { medalPointsText.text = _unlockedMedal.value.toString(); } if (medalNameClip.textField.textWidth > medalNameClip._width) { _medalScrollRect = new flash.geom.Rectangle(-medalNameClip._width, 0, medalNameClip._width, medalNameClip._height); medalNameClip.textField._width = 1000; medalNameClip.scrollRect = _medalScrollRect; } onEnterFrame = medalPopupEnterFrame; } } frame 23 { if (_unlockedMedal && medalIcon) { _unlockedMedal.attachIcon(medalIcon); } } frame 84 { if (_medalScrollRect) { stop(); } } frame 105 { stop(); _unlockedMedal = null; showNextUnlock(); } } instance of movieClip 7662 MedalPopup { onClipEvent (construct) { alwaysOnTop = 'true'; } } movieClip 8387 __Packages.SwainAudioPlayer { #initclip if (!_global.SwainAudioPlayer) { var v1 = function () {}; _global.SwainAudioPlayer = v1; var v2 = v1.prototype; v1.init = function () { SwainAudioPlayer.stopTrack(SwainAudioPlayer.musicTrack1); SwainAudioPlayer.stopTrack(SwainAudioPlayer.musicTrack2); _root.createEmptyMovieClip('musicTrack1', _root.getNextHighestDepth()); _root.createEmptyMovieClip('musicTrack2', _root.getNextHighestDepth()); SwainAudioPlayer.musicTrack1 = _root.musicTrack1; SwainAudioPlayer.musicTrack2 = _root.musicTrack2; SwainAudioPlayer.currentTrack = SwainAudioPlayer.musicTrack1; SwainAudioPlayer.musicOn = true; stopAllSounds(); _root.createEmptyMovieClip('soundManager', _root.getNextHighestDepth()); SwainAudioPlayer.soundManager = _root.soundManager; SwainAudioPlayer.soundManager.onEnterFrame = SwainAudioPlayer.soundTick; SwainAudioPlayer.soundTypeArray = new Array(); SwainAudioPlayer.allSounds = new Array(); SwainAudioPlayer.allSoundsMCs = new Array(); }; v1.playTrack = function (inTrack) { if (SwainAudioPlayer.musicTrack1.myTrack == SwainAudioPlayer.soundLibrary(inTrack)) { if (SwainAudioPlayer.currentTrack == SwainAudioPlayer.musicTrack2) { SwainAudioPlayer.currentTrack = SwainAudioPlayer.musicTrack1; } } else { if (SwainAudioPlayer.musicTrack2.myTrack == SwainAudioPlayer.soundLibrary(inTrack)) { if (SwainAudioPlayer.currentTrack == SwainAudioPlayer.musicTrack1) { SwainAudioPlayer.currentTrack = SwainAudioPlayer.musicTrack2; } } else { if (SwainAudioPlayer.musicTrack1 == undefined && SwainAudioPlayer.musicTrack2 == undefined || SwainAudioPlayer.currentTrack == SwainAudioPlayer.musicTrack2) { SwainAudioPlayer.currentTrack = SwainAudioPlayer.musicTrack1; } else { SwainAudioPlayer.currentTrack = SwainAudioPlayer.musicTrack2; } SwainAudioPlayer.stopTrack(SwainAudioPlayer.currentTrack); var tempTrack = SwainAudioPlayer.currentTrack; tempTrack.onEnterFrame = function () { SwainAudioPlayer.trackTick(tempTrack); }; SwainAudioPlayer.currentTrack.myTrack = new String(); SwainAudioPlayer.currentTrack.myTrack = SwainAudioPlayer.soundLibrary(inTrack); SwainAudioPlayer.currentTrack.mySound = new Sound(SwainAudioPlayer.currentTrack); SwainAudioPlayer.currentTrack.mySound.attachSound(SwainAudioPlayer.currentTrack.myTrack); SwainAudioPlayer.currentTrack.mySound.start(0, 999999); SwainAudioPlayer.setTrackVolume(inTrack); if (!SwainAudioPlayer.musicOn) { SwainAudioPlayer.currentTrack.mySound.setVolume(0); } else { if (SwainAudioPlayer.musicTrack2.mySound == undefined || SwainAudioPlayer.musicTrack1.mySound == undefined) { SwainAudioPlayer.currentTrack.mySound.setVolume(100 * SwainAudioPlayer.volumeMusic); } else { SwainAudioPlayer.currentTrack.mySound.setVolume(0); } } } } }; v1.stopTrack = function (inTrackObj) { inTrackObj.mySound.stop(inTrackObj.myTrack); inTrackObj.mySound = undefined; inTrackObj.myTrack = undefined; inTrackObj.onEnterFrame = null; }; v1.trackTick = function (inTrackObj) { if (!SwainAudioPlayer.musicOn) { inTrackObj.mySound.setVolume(0); } else { if (inTrackObj != SwainAudioPlayer.currentTrack) { inTrackObj.mySound.setVolume(inTrackObj.mySound.getVolume() - 5); if (inTrackObj.mySound.getVolume() <= 0) { SwainAudioPlayer.stopTrack(inTrackObj); } } else { if (inTrackObj.mySound.getVolume() < 100 * SwainAudioPlayer.volumeMusic) { inTrackObj.mySound.setVolume(inTrackObj.mySound.getVolume() + 5); } if (inTrackObj.mySound.getVolume() > 100 * SwainAudioPlayer.volumeMusic) { inTrackObj.mySound.setVolume(100 * SwainAudioPlayer.volumeMusic); } } } }; v1.fadeAllTracks = function () { SwainAudioPlayer.currentTrack = undefined; }; v1.stopAllTracks = function () { SwainAudioPlayer.currentTrack = undefined; SwainAudioPlayer.stopTrack(SwainAudioPlayer.musicTrack1); SwainAudioPlayer.stopTrack(SwainAudioPlayer.musicTrack2); }; v1.muteMusic = function (inOn) { SwainAudioPlayer.musicOn = inOn; if (inOn) { SwainAudioPlayer.currentTrack.mySound.setVolume(100 * SwainAudioPlayer.volumeMusic); } else { SwainAudioPlayer.currentTrack.mySound.setVolume(0); } }; v1.soundTick = function () { if (SwainAudioPlayer.soundTypeArray.length > 0) { SwainAudioPlayer.soundTypeArray = new Array(); } }; v1.playSound = function (inSound, inPan) { var v1 = 0; while (v1 < SwainAudioPlayer.soundTypeArray.length) { if (SwainAudioPlayer.soundTypeArray[v1] == inSound) { return false; } ++v1; } SwainAudioPlayer.soundTypeArray.push(inSound); var v3 = SwainAudioPlayer.soundManager.createEmptyMovieClip('soundMC' + SwainMath.randomNumber(0, 99999), SwainAudioPlayer.soundManager.getNextHighestDepth()); v3.newSound = new Sound(v3); v3.mySound = inSound; var newSound = v3.newSound; SwainAudioPlayer.allSounds.push(newSound); SwainAudioPlayer.allSoundsMCs.push(v3); newSound.attachSound(SwainAudioPlayer.soundLibrary(inSound)); newSound.setPan(inPan); newSound.setVolume((SwainAudioPlayer.returnVolume(inSound) - Math.abs(inPan * 0.5)) * SwainAudioPlayer.volumeSound); newSound.start(); newSound.onSoundComplete = function () { var v1 = 0; while (v1 < SwainAudioPlayer.allSounds.length) { if (newSound == SwainAudioPlayer.allSounds[v1]) { SwainAudioPlayer.allSoundsMCs[v1].removeMovieClip(); SwainAudioPlayer.allSoundsMCs.splice(v1, 1); SwainAudioPlayer.allSounds.splice(v1, 1); delete newSound; break; } ++v1; } }; }; v1.stopSound = function (inSound) { var v1 = 0; while (v1 < SwainAudioPlayer.allSounds.length) { if (SwainAudioPlayer.allSoundsMCs[v1].mySound == inSound) { SwainAudioPlayer.allSounds[v1].stop(); delete SwainAudioPlayer.allSounds[v1]; SwainAudioPlayer.allSoundsMCs[v1].removeMovieClip(); SwainAudioPlayer.allSoundsMCs.splice(v1, 1); SwainAudioPlayer.allSounds.splice(v1, 1); break; } ++v1; } }; v1.stopAllSounds = function () { while (SwainAudioPlayer.allSoundsMCs.length > 0) { SwainAudioPlayer.allSoundsMCs[0].removeMovieClip(); SwainAudioPlayer.allSoundsMCs.splice(0, 1); } while (SwainAudioPlayer.allSounds.length > 0) { SwainAudioPlayer.allSounds[0].stop(); SwainAudioPlayer.allSounds.splice(0, 1); } }; v1.soundLibrary = function (inName) { var v2; if (inName == 'test1') { return inName; } if (inName == 'test2') { return inName; } if (inName == 'test3') { return inName; } if (inName == 'sound1') { return inName; } if (inName == 'sound2') { return inName; } v2 = 'S_'; if (inName == 'door1') { v2 += 'Door'; } if (inName == 'explode') { v2 += 'Explode'; } if (inName == 'explodewet') { v2 += 'Explode_Wet'; } if (inName == 'metalbang') { v2 += 'MetalBang'; trace('BANG'); } if (inName == 'clang') { v2 += 'Clang' + SwainMath.randomNumber(1, 4); } if (inName == 'static') { v2 += 'Static' + SwainMath.randomNumber(1, 3); } if (inName == 'break') { v2 += 'Break'; } if (inName == 'zipline') { v2 += 'Zipline'; } if (inName == 'earth') { v2 += 'Earth' + SwainMath.randomNumber(1, 2); } if (inName == 'res1') { v2 += 'ResPatient'; } if (inName == 'res2') { v2 += 'ResBoom'; } if (inName == 'zombieres') { v2 += 'Zombie' + SwainMath.randomNumber(1, 3); } if (inName == 'magic2_cast') { v2 += 'Magic1'; } if (inName == 'magic2_explode') { v2 += 'Magic2'; } if (inName == 'magic1_cast') { v2 += 'Magic3'; } if (inName == 'activator1') { v2 += 'Activator1'; } if (inName == 'activator2') { v2 += 'Activator2'; } if (inName == 'bombbeep') { v2 += 'Bomb1'; } if (inName == 'ppk') { v2 += 'Gun_PPK'; } if (inName == 'beretta') { v2 += 'Gun_Beretta'; } if (inName == 'glock') { v2 += 'Gun_Glock'; } if (inName == 'prokiller') { v2 += 'Gun_Prokiller'; } if (inName == 'deagle') { v2 += 'Gun_Deagle'; } if (inName == 'browning') { v2 += 'Gun_Browning'; } if (inName == 'fiveseven') { v2 += 'Gun_Fiveseven'; } if (inName == 'luger') { v2 += 'Gun_Luger'; } if (inName == 'uspmatch') { v2 += 'Gun_USPMatch'; } if (inName == 'automagv') { v2 += 'Gun_Automag'; } if (inName == 'p1445') { v2 += 'Gun_P1445'; } if (inName == '500') { v2 += 'Gun_500'; } if (inName == '357') { v2 += 'Gun_357'; } if (inName == 'smg1') { v2 += 'Gun_SMG1'; } if (inName == 'smg2') { v2 += 'Gun_SMG2'; } if (inName == 'smg3') { v2 += 'Gun_SMG3'; } if (inName == 'm11') { v2 += 'Gun_M11'; } if (inName == 'uzi') { v2 += 'Gun_Uzi'; } if (inName == 'thompson') { v2 += 'Gun_Thompson'; } if (inName == 'mp40') { v2 += 'Gun_MP40'; } if (inName == 'steyr') { v2 += 'Gun_Steyr'; } if (inName == 'sr3') { v2 += 'Gun_SR3'; } if (inName == 'm249') { v2 += 'Gun_M249'; } if (inName == 'fnfal') { v2 += 'Gun_FNFAL'; } if (inName == 'famas') { v2 += 'Gun_FAMAS'; } if (inName == 'ar15') { v2 += 'Gun_AR15'; } if (inName == 'ak74') { v2 += 'Gun_AK74'; } if (inName == 'shotgun') { v2 += 'Gun_Shotgun'; } if (inName == 'shotguncock') { v2 += 'Gun_ShotgunCock'; } if (inName == 'm203') { v2 += 'Gun_M203'; } if (inName == 'chaingun') { v2 += 'Gun_Mini' + SwainMath.randomNumber(1, 2); } if (inName == 'tar21') { v2 += 'Gun_TAR21'; } if (inName == 'g36') { v2 += 'Gun_G36'; } if (inName == 'ecannon') { v2 += 'Gun_ECannon'; } if (inName == 'silencer') { v2 += 'Gun_Silencer'; } if (inName == 'emptyclip') { v2 += 'Gun_EmptyClip'; } if (inName == 'swapgun') { v2 += 'Gun_Swap'; } if (inName == 'ricochet') { v2 += 'Gun_Ricochet'; } if (inName == 'reload') { v2 += 'Gun_Reload'; } if (inName == 'slash') { v2 += 'Melee_Slash' + SwainMath.randomNumber(1, 8); } if (inName == 'blunt') { v2 += 'Melee_Blunt' + SwainMath.randomNumber(1, 18); } if (inName == 'swish') { v2 += 'Melee_Swish' + SwainMath.randomNumber(1, 3); } if (inName == 'swishlow') { v2 += 'Melee_SwishLow'; } if (inName == 'swapmelee') { v2 += 'Melee_Swap'; } if (inName == 'blockmelee') { v2 += 'Melee_Block' + SwainMath.randomNumber(1, 5); } if (inName == 'injury') { v2 += 'Injury' + SwainMath.randomNumber(1, 2); } if (inName == 'land') { v2 += 'Land' + SwainMath.randomNumber(1, 6); } if (inName == 'landhard') { v2 += 'LandHard'; } if (inName == 'menu') { v2 += 'Track_Menu'; } if (inName == 'stage1') { v2 += 'Track_Stage1'; } if (inName == 'stage2') { v2 += 'Track_Stage2'; } if (inName == 'stage3') { v2 += 'Track_Stage3'; } if (inName == 'stage4') { v2 += 'Track_Stage4'; } if (inName == 'stage5') { v2 += 'Track_Stage5'; } if (inName == 'stage6') { v2 += 'Track_Stage6'; } if (inName == 'stage7') { v2 += 'Track_Stage7'; } if (inName == 'stage8') { v2 += 'Track_Stage8'; } if (inName == 'club1') { v2 += 'Track_Club1'; } if (inName == 'club2') { v2 += 'Track_Club2'; } if (inName == 'boss1') { v2 += 'Track_Boss1'; } if (inName == 'zombie1') { v2 += 'Track_Zombie1'; } if (inName == 'zombie2') { v2 += 'Track_Zombie2'; } if (inName == 'zombie3') { v2 += 'Track_Zombie3'; } if (inName == 'paper1') { v2 += 'Paper1'; } if (inName == 'paper2') { v2 += 'Paper2'; } if (inName == 'menu1') { v2 += 'Menu1'; } if (inName == 'menu2') { v2 += 'Menu2'; } if (inName == 'menu3') { v2 += 'Menu3'; } if (inName == 'menu4') { v2 += 'Menu4'; } if (inName == 'menu5') { v2 += 'Menu5'; } if (inName == 'buy') { v2 += 'StoreBuy'; } if (inName == 'nobuy') { v2 += 'StoreNoBuy'; } if (inName == 'talk') { v2 += 'Talk'; } return v2; }; v1.returnVolume = function (inName) { var v1 = 100; if (inName == 'land') { v1 *= 0.5; } if (inName == 'swish') { v1 *= 0.5; } if (inName == 'swapmelee') { v1 *= 0.6; } if (inName == 'swapgun') { v1 *= 0.7; } if (inName == 'ricochet') { v1 *= 0.6; } if (inName == 'door') { v1 *= 0.6; } if (inName == 'clang') { v1 *= 0.9; } if (inName == 'reload') { v1 *= 0.5; } if (inName == 'break') { v1 *= 0.5; } if (inName == 'static') { v1 *= 0.6; } if (inName == 'menu1') { v1 *= 0.5; } if (inName == 'menu2') { v1 *= 0.2; } if (inName == 'menu3') { v1 *= 0.9; } if (inName == 'menu4') { v1 *= 0.6; } if (inName == 'menu5') { v1 *= 0.5; } return v1; }; v1.setTrackVolume = function (inTrack) { if (inTrack == 'zombie1') { SwainAudioPlayer.volumeMusic = 0.75; } else { SwainAudioPlayer.volumeMusic = 0.5; } }; v1.musicOn = true; v1.volumeSound = 0.75; v1.volumeMusic = 0.5; ASSetPropFlags(_global.SwainAudioPlayer.prototype, null, 1); } #endinitclip } movieClip 8388 __Packages.SwainMath { #initclip if (!_global.SwainMath) { var v1 = function () {}; _global.SwainMath = v1; var v2 = v1.prototype; v1.calculate_rotation = function (source_x, source_y, target_x, target_y) { SwainMath.Xd = target_x - source_x; SwainMath.Yd = target_y - source_y; SwainMath.radAngle = Math.atan2(SwainMath.Yd, SwainMath.Xd); SwainMath.rotation_result = int(SwainMath.radAngle * 360 / 6.283185307179586 + 90); if (SwainMath.rotation_result > 180) { SwainMath.rotation_result = -180 + (SwainMath.rotation_result - 180); } return SwainMath.rotation_result; }; v1.move_me = function (this_mc, this_rotation, this_speed) { if (this_rotation > 180) { this_mc._y += this_speed * Math.cos(0.0174532925199433 * this_rotation); this_mc._x -= this_speed * Math.sin(0.0174532925199433 * this_rotation); } else { this_mc._y -= this_speed * Math.cos(0.0174532925199433 * this_rotation); this_mc._x += this_speed * Math.sin(0.0174532925199433 * this_rotation); } }; v1.move_me2 = function (this_axis, this_rotation, this_speed) { if (this_rotation > 180) { if (this_axis == 'y') { return this_speed * Math.cos(0.0174532925199433 * this_rotation); } if (this_axis == 'x') { return -(this_speed * Math.sin(0.0174532925199433 * this_rotation)); } } else { if (this_axis == 'y') { return -(this_speed * Math.cos(0.0174532925199433 * this_rotation)); } if (this_axis == 'x') { return this_speed * Math.sin(0.0174532925199433 * this_rotation); } } }; v1.get_position = function (startX, startY, this_rotation, this_distance, this_axis) { if (this_axis == 'x') { if (this_rotation > 180) { return startX - this_distance * Math.sin(0.0174532925199433 * this_rotation); } else { return startX + this_distance * Math.sin(0.0174532925199433 * this_rotation); } } if (this_axis == 'y') { if (this_rotation > 180) { return startY + this_distance * Math.cos(0.0174532925199433 * this_rotation); } else { return startY - this_distance * Math.cos(0.0174532925199433 * this_rotation); } } }; v1.get_distance = function (mc_1, mc_2) { SwainMath.point_this.x = mc_1._x; SwainMath.point_this.y = mc_1._y; SwainMath.point_target.x = mc_2._x; SwainMath.point_target.y = mc_2._y; SwainMath.this_distance = flash.geom.Point.distance(SwainMath.point_this, SwainMath.point_target); return SwainMath.this_distance; }; v1.get_distance2 = function (mc_1_x, mc_1_y, mc_2_x, mc_2_y) { SwainMath.point_this.x = mc_1_x; SwainMath.point_this.y = mc_1_y; SwainMath.point_target.x = mc_2_x; SwainMath.point_target.y = mc_2_y; SwainMath.this_distance = flash.geom.Point.distance(SwainMath.point_this, SwainMath.point_target); return SwainMath.this_distance; }; v1.randomNumber = function (min, max) { var v1 = Math.floor(Math.random() * (max - min + 1)) + min; return v1; }; v1.getAxisDistance = function (inStart, inEnd) { var v1 = inStart - inEnd; if (inStart < inEnd) { v1 *= -1; } return v1; }; v1.getRotDistance = function (inRot1, inRot2) { var v1; if (inRot1 < inRot2 - 180) { inRot1 += 360; } if (inRot1 > inRot2 + 180) { inRot1 -= 360; } v1 = inRot1 - inRot2; if (v1 < 0) { v1 *= -1; } return v1; }; v1.shulffleArray = function (inArray) { var v3 = new Array(); var v1 = inArray.concat(); var v2; while (v1.length > 0) { v2 = SwainMath.randomNumber(0, v1.length - 1); v3.push(v1[v2]); v1.splice(v2, 1); } return v3; }; v1.randomElement = function (inArray) { return inArray[SwainMath.randomNumber(0, inArray.length - 1)]; }; v1.removeElement = function (inElement, inArray) { var v1 = 0; while (v1 < inArray.length) { if (inElement == inArray[v1]) { inArray.splice(v1, 1); break; } ++v1; } }; v1.returnNumberCommas = function (inNum) { var v1 = String(inNum); var v2 = new String(); var v3 = 0; while (v3 <= (String(inNum)).length) { if (v1.length > 3) { v2 = ',' + v1.substr(-3, 3) + v2; v1 = v1.substr(0, v1.length - 3); } else { v2 = v1 + v2; break; } v3 += 3; } return v2; }; v1.point_this = new flash.geom.Point(0, 0); v1.point_target = new flash.geom.Point(0, 0); v1.this_distance = new Number(); v1.Xd = new Number(); v1.Yd = new Number(); v1.radAngle = new Number(); v1.rotation_result = new Number(); ASSetPropFlags(_global.SwainMath.prototype, null, 1); } #endinitclip } movieClip 8389 __Packages.SpeedFrameSkipper { #initclip if (!_global.SpeedFrameSkipper) { var v1 = function () {}; _global.SpeedFrameSkipper = v1; var v2 = v1.prototype; v1.adjustFrames = function (inMC, inSpeed) { if (!_root.newWorld.paused) { if (inMC._currentframe < inMC._totalframes) { var v2 = 0; while (v2 <= inSpeed) { inMC.nextFrame(); ++v2; } } else { inMC.gotoAndPlay(1); var v2 = 1; while (v2 <= inSpeed) { inMC.nextFrame(); ++v2; } } } }; ASSetPropFlags(_global.SpeedFrameSkipper.prototype, null, 1); } #endinitclip } movieClip 8390 __Packages.MadnessRoster { #initclip if (!_global.MadnessRoster) { var v1 = function () { this.myActiveMembers = new Array(); this.myMembers = new Array(); this.myWeapons = new Array(); this.myArmor = new Array(); this.myEvents = new Array(); }; _global.MadnessRoster = v1; var v2 = v1.prototype; v2.init = function (inFaction) { this.teamFaction = inFaction; }; v2.addCharacter = function (inChar) { this.myMembers.push(inChar); inChar.myRoster = this; inChar.mySprite.myRoster = this; if (this.teamFaction != 'deserters') { inChar.myFaction = this.teamFaction; } }; v2.makeActive = function (inChar) { if (this == MadnessRoster.playerRoster) { var v2; v2 = 0; while (v2 < MadnessRoster.maxPlayers) { if (this.myActiveMembers[v2] == undefined) { if (!this.returnActiveCharacter(inChar)) { this.myActiveMembers.push(inChar); if (this.teamLeader == undefined) { this.makeLeader(inChar); } } else { break; } } ++v2; } if (v2 == MadnessRoster.maxPlayers) { } } else { if (!this.returnActiveCharacter(inChar)) { this.myActiveMembers.push(inChar); this.findLeaderCandidate(); } } }; v2.removeActive = function (inChar) { var v2 = 0; while (v2 < MadnessRoster.maxPlayers) { if (this.myActiveMembers[v2] == inChar) { this.myActiveMembers.splice(v2, 1); break; } ++v2; } if (inChar == this.teamLeader) { this.teamLeader = undefined; this.findLeaderCandidate(); } }; v2.returnActiveCharacter = function (inChar) { var v2; v2 = 0; while (v2 < MadnessRoster.maxPlayers) { if (inChar == this.myActiveMembers[v2]) { break; } ++v2; } return v2 != MadnessRoster.maxPlayers; }; v2.removeCharacter = function (inChar) { var v2 = 0; while (v2 < this.myMembers.length) { if (this.myMembers[v2] == inChar) { this.myMembers.splice(v2, 1); break; } ++v2; } this.removeActive(inChar); if (inChar.myRoster == this) { inChar.myRoster = undefined; } }; v2.populateRoster = function (inUnits, inDifficulty, inCategory, inLeader) { var v3 = 0; while (v3 < inUnits) { var v2 = new MadnessDataFile(); v2.createNew(MadnessLevel.badguyShoppingList[SwainMath.randomNumber(0, MadnessLevel.badguyShoppingList.length - 1)]); this.addCharacter(v2); ++v3; } }; v2.makeLeader = function (inChar) { this.teamLeader = inChar; var v2 = 0; while (v2 < this.myMembers) { this.myMembers[v2].mySprite.myLeader = this.teamLeader; ++v2; } }; v2.findLeaderCandidate = function () { this.determineTeamLeader(); }; v2.addWeapon = function (inWeapon) { if (inWeapon != undefined) { this.myWeapons.unshift(inWeapon); inWeapon.myOwner = undefined; } }; v2.removeWeapon = function (inWeapon) { if (inWeapon != undefined) { var v2 = 0; while (v2 < this.myWeapons.length) { if (this.myWeapons[v2] == inWeapon) { this.myWeapons[v2].myOwner = undefined; this.myWeapons.splice(v2, 1); break; } ++v2; } } }; v2.addArmor = function (inArmor) { if (inArmor != undefined) { this.myArmor.unshift(inArmor); this.myArmor.myOwner = undefined; } }; v2.removeArmor = function (inArmor) { if (inArmor != undefined) { var v2 = 0; while (v2 < this.myArmor.length) { if (this.myArmor[v2] == inArmor) { this.myArmor[v2].myOwner = undefined; this.myArmor.splice(v2, 1); break; } ++v2; } } }; v2.releaseAllWeapons = function () { var v3 = 0; while (v3 < this.myWeapons.length) { var v2; v2 = 0; while (v2 < this.myMembers.length) { if (this.myWeapons[v3] == this.myMembers[v2].myWeapons[0] || this.myWeapons[v3] == this.myMembers[v2].myWeapons[1]) { } ++v2; } if (v2 == this.myMembers.length) { this.myWeapons[v3].myOwner = undefined; } ++v3; } }; v2.healTeam = function () { var v2 = 0; while (v2 < this.myMembers.length) { this.myMembers[v2].healMe(); ++v2; } }; v2.gameOver = function (inReason) { this.healTeam(); }; v2.copyRoster = function (otherRoster) { this.myActiveMembers = new Array(); this.myMembers = new Array(); var v5 = 0; while (v5 < otherRoster.myMembers.length) { var v4 = new MadnessDataFile(); v4.copyCharacter(otherRoster.myMembers[v5]); v4.myRoster = this; this.myMembers.push(v4); if (otherRoster.myMembers[v5] == otherRoster.teamLeader) { this.teamLeader = v4; } var v3 = 0; while (v3 < otherRoster.myActiveMembers.length) { if (otherRoster.myMembers[v5] == otherRoster.myActiveMembers[v3]) { this.myActiveMembers.push(v4); break; } ++v3; } ++v5; } this.teamFaction = otherRoster.teamFaction; this.myCash = otherRoster.myCash; this.myWeapons = otherRoster.myWeapons; this.myArmor = otherRoster.myArmor; }; v2.returnCharactersAsObjects = function () { var v2; var v4 = new Array(); var v3 = 0; while (v3 < this.myActiveMembers.length) { v2 = this.myActiveMembers[v3]; v2.saveAsActive = true; v2.saveAsLeader = v2 == this.teamLeader; ++v3; } this.myActiveMembers = new Array(); v3 = 0; while (v3 < this.myMembers.length) { v2 = this.myMembers[v3]; v2.myRoster = undefined; v4.push(Object(v2)); ++v3; } return v4; }; v2.convertCharactersToMadnessData = function (inMembers) { this.myMembers = new Array(); var v3; var v2 = 0; while (v2 < inMembers.length) { v3 = new MadnessDataFile(); v3.copyCharacter(inMembers[v2]); v3.myRoster = this; this.myMembers.push(v3); ++v2; } }; v2.convertActiveMembers = function () { var v2; this.myActiveMembers = new Array(); var v3 = 0; while (v3 < this.myMembers.length) { v2 = this.myMembers[v3]; if (v2.saveAsActive) { v2.saveAsActive = false; if (v2.saveAsLeader) { this.teamLeader = v2; } v2.saveAsLeader = false; this.myActiveMembers.push(v2); } ++v3; } }; v2.determineTeamLeader = function () { var v4 = 0; var v3; var v2 = 0; while (v2 < this.myActiveMembers.length) { if (this.myActiveMembers[v2].myLevel > v4) { v3 = this.myActiveMembers[v2]; v4 = v3.myLevel; } ++v2; } if (v3 != undefined) { this.makeLeader(v3); } }; v2.readjustActiveOrder = function () { var v2 = 0; while (v2 < this.myActiveMembers.length) { if (this.myActiveMembers[v2] == this.teamLeader) { this.myActiveMembers.splice(v2, 1); } ++v2; } this.myActiveMembers.splice(0, 0, this.teamLeader); }; v1.maxPlayers = 10; v1.maxRoster = 999; v2.myCash = new Number(); v2.teamFireScore = new Number(); ASSetPropFlags(_global.MadnessRoster.prototype, null, 1); } #endinitclip } movieClip 8391 __Packages.MadnessDataFile { #initclip if (!_global.MadnessDataFile) { var v1 = function () { this.myWeapons = new Array(); this.myHat = new Array(); this.myMouth = new Array(); this.myMask = new Array(); this.myShirt = new Array(); this.weaponArray = new Array(); this.headWounds = new Array(); this.bodyWounds = new Array(); }; _global.MadnessDataFile = v1; var v2 = v1.prototype; v2.createExisting = function (inChar) { var v4 = ['myName', 'myCharacter', 'myHeight', 'myWidth', 'myShootHeight', 'myHealth', 'mySpeed', 'myAccel', 'myDash', 'myReload', 'myBlood', 'traitBravery', 'traitCover', 'traitDistracted', 'traitTriggerFinger', 'myHat', 'myShirt', 'myMask', 'myMouth', 'lifeStatus', 'myIconPos']; var v2 = 0; while (v2 < v4.length) { this[v4[v2]] = inChar[v4[v2]]; ++v2; } v2 = 0; while (v2 < inChar.myWeapons.length) { this.createWeapon(v2, inChar.myWeapons[v2].myType, inChar.myWeapons[v2].myTag.substr(-8, 8) == 'Silencer'); ++v2; } }; v2.createNew = function (inChar) { this.myCharacter = inChar; this.footType = inChar; this.handType = this.footType; this.bodyType = this.footType; this.headType = this.footType; this.myHeight = 94; this.myWidth = 50; this.myDepth = 16; this.myShootHeight = 50; this.myHeadHeight = 50; this.myIconPos = SwainMath.randomNumber(1, 4); this.myWeapons = new Array(); this.weaponArray = new Array(); this.myScale = 1; this.noCollide = false; this.amSlow = false; this.bulletEater = false; this.myBoss = ''; this.autoHit = false; this.noPaint = false; this.selfShoot = false; this.attackNeutrals = false; this.weakToDash = false; this.disarmHelm = false; this.fastDeath = false; this.noRange = false; this.hitStopAttack = false; this.freakOut = false; this.amZombie = false; this.noHeadshots = false; this.noDodge = false; this.autoAware = false; this.autoDash = false; this.noWieldGuns = false; this.noZombie = false; this.noHands = false; this.amEvader = false; this.amAbom = false; this.headGearResurrect = false; this.improvedChump = false; this.knockdownDash = false; this.weaponStealer = false; this.meleeShy = false; this.grabBreaker = false; this.fastDeteriorate = false; this.slamGrab = false; this.noAimShots = false; this.strongGrip = false; this.amInvincible = false; this.standStill = false; this.thrownBlock = false; this.myNaturalArmorHead = 0; this.myNaturalArmorBody = 0; this.meleeHealth = 3; if (this.myCharacter == 'woody') { this.myName = 'Dummy'; this.myCharacter = 'civ'; this.myHealth = 8; this.mySpeed = 5; this.myAccel = this.mySpeed / 4; this.myDash = 1.3; this.myReload = 90; this.myBlood = 'red'; this.myLevel = 1; this.traitBravery = 1; this.traitCover = 0; this.traitDistracted = 8; this.traitTriggerFinger = 1; this.traitCombatSkill = 1; this.traitAwareness = 4; this.applyStats(3, 3, 3, 3, 0, 3, null, 10, 10, 10, 10, 10, 10, 10, 10); this.footType = 'civ'; this.handType = 'civ'; this.bodyType = 'civ'; this.headType = 'civ'; } else { if (this.myCharacter == 'coward') { this.myName = 'Deserter'; this.myCharacter = 'civ'; this.myHealth = 8; this.mySpeed = 5; this.myAccel = this.mySpeed / 4; this.myDash = 1.3; this.myReload = 90; this.myBlood = 'red'; this.myLevel = 1; this.traitBravery = -1; this.traitCover = 0; this.traitDistracted = 8; this.traitTriggerFinger = 1; this.traitCombatSkill = 1; this.traitAwareness = 4; this.applyStats(1, 1, 1, 1, 0, 1, null, 0, 0, 0, 0, 0, 0, 0, 0); this.footType = 'civ'; this.handType = 'civ'; this.bodyType = 'civ'; this.headType = 'civ'; } else { if (this.myCharacter == 'civ') { this.myName = 'Grunt'; this.myHealth = 8; this.mySpeed = 5; this.myAccel = this.mySpeed / 4; this.myDash = 1.3; this.myReload = 90; this.myBlood = 'red'; this.myLevel = 1; this.traitBravery = 1; this.traitCover = 0; this.traitDistracted = 8; this.traitTriggerFinger = 1; this.traitCombatSkill = 1; this.traitAwareness = 4; this.weaponArray = ['ppk', 'beretta', 'glock20']; this.applyStats(1, 1, 1, 1, 0, 1, null, 0, 0, 0, 0, 0, 0, 0, 0); } else { if (this.myCharacter == 'scientist') { this.myName = 'Lab Geek'; this.myHealth = 8; this.mySpeed = 5; this.myAccel = this.mySpeed / 4; this.myDash = 1.3; this.myReload = 90; this.myBlood = 'red'; this.myLevel = 1; this.traitBravery = 1; this.traitCover = 0; this.traitDistracted = 8; this.traitTriggerFinger = 1; this.traitCombatSkill = 1; this.traitAwareness = 4; if (SwainMath.randomNumber(0, 6) == 0) { this.myStartup = 'startup_ponder'; } this.applyStats(1, 1, 1, 1, 0, 1, null, 0, 0, 0, 0, 0, 0, 0, 0); this.footType = 'civ'; this.handType = 'civ'; this.headType = 'civ'; } else { if (this.myCharacter == 'agent' || this.myCharacter == 'agent_classic') { this.myName = 'Agent'; this.myHealth = 12; this.mySpeed = 6; this.myAccel = this.mySpeed / 4; this.myDash = 1.3; this.myReload = 80; this.myBlood = 'red'; this.myLevel = SwainMath.randomNumber(2, 4); this.traitBravery = 3; this.traitCover = 1; this.traitDistracted = 7; this.traitTriggerFinger = 4; this.traitCombatSkill = 3; this.traitAwareness = 7; if (this.myCharacter == 'agent_classic') { this.traitBravery = 3; this.traitCover = 4; this.traitDistracted = 5; this.traitTriggerFinger = 7; this.traitCombatSkill = 5; } this.weaponArray = ['ppk', 'beretta', 'glock20']; this.applyStats(4, 4, 4, 4, 2, 4, null, 5, 5, 5, 5, 5, 5, 5, 5); this.bodyType = 'agent'; this.footType = 'agent'; this.handType = 'agent'; } else { if (this.myCharacter == 'agent2') { this.myName = 'Agent Mk1'; this.myHealth = 18; this.mySpeed = 6; this.myAccel = this.mySpeed / 4; this.myDash = 1.3; this.myReload = 70; this.myBlood = 'yellow'; this.myLevel = SwainMath.randomNumber(5, 7); this.traitBravery = 5; this.traitCover = 1; this.traitDistracted = 4; this.traitTriggerFinger = 7; this.traitCombatSkill = 5; this.traitAwareness = 7; this.weaponArray = ['ppk', 'beretta', 'glock20', 'prokiller460', 'deagle', 'hk2', 'mp7', 'tmp', 'mp5k', 'pm9', 'oa93', '500snub', '357snub', 'ar15']; this.applyStats(7, 7, 7, 7, 4, 7, null, 10, 10, 10, 10, 10, 10, 10, 10); this.footType = 'agent'; this.handType = 'agent'; } else { if (this.myCharacter == 'agent3') { this.myName = 'Agent Mk0'; this.myHealth = 25; this.mySpeed = 6; this.myAccel = this.mySpeed / 4; this.myDash = 1.3; this.myReload = 70; this.myBlood = 'yellow'; this.myLevel = SwainMath.randomNumber(9, 11); this.traitBravery = 7; this.traitCover = 1; this.traitDistracted = 3; this.traitTriggerFinger = 7; this.traitCombatSkill = 9; this.traitAwareness = 8; this.weaponArray = ['ppk', 'beretta', 'glock20', 'prokiller460', 'deagle', 'hk2', 'mp7', 'tmp', 'mp5k', 'pm9', 'oa93', '500snub', '357snub', 'ar15']; this.createWeapon(0, this.weaponArray[SwainMath.randomNumber(0, this.weaponArray.length - 1)], false); this.createWeapon(1, this.weaponArray[SwainMath.randomNumber(0, this.weaponArray.length - 1)], false); this.weaponArray = new Array(); this.applyStats(10, 15, 10, 10, 5, 10, null, 15, 15, 15, 15, 15, 15, 15, 15); this.footType = 'agent'; this.handType = 'agent'; } else { if (this.myCharacter == 'mag') { this.myName = 'Mag Agent'; this.myHealth = 300; this.mySpeed = 5; this.myAccel = this.mySpeed / 4; this.myDash = 1.3; this.myReload = 70; this.myBlood = 'red'; this.myLevel = 15; this.myScale = 2.5; this.noCollide = true; this.selfShoot = true; this.fastDeteriorate = true; this.amSlow = true; this.bulletEater = true; this.myBoss = 'mag1'; this.autoHit = true; this.noPaint = true; this.noRange = true; this.myStartup = 'startup_roar'; this.traitBravery = 7; this.traitCover = 1; this.traitDistracted = 3; this.traitTriggerFinger = 7; this.traitCombatSkill = 10; this.traitAwareness = 8; this.createWeapon(0, 'ppk', false); this.myWeapons[0].myClips = 2000; this.myWeapons[0].noPickup = true; this.myWeapons[0].myDamage *= 3; this.applyStats(30, 5, 0, 20, 0, 3, null, 15, 15, 15, 15, 15, 15, 15, 15); this.myHealth = 2500; this.myHealthMax = 2500; this.myTactics = 0; this.myTacticsMax = 0; } else { if (this.myCharacter == 'fatboy') { this.myName = 'Fatboy'; this.myCharacter = 'fatboy'; this.myHealth = 25; this.mySpeed = 6; this.myAccel = this.mySpeed / 4; this.myDash = 1.25; this.myReload = 70; this.myBlood = 'red'; this.myLevel = 10; this.meleeHealth = 5; this.myScale = 1.4; this.noCollide = true; this.weakToDash = true; this.disarmHelm = true; this.selfShoot = true; this.amSlow = true; this.bulletEater = true; this.noPaint = false; this.autoHit = true; this.fastDeath = true; this.myStartup = 'startup_roar'; this.traitBravery = 1; this.traitCover = 1; this.traitDistracted = 3; this.traitTriggerFinger = 5; this.traitCombatSkill = 2; this.traitAwareness = 8; this.weaponArray = ['hk2', 'mp7', 'tmp', 'mp5k', 'pm9', 'oa93']; this.createWeapon(0, this.weaponArray[SwainMath.randomNumber(0, this.weaponArray.length - 1)], false); this.myWeapons[0].myClips = 2000; this.myWeapons[0].noPickup = true; this.weaponArray = new Array(); this.applyStats(20, 1, 20, 3, 0, 3, null, 10, 10, 10, 10, 10, 10, 10, 10); this.myHealth = 220; this.myHealthMax = 220; this.myTactics = 0; this.myTacticsMax = 0; this.createArmor('armorgolem1'); this.createArmor('helmetgolem1'); } else { if (this.myCharacter == 'fatman') { this.myName = 'Fatman'; this.myCharacter = 'fatboy'; this.myHealth = 25; this.mySpeed = 6; this.myAccel = this.mySpeed / 4; this.myDash = 1.3; this.myReload = 70; this.myBlood = 'red'; this.myLevel = 15; this.meleeHealth = 7; this.myScale = 1.5; this.noCollide = true; this.weakToDash = true; this.disarmHelm = true; this.selfShoot = true; this.amSlow = true; this.bulletEater = true; this.noPaint = MadnessGameSelect.gameMode == 'story'; this.autoHit = true; this.fastDeath = true; this.hitStopAttack = true; this.freakOut = true; this.myStartup = 'startup_roar'; this.traitBravery = 1; this.traitCover = 1; this.traitDistracted = 3; this.traitTriggerFinger = 6; this.traitCombatSkill = 3; this.traitAwareness = 8; this.weaponArray = ['megahammer']; this.createWeapon(0, 'megahammer', false); this.createWeapon(1, 'chaingun', false); this.myWeapons[1].myClips = 20000; this.myWeapons[0].noPickup = true; this.myWeapons[1].noPickup = true; this.weaponArray = new Array(); this.applyStats(20, 1, 20, 3, 0, 3, null, 15, 15, 15, 15, 15, 15, 15, 15); this.myHealth = 500; this.myHealthMax = 500; this.myTactics = 0; this.myTacticsMax = 0; this.createArmor('armorgolem2'); this.createArmor('helmetgolem2'); this.footType = 'fatboy'; this.handType = 'fatboy'; this.bodyType = 'fatboy'; this.headType = 'fatboy'; } else { if (this.myCharacter == 'hank') { this.myName = 'Hank'; this.amSpecial = true; this.arenaLockArmor = true; this.myHealth = 80; this.mySpeed = 6; this.myAccel = this.mySpeed / 4; this.myDash = 1.4; this.myReload = 60; this.myBlood = 'red'; this.myLevel = 30; this.traitBravery = 10; this.traitCover = 6; this.traitDistracted = 1; this.traitTriggerFinger = 6; this.traitCombatSkill = 8; this.traitAwareness = 10; this.myWeapons[0].myClips = 200; this.myWeapons[1].myClips = 200; this.applyStats(25, 30, 25, 25, 0, 25, null, 25, 25, 25, 25, 25, 25, 25, 25); } else { if (this.myCharacter == 'sanford') { this.myName = 'Sanford'; this.amSpecial = true; this.arenaLockArmor = true; this.myHealth = 50; this.mySpeed = 6; this.myAccel = this.mySpeed / 4; this.myDash = 1.4; this.myReload = 60; this.myBlood = 'red'; this.myLevel = 15; this.traitBravery = 5; this.traitCover = 5; this.traitDistracted = 5; this.traitTriggerFinger = 4; this.traitCombatSkill = 6; this.traitAwareness = 8; this.applyStats(15, 15, 15, 15, 0, 15, null, 15, 15, 15, 15, 15, 15, 15, 15); } else { if (this.myCharacter == 'deimos') { this.myName = 'Deimos'; this.amSpecial = true; this.arenaLockArmor = true; this.myHealth = 50; this.mySpeed = 6; this.myAccel = this.mySpeed / 4; this.myDash = 1.4; this.myReload = 60; this.myBlood = 'red'; this.myLevel = 15; this.traitBravery = 5; this.traitCover = 5; this.traitDistracted = 5; this.traitTriggerFinger = 5; this.traitCombatSkill = 6; this.traitAwareness = 8; this.applyStats(15, 15, 15, 15, 0, 15, null, 15, 15, 15, 15, 15, 15, 15, 15); } else { if (this.myCharacter == 'jesus') { this.myName = 'Jesus'; this.amSpecial = true; this.arenaLockArmor = true; this.myHealth = 80; this.mySpeed = 6; this.myAccel = this.mySpeed / 4; this.myDash = 1.4; this.myReload = 60; this.myBlood = 'red'; this.myLevel = 20; this.myDodge = undefined; this.traitBravery = 7; this.traitCover = 4; this.traitDistracted = 2; this.traitTriggerFinger = 7; this.traitCombatSkill = 10; this.traitAwareness = 9; this.myMagic = 'jesus1'; this.myDodge = 'jesus'; this.applyStats(25, 25, 25, 25, 0, 25, null, 25, 25, 25, 25, 25, 25, 25, 25); } else { if (this.myCharacter == 'jesus2') { this.myName = 'Dr.Christoff'; this.amSpecial = true; this.arenaLockArmor = true; this.myHealth = 80; this.mySpeed = 6; this.myAccel = this.mySpeed / 4; this.myDash = 1.4; this.myReload = 60; this.myBlood = 'red'; this.myLevel = 20; this.traitBravery = 7; this.traitCover = 4; this.traitDistracted = 2; this.traitTriggerFinger = 7; this.traitCombatSkill = 10; this.traitAwareness = 9; this.createArmor('shades13'); this.applyStats(15, 15, 15, 15, 0, 15, null, 15, 15, 15, 15, 15, 15, 15, 15); this.footType = 'civ'; this.handType = 'civ'; this.bodyType = 'scientist3'; } else { if (this.myCharacter == 'tricky') { this.myName = 'Tricky'; this.amSpecial = true; this.arenaLockArmor = true; this.myHealth = 80; this.mySpeed = 6; this.myAccel = this.mySpeed / 4; this.myDash = 1.4; this.myReload = 60; this.myBlood = 'red'; this.myLevel = 20; this.traitBravery = 10; this.traitCover = 1; this.traitDistracted = 6; this.traitTriggerFinger = 10; this.traitCombatSkill = 10; this.traitAwareness = 6; this.weaponArray = ['mp7']; this.applyStats(25, 25, 25, 25, 0, 25, null, 25, 25, 25, 25, 25, 25, 25, 25); } else { if (this.myCharacter == 'tricky2') { this.myName = 'Dr.Hofnarr'; this.amSpecial = true; this.arenaLockArmor = true; this.myHealth = 80; this.mySpeed = 6; this.myAccel = this.mySpeed / 4; this.myDash = 1.4; this.myReload = 60; this.myBlood = 'red'; this.myLevel = 20; this.traitBravery = 10; this.traitCover = 1; this.traitDistracted = 6; this.traitTriggerFinger = 10; this.traitCombatSkill = 10; this.traitAwareness = 6; this.createArmor('shades11'); this.applyStats(15, 15, 15, 15, 0, 15, null, 15, 15, 15, 15, 15, 15, 15, 15); this.footType = 'civ'; this.handType = 'civ'; } else { if (this.myCharacter == 'blockhead') { this.myName = 'Blockhead'; this.amSpecial = true; this.arenaLockArmor = true; this.myHealth = 20; this.mySpeed = 6; this.myAccel = this.mySpeed / 4; this.myDash = 1.4; this.myReload = 60; this.myBlood = 'yellow'; this.myLevel = 8; this.traitBravery = 10; this.traitCover = 1; this.traitDistracted = 10; this.traitTriggerFinger = 3; this.traitCombatSkill = 4; this.traitAwareness = 2; this.weaponArray = ['ar15', 'sr3', 'ak74', 'm16', 'aug', 'ak74u', 'hk416', 'fnfal', 'm249', 'famas', 'oa93', 'pm9', 'mp5', 'mp5k', 'tmp', 'mp7', 'hk2']; this.applyStats(10, 10, 10, 10, 0, 10, null, 10, 10, 10, 10, 10, 10, 10, 10); } else { if (this.myCharacter == 'swain') { this.myName = 'The Swain'; this.amSpecial = true; this.arenaLockArmor = true; this.myHealth = 20; this.mySpeed = 6; this.myAccel = this.mySpeed / 4; this.myDash = 1.4; this.myReload = 60; this.myBlood = 'red'; this.myLevel = 10; this.traitBravery = 6; this.traitCover = 4; this.traitDistracted = 3; this.traitTriggerFinger = 7; this.traitCombatSkill = 5; this.traitAwareness = 7; this.weaponArray = ['ar15', 'sr3', 'ak74', 'm16', 'aug', 'ak74u', 'hk416', 'fnfal', 'm249', 'famas', 'oa93', 'pm9', 'mp5', 'mp5k', 'tmp', 'mp7', 'hk2']; this.applyStats(10, 10, 10, 10, 0, 10, null, 10, 10, 10, 10, 10, 10, 10, 10); } else { if (this.myCharacter == 'krinkels') { this.myName = 'Krinkels'; this.amSpecial = true; this.arenaLockArmor = true; this.myHealth = 20; this.mySpeed = 6; this.myAccel = this.mySpeed / 4; this.myDash = 1.4; this.myReload = 60; this.myBlood = 'red'; this.myLevel = 12; this.traitBravery = 7; this.traitCover = 9; this.traitDistracted = 7; this.traitTriggerFinger = 2; this.traitCombatSkill = 6; this.traitAwareness = 7; this.assignCustom('hat', this.myHat, ['hair1'], 1); this.assignCustom('mask', this.myMask, ['shades2'], 1); this.assignCustom('mouth', this.myMouth, ['chin1'], 1); this.weaponArray = ['ar15', 'sr3', 'ak74', 'm16', 'aug', 'ak74u', 'hk416', 'fnfal', 'm249', 'famas', 'oa93', 'pm9', 'mp5', 'mp5k', 'tmp', 'mp7', 'hk2']; this.applyStats(10, 10, 10, 10, 0, 10, null, 10, 10, 10, 10, 10, 10, 10, 10); } else { if (this.myCharacter == 'cheshyre') { this.myName = 'Cheshyre'; this.amSpecial = true; this.arenaLockArmor = true; this.myHealth = 20; this.mySpeed = 6; this.myAccel = this.mySpeed / 4; this.myDash = 1.4; this.myReload = 60; this.myBlood = 'red'; this.myLevel = 11; this.traitBravery = 3; this.traitCover = 6; this.traitDistracted = 4; this.traitTriggerFinger = 5; this.traitCombatSkill = 5; this.traitAwareness = 7; this.grabBreaker = true; this.assignCustom('mask', this.myMask, ['cheshyre'], 1); this.assignCustom('shirt', this.myShirt, ['armor_hoody'], 1); this.weaponArray = ['ar15', 'sr3', 'ak74', 'm16', 'aug', 'ak74u', 'hk416', 'fnfal', 'm249', 'famas', 'oa93', 'pm9', 'mp5', 'mp5k', 'tmp', 'mp7', 'hk2']; this.applyStats(10, 10, 10, 10, 0, 10, null, 10, 10, 10, 10, 10, 10, 10, 10); this.footType = 'civ'; this.handType = 'civ'; this.bodyType = 'civ'; this.headType = 'civ'; } else { if (this.myCharacter == 'luis') { this.myName = 'Luis'; this.amSpecial = true; this.arenaLockArmor = true; this.myHealth = 20; this.mySpeed = 6; this.myAccel = this.mySpeed / 4; this.myDash = 1.4; this.myReload = 60; this.myBlood = 'red'; this.myLevel = 11; this.traitBravery = 3; this.traitCover = 6; this.traitDistracted = 4; this.traitTriggerFinger = 5; this.traitCombatSkill = 5; this.traitAwareness = 7; this.assignCustom('hat', this.myHat, ['hair_luis', 'hat_luis'], 1); this.assignCustom('mask', this.myMask, ['luis'], 1); this.assignCustom('shirt', this.myShirt, ['poncho', 'machette'], 1); this.weaponArray = ['machette', 'bowieknife']; this.applyStats(10, 10, 10, 10, 0, 10, null, 10, 10, 10, 10, 10, 10, 10, 10); this.footType = 'civ'; this.handType = 'civ'; this.bodyType = 'civ'; this.headType = 'civ'; } else { if (this.myCharacter == 'arena') { this.myName = 'Player'; this.amSpecial = true; this.myCharacter = 'civ'; this.myHealth = 8; this.mySpeed = 5; this.myAccel = this.mySpeed / 4; this.myDash = 1.3; this.myReload = 90; this.myBlood = 'red'; this.myLevel = 1; this.traitBravery = 1; this.traitCover = 1; this.traitDistracted = 8; this.traitTriggerFinger = 1; this.traitCombatSkill = 1; this.traitAwareness = 8; this.applyStats(0, 0, 0, 0, 0, 0, null, 0, 0, 0, 0, 0, 0, 0, 0); this.footType = 'civ'; this.handType = 'civ'; this.bodyType = 'civ'; this.headType = 'civ'; } else { if (this.myCharacter == 'arenatest') { this.myName = 'Player'; this.amSpecial = true; this.myCharacter = 'civ'; this.myHealth = 8; this.mySpeed = 5; this.myAccel = this.mySpeed / 4; this.myDash = 1.3; this.myReload = 90; this.myBlood = 'red'; this.myLevel = 30; this.traitBravery = 1; this.traitCover = 1; this.traitDistracted = 8; this.traitTriggerFinger = 1; this.traitCombatSkill = 1; this.traitAwareness = 8; this.applyStats(20, 20, 20, 20, 20, 20, null, 20, 20, 20, 20, 20, 20, 20, 20); this.footType = 'civ'; this.handType = 'civ'; this.bodyType = 'civ'; this.headType = 'civ'; } else { if (this.myCharacter == 'arena_merc') { this.myName = 'Mercenary'; this.amSpecial = true; this.myCharacter = 'civ'; this.myHealth = 8; this.mySpeed = 5; this.myAccel = this.mySpeed / 4; this.myDash = 1.3; this.myReload = 90; this.myBlood = 'red'; this.myLevel = 1; this.traitBravery = 1; this.traitCover = 1; this.traitDistracted = 8; this.traitTriggerFinger = 1; this.traitCombatSkill = 1; this.traitAwareness = 8; this.applyStats(0, 0, 0, 0, 0, 0, null, 0, 0, 0, 0, 0, 0, 0, 0); this.footType = 'civ'; this.handType = 'civ'; this.bodyType = 'civ'; this.headType = 'civ'; } else { if (this.myCharacter == 'zombie' || this.myCharacter == 'zombie_scientist') { this.myName = 'Zombie'; this.applyStats(10, 1, 1, 20, 0, 1, null, 0, 0, 0, 0, 0, 0, 0, 0); this.myHealth = 60; this.myTactics = 0; this.myTacticsMax = 0; this.mySpeed = 3; this.myAccel = this.mySpeed / 4; this.myDash = 1.3; this.myReload = 90; this.myBlood = 'red'; this.myLevel = 4; this.bulletEater = false; this.amZombie = true; this.noHeadshots = false; this.noDodge = true; this.noWieldGuns = true; this.weaponStealer = false; this.traitBravery = 10; this.traitCover = 0; this.traitDistracted = 8; this.traitTriggerFinger = 5; this.traitCombatSkill = 1; this.traitAwareness = 0; this.headType = 'zombie' + SwainMath.randomNumber(1, 3); if (this.myCharacter == 'zombie') { this.bodyType = 'tricky'; } this.footType = 'tricky'; this.handType = 'tricky'; } else { if (this.myCharacter == 'zombie_agent' || this.myCharacter == 'zombie_agent_classic') { this.myName = 'Zombie'; this.applyStats(12, 1, 1, 20, 0, 1, null, 0, 0, 0, 0, 0, 0, 0, 0); this.myHealth = 120; this.myTactics = 0; this.myTacticsMax = 0; this.mySpeed = 3; this.myAccel = this.mySpeed / 4; this.myDash = 1.3; this.myReload = 90; this.myBlood = 'red'; this.myLevel = 4; this.bulletEater = false; this.amZombie = true; this.noHeadshots = false; this.noDodge = true; this.noWieldGuns = true; this.weaponStealer = true; this.traitBravery = 10; this.traitCover = 0; this.traitDistracted = 8; this.traitTriggerFinger = 5; this.traitCombatSkill = 1; this.traitAwareness = 0; if (this.myCharacter == 'zombie_agent') { this.createArmor('agent1_mask'); } if (this.myCharacter == 'zombie_agent_classic') { this.createArmor('agent1_mask_b'); } this.headType = 'zombie' + SwainMath.randomNumber(1, 3); this.bodyType = 'zombie_agent'; this.footType = 'tricky'; this.handType = 'tricky'; } else { if (this.myCharacter == 'zombie_agent2') { this.myName = 'Zombie'; this.applyStats(15, 1, 1, 25, 0, 1, null, 0, 0, 0, 0, 0, 0, 0, 0); this.myHealth = 150; this.myTactics = 0; this.myTacticsMax = 0; this.mySpeed = 3; this.myAccel = this.mySpeed / 4; this.myDash = 1.3; this.myReload = 90; this.myBlood = 'yellow'; this.myLevel = 6; this.bulletEater = false; this.amZombie = true; this.noHeadshots = false; this.noDodge = true; this.autoAware = true; this.noWieldGuns = true; this.weaponStealer = true; this.traitBravery = 10; this.traitCover = 0; this.traitDistracted = 8; this.traitTriggerFinger = 5; this.traitCombatSkill = 1; this.traitAwareness = 0; this.createArmor('agent2_mask'); this.headType = 'zombie_yellow'; this.bodyType = 'zombie_agent2'; this.footType = 'tricky'; this.handType = 'tricky'; } else { if (this.myCharacter == 'zombie_agent3') { this.myName = 'Zombie'; this.applyStats(20, 1, 1, 25, 0, 1, null, 0, 0, 0, 0, 0, 0, 0, 0); this.myHealth = 200; this.myTactics = 0; this.myTacticsMax = 0; this.mySpeed = 3; this.myAccel = this.mySpeed / 4; this.myDash = 1.3; this.myReload = 90; this.myBlood = 'yellow'; this.myLevel = 8; this.bulletEater = false; this.amZombie = true; this.noHeadshots = false; this.noDodge = true; this.autoAware = true; this.autoDash = true; this.noWieldGuns = true; this.weaponStealer = true; this.traitBravery = 10; this.traitCover = 0; this.traitDistracted = 8; this.traitTriggerFinger = 5; this.traitCombatSkill = 1; this.traitAwareness = 0; this.createArmor('agent3_mask'); this.headType = 'zombie_yellow'; this.bodyType = 'zombie_agent3'; this.footType = 'tricky'; this.handType = 'tricky'; } else { if (this.myCharacter == 'zombie_fatboy') { this.myName = 'Zombie G03LM'; this.applyStats(25, 1, 1, 30, 0, 1, null, 0, 0, 0, 0, 0, 0, 0, 0); this.myHealth = 400; this.myTactics = 0; this.myTacticsMax = 0; this.mySpeed = 5; this.myAccel = this.mySpeed / 2; this.myDash = 1.3; this.myReload = 90; this.myBlood = 'red'; this.myLevel = 12; this.myScale = 1.4; this.noCollide = true; this.weakToDash = true; this.disarmHelm = true; this.selfShoot = true; this.amSlow = true; this.bulletEater = true; this.noPaint = false; this.autoHit = true; this.fastDeath = true; this.amZombie = true; this.noHeadshots = false; this.noDodge = true; this.autoAware = true; this.noWieldGuns = true; this.traitBravery = 10; this.traitCover = 0; this.traitDistracted = 8; this.traitTriggerFinger = 5; this.traitCombatSkill = 1; this.traitAwareness = 0; this.createArmor('armorgolem_zombie'); if (SwainMath.randomNumber(1, 3) < 3) { this.createArmor('helmetgolem_zombie'); } this.headType = 'zombie_fatboy'; this.footType = 'tricky'; this.handType = 'tricky'; this.bodyType = 'tricky'; } else { if (this.myCharacter == 'zombie_riot') { this.myName = 'Zombie'; this.applyStats(15, 1, 1, 25, 0, 1, null, 0, 0, 0, 0, 0, 0, 0, 0); this.myHealth = 150; this.myTactics = 0; this.myTacticsMax = 0; this.mySpeed = 3; this.myAccel = this.mySpeed / 4; this.myDash = 1.3; this.myReload = 90; this.myBlood = 'red'; this.myLevel = 6; this.bulletEater = false; this.amZombie = true; this.noHeadshots = false; this.noDodge = true; this.autoAware = true; this.noWieldGuns = true; this.weaponStealer = true; this.traitBravery = 10; this.traitCover = 0; this.traitDistracted = 8; this.traitTriggerFinger = 5; this.traitCombatSkill = 1; this.traitAwareness = 0; this.footType = 'tricky'; this.handType = 'tricky'; } else { if (this.myCharacter == 'abom') { this.myName = 'Abomination'; this.applyStats(10, 1, 1, 20, 0, 1, null, 0, 0, 0, 0, 0, 0, 0, 0); this.myHealth = 60; this.myTactics = 0; this.myTacticsMax = 0; this.mySpeed = 5; this.myAccel = this.mySpeed / 4; this.myDash = 1.3; this.myReload = 90; this.myBlood = 'darkred'; this.myLevel = 4; this.bulletEater = false; this.noHeadshots = false; this.noDodge = true; this.noWieldGuns = true; this.noZombie = true; this.noHands = true; this.amEvader = true; this.amAbom = true; this.autoHit = true; this.knockdownDash = true; this.traitBravery = 10; this.traitCover = 0; this.traitDistracted = 6; this.traitTriggerFinger = 10; this.traitCombatSkill = 8; this.traitAwareness = 8; this.createArmor('handstraps'); this.headType = 'abom' + SwainMath.randomNumber(1, 3); this.bodyType = 'abom' + SwainMath.randomNumber(1, 2); this.footType = 'jesus'; this.handType = 'jesus'; } else { if (this.myCharacter == 'patient') { this.myName = 'Patient'; this.applyStats(15, 15, 1, 30, 0, 1, null, 0, 0, 0, 0, 0, 0, 0, 0); this.myHealth = 35; this.myTactics = 0; this.myTacticsMax = 0; this.mySpeed = 4; this.myAccel = this.mySpeed / 2; this.myDash = 1.3; this.myReload = 90; this.myBlood = 'darkred'; this.myLevel = 6; this.bulletEater = false; this.autoAware = false; this.headGearResurrect = true; this.noWieldGuns = false; this.weaponStealer = true; this.noHeadshots = true; this.improvedChump = true; this.noZombie = true; this.noDodge = true; this.fastDeteriorate = true; this.explodeDeath = 2; this.traitBravery = 2; this.traitCover = 0; this.traitDistracted = 4; this.traitTriggerFinger = 9; this.traitCombatSkill = 5; this.traitAwareness = 7; this.myNaturalArmorHead = 5; this.footType = 'civ'; this.handType = 'civ'; this.headType = 'experiment'; this.bodyType = 'patient' + SwainMath.randomNumber(1, 2); } else { if (this.myCharacter == 'experiment') { this.myName = 'Experiment'; this.applyStats(25, 10, 1, 30, 0, 1, null, 0, 0, 0, 0, 0, 0, 0, 0); this.myHealth = 120; this.myTactics = 0; this.myTacticsMax = 0; this.mySpeed = 4; this.myAccel = this.mySpeed / 2; this.myDash = 1.3; this.myReload = 90; this.myBlood = 'darkred'; this.myLevel = 12; this.traitBravery = 7; this.myScale = 1.25; this.noCollide = true; this.selfShoot = true; this.bulletEater = false; this.noPaint = false; this.autoHit = true; this.headGearResurrect = true; this.noZombie = true; this.autoAware = false; this.noHeadshots = true; this.noDodge = true; this.noWieldGuns = true; this.improvedChump = true; this.traitBravery = 10; this.traitCover = 0; this.traitDistracted = 3; this.traitTriggerFinger = 4; this.traitCombatSkill = 1; this.traitAwareness = 10; this.myNaturalArmorBody = 6; this.myNaturalArmorHead = 5; this.handType = 'jesus'; } else { if (this.myCharacter == 'riot') { this.myName = 'Riot Agent'; this.applyStats(16, 15, 5, 20, 5, 10, null, 15, 15, 15, 15, 15, 15, 15, 15); this.myHealth = 25; this.myTactics = Math.floor(this.myTactics * 0.65); this.myTacticsMax = this.myTactics; this.mySpeed = 6; this.myAccel = this.mySpeed / 4; this.myDash = 1.3; this.myReload = 70; this.myBlood = 'red'; this.myLevel = 8; this.meleeShy = true; this.grabBreaker = true; this.traitBravery = 7; this.traitCover = 8; this.traitDistracted = 6; this.traitTriggerFinger = 7; this.traitCombatSkill = 10; this.traitAwareness = 8; this.weaponArray = ['ppk', 'beretta', 'glock20', 'prokiller460', 'deagle', 'hk2', 'mp7', 'tmp', 'mp5k', 'pm9', 'oa93', '500snub', '357snub', 'ar15']; this.createWeapon(0, this.weaponArray[SwainMath.randomNumber(0, this.weaponArray.length - 1)], false); this.createWeapon(1, 'billyclub', false); this.weaponArray = new Array(); this.myNaturalArmorHead = 4; this.myNaturalArmorBody = 4; this.footType = 'agent'; this.handType = 'agent'; } else { if (this.myCharacter == 'mag2') { this.myName = 'Mag Agent'; this.applyStats(23, 5, 0, 20, 0, 3, null, 15, 15, 15, 15, 15, 15, 15, 15); this.myHealth = 1300; this.myHealthMax = 1300; this.myTactics = 0; this.myTacticsMax = 0; this.mySpeed = 6; this.myAccel = this.mySpeed / 4; this.myDash = 1.3; this.myReload = 70; this.myBlood = 'darkred'; this.myLevel = 15; this.myScale = 2.5; this.noCollide = true; this.selfShoot = true; this.fastDeteriorate = true; this.slamGrab = true; this.noDodge = true; this.amSlow = false; this.bulletEater = true; this.myBoss = 'mag2'; this.autoHit = true; this.noPaint = true; this.noRange = true; this.knockdownDash = true; this.myStartup = 'startup_roar'; this.amAbom = true; this.traitBravery = 7; this.traitCover = 1; this.traitDistracted = 3; this.traitTriggerFinger = 9; this.traitCombatSkill = 10; this.traitAwareness = 8; this.myNaturalArmorHead = 2; this.myNaturalArmorBody = 2; this.createArmor('armor_mag2'); this.createArmor('helmet_mag2'); } else { if (this.myCharacter == 'phobos') { this.myName = 'Phobos'; this.amSpecial = true; this.arenaLockArmor = true; this.applyStats(25, 30, 25, 25, 0, 25, null, 25, 25, 25, 25, 25, 25, 25, 25); this.myHealth = 200; this.mySpeed = 3; this.myAccel = this.mySpeed / 4; this.myDash = 1.4; this.myReload = 60; this.myBlood = 'red'; this.myLevel = 40; this.autoAware = true; this.myScale = 1.2; this.noCollide = true; this.selfShoot = true; this.fastDeteriorate = false; this.noPaint = true; this.noAimShots = true; this.meleeShy = true; this.strongGrip = true; this.thrownBlock = true; this.myDodge = 'phobos'; this.traitBravery = 6; this.traitCover = 9; this.traitDistracted = 2; this.traitTriggerFinger = 10; this.traitCombatSkill = 15; this.traitAwareness = 10; this.createWeapon(0, 'binarysword', false); this.myStartup = 'startup_phobos'; this.footType = 'jesus'; this.handType = 'jesus'; } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } } this.myReload = 96; this.myHealthMax = this.myHealth; if (this.weaponArray.length > 0) { this.createWeapon(0, this.weaponArray[SwainMath.randomNumber(0, this.weaponArray.length - 1)], false); } if (this.amZombie || this.amAbom) { this.attackNeutrals = true; } this.myUnarmed = ItemGenerator.unarmedWeapon(); }; v2.createWeapon = function (inSlot, inType, silencer) { var v2 = new Object(); v2 = ItemGenerator.createWeapon(inType, silencer); this.equipItem(v2, inSlot); }; v2.createArmor = function (inType) { var v2 = new Object(); v2 = ItemGenerator.createArmor(inType); this.equipItem(v2, 0); }; v2.equipItem = function (inItem, forceSlot) { if (inItem != undefined) { if (inItem.myCat == 'melee' || inItem.myCat == 'electric' || inItem.myCat == 'smg' || inItem.myCat == 'pistol' || inItem.myCat == 'revolver' || inItem.myCat == 'shotgun' || inItem.myCat == 'rifle' || inItem.myCat == 'heavy' || inItem.myCat == 'heavy_rifle') { if (forceSlot != null) { this.unequipItem('weapon' + String(forceSlot), forceSlot == 2); this.giveItem(inItem, forceSlot); } else { if ((inItem.myCat == 'pistol' || inItem.myCat == 'revolver') && (this.myWeapons[0] != undefined || this.myWeapons[1] == undefined)) { this.unequipItem('weapon1', false); this.giveItem(inItem, 1); } else { this.unequipItem('weapon0', false); this.giveItem(inItem, 0); } } } else { if (inItem.myCat == 'shirt') { this.unequipItem(inItem.myCat, forceSlot == 2); this.giveItem(inItem, forceSlot); } else { if (inItem.myCat == 'hat') { this.unequipItem(inItem.myCat, forceSlot == 2); this.giveItem(inItem, forceSlot); } else { if (inItem.myCat == 'mask') { this.unequipItem(inItem.myCat, forceSlot == 2); this.giveItem(inItem, forceSlot); } else { if (inItem.myCat == 'mouth') { this.unequipItem(inItem.myCat, forceSlot == 2); this.giveItem(inItem, forceSlot); } } } } } } }; v2.unequipItem = function (inCat, inStore) { var v3; if (inStore) { v3 = 2; } else { if (inCat == 'weapon1') { v3 = 1; } else { v3 = 0; } } var v2; if (inCat.substr(0, 6) == 'weapon') { v2 = this.myWeapons; if (!inStore) { this.myRoster.addWeapon(v2[v3]); } } else { if (inCat == 'hat') { v2 = this.myHat; } else { if (inCat == 'mask') { v2 = this.myMask; } else { if (inCat == 'mouth') { v2 = this.myMouth; } else { if (inCat == 'shirt') { v2 = this.myShirt; } } } } if (!inStore) { this.myRoster.addArmor(v2[v3]); } } if (v2 != undefined) { if (v3 != 2) { v2[v3].myOwner = undefined; } v2[v3] = undefined; } }; v2.giveItem = function (inItem, inSlot) { var v3; if (inItem.myCat == 'melee' || inItem.myCat == 'smg' || inItem.myCat == 'electric' || inItem.myCat == 'pistol' || inItem.myCat == 'revolver' || inItem.myCat == 'shotgun' || inItem.myCat == 'rifle' || inItem.myCat == 'heavy' || inItem.myCat == 'heavy_rifle') { v3 = this.myWeapons; if (inSlot != 2) { this.myRoster.removeWeapon(inItem); } } else { if (inItem.myCat == 'shirt') { v3 = this.myShirt; } else { if (inItem.myCat == 'hat') { v3 = this.myHat; } else { if (inItem.myCat == 'mask') { v3 = this.myMask; } else { if (inItem.myCat == 'mouth') { v3 = this.myMouth; } } } } if (inSlot != 2) { this.myRoster.removeArmor(inItem); } } v3[inSlot] = inItem; if (inSlot != 2) { inItem.myOwner = this; } }; v2.assignCustom = function (inCat, inCurrent, inArray, inRatio) { if (SwainMath.randomNumber(1, inRatio) == 1) { var v2 = new Object(); v2.myType = inArray[SwainMath.randomNumber(0, inArray.length - 1)]; v2.myCat = inCat; v2.myOwner = this; this.equipItem(v2, 0); } else {} }; v2.randomizeCharacter = function (inVariety) { var v3 = ['myHealth', 'traitBravery', 'traitCover', 'traitDistracted', 'traitTriggerFinger', 'traitCombatSkill']; var v2 = 0; while (v2 < v3.length) { this[v3[v2]] *= SwainMath.randomNumber(-inVariety * 1000, inVariety * 1000) / 1000; ++v2; } this.myHealthMax = this.myHealth; }; v2.applyStats = function (inStr, inDex, inTac, inEnd, inLead, inAwr, SPACER, inMelee, inUnarmed, inPistol, inRevolver, inSMG, inShotgun, inRifle, inHeavy) { this.statSTR = inStr; this.statDEX = inDex; this.statEND = inEnd; this.statTAC = inTac; this.statAWR = inAwr; this.statLEAD = inLead; this.skillMelee = inMelee; this.skillUnarmed = inUnarmed; this.skillPistol = inPistol; this.skillRevolver = inRevolver; this.skillSMG = inSMG; this.skillShotgun = inShotgun; this.skillRifle = inRifle; this.skillHeavy = inHeavy; this.changeStats(); this.assignPerks(); }; v2.changeStats = function () { if (this.amSpecial && false) { this.statDEX = 1 + Math.floor(this.myLevel / 2); this.statSTR = 1 + Math.floor(this.myLevel / 2); this.statTAC = 1 + Math.floor(this.myLevel / 2); this.statEND = 1 + Math.floor(this.myLevel / 2); this.statLEAD = 1 + Math.floor(this.myLevel / 2); this.statAWR = 1 + Math.floor(this.myLevel / 2); } if (this.amSpecial) { this.mySpeed = 4.8; } else { this.mySpeed = 4.5; } this.modSpeed = 1 + this.statDEX / 45; this.modDmg = 1 + this.statSTR / 15; this.modRecharge = 1 + this.statTAC / 10; this.modArmor = 1 + this.statEND / 15; this.modAllySmart = 1 + this.statLEAD / 15; this.modHurtTactics = 1 + this.statAWR / 50; this.modRange = this.statAWR * 1.5; this.myHealth = 6 + Math.floor(this.myLevel); if (this.amSpecial) { this.myHealth += 10; } this.myHealthMax = this.myHealth; this.myTactics = 0; var v2 = 5; for (;;) { if (!(v2 <= this.myLevel && v2 < 45)) break; this.myTactics += Math.floor(5 * (0.7 - v2 / 100)); ++v2; } if (MadnessDataFile.havePerk('perkTacBar1', this)) { this.myTactics += 10; } if (MadnessDataFile.havePerk('perkTacBar2', this)) { this.myTactics += 10; } if (this.amSlow) { this.myTactics = 0; } this.myTacticsMax = this.myTactics; this.mySlowMoMax = 400; this.mySlowMo = 0; }; v2.assignPerks = function () { this.perkSidearm1 = false; this.perkKnockdown1 = false; this.perkBlockBreak = false; this.perkStunDash1 = false; this.perkKnockdown2 = false; this.perkStunDash2 = false; this.perkDodge1 = false; this.perkReload1 = false; this.perkDodge2 = false; this.perkBlock1 = false; this.perkDodge3 = false; this.perkBlock2 = false; this.perkLowAcc1 = false; this.perkCoverShoot = false; this.perkTacBar1 = false; this.perkLowAcc2 = false; this.perkLowAcc3 = false; this.perkTacBar2 = false; this.perkArmor1 = false; this.perkArmor2 = false; this.perkStunProof1 = false; this.perkArmor3 = false; this.perkStunProof2 = false; this.perkImmuneLowDmg = false; this.perkTeamBonus1 = false; this.perkFearMonger1 = false; this.perkTeamBonus2 = false; this.perkFearMonger2 = false; this.perkTeamBonus3 = false; this.perkFearMonger3 = false; this.perkHeadshotCrits = false; this.perkBulletTime1 = false; this.perkBulletTime2 = false; this.perkArmorPierce = false; this.perkBulletTime3 = false; this.perkBulletTime4 = false; this.perkPistolAccuracy1 = false; this.perkPistolReload = false; this.perkPistolROF1 = false; this.perkPistolEffectiveness = false; this.perkPistolAccuracy2 = false; this.perkPistolROF2 = false; this.perkSMGAim1 = false; this.perkSMGReload = false; this.perkSMGTacDamage = false; this.perkSMGRange = false; this.perkSMGAim2 = false; var v2 = false; this.perkRifleTacDamage = false; this.perkRifleRange1 = false; this.perkRifleAccuracy = false; this.perkRifleEffectiveness = false; this.perkRifleRange2 = false; this.perkRifleReload = false; this.perkShotgunDamage = false; this.perkShotgunROF1 = false; this.perkShotgunShots1 = false; this.perkShotgunROF2 = false; this.perkShotgunReload = false; this.perkShotgunShots2 = false; this.perkMeleeMoves1 = false; this.perkMeleePistolWhip = false; this.perkMeleeMoves2 = false; this.perkMeleeDisarm = false; this.perkMeleeMoves3 = false; this.perkMeleeMoves4 = false; this.perkUnarmedMoves1 = false; this.perkUnarmedSpeed1 = false; this.perkUnarmedMoves2 = false; this.perkUnarmedSpeed2 = false; this.perkUnarmedMoves3 = false; this.perkUnarmedSpeed3 = false; if (this.statSTR >= 5) { this.perkSidearm1 = true; } if (this.statSTR >= 10) { this.perkKnockdown1 = true; } if (this.statSTR >= 15) { this.perkBlockBreak = true; } if (this.statSTR >= 20) { this.perkStunDash1 = true; } if (this.statSTR >= 25) { this.perkKnockdown2 = true; } if (this.statSTR >= 30) { this.perkStunDash2 = true; } if (this.statDEX >= 5) { this.perkDodge1 = true; } if (this.statDEX >= 10) { this.perkReload1 = true; } if (this.statDEX >= 15) { this.perkDodge2 = true; } if (this.statDEX >= 20) { this.perkBlock1 = true; } if (this.statDEX >= 25) { this.perkDodge3 = true; } if (this.statDEX >= 30) { this.perkBlock2 = true; } if (this.statTAC >= 5) { this.perkLowAcc1 = true; } if (this.statTAC >= 10) { this.perkCoverShoot = true; } if (this.statTAC >= 15) { this.perkTacBar1 = true; } if (this.statTAC >= 20) { this.perkLowAcc2 = true; } if (this.statTAC >= 25) { this.perkTacBar2 = true; } if (this.statTAC >= 30) { this.perkLowAcc3 = true; } if (this.statEND >= 5) { this.perkArmor1 = true; } if (this.statEND >= 10) { this.perkArmor2 = true; } if (this.statEND >= 15) { this.perkStunProof1 = true; } if (this.statEND >= 20) { this.perkArmor3 = true; } if (this.statEND >= 25) { this.perkStunProof2 = true; } if (this.statEND >= 30) { this.perkImmuneLowDmg = true; } if (this.statLEAD >= 5) { this.perkTeamBonus1 = true; } if (this.statLEAD >= 10) { this.perkFearMonger1 = true; } if (this.statLEAD >= 15) { this.perkTeamBonus2 = true; } if (this.statLEAD >= 20) { this.perkFearMonger2 = true; } if (this.statLEAD >= 25) { this.perkTeamBonus3 = true; } if (this.statLEAD >= 30) { this.perkFearMonger3 = true; } if (this.statAWR >= 5) { this.perkHeadshotCrits = true; } if (this.statAWR >= 10) { this.perkBulletTime1 = true; } if (this.statAWR >= 15) { this.perkBulletTime2 = true; } if (this.statAWR >= 20) { this.perkArmorPierce = true; } if (this.statAWR >= 25) { this.perkBulletTime3 = true; } if (this.statAWR >= 30) { this.perkBulletTime4 = true; } if (this.skillPistol >= 5) { this.perkPistolAccuracy1 = true; } if (this.skillPistol >= 10) { this.perkPistolReload = true; } if (this.skillPistol >= 15) { this.perkPistolROF1 = true; } if (this.skillPistol >= 20) { this.perkPistolEffectiveness = true; } if (this.skillPistol >= 25) { this.perkPistolAccuracy2 = true; } if (this.skillPistol >= 30) { this.perkPistolROF2 = true; } if (this.skillSMG >= 5) { this.perkSMGAim1 = true; } if (this.skillSMG >= 10) { this.perkSMGReload = true; } if (this.skillSMG >= 15) { this.perkSMGTacDamage = true; } if (this.skillSMG >= 20) { this.perkSMGRange = true; } if (this.skillSMG >= 25) { this.perkSMGAim2 = true; } if (this.skillSMG >= 30) { v2 = true; } if (this.skillRifle >= 5) { this.perkRifleTacDamage = true; } if (this.skillRifle >= 10) { this.perkRifleRange1 = true; } if (this.skillRifle >= 15) { this.perkRifleAccuracy = true; } if (this.skillRifle >= 20) { this.perkRifleEffectiveness = true; } if (this.skillRifle >= 25) { this.perkRifleRange2 = true; } if (this.skillRifle >= 30) { this.perkRifleReload = true; } if (this.skillShotgun >= 5) { this.perkShotgunDamage = true; } if (this.skillShotgun >= 10) { this.perkShotgunROF1 = true; } if (this.skillShotgun >= 15) { this.perkShotgunShots1 = true; } if (this.skillShotgun >= 20) { this.perkShotgunROF2 = true; } if (this.skillShotgun >= 25) { this.perkShotgunReload = true; } if (this.skillShotgun >= 30) { this.perkShotgunShots2 = true; } if (this.skillMelee >= 5) { this.perkMeleeMoves1 = true; } if (this.skillMelee >= 10) { this.perkMeleePistolWhip = true; } if (this.skillMelee >= 15) { this.perkMeleeMoves2 = true; } if (this.skillMelee >= 20) { this.perkMeleeDisarm = true; } if (this.skillMelee >= 25) { this.perkMeleeMoves3 = true; } if (this.skillMelee >= 30) { this.perkMeleeMoves4 = true; } if (this.skillUnarmed >= 5) { this.perkUnarmedMoves1 = true; } if (this.skillUnarmed >= 10) { this.perkUnarmedSpeed1 = true; } if (this.skillUnarmed >= 15) { this.perkUnarmedMoves2 = true; } if (this.skillUnarmed >= 20) { this.perkUnarmedSpeed2 = true; } if (this.skillUnarmed >= 25) { this.perkUnarmedMoves3 = true; } if (this.skillUnarmed >= 30) { this.perkUnarmedSpeed3 = true; } }; v2.healMeMinor = function () { this.myHealth = this.myHealthMax; this.myTactics = this.myTacticsMax; this.mySprite.amBleeding = false; }; v2.healMe = function () { this.myHealth = this.myHealthMax; this.myTactics = this.myTacticsMax; var v3 = 3; var v2 = 0; while (v2 < this.headWounds.length) { if (this.headWounds[v2].myAge == undefined) { this.headWounds[v2].myAge = 0; } else { ++this.headWounds[v2].myAge; } if (this.headWounds[v2].myType != 'stitch' && SwainMath.randomNumber(1, v3) == 1 || this.headWounds[v2].myAge >= 2) { this.headWounds.splice(v2, 1); --v2; } else { if (this.headWounds[v2].myType.substr(0, 5) != 'punch' && this.headWounds[v2].myType != 'stitch') { this.headWounds[v2].myType = 'stitch'; this.headWounds[v2].myVariant = SwainMath.randomNumber(1, 6); } } ++v2; } v2 = 0; while (v2 < this.bodyWounds.length) { if (this.bodyWounds[v2].myAge == undefined) { this.bodyWounds[v2].myAge = 0; } else { ++this.bodyWounds[v2].myAge; } if (this.bodyWounds[v2].myType != 'stitch' && SwainMath.randomNumber(1, v3) == 1 || this.bodyWounds[v2].myAge >= 2) { this.bodyWounds.splice(v2, 1); --v2; } else { if (this.bodyWounds[v2].myType.substr(0, 5) != 'punch' && this.bodyWounds[v2].myType != 'stitch') { this.bodyWounds[v2].myType = 'stitch'; this.bodyWounds[v2].myVariant = SwainMath.randomNumber(1, 6); } } ++v2; } this.bodySpray = 0; this.headSpray = 0; v2 = 0; while (v2 < 2) { this.myWeapons[v2].myClips = this.myWeapons[v2].startClips; this.myWeapons[v2].myAmmo = this.myWeapons[v2].myAmmoMax; this.myWeapons[v2].myHealth = this.myWeapons[v2].myHealthMax; ++v2; } this.myWeapon = 0; }; v2.removeScars = function () { this.headWounds = new Array(); this.bodyWounds = new Array(); }; v1.applyPerkDescription = function (inStat, inNum, inTextName, inTextDescription, inChar) { var v3; var v2; if (inStat == 'STR') { if (inNum == 0) { v3 = 'Stat: Strength'; v2 = ' A measure of your raw strength.'; } else { if (inNum == 5) { v3 = 'Perk: Sidearm'; v2 = ' Carry a second weapon.'; } else { if (inNum == 10) { v3 = 'Perk: Knockdown 1'; v2 = ' Your blunt melee and unarmed attacks have a greater chance of knocking down enemies.'; } else { if (inNum == 15) { v3 = 'Perk: Block Breaker'; v2 = ' Your Melee and Unarmed attacks are unblockable (but may still be parried).'; } else { if (inNum == 20) { v3 = 'Perk: Stun-Dash 1'; v2 = ' Your dash attacks stun opponents.'; } else { if (inNum == 25) { v3 = 'Perk: Knockdown 2'; v2 = ' Your blunt melee and unarmed attacks have a greater chance of knocking down enemies.'; } else { if (inNum == 30) { v3 = 'Perk: Stun-Dash 2'; v2 = ' Your dash attacks knock over opponents.'; } else { v3 = 'Strength ' + inNum; v2 = 'Melee/Unarmed damage + ' + String(Math.floor(inNum * 100 / 1.5) / 100) + '%'; } } } } } } } } if (inStat == 'DEX') { if (inNum == 0) { v3 = 'Stat: Dexterity'; v2 = ' Your speed and agility.'; } else { if (inNum == 5) { v3 = 'Perk: Dodge 1'; v2 = ' When taking a Tac-Bar hit, you will automatically evade the shot, decreasing further damage (Enabled at Level 5).'; } else { if (inNum == 10) { v3 = 'Perk: Fast-Load'; v2 = ' Swap weapons more quickly.'; } else { if (inNum == 15) { v3 = 'Perk: Dodge 2'; v2 = ' Perform an active sliding dodge with increased skill.'; } else { if (inNum == 20) { v3 = 'Perk: Bullet Block'; v2 = ' Your Melee block will stop bullets at minor Tactics loss.'; } else { if (inNum == 25) { v3 = 'Perk: Dodge 3'; v2 = ' Perform an active flipping dodge with ninja-like skill.'; } else { if (inNum == 30) { v3 = 'Perk: Bullet Deflect'; v2 = ' Your Melee weapon will deflect bullets back at opponents.'; } else { v3 = 'Dexterity ' + inNum; v2 = 'Move speed + ' + String(Math.floor(inNum * 100 / 2) / 100) + '%'; } } } } } } } } if (inStat == 'TAC') { if (inNum == 0) { v3 = 'Stat: Tactics'; v2 = ' Battle savy and your tactical integrity while under fire.'; } else { if (inNum == 5) { v3 = 'Perk: Evade 1'; v2 = ' Take half Tac-Bar damage from low-accuracy shots.'; } else { if (inNum == 10) { v3 = 'Perk: Cover Fire'; v2 = ' Take half Tac-Bar damage when hit while firing from cover.'; } else { if (inNum == 15) { v3 = 'Perk: Tac-Bar 1'; v2 = ' Boost to your Tac-Bar.'; } else { if (inNum == 20) { v3 = 'Perk: Evade 2'; v2 = ' Take half Tac-Bar damage from Melee and Unarmed attacks.'; } else { if (inNum == 25) { v3 = 'Perk: Tac-Bar 2'; v2 = ' Bigger boost to your Tac-Bar.'; } else { if (inNum == 30) { v3 = 'Perk: Evade 3'; v2 = ' Take no Tac-Bar damage from low-accuracy shots.'; } else { v3 = 'Tactics ' + inNum; v2 = 'Tac-Bar Recharge + ' + String(Math.floor(inNum * 100 / 1) / 100) + '%'; } } } } } } } } if (inStat == 'END') { if (inNum == 0) { v3 = 'Stat: Endurance'; v2 = ' The ability to withstand damage of all kinds and to lift heavy armor.'; } else { if (inNum == 5) { v3 = 'Perk: Armor 1'; v2 = ' You may wear light-class armor.'; } else { if (inNum == 10) { v3 = 'Perk: Armor 2'; v2 = ' You may wear medium-class armor.'; } else { if (inNum == 15) { v3 = 'Perk: Stun-Proof 1'; v2 = ' Low- to Mid-damage attacks no longer cause you to be stunned.'; } else { if (inNum == 20) { v3 = 'Perk: Armor 3'; v2 = ' You may wear heavy-class armor.'; } else { if (inNum == 25) { v3 = 'Perk: Stun-Proof 2'; v2 = ' You are not stunned by any form of damage.'; } else { if (inNum == 30) { v3 = 'Perk: Immunity'; v2 = ' Low-damage shots inflict next to no damage to you.'; } else { v3 = 'Endurance ' + inNum; v2 = 'Damage Reduction + ' + String(Math.floor(inNum * 100 / 1.5) / 100) + '%'; } } } } } } } } if (inStat == 'LEAD') { if (inNum == 0) { v3 = 'Stat: Leadership'; v2 = ' The level of skill and morale your teammates will exhibit in combat, and the fear you inspire in enemies.'; } else { if (inNum == 5) { v3 = 'Perk: Team Bonus 1'; v2 = ' Small increase to morale and decision-making skill of allies. Plus one squadmate.'; } else { if (inNum == 10) { v3 = 'Perk: Fearmonger 1'; v2 = ' Small decrease to the morale and reaction-time of opponents. Plus one squadmate.'; } else { if (inNum == 15) { v3 = 'Perk: Team Bonus 2'; v2 = ' Medium increase to morale and decision-making skill of allies. Plus one squadmate.'; } else { if (inNum == 20) { v3 = 'Perk: Fearmonger 2'; v2 = ' Medium decrease to the morale and reaction-time of opponents. Plus one squadmate.'; } else { if (inNum == 25) { v3 = 'Perk: Team Bonus 3'; v2 = ' Large increase to morale and decision-making skill of allies. Plus one squadmate.'; } else { if (inNum == 30) { v3 = 'Perk: Fearmonger 3'; v2 = ' Large decrease to the morale and reaction-time of opponents. Plus one squadmate.'; } else { v3 = 'Leadership ' + inNum; v2 = 'Ally reaction-time - ' + String(Math.floor(inNum * 100 / 1.5) / 100) + '%'; } } } } } } } } if (inStat == 'AWR') { if (inNum == 0) { v3 = 'Stat: Awareness'; v2 = ' Your time-sense and ability to perceive the weaknesses of opponents.'; } else { if (inNum == 5) { v3 = 'Perk: Headshots'; v2 = ' Headshots deal increased damage.'; } else { if (inNum == 10) { v3 = 'Perk: Bullet-Time 1'; v2 = ' Retain full movement speed during Bullet-Time.'; } else { if (inNum == 15) { v3 = 'Perk: Bullet-Time 2'; v2 = ' Retain full Melee and Unarmed attack speed during Bullet-Time.'; } else { if (inNum == 20) { v3 = 'Perk: Armor-Piercing'; v2 = ' Close-range attacks ignore the enemy\'s medium or light armor.'; } else { if (inNum == 25) { v3 = 'Perk: Bullet-Time 3'; v2 = ' Retain full ranged attack speed during Bullet-Time.'; } else { if (inNum == 30) { v3 = 'Perk: Bullet-Time 4'; v2 = ' Increased movement speed during Bullet-Time.'; } else { v3 = 'Awareness ' + inNum; v2 = 'Tac-Bar damage + ' + String(Math.floor(inNum * 100 / 5) / 100) + '%'; } } } } } } } } if (inStat == 'Pistol') { if (inNum == 0) { v3 = 'Skill: Pistols'; v2 = ' Ability to wield small, single-handed ranged weapons.'; } else { if (inNum == 5) { v3 = 'Perk: Pistol Accuracy 1'; v2 = ' Tighten up the accuracy of pistol shots when standing still.'; } else { if (inNum == 10) { v3 = 'Perk: Pistol Reload'; v2 = ' Doubletime your pistol reload.'; } else { if (inNum == 15) { v3 = 'Perk: Pistol ROF 1'; v2 = ' Increased rate of fire with pistols.'; } else { if (inNum == 20) { v3 = 'Perk: Pistol Effectiveness'; v2 = ' Pistols hit more often outside their effective range.'; } else { if (inNum == 25) { v3 = 'Perk: Pistol Accuracy 2'; v2 = ' Further increase the accuracy of pistol shots when standing still.'; } else { if (inNum == 30) { v3 = 'Perk: Pistol ROF 2'; v2 = ' Even better rate of fire with pistols.'; } else { v3 = ' Pistols ' + inNum; v2 = 'Increase ' + inNum; } } } } } } } } if (inStat == 'SMG') { if (inNum == 0) { v3 = 'Skill: SMGs'; v2 = ' Ability to wield small, two-handed ranged weapons.'; } else { if (inNum == 5) { v3 = 'Perk: SMG Aim 1'; v2 = ' Increased accuracy the longer you hold down the trigger of your SMG.'; } else { if (inNum == 10) { v3 = 'Perk: SMG Reload'; v2 = ' Doubletime your SMG reload.'; } else { if (inNum == 15) { v3 = 'Perk: SMG Tac Damage'; v2 = ' Increased SMG damage on Tac-Bar hits versus stationary targets.'; } else { if (inNum == 20) { v3 = 'Perk: SMG Range'; v2 = ' Increase the effective range of SMGs.'; } else { if (inNum == 25) { v3 = 'Perk: SMG Aim 2'; v2 = ' Even greater accuracy the longer you hold down the trigger of your SMG.'; } else { if (inNum == 30) { v3 = 'Perk: SMG ROF'; v2 = ' Increased rate of fire with SMGs.'; } else { v3 = ' SMGs ' + inNum; v2 = 'Increase ' + inNum; } } } } } } } } if (inStat == 'Rifle') { if (inNum == 0) { v3 = 'Skill: Rifles'; v2 = ' Ability to wield large, two-handed ranged weapons.'; } else { if (inNum == 5) { v3 = 'Perk: Rifle Tac Damage'; v2 = ' Increased rifle damage on Tac-Bar hits versus stationary targets.'; } else { if (inNum == 10) { v3 = 'Perk: Rifle Range 1'; v2 = ' Increase the effective range of rifles.'; } else { if (inNum == 15) { v3 = 'Perk: Rifle Accuracy'; v2 = ' Tighten up the accuracy of rifle shots when standing still.'; } else { if (inNum == 20) { v3 = 'Perk: Rifle Effectiveness'; v2 = ' Rifles hit more often outside their effective range.'; } else { if (inNum == 25) { v3 = 'Perk: Rifle Range 2'; v2 = ' Increase the effective range of rifles.'; } else { if (inNum == 30) { v3 = 'Perk: Rifle Reload'; v2 = ' Doubletime your rifle reload.'; } else { v3 = ' Rifles ' + inNum; v2 = 'Increase ' + inNum; } } } } } } } } if (inStat == 'Shotgun') { if (inNum == 0) { v3 = 'Skill: Shotguns'; v2 = ' Ability to wield large, two-handed scatter weapons.'; } else { if (inNum == 5) { v3 = 'Perk: Shotgun Damage'; v2 = ' Increase damage of point-blank shotgun blasts.'; } else { if (inNum == 10) { v3 = 'Perk: Shotgun ROF 1'; v2 = ' Increased rate of fire with pump shotguns.'; } else { if (inNum == 15) { v3 = 'Perk: Shot Increase 1'; v2 = ' Each blast of your shotgun fires an additional pellet.'; } else { if (inNum == 20) { v3 = 'Perk: Shotgun ROF 2'; v2 = ' Even better rate of fire with pump shotguns.'; } else { if (inNum == 25) { v3 = 'Perk: Shotgun Reload'; v2 = ' Doubletime your shotgun reload.'; } else { if (inNum == 30) { v3 = 'Perk: Shot Increase 2'; v2 = ' Each blast of your shotgun fires two additional pellets.'; } else { v3 = ' Shotguns ' + inNum; v2 = 'Increase ' + inNum; } } } } } } } } if (inStat == 'Melee') { if (inNum == 0) { v3 = 'Skill: Melee'; v2 = ' Ability to wield melee weapons at close range, or thrown.'; } else { if (inNum == 5) { v3 = 'Perk: Beginner Combos'; v2 = ' Launch three basic melee attacks in quick succession.'; } else { if (inNum == 10) { v3 = 'Perk: Pistol Whip'; v2 = ' Use your ranged weapon as a slugging instrument at close range.'; } else { if (inNum == 15) { v3 = 'Perk: Advanced Combos'; v2 = ' Your three-hit combos feature more advanced moves.'; } else { if (inNum == 20) { v3 = 'Perk: Disarm'; v2 = ' Timed blocking of an opponent\'s melee attack will disarm their weapon.'; } else { if (inNum == 25) { v3 = 'Perk: Expert Combos'; v2 = ' Combos no longer include low-level attacks, and have a vastly improved cooldown time.'; } else { if (inNum == 30) { v3 = 'Perk: Master Combos'; v2 = ' Your three-hit combos end with a devastating finisher attack.'; } else { v3 = ' Melee ' + inNum; v2 = 'Increase ' + inNum; } } } } } } } } if (inStat == 'Unarmed') { if (inNum == 0) { v3 = 'Skill: Unarmed'; v2 = ' Ability to wield one\'s fists as weapons.'; } else { if (inNum == 5) { v3 = 'Perk: Basic Pugilist'; v2 = ' Throw quality punches.'; } else { if (inNum == 10) { v3 = 'Perk: Pummel 1'; v2 = ' Decrease the cooldown of your punches slightly.'; } else { if (inNum == 15) { v3 = 'Perk: Advanced Pugilist'; v2 = ' Turn your fists into lethal weapons with some new moves.'; } else { if (inNum == 20) { v3 = 'Perk: Pummel 2'; v2 = ' Decrease the cooldown of your punches moderately.'; } else { if (inNum == 25) { v3 = 'Perk: Expert Pugilist'; v2 = ' Unleash devastating martial arts moves.'; } else { if (inNum == 30) { v3 = 'Perk: Pummel 3'; v2 = ' Increase the actual speed of all unarmed attacks.'; } else { v3 = ' Unarmed ' + inNum; v2 = 'Increase ' + inNum; } } } } } } } } if (inChar['stat' + inStat] != undefined && inChar['stat' + inStat] >= inNum || inChar['skill' + inStat] != undefined && inChar['skill' + inStat] >= inNum) { inTextName.textColor = 65280; } else { inTextName.textColor = 16711680; } inTextName.text = v3; inTextDescription.text = v2; }; v2.buyStat = function (inStat, inCat) { if (this[inCat + 'Points'] > 0) { ++this[inCat + inStat]; --this[inCat + 'Points']; this.changeStats(); this.assignPerks(); } }; v2.copyCharacter = function (inChar) { for (var v3 in inChar) { this[v3] = inChar[v3]; } }; v1.havePerk = function (inPerk, inChar) { return inChar[inPerk]; }; } else { goto 48856; } storedv1.getLevelUpXP = function (inLevel, inXP) { return 100 * inLevel - 0.5 * (inLevel - 0) * 100; }; storedv2.applyXP = function (inXP) { this.myXP += inXP; if (this.myXP >= MadnessDataFile.getLevelUpXP(this.myLevel)) { if (this != MadnessRoster.playerRoster.teamLeader && this.traitCombatSkill < 10 && this.traitCombatSkill < this.myLevel / 3 + SwainMath.randomNumber(-2, 2)) { ++this.traitCombatSkill; trace('Character level up! He gained a combat skill point just now (good boy!)'); } ++this.myLevel; this.statPoints += 3; this.skillPoints += 3; this.myXP -= MadnessDataFile.getLevelUpXP(this.myLevel); this.changeStats(); } }; storedv2.autoApplyPoints = function () { var v2 = ['Unarmed', 'Melee', 'Pistol', 'SMG', 'Rifle', 'Shotgun']; var v3; for (;;) { if (!(this.skillPoints > 0 && !this.allSkillsFull('skill', v2))) break; v3 = v2[SwainMath.randomNumber(0, v2.length - 1)]; if (this['skill' + v3] < this.statCap) { this.buyStat(v3, 'skill'); } } v2 = ['STR', 'DEX', 'TAC', 'END', 'LEAD', 'AWR']; for (;;) { if (!(this.statPoints > 0 && !this.allSkillsFull('stat', v2))) break; v3 = v2[SwainMath.randomNumber(0, v2.length - 1)]; if (this['stat' + v3] < this.statCap) { this.buyStat(v3, 'stat'); } } }; storedv2.allSkillsFull = function (inType, inArray) { var v2 = 0; while (v2 < inArray.length) { if (this[inType + inArray[v2]] < this.statCap) { return false; break; } ++v2; } return true; }; storedv2.randomStats = function (inLvl) { if (inLvl > 25) { inLvl = 25; } inLvl = SwainMath.randomNumber(1, inLvl); if (inLvl < 1) { inLvl = 1; } this.myLevel = inLvl; this.applyHireCost(inLvl); this.skillPoints += this.myLevel * 3; this.statPoints += this.myLevel * 3; this.autoApplyPoints(); this.traitBravery = SwainMath.randomNumber(1, 10); this.traitDistracted = SwainMath.randomNumber(1, 10); this.traitTriggerFinger = SwainMath.randomNumber(1, 10); this.traitCover = SwainMath.randomNumber(1, 10); this.traitCombatSkill = this.myLevel / 3 + SwainMath.randomNumber(0, 5); if (this.traitCombatSkill > 10) { this.traitCombatSkill = 10; } }; storedv2.applyHireCost = function (inLvl) { this.myHireCost = inLvl * 100 * (SwainMath.randomNumber(950, 1100) / 1050); return this.myHireCost; }; storedv1.findHighestSkill = function (inChar) { var v2 = ['Unarmed', 'Melee', 'Pistol', 'SMG', 'Rifle', 'Shotgun']; var v3 = new Number(); var v5; var v1 = 0; while (v1 < v2.length) { if (inChar['skill' + v2[v1]] > v3) { v3 = inChar['skill' + v2[v1]]; v5 = v2[v1]; } ++v1; } return v5; }; storedv2.mixStats = function () { var v2 = ['Unarmed', 'Melee', 'Pistol', 'SMG', 'Rifle', 'Shotgun']; var v4; var v3 = 0; while (v3 < v2.length) { this['skill' + v2[v3]] += SwainMath.randomNumber(-3, 3); if (this['skill' + v2[v3]] > this.statCap) { this['skill' + v2[v3]] = this.statCap; } if (this['skill' + v2[v3]] < 0) { this['skill' + v2[v3]] = 0; } ++v3; } v2 = ['STR', 'DEX', 'TAC', 'END', 'LEAD', 'AWR']; v3 = 0; while (v3 < v2.length) { this['stat' + v2[v3]] += SwainMath.randomNumber(-3, 3); if (this['stat' + v2[v3]] > this.statCap) { this['stat' + v2[v3]] = this.statCap; } if (this['stat' + v2[v3]] < 0) { this['stat' + v2[v3]] = 0; } ++v3; } }; storedv2.myEcho = function () { trace('Here I am - ' + this.myName); }; storedv2.checkGunUse = function () {}; storedv1.replicateCharacter = function (inTarget) { var v1 = new MadnessDataFile(); v1.createNew(inTarget.myCharacter); v1.myName = inTarget.myName; v1.myLevel = inTarget.myLevel; v1.myXP = inTarget.myXP; v1.skillPoints = inTarget.skillPoints; v1.statPoints = inTarget.statPoints; v1.myKills = inTarget.myKills; v1.myWaves = inTarget.myWaves; v1.amSpecial = inTarget.amSpecial; v1.traitBravery = inTarget.traitBravery; v1.traitCover = inTarget.traitCover; v1.traitDistracted = inTarget.traitDistracted; v1.traitTriggerFinger = inTarget.traitTriggerFinger; v1.traitCombatSkill = inTarget.traitCombatSkill; v1.statSTR = inTarget.statSTR; v1.statDEX = inTarget.statDEX; v1.statTAC = inTarget.statTAC; v1.statEND = inTarget.statEND; v1.statLEAD = inTarget.statLEAD; v1.statAWR = inTarget.statAWR; v1.skillPistol = inTarget.skillPistol; v1.skillSMG = inTarget.skillSMG; v1.skillRifle = inTarget.skillRifle; v1.skillShotgun = inTarget.skillShotgun; v1.skillMelee = inTarget.skillMelee; v1.skillUnarmed = inTarget.skillUnarmed; v1.assignPerks(); v1.changeStats(); if (v1.myXP == undefined) { v1.myXP = 0; } if (v1.myKills == undefined) { v1.myKills = 0; } if (v1.myWaves == undefined) { v1.myWaves = 0; } var v6 = ItemGenerator.replicateWeapon(inTarget.myWeapons[0]); var v5 = ItemGenerator.replicateWeapon(inTarget.myWeapons[1]); v1.myWeapons = new Array(); v1.myWeapons.push(v6); v1.myWeapons.push(v5); var v3 = ItemGenerator.createArmor(inTarget.myShirt[0].myType); v1.myShirt = new Array(); v1.myShirt.push(v3); var v4 = ItemGenerator.createArmor(inTarget.myMask[0].myType); v1.myMask = new Array(); v1.myMask.push(v4); var v7 = ItemGenerator.createArmor(inTarget.myHat[0].myType); v1.myHat = new Array(); v1.myHat.push(v7); var v8 = ItemGenerator.createArmor(inTarget.myMouth[0].myType); v1.myMouth = new Array(); v1.myMouth.push(v8); return v1; }; storedv1.returnZombieType = function (inType) { if (inType.substr(0, 5) == 'agent' || inType == 'riot' || inType == 'scientist') { return 'zombie_' + inType; } return 'zombie'; }; storedv2.mySpeedBoost = 1; storedv2.myBossPhase = new Number(); storedv2.amSpecial = false; storedv2.headSpray = 0; storedv2.bodySpray = 0; storedv2.amSurprised = true; storedv2.myObjective = undefined; storedv2.objectiveRequired = undefined; storedv2.objectiveHidden = undefined; storedv2.myIconPos = new Number(); storedv2.skillCap = 30; storedv2.statCap = 30; storedv2.myXP = 0; storedv2.statPoints = 0; storedv2.skillPoints = 0; storedv2.xpMelee = 0; storedv2.xpUnarmed = 0; storedv2.xpPistol = 0; storedv2.xpSMG = 0; storedv2.xpShotgun = 0; storedv2.xpRifle = 0; storedv2.myHireCost = new Number(); storedv2.myWaves = 0; storedv2.myKills = 0; storedv2.amHarvested = false; storedv2.myWeapons = new Array(); storedv2.myWeapon = new Number(); storedv2.weaponArray = new Array(); storedv2.myHat = new Array(); storedv2.myMouth = new Array(); storedv2.myMask = new Array(); storedv2.myShirt = new Array(); storedv2.lifeStatus = 'active'; storedv2.saveAsActive = false; storedv2.saveAsLeader = false; storedv2.arenaLockArmor = false; storedv2.perkSidearm1 = false; storedv2.perkKnockdown1 = false; storedv2.perkBlockBreak = false; storedv2.perkStunDash1 = false; storedv2.perkKnockdown2 = false; storedv2.perkStunDash2 = false; storedv2.perkDodge1 = false; storedv2.perkReload1 = false; storedv2.perkDodge2 = false; storedv2.perkBlock1 = false; storedv2.perkDodge3 = false; storedv2.perkBlock2 = false; storedv2.perkLowAcc1 = false; storedv2.perkCoverShoot = false; storedv2.perkTacBar1 = false; storedv2.perkLowAcc2 = false; storedv2.perkLowAcc3 = false; storedv2.perkTacBar2 = false; storedv2.perkArmor1 = false; storedv2.perkArmor2 = false; storedv2.perkStunProof1 = false; storedv2.perkArmor3 = false; storedv2.perkStunProof2 = false; storedv2.perkImmuneLowDmg = false; storedv2.perkTeamBonus1 = false; storedv2.perkFearMonger1 = false; storedv2.perkTeamBonus2 = false; storedv2.perkFearMonger2 = false; storedv2.perkTeamBonus3 = false; storedv2.perkFearMonger3 = false; storedv2.perkHeadshotCrits = false; storedv2.perkBulletTime1 = false; storedv2.perkBulletTime2 = false; storedv2.perkArmorPierce = false; storedv2.perkBulletTime3 = false; storedv2.perkBulletTime4 = false; storedv2.perkPistolAccuracy1 = false; storedv2.perkPistolReload = false; storedv2.perkPistolROF1 = false; storedv2.perkPistolEffectiveness = false; storedv2.perkPistolAccuracy2 = false; storedv2.perkPistolROF2 = false; storedv2.perkSMGAim1 = false; storedv2.perkSMGReload = false; storedv2.perkSMGTacDamage = false; storedv2.perkSMGRange = false; storedv2.perkSMGAim2 = false; storedv2.perkSMGROF = false; storedv2.perkRifleTacDamage = false; storedv2.perkRifleRange1 = false; storedv2.perkRifleAccuracy = false; storedv2.perkRifleEffectiveness = false; storedv2.perkRifleRange2 = false; storedv2.perkRifleReload = false; storedv2.perkShotgunDamage = false; storedv2.perkShotgunROF1 = false; storedv2.perkShotgunShots1 = false; storedv2.perkShotgunROF2 = false; storedv2.perkShotgunReload = false; storedv2.perkShotgunShots2 = false; storedv2.perkMeleeMoves1 = false; storedv2.perkMeleePistolWhip = false; storedv2.perkMeleeMoves2 = false; storedv2.perkMeleeDisarm = false; storedv2.perkMeleeMoves3 = false; storedv2.perkMeleeMoves4 = false; storedv2.perkUnarmedMoves1 = false; storedv2.perkUnarmedSpeed1 = false; storedv2.perkUnarmedMoves2 = false; storedv2.perkUnarmedSpeed2 = false; storedv2.perkUnarmedMoves3 = false; storedv2.perkUnarmedSpeed3 = false; label 48856: ASSetPropFlags(_global.MadnessDataFile.prototype, null, 1); #endinitclip } movieClip 8392 __Packages.MadnessCharacter { #initclip if (!_global.MadnessCharacter) { var v1 = function () { super(); this.targetsHit = new Array(); this.targetsTac = new Array(); this.myLockList = new Array(); this.resurrectFlashColor = new Array(); this.onEnterFrame = this.tick; }; _global.MadnessCharacter = v1; _global.MadnessCharacter extends MovieClip; var v2 = v1.prototype; v2.init = function (inRef, inRosterRef, inFaction, inPlayer, inRoster, myDoor, myStartX, myStartY) { this.myDataRef = inRef; this.myDataRef.mySprite = this; this.myRoster = inRosterRef; this.myFaction = inFaction; this.amPlayer = inPlayer; if (this.amPlayer) { this.onMouseDown = this.mouseDown; this.onMouseUp = this.mouseUp; } if (this.myDataRef.amZombie) { this.myMission = 'patrol'; } else { if (this.myRoster == MadnessRoster.playerRoster) { this.myMission = 'patrol'; if (MadnessGameSelect.gameMode == 'arena') { this.myMission = 'engage'; } if (MadnessRoster.playerRoster.teamLeader.mySprite.lifeSpan > 90) { this.myMission = 'engage'; } } else { this.myMission = 'follow'; } } this.myLeader = this.myRoster.teamLeader.mySprite; this._x = myStartX; this._y = myStartY; if (this.myDataRef.loggedX != undefined) { this._x = this.myDataRef.loggedX; } if (this.myDataRef.loggedY != undefined) { this._y = this.myDataRef.loggedY; } this.refreshStats(); if (myDoor.myDir == 'right' || myDoor.myDir == 'left') { this.myFacing = myDoor.myDir; } else { if (SwainMath.randomNumber(0, 1) == 0) { this.myFacing = 'right'; } else { this.myFacing = 'left'; } } if (this.myFacing == 'right') { this.myAimX = this._x + 50; this.mySpeedRight = this.mySpeed; } else { this.myFacing = 'left'; this.myAimX = this._x - 50; this.mySpeedRight = -this.mySpeed; this._xscale = -100; } this.myAimY = this._y - 50; this.rofTimer = 9999; this.myWeapon = this.myDataRef.myWeapon; this.myRoom = this._parent.determineRoom(this._x, this._y); this._alpha = 100; this.myTacBar._alpha = 0; this.tacTimer = this.tacRerchargeDelay; this.myMash._alpha = 0; this.myMash.gotoAndStop(1); this.myMash._visible = false; if (this.myHealth <= 0 && this.myDataRef.noPaint) { this.myStatus = this.myDataRef.lastStatus; this.mySubStatus = this.myDataRef.lastSubStatus; this.myFacing = this.myDataRef.lastFacing; this.gotoAndStop(this.myStatus + this.mySubStatus); this.mySprite.onEnterFrame = this.amDead; this.cacheAsBitmap = true; this.mySprite.gotoAndStop(this.mySprite._totalframes); this.killMe(); } this.headSpray = this.myDataRef.headSpray; this.bodySpray = this.myDataRef.bodySpray; if (!this.amPlayer) { } this.myStatus = 'run'; if (this.myDataRef.amZombie || this.myDataRef.amAbom) { this.mySubWalk = String(SwainMath.randomNumber(1, 3)); this.mySubIdle = String(SwainMath.randomNumber(1, 3)); this.gotoAndStop('run_zombie_' + this.mySubWalk); } else { this.gotoAndStop('run'); } MadnessCharacter.adjustSprite(this); this._xscale = MadnessCharacter.setPerspectiveScale(this._x, this._y, this.myRoom); this._xscale *= this.myDataRef.myScale; this._yscale = this._xscale; MadnessCharacter.setMyDepth(this, this._yscale); if (this.myDataRef.myBoss != '') { this.bossEvents('start'); } if (this.myRoster == MadnessRoster.playerRoster || this.myDataRef.myBoss != '') { this.myDataRef.amSurprised = false; } this.myPulseNumber = SwainMath.randomNumber(1, 30); }; v2.pauseTick = function () { this.mySprite.stop(); if (!this._parent.paused) { this.onEnterFrame = this.tick; } }; v2.tick = function () { if (this._parent.paused) { this.onEnterFrame = this.pauseTick; } if (this.myRoom == -1) { trace('ERROR! Character without room!'); trace('ERROR! Character without room!'); trace('ERROR! Character without room!'); trace('ERROR! Character without room!'); } if (this.amPlayer && this.inputAllowed()) { this.playerControls(); } else { if (!MadnessTransition.transitionLock && this.inputAllowed() && !this.myDataRef.standStill) { MadnessAI.setActions(this); } } if (this._alpha < 100) { this._alpha += 20; } ++this.lifeSpan; if (this.freakOutTimer > 0) { --this.freakOutTimer; } this.determineGameSpeed(); if (this.doorLock) { this.doorLockBoost = 1.3; if (this.myDataRef.bossFlee != undefined) { this.doorLockBoost *= 2; } } else { this.doorLockBoost = 1; } if (this.emptyClipTimer > 0 && this.amPlayer) { this.emptyClipTimer -= 1 + this.myGameSpeed; } if (this.mouseTimer > -1 && this.mouseTimer <= this.mouseTime2x) { ++this.mouseTimer; } else { this.mouseTimer = -1; if (!this.mouseHold) { this.mouse2x = false; } } if (this.mouseTimer > 0 || this.mouseTimer == -1) { this.mouseClick = false; } ++this.mouseReleaseTimer; this.bossEvents('tick'); this.breakdownAutoMove(); this.breakdownStatusActions(); this.breakdownAttack(); if (this.myHealth <= 0) { this.tacTimer = 0; this.myTactics = 0; } if (this.tacTimer == 0 && this.myStatus == 'idle' && MadnessDataFile.havePerk('perkDodge1', this.myDataRef) && !this.targetLock) { this.myStatus = 'tactics'; } if (!this.amDodging && !this.blocking) { if (this.tacTimer < this.tacRerchargeDelay - Math.floor(10 * this.myTacMod)) { this.tacTimer += 1 + this.myGameSpeed; if (this.myHealth > 0 && this.myTactics > 0) { this.tacDisplayTimer = 20; } } else { this.myTactics += (1 + this.myGameSpeed) * 0.05 * this.myTacMod; if (this.myTactics > this.myTacticsMax) { this.myTactics = this.myTacticsMax; } } } if (this.myTacticsMax > 0) { var v2 = 1; while (v2 <= 4) { if (this.myTactics > this.myTacticsMax - (this.myTacticsMax / 4) * v2) { this.myTacBar['dot' + String(v2)].gotoAndStop(2); } else { this.myTacBar['dot' + String(v2)].gotoAndStop(1); } ++v2; } } else { this.myTacBar._visible = false; } if (this.tacDisplayTimer > 0) { if (this.myTactics < this.myTacticsMax && this.myHealth > 0 && this.myTactics > 0) { this.tacDisplayTimer -= 0.5; } else { this.tacDisplayTimer -= 1; } } if ((this.myHealth <= 0 || this.myTactics == 0) && this.tacDisplayTimer > 10) { this.tacDisplayTimer = 10; } if (Math.abs(this.tacDisplayTimer) < 10) { this.myTacBar._alpha = Math.abs(this.tacDisplayTimer) * 10; } else { this.myTacBar._alpha = 100; } if (this.slowMoActive) { this.myDataRef.mySlowMo -= 1; if (this.myDataRef.mySlowMo <= 0) { this.myDataRef.mySlowMo = 0; this.slowMoActive = false; } } else { if (this.myDataRef.mySlowMo > this.myDataRef.mySlowMoMax) { this.myDataRef.mySlowMo = this.myDataRef.mySlowMoMax; } } this._x += this.mySpeedRight * this.myDataRef.mySpeedBoost * this.slowmoSpeedMod * this.doorLockBoost * this.heavySpeedMod; this._y += this.mySpeedDown * this.myDataRef.mySpeedBoost * this.slowmoSpeedMod * this.doorLockBoost * this.heavySpeedMod; this.hittingObstacle = false; if (this.myStatus != 'cover') { var v2 = 0; while (v2 < MadnessObstacle.allObstacles.length) { if (!MadnessObstacle.allObstacles[v2].myDataRef.noClip && !this.targetLock) { if (this._x < MadnessObstacle.allObstacles[v2]._x + MadnessObstacle.allObstacles[v2].myWidth / 2 + this.myWidth / 2 && this._x > MadnessObstacle.allObstacles[v2]._x - MadnessObstacle.allObstacles[v2].myWidth / 2 - this.myWidth / 2 && this._y < MadnessObstacle.allObstacles[v2]._y + MadnessObstacle.allObstacles[v2].myDepth / 2 && this._y > MadnessObstacle.allObstacles[v2]._y - MadnessObstacle.allObstacles[v2].myDepth / 2) { this.hittingObstacle = true; if (this._x - this.mySpeedRight * this.slowmoSpeedMod * this.doorLockBoost <= MadnessObstacle.allObstacles[v2]._x - MadnessObstacle.allObstacles[v2].myWidth / 2 - this.myWidth / 2 || this._x - this.mySpeedRight * this.slowmoSpeedMod * this.doorLockBoost >= MadnessObstacle.allObstacles[v2]._x + MadnessObstacle.allObstacles[v2].myWidth / 2 + this.myWidth / 2) { if (this._x - this.mySpeedRight * this.slowmoSpeedMod * this.doorLockBoost < MadnessObstacle.allObstacles[v2]._x) { this._x = MadnessObstacle.allObstacles[v2]._x - MadnessObstacle.allObstacles[v2].myWidth / 2 - this.myWidth / 2 - 1; } else { this._x = MadnessObstacle.allObstacles[v2]._x + MadnessObstacle.allObstacles[v2].myWidth / 2 + this.myWidth / 2 + 1; } } if (this._y - this.mySpeedDown * this.slowmoSpeedMod * this.doorLockBoost <= MadnessObstacle.allObstacles[v2]._y - MadnessObstacle.allObstacles[v2].myDepth / 2 || this._y - this.mySpeedDown * this.slowmoSpeedMod * this.doorLockBoost >= MadnessObstacle.allObstacles[v2]._y + MadnessObstacle.allObstacles[v2].myDepth / 2) { if (this._y - this.mySpeedDown * this.slowmoSpeedMod * this.doorLockBoost < MadnessObstacle.allObstacles[v2]._y) { this._y = MadnessObstacle.allObstacles[v2]._y - MadnessObstacle.allObstacles[v2].myDepth / 2 - 1; } else { this._y = MadnessObstacle.allObstacles[v2]._y + MadnessObstacle.allObstacles[v2].myDepth / 2 + 1; } } if (this.intendedTarget == this.targetPickup && this.intendedTarget != undefined && this.targetLock) { this.initiatePickup(); } if (this.moveRight || this.moveLeft) { if (this._x == MadnessObstacle.allObstacles[v2]._x + MadnessObstacle.allObstacles[v2].myWidth / 2 + this.myWidth / 2 + 1 || this._x == MadnessObstacle.allObstacles[v2]._x - MadnessObstacle.allObstacles[v2].myWidth / 2 - this.myWidth / 2 - 1) { this._y += 4 * this.slowmoSpeedMod * this.doorLockBoost; this.mySpeedDown += 0.1; } } if (!this.amPlayer) { if (this.moveUp || this.moveDown) { if (this._y == MadnessObstacle.allObstacles[v2]._y + MadnessObstacle.allObstacles[v2].myDepth / 2 + 1 || this._y == MadnessObstacle.allObstacles[v2]._y - MadnessObstacle.allObstacles[v2].myDepth / 2 - 1) { if (this.myFacing == 'right') { this._x += 4 * this.slowmoSpeedMod * this.doorLockBoost; } else { this._x -= 4 * this.slowmoSpeedMod * this.doorLockBoost; } } } } if (this.pathFind && SwainMath.randomNumber(0, 60) == 0) { this.pathFind = false; } } } ++v2; } } if (!this.targetLock && !this.targetApproach && this.myStatus != 'dodge' && this.myRoster == MadnessRoster.playerRoster) { v2 = 0; while (v2 < this._parent.noColliders.length) { if (this._parent.noColliders[v2] != this) { if (this._x < this._parent.noColliders[v2]._x + (this._parent.noColliders[v2].myWidth / 2) * (this._yscale / 100) + (this.myWidth / 2) * (this._yscale / 100) && this._x > this._parent.noColliders[v2]._x - (this._parent.noColliders[v2].myWidth / 2) * (this._yscale / 100) - (this.myWidth / 2) * (this._yscale / 100) && this._y < this._parent.noColliders[v2]._y + (this._parent.noColliders[v2].myDepth / 2) * (this._parent.noColliders[v2]._yscale / 100) && this._y > this._parent.noColliders[v2]._y - (this._parent.noColliders[v2].myDepth / 2) * (this._parent.noColliders[v2]._yscale / 100)) { if (this.mySpeedRight > 0 && this.moveRight && this._x < this._parent.noColliders[v2]._x || this.mySpeedRight < 0 && this.moveLeft && this._x > this._parent.noColliders[v2]._x) { this._x -= this.mySpeedRight * this.slowmoSpeedMod * this.doorLockBoost; if (this.mySpeedDown == 0) { this.mySpeedRight = 0; } } if (this.mySpeedDown > 0 && this.moveDown && this._y < this._parent.noColliders[v2]._y || this.mySpeedDown < 0 && this.moveUp && this._y > this._parent.noColliders[v2]._y) { this._y -= this.mySpeedDown * this.slowmoSpeedMod * this.doorLockBoost; if (this.mySpeedRight == 0) { this.mySpeedDown = 0; } } } } ++v2; } } if (this.myRoom != undefined) { if (this.myRoom.roomNumber != 0 && this._x < this.myRoom.myDL._x && this._x < this.myRoom.myUL._x) { this.myRoom = this._parent.myRooms[this.myRoom.roomNumber - 1]; } if (this.myRoom.roomNumber != this._parent.myRooms.length - 1 && this._x > this.myRoom.myDR._x && this._x > this.myRoom.myUR._x) { this.myRoom = this._parent.myRooms[this.myRoom.roomNumber + 1]; } if (this._y < this.myRoom.myUL._y && this._y < this.myRoom.myUR._y) { this._y += 5; this.mySpeedDown = 0; } if (this._y > this.myRoom.myDL._y && this._y > this.myRoom.myDR._y) { this._y -= 5; this.mySpeedDown = 0; } for (;;) { if (!(this.myRoom.roomNumber == 0 && SwainMath.calculate_rotation(this.myRoom.myDL._x, this.myRoom.myDL._y, this._x, this._y) <= this.myRoom.leftAngle)) break; this._x += this.myAccel; this.mySpeedRight = 0; if (this.intendedTarget == this.targetPickup && this.intendedTarget != undefined && this.targetLock) { this.initiatePickup(); } if (this.intendedX != undefined) { this.intendedX = this._x; } } for (;;) { if (!(this.myRoom.roomNumber == this._parent.myRooms.length - 1 && SwainMath.calculate_rotation(this.myRoom.myDR._x, this.myRoom.myDR._y, this._x, this._y) >= this.myRoom.rightAngle)) break; this._x -= this.myAccel; this.mySpeedRight = 0; if (this.intendedTarget == this.targetPickup && this.intendedTarget != undefined && this.targetLock) { this.initiatePickup(); } if (this.intendedX != undefined) { this.intendedX = this._x; } } for (;;) { if (!(SwainMath.calculate_rotation(this.myRoom.myUL._x, this.myRoom.myUL._y, this._x, this._y) < this.myRoom.upAngle && SwainMath.calculate_rotation(this.myRoom.myUL._x, this.myRoom.myUL._y, this._x, this._y) > 0)) break; this._y += this.myAccel; this.mySpeedDown = 0; if (this.intendedTarget == this.targetPickup && this.intendedTarget != undefined && this.targetLock) { this.initiatePickup(); } if (this.intendedY != undefined) { this.intendedY = this._y; } } while (SwainMath.calculate_rotation(this.myRoom.myDL._x, this.myRoom.myDL._y, this._x, this._y) > this.myRoom.downAngle) { this._y -= this.myAccel; this.mySpeedDown = 0; if (this.intendedTarget == this.targetPickup && this.intendedTarget != undefined && this.targetLock) { this.initiatePickup(); } if (this.intendedY != undefined) { this.intendedY = this._y; } } if (this.mySpeedDown == 0 && this.mySpeedRight == 0 && !this.doorLock) { this.pathFind = false; this.ignoreRooms = false; if (!this.targetLock) { this.intendedX = undefined; this.intendedY = undefined; } } } this.myLastRoom = this.myRoom; if (this.mySpeedRight != 0 || this.mySpeedDown != 0) { this.myRoom = this._parent.determineRoom(this._x, this._y); } if (this.myRoom == undefined) { this.myRoom = this.myLastRoom; } this._xscale = MadnessCharacter.setPerspectiveScale(this._x, this._y, this.myRoom); this._xscale *= this.myDataRef.myScale; this._yscale = this._xscale; if (this.targetLock || this.pathFind) { if (this.interactType == 'execute') { this.intendedX = this.interactTarget._x; this.intendedY = this.interactTarget._y; this.intendedRoom = this._parent.determineRoom(this.intendedX, this.intendedY); } if (this.interactType == 'cover' && this.intendedTarget.inUse != undefined) { this.targetLock = false; this.pathFind = false; } if (this._x < this.intendedX + this.mySpeed * this.doorLockBoost + 1 && this._x > this.intendedX - this.mySpeed * this.doorLockBoost - 1 && this._y < this.intendedY + this.mySpeed * this.stairsAdjustMove * this.doorLockBoost + 1 && this._y > this.intendedY - this.mySpeed * this.stairsAdjustMove * this.doorLockBoost - 1) { if (this.doorLock) { if (this.myRoster == MadnessRoster.playerRoster) { this._parent.endTimer = 1; } this.intendedTarget.addCharacter(this.myDataRef, 'exit'); if (this.myRoster.rosterName.substr(0, 9) == 'npcRoster') { this.myRoster.removeCharacter(this.myDataRef); } this.removeMe(); } else { if (this.interactType == 'pickup') { this.initiatePickup(); } if (this.interactType == 'execute') { this.interactTarget.myStatus = 'axed'; this.interactTarget.gotoAndStop('axed'); this.interactTarget.wounded = 0; this.interactTarget._visible = false; this.myStatus = 'execute'; this.interactTarget.killMe(); if (this.interactTarget.myFacing == 'right') { this.myFacing = 'left'; } else { this.myFacing = 'right'; } this.mySpeedRight = 0; this.mySpeedDown = 0; this._x = this.intendedX; this._y = this.intendedY; } if (this.interactType == 'cover') { this.targetObstacle = this.findClosestObstacle(); this.takeCover(this.targetObstacle); } if (this.interactType == 'bodyshield') { } if (this.interactType == 'activator') { this.mySpeedRight = 0; this.mySpeedDown = 0; this.myStatus = 'use'; this.myFacing = 'right'; } this.interactType = ''; } if (this.targetLock) { this._x = this.intendedX; this._y = this.intendedY; this.mySpeedDown = 0; this.mySpeedRight = 0; } this.targetLock = false; this.pathFind = false; this.bossEvents('go_to'); } } if (this.myDataRef.amZombie) { if (PulseTimer.getActive(this.myPulseNumber, 1) && this.myMission == 'engage') { var v3 = 1; v2 = 0; while (v2 < this.myRoster.myActiveMembers.length) { if (this.myRoster.myActiveMembers[v2] != this.myDataRef && this.myRoster.myActiveMembers[v2].mySprite.myMission == 'engage') { if (this.myRoster.myActiveMembers[v2].mySpeedBoost > v3) { this.myDataRef.mySpeedBoost = this.myRoster.myActiveMembers[v2].mySpeedBoost; } v3 += 0.2; } ++v2; } if (v3 > 3) { v3 = 2.5; } if (this.myDataRef.mySpeedBoost < v3) { this.myDataRef.mySpeedBoost = v3; } if (this.enemyInFront(this.myAttackTarget)) { if (this.myDataRef.autoDash && this.myStatus == 'run' || this.myDataRef.mySpeedBoost > 1.4 && this.myStatus == 'run' && (this.myAttackTarget._x < this._x - 100 || this.myAttackTarget._x > this._x + 100)) { this.myStatus = 'dash'; } } } } if (this.myDataRef.amAbom) { if (this.myStatus == 'run' && this.myMission == 'engage') { if (this.enemyInFront(this.myAttackTarget)) { if (this._x < this.myAttackTarget._x - 100 * this.myDataRef.myScale || this._x > this.myAttackTarget._x + 100 * this.myDataRef.myScale) { this.myStatus = 'dash'; } } } } if (this.myStatus != 'grapple' && this.myStatus != 'knockback' && this.mySubStatus.substr(0, 8) != '_wounded' && this.myStatus !== 'backtrack' && this.myStatus != 'cover' && this.myStatus.substr(0, 5) != 'dying' && this.myStatus.substr(0, 4) != 'dead' && this.myStatus.substr(0, 5) != 'dodge' && this.myStatus.substr(0, 5) != 'melee' && this.myStatus.substr(0, 7) != 'unarmed' && this.myStatus.substr(0, 4) != 'stun' && this.wounded == 0 && this.myStatus != 'magic') { if (this.mySpeedRight < 0) { this.myFacing = 'left'; } else { if (this.mySpeedRight > 0) { this.myFacing = 'right'; } } } if (this.myFacing == 'left') { this._xscale *= -1; this.myTacBar._xscale = -100; } else { this.myTacBar._xscale = 100; } if (!this.myDataRef.amSlow) { if (this._xscale < 0 && !this.facingOpposite || this._xscale > 0 && this.facingOpposite) { this._rotation = this.recoilTimer / 2; } else { this._rotation = -this.recoilTimer / 2; } } this.facingOpposite = false; if (!this.myDataRef.amZombie && !this.myDataRef.amAbom) { if (this.myStatus == 'cover' || this.myStatus == 'block' || this.myStatus == 'run' || this.myStatus == 'idle' || this.myStatus == 'tactics') { if (this.mySubStatus.substr(0, 8) != '_wounded') { if (this.returnInvertValid()) { this.facingOpposite = true; this.gotoAndStop(this.myStatus + '_turn'); } else { this.gotoAndStop(this.myStatus); } } } if (this.myStatus == 'dash') { if (this.mySpeedRight > 0 && this.mySpeedRight > this.mySpeed || this.mySpeedRight < 0 && this.mySpeedRight < -this.mySpeed) { if (this.returnInvertValid()) { this.facingOpposite = true; this.gotoAndStop('dash_turn'); } else { this.gotoAndStop('dash'); } } else { if (this.returnInvertValid()) { this.facingOpposite = true; this.gotoAndStop('run_turn'); } else { this.gotoAndStop('run'); } } } } else { if (this.myStatus == 'idle') { if (this.myDataRef.myWeapons[this.myWeapon] == undefined) { this.gotoAndStop(this.myStatus + '_zombie_' + this.mySubIdle); } else { if (this.myDataRef.myWeapons[this.myWeapon].melee) { this.gotoAndStop(this.myStatus + '_zombie_melee1'); } else { this.gotoAndStop(this.myStatus + '_zombie_gun1'); } } } if (this.myStatus == 'run') { if (this.myDataRef.myWeapons[this.myWeapon] == undefined) { this.gotoAndStop(this.myStatus + '_zombie_' + this.mySubWalk); } else { if (this.myDataRef.myWeapons[this.myWeapon].melee) { this.gotoAndStop(this.myStatus + '_zombie_melee1'); } else { this.gotoAndStop(this.myStatus + '_zombie_gun1'); } } } if (this.myStatus == 'dash') { this.gotoAndStop(this.myStatus + '_zombie_1'); } } if (this.myStatus == 'dead') { this.gotoAndStop('dead' + this.mySubStatus); } if (this.myStatus.substr(0, 7) == 'wounded') { if (this.wounded == 1) { this.gotoAndStop('wounded_fall'); } else { if (this.wounded == 2) { if (this.mySpeedRight != 0) { this.gotoAndStop('wounded_move'); } else { this.gotoAndStop('wounded_idle'); } } } } if (this.myStatus.substr(0, 5) == 'melee') { this.gotoAndStop(this.myStatus); } if (this.myStatus.substr(0, 7) == 'unarmed') { this.gotoAndStop(this.myStatus); } if (this.myStatus.substr(0, 7) == 'execute') { this.gotoAndStop(this.myStatus); } if (this.myStatus.substr(0, 4) == 'axed') { this.gotoAndStop(this.myStatus); } if (this.myStatus.substr(0, 4) == 'stun') { this.gotoAndStop(this.myStatus); } if (this.myStatus == 'recover') { this.gotoAndStop(this.myStatus); } if (this.myStatus == 'startup') { this.gotoAndStop(this.mySubStatus); } if (this.myStatus == 'surrender') { this.gotoAndStop(this.myStatus + this.mySubStatus); } if (this.myStatus == 'dodge') { this.gotoAndStop(this.myStatus + this.mySubStatus); } if (this.myStatus == 'use') { this.gotoAndStop(this.targetActivator.myAnimation); } if (this.myStatus == 'swap') { this.gotoAndStop('swap'); } if (this.myStatus == 'backtrack') { this.gotoAndStop('backtrack'); } if (this.myStatus == 'incap') { this.gotoAndStop(this.myStatus + this.mySubStatus); } if (this.myStatus == 'knockback') { this.gotoAndStop(this.myStatus + this.mySubStatus); } if (this.myStatus == 'pickup') { this.gotoAndStop('pickup'); } if (this.myStatus == 'magic') { this.gotoAndStop('magic' + this.mySubStatus); } if (this.myStatus == 'run' || this.myStatus == 'idle' || this.myStatus == 'backtrack') { if (this.mySubStatus.substr(0, 8) == '_wounded') { this.facingOpposite = false; this.gotoAndStop(this.myStatus + this.mySubStatus); } } if (this.myStatus == 'restrained') { this.gotoAndStop(this.myStatus + this.mySubStatus); } if (this.myStatus == 'grapple') { this.gotoAndStop(this.myStatus + this.mySubStatus); } if ((this.myStatus == 'use' || this.myStatus == 'recover' || this.myStatus == 'tactics' || this.myStatus.substr(0, 7) == 'execute' || this.myStatus.substr(0, 5) == 'melee' || this.myStatus.substr(0, 7) == 'unarmed' || this.myStatus.substr(0, 7) == 'deflect' || this.myStatus.substr(0, 4) == 'stun' || this.myStatus == 'swap' || this.myStatus == 'pickup' || this.myStatus == 'magic' || this.myStatus == 'knockback' || this.myStatus == 'startup') && this.mySprite._currentframe >= this.mySprite._totalframes - 1) { if (this.myStatus.substr(0, 7) == 'execute') { this.clearLockedAction('execute'); } this.myStatus = 'idle'; this.gotoAndStop('idle'); } MadnessCharacter.adjustSprite(this); ++this.aimFlashTimer; if (this.aimFlashTimer <= 5) { var v5 = this.aimFlashTimer; if (v5 <= -10) { v5 += 15; } else { if (v5 <= -5) { v5 += 10; } else { if (v5 <= 0) { v5 += 5; } } } this.myColorTransform = {'rb': 290 - v5 * 40, 'gb': 0, 'bb': 0}; this.myColor.setTransform(this.myColorTransform); } if (this.aimFlashTimer < 6 && this.myStatus != 'idle' && this.myStatus != 'run' && this.myStatus != 'backtrack' && this.myStatus != 'tactics' && this.myStatus != 'dash' && this.myStatus != 'restrained' && this.myStatus != 'grapple' && this.myStatus != 'knockback') { this.aimFlashTimer = 6; } if (this.aimFlashTimer == 6) { this.myColorTransform = {'rb': 0, 'gb': 0, 'bb': 0}; this.myColor.setTransform(this.myColorTransform); } if (this.magicFlashTimer > 0) { --this.magicFlashTimer; this.myColorTransform = {'rb': -(this.magicFlashTimer * 10), 'gb': -(this.magicFlashTimer * 10), 'bb': -(this.magicFlashTimer * 10)}; this.myColor.setTransform(this.myColorTransform); } if (this.resurrectFlashTimer > 0) { --this.resurrectFlashTimer; this.myColorTransform = {'rb': this.resurrectFlashTimer * this.resurrectFlashColor[0], 'gb': this.resurrectFlashTimer * this.resurrectFlashColor[1], 'bb': this.resurrectFlashTimer * this.resurrectFlashColor[2]}; this.myColor.setTransform(this.myColorTransform); if (this.resurrectFlashTimer > 15 && SwainMath.randomNumber(0, 1) == 0 && this.myDataRef.headGearResurrect) { var v4 = 0; while (v4 == 0) { v4 = SwainMath.randomNumber(-1, 1); } var v6 = new Object(); v6.x = this.mySprite.myHead._x; v6.y = this.mySprite.myHead._y + 26; this.mySprite.localToGlobal(v6); this._parent.globalToLocal(v6); this._parent.createParticle('spark' + SwainMath.randomNumber(1, 2), 'sparks', v6.x, v6.y, (SwainMath.randomNumber(10, 50) / 10) * v4, SwainMath.randomNumber(-240, -150) / 10, SwainMath.randomNumber(-180, 180), SwainMath.randomNumber(-900, 900) / 10, 0.9, this._y + SwainMath.randomNumber(-5, 5), 100, 100, false, 90); } } if (this.rofTimer == 1 && !this.myDataRef.myWeapons[this.myWeapon].melee && !this.whipRange) { v2 = 0; while (v2 < this.myBlasts.length) { this._parent.makeBullet(this, this.myBlasts[v2].myRot, this.myBlasts[v2].myLength, this.myBlasts[v2].myX, this.myBlasts[v2].myY, null, null, this.myDataRef.myWeapons[this.myWeapon].myTracer); ++v2; } } if (this.amPlayer && !this.thrownHook && this.myDataRef.myWeapons[this.myWeapon] == undefined && (this.myStatus == 'idle' || this.myStatus == 'run' || this.myStatus == 'backtrack') && PulseTimer.getActive(this.myPulseNumber, 10) && !this.targetLock) { this.targetPickup = this.findClosestPickup(true); } else { if (this.amPlayer && this.myStatus != 'idle' && this.myStatus != 'run' && this.myStatus != 'backtrack' && this.myStatus != 'pickup' && this.myStatus != 'dash') { this.targetPickup = undefined; } } if (this.mySpeedDown != 0) { MadnessCharacter.setMyDepth(this, this._yscale); } if (this.myDataRef.amInvincible) { this.myHealth = this.myDataRef.myHealthMax; } this.applyDeath(); if (this.myStatus == 'dead') { if (this.mySprite._currentframe == this.mySprite._totalframes) { this.mySprite.onEnterFrame = null; this.killMe(); if (this.amPlayer) { this._parent.playerDies(); if (!MadnessLevel.levelFailed && MadnessGameSelect.gameMode == 'story') { trace(' **** DEAD **** ' + this.mySprite._currentframe + ' is my character\'s sprite frame'); this.invincibleTimer = 60; this.headDamage = 0; this.bodyDamage = 0; if (this.headSpray > 3) { this.headSpray = 3; } if (this.bodySpray > 3) { this.bodySpray = 3; } this.myHealth = this.myHealthMax; this.amBleeding = false; this.myStatus = 'recover'; this.gotoAndStop(this.myStatus); this.deadMan = false; this.myWidth = this.myDataRef.myWidth; this.noDamage = false; } } else { if (!this.myDataRef.noPaint) { this.paintMe(); } else { this.mySprite.stop(); this.myDataRef.lastStatus = this.myStatus; this.myDataRef.lastSubStatus = this.mySubStatus; this.myDataRef.lastFacing = this.myFacing; this.cacheAsBitmap = true; return true; } } } } this.myDataRef.myHealth = this.myHealth; this.myDataRef.myTactics = this.myTactics; this.myDataRef.loggedX = this._x; this.myDataRef.loggedY = this._y; if ((this.headDamage >= 3 && this.myHealth <= 0 || this.amBleeding) && this.mySubStatus != '_magic1') { v6 = new Object(); v6.x = this.mySprite.myHead._x; v6.y = this.mySprite.myHead._y + 26; this.mySprite.localToGlobal(v6); this._parent.globalToLocal(v6); this.makeSparks(v6.x, v6.y, this._y, 'drops_' + this.myDataRef.myBlood); } this.totalFrameDamage = 0; this.myStatusTEXT.text = this.myStatus; this.myMissionTEXT.text = this.myMission; this.targetLockTEXT.text = this.targetLock; this.pathFindTEXT.text = this.pathFind; this.nameTEXT.text = this._name; }; v2.breakdownAutoMove = function () { if (this.amPlayer && !MadnessLevel.levelVictory && !this.targetLock && this.toggleGuard && !this.thrownHook && !this.blocking && (this.myStatus == 'run' || this.myStatus == 'idle' || this.myStatus == 'dash' || this.myStatus == 'backtrack')) { var v5 = false; if (!v5 && !this.amPressingMove()) { var v4 = 0; while (v4 < MadnessActivator.allActivators.length) { this.targetActivator = MadnessActivator.allActivators[v4]; if (!this.targetActivator.activated) { if (this._x < this.targetActivator._x + 80 && this._x > this.targetActivator._x - 80 && this._y < this.targetActivator._y + 50 && this._y > this.targetActivator._y - 50) { this.attractToMC(this.targetActivator, 'activator'); _root.myGameSpeed = 1; this.slowMoActive = false; this.toggleGuard = false; v5 = true; break; } } ++v4; } } if (!v5 && !MadnessActivator.bombActive) { v4 = 0; while (v4 < MadnessDoors.allDoors.length) { this.targetDoor = MadnessDoors.allDoors[v4]; if (!this.targetDoor.amLocked) { if ((this.targetDoor.myDataRef.myConnection != undefined || this.targetDoor.myDataRef.myObjective != undefined) && this.lifeSpan > 12 && this.targetDoor.mySprites.length == 0 && !this._parent.roomLock) { if (this._x < this.targetDoor._x + 90 && this._x > this.targetDoor._x - 90 && this._y < this.targetDoor._y + 50 && this._y > this.targetDoor._y - 50) { this._parent.exitDoor = this.targetDoor; _root.myGameSpeed = 1; this.slowMoActive = false; this._parent.playerAim._visible = false; this.toggleGuard = false; var v3 = 0; while (v3 < this.myRoster.myActiveMembers.length) { if (this.myRoster.myActiveMembers[v3].mySprite != undefined) { this.myRoster.myActiveMembers[v3].mySprite.attractToDoor(this.targetDoor); } ++v3; } v5 = true; break; } } } ++v4; } } } if (this.targetLock || this.pathFind) { this.targetApproach = false; if (this.ignoreRooms || this.myRoom == this.intendedRoom || this._x > this.intendedX - 80 && this._x < this.intendedX + 80 && (this._y > this.intendedY - 80 && this._y < this.intendedY + 80)) { this.autoX = this.intendedX; this.autoY = this.intendedY; } else { if (this.intendedRoom.roomNumber > this.myRoom.roomNumber) { this.autoX = (this.myRoom.myUR._x + this.myRoom.myDR._x) / 2 + 20; this.autoY = (this.myRoom.myUR._y + this.myRoom.myDR._y) / 2; } else { this.autoX = (this.myRoom.myUL._x + this.myRoom.myDL._x) / 2 - 20; this.autoY = (this.myRoom.myUL._y + this.myRoom.myDL._y) / 2; } } this.moveUp = false; this.moveDown = false; this.moveRight = false; this.moveLeft = false; if (this._x < this.autoX - this.mySpeed * this.doorLockBoost) { this.moveRight = true; } else { if (this._x > this.autoX + this.mySpeed * this.doorLockBoost) { this.moveLeft = true; } } if (this._y < this.autoY - this.mySpeed * this.stairsAdjustMove * this.doorLockBoost) { this.moveDown = true; } else { if (this._y > this.autoY + this.mySpeed * this.stairsAdjustMove * this.doorLockBoost) { this.moveUp = true; } } if (!this.moveRight && !this.moveLeft && !this.moveUp && !this.moveDown && !this.doorLock) { this.pathFind = false; } } else { if (this.targetApproach) { if (this.intendedX - this._x > 5 || this.intendedX - this._x < -5) { this.mySpeedRight = (this.intendedX - this._x) / 6; } if (this.intendedY - this._y > 5 || this.intendedY - this._y < -5) { this.mySpeedDown = (this.intendedY - this._y) / 6; } if (this.intendedX - this._x < 5 && this.intendedX - this._x > -5 && this.intendedY - this._y < 5 && this.intendedY - this._y > -5) { this.targetApproach = false; } } } if (this.myStatus.substr(0, 5) != 'melee' && this.myStatus.substr(0, 7) != 'unarmed' && this.myStatus != 'cover') { this.targetApproach = false; } }; } else { goto 60610; } storedv2.breakdownStatusActions = function () { if (this.myStatus == 'idle' || this.myStatus == 'run' || this.myStatus == 'backtrack') { if ((this.amPlayer || this.myMission == 'engage' || this.myDataRef.myStartup == 'startup_bottle') && this.myDataRef.myStartup != undefined && !MadnessTransition.transitionLock) { this.myStatus = 'startup'; this.mySubStatus = this.myDataRef.myStartup; this.myDataRef.myStartup = undefined; if (!this.amPlayer && this.myAttackTarget != undefined) { if (!this.myAttackTarget._x > this._x) { this.myFacing = 'right'; } else { this.myFacing = 'left'; } } } } if (this.toggleSlowmo && this.myDataRef.myMagic == undefined && this.myHealth > 0 && this.myDataRef.mySlowMo > 0 && (this.myStatus == 'idle' || this.myStatus == 'run' || this.myStatus == 'backtrack' || this.myStatus == 'block' || this.myStatus == 'dash' || this.myStatus.substr(0, 5) == 'melee' || this.myStatus.substr(0, 7) == 'unarmed') || this.toggleSlowmo && _root.myGameSpeed == 0) { if (this.slowmoTimer == 0) { this.slowmoTimer = 1; if (this.slowMoActive) { this.slowMoActive = false; } else { this.slowMoActive = true; } } } else { this.slowmoTimer = 0; } if (this.myDataRef == MadnessRoster.playerRoster.teamLeader && (this.myStatus.substr(0, 4) == 'stun' || this.myStatus == 'dead' || this.myStatus == 'knockback')) { this.slowMoActive = false; } if (this.myDataRef == MadnessRoster.playerRoster.teamLeader) { if (this.slowMoActive) { _root.myGameSpeed = 0; } else { _root.myGameSpeed = 1; } } if (this.myStatus == 'recover') { this.mySpeedDown = 0; this.mySpeedRight = 0; } else { this.invincibleTimer -= 1 + this.myGameSpeed; } if (this.myStatus == 'surrender') { if (this.myAttackTarget != undefined) { if (this.myAttackTarget._x > this._x) { this.myFacing = 'right'; } else { this.myFacing = 'left'; } } } if ((this.myStatus == 'block' || this.myStatus == 'idle' || this.myStatus == 'run' || this.myStatus == 'backtrack' || this.myStatus == 'dash') && this.rofTimer > 10) { if (this.togglePickup && !this.thrownHook && this.pickupTimer == 0) { if (this.myDataRef.myWeapons[this.myWeapon] == undefined) { if (this.targetPickup != undefined) { this.targetPickup = this.findClosestPickup(true); if (this.targetPickup != undefined) { this.attractToMC(this.targetPickup, 'pickup'); } } } else { if (this.myDataRef.myWeapons[this.myWeapon].amHeavy) { this.dropGun(); this.myStatus = 'stun1'; this.gotoAndStop(this.myStatus); } else { this.myStatus = 'melee_throw1'; this.rofTimer = 1; this.rofLastFrame = 1; if (this.myAimX < this._x) { this.myFacing = 'left'; } else { this.myFacing = 'right'; } } } } else { if (this.toggleGuard) { if (this.myDataRef.myWeapons[this.myWeapon].melee) { if (!this.blocking) { this.actionTimer = 1; } else { this.actionTimer += 1 + this.myGameSpeed; this.myStatus = 'block'; } this.blocking = true; } else { if (this.myDataRef.myWeapons[this.myWeapon] == undefined) { this.targetObstacle = undefined; } else { this.targetObstacle = this.findClosestObstacle(); } if (this.targetObstacle != undefined && this.amPlayer) { this.takeCover(this.targetObstacle); if (this.amPlayer) { KeyManager.lockKeys(); } } else { this.myTactics -= 6; this.tacTimer = 0; if (this.myTactics < 0) { this.myTactics = 0; } this.myStatus = 'dodge'; this.actionTimer = 0; this.actionSlowdown = false; this.mySubStatus = '_leap'; if (this.myAimX < this._x && this.myFacing == 'right' || this.myAimX > this._x && this.myFacing == 'left') { this.mySubStatus += 'Back'; } else { this.mySubStatus += 'Front'; } this.intendedX = this.myAimX; this.intendedY = this.myAimY; if (this.amPlayer) { this.intendedRot = SwainMath.calculate_rotation(this._x, this._y, this.intendedX, this.intendedY); } else { this.intendedRot = SwainMath.randomNumber(-180, 180); } this.amDodging = true; } } } else { this.blocking = false; if (this.myStatus == 'block') { this.myStatus = 'idle'; } if (this.toggleAction && !this.thrownHook && (this.myWeapon == 1 || MadnessDataFile.havePerk('perkSidearm1', this.myDataRef) || this.myDataRef.myWeapons[1] != undefined) && (this.myDataRef.myWeapons[0] != undefined || this.myDataRef.myWeapons[1] != undefined)) { this.myStatus = 'swap'; this.actionTimer = 0; if (this.amPlayer) { if (this.myDataRef.myWeapons[1 - this.myWeapon].melee) { this.playSound('swapmelee'); } else { if (this.myDataRef.myWeapons[1 - this.myWeapon] != undefined) { this.playSound('swapgun'); } } } } } } if (this.togglePickup) { ++this.pickupTimer; } else { this.pickupTimer = 0; } } else { this.blocking = false; if (this.myStatus == 'block') { this.myStatus = 'idle'; } } if (this.myStatus == 'cover') { if (this.targetObstacle._x > this._x) { this.myFacing = 'right'; } else { this.myFacing = 'left'; } if (this.amPlayer && (this.moveUp || this.moveDown || this.moveRight || this.moveLeft) || this.toggleGuard) { if (this.toggleGuard && this.amPlayer) { KeyManager.lockKeys(); } this.myStatus = 'idle'; this.targetObstacle.inUse = undefined; this.targetObstacle = undefined; } } else { this.targetObstacle = undefined; } if (this.myStatus == 'dodge') { if (this.actionTimer == 0 && this.mySprite._currentframe < this.mySprite._totalframes) { this.mySpeedRight = SwainMath.get_position(this._x, this._y, this.intendedRot, this.mySpeed * 1.2, 'x') - this._x; if (this.mySpeedRight > 0 && this.mySpeedRight < 6) { this.mySpeedRight = 5.5; } if (this.mySpeedRight < 0 && this.mySpeedRight > -6) { this.mySpeedRight = -5.5; } this.mySpeedDown = SwainMath.get_position(this._x, this._y, this.intendedRot, this.mySpeed * 1.2 * 0.5, 'y') - this._y; } else { if (this.mySubStatus.substr(0, 5) == '_leap') { if (this.myDataRef.myDodge != undefined) { this.mySubStatus = '_' + this.myDataRef.myDodge; } else { if (this.myDataRef.myWeapons[this.myWeapon].amHeavy) { this.mySubStatus = '_clumsy'; } else { if (MadnessDataFile.havePerk('perkDodge3', this.myDataRef)) { this.mySubStatus = '_flip'; } else { if (MadnessDataFile.havePerk('perkDodge2', this.myDataRef)) { this.mySubStatus = '_max'; } else { this.mySubStatus = '_clumsy'; } } } } if (this.mySpeedRight < 0 && this.myFacing == 'right' || this.mySpeedRight > 0 && this.myFacing == 'left') { this.mySubStatus += 'Back'; } else { this.mySubStatus += 'Front'; } } this.actionTimer = 1; if (this.actionSlowdown) { this.mySpeedDown *= 0.89; if (this.mySpeedDown < 1 && this.mySpeedDown > -1) { this.mySpeedDown = 0; } this.mySpeedRight *= 0.89; if (this.mySpeedRight < 1 && this.mySpeedRight > -1) { this.mySpeedRight = 0; } } if (this.actionSlowdown && this.mySprite._currentframe == this.mySprite._totalframes) { this.myStatus = 'idle'; this.mySubStatus = ''; } } } else { this.amDodging = false; } if (this.myStatus == 'swap' || this.myStatus == 'surrender' || this.myStatus == 'startup' || this.myStatus == 'pickup' || this.myStatus == 'magic') { if (this.mySpeedDown > 0) { this.mySpeedDown -= this.myAccel * this.slowmoSpeedMod; if (this.mySpeedDown < 0) { this.mySpeedDown = 0; } } if (this.mySpeedDown < 0) { this.mySpeedDown += this.myAccel * this.slowmoSpeedMod; if (this.mySpeedDown > 0) { this.mySpeedDown = 0; } } if (this.mySpeedRight > 0) { this.mySpeedRight -= this.myAccel * this.slowmoSpeedMod; if (this.mySpeedRight < 0) { this.mySpeedRight = 0; } } if (this.mySpeedRight < 0) { this.mySpeedRight += this.myAccel * this.slowmoSpeedMod; if (this.mySpeedRight > 0) { this.mySpeedRight = 0; } } } if (this.myStatus == 'action') { this.actionTimer += 1 + this.myGameSpeed; this.mySpeedDown = 0; this.mySpeedRight = 0; if (this.mySprite._currentframe == this.mySprite._totalframes || this.actionTimer > 10 && (this.moveRight || this.moveDown)) { this.myStatus = 'idle'; } } if (this.myStatus.substr(0, 7) == 'wounded' && this.wounded == 2) { this.mySpeedRight = 0; this.mySpeedDown = 0; if (this.moveRight) { this.mySpeedRight = 1; } if (this.moveLeft) { this.mySpeedRight = -1; } if (this.moveDown) { this.mySpeedDown = 0.3; } if (this.moveUp) { this.mySpeedDown = -0.3; } } if (this.myStatus.substr(0, 4) == 'axed') { this.mySpeedRight = 0; this.mySpeedDown = 0; } if (this.myStatus == 'dead') { if (this.mySubStatus.substr(0, 7) == '_stairs') { if (this.myRoom.amStairs) { if (this.mySpeedDown < 0) { this.mySpeedDown = 0; } if (this.myRoom.downAngle < 90) { if (this.mySpeedRight > 0) { this.mySpeedRight = 0; } if (this.mySpeedRight > -7) { this.mySpeedRight -= 0.5 * this.slowmoSpeedMod; } if (this.mySpeedDown < 7) { this.mySpeedDown += 0.5 * this.slowmoSpeedMod; } } else { if (this.mySpeedRight < 0) { this.mySpeedRight = 0; } if (this.mySpeedRight < 7) { this.mySpeedRight += 0.5 * this.slowmoSpeedMod; } if (this.mySpeedDown < 7) { this.mySpeedDown += 0.5 * this.slowmoSpeedMod; } } this.lastStairsAngle = this.myRoom.downAngle; } else { this.mySpeedDown = 0; if (this.myFacing == 'right' && this.lastStairsAngle < 90 || this.myFacing == 'left' && this.lastStairsAngle >= 90) { this.mySubStatus = '_landed3'; } else { this.mySubStatus = '_landed' + SwainMath.randomNumber(1, 2); } this.applyDeath(); } } else { if (this.mySubStatus.substr(0, 8) == '_stagger') { this.actionSlowdown = true; } if (this.mySpeedDown > 0) { this.mySpeedDown -= 0.65 * this.slowmoSpeedMod; if (this.mySpeedDown < 0) { this.mySpeedDown = 0; } } if (this.mySpeedDown < 0) { this.mySpeedDown += 0.65 * this.slowmoSpeedMod; if (this.mySpeedDown > 0) { this.mySpeedDown = 0; } } if (this.actionSlowdown) { if (this.mySpeedRight > 0) { this.mySpeedRight -= 0.65 * this.slowmoSpeedMod; if (this.mySpeedRight < 0) { this.mySpeedRight = 0; } } if (this.mySpeedRight < 0) { this.mySpeedRight += 0.65 * this.slowmoSpeedMod; if (this.mySpeedRight > 0) { this.mySpeedRight = 0; } } } } } if (this.myStatus == 'incap') { } if (this.myStatus.substr(0, 7) == 'execute') { this.mySpeedRight = 0; this.mySpeedDown = 0; } if (this.myStatus == 'knockback') { if (this.actionSlowdown) { this.mySpeedRight *= 0.92; if (this.mySpeedRight < 1 && this.mySpeedRight > -1) { this.mySpeedRight = 0; } } this.mySpeedDown = 0; } if (this.myStatus.substr(0, 5) == 'melee' || this.myStatus.substr(0, 4) == 'stun' || this.myStatus == 'block' || this.myStatus.substr(0, 7) == 'unarmed' || this.myStatus == 'cover') { if (this.mySpeedDown > 0) { this.mySpeedDown -= this.myAccel * this.slowmoSpeedMod / 4; if (this.mySpeedDown < 0) { this.mySpeedDown = 0; } } if (this.mySpeedDown < 0) { this.mySpeedDown += this.myAccel * this.slowmoSpeedMod / 4; if (this.mySpeedDown > 0) { this.mySpeedDown = 0; } } if (this.mySpeedRight > 0) { this.mySpeedRight -= this.myAccel * this.slowmoSpeedMod / 4; if (this.mySpeedRight < 0) { this.mySpeedRight = 0; } } if (this.mySpeedRight < 0) { this.mySpeedRight += this.myAccel * this.slowmoSpeedMod / 4; if (this.mySpeedRight > 0) { this.mySpeedRight = 0; } } if (this.myStatus == 'block' && (this.moveRight || this.moveLeft || this.moveUp || this.moveDown)) { this.myStatus = 'idle'; } } if (this.meleeHealthTimer > 0) { this.meleeHealthTimer -= 1 + _root.myGameSpeed; if (this.meleeHealthTimer <= 0) { this.meleeHealthTimer = 0; this.meleeHealth = this.myDataRef.meleeHealth; } } if (this.myStatus == 'idle' || this.myStatus == 'run' || this.myStatus == 'backtrack' || this.myStatus == 'tactics') { if (this.mySubStatus.substr(0, 8) != '_wounded') { this.mySubStatus = ''; } this.stairsAdjustMove = 0.65; if (this.myRoom.amStairs && (this.moveRight || this.moveLeft)) { this.stairsAdjustMove = SwainMath.getRotDistance(90, this.myRoom.downAngle) / 50; } if (this.moveDown) { this.mySpeedDown += this.myAccel * this.stairsAdjustMove * this.slowmoSpeedMod; } else { if (this.moveUp) { this.mySpeedDown -= this.myAccel * this.stairsAdjustMove * this.slowmoSpeedMod; } else { if (this.myStatus != 'tactics') { if (this.mySpeedDown > 0) { this.mySpeedDown -= this.myAccel * this.slowmoSpeedMod; if (this.mySpeedDown < 0) { this.mySpeedDown = 0; } } if (this.mySpeedDown < 0) { this.mySpeedDown += this.myAccel * this.slowmoSpeedMod; if (this.mySpeedDown > 0) { this.mySpeedDown = 0; } } } } } if (this.myStatus != 'tactics') { if (this.mySpeedDown > this.mySpeed * this.stairsAdjustMove) { this.mySpeedDown = this.mySpeed * this.stairsAdjustMove; } if (this.mySpeedDown < -this.mySpeed * this.stairsAdjustMove) { this.mySpeedDown = -this.mySpeed * this.stairsAdjustMove; } } if (this.moveRight) { this.mySpeedRight += this.myAccel * this.slowmoSpeedMod; } else { if (this.moveLeft) { this.mySpeedRight -= this.myAccel * this.slowmoSpeedMod; } else { if (this.mySpeedRight > 0) { this.mySpeedRight -= this.myAccel * this.slowmoSpeedMod; if (this.mySpeedRight < 0) { this.mySpeedRight = 0; } } if (this.mySpeedRight < 0) { this.mySpeedRight += this.myAccel * this.slowmoSpeedMod; if (this.mySpeedRight > 0) { this.mySpeedRight = 0; } } } } if (this.mySpeedRight > this.mySpeed) { this.mySpeedRight = this.mySpeed; } if (this.mySpeedRight < -this.mySpeed) { this.mySpeedRight = -this.mySpeed; } if (this.myStatus != 'backtrack') { this.backtrackTimer = 0; } if (this.mySpeedRight == 0 && this.mySpeedDown == 0) { this.backtrackTimer = 0; if (this.myStatus != 'tactics') { this.myStatus = 'idle'; } } else { if (this.myStatus != 'tactics') { if (!this.myDataRef.amZombie && !this.myDataRef.amAbom && (this.backtrackTimer < 10 || SwainMath.randomNumber(0, 4 * (2 - this.myGameSpeed)) != 0) && (this.mySpeedRight > 0 && this.myFacing == 'left' && this.myAimX < this._x || this.mySpeedRight < 0 && this.myFacing == 'right' && this.myAimX > this._x)) { this.myStatus = 'backtrack'; if (this.reloadTimer == -1) { this.backtrackTimer += 1 + this.myGameSpeed; } } else { this.myStatus = 'run'; } } } } if (this.myStatus == 'idle' || this.myStatus == 'backtrack' || this.myStatus == 'run' || this.myStatus.substr(0, 7) == 'unarmed' || this.myStatus.substr(0, 5) == 'melee') { if (this.dashTimer > 0) { ++this.dashTimer; } if (this.dashTimer > this.dashTimeEnable * 100) { if ((this.moveRight || this.moveLeft) && this.dashTimer <= this.dashTimeEnable * 101) { } } if (!this.moveRight && !this.moveLeft && this.dashTimer == -1) { this.dashTimer = 0; } if ((this.moveRight || this.moveLeft) && this.dashTimer == 0) { this.dashTimer = 1; } if (this.dashTimer > 0 && this.dashTimer < this.dashTimeEnable * 50 && !this.moveRight && !this.moveLeft) { this.dashTimer = this.dashTimeEnable * 50; } if (this.dashTimer > this.dashTimeEnable * 50 && this.dashTimer < this.dashTimeEnable * 51 && (this.moveRight || this.moveLeft) && this.myRoster == MadnessRoster.playerRoster) { this.myStatus = 'dash'; } if (this.dashTimer > this.dashTimeEnable && this.dashTimer < this.dashTimeEnable * 50 || this.dashTimer > this.dashTimeEnable * 51 && this.dashTimer < this.dashTimeEnable * 100 || this.dashTimer > this.dashTimeEnable * 101) { this.dashTimer = -1; } } if (this.myStatus == 'dash') { this.dashTimer = -1; this.stairsAdjustMove = 0.25; if (this.myRoom.amStairs && (this.moveRight || this.moveLeft)) { this.stairsAdjustMove = SwainMath.getRotDistance(90, this.myRoom.downAngle) / 35; } if (this.moveDown) { this.mySpeedDown += this.myAccel * this.stairsAdjustMove * this.slowmoSpeedMod; } else { if (this.moveUp) { this.mySpeedDown -= this.myAccel * this.stairsAdjustMove * this.slowmoSpeedMod; } else { if (this.mySpeedDown > 0) { this.mySpeedDown -= this.myAccel * this.slowmoSpeedMod; if (this.mySpeedDown < 0) { this.mySpeedDown = 0; } } if (this.mySpeedDown < 0) { this.mySpeedDown += this.myAccel * this.slowmoSpeedMod; if (this.mySpeedDown > 0) { this.mySpeedDown = 0; } } } } if (this.mySpeedDown > this.mySpeed * this.stairsAdjustMove) { this.mySpeedDown = this.mySpeed * this.stairsAdjustMove; } if (this.mySpeedDown < -this.mySpeed * this.stairsAdjustMove) { this.mySpeedDown = -this.mySpeed * this.stairsAdjustMove; } if (this.moveLeft) { this.mySpeedRight -= this.myAccel * this.slowmoSpeedMod; } else { if (this.moveRight) { this.mySpeedRight += this.myAccel * this.slowmoSpeedMod; } else { this.myStatus = 'idle'; } } if (this.mySpeedRight > this.mySpeed * this.myDash) { this.mySpeedRight = this.mySpeed * this.myDash; } if (this.mySpeedRight < -this.mySpeed * this.myDash) { this.mySpeedRight = -this.mySpeed * this.myDash; } if (this.myDataRef.amZombie && this.myDataRef.myWeapons[this.myWeapon] != undefined) { this.dropGun(); MadnessCharacter.adjustSprite(this); } } if (this.myStatus == 'restrained') { if (this.moveDown || this.moveRight || this.moveLeft || this.moveUp || this.toggleAction || this.toggleGuard || this.mouseClick || this.togglePickup || this.toggleSlowmo) { if (this.amPlayer) { KeyManager.lockKeys(); } this.grappleTimer -= 10; if (this.myDataRef.grabBreaker) { this.grappleTimer -= 15; } } var v3 = 0; while (v3 < MadnessCharacter.allRosters.length) { if (MadnessCharacter.allRosters[v3].teamFaction != this.myRoster.teamFaction) { var v4 = 0; while (v4 < MadnessCharacter.allRosters[v3].myActiveMembers.length) { if (MadnessCharacter.allRosters[v3].myActiveMembers[v4].mySprite.myAttackTarget == this && MadnessCharacter.allRosters[v3].myActiveMembers[v4].mySprite.myStatus == 'grapple') { v3 = 9999; v4 = 9999; break; } if (v3 == MadnessCharacter.allRosters.length - 1 && v4 == MadnessCharacter.allRosters[v3].myActiveMembers.length - 1) { this.myStatus = 'idle'; } ++v4; } } ++v3; } if (this.grappleTimer <= 0) { this.myStatus = 'stun_parry' + SwainMath.randomNumber(1, 2); this.playSound('blunt'); } if (this.myMash._alpha < 100 && this.amPlayer) { this.myMash._alpha += 20; if (this.myMash._alpha > 0 && !this.myMash._visible) { this.myMash.gotoAndPlay(1); this.myMash._visible = true; } } this.mySpeedDown = 0; this.mySpeedRight = 0; } else { if (this.myMash._alpha > 0) { this.myMash._alpha -= 20; if (this.myMash._alpha <= 0) { this.myMash._alpha = 0; this.myMash.gotoAndStop(1); this.myMash._visible = false; } } } if (this.myStatus == 'grapple') { this.mySpeedRight = (this.intendedX - this._x) * 0.1; this.mySpeedDown = (this.intendedY - this._y) * 0.1; if (this.myAttackTarget._x > this._x) { this.myFacing = 'right'; } else { this.myFacing = 'left'; } if (this.myAttackTarget.myStatus != 'restrained') { if (this.myAttackTarget.myStatus == 'dead' || this.myAttackTarget == undefined) { this.myStatus = 'idle'; } else { if (this.targetEnemy.myStatus.substr(0, 10) == 'stun_parry' && this.targetEnemy.myDataRef.statSTR > this.myDataRef.statSTR + 5) { this.applyKnockback(this.targetEnemy, 3 + this.targetEnemy.myDataRef.statSTR / 8, false); } else { this.myStatus = 'stun' + SwainMath.randomNumber(1, 7); } } } else { this.myAttackTarget.grappleTimer += 0.5; if (this.myAttackTarget.grappleTimer > this.myAttackTarget.grappleTimerMax) { this.myAttackTarget.grappleTimer = this.myAttackTarget.grappleTimerMax; } } } if (this.reloadTimer > -1) { this.reloadTimer += 1 + this.myGameSpeed; if (this.myDataRef.myWeapons[this.myWeapon].myCat == 'pistol' || this.myDataRef.myWeapons[this.myWeapon].myCat == 'revolver') { if (MadnessDataFile.havePerk('perkPistolReload', this.myDataRef)) { ++this.reloadTimer; } } else { if (this.myDataRef.myWeapons[this.myWeapon].myCat == 'smg') { if (MadnessDataFile.havePerk('perkSMGReload', this.myDataRef)) { ++this.reloadTimer; } } } if (this.myDataRef.myWeapons[this.myWeapon].myCat == 'rifle') { if (MadnessDataFile.havePerk('perkRifleReload', this.myDataRef)) { ++this.reloadTimer; } } if (this.myDataRef.myWeapons[this.myWeapon].myCat == 'shotgun') { if (MadnessDataFile.havePerk('perkShotgunReload', this.myDataRef)) { ++this.reloadTimer; } } if (this.reloadTimer >= this.mySprite.handShoot_front.myGun._totalframes && this.reloadTimer >= this.mySprite.handShoot_back.myGun._totalframes) { this.reloadTimer = -1; if (this.myDataRef.myWeapons[this.myWeapon].singleBulletClip) { this.myDataRef.myWeapons[this.myWeapon].myAmmo += 1; this.myDataRef.myWeapons[this.myWeapon].myClips -= 1; if (!this.mouseHold && this.myDataRef.myWeapons[this.myWeapon].myAmmo < this.myDataRef.myWeapons[this.myWeapon].myAmmoMax && this.myDataRef.myWeapons[this.myWeapon].myClips > 0) { this.reloadTimer = 0; this.rofLastFrame = 1; } } else { if (this.myDataRef.myWeapons[this.myWeapon].myAmmo < this.myDataRef.myWeapons[this.myWeapon].myAmmoMax) { trace('WARNING! Reload on gun ' + this.myDataRef.myWeapons[this.myWeapon].myType + ' failed, backup initiated (DISABLED)'); } } } if (this.myStatus != 'incap' && this.myStatus != 'idle' && this.myStatus != 'run' && this.myStatus != 'backtrack' && this.myStatus != 'dash' && this.myStatus != 'cover' && this.myStatus != 'tactics') { this.reloadTimer = -1; } } if (this.myDataRef.myWeapons[this.myWeapon].myClips > 0 && this.reloadTimer == -1 && (this.myStatus == 'incap' || this.myStatus == 'idle' || this.myStatus == 'run' || this.myStatus == 'backtrack' || this.myStatus == 'dash' || this.myStatus == 'cover') && (this.toggleReload || this.myDataRef.myWeapons[this.myWeapon].myAmmo == 0) && this.rofTimer > this.myDataRef.myWeapons[this.myWeapon].myROF && this.myDataRef.myWeapons[this.myWeapon].myAmmo < this.myDataRef.myWeapons[this.myWeapon].myAmmoMax) { this.reloadTimer = 0; this.rofLastFrame = 1; } if (this.myDataRef.myMagic != undefined && MadWorld.activeFactions.length > 1) { } if (this.myDataRef.myMagic != undefined && this.myDataRef.mySlowMo >= 20 && (this.myStatus == 'idle' || this.myStatus == 'run' || this.myStatus == 'backtrack' || this.myStatus == 'dash')) { if (this.toggleSlowmo && this.magicChargeTimer < this.magicLevel2Threshold) { ++this.magicChargeTimer; } else { if (this.magicChargeTimer > -1) { if (this.magicChargeTimer >= this.magicLevel2Threshold) { this.magicLevel = 2; } else { this.magicLevel = 1; } if (this.myAimX < this._x) { this.myFacing = 'left'; } else { this.myFacing = 'right'; } this.facingOpposite = false; this.myStatus = 'magic'; this.mySubStatus = '_' + this.myDataRef.myMagic + '_' + String(this.magicLevel); this.magicChargeTimer = -1; this.myDataRef.mySlowMo -= 10 + this.magicLevel * 10; if (this.myDataRef.mySlowMo < 0) { this.myDataRef.mySlowMo = 0; } if (this.amPlayer) { KeyManager.lockKey('key_slowmo'); } } } } }; storedv2.breakdownAttack = function () { this.lastHitTimer += 1 + this.myGameSpeed; if (this.amPlayer) { this.myAimAI = 0; } else { this.myAimAI += SwainMath.randomNumber(-100, 100) / 100; if (this.myAimAI > (11 - this.myDataRef.traitCombatSkill) * 3) { this.myAimAI = (11 - this.myDataRef.traitCombatSkill) * 3; } if (this.myAimAI < -(11 - this.myDataRef.traitCombatSkill) * 3) { this.myAimAI = -(11 - this.myDataRef.traitCombatSkill) * 3; } } if (MadnessCharacter.aimingSprite._x == undefined && MadnessCharacter.aimingSprite != undefined) { this.aimTimer = -1; MadnessCharacter.aimingSprite = undefined; } if (!this.myDataRef.noAimShots && !this.myDataRef.noWieldGuns && this.myAttackTarget == MadnessRoster.playerRoster.teamLeader.mySprite && MadnessCharacter.aimingSprite == undefined && this.reloadTimer == -1 && !this.myDataRef.myWeapons[this.myWeapon].melee && this.myDataRef.myWeapons[this.myWeapon] != undefined && this.myDataRef.myWeapons[this.myWeapon].myAmmo > 0 && this.myRoster != MadnessRoster.playerRoster && this.mouseHold && this.myDataRef.myLevel > 0 && SwainMath.randomNumber(0, (11 - this.myDataRef.traitCombatSkill) * Math.abs(10 - this.myDataRef.myWeapons[this.myWeapon].myROF / 3)) <= 0) { if (SwainMath.get_distance(this, this.myAttackTarget) < this.myDataRef.myWeapons[this.myWeapon].myRange * 2 || this.myDataRef.noRange && SwainMath.get_distance(this, this.myAttackTarget) < 500) { if (!this.checkNoRangeMelee()) { MadnessCharacter.aimingSprite = this; this.aimTimer = 60 + 220 / this.myDataRef.myLevel * 3; this._parent.createAimReticle(this, this.myAttackTarget); this.aimFlash(); } } } if (this.aimTimer > 0) { this.aimTimer -= 1 + this.myGameSpeed; if (this.aimTimer < 0) { this.aimTimer = 0; } } if (this.aimTimer > -1) { if (this.myAttackTarget != MadnessRoster.playerRoster.teamLeader.mySprite || this.myDataRef.myWeapons[this.myWeapon].melee || this.myDataRef.myWeapons[this.myWeapon] == undefined || this.reloadTimer != -1 || this.myStatus != 'idle' && this.myStatus != 'run' && this.myStatus != 'dash' && this.myStatus != 'backtrack' && this.myStatus != 'tactics') { this.aimTimer = -1; MadnessCharacter.aimingSprite = undefined; } } this.rofTimer += 1 + this.myGameSpeed; if (this.slowMoActive && MadnessDataFile.havePerk('perkBulletTime3', this.myDataRef)) { ++this.rofTimer; } this.rofAdjust = 0; if (this.myDataRef.myWeapons[this.myWeapon].myCat == 'pistol' || this.myDataRef.myWeapons[this.myWeapon].myCat == 'revolver') { if (MadnessDataFile.havePerk('perkPistolROF2', this.myDataRef)) { ++this.rofAdjust; } if (MadnessDataFile.havePerk('perkPistolROF1', this.myDataRef)) { ++this.rofAdjust; } } if (this.myDataRef.myWeapons[this.myWeapon].myCat == 'smg') { if (MadnessDataFile.havePerk('perkSMGROF', this.myDataRef)) { ++this.rofAdjust; } } if (this.myDataRef.myWeapons[this.myWeapon].myCat == 'shotgun' && this.myDataRef.myWeapons[this.myWeapon].havePump) { if (MadnessDataFile.havePerk('perkShotgunROF2', this.myDataRef)) { this.rofAdjust += 7; } if (MadnessDataFile.havePerk('perkShotgunROF1', this.myDataRef)) { this.rofAdjust += 7; } } if (this.rofTimer > this.myDataRef.myWeapons[this.myWeapon].myROF + 3) { this.smgAimTimer = 1; } if (MadnessDataFile.havePerk('perkSMGAim2', this.myDataRef) && this.myDataRef.myWeapons[this.myWeapon].myCat == 'smg' && this.smgAimTimer > 0.1) { this.smgAimTimer -= 0.04; } else { if (MadnessDataFile.havePerk('perkSMGAim1', this.myDataRef) && this.myDataRef.myWeapons[this.myWeapon].myCat == 'smg' && this.smgAimTimer > 0.4) { this.smgAimTimer -= 0.02; } } if (this.myStatus.substr(0, 5) != 'melee') { this.meleeComboTimer += 1 + this.myGameSpeed; if (this.meleeComboTimer > 4) { this.meleeCombos = 3; } } if (this.myMission == 'follow' && this.myRoster.teamLeader == this.myDataRef) { this.myMission = 'patrol'; } if (this.myRoster.teamAttacker == this) { if (this.myDataRef.myWeapons[this.myWeapon].melee || this.myDataRef.myWeapons[this.myWeapon] == undefined || this.rofTimer >= this.myDataRef.myWeapons[this.myWeapon].myROF - this.rofAdjust) { this.myRoster.teamAttacker = undefined; } } if (this.reloadTimer == -1 && (this.rofTimer >= this.myDataRef.myWeapons[this.myWeapon].myROF - this.rofAdjust || this.myDataRef.myWeapons[this.myWeapon] == undefined) && (this.mouseHold && this.aimTimer == -1 || this.aimTimer == 0) && (this.myStatus == 'idle' || this.myStatus == 'run' || this.myStatus == 'backtrack' || this.myStatus == 'dash' || this.myStatus == 'cover' || this.myStatus == 'tactics' || this.myStatus == 'incap') && this.mySubStatus.substr(0, 8) != '_wounded' && (!this.myDataRef.myWeapons[this.myWeapon].melee && this.myDataRef.myWeapons[this.myWeapon] != undefined || (this.myDataRef.myWeapons[this.myWeapon] == undefined || this.myDataRef.myWeapons[this.myWeapon].melee) && (!this.moveUp && !this.moveDown && !this.moveRight && !this.moveLeft || (this.moveUp || this.moveDown || this.moveRight || this.moveLeft) && (this.mySpeedRight >= this.mySpeed * 0.7 || this.mySpeedRight <= -this.mySpeed * 0.7 || this.mySpeedDown >= this.mySpeed * this.stairsAdjustMove || this.mySpeedDown <= -this.mySpeed * this.stairsAdjustMove)))) { this.whipRange = false; if (this.aimTimer == -1 && this.myDataRef.myWeapons[this.myWeapon].myCat != 'melee' && this.myStatus != 'incap' && this.myDataRef.myWeapons[this.myWeapon] != undefined) { this.whipRange = this.checkWhipRange(); } if (this.myDataRef.myWeapons[this.myWeapon] == undefined || this.whipRange) { if (this.whipRange) { if (this.myDataRef.myCharacter == 'mag') { this.myStatus = 'unarmed_mag_' + SwainMath.randomNumber(1, 2); ItemGenerator.changeUnarmedDamage(this.myDataRef, 'unarmed_elite', false); } else { if (this.myDataRef.amZombie || this.myDataRef.amAbom) { this.myStatus = 'unarmed_zombie_' + SwainMath.randomNumber(1, 2); } else { if (this.myDataRef.myWeapons[this.myWeapon].twoHand) { this.myStatus = 'melee_rifle'; } else { this.myStatus = 'melee_pistol'; } } } if (this.myAimX < this._x) { this.myFacing = 'left'; } else { this.myFacing = 'right'; } } else { if (this.myStatus == 'dash' && !this.myDataRef.amZombie && !this.myDataRef.amAbom) { this.myStatus = 'melee_dash1'; } else { if (this.myDataRef.amZombie) { if (this.myStatus == 'dash' && this.myDataRef.myScale == 1) { if (this.myDataRef.autoDash) { this.myStatus = 'unarmed_dash_zombie1'; } else { this.myStatus = 'unarmed_dash_zombie2'; } } else { if (this.myDataRef.myScale > 1 || this.myDataRef.myLevel > 6 && (this.myAttackTarget.myStatus == 'restrained' || SwainMath.randomNumber(0, 3) == 0)) { this.myStatus = 'unarmed_zombie_slam'; } else { this.myStatus = 'unarmed_zombie_' + SwainMath.randomNumber(1, 2); } } } else { if (this.myDataRef.amAbom) { if (this.myStatus == 'dash') { if (this.myDataRef.myScale > 1) { this.myStatus = 'melee_dash_mag2'; } else { if (this.myDataRef.noHands) { this.myStatus = 'melee_dash_abom1'; } else { this.myStatus = 'unarmed_dash_zombie2'; } } } else { if (this.myDataRef.myScale > 1) { this.myStatus = 'unarmed_mag_3'; } else { if (this.myDataRef.noHands) { this.myStatus = 'unarmed_abom' + SwainMath.randomNumber(1, 2); } else { this.myStatus = 'unarmed_zombie_' + SwainMath.randomNumber(1, 2); } } } } else { if (this.myDataRef.improvedChump) { this.myStatus = 'unarmed_patient_1'; } else { if (MadnessDataFile.havePerk('perkUnarmedMoves3', this.myDataRef)) { if (SwainMath.randomNumber(0, 2) == 0) { this.myStatus = 'unarmed_brawl_' + SwainMath.randomNumber(1, 4); } else { if (SwainMath.randomNumber(0, 1) == 0) { this.myStatus = 'unarmed_savate_' + SwainMath.randomNumber(1, 5); } else { this.myStatus = 'unarmed_elite_' + SwainMath.randomNumber(1, 5); } } } else { if (MadnessDataFile.havePerk('perkUnarmedMoves2', this.myDataRef)) { if (SwainMath.randomNumber(0, 1) == 0) { this.myStatus = 'unarmed_brawl_' + SwainMath.randomNumber(1, 4); } else { this.myStatus = 'unarmed_savate_' + SwainMath.randomNumber(1, 5); } } else { if (MadnessDataFile.havePerk('perkUnarmedMoves1', this.myDataRef)) { this.myStatus = 'unarmed_brawl_' + SwainMath.randomNumber(1, 4); } else { this.myStatus = 'unarmed_chump_' + SwainMath.randomNumber(1, 2); } } } } } } if (this.myAimX < this._x) { this.myFacing = 'left'; } else { this.myFacing = 'right'; } } } } else { if (this.myDataRef.myWeapons[this.myWeapon].melee) { if (this.myDataRef.amZombie || this.myDataRef.amAbom) { this.myStatus = 'unarmed_zombie_melee1'; if (this.myAimX < this._x) { this.myFacing = 'left'; } else { this.myFacing = 'right'; } } else { if (this.myDataRef.myCharacter == 'fatboy') { this.myStatus = 'melee_slam'; if (this.myAimX < this._x) { this.myFacing = 'left'; } else { this.myFacing = 'right'; } } else { if (this.myStatus == 'dash') { this.myStatus = 'melee_dash2'; } else { if (this.meleeCombos > 2) { this.meleeCombos = 0; } this.meleeComboTimer = 0; if (MadnessDataFile.havePerk('perkMeleeMoves4', this.myDataRef)) { if (this.meleeCombos == 0) { this.myStatus = 'melee_better' + SwainMath.randomNumber(1, 6); } if (this.meleeCombos == 1) { this.myStatus = 'melee_better' + SwainMath.randomNumber(1, 6); } if (this.meleeCombos == 2) { this.myStatus = 'melee_finish' + SwainMath.randomNumber(1, 3); } } else { if (MadnessDataFile.havePerk('perkMeleeMoves3', this.myDataRef)) { if (this.meleeCombos == 0) { this.myStatus = 'melee_better' + SwainMath.randomNumber(1, 6); } if (this.meleeCombos == 1) { this.myStatus = 'melee_better' + SwainMath.randomNumber(1, 6); } if (this.meleeCombos == 2) { this.myStatus = 'melee_better' + SwainMath.randomNumber(1, 3); } } else { if (MadnessDataFile.havePerk('perkMeleeMoves2', this.myDataRef)) { if (this.meleeCombos == 0) { this.myStatus = 'melee_basic' + SwainMath.randomNumber(1, 6); } if (this.meleeCombos == 1) { this.myStatus = 'melee_basic' + SwainMath.randomNumber(1, 6); } if (this.meleeCombos == 2) { this.myStatus = 'melee_better' + SwainMath.randomNumber(1, 6); } } else { if (MadnessDataFile.havePerk('perkMeleeMoves1', this.myDataRef)) { if (this.meleeCombos == 0) { this.myStatus = 'melee_basic' + SwainMath.randomNumber(1, 6); } if (this.meleeCombos == 1) { this.myStatus = 'melee_basic' + SwainMath.randomNumber(1, 6); } if (this.meleeCombos == 2) { this.myStatus = 'melee_basic' + SwainMath.randomNumber(1, 6); } } else { this.meleeCombos = 2; this.myStatus = 'melee_chump' + SwainMath.randomNumber(1, 2); } } } } ++this.meleeCombos; if (this.myAimX < this._x) { this.myFacing = 'left'; } else { this.myFacing = 'right'; } } } } } else { if (this.myDataRef.amZombie || this.myDataRef.amAbom) { this.myStatus = 'unarmed_zombie_gun1'; if (this.myAimX < this._x) { this.myFacing = 'left'; } else { this.myFacing = 'right'; } } else { if (this.myDataRef.myWeapons[this.myWeapon].myAmmo > 0) { this.recoilTimer = this.myDataRef.myWeapons[this.myWeapon].myDamage * this.myDataRef.myWeapons[this.myWeapon].myShots; if (this.myDataRef.myWeapons[this.myWeapon].myCat != 'shotgun' && this.myDataRef.myWeapons[this.myWeapon].myCat != 'revolver' && this.myDataRef.myWeapons[this.myWeapon].myType != 'm203') { this.ejectShell(); } this.rofTimer = 1; this.rofLastFrame = 1; if (this.myDataRef.myWeapons[this.myWeapon].myDamageType == 'grenade') { MadnessCharacter.adjustSprite(this); this.launchGrenade(); } else { this.checkAttackHit('', '', this.myDataRef.myWeapons[this.myWeapon]); } if (this.myRoster != MadnessRoster.playerRoster) { this.myRoster.teamAttacker = this; this.myRoster.teamFireScore += this.returnAttackScore(); } if (this.myDataRef.myCharacter.substr(0, 3) == 'mag') { this.shakeyCam(6); } this.myDataRef.myWeapons[this.myWeapon].myAmmo -= 1; if (this.aimTimer == 0) { this.aimTimer = -1; MadnessCharacter.aimingSprite = undefined; } this.playSound(this.myDataRef.myWeapons[this.myWeapon].mySound); } else { if (this.myDataRef.myWeapons[this.myWeapon].myAmmo == 0 && this.amPlayer && this.emptyClipTimer <= 0) { this.playSound('emptyclip'); this.emptyClipTimer = this.myDataRef.myWeapons[this.myWeapon].myROF; } } } } } if (this.myDataRef.myWeapons[this.myWeapon] == undefined) { ItemGenerator.changeUnarmedDamage(this.myDataRef, this.myStatus, MadnessDataFile.havePerk('perkKnockdown2', this.myDataRef)); } else { ItemGenerator.changeUnarmedDamage(this.myDataRef, 'unarmed_brawl', false); } } var v2 = 0; while (v2 < this.targetsHit.length) { this.targetsHit[v2].applyDeath(); ++v2; } this.targetsHit = new Array(); if (this.recoilTimer > 0) { this.recoilTimer *= 0.8; } if (this.recoilTimer < 0) { this.recoilTimer = 0; } if (this.myStatus == 'grapple' && this.myAttackTarget.myStatus == 'restrained') { if (this.myDataRef.amZombie) { this.myAttackTarget.myTactics -= this.myDataRef.myLevel * 0.07000000000000001; this.myAttackTarget.tacTimer = 0; if (this.myAttackTarget.myTactics <= 0) { this.myAttackTarget.myHealth = 0; this.myAttackTarget.noDamage = true; this.myAttackTarget.myStatus = 'stun_zombie_bite'; this.myAttackTarget.dropGun(); this.myStatus = 'stun_grapple_zombie'; this.gotoAndStop(this.myStatus); } } if (this.myDataRef.amAbom) { if (this.myAttackTarget.myHealth <= 0) { this.myAttackTarget.noDamage = true; this.myAttackTarget.mySubStatus = '_head' + SwainMath.randomNumber(1, 4); this.myAttackTarget.myStatus = 'idle'; this.myAttackTarget.dropGun(); this.myAttackTarget.applyDeath(); this.myStatus = 'idle'; this.gotoAndStop(this.myStatus); } } } }; storedv2.refreshStats = function () { this.myHealth = this.myDataRef.myHealth; this.myHealthMax = this.myDataRef.myHealthMax; this.myTactics = this.myDataRef.myTactics; this.myTacticsMax = this.myDataRef.myTacticsMax; this.mySpeed = this.myDataRef.mySpeed * this.myDataRef.modSpeed; this.myAccel = this.myDataRef.myAccel * this.myDataRef.modSpeed; this.myDash = this.myDataRef.myDash; this.myHeight = this.myDataRef.myHeight; this.myWidth = this.myDataRef.myWidth; this.myDepth = this.myDataRef.myDepth; this.myReload = this.myDataRef.myReload; this.myBlood = this.myDataRef.myBlood; this.myTacMod = this.myDataRef.modRecharge; this.meleeHealth = this.myDataRef.meleeHealth; this.refreshArmor(); this.traitBravery = this.myDataRef.traitBravery; this.traitCover = this.myDataRef.traitCover; this.traitDistracted = this.myDataRef.traitDistracted; this.traitTriggerFinger = this.myDataRef.traitTriggerFinger; this.traitCombatSkill = this.myDataRef.traitCombatSkill; }; storedv2.refreshArmor = function () { this.myHeadArmor = 0; this.myBodyArmor = 0; if (this.myDataRef.myHat[0].myArmor != undefined) { this.myHeadArmor += this.myDataRef.myHat[0].myArmor; } if (this.myDataRef.myMask[0].myArmor != undefined) { this.myHeadArmor += this.myDataRef.myMask[0].myArmor; } if (this.myDataRef.myMouth[0].myArmor != undefined) { this.myHeadArmor += this.myDataRef.myMouth[0].myArmor; } if (this.myDataRef.myShirt[0].myArmor != undefined) { this.myBodyArmor += this.myDataRef.myShirt[0].myArmor; } }; storedv2.applyDeath = function () { if (this.myHealth <= 0) { if (!this.amPlayer && this.myDataRef.myBoss == '') { this.myDataRef.myHealth = this.myHealth; } if (this.myDataRef.myBoss != '') { this.bossEvents('kill_boss'); } if (this.myStatus != 'dead' && this.myStatus.substr(0, 4) != 'axed' && this.wounded < 1 && this.myStatus.substr(0, 4) != 'stun') { if (this.myDataRef.myScale > 2) { this.myHeight *= 1.5; this.myWidth = this.myHeight; } else { if (this.myWidth != this.myHeight) { this.myWidth = this.myHeight; } } if (this.myRoom.amStairs) { this.myStatus = 'dead'; if (this.myFacing == 'right' && this.myRoom.downAngle < 90 || this.myFacing == 'left' && this.myRoom.downAngle >= 90) { this.mySubStatus = '_stairs2'; } else { this.mySubStatus = '_stairs1'; } } else { this.myStatus = 'dead'; this.actionSlowdown = false; } if (this.myDataRef.fastDeath) { this.myDataRef.amSlow = false; } this.intendedTarget = undefined; this.pathFind = false; this.targetLock = false; if (this.myDataRef.myWeapons[this.myWeapon] != undefined) { this.dropGun(); } } } }; storedv2.killMe = function () { if (this.myDataRef.myObjective != undefined) { MadnessLevel.completeObjectiveCheck(this.myDataRef, 'kill'); } while (this.myDataRef.myEvents.length > 0) { if (this.myDataRef.myEvents[0].myType == 'function') { this.myDataRef.myEvents[0].myAction(); } this.myDataRef.myEvents.splice(0, 1); } if (!this.amPlayer) { this.myRoster.removeCharacter(this.myDataRef); } if (!this.myDataRef.noPaint) { MadnessLevel.removeNPC(this._parent.myRoomRef, this.myDataRef); } if (this.myDataRef.myBoss == '') { this.deadMan = true; } }; storedv2.paintMe = function () { this.myTacBar._visible = false; this._parent.drawToBitmap(this, 'bmpBodies'); this.removeMe(); }; storedv2.removeMe = function () { this.myDataRef.mySprite = undefined; this.removeMovieClip(); false; }; storedv2.playerControls = function () { this.moveUp = false; this.moveDown = false; this.moveLeft = false; this.moveRight = false; this.toggleAction = false; this.toggleGuard = false; this.toggleReload = false; this.togglePickup = false; this.toggleSlowmo = false; if (!MadnessTransition.transitionLock) { if (KeyManager.keyCounts.key_up > 0 && KeyManager.keyCounts.key_up > KeyManager.keyCounts.key_down) { this.moveUp = true; } if (KeyManager.keyCounts.key_down > 0 && KeyManager.keyCounts.key_down > KeyManager.keyCounts.key_up) { this.moveDown = true; } if (KeyManager.keyCounts.key_left > 0 && KeyManager.keyCounts.key_left > KeyManager.keyCounts.key_right) { this.moveLeft = true; } if (KeyManager.keyCounts.key_right > 0 && KeyManager.keyCounts.key_right > KeyManager.keyCounts.key_left) { this.moveRight = true; } if (KeyManager.keyCounts.key_action > 0) { this.toggleAction = true; } if (KeyManager.keyCounts.key_guard > 0) { this.toggleGuard = true; } if (KeyManager.keyCounts.key_reload > 0) { this.toggleReload = true; } if (KeyManager.keyCounts.key_pickup > 0) { this.togglePickup = true; } if (KeyManager.keyCounts.key_slowmo > 0) { this.toggleSlowmo = true; } } if (this.myDataRef.myWeapons[this.myWeapon] == undefined || this.rofTimer >= this.myDataRef.myWeapons[this.myWeapon].myROF - 1 || this.rofTimer <= 1) { this.myAimX = this._parent._xmouse; this.myAimY = this._parent._ymouse; } this._parent.playerAim._alpha = 50; var v2 = SwainMath.get_distance2(this._x, this._y - this.myDataRef.myShootHeight * (this._yscale / 100), this._parent._xmouse, this._parent._ymouse); var v4 = 0; if (this.myDataRef.myWeapons[this.myWeapon].myCat == 'smg') { if (MadnessDataFile.havePerk('perkSMGRange', this.myDataRef)) { v4 += 40; } } if (this.myDataRef.myWeapons[this.myWeapon].myCat == 'rifle') { if (MadnessDataFile.havePerk('perkRifleRange1', this.myDataRef)) { v4 += 30; } if (MadnessDataFile.havePerk('perkRifleRange2', this.myDataRef)) { v4 += 30; } } if (this.myDataRef.myWeapons[this.myWeapon] == undefined && v2 > this.myDataRef.myUnarmed.myRange) { v2 = this.myDataRef.myUnarmed.myRange - 10; } else { if (this.myDataRef.myWeapons[this.myWeapon].melee && v2 > this.myDataRef.myWeapons[this.myWeapon].myRange - 10) { v2 = this.myDataRef.myWeapons[this.myWeapon].myRange - 10; } else { if (v2 > this.myDataRef.myWeapons[this.myWeapon].myRange + this.myDataRef.modRange + 45 + v4) { v2 = this.myDataRef.myWeapons[this.myWeapon].myRange + this.myDataRef.modRange + 45 + v4; } } } var v3 = (this.myDataRef.myWeapons[this.myWeapon].mySpread / 30) * 100 * (v2 / 100); if (this.mySpeedRight == 0 && this.mySpeedDown == 0) { if (this.myDataRef.myWeapons[this.myWeapon].myCat == 'rifle' && MadnessDataFile.havePerk('perkRifleAccuracy', this.myDataRef)) { v3 *= 0.3; } if (this.myDataRef.myWeapons[this.myWeapon].myCat == 'pistol') { if (MadnessDataFile.havePerk('perkPistolAccuracy2', this.myDataRef)) { v3 *= 0.3; } else { if (MadnessDataFile.havePerk('perkPistolAccuracy1', this.myDataRef)) { v3 *= 0.6; } } } } this._parent.playerAim._x = SwainMath.get_position(this._x, this._y - this.myDataRef.myShootHeight * (this._yscale / 100), SwainMath.calculate_rotation(this._x, this._y - this.myDataRef.myShootHeight * (this._yscale / 100), this._parent._xmouse, this._parent._ymouse), v2, 'x'); this._parent.playerAim._y = SwainMath.get_position(this._x, this._y - this.myDataRef.myShootHeight * (this._yscale / 100), SwainMath.calculate_rotation(this._x, this._y - this.myDataRef.myShootHeight * (this._yscale / 100), this._parent._xmouse, this._parent._ymouse), v2, 'y'); this._parent.playerAim._rotation = SwainMath.calculate_rotation(this._x, this._y - this.myDataRef.myShootHeight, this._parent.playerAim._x, this._parent.playerAim._y); this._parent.playerAim.aimLine._yscale = v2; if (v3 <= 33 && !this.myDataRef.myWeapons[this.myWeapon].melee && this.myDataRef.myWeapons[this.myWeapon] != undefined) { this._parent.playerAim.aimTarget._xscale = 100 * (v3 / 33); if (this._parent.playerAim.aimTarget._xscale < 50) { this._parent.playerAim.aimTarget._xscale = 50; } this._parent.playerAim.aimTarget._yscale = this._parent.playerAim.aimTarget._xscale; } else { this._parent.playerAim.aimTarget._xscale = 100; this._parent.playerAim.aimTarget._yscale = this._parent.playerAim.aimTarget._xscale; } if (v3 <= 33) { this._parent.playerAim.aimTarget.bracketLine._visible = false; this._parent.playerAim.aimTarget.bracketL._visible = false; this._parent.playerAim.aimTarget.bracketR._visible = false; } else { this._parent.playerAim.aimTarget.bracketLine._xscale = v3; this._parent.playerAim.aimTarget.bracketLine._visible = true; this._parent.playerAim.aimTarget.bracketL._x = -v3 / 2; this._parent.playerAim.aimTarget.bracketL._visible = true; this._parent.playerAim.aimTarget.bracketR._x = v3 / 2; this._parent.playerAim.aimTarget.bracketR._visible = true; } }; storedv2.mouseDown = function () { if (!this._parent.paused && !this.targetLock && !this.mouseLock) { if (this.mouseTimer == -1) { this.mouseTimer = 0; this.mouse2x = false; } else { this.mouse2x = true; } this.mouseClick = true; this.mouseHold = true; } }; storedv2.mouseUp = function () { if (!this._parent.paused) { this.mouseClick = false; this.mouseHold = false; this.mouseReleaseTimer = 0; } if (this.mouseLock) { this.mouseLock = false; } }; goto 60615; label 60610: goto 92556; label 60615: storedv2.checkDamage = function (inWeapon, inAttacker, inHitX, inHitY, inRangeGood, inHeadshot) { var v12 = inHeadshot; var v3 = inWeapon.myDamage; if (v12) { if (inWeapon.myType != 'unarmed') { v3 -= this.myDataRef.myNaturalArmorHead; if (v3 < 1) { v3 = 1; } } if (!MadnessDataFile.havePerk('perkArmorPierce', inAttacker.myDataRef) || this.myDataRef.myHat[0].myWeight == 'heavy') { v3 -= this.myHeadArmor; } } else { if (inWeapon.myType != 'unarmed') { v3 -= this.myDataRef.myNaturalArmorBody; if (v3 < 1) { v3 = 1; } } if (!MadnessDataFile.havePerk('perkArmorPierce', inAttacker.myDataRef) || this.myDataRef.myShirt[0].myWeight == 'heavy') { v3 -= this.myBodyArmor; } } if (inWeapon.myCat == 'shotgun' && MadnessDataFile.havePerk('perkShotgunDamage', inAttacker.myDataRef) && SwainMath.get_distance(this, inAttacker) < 120) { v3 *= 1.3; } if (!v12 && this.myDataRef.amZombie && !inWeapon.melee) { v3 *= 0.8; } if (this.myDataRef.amZombie && inWeapon.melee) { v3 *= 1.4; } if (v3 < 0) { v3 = 0; } if (this.myRoster == MadnessRoster.playerRoster && MadnessGameSelect.gameMode == 'story') { v3 *= MadnessCharacter.damageDifficultyMod; } if (inAttacker.myDataRef != undefined) { if (inWeapon.myType == 'melee') { v3 *= inAttacker.myDataRef.modDmg; } if (inWeapon.myType == 'unarmed') { v3 *= inAttacker.myDataRef.modDmg / 3; } } if (!inRangeGood) { v3 *= 0.5; } v3 *= this.myDataRef.modArmor; if (MadnessDataFile.havePerk('perkStunProof1', this.myDataRef) && v3 <= 6 && v3 > 0) { v3 = 1; } var v17 = 1; if (this.myFacing == 'left') { v17 = -1; } var v4 = new Object(); v4.myAge = 0; var v18 = SwainMath.randomNumber(120, 200) / 100; if (this.myDataRef.amSpecial || inWeapon.myCat == 'melee') { v18 = 1; } if (inWeapon.myDamageType == 'burn') { v4.myType = inWeapon.myDamageType; } else { v4.myType = inWeapon.myDamageType + '_' + this.myBlood; } v4.myVariant = SwainMath.randomNumber(1, 5); v4.myScale = 1 / this.myDataRef.myScale; var v11 = new Object(); v11.x = inHitX; v11.y = inHitY; this._parent.localToGlobal(v11); this.globalToLocal(v11); this.localToGlobal(v11); if (v3 > 0) { this.lastHitTimer = 0; if (v12) { this.myDataRef.headWounds.push(v4); this.mySprite.myHead.globalToLocal(v11); v4.myX = v11.x; v4.myY = v11.y; v4.myRotation = SwainMath.calculate_rotation(v4.myX, v4.myY, 0, 0); } else { this.myDataRef.bodyWounds.push(v4); this.mySprite.myBody.globalToLocal(v11); v4.myX = v11.x; v4.myY = v11.y; v4.myRotation = SwainMath.randomNumber(-110, -80); if (v4.myX < 0) { v4.myRotation += 180; } } if (inWeapon.myCat == 'melee' && inWeapon.myTag != 'Unarmed' && inWeapon.broken == true) { v4.myType = 'hilt_' + this.myBlood; v4.myVariant = inWeapon.myType; inWeapon.myHealth = 0; if (this.myHealth < 50 && this.myDataRef.myBoss == '' && !this.myDataRef.bulletEater) { this.myHealth = 0; v3 = 1; } } } else { this.makeSparks(inHitX, inHitY, 3, 'sparks'); this.blockBullet(inAttacker, inHitX, inHitY, inWeapon); } var v19 = this.headDamage; var v20 = this.bodyDamage; if (v3 > 0) { if (v12) { if (MadnessDataFile.havePerk('perkHeadshotCrits', inAttacker.myDataRef)) { v3 *= v18; v4.myDamage = v3; } this.myHealth -= v3; if (this.myHealth <= 0 && !this.myDataRef.bulletEater && !this.myDataRef.headGearResurrect && (!this.noDamage || this.totalFrameDamage > 0)) { var v16 = SwainMath.randomNumber(-3, v3 / 4); if (v16 > 0) { this.headSpray += v16; } v16 = SwainMath.randomNumber(-1, 1) / 2; if (v16 > 0 && this.headSpray > 0) { this.bodySpray += v16; } if (SwainMath.randomNumber(0, 2) == 0 && !this.myDataRef.bulletEater) { v16 = Math.floor(SwainMath.randomNumber(-2, v3 + this.totalFrameDamage) / 4); if (v16 > 0) { this.headDamage += v16; } } if (this.headDamage > 0) { this.splatterCharacter(this.headDamage, this.myBlood, inAttacker._x > this._x, this._x, this._y - 70, true); } } else { if (inWeapon.myDamageType.substr(0, 6) == 'bullet' && !this.myDataRef.bulletEater && !this.myDataRef.amZombie && (!this.noDamage || this.totalFrameDamage > 0)) { v4.myType = 'scratch_' + this.myBlood; v4.myVariant = SwainMath.randomNumber(1, 3); if (SwainMath.get_distance2(v4.myX, v4.myY, 0, 0) <= 10) { v4.myRotation = SwainMath.calculate_rotation(inAttacker._x, inAttacker._y - this.myDataRef.myShootHeight * (this._yscale / 100), inHitX, inHitY) * v17; } } } } else { this.myHealth -= v3; v4.myDamage = v3; if (this.myHealth < this.myHealthMax * 0.5 && !this.myDataRef.bulletEater && !this.myDataRef.headGearResurrect && (!this.noDamage || this.totalFrameDamage > 0)) { var v16 = SwainMath.randomNumber(-3, (v3 + this.totalFrameDamage) / 4); if (v16 > 0) { this.bodySpray += v16; } v16 = SwainMath.randomNumber(-1, 1) / 2; if (v16 > 0 && this.bodySpray > 0) { this.headSpray += v16; } } if (this.myHealth <= 0 && (!this.noDamage || this.totalFrameDamage > 0)) { if (SwainMath.randomNumber(0, 2) == 0 && !this.myDataRef.bulletEater) { v16 = Math.floor(SwainMath.randomNumber(-2, v3) / 4); if (v16 > 0) { this.bodyDamage += v16; } } if (this.bodyDamage > 0) { this.splatterCharacter(this.bodyDamage, this.myBlood, inAttacker._x > this._x, this._x, this._y - 70, false); } } else { if (!inRangeGood && !this.myDataRef.bulletEater && !this.noDamage) { v4.myType = 'fleck_' + this.myBlood; v4.myVariant = SwainMath.randomNumber(1, 5); } } } if (!this.noDamage && inWeapon.myType != 'unarmed') { if (v3 < 10) { this._parent.createEffect(inHitX, inHitY, 'blood' + String(SwainMath.randomNumber(1, 3)) + '_' + this.myBlood, 60, 110, SwainMath.calculate_rotation(inHitX, inHitY, inAttacker._x, inAttacker._y - this.myDataRef.myShootHeight * (this._yscale / 100))); } else { this._parent.createEffect(inHitX, inHitY, 'blood' + String(SwainMath.randomNumber(4, 6)) + '_' + this.myBlood, 60, 110, SwainMath.calculate_rotation(inHitX, inHitY, inAttacker._x, inAttacker._y - this.myDataRef.myShootHeight * (this._yscale / 100))); } var v8 = 0; while (v8 < SwainMath.randomNumber(2, v3 / 3)) { inAttacker.makeSparks(inHitX, inHitY, this._y, 'drops_' + this.myDataRef.myBlood); ++v8; } } if ((this.myDataRef.bulletEater || this.myDataRef.amZombie || this.myDataRef.headGearResurrect) && !this.noDamage) { if (SwainMath.randomNumber(1, v3 / 4) >= 4 & SwainMath.randomNumber(0, 2) != 0) { this.splatterCharacter(v3 / 5, this.myBlood, inAttacker._x > this._x, inHitX, inHitY, false); } if (v4.myType.substr(0, 4) != 'hilt' && v4.myType.substr(0, 5) != 'punch' && v4.myType.substr(0, 5) != 'blunt' && v4.myType.substr(0, 5) != 'blade') { if (SwainMath.randomNumber(0, 1) == 0) { v4.myType = 'bullet_' + this.myBlood; v4.myVariant = SwainMath.randomNumber(1, 5); } else { if (SwainMath.randomNumber(0, 1) == 0) { v4.myType = 'fleck_' + this.myBlood; v4.myVariant = SwainMath.randomNumber(1, 5); } else { v4.myType = 'scratch_' + this.myBlood; v4.myVariant = SwainMath.randomNumber(1, 3); } } } if (v12) { if (this.myHealth < this.myHealthMax / 1.7 && (!this.myDataRef.fastDeteriorate && SwainMath.randomNumber(-this.myHealthMax / 9, v3) > 0 || this.myDataRef.fastDeteriorate && SwainMath.randomNumber(-this.myHealthMax / 20, v3) > 0)) { ++this.headDamage; } else { if (this.myDataRef.headGearResurrect && this.myHealth <= 0) { ++this.headDamage; } } if (SwainMath.randomNumber(0, this.myHealthMax / 50) == 0) { ++this.headSpray; } } else { if (this.myHealth < this.myHealthMax / 1.7 && SwainMath.randomNumber(-this.myHealthMax / 9, v3) > 0) { ++this.bodyDamage; } if (SwainMath.randomNumber(0, this.myHealthMax / 50) == 0) { ++this.bodySpray; } } } } var v15 = false; if (!v12 && this.myDataRef.myShirt[0].destructible) { if (this.myDataRef.myShirt[0].myIntegrity > 0) { this.myDataRef.myShirt[0].myIntegrity -= 0.5; if (this.myDataRef.myShirt[0].myIntegrity == Math.floor(this.myDataRef.myShirt[0].myIntegrity)) { v15 = true; } } if (this.myDataRef.myShirt[0].myIntegrity <= 0) { this.myDataRef.myShirt[0] = undefined; this.myBodyArmor = 0; } } if (v12 && this.myDataRef.myHat[0].destructible) { if (this.myDataRef.myHat[0].myIntegrity > 0) { this.myDataRef.myHat[0].myIntegrity -= 0.5; if (this.myDataRef.myHat[0].myIntegrity == Math.floor(this.myDataRef.myHat[0].myIntegrity)) { v15 = true; } } if (this.myDataRef.myHat[0].myIntegrity <= 0) { this.myDataRef.myHat[0] = undefined; this.myHeadArmor = 0; } } if (v15) { var v7 = 0; while (v7 < SwainMath.randomNumber(1, 2)) { MadWorld.thisWorld.createParticle('metal' + SwainMath.randomNumber(1, 6), 'metal', inHitX, inHitY, SwainMath.randomNumber(-20, 20), SwainMath.randomNumber(-20, 0), SwainMath.randomNumber(-179, 179), SwainMath.randomNumber(-4, 4), 0.5, this._y, 100, SwainMath.randomNumber(50, 80), false, 90, null); ++v7; } } if (v3 <= 0) { if (inWeapon.melee) { if (inWeapon.myDamageType != 'punch') { this.playSound('blockmelee'); } else { this.playSound('blockmelee'); } } else { if (!v12 && this.myDataRef.myShirt[0].destructible || v12 && this.myDataRef.myHat[0].destructible) { this.playSound('clang'); } else { this.playSound('ricochet'); } } } else { if (inWeapon.myDamageType == 'blade') { this.playSound('slash'); } if (inWeapon.myDamageType == 'blunt' || inWeapon.myDamageType == 'punch') { this.playSound('blunt'); } } if (this.myHealth <= 0) { if ((this.headDamage >= 2 || this.bodyDamage >= 3) && !this.amInjured) { if (v19 < this.headDamage || v20 < this.bodyDamage) { this.playSound('injury'); this.amInjured = true; } } } if (this.headSpray >= 4) { this.headSpray = 4; } if (this.bodySpray >= 4) { this.bodySpray = 4; } if (this.headDamage >= 4) { this.headDamage = 4; this.mySprite.myHead.myHat._visible = false; this.mySprite.myHead.myHat2._visible = false; this.mySprite.myHead.myMouth._visible = false; this.mySprite.myHead.myMask._visible = false; } if (this.bodyDamage >= 4) { this.bodyDamage = 4; } if (this.headDamage > 3 && !this.myDataRef.bulletEater) { MadnessCharacter.clearWounds(this, 'head'); } if (this.bodyDamage > 3 && !this.myDataRef.bulletEater) { MadnessCharacter.clearWounds(this, 'body'); } this.myDataRef.headSpray = this.headSpray; this.myDataRef.bodySpray = this.bodySpray; this.mySprite.myHead.headSprite.gotoAndStop(1 + this.headDamage * 5); this.mySprite.myBody.bodySprite.gotoAndStop(1 + this.bodyDamage * 5); v7 = 0; while (v7 < this.headSpray) { this.mySprite.myHead.headSprite.nextFrame(); ++v7; } v7 = 0; while (v7 < this.bodySpray) { this.mySprite.myBody.bodySprite.nextFrame(); ++v7; } if (this.myStatus != 'restrained' && v3 > 0 && this.myHealth > 0 && this.rofTimer > 5 && !this.myDataRef.bulletEater && !(this.myDataRef.amZombie && this.totalFrameDamage + v3 < this.myHealthMax / 20 && !inWeapon.melee) && this.myStatus != 'knockback' && !MadnessDataFile.havePerk('perkStunProof2', this.myDataRef) && !(MadnessDataFile.havePerk('perkStunProof1', this.myDataRef) && v3 < 20)) { this.mySprite.gotoAndStop('idle'); this.myStatus = 'stun' + SwainMath.randomNumber(1, 7); this.mySprite.gotoAndStop(this.myStatus); } if (this.myHealth > 0 && inAttacker.myStatus.substr(0, 10) == 'melee_dash' && (this.myDataRef.weakToDash || MadnessDataFile.havePerk('perkStunDash1', inAttacker.myDataRef) && inAttacker.myDataRef.myScale >= this.myDataRef.myScale) && this.myStatus != 'knockback') { this.mySprite.gotoAndStop('idle'); this.myStatus = 'stun_dash'; this.mySprite.gotoAndStop(this.myStatus); } if (inWeapon.melee && this.meleeHealth > 0) { this.meleeHealthHit(inAttacker, inWeapon); } if (this.myDataRef.amZombie && v3 > 0) { if (SwainMath.randomNumber(Math.ceil(v3 / 3), 10) == 10 || inAttacker.myStatus.substr(0, 10) == 'melee_dash') { this.dropGun(); } } MadnessCharacter.checkWounds(this); if (this.myRoster == MadnessRoster.playerRoster) { _root.gameMenu.refreshPics(); } if (this.myDataRef.amSpecial && this.myHealth > 0 && v3 > 0 && this.myStatus != 'restrained' && this.myTactics < this.myTacticsMax) { this.myTactics = this.myTacticsMax; this.tacTimer = 0; } this.totalFrameDamage += v3; if (this.myStatus == 'dead' && this.mySpeedRight != 0) { this.mySpeedRight *= 1.3; } this.triggerBossFlee(v3); if ((this.myDataRef.headGearResurrect || this.myDataRef.amZombie) && this.headDamage >= 4) { this.myHealth = 0; } if (this.myHealth <= 0 && !this.noDamage) { this.noDamage = true; if (this.myDataRef.noHands && this.headDamage < 4 && this.bodyDamage < 4) { this.myDataRef.healMeMinor(); this.refreshStats(); this.noDamage = false; this.applyKnockback(inAttacker, 5, false); this.myDataRef.noDodge = false; } else { if (this.myDataRef.headGearResurrect && this.headDamage < 4) { this.resurrectionDeath(inAttacker); } else { if (v12) { if (SwainMath.randomNumber(-2, Math.floor(this.totalFrameDamage / 7)) <= 0 && this.mySubStatus.substr(0, 4) != '_fly' && this.myStatus != 'knockback') { this.mySpeedRight = 0; if (SwainMath.randomNumber(0, 4) == 0 && this.headDamage <= 2 && this.mySubStatus.substr(0, 8) != '_stagger') { this.mySubStatus = '_stagger_head' + SwainMath.randomNumber(1, 2); this.noDamage = false; } else { var v14 = this._parent.myRooms[0]; var v13 = this._parent.myRooms[this._parent.myRooms.length - 1]; if (this._x < v14.myDL._x + (v14.myUL._x - v14.myDL._x) * ((this._y - v14.myUL._y) / (v14.myDL._y - v14.myUL._y)) + 60 && inAttacker._x > this._x && this.myFacing == 'right' || this._x > v13.myUR._x + (v13.myDR._x - v13.myUR._x) * ((this._y - v13.myUR._y) / (v13.myDR._y - v13.myUR._y)) - 60 && inAttacker._x < this._x && this.myFacing == 'left') { this.mySubStatus = '_wall1'; } else { this.mySubStatus = '_head' + SwainMath.randomNumber(1, 4); } } } else { if (!this.enemyInFront(inAttacker) && this.myStatus != 'knockback') { this.mySubStatus = '_trip1'; } else { this.mySubStatus = '_fly' + SwainMath.randomNumber(3, 4); } if (inAttacker._x > this._x) { this.mySpeedRight -= 2 + SwainMath.randomNumber(this.totalFrameDamage / 15, this.totalFrameDamage / 9); } else { this.mySpeedRight += 2 + SwainMath.randomNumber(this.totalFrameDamage / 15, this.totalFrameDamage / 9); } } } else { if (this.mySubStatus.substr(0, 8) != '_stagger' || this.bodyDamage > 0) { if (SwainMath.randomNumber(-2, Math.ceil(this.totalFrameDamage / 7)) <= 0 && this.bodyDamage == 0 && this.mySubStatus.substr(0, 4) != '_fly' && this.myStatus != 'knockback') { this.mySpeedRight = 0; if (SwainMath.randomNumber(0, 2) > 0) { this.mySubStatus = '_body' + SwainMath.randomNumber(1, 4); } else { this.mySubStatus = '_stagger_body' + SwainMath.randomNumber(1, 4); this.noDamage = false; } } else { if (this._y - inHitY <= 25) { if (this.enemyInFront(inAttacker)) { this.mySubStatus = '_trip1'; } else { this.mySubStatus = '_fly' + SwainMath.randomNumber(3, 4); } } else { var v14 = this._parent.myRooms[0]; var v13 = this._parent.myRooms[this._parent.myRooms.length - 1]; if (this._x < v14.myDL._x + (v14.myUL._x - v14.myDL._x) * ((this._y - v14.myUL._y) / (v14.myDL._y - v14.myUL._y)) + 120 && inAttacker._x > this._x && this.myFacing == 'right' || this._x > v13.myUR._x + (v13.myDR._x - v13.myUR._x) * ((this._y - v13.myUR._y) / (v13.myDR._y - v13.myUR._y)) - 120 && inAttacker._x < this._x && this.myFacing == 'left') { this.mySubStatus = '_wall2'; } else { this.mySubStatus = '_fly' + SwainMath.randomNumber(1, 2); } } if (inAttacker._x > this._x) { this.mySpeedRight -= 3 + SwainMath.randomNumber(this.totalFrameDamage / 13, this.totalFrameDamage / 8); } else { this.mySpeedRight += 3 + SwainMath.randomNumber(this.totalFrameDamage / 13, this.totalFrameDamage / 8); } } } else {} } } } if (this.myHealth <= 0) { this.myStatus = 'idle'; } this.applyDeath(); } }; storedv1.clearWounds = function (inChar, inCategory) { var v1 = new Number(); if (inCategory == 'head') { while (inChar.mySprite.myHead.myPart['wound' + String(v1)] != undefined) { inChar.mySprite.myHead.myPart['wound' + String(v1)].removeMovieClip(); ++v1; } } else { while (inChar.mySprite.myBody.myPart['wound' + String(v1)] != undefined) { inChar.mySprite.myBody.myPart['wound' + String(v1)].removeMovieClip(); ++v1; } } }; storedv1.checkWounds = function (inChar) { var v2 = 0; while (v2 < inChar.myDataRef.bodyWounds.length) { if (inChar.mySprite.myBody.myPart['wound' + String(v2)] == undefined) { inChar.mySprite.myBody.myPart.attachMovie('madness_wound', 'wound' + String(v2), inChar.mySprite.myBody.myPart.getNextHighestDepth()); inChar.mySprite.myBody.myPart['wound' + String(v2)]._x = inChar.myDataRef.bodyWounds[v2].myX; inChar.mySprite.myBody.myPart['wound' + String(v2)]._y = inChar.myDataRef.bodyWounds[v2].myY; inChar.mySprite.myBody.myPart['wound' + String(v2)]._rotation = inChar.myDataRef.bodyWounds[v2].myRotation; inChar.mySprite.myBody.myPart['wound' + String(v2)].gotoAndStop(inChar.myDataRef.bodyWounds[v2].myType); inChar.mySprite.myBody.myPart['wound' + String(v2)].myWound.gotoAndStop(inChar.myDataRef.bodyWounds[v2].myVariant); inChar.mySprite.myBody.myPart['wound' + String(v2)]._xscale *= inChar.myDataRef.bodyWounds[v2].myScale; inChar.mySprite.myBody.myPart['wound' + String(v2)]._yscale *= inChar.myDataRef.bodyWounds[v2].myScale; } else {} ++v2; } if (inChar.headDamage <= 3) { v2 = 0; while (v2 < inChar.myDataRef.headWounds.length) { if (inChar.mySprite.myHead.myPart['wound' + String(v2)] == undefined) { inChar.mySprite.myHead.myPart.attachMovie('madness_wound', 'wound' + String(v2), inChar.mySprite.myHead.myPart.getNextHighestDepth()); inChar.mySprite.myHead.myPart['wound' + String(v2)]._x = inChar.myDataRef.headWounds[v2].myX; inChar.mySprite.myHead.myPart['wound' + String(v2)]._y = inChar.myDataRef.headWounds[v2].myY; inChar.mySprite.myHead.myPart['wound' + String(v2)]._rotation = inChar.myDataRef.headWounds[v2].myRotation; inChar.mySprite.myHead.myPart['wound' + String(v2)].gotoAndStop(inChar.myDataRef.headWounds[v2].myType); inChar.mySprite.myHead.myPart['wound' + String(v2)].myWound.gotoAndStop(inChar.myDataRef.headWounds[v2].myVariant); inChar.mySprite.myHead.myPart['wound' + String(v2)]._xscale *= inChar.myDataRef.headWounds[v2].myScale; inChar.mySprite.myHead.myPart['wound' + String(v2)]._yscale *= inChar.myDataRef.headWounds[v2].myScale; } else {} ++v2; } } }; storedv2.checkAttackHit = function (inMeleeDir, inMeleeType, inWeapon) { this.bulletCheckDistance = SwainMath.randomNumber(3, 7); var v6; var v22; var v21; var v9 = new Number(); this.targetsHit = new Array(); this.targetsTac = new Array(); this.myBlasts = new Array(); var v2 = inWeapon; MadnessCharacter.adjustSprite(this); var v26 = v2.myShots; if (v2.myCat == 'shotgun' && MadnessDataFile.havePerk('perkShotgunShots1', this.myDataRef)) { ++v26; } if (v2.myCat == 'shotgun' && MadnessDataFile.havePerk('perkShotgunShots2', this.myDataRef)) { ++v26; } var v23 = 0; while (v23 < v26) { if (!v2.melee) { this.bulletRotation = SwainMath.randomNumber(-v2.mySpread * 100, v2.mySpread * 100) / 100; this.bulletRotation += this.myAimAI; } else { this.bulletRotation = SwainMath.randomNumber(-600, 600) / 100; } if (this.aimTimer == 0) { this.bulletRotation = 0; } if (this.mySpeedRight == 0 && this.mySpeedDown == 0 && (v2.myCat == 'pistol' || v2.myCat == 'revolver')) { if (MadnessDataFile.havePerk('perkPistolAccuracy2', this.myDataRef)) { this.bulletRotation *= 0.3; } else { if (MadnessDataFile.havePerk('perkPistolAccuracy1', this.myDataRef)) { this.bulletRotation *= 0.6; } } } var v7 = new Number(); if (v2.myCat == 'smg') { this.bulletRotation *= this.smgAimTimer; if (MadnessDataFile.havePerk('perkSMGRange', this.myDataRef)) { v7 += 40; } } if (v2.myCat == 'rifle') { if (MadnessDataFile.havePerk('perkRifleAccuracy', this.myDataRef) && this.mySpeedRight == 0 && this.mySpeedDown == 0) { this.bulletRotation *= 0.3; } if (MadnessDataFile.havePerk('perkRifleRange1', this.myDataRef)) { v7 += 30; } if (MadnessDataFile.havePerk('perkRifleRange2', this.myDataRef)) { v7 += 30; } } var v3 = new Object(); if (v2.melee || this.myDataRef.myWeapons[this.myWeapon].melee) { if (this.myFacing == 'left') { this.targetX = this._x + 10; } else { this.targetX = this._x - 10; } this.targetY = this._y - this.myDataRef.myShootHeight * (this._yscale / 100); } else { v3.x = 0; v3.y = 0; if (this.myAimX >= this._x) { this.mySprite.handShoot_front.myGun.myShootPoint.localToGlobal(v3); } if (this.myAimX <= this._x) { this.mySprite.handShoot_back.myGun.myShootPoint.localToGlobal(v3); } this._parent.globalToLocal(v3); this.targetX = v3.x; this.targetY = v3.y; } var v16 = 1; if (inMeleeDir == '') { v22 = 700; v21 = 400; } else { v22 = v2.myRange * this.myDataRef.myScale; v21 = 100; } if (inMeleeDir == 'verylow') { this.myAimX = SwainMath.get_position(this._x, this._y - this.myDataRef.myShootHeight * (this._yscale / 100) * v16, 170, v2.myRange * this.myDataRef.myScale, 'x'); this.myAimY = SwainMath.get_position(this._x, this._y - this.myDataRef.myShootHeight * (this._yscale / 100) * v16, 100, v2.myRange * this.myDataRef.myScale, 'y'); } else { if (inMeleeDir == 'low' || this.myDataRef.myScale > 1 && v2.melee) { this.myAimX = SwainMath.get_position(this._x, this._y - this.myDataRef.myShootHeight * (this._yscale / 100) * v16, 80 + 30 * this.myDataRef.myScale, v2.myRange * this.myDataRef.myScale, 'x'); this.myAimY = SwainMath.get_position(this._x, this._y - this.myDataRef.myShootHeight * (this._yscale / 100) * v16, 100, v2.myRange * this.myDataRef.myScale, 'y'); } else { if (inMeleeDir == 'mid') { this.myAimX = SwainMath.get_position(this._x, this._y - this.myDataRef.myShootHeight * (this._yscale / 100) * v16, 90, v2.myRange * this.myDataRef.myScale, 'x'); this.myAimY = SwainMath.get_position(this._x, this._y - this.myDataRef.myShootHeight * (this._yscale / 100) * v16, 90, v2.myRange * this.myDataRef.myScale, 'y'); } else { if (inMeleeDir == 'high') { this.myAimX = SwainMath.get_position(this._x, this._y - this.myDataRef.myShootHeight * (this._yscale / 100) * v16, 80, v2.myRange * this.myDataRef.myScale, 'x'); this.myAimY = SwainMath.get_position(this._x, this._y - this.myDataRef.myShootHeight * (this._yscale / 100) * v16, 80, v2.myRange * this.myDataRef.myScale, 'y'); } } } } if (inMeleeDir != '' && this.myFacing == 'left') { this.myAimX = this._x - (this.myAimX - this._x); } if (this.myAimX > this._x && this.myAimX < this.targetX || this.myAimX < this._x && this.myAimX > this.targetX) { this.advanceX = SwainMath.get_position(this.targetX, this.targetY, this.bulletRotation + SwainMath.calculate_rotation(this._x, this._y - this.myDataRef.myShootHeight, this.myAimX, this.myAimY), this.bulletCheckDistance, 'x') - this.targetX; this.advanceY = SwainMath.get_position(this.targetX, this.targetY, this.bulletRotation + SwainMath.calculate_rotation(this._x, this._y - this.myDataRef.myShootHeight, this.myAimX, this.myAimY), this.bulletCheckDistance, 'y') - this.targetY; } else { this.advanceX = SwainMath.get_position(this.targetX, this.targetY, this.bulletRotation + SwainMath.calculate_rotation(this.targetX, this.targetY, this.myAimX, this.myAimY), this.bulletCheckDistance, 'x') - this.targetX; this.advanceY = SwainMath.get_position(this.targetX, this.targetY, this.bulletRotation + SwainMath.calculate_rotation(this.targetX, this.targetY, this.myAimX, this.myAimY), this.bulletCheckDistance, 'y') - this.targetY; } var v17 = 0; while (v17 < 5) { this.targetX += this.advanceX; this.targetY += this.advanceY; ++v17; } v6 = false; var v19 = 75; var v5; for (;;) { if (!(!v6 && this.targetX < this._x + v22 && this.targetX > this._x - v22 && this.targetY < this._y + v21 && this.targetY > -v21)) break; if (this._parent.bulletWallHit(this.targetX, this.targetY + v19 + SwainMath.randomNumber(-5, 5)) && SwainMath.randomNumber(0, v2.mySpread / 2) == 0) { if (!inWeapon.melee) { v3.x = this.targetX; v3.y = this.targetY; this._parent.localToGlobal(v3); var v14; v14 = 0; while (v14 < MadnessDoors.allDoors.length) { if (MadnessDoors.allDoors[v14].noBullet.hitTest(v3.x, v3.y, true)) { break; } ++v14; } if (v14 == MadnessDoors.allDoors.length) { if (v2.myDamageType.substr(0, 6) == 'bullet') { this._parent.createSplat(this.targetX, this.targetY, 'bullet_' + SwainMath.randomNumber(1, 3), SwainMath.calculate_rotation(this._x, this._y, this.targetX, this.targetY)); } else { this._parent.createSplat(this.targetX, this.targetY, v2.myDamageType, SwainMath.calculate_rotation(this._x, this._y, this.targetX, this.targetY)); } } } else { if (this.myDataRef.myWeapons[this.myWeapon] != undefined) { this.playSound('blockmelee'); this.myStatus = 'stun_parry' + SwainMath.randomNumber(1, 2); } } var v13 = 0; while (v13 < SwainMath.randomNumber(2, this.myDataRef.myWeapons[this.myWeapon].myDamage / 5)) { this.makeSparks(this.targetX, this.targetY, this.targetY + v19, 'sparks'); ++v13; } this.targetX -= this.advanceX; this.targetY -= this.advanceY; v6 = true; break; } else { if (this._parent.bulletFloorHit(this.targetX, this.targetY)) { this.targetX -= this.advanceX; this.targetY -= this.advanceY; v6 = true; break; } } if (SwainMath.randomNumber(0, 2) > 0 && !v2.melee && v2 != undefined) { var v4; var v11 = 0; while (v11 < MadnessObstacle.allObstacles.length) { v4 = MadnessObstacle.allObstacles[v11]; if (!v4.destroyed && v4.inUse && v4.inUse.myRoster != this.myRoster) { if (v4.inUse.rofTimer >= v4.inUse.myDataRef.myWeapons[v4.inUse.myWeapon].myROF) { if (v4.myHit.hitTest(this.targetX + this._parent._x, this.targetY + this._parent._y)) { v4.hurtMe(v2.myDamage); v4.createSplat(this.targetX - v4._x, this.targetY - v4._y, 'bullet_' + SwainMath.randomNumber(1, 3), SwainMath.randomNumber(1, 5), SwainMath.calculate_rotation(this._x, this._y, this.targetX, this.targetY)); var v13 = 0; while (v13 < SwainMath.randomNumber(2, this.myDataRef.myWeapons[this.myWeapon].myDamage / 5)) { this.makeSparks(this.targetX, this.targetY, v4._y, 'sparks'); ++v13; } v6 = true; break; } } } ++v11; } } var v12 = false; v11 = 0; while (v11 < MadnessCharacter.allRosters.length) { if (MadnessCharacter.allRosters[v11].teamFaction != this.myFaction) { v13 = 0; while (v13 < MadnessCharacter.allRosters[v11].myActiveMembers.length) { this.targetEnemy = MadnessCharacter.allRosters[v11].myActiveMembers[v13].mySprite; if (this.targetEnemy.myFaction != this.myFaction && this.targetEnemy._x != undefined && !this.targetEnemy.amDodging && this.targetEnemy.myStatus != 'recover' && (this.targetEnemy.amPlayer || this.aimTimer == -1)) { var v8; v8 = 0; while (v8 < this.targetsTac.length) { if (this.targetsTac[v8] == this.targetEnemy) { break; } ++v8; } if (v8 == this.targetsTac.length) { if (this._x < this.targetEnemy._x && this.myAimX >= this._x || this._x > this.targetEnemy._x && this.myAimX <= this._x) { if (!v2.melee || v2.melee && this.inMeleeRange(this.targetEnemy)) { if (SwainMath.randomNumber(1, this.targetEnemy.myDataRef.myScale) == 1) { if (!this.targetEnemy.deadMan && this.targetEnemy.myStatus.substr(0, 3) != 'use' && this.targetEnemy.myStatus != 'knockback') { if (this.targetX < this.targetEnemy._x + this.targetEnemy.myHeight * (this.targetEnemy._yscale / 100) && this.targetX > this.targetEnemy._x - this.targetEnemy.myHeight * (this.targetEnemy._yscale / 100)) { if (this.targetY < this.targetEnemy._y && this.targetY > this.targetEnemy._y - this.targetEnemy.myHeight * (this.targetEnemy._yscale / 100)) { v12 = false; v3.x = this.targetX; v3.y = this.targetY; this._parent.localToGlobal(v3); if ((this.targetEnemy.headDamage <= 3 && !this.targetEnemy.myDataRef.bulletEater || this.targetEnemy.myDataRef.bulletEater) && this.targetEnemy.mySprite.myHead.myHit.hitTest(v3.x, v3.y, true)) { v12 = true; } if (v12 || this.targetEnemy.mySprite.myBody.myHit.hitTest(v3.x, v3.y, true)) { var v18 = SwainMath.randomNumber(0, 99999); if (v2.melee) { this.intendedX = this.targetEnemy._x; this.intendedY = this.targetEnemy._y; this.targetApproach = true; if (this.myFacing == 'right') { this.intendedX -= v2.myRange * this.myDataRef.myScale - 40; } else { this.intendedX += v2.myRange * this.myDataRef.myScale - 40; } } v5 = 2; if (MadnessDataFile.havePerk('perkPistolEffectiveness', this.myDataRef) && (v2.myCat == 'pistol' || v2.myCat == 'revolver') || MadnessDataFile.havePerk('perkRifleEffectiveness', this.myDataRef) && v2.myCat == 'rifle') { v5 -= 1; } if (v2.upgradeLaser) { v5 -= 1; } if (v2.upgradeSight) { v5 -= 1; } if (v9 > v2.myRange * this.myDataRef.myScale + this.myDataRef.modRange + v7) { v5 += Math.ceil((v9 - (v2.myRange * this.myDataRef.myScale + this.myDataRef.modRange + v7)) / 45); } if (v5 < 0) { v5 = 0; } if (!this.myDataRef.noRange && this.aimTimer == -1 && !v2.melee && v9 > v2.myRange * this.myDataRef.myScale + this.myDataRef.modRange + v7 && SwainMath.randomNumber(0, v5) > 1) { this.targetsTac.push(this.targetEnemy); } else { if (!this.myDataRef.amZombie && !this.myDataRef.amAbom && this.amBlocking(this.targetEnemy, this, v2) && !((MadnessDataFile.havePerk('perkBlockBreak', this.myDataRef) && MadnessGameSelect.gameMode != 'story' || this.myDataRef.autoHit) && v2.melee)) { if (MadnessDataFile.havePerk('perkBlock2', this.targetEnemy.myDataRef) && !v2.melee) { this.targetEnemy.checkAttackHit('', '', v2); this.targetEnemy.deflectBullet(this, this.targetX, this.targetY, v2); this._parent.makeBullet(this.targetEnemy, this.targetEnemy.myBlasts[0].myRot, this.targetEnemy.myBlasts[0].myLength, this.targetEnemy.myBlasts[0].myX, this.targetEnemy.myBlasts[0].myY, this.targetX, this.targetY, v2.myTracer); } else { this.targetEnemy.blockBullet(this, this.targetX, this.targetY, v2); } if (MadnessDataFile.havePerk('perkMeleeDisarm', this.targetEnemy.myDataRef) && this.targetEnemy.actionTimer < 10 && v2.melee && v2.myType != 'unarmed') { this.myStatus = 'stun_parry' + SwainMath.randomNumber(1, 2); this.mySprite.gotoAndStop(this.myStatus); this.disarmGun(); } this.targetEnemy.blockReset(); this.targetEnemy.hitTactics(v2, this, true, false, v9 <= v2.myRange * this.myDataRef.myScale + this.myDataRef.modRange + v7); this.damageMelee(v2); this.targetEnemy.damageMelee(this.targetEnemy.myDataRef.myWeapons[this.targetEnemy.myWeapon]); if (this.aimTimer == 0 && this.targetEnemy.myHealth > 0) { this.targetEnemy.myStatus = 'stun_parry' + SwainMath.randomNumber(1, 2); if (this.myTactics <= 0) { this.targetEnemy.disarmGun(); } } if (this.targetEnemy.myTactics == 0) { this.targetEnemy.myStatus = 'stun_parry' + SwainMath.randomNumber(1, 2); } if (v2.melee && v2.myDamageType != 'punch') { this.playSound('blockmelee'); } else { if (v2.myDamageType == 'punch') { this.playSound('blunt'); } else { this.playSound('ricochet'); } } v6 = true; break; } else { if (this.myDataRef.weaponStealer && (this.targetEnemy.myStatus != 'melee' && this.targetEnemy.rofTimer < 15 || this.targetEnemy.myStatus == 'restrained' && SwainMath.randomNumber(0, 1) == 0) && this.myDataRef.myWeapons[this.myWeapon] == undefined && this.targetEnemy.myDataRef.myWeapons[this.targetEnemy.myWeapon] != undefined && (this.targetEnemy.myStatus == 'restrained' || this.targetEnemy._x > this._x && (this.targetEnemy.myFacing == 'right' && this.targetEnemy.facingOpposite || this.targetEnemy.myFacing == 'left' && !this.targetEnemy.facingOpposite) || this.targetEnemy._x < this._x && (this.targetEnemy.myFacing == 'left' && this.targetEnemy.facingOpposite || this.targetEnemy.myFacing == 'right' && !this.targetEnemy.facingOpposite)) && this.myDataRef.myScale == this.targetEnemy.myDataRef.myScale) { this.playSound('swish'); if (this.targetEnemy.myDataRef.myWeapons[this.targetEnemy.myWeapon].melee) { this.playSound('swapmelee'); } else { if (this.targetEnemy.myDataRef.myWeapons[this.targetEnemy.myWeapon] != undefined) { this.playSound('swapgun'); } } this.myDataRef.myWeapons[this.myWeapon] = this.targetEnemy.myDataRef.myWeapons[this.targetEnemy.myWeapon]; this.targetEnemy.myDataRef.myWeapons[this.targetEnemy.myWeapon] = undefined; if (this.targetEnemy.myStatus != 'restrained') { this.targetEnemy.myStatus = 'stun_parry' + SwainMath.randomNumber(1, 2); } v6 = true; break; } else { if (this.canGrapple(this.targetEnemy)) { this.myStatus = 'grapple'; this.targetEnemy.myStatus = 'restrained'; if (this.myDataRef.amZombie) { this.mySubStatus = '_zombie'; } if (this.myDataRef.amAbom) { this.mySubStatus = '_abom'; } else { this.mySubStatus = '_zombie'; } this.targetEnemy.mySubStatus = this.mySubStatus; if (this.targetEnemy.amPlayer) { this.aimFlash(); } this.targetEnemy.grappleTimer = (this.targetEnemy.grappleTimerMax / 10) * this.myDataRef.myLevel; this.playSound('land'); this.playSound('swish'); this.myAttackTarget = this.targetEnemy; this.intendedX = this.targetEnemy._x; this.intendedY = this.targetEnemy._y + 8; this.intendedY += SwainMath.randomNumber(-50, 50) * 0.1; if (this.myFacing == 'right') { this.intendedX -= (v2.myRange * this.myDataRef.myScale - 40) * (SwainMath.randomNumber(50, 100) * 0.01); } else { this.intendedX += (v2.myRange * this.myDataRef.myScale - 40) * (SwainMath.randomNumber(50, 100) * 0.01); } v6 = true; break; } else { if (this.targetEnemy.myStatus != 'restrained' && this.aimTimer == -1 && this.targetEnemy.myTactics > 0 && (!this.myDataRef.autoHit || !v2.melee) && !this.myDataRef.amSurprised) { this.targetEnemy.hitTactics(v2, this, false, false, v9 <= v2.myRange * this.myDataRef.myScale + this.myDataRef.modRange + v7); this.targetsTac.push(this.targetEnemy); } else { var v15 = this.targetEnemy.myHealth > 0; MadnessCharacter.adjustSprite(this.targetEnemy); this.targetEnemy.checkDamage(v2, this, this.targetX, this.targetY, v9 <= v2.myRange * this.myDataRef.myScale + this.myDataRef.modRange + v7 || v2.melee || this.myDataRef.autoHit, v12); if (v15 && this.targetEnemy.myHealth <= 0) { MadnessGameSelect.appropriateXP(this.myDataRef, this.targetEnemy.myDataRef, 'attack'); } this.targetsHit.push(this.targetEnemy); this.damageMelee(v2); var v10 = 22; if ((MadnessDataFile.havePerk('perkStunDash2', this.myDataRef) || this.myDataRef.knockdownDash) && this.myStatus.substr(0, 10) == 'melee_dash' || this.myDataRef.myScale > this.targetEnemy.myDataRef.myScale) { v10 = 0; } else { if (MadnessDataFile.havePerk('perkKnockdown2', this.myDataRef) && this.myStatus.substr(0, 10) != 'melee_dash') { v10 = 2; } else { if (MadnessDataFile.havePerk('perkKnockdown1', this.myDataRef) && this.myStatus.substr(0, 10) != 'melee_dash') { v10 = 6; } } } if (this.aimTimer == 0 || v2.melee && !this.targetEnemy.noDamage && ((v2.myDamageType == 'blunt' || v2.myDamageType == 'punch') && SwainMath.randomNumber(0, v10) == 0 && this.myDataRef.myScale >= this.targetEnemy.myDataRef.myScale)) { this.targetEnemy.applyKnockback(this, this.myDataRef.statSTR / 2, false); } v6 = true; break; } } } } } } } } } } } } } } ++v13; } } if (v6) { break; } ++v11; } if (!v6) { this.targetX += this.advanceX; this.targetY += this.advanceY; } v9 += this.bulletCheckDistance; } if (inMeleeDir == '') { var v24 = new Object(); this.myBlasts.push(v24); this.myBlasts[this.myBlasts.length - 1].myX = this.targetX; this.myBlasts[v23].myY = this.targetY; this.myBlasts[this.myBlasts.length - 1].myRot = this.bulletRotation; this.myBlasts[this.myBlasts.length - 1].myLength = SwainMath.get_distance2(this._x, this._y - this.myDataRef.myShootHeight * (this._yscale / 100) * v16, this.targetX, this.targetY); } ++v23; } }; storedv2.checkMeleeHit = function (hitType, hitHeight) { var v2 = this.myDataRef.myWeapons[this.myWeapon]; if (hitType == 'unarmed') { v2 = this.myDataRef.myUnarmed; } this.checkAttackHit(hitHeight, hitType, v2); }; storedv2.clearLockedAction = function (inAction) { if (inAction == 'execute') { this.interactTarget._visible = true; if (this.myFacing == 'right') { this._x += this.mySprite.spawn_player._x + this.mySprite._x; } else { this._x -= this.mySprite.spawn_player._x + this.mySprite._x; } this._y += this.mySprite.spawn_player._y + this.mySprite._y; } this.myStatus = 'idle'; this.interactType = ''; this.interactTarget = undefined; this.targetLock = false; }; storedv2.inputAllowed = function () { if (this.myStatus.substr(0, 4) == 'dead' || this.myStatus.substr(0, 5) == 'dying' || this.doorLock || this.targetLock || this._parent.characterHold) { return false; } else { return true; } }; storedv2.amBlocking = function (inTarget, inAttacker, thisWeapon) { return inTarget.blocking && (thisWeapon.melee || MadnessDataFile.havePerk('perkBlock1', inTarget.myDataRef)) && ((inTarget.myFacing == 'right' && !inTarget.facingOpposite || inTarget.myFacing == 'left' && inTarget.facingOpposite) && inTarget._x < inAttacker._x || (inTarget.myFacing == 'left' && !inTarget.facingOpposite || inTarget.myFacing == 'right' && inTarget.facingOpposite) && inTarget._x > inAttacker._x); }; storedv2.blockReset = function () { this.actionTimer = 1; this.recoilTimer = 14; MadnessCharacter.makeSpritePart(this, this.mySprite.handNone_front, 'Melee - Block' + String(SwainMath.randomNumber(2, 6))); }; storedv2.blockBullet = function (inSource, inX, inY, inWeapon) { var v2 = 0; while (v2 < SwainMath.randomNumber(2, 5)) { inSource.makeSparks(inX, inY, this._y, 'sparks'); ++v2; } if (!inWeapon.melee) { var v6; if (this.myFacing == 'left' && !this.facingOpposite || this.myFacing == 'right' && this.facingOpposite) { v6 = -1; } else { v6 = 1; } var v7 = SwainMath.randomNumber(-800, 800) / 100; this._parent.createParticle(inSource.myDataRef.myWeapons[inSource.myWeapon].myCasing, 'bullet', inX, inY, (SwainMath.randomNumber(-50, -10) / 10) * -v6, SwainMath.randomNumber(-150, -50) / 10, 90 * v6, SwainMath.randomNumber(-900, 900) / 10, 0.7, this._y + v7, 100, this._yscale * v6, true, 90); } }; storedv2.deflectBullet = function (inSource, inX, inY, inWeapon) { var v2 = 0; while (v2 < SwainMath.randomNumber(2, 5)) { inSource.makeSparks(inX, inY, this._y, 'sparks'); ++v2; } }; storedv2.makeSparks = function (inX, inY, inFloor, inSparkCat) { var v2; if (this.myFacing == 'left' && !this.facingOpposite || this.myFacing == 'right' && this.facingOpposite) { v2 = -1; } else { v2 = 1; } var v3 = SwainMath.randomNumber(-800, 800) / 100; this._parent.createParticle('spark' + SwainMath.randomNumber(1, 2), inSparkCat, inX, inY, (SwainMath.randomNumber(-70, -20) / 10) * v2, SwainMath.randomNumber(-200, -50) / 10, SwainMath.randomNumber(-180, 180), SwainMath.randomNumber(-900, 900) / 10, 0.7, inFloor + v3, 100, 100, false, 90); }; storedv2.ejectShell = function () { var v2; if (this.myFacing == 'left' && !this.facingOpposite || this.myFacing == 'right' && this.facingOpposite) { v2 = -1; } else { v2 = 1; } var v3 = SwainMath.randomNumber(-800, 800) / 100; this._parent.createParticle(this.myDataRef.myWeapons[this.myWeapon].myCasing, 'casing', this._x + 28 * v2, SwainMath.get_position(this._x, this._y - this.myDataRef.myShootHeight * (this._yscale / 100), SwainMath.calculate_rotation(this._x, this._y - this.myDataRef.myShootHeight * (this._yscale / 100), this.myAimX, this.myAimY), 35, 'y'), (SwainMath.randomNumber(-60, -30) / 10) * v2, SwainMath.randomNumber(-250, -150) / 10, SwainMath.calculate_rotation(this._x, this._y - this.myDataRef.myShootHeight * (this._yscale / 100), this.myAimX, this.myAimY), SwainMath.randomNumber(-900, 900) / 10, 0.7, this._y + v3, 100, this._yscale * v2, true, 90); }; storedv2.ejectClip = function () { var v2; if (this.myFacing == 'left' && !this.facingOpposite || this.myFacing == 'right' && this.facingOpposite) { v2 = -1; } else { v2 = 1; } var v3 = SwainMath.randomNumber(0, 500) / 100; this._parent.createParticle(this.myDataRef.myWeapons[this.myWeapon].myType, 'clip', this._x + 27 * v2, SwainMath.get_position(this._x, this._y - this.myDataRef.myShootHeight * (this._yscale / 100), SwainMath.calculate_rotation(this._x, this._y - this.myDataRef.myShootHeight, this.myAimX, this.myAimY), 35, 'y'), (SwainMath.randomNumber(-10, 10) / 10) * v2, 0, SwainMath.randomNumber(-50, 50) / 10, SwainMath.randomNumber(-40, 40) / 10, 0.6, this._y + v3, 100, this._yscale * v2, true, 90); }; storedv2.dropGun = function () { if (this.myDataRef.myWeapons[this.myWeapon] != undefined && !this.myDataRef.strongGrip) { var v2; if (this.myFacing == 'left' && !this.facingOpposite || this.myFacing == 'right' && this.facingOpposite) { v2 = -1; } else { v2 = 1; } var v3 = SwainMath.randomNumber(-300, 300) / 100; this._parent.createParticle(this.myDataRef.myWeapons[this.myWeapon].myType, 'gun', this._x + 20 * v2, this._y - 40 * this.myDataRef.myScale, (SwainMath.randomNumber(-10, 10) / 10) * v2 + this.mySpeedRight * SwainMath.randomNumber(50, 120) / 100, 0, -90 * v2 + SwainMath.randomNumber(-100, 100) / 10, SwainMath.randomNumber(-14, 14) / 10, 0.5, this._y + v3, 100, this._yscale * v2, true, 90, this.myDataRef.myWeapons[this.myWeapon]); if (this.myRoster != MadnessRoster.playerRoster && this.myDataRef.myWeapons[this.myWeapon].myClips > 0) { if (MadnessGameSelect.myDifficulty == 'easy' && MadnessGameSelect.gameMode == 'story') { if (this.myDataRef.myWeapons[this.myWeapon].myClips > 3) { this.myDataRef.myWeapons[this.myWeapon].myClips = 3; } } else { this.myDataRef.myWeapons[this.myWeapon].myClips = 0; } } this.myDataRef.myWeapons[this.myWeapon] = undefined; } }; storedv2.disarmGun = function () { if (this.myDataRef.myWeapons[this.myWeapon] != undefined && !this.myDataRef.strongGrip) { var v2; if (this.myFacing == 'left' && !this.facingOpposite || this.myFacing == 'right' && this.facingOpposite) { v2 = -1; } else { v2 = 1; } var v3 = SwainMath.randomNumber(-300, 300) / 100; this._parent.createParticle(this.myDataRef.myWeapons[this.myWeapon].myType, 'gun', this._x + 20 * v2, this._y - 40 * this.myDataRef.myScale, -16 * v2, -20, -90 * v2 + SwainMath.randomNumber(-100, 100) / 10, 50 * v2, 0.5, this._y + v3, 100, this._yscale * v2, true, 90, this.myDataRef.myWeapons[this.myWeapon]); if (this.myRoster != MadnessRoster.playerRoster && this.myDataRef.myWeapons[this.myWeapon].myClips > 0) { this.myDataRef.myWeapons[this.myWeapon].myClips = 0; } this.myDataRef.myWeapons[this.myWeapon] = undefined; } }; storedv2.disarmArmor = function (inArmor) { if (inArmor != undefined) { var v2; if (this.myFacing == 'left' && !this.facingOpposite || this.myFacing == 'right' && this.facingOpposite) { v2 = -1; } else { v2 = 1; } var v4 = SwainMath.randomNumber(-300, 300) / 100; this._parent.createParticle(inArmor.myType, 'helmet', this._x, this._y - 60 * this.myDataRef.myScale, -6 * v2, -20, -90 * v2 + SwainMath.randomNumber(-100, 100) / 10, 50 * v2, 0.5, this._y + v4, 100, this._yscale * v2, true, 90, this.myDataRef.myWeapons[this.myWeapon]); if (inArmor.myCat == 'hat') { this.myDataRef.myHat[0] = undefined; } if (inArmor.myCat == 'shirt') { this.myDataRef.myShirt[0] = undefined; } if (inArmor.myCat == 'mask') { this.myDataRef.myMask[0] = undefined; } if (inArmor.myCat == 'mouth') { this.myDataRef.myMouth[0] = undefined; } this.refreshArmor(); } }; goto 92561; label 92556: goto 125130; label 92561: storedv2.splatterCharacter = function (inLevel, inBlood, inDirMod, inX, inY, head) { var v3; var v12 = SwainMath.randomNumber(2, 2 + inLevel); var v2; if (inDirMod) { v2 = -1; } else { v2 = 1; } if (inLevel > 4) { inLevel = 4; } var v7 = MadnessCharacter.setPerspectiveScale(this._x, this._y, this.myRoom); var v6 = (SwainMath.randomNumber(10 + 20 * inLevel, 30 + 30 * inLevel) / 10) * v2; if (this.myDataRef.bulletEater) { v6 *= 0.2; } var v4 = 0; while (v4 < v12 * 1.5) { v3 = SwainMath.randomNumber(-800, 800) / 100; MadWorld.thisWorld.createParticle(inBlood + String(SwainMath.randomNumber(1, 3)), 'blood', inX + 20 * v2, inY, v6, SwainMath.randomNumber(-10 + inLevel * 2, -5), SwainMath.randomNumber(-180, 180), SwainMath.randomNumber(-130, 130) / 10, 0, this._y + v3, 100, v7 * v2, false, 90); ++v4; } if (head) { var v11 = 'chunk'; if (this.myDataRef.amZombie) { v11 += '_zombie'; } v4 = 0; while (v4 < inLevel - 2) { v3 = SwainMath.randomNumber(-800, 800) / 100; this._parent.createParticle(inBlood + SwainMath.randomNumber(1, 3), v11, inX + 20 * v2, inY, v6, SwainMath.randomNumber(-10 + inLevel * 2, -5), SwainMath.randomNumber(-180, 180), SwainMath.randomNumber(-130, 130) / 10, 0.5, this._y + v3, 100, v7 * v2, false, 90); ++v4; } } }; storedv1.makeSpritePart = function (inChar, inContainer, inID) { if (inID == 'remove2') { inContainer.myPart.removeMovieClip(); inContainer.partSprite._visible = true; } else { if (inContainer.myPart != undefined && inContainer.myPart.myID == inID && inID.substr(0, 4) == 'Part') { } else { if (inID.substr(0, 4) == 'Part') { inContainer.myPart.removeMovieClip(); inContainer.attachMovie(inID, 'myPart', inContainer.getNextHighestDepth()); MadnessCharacter.checkWounds(inChar); inContainer.stop(); inContainer.myPart.myID = inID; inContainer.myPart.stop(); inContainer.partSprite._visible = false; inContainer.myPart._x = 0; inContainer.myPart._y = 0; inContainer.myPart.cacheAsBitmap = true; } else { if (inID == 'remove3') { inContainer.myGun.removeMovieClip(); inContainer.myHand._visible = false; } else { if (inContainer.myHandSprite != undefined && inContainer.myHandSprite.myID == inID && inID == 'character_hand') { } else { if (inID == 'character_hand') { inContainer.myHandSprite.removeMovieClip(); inContainer.attachMovie(inID, 'myHandSprite', inContainer.getNextHighestDepth()); inContainer.stop(); inContainer.myHandSprite.myID = inID; inContainer.myHandSprite.stop(); inContainer.myHand._visible = false; inContainer.myHandSprite._x = 0; inContainer.myHandSprite._y = 0; } else { if (inID == 'remove') { inContainer.myGun.removeMovieClip(); inContainer.myHand._visible = false; } else { if (inContainer.myGun != undefined && inContainer.myGun.myID == inID) { } else { inContainer.myGun.removeMovieClip(); inContainer.attachMovie(inID, 'myGun', inContainer.getNextHighestDepth()); inContainer.stop(); inContainer.myGun.myID = inID; inContainer.myGun.stop(); inContainer.myHand._visible = false; inContainer.myHandSprite._visible = false; inContainer.myGun._x = -inContainer.myGun.myHand._x; inContainer.myGun._y = -inContainer.myGun.myHand._y; if (!inChar.myDataRef.noWieldGuns) { inContainer.myGun._x += inChar.myDataRef.myWeapons[inChar.myWeapon].xOffset; inContainer.myGun._y += inChar.myDataRef.myWeapons[inChar.myWeapon].yOffset; } } } } } } } } } }; storedv2.applySpeed = function (inSpeedX, inSpeedY) { if (this.myFacing == 'left') { inSpeedX *= -1; } this.mySpeedRight = inSpeedX * this.myDataRef.myScale; if (inSpeedY != undefined) { this.mySpeedDown = inSpeedY * this.myDataRef.myScale; } }; storedv2.applyYMove = function (inSpeed) { if (SwainMath.randomNumber(0, 1) == 0) { this.mySpeedDown = inSpeed; } else { this.mySpeedDown = -inSpeed; } }; storedv2.generalStaggerMovement = function () { if (SwainMath.randomNumber(0, 1) == 0) { this.applySpeed(SwainMath.randomNumber(-5, -1), SwainMath.randomNumber(-2, 2)); } else { this.applySpeed(SwainMath.randomNumber(1, 5), SwainMath.randomNumber(-2, 2)); } }; storedv2.enemyInFront = function (inEnemy) { return inEnemy._x > this._x && this.myFacing == 'right' || inEnemy._x < this._x && this.myFacing == 'left'; }; storedv1.adjustSprite = function (inChar) { MadnessCharacter.makeSpritePart(inChar, inChar.mySprite.myHead, 'Parts - Head'); inChar.mySprite.myHead.myPart.gotoAndStop(inChar.myDataRef.headType); MadnessCharacter.makeSpritePart(inChar, inChar.mySprite.myBody, 'Parts - Body'); inChar.mySprite.myBody.myPart.gotoAndStop(inChar.myDataRef.bodyType); if (inChar.myFacing == 'left' || inChar.myFacing == 'right' && inChar.myDataRef.myWeapons[inChar.myWeapon].twoHand && (inChar.myAimX <= inChar._x && inChar.myFacing == 'right' || inChar.myAimX >= inChar._x && inChar.myFacing == 'left') && inChar.reloadTimer == -1) { inChar.mySprite.myBody.myPart.nextFrame(); } if (inChar.myFacing == 'left' && !inChar.facingOpposite || inChar.myFacing == 'right' && inChar.facingOpposite) { inChar.mySprite.myHead.myPart.nextFrame(); } if (inChar.myFacing == 'right' && inChar.myDataRef.myWeapons[inChar.myWeapon].twoHand && inChar.facingOpposite) { inChar.mySprite.myBody.myPart._xscale = -100; } else { inChar.mySprite.myBody.myPart._xscale = 100; } if (inChar.myAimX != undefined && inChar.myStatus != 'recover' && inChar.myStatus != 'stun' && inChar.myStatus != 'startup' && inChar.myStatus != 'magic' && inChar.myHealth > 0) { var v5; if (inChar.myDataRef.myWeapons[inChar.myWeapon] == undefined && (inChar.myFacing == 'right' && inChar.myAimX < inChar._x || inChar.myFacing == 'left' && inChar.myAimX > inChar._x)) { v5 = 90; } else { if (inChar.myAimX > inChar._x) { v5 = SwainMath.calculate_rotation(inChar._x, inChar._y - 65, inChar.myAimX, inChar.myAimY); } else { v5 = -SwainMath.calculate_rotation(inChar._x, inChar._y - 65, inChar.myAimX, inChar.myAimY); } } if (v5 < 70) { v5 = 70; } if (v5 > 110) { v5 = 110; } v5 -= 90; inChar.mySprite.myHead.myPart._rotation += (v5 - inChar.mySprite.myHead.myPart._rotation) / 3; inChar.mySprite.myHead.myPart._x = SwainMath.get_position(-5, 34, inChar.mySprite.myBody.myPart._rotation + 6 + v5 / 2.5, 36, 'x'); inChar.mySprite.myHead.myPart._y = SwainMath.get_position(-5, 34, inChar.mySprite.myBody.myPart._rotation + 6 + (5 + v5 / 2.5), 36 - (5 + v5 / 2.5) / 5, 'y'); } inChar.mySprite.myHead.myPart.headSprite.gotoAndStop(1 + inChar.headDamage * 5); inChar.mySprite.myBody.myPart.bodySprite.gotoAndStop(1 + inChar.bodyDamage * 5); var v4 = 0; while (v4 < inChar.headSpray) { inChar.mySprite.myHead.myPart.headSprite.nextFrame(); ++v4; } v4 = 0; while (v4 < inChar.bodySpray) { inChar.mySprite.myBody.myPart.bodySprite.nextFrame(); ++v4; } if (MadnessGameSelect.gameMode == 'arena' && MadnessGameSelect.subGameMode != 'zombie' && inChar.myFaction == MadnessRoster.playerRoster.teamFaction && inChar.myDataRef != MadnessRoster.playerRoster.teamLeader) { inChar.mySprite.myBody.myPart.teamColor._visible = true; inChar.mySprite.myBody.myPart.teamColor.gotoAndStop('green'); } else { inChar.mySprite.myBody.myPart.teamColor._visible = false; inChar.mySprite.myBody.myPart.teamColor.stop(); } var v9; if (inChar.myWeapon == 0) { v9 = 1; } if (inChar.myWeapon == 1) { v9 = 0; } if (inChar.myWeapon == 2) { v9 = 99; } if (inChar.myDataRef.myWeapons[v9] == undefined) { inChar.mySprite.myBody.myPart.myBackup._visible = false; inChar.mySprite.myBody.myPart.myBackup.gotoAndStop('none'); } else { inChar.mySprite.myBody.myPart.myBackup._visible = true; inChar.mySprite.myBody.myPart.myBackup.gotoAndStop(inChar.myDataRef.myWeapons[v9].myType); inChar.mySprite.myBody.myPart.myBackup.myGun = inChar.myDataRef.myWeapons[v9]; } MadnessCharacter.makeSpritePart(inChar, inChar.mySprite.handNone_back, 'character_hand'); MadnessCharacter.makeSpritePart(inChar, inChar.mySprite.handNone_front, 'character_hand'); MadnessCharacter.makeSpritePart(inChar, inChar.mySprite.handShoot_back, 'character_hand'); MadnessCharacter.makeSpritePart(inChar, inChar.mySprite.handShoot_front, 'character_hand'); inChar.mySprite.handNone_back.myHand._visible = false; inChar.mySprite.handShoot_back.myHand._visible = false; inChar.mySprite.handNone_front.myHand._visible = false; inChar.mySprite.handShoot_front.myHand._visible = false; var v2 = inChar.myDataRef.myWeapons[inChar.myWeapon]; if (v2 == undefined) { MadnessCharacter.makeSpritePart(inChar, inChar.mySprite.handNone_back, 'remove'); MadnessCharacter.makeSpritePart(inChar, inChar.mySprite.handNone_front, 'remove'); MadnessCharacter.makeSpritePart(inChar, inChar.mySprite.handShoot_back, 'remove'); MadnessCharacter.makeSpritePart(inChar, inChar.mySprite.handShoot_front, 'remove'); } else { if (v2.melee) { if (inChar.blocking) { if (inChar.mySprite.handNone_front.myGun.myID.substr(0, 13) != 'Melee - Block') { MadnessCharacter.makeSpritePart(inChar, inChar.mySprite.handNone_front, v2.myTag + ' - Block'); } inChar.mySprite.handNone_front.myGun.myMelee.gotoAndStop(v2.myType); inChar.mySprite.handNone_front.myGun.myHand.gotoAndStop('hand_back'); inChar.mySprite.handNone_front.myGun.myHand2.gotoAndStop('hand_back'); inChar.mySprite.handNone_front.myGun.gotoAndStop(inChar.actionTimer); } else { if (inChar.myFacing == 'left' && !inChar.facingOpposite || inChar.myFacing == 'right' && inChar.facingOpposite) { MadnessCharacter.makeSpritePart(inChar, inChar.mySprite.handNone_back, v2.myTag + ' - L'); MadnessCharacter.makeSpritePart(inChar, inChar.mySprite.handNone_front, 'remove'); MadnessCharacter.makeSpritePart(inChar, inChar.mySprite.handShoot_back, v2.myTag + ' - L'); MadnessCharacter.makeSpritePart(inChar, inChar.mySprite.handShoot_front, 'remove'); inChar.mySprite.handNone_back.myGun.myMelee.gotoAndStop(v2.myType); inChar.mySprite.handShoot_back.myGun.myMelee.gotoAndStop(v2.myType); inChar.mySprite.handNone_front.gotoAndStop('hand_front'); inChar.mySprite.handShoot_front.gotoAndStop('hand_front'); } else { if (inChar.myFacing == 'right' && !inChar.facingOpposite || inChar.myFacing == 'left' && inChar.facingOpposite) { MadnessCharacter.makeSpritePart(inChar, inChar.mySprite.handNone_front, v2.myTag + ' - R'); MadnessCharacter.makeSpritePart(inChar, inChar.mySprite.handNone_back, 'remove'); MadnessCharacter.makeSpritePart(inChar, inChar.mySprite.handShoot_front, v2.myTag + ' - R'); MadnessCharacter.makeSpritePart(inChar, inChar.mySprite.handShoot_back, 'remove'); inChar.mySprite.handNone_front.myGun.myMelee.gotoAndStop(v2.myType); inChar.mySprite.handShoot_front.myGun.myMelee.gotoAndStop(v2.myType); } } } } else { if (inChar.myFacing == 'left' && !inChar.facingOpposite || inChar.myFacing == 'right' && inChar.facingOpposite) { if (inChar.reloadTimer == -1) { MadnessCharacter.makeSpritePart(inChar, inChar.mySprite.handNone_back, v2.myTag + ' - Fire L'); MadnessCharacter.makeSpritePart(inChar, inChar.mySprite.handShoot_back, v2.myTag + ' - Fire L'); } else { MadnessCharacter.makeSpritePart(inChar, inChar.mySprite.handNone_back, v2.myTag + ' - Reload L'); MadnessCharacter.makeSpritePart(inChar, inChar.mySprite.handShoot_back, v2.myTag + ' - Reload L'); } MadnessCharacter.makeSpritePart(inChar, inChar.mySprite.handNone_front, 'remove'); MadnessCharacter.makeSpritePart(inChar, inChar.mySprite.handShoot_front, 'remove'); } if (inChar.myFacing == 'right' && !inChar.facingOpposite || inChar.myFacing == 'left' && inChar.facingOpposite) { if (inChar.reloadTimer == -1) { MadnessCharacter.makeSpritePart(inChar, inChar.mySprite.handNone_front, v2.myTag + ' - Fire R'); MadnessCharacter.makeSpritePart(inChar, inChar.mySprite.handShoot_front, v2.myTag + ' - Fire R'); } else { MadnessCharacter.makeSpritePart(inChar, inChar.mySprite.handNone_front, v2.myTag + ' - Reload R'); MadnessCharacter.makeSpritePart(inChar, inChar.mySprite.handShoot_front, v2.myTag + ' - Reload R'); } MadnessCharacter.makeSpritePart(inChar, inChar.mySprite.handNone_back, 'remove'); MadnessCharacter.makeSpritePart(inChar, inChar.mySprite.handShoot_back, 'remove'); } } } if (inChar.myDataRef.amZombie || inChar.myDataRef.amAbom) { inChar.mySprite.handNone_back.myHandSprite.gotoAndStop('hand_back_open'); inChar.mySprite.handShoot_back.myHandSprite.gotoAndStop('hand_back_open'); inChar.mySprite.handNone_front.myHandSprite.gotoAndStop('hand_front_open'); inChar.mySprite.handShoot_front.myHandSprite.gotoAndStop('hand_front_open'); } else { inChar.mySprite.handNone_back.myHandSprite.gotoAndStop('hand_back'); inChar.mySprite.handShoot_back.myHandSprite.gotoAndStop('hand_back'); inChar.mySprite.handNone_front.myHandSprite.gotoAndStop('hand_front'); inChar.mySprite.handShoot_front.myHandSprite.gotoAndStop('hand_front'); } inChar.mySprite.handNone_back.myHandSprite.myHand.gotoAndStop(inChar.myDataRef.handType); inChar.mySprite.handNone_front.myHandSprite.myHand.gotoAndStop(inChar.myDataRef.handType); inChar.mySprite.handShoot_back.myHandSprite.myHand.gotoAndStop(inChar.myDataRef.handType); inChar.mySprite.handShoot_front.myHandSprite.myHand.gotoAndStop(inChar.myDataRef.handType); inChar.mySprite.handNone_back.myGun.myHand.gotoAndStop(inChar.myDataRef.handType); inChar.mySprite.handNone_back.myGun.myHand2.gotoAndStop(inChar.myDataRef.handType); inChar.mySprite.handNone_front.myGun.myHand.gotoAndStop(inChar.myDataRef.handType); inChar.mySprite.handNone_front.myGun.myHand2.gotoAndStop(inChar.myDataRef.handType); inChar.mySprite.handShoot_back.myGun.myHand.gotoAndStop(inChar.myDataRef.handType); inChar.mySprite.handShoot_back.myGun.myHand2.gotoAndStop(inChar.myDataRef.handType); inChar.mySprite.handShoot_front.myGun.myHand.gotoAndStop(inChar.myDataRef.handType); inChar.mySprite.handShoot_front.myGun.myHand2.gotoAndStop(inChar.myDataRef.handType); inChar.mySprite.myHand.myHand.gotoAndStop(inChar.myDataRef.handType); inChar.mySprite.myHand2.myHand.gotoAndStop(inChar.myDataRef.handType); inChar.mySprite.myHand.gotoAndStop(inChar.myDataRef.handType); inChar.mySprite.myHand2.gotoAndStop(inChar.myDataRef.handType); if (inChar.blocking) { inChar.mySprite.handNone_front._visible = true; inChar.mySprite.handShoot_front._visible = false; inChar.mySprite.handNone_back._visible = false; inChar.mySprite.handShoot_back._visible = false; } else { if (inChar.myStatus.substr(0, 7) == 'unarmed' || inChar.myStatus.substr(0, 5) == 'melee' || inChar.myStatus.substr(0, 7) == 'execute' || inChar.myStatus == 'swap' || inChar.myStatus == 'startup' || inChar.myStatus == 'pickup' || inChar.myStatus == 'magic' || inChar.myStatus.substr(-6, 5) == 'parry' || inChar.myStatus.substr(0, 4) == 'stun') { if (inChar.myFacing == 'right') { inChar.mySprite.handNone_front._visible = false; inChar.mySprite.handShoot_front._visible = true; inChar.mySprite.handNone_back._visible = true; inChar.mySprite.handShoot_back._visible = false; } if (inChar.myFacing == 'left') { inChar.mySprite.handNone_front._visible = true; inChar.mySprite.handShoot_front._visible = false; inChar.mySprite.handNone_back._visible = false; inChar.mySprite.handShoot_back._visible = true; } } else { if (v2 != undefined && inChar.reloadTimer > -1) { if (inChar.myFacing == 'right') { inChar.mySprite.handNone_front._visible = false; inChar.mySprite.handShoot_front._visible = true; inChar.mySprite.handNone_back._visible = true; inChar.mySprite.handShoot_back._visible = false; } if (inChar.myFacing == 'left') { inChar.mySprite.handNone_front._visible = true; inChar.mySprite.handShoot_front._visible = false; inChar.mySprite.handNone_back._visible = false; inChar.mySprite.handShoot_back._visible = true; } inChar.mySprite.handShoot_back.myGun.gotoAndStop(inChar.rofLastFrame); inChar.mySprite.handShoot_front.myGun.gotoAndStop(inChar.rofLastFrame); v4 = inChar.mySprite.handShoot_back.myGun._currentframe; while (v4 < inChar.reloadTimer + 1) { inChar.mySprite.handShoot_back.myGun.nextFrame(); ++v4; } inChar.mySprite.handShoot_front.myGun.gotoAndStop(inChar.rofLastFrame); v4 = inChar.mySprite.handShoot_front.myGun._currentframe; while (v4 < inChar.reloadTimer + 1) { inChar.mySprite.handShoot_front.myGun.nextFrame(); ++v4; } if (inChar.mySprite.handShoot_back.myGun._currentframe != undefined) { inChar.rofLastFrame = inChar.mySprite.handShoot_back.myGun._currentframe; } else { inChar.rofLastFrame = inChar.mySprite.handShoot_front.myGun._currentframe; } if (inChar.reloadTimer + 1 > inChar.mySprite.handShoot_back.myGun._totalframes) { inChar.mySprite.handShoot_back.myGun.gotoAndStop(inChar.mySprite.handShoot_back.myGun._totalframes); } if (inChar.reloadTimer + 1 > inChar.mySprite.handShoot_front.myGun._totalframes) { inChar.mySprite.handShoot_front.myGun.gotoAndStop(inChar.mySprite.handShoot_front.myGun._totalframes); } } else { if (inChar.aimTimer > -1 || v2 != undefined && inChar.rofTimer < v2.myROF + inChar.shootWaitBuffer && (inChar.myStatus == 'incap' || inChar.myStatus == 'cover' || inChar.myStatus == 'idle' || inChar.myStatus == 'run' || inChar.myStatus == 'backtrack' || inChar.myStatus == 'dash' || inChar.myStatus == 'tactics')) { if (inChar.myFacing == 'right' && !inChar.facingOpposite || inChar.myFacing == 'left' && inChar.facingOpposite) { inChar.mySprite.handNone_front._visible = false; inChar.mySprite.handShoot_front._visible = true; inChar.mySprite.handNone_back._visible = true; inChar.mySprite.handShoot_back._visible = false; } if (inChar.myFacing == 'left' && !inChar.facingOpposite || inChar.myFacing == 'right' && inChar.facingOpposite) { inChar.mySprite.handNone_front._visible = true; inChar.mySprite.handShoot_front._visible = false; inChar.mySprite.handNone_back._visible = false; inChar.mySprite.handShoot_back._visible = true; } inChar.mySprite.handShoot_back.myGun.gotoAndStop(inChar.rofLastFrame); inChar.mySprite.handShoot_front.myGun.gotoAndStop(inChar.rofLastFrame); v4 = inChar.mySprite.handShoot_back.myGun._currentframe; while (v4 < inChar.rofTimer + 1) { inChar.mySprite.handShoot_back.myGun.nextFrame(); ++v4; } inChar.mySprite.handShoot_front.myGun.gotoAndStop(inChar.rofLastFrame); v4 = inChar.mySprite.handShoot_front.myGun._currentframe; while (v4 < inChar.rofTimer + 1) { inChar.mySprite.handShoot_front.myGun.nextFrame(); ++v4; } if (inChar.mySprite.handShoot_back.myGun._currentframe != undefined) { inChar.rofLastFrame = inChar.mySprite.handShoot_back.myGun._currentframe; } else { inChar.rofLastFrame = inChar.mySprite.handShoot_front.myGun._currentframe; } if (inChar.rofTimer + 1 > inChar.mySprite.handShoot_back.myGun._totalframes) { inChar.mySprite.handShoot_back.myGun.gotoAndStop(inChar.mySprite.handShoot_back.myGun._totalframes); } if (inChar.rofTimer + 1 > inChar.mySprite.handShoot_front.myGun._totalframes) { inChar.mySprite.handShoot_front.myGun.gotoAndStop(inChar.mySprite.handShoot_front.myGun._totalframes); } if (inChar.rofTimer < inChar.mySprite.handShoot_front.myGun.myBlast._totalframes) { inChar.mySprite.handShoot_front.myGun.myBlast.gotoAndStop(inChar.rofTimer); } if (inChar.rofTimer < inChar.mySprite.handShoot_back.myGun.myBlast._totalframes) { inChar.mySprite.handShoot_back.myGun.myBlast.gotoAndStop(inChar.rofTimer); } } else { inChar.mySprite.handNone_back._visible = true; inChar.mySprite.handShoot_back._visible = false; inChar.mySprite.handNone_front._visible = true; inChar.mySprite.handShoot_front._visible = false; if (v2 != undefined) { if (inChar.myFacing == 'left' && !inChar.facingOpposite || inChar.myFacing == 'right' && inChar.facingOpposite) { inChar.mySprite.handNone_back.myGun.gotoAndStop(1); } else { inChar.mySprite.handNone_front.myGun.gotoAndStop(1); } } if (inChar.rofTimer < inChar.mySprite.handNone_front.myGun.myBlast._totalframes) { inChar.mySprite.handNone_front.myGun.myBlast.gotoAndStop(inChar.rofTimer); } if (inChar.rofTimer < inChar.mySprite.handNone_back.myGun.myBlast._totalframes) { inChar.mySprite.handNone_back.myGun.gotoAndStop(inChar.rofTimer); } } } } } if (v2.twoHand && !inChar.myDataRef.amZombie && !inChar.myDataRef.amAbom) { if (inChar.myFacing == 'left' && !inChar.facingOpposite || inChar.myFacing == 'right' && inChar.facingOpposite) { inChar.mySprite.handShoot_front._visible = false; inChar.mySprite.handNone_front._visible = false; } if (inChar.myFacing == 'right' && !inChar.facingOpposite || inChar.myFacing == 'left' && inChar.facingOpposite) { inChar.mySprite.handShoot_back._visible = false; inChar.mySprite.handNone_back._visible = false; } } else { inChar.mySprite.handNone_front.myGun.myHand2._visible = false; inChar.mySprite.handShoot_front.myGun.myHand2._visible = false; inChar.mySprite.handNone_back.myGun.myHand2._visible = false; inChar.mySprite.handShoot_back.myGun.myHand2._visible = false; inChar.mySprite.myHand.myGun.myHand2._visible = false; inChar.mySprite.myHand2.myGun.myHand2._visible = false; } var v8; v8 = inChar.rofTimer; var v3; var v7; if (inChar.mySprite.handShoot_front._visible) { v3 = inChar.mySprite.handShoot_front; v7 = inChar.mySprite.handNone_front; } else { if (inChar.mySprite.handShoot_back._visible) { v3 = inChar.mySprite.handShoot_back; v7 = inChar.mySprite.handNone_back; } } if (v8 < v2.myROF + inChar.shootWaitBuffer * 0.5) { inChar.lastGunX = v3.myGun._x; inChar.lastGunY = v3.myGun._y; inChar.lastGunRot = v3._rotation; } if (inChar.reloadTimer == -1 && v8 > v2.myROF + inChar.shootWaitBuffer * 0.5 && inChar.myStatus.substr(0, 5) != 'melee' && inChar.myStatus.substr(0, 7) != 'unarmed' && v8 <= v2.myROF + inChar.shootWaitBuffer) { var v6 = new Object(); v6.x = v7.myGun._x; v6.y = v7.myGun._y; v7.localToGlobal(v6); v3.globalToLocal(v6); v3.myGun._x = inChar.lastGunX; v3.myGun._y = inChar.lastGunY; v3._rotation = inChar.lastGunRot; if (v7._rotation - v3._rotation > 180) { v3._rotation += (v7._rotation - v3._rotation - 360) / (inChar.shootWaitBuffer + v2.myROF - v8 + 2) * 0.2; } else { v3._rotation += (v7._rotation - v3._rotation) / (inChar.shootWaitBuffer + v2.myROF - v8 + 2) * 0.2; } SwainMath.move_me(v3.myGun, SwainMath.calculate_rotation(v3.myGun._x, v3.myGun._y, v6.x, v6.y), SwainMath.get_distance2(v3.myGun._x, v3.myGun._y, v6.x, v6.y) / (inChar.shootWaitBuffer + v2.myROF - v8 + 5) * 0.2); inChar.lastGunX = v3.myGun._x; inChar.lastGunY = v3.myGun._y; inChar.lastGunRot = v3._rotation; } else { if (inChar.rofTimer == 1) { inChar.mySprite.handShoot_front.myGun._x = -inChar.mySprite.handShoot_front.myGun.myHand._x + inChar.myDataRef.myWeapons[inChar.myWeapon].xOffset; inChar.mySprite.handShoot_front.myGun._y = -inChar.mySprite.handShoot_front.myGun.myHand._y + inChar.myDataRef.myWeapons[inChar.myWeapon].yOffset; inChar.mySprite.handShoot_back.myGun._x = -inChar.mySprite.handShoot_back.myGun.myHand._x + inChar.myDataRef.myWeapons[inChar.myWeapon].xOffset; inChar.mySprite.handShoot_back.myGun._y = -inChar.mySprite.handShoot_back.myGun.myHand._y + inChar.myDataRef.myWeapons[inChar.myWeapon].yOffset; } if (!v2.melee && inChar.myStatus.substr(0, 7) != 'unarmed' && inChar.myStatus.substr(0, 5) != 'melee' && v2 != undefined && inChar.myStatus != 'swap' && inChar.myStats != 'recover' && inChar.myStatus != 'startup' && inChar.myStatus != 'pickup' && inChar.myStatus.substr(0, 4) != 'stun' && inChar.myStatus != 'magic') { if (inChar.reloadTimer > -1) { inChar.mySprite.handShoot_front._rotation = -30; inChar.mySprite.handShoot_back._rotation = -30; } else { if (inChar.myAimX <= inChar._x && inChar.myFacing == 'right' || inChar.myAimX >= inChar._x && inChar.myFacing == 'left') { inChar.mySprite.handShoot_front._rotation = -90 - SwainMath.calculate_rotation(inChar._x - inChar.mySprite.handShoot_front._x, inChar._y - inChar.mySprite.handShoot_front._y, inChar.myAimX, inChar.myAimY); inChar.mySprite.handShoot_back._rotation = -90 + SwainMath.calculate_rotation(inChar._x + inChar.mySprite.handShoot_back._x, inChar._y - inChar.mySprite.handShoot_back._y, inChar.myAimX, inChar.myAimY); } else { inChar.mySprite.handShoot_front._rotation = -90 + SwainMath.calculate_rotation(inChar._x - inChar.mySprite.handShoot_front._x, inChar._y - inChar.mySprite.handShoot_front._y, inChar.myAimX, inChar.myAimY); inChar.mySprite.handShoot_back._rotation = -90 - SwainMath.calculate_rotation(inChar._x + inChar.mySprite.handShoot_back._x, inChar._y - inChar.mySprite.handShoot_back._y, inChar.myAimX, inChar.myAimY); } if (inChar._rotation > 0 && !inChar.facingOpposite || inChar._rotation < 0 && inChar.facingOpposite) { inChar.mySprite.handShoot_front._rotation += inChar._rotation; inChar.mySprite.handShoot_back._rotation += inChar._rotation; } else { inChar.mySprite.handShoot_front._rotation -= inChar._rotation; inChar.mySprite.handShoot_back._rotation -= inChar._rotation; } } } } if (inChar.myDataRef.noHands) { inChar.mySprite.handShoot_back._visible = false; inChar.mySprite.handShoot_front._visible = inChar.mySprite.handShoot_back._visible; inChar.mySprite.handNone_back._visible = false; inChar.mySprite.handNone_front._visible = inChar.mySprite.handNone_back._visible; inChar.mySprite.myHand2._visible = false; inChar.mySprite.myHand._visible = inChar.mySprite.myHand2._visible; } else { if (inChar.mySprite.handShoot_front == undefined && inChar.mySprite.handShoot_back == undefined && inChar.mySprite.handNone_front == undefined && inChar.mySprite.handNone_back == undefined) { } else { if (inChar.mySprite.myHand != undefined) { if (inChar.mySprite.handShoot_front._visible) { inChar.mySprite.handShoot_front.myGun.myHand._visible = false; inChar.mySprite.handShoot_front.myGun.myHand2._visible = false; inChar.mySprite.myHand._visible = true; inChar.mySprite.handNone_back._visible = true; inChar.mySprite.myHand2._visible = false; } else { if (inChar.mySprite.handShoot_front != undefined) { } else { if (inChar.mySprite.handShoot_front == undefined && inChar.myFacing == 'right') { inChar.mySprite.handNone_back._visible = true; inChar.mySprite.myHand2._visible = false; } } } } else { inChar.mySprite.handShoot_front.myGun.myHand._visible = true; if (!inChar.myDataRef.amZombie && !inChar.myDataRef.amAbom) { inChar.mySprite.handShoot_front.myGun.myHand2._visible = true; } } if (inChar.mySprite.myHand2 != undefined) { if (inChar.mySprite.handShoot_back._visible) { inChar.mySprite.handShoot_back.myGun.myHand._visible = false; inChar.mySprite.handShoot_back.myGun.myHand2._visible = false; inChar.mySprite.myHand2._visible = true; inChar.mySprite.handNone_front._visible = true; inChar.mySprite.myHand._visible = false; } else { if (inChar.mySprite.handShoot_back != undefined) { } else { if (inChar.mySprite.handShoot_back == undefined && inChar.myFacing == 'left') { inChar.mySprite.handNone_front._visible = true; inChar.mySprite.myHand._visible = false; } } } } else { inChar.mySprite.handShoot_back.myGun.myHand._visible = true; if (!inChar.myDataRef.amZombie && !inChar.myDataRef.amAbom) { inChar.mySprite.handShoot_back.myGun.myHand2._visible = true; } } } } ItemGenerator.setItemSprite(inChar.mySprite.handNone_front.myGun.myMelee.mySprite, v2); ItemGenerator.setItemSprite(inChar.mySprite.handNone_back.myGun.myMelee.mySprite, v2); ItemGenerator.setItemSprite(inChar.mySprite.handShoot_front.myGun.myMelee.mySprite, v2); ItemGenerator.setItemSprite(inChar.mySprite.handShoot_back.myGun.myMelee.mySprite, v2); if (inChar.myWeapon == 0) { ItemGenerator.setItemSprite(inChar.mySprite.myBody.myPart.myBackup.mySprite, inChar.myDataRef.myWeapons[1]); } else { ItemGenerator.setItemSprite(inChar.mySprite.myBody.myPart.myBackup.mySprite, inChar.myDataRef.myWeapons[0]); } if (inChar.myDataRef.myCharacter == 'tricky' && (inChar.myHealth > 0 || inChar.myStatus.substr(0, 7) == 'wounded')) { if (inChar.mySprite._currentframe <= 2) { inChar.myHeadStartX = -6.5; inChar.myHeadStartY = -2; inChar.myHeadRot = 0; inChar.myHand1StartX = inChar.mySprite.handNone_front.myHand._x; inChar.myHand1StartY = inChar.mySprite.handNone_front.myHand._y; inChar.myHand1Rot = inChar.mySprite.handNone_front.myHand._rotation; inChar.myHand2StartX = inChar.mySprite.handNone_back.myHand._x; inChar.myHand2StartY = inChar.mySprite.handNone_back.myHand._y; inChar.myHand2Rot = inChar.mySprite.handNone_back.myHand._rotation; } inChar.mySprite.myHead.myPart.headSprite._x = inChar.myHeadStartX + SwainMath.randomNumber(-15, 15) / 10; inChar.mySprite.myHead.myPart.headSprite._y = inChar.myHeadStartY + SwainMath.randomNumber(-15, 15) / 10; inChar.mySprite.myHead.myPart.headSprite._rotation = inChar.myHeadRot + SwainMath.randomNumber(-40, 40) / 10; inChar.mySprite.handNone_front.myHand._x = inChar.myHand1StartX + SwainMath.randomNumber(-15, 15) / 10; inChar.mySprite.handNone_front.myHand._y = inChar.myHand1StartY + SwainMath.randomNumber(-15, 15) / 10; inChar.mySprite.handNone_front.myHand._rotation = inChar.myHand1Rot + SwainMath.randomNumber(-40, 40) / 10; inChar.mySprite.handNone_back.myHand._x = inChar.myHand2StartX + SwainMath.randomNumber(-15, 15) / 10; inChar.mySprite.handNone_back.myHand._y = inChar.myHand2StartY + SwainMath.randomNumber(-15, 15) / 10; inChar.mySprite.handNone_back.myHand._rotation = inChar.myHand2Rot + SwainMath.randomNumber(-40, 40) / 10; } if (inChar.interactTarget != undefined) { inChar.mySprite.hisHead.gotoAndStop(inChar.interactTarget.myDataRef.myCharacter); inChar.mySprite.hisBody.gotoAndStop(inChar.interactTarget.myDataRef.myCharacter); if (inChar.mySprite.flipPartner && inChar.myFacing == 'right') { inChar.mySprite.hisHead.nextFrame(); inChar.mySprite.hisBody.nextFrame(); } inChar.mySprite.hisHand.myHand.gotoAndStop(inChar.interactTarget.myDataRef.handType); inChar.mySprite.hisHand2.myHand.gotoAndStop(inChar.interactTarget.myDataRef.handType); } if (inChar.headDamage > 3 || inChar.myDataRef.myHat[inChar.myHat] == undefined) { inChar.mySprite.myHead.myPart.myHat._visible = false; inChar.mySprite.myHead.myPart.myHat2._visible = false; } else { inChar.mySprite.myHead.myPart.myHat._visible = true; inChar.mySprite.myHead.myPart.myHat2._visible = true; inChar.mySprite.myHead.myPart.myHat.gotoAndStop(inChar.myDataRef.myHat[inChar.myHat].myType); inChar.mySprite.myHead.myPart.myHat2.gotoAndStop(inChar.myDataRef.myHat[inChar.myHat].myType); inChar.mySprite.myHead.myPart.myHat.inHat.gotoAndStop(Math.ceil(inChar.myDataRef.myHat[inChar.myHat].myIntegrity)); inChar.mySprite.myHead.myPart.myHat2.inHat.gotoAndStop(Math.ceil(inChar.myDataRef.myHat[inChar.myHat].myIntegrity)); } if (inChar.headDamage > 3 || inChar.myDataRef.myMask[inChar.myMask] == undefined) { inChar.mySprite.myHead.myPart.myMask._visible = false; } else { inChar.mySprite.myHead.myPart.myMask._visible = true; if (inChar.myDataRef.myMask[inChar.myMask].flipMe) { if (inChar.myFacing == 'right') { inChar.mySprite.myHead.myPart.myMask.gotoAndStop(inChar.myDataRef.myMask[inChar.myMask].myType + '_R'); } else { inChar.mySprite.myHead.myPart.myMask.gotoAndStop(inChar.myDataRef.myMask[inChar.myMask].myType + '_L'); } } else { inChar.mySprite.myHead.myPart.myMask.gotoAndStop(inChar.myDataRef.myMask[inChar.myMask].myType); } } if (inChar.headDamage > 3 || inChar.myDataRef.myMouth[inChar.myMouth] == undefined) { inChar.mySprite.myHead.myPart.myMouth._visible = false; } else { inChar.mySprite.myHead.myPart.myMouth._visible = true; inChar.mySprite.myHead.myPart.myMouth.gotoAndStop(inChar.myDataRef.myMouth[inChar.myMouth].myType); } if (inChar.myDataRef.myShirt[inChar.myShirt] == undefined) { inChar.mySprite.myBody.myPart.myShirt._visible = false; } else { inChar.mySprite.myBody.myPart.myShirt._visible = true; inChar.mySprite.myBody.myPart.myShirt.gotoAndStop(inChar.myDataRef.myShirt[inChar.myShirt].myType); inChar.mySprite.myBody.myPart.myShirt.inShirt.gotoAndStop(Math.ceil(inChar.myDataRef.myShirt[inChar.myShirt].myIntegrity)); } }; storedv1.setPerspectiveScale = function (inX, inY, inRoom) { var v5 = 100; if (inRoom.amStairs) { var v7 = SwainMath.get_distance2(inX, inY, inRoom.myDL._x, inRoom.myDL._y) + SwainMath.get_distance2(inX, inY, inRoom.myUL._x, inRoom.myUL._y); var v9 = SwainMath.get_distance2(inX, inY, inRoom.myDR._x, inRoom.myDR._y) + SwainMath.get_distance2(inX, inY, inRoom.myUR._x, inRoom.myUR._y); var v3 = 1 - (v7 - inRoom.leftWidth) / (inRoom.upWidth + inRoom.downWidth - inRoom.leftWidth); var v2 = 1 - (v9 - inRoom.rightWidth) / (inRoom.upWidth + inRoom.downWidth - inRoom.rightWidth); if (v2 < 0) { v2 = 0; } if (v2 > 1) { v2 = 1; } if (v3 < 0) { v3 = 0; } if (v3 > 1) { v3 = 1; } var v8 = inRoom.myDL._y * v3 + inRoom.myDR._y * v2; v5 = 100 - (v8 - inY + inRoom.ystart) / 15; return v5; } v5 = 100 - (inRoom.myDL._y - inY + inRoom.ystart) / 15; return v5; }; storedv2.attractToDoor = function (inDoor) { this.attractToMC(inDoor, 'door'); this.targetDoor = inDoor; this.myMission = 'leave'; this.doorLock = true; if (this.myRoster == MadnessRoster.playerRoster) { this._parent.followDoor = inDoor; } inDoor.keepDoorOpen(this.myDataRef); }; storedv2.attractToMC = function (inMC, inInteractType) { this.myAimX = inMC._x; this.myAimY = inMC._y - 60; this.interactType = inInteractType; this.targetLock = true; this.ignoreRooms = false; this.intendedTarget = inMC; this.intendedX = this.intendedTarget._x; this.intendedY = this.intendedTarget._y; this.intendedRoom = this._parent.determineRoom(this.intendedX, this.intendedY); this.testAddToLockList(this.interactType, this.targetLock, this.intendedTarget, this.intendedX, this.intendedY); }; storedv1.setMyDepth = function (inMC, inNum) { var v2 = 1; if (inMC.myDataRef.myScale != undefined) { v2 /= inMC.myDataRef.myScale; } while (inMC._parent.getInstanceAtDepth(Math.floor(inNum * v2 * 1000) + 100) != undefined) { inNum -= 0.001; } inMC.swapDepths(Math.floor(inNum * v2 * 1000) + 100); }; storedv2.findClosestObstacle = function () { var v2; var v7; var v6 = 999999999; var v5; var v4 = new Array(); var v3 = 0; while (v3 < MadnessObstacle.allObstacles.length) { v2 = MadnessObstacle.allObstacles[v3]; if (v2.myHealth > 0 && v2.inUse == undefined && v2.amCover) { if (this._x < v2._x + v2.myWidth / 2 + this.myWidth / 2 + v2.zoneWidth && this._x > v2._x - v2.myWidth / 2 - this.myWidth / 2 - v2.zoneWidth && this._y < v2._y + v2.myDepth / 2 + v2.zoneDepth && this._y > v2._y - v2.myDepth / 2 - v2.zoneDepth) { v4.push(v2); } } ++v3; } if (v4.length == 1) { v7 = v4[0]; return v7; } v3 = 0; while (v3 < v4.length) { v5 = SwainMath.get_distance(this, v4[v3]); if (v5 < v6) { v6 = v5; v7 = v4[v3]; } ++v3; } return v7; }; storedv2.findClosestPickup = function (inPlayer) { var v2; var v8; var v6 = 999999999; var v5; var v4 = new Array(); var v3 = 0; while (v3 < MadnessParticle.allPickups.length) { v2 = MadnessParticle.allPickups[v3]; if (!inPlayer && this._x < v2._x + 255 && this._x > v2._x - 255 && this._y < v2._y + 235 && this._y > v2._y - 235 || inPlayer && this._x < v2._x + 55 && this._x > v2._x - 55 && this._y < v2._y + 35 && this._y > v2._y - 35) { v4.push(v2); } ++v3; } if (v4.length == 1) { v8 = v4[0]; return v8; } v3 = 0; while (v3 < v4.length) { v5 = SwainMath.get_distance(this, v4[v3]); if (v5 < v6) { v6 = v5; v8 = v4[v3]; } ++v3; } return v8; }; storedv2.returnInvertValid = function () { return this.reloadTimer == -1 && (this.myAimX <= this._x && this.myFacing == 'right' || this.myAimX >= this._x && this.myFacing == 'left'); }; storedv2.swapGear = function () { this.myWeapon = 1 - this.myWeapon; this.myDataRef.myWeapon = this.myWeapon; this.rofTimer = 300; }; storedv2.hitTactics = function (inWeapon, inAttacker, inBlock, inKillShot, inRange) { var v2 = (inWeapon.myROF / 6) * inAttacker.myDataRef.modHurtTactics; if (inWeapon.myCat == 'rifle') { v2 *= 2; } if (inWeapon.myCat == 'smg') { v2 *= 1.2; } if (inWeapon.myCat == 'shotgun') { v2 *= 1; } if (inWeapon.myCat == 'pistol' || inWeapon.myCat == 'revolver') { v2 *= 1; } if (inWeapon.myCat == 'heavy') { v2 *= 0.5; } if (inWeapon.myCat == 'electric') { v2 *= 6; } this.tacDisplayTimer = 20; if (!inRange) { if (MadnessDataFile.havePerk('perkLowAcc3', this.myDataRef)) { v2 *= 0.5; } else { if (MadnessDataFile.havePerk('perkLowAcc1', this.myDataRef)) { v2 *= 0.5; } else { v2 *= 0.9; } } } if (MadnessDataFile.havePerk('perkLowAcc2', this.myDataRef) && inWeapon.myCat == 'melee') { v2 *= 0.5; } if (MadnessDataFile.havePerk('perkCoverShoot', this.myDataRef) && this.targetObstacle.inUse == this && (this._x < this.targetObstacle._x && inAttacker._x > this.targetObstacle || this._x > this.targetObstacle._x && inAttacker._x < this.targetObstacle)) { v2 *= 0.5; } if (this.myDataRef.amSpecial && this.myStatus.substr(0, 4) == 'stun') { v2 = 0; } if (inAttacker._x > this._x && (this.myFacing == 'left' && !this.facingOpposite || this.myFacing == 'right' && this.facingOpposite) || inAttacker._x < this._x && (this.myFacing == 'right' && !this.facingOpposite || this.myFacing == 'left' && this.facingOpposite)) { v2 *= 1.5; } if (inBlock) { v2 *= 0.25; } if (this.mySpeedRight == 0 && this.mySpeedDown == 0 && !inBlock) { if (inWeapon.myCat == 'smg' && MadnessDataFile.havePerk('perkSMGTacDamage', this.myDataRef)) { v2 *= 1.2; } if (inWeapon.myCat == 'rifle' && MadnessDataFile.havePerk('perkRifleTacDamage', this.myDataRef)) { v2 *= 1.2; } v2 *= 2; } if (inAttacker.myDataRef.amZombie) { v2 *= 2; } if (this.myRoster == MadnessRoster.playerRoster && MadnessGameSelect.gameMode == 'story') { v2 = v2 / 2 + v2 * MadnessCharacter.damageDifficultyMod / 2; } this.myTactics -= v2; if (v2 > 0) { this.tacTimer = 0; } if (this.myTactics <= 0) { this.myTactics = 0; } }; storedv2.damageMelee = function (inWeapon) { if (inWeapon.myCat == 'melee' && inWeapon.myTag != 'Unarmed') { inWeapon.myHealth -= 1; ItemGenerator.setItemSprite(this.mySprite.handNone_front.myGun, this.myDataRef.myWeapons[this.myWeapon]); ItemGenerator.setItemSprite(this.mySprite.handNone_back.myGun, this.myDataRef.myWeapons[this.myWeapon]); ItemGenerator.setItemSprite(this.mySprite.handShoot_front.myGun, this.myDataRef.myWeapons[this.myWeapon]); ItemGenerator.setItemSprite(this.mySprite.handShoot_back.myGun, this.myDataRef.myWeapons[this.myWeapon]); if (inWeapon.myHealth <= inWeapon.myHealthMax * 0.12 && inWeapon.broken == false) { inWeapon.broken = true; this.weaponBreakParticle(inWeapon); } if (inWeapon.myHealth <= 0) { this.myDataRef.myWeapons[this.myWeapon] = undefined; this.myStatus = 'stun' + String(SwainMath.randomNumber(1, 3)); this.mySprite.gotoAndStop(this.myStatus); this.playSound('break'); } } }; storedv2.weaponBreakParticle = function (inWeapon) { if (this.amPlayer || !this.amPlayer && this._x > this._parent.myFollowTarget._x - 400 && this._x < this._parent.myFollowTarget._x + 400) { var v2; if (this.myFacing == 'left' && !this.facingOpposite || this.myFacing == 'right' && this.facingOpposite) { v2 = -1; } else { v2 = 1; } var v3 = SwainMath.randomNumber(-800, 800) / 100; this._parent.createParticle(inWeapon.myType, 'melee_piece', this._x + 28 * v2, SwainMath.get_position(this._x, this._y - this.myDataRef.myShootHeight * (this._yscale / 100), SwainMath.calculate_rotation(this._x, this._y - this.myDataRef.myShootHeight * (this._yscale / 100), this.myAimX, this.myAimY), 35, 'y'), (SwainMath.randomNumber(-60, -30) / 10) * v2, SwainMath.randomNumber(-250, -150) / 10, SwainMath.calculate_rotation(this._x, this._y - this.myDataRef.myShootHeight * (this._yscale / 100), this.myAimX, this.myAimY), SwainMath.randomNumber(-900, 900) / 10, 0.7, this._y + v3, 100, this._yscale * v2, true, 90); } }; storedv2.spitBlood = function (inMajor) { if (this.myFacing == 'right') { this.myFacing = 'left'; } else { this.myFacing = 'right'; } var v2 = 0; while (v2 < 3) { if (this.myFacing == 'right') { this.makeSparks(this._x - (this.mySprite._x + this.mySprite.myHead._x + 10), this._y + (this.mySprite._y + this.mySprite.myHead._y + 12), this._y, 'drops_' + this.myDataRef.myBlood); } else { this.makeSparks(this._x + (this.mySprite._x + this.mySprite.myHead._x + 10), this._y + (this.mySprite._y + this.mySprite.myHead._y + 12), this._y, 'drops_' + this.myDataRef.myBlood); } if (!inMajor) { v2 = 4; } ++v2; } if (this.myFacing == 'right') { this.myFacing = 'left'; } else { this.myFacing = 'right'; } if (inMajor) { if (this.myFacing == 'left') { this._parent.createEffect(this._x - (this.mySprite._x + this.mySprite.myHead._x + 14), this._y + (this.mySprite._y + this.mySprite.myHead._y + 13), 'blood' + String(SwainMath.randomNumber(4, 6)) + '_' + this.myBlood, 100, 100, -90); } else { this._parent.createEffect(this._x + (this.mySprite._x + this.mySprite.myHead._x + 14), this._y + (this.mySprite._y + this.mySprite.myHead._y + 13), 'blood' + String(SwainMath.randomNumber(4, 6)) + '_' + this.myBlood, 100, 100, 90); } } }; storedv2.useActivator = function () { this.targetActivator.activateMe(); }; storedv2.checkWhipRange = function () { if (!MadnessDataFile.havePerk('perkMeleePistolWhip', this.myDataRef) || this.lifeSpan < 45) { return false; } else { var v2; var v4 = 0; while (v4 < MadnessCharacter.allRosters.length) { var v3 = 0; while (v3 < MadnessCharacter.allRosters[v4].myActiveMembers.length) { v2 = MadnessCharacter.allRosters[v4].myActiveMembers[v3].mySprite; if (v2.myFaction != this.myFaction) { if (v2.myHealth > 0 && !v2.amDodging) { if (v2._x > this._x && v2._x < this._x + this.myDataRef.myUnarmed.myRange * this.myDataRef.myScale * 0.8 && (this.myFacing == 'right' && !this.facingOpposite || this.myFacing == 'left' && this.facingOpposite) || v2._x < this._x && v2._x > this._x - this.myDataRef.myUnarmed.myRange * this.myDataRef.myScale * 0.8 && (this.myFacing == 'left' && !this.facingOpposite || this.myFacing == 'right' && this.facingOpposite)) { if (this.inMeleeRange(v2)) { return true; break; } } } } ++v3; } ++v4; } return false; } }; storedv2.inMeleeRange = function (inTarget) { if (this.amPlayer) { return this._y > inTarget._y - 40 && this._y < inTarget._y + 40; } else { return this._y > inTarget._y - 20 * this.myDataRef.myScale && this._y < inTarget._y + 20 * this.myDataRef.myScale; } }; storedv2.inMeleeRangeAI = function (inTarget) { return this._y > inTarget._y - 40 + inTarget.mySpeedDown * 3 * this.slowmoSpeedMod * this.myDataRef.myScale && this._y < inTarget._y + 40 + inTarget.mySpeedDown * 3 * this.slowmoSpeedMod * this.myDataRef.myScale; }; storedv2.shakeyCam = function (inNum) { this._parent.shakeyCam(inNum); }; storedv2.amDead = function () { this.gotoAndStop(this._totalframes); }; storedv1.myPartOn = function (inPart, inValue, inCount) { if (inCount == undefined || inCount == 0) { inCount = 0; inPart.stop(); } if (inCount == 6) { return false; } if (inPart._parent.myDataRef.myWeapons[inPart._parent.myWeapon] != undefined) { return inPart._parent.myDataRef.myWeapons[inPart._parent.myWeapon][inValue]; } else { if (inPart._parent.myGun.myName != undefined) { return inPart._parent.myGun[inValue]; } else { return MadnessCharacter.myPartOn(inPart._parent, inValue, inCount + 1); } } }; storedv2.pickupGun = function () { this.myDataRef.myWeapons[this.myWeapon] = this.targetPickup.myGun; MadnessParticle.removePickup(this.targetPickup); if (this.myDataRef.myWeapons[this.myWeapon].melee) { this.playSound('swapmelee'); } else { if (this.myDataRef.myWeapons[this.myWeapon] != undefined) { this.playSound('swapgun'); } } if (MadnessLevel.currentLevel.myWorld == 0 && MadnessLevel.currentLevel.myLevel == 7 && this.myDataRef.myWeapons[this.myWeapon].myType == 'binarysword') { MadnessMedals.unlockMedal('saviorsword'); } }; storedv2.initiatePickup = function () { this.targetLock = false; this.myStatus = 'pickup'; this.mySpeedDown = 0; this.mySpeedRight = 0; this.targetLock = false; }; storedv2.throwWeapon = function () { var v6 = this.myDataRef.myWeapons[this.myWeapon]; if (v6 != undefined) { var v3; if (this.myFacing == 'left' && !this.facingOpposite || this.myFacing == 'right' && this.facingOpposite) { v3 = -1; } else { v3 = 1; } var v7 = SwainMath.randomNumber(-300, 300) / 100; var v4 = 10; if (this.myDataRef.myWeapons[this.myWeapon].melee) { v4 = 70; } var v8 = -(25 + this.myDataRef.statSTR / 2 + 10 * Number(this.myDataRef.myWeapons[this.myWeapon].melee)) + (30 + this.myDataRef.statSTR / 2) * ((Math.abs(SwainMath.calculate_rotation(this._x, this._y, this.myAimX, this.myAimY)) - 20) / 90); var v9 = (25 + this.myDataRef.statSTR / 2 + 10 * Number(this.myDataRef.myWeapons[this.myWeapon].melee)) * (90 - SwainMath.getRotDistance(Math.abs(SwainMath.calculate_rotation(this._x, this._y, this.myAimX, this.myAimY)), 90)) / 90; var v2 = new Object(); var v5; if (this.mySprite.myHand) { v5 = this.mySprite.myHand; } else { v5 = this.mySprite.myHand2; } v2.x = 0; v2.y = 0; v5.localToGlobal(v2); this._parent.globalToLocal(v2); this.myDataRef.myWeapons[this.myWeapon].myThrowerFaction = this.myFaction; this._parent.createParticle(v6.myType, 'thrown', v2.x, v2.y, v9 * v3, v8, -20 * v3 + SwainMath.randomNumber(-100, 100) / 10, v4 * v3, 0.5, this._y + v7, 100, this._yscale * v3, true, 90, this.myDataRef.myWeapons[this.myWeapon]); if (this.myRoster != MadnessRoster.playerRoster && this.myDataRef.myWeapons[this.myWeapon].myClips > 0) { this.myDataRef.myWeapons[this.myWeapon].myClips = 0; } if (this.myDataRef.myWeapons[this.myWeapon].amHook) { this.thrownHook = true; } this.myDataRef.myWeapons[this.myWeapon] = undefined; } }; storedv2.launchGrenade = function () { var v3; if (this.myFacing == 'left' && !this.facingOpposite || this.myFacing == 'right' && this.facingOpposite) { v3 = -1; } else { v3 = 1; } var v5 = SwainMath.randomNumber(-300, 300) / 100; var v6 = 4; var v7 = -45 + 45 * ((Math.abs(this._parent.playerAim._rotation) - 20) / 90); var v8 = 40 * Math.abs(this._parent.playerAim._rotation / 90); var v2 = new Object(); var v4; if (this.mySprite.handShoot_front._visible) { v4 = this.mySprite.handShoot_front; } else { v4 = this.mySprite.handShoot_back; } v2.x = 0; v2.y = 0; v4.myGun.myShootPoint.localToGlobal(v2); this._parent.globalToLocal(v2); this._parent.createParticle(this.myDataRef.myWeapons[this.myWeapon].myDamageType, 'projectile', v2.x, v2.y, v8 * v3, v7, this._parent.playerAim._rotation, v6 * v3, 0.5, this._y + v5, 100, this._yscale * v3, true, 90, this.myDataRef.myWeapons[this.myWeapon]); }; storedv2.applyKnockback = function (inSource, inPower, inReverseBlast) { if (this.myHealth > 0 && !this.noDamage && (inSource.myDataRef.myScale >= this.myDataRef.myScale || !this.myDataRef.bulletEater) && this.myStatus != 'restrained') { this.myStatus = 'knockback'; this.dropGun(); if (inSource._x < this._x && this.myFacing == 'left' || inSource._x > this._x && this.myFacing == 'right') { this.mySubStatus = '_1'; } else { this.mySubStatus = '_2'; } if (this.myDataRef.amZombie) { this.mySubStatus = '_zombie' + this.mySubStatus; } else { if (this.myDataRef.headGearResurrect && this.myHealth == 1) { this.mySubStatus = '_res' + this.mySubStatus; } else { if (this.myDataRef.noHands) { this.mySubStatus = '_nohands' + this.mySubStatus; } } } if (inSource._x < this._x) { this.mySpeedRight = inPower; } else { this.mySpeedRight = -inPower; } if (inReverseBlast) { this.mySpeedRight *= -1; } } }; storedv2.meleeHealthHit = function (inAttacker, inWeapon) { if (this.myDataRef.myHat[0] != undefined && this.myDataRef.disarmHelm || this.blocking && this.freakOutTimer == 0) { this.meleeHealth -= 1; this.meleeHealthTimer = 90; } if (this.meleeHealth == 0 && this.myHealth > 0) { if (this.blocking) { this.disarmGun(); this.myStatus = 'stun_parry' + SwainMath.randomNumber(1, 2); } else { if (this.myDataRef.myHat[0] != undefined) { --this.myDataRef.myHat[0].myIntegrity; if (this.myDataRef.myHat[0].myIntegrity == 0) { this.disarmArmor(this.myDataRef.myHat[0]); if (this.myDataRef.amZombie || this.myDataRef.amAbom) { this.myStatus = 'stun_parry' + SwainMath.randomNumber(1, 2); } else { this.myStatus = 'stun_helmet'; } } else { if (this.myDataRef.freakOut) { this.freakOutTimer = 300; } } } } this.meleeHealthTimer = 500; this.meleeHealth = 999; if (inAttacker.myDataRef.myScale >= this.myDataRef.myScale) { this.applyKnockback(inAttacker, 15, false); } else { if (this.myStatus.substr(0, 4) != 'stun') { this.mySprite.gotoAndStop('idle'); this.myStatus = 'stun' + SwainMath.randomNumber(4, 5); this.mySprite.gotoAndStop(this.myStatus); } } this.meleeHealth = this.myDataRef.meleeHealth; } }; goto 125135; label 125130: goto 137116; label 125135: storedv2.determineGameSpeed = function () { this.myGameSpeed = _root.myGameSpeed; if (this.myStatus == 'swap' && MadnessDataFile.havePerk('perkReload1', this.myDataRef)) { ++this.myGameSpeed; } if (this.slowMoActive && (this.myStatus.substr(0, 5) == 'melee' || this.myStatus.substr(0, 7) == 'unarmed') && MadnessDataFile.havePerk('perkBulletTime2', this.myDataRef)) { ++this.myGameSpeed; } if (this.myDataRef.myWeapons[this.myWeapon] == undefined && this.myStatus.substr(0, 7) == 'unarmed') { if (MadnessDataFile.havePerk('perkUnarmedSpeed3', this.myDataRef)) { ++this.myGameSpeed; } else { if (MadnessDataFile.havePerk('perkUnarmedSpeed2', this.myDataRef) && this.mySprite._currentframe >= this.mySprite._totalframes - 8 && this.mouseHold) { ++this.myGameSpeed; } else { if (MadnessDataFile.havePerk('perkUnarmedSpeed1', this.myDataRef) && this.mySprite._currentframe >= this.mySprite._totalframes - 4 && this.mouseHold) { ++this.myGameSpeed; } } } } if (this.meleeCombos <= 2 && this.myStatus.substr(0, 5) == 'melee' && this.mySprite._currentframe >= this.mySprite._totalframes - 7 && this.mouseHold) { ++this.myGameSpeed; } if (this.myDataRef.amSlow) { this.myGameSpeed = 0; } if (this.slowMoActive && (this.myStatus == 'run' || this.myStatus == 'backtrack' || this.myStatus == 'dash' || this.myStatus == 'idle' || this.myStatus == 'dodge') && (MadnessDataFile.havePerk('perkBulletTime1', this.myDataRef) || MadnessDataFile.havePerk('perkBulletTime4', this.myDataRef))) { ++this.myGameSpeed; } this.slowmoSpeedMod = 0.4 + 0.6 * this.myGameSpeed; this.heavySpeedMod = 1; if (this.myDataRef.myWeapons[this.myWeapon].amHeavy && this.myDataRef.myScale <= 1) { this.heavySpeedMod = 0.7; } if (this.slowMoActive && MadnessDataFile.havePerk('perkBulletTime4', this.myDataRef)) { this.slowmoSpeedMod += 0.3; } }; storedv2.takeCover = function (inObs) { if (inObs != undefined) { this.myStatus = 'cover'; this.actionTimer = 0; this.mySpeedRight = 0; this.mySpeedDown = 0; this.toggleGuard = false; inObs.inUse = this; } }; storedv2.deserterSurrender = function () { if (this.myRoster != this._parent.deserterRoster) { this.myRoster.removeCharacter(this.myDataRef); var v2 = this._parent.deserterRoster; v2.addCharacter(this.myDataRef); v2.makeActive(this.myDataRef); if (this.myStatus == 'idle' || this.myStatus == 'run' || this.myStatus == 'dash') { this.myStatus = 'surrender'; this.mySubStatus = '1'; if (this.myDataRef.myWeapons[this.myWeapon] != undefined) { this.dropGun(); } } } }; storedv1.doesUnitExist = function (inUnit) { var v3; var v2 = 0; while (v2 < MadnessCharacter.allRosters.length) { var v1 = 0; while (v1 < MadnessCharacter.allRosters[v2].myActiveMembers.length) { v3 = MadnessCharacter.allRosters[v2].myActiveMembers[v1]; if (v3.myCharacter == inUnit) { return true; } ++v1; } ++v2; } return false; }; storedv2.aimFlash = function () { this.aimFlashTimer = -15; this.myColor = new Color(this); }; storedv2.playSound = function (inSound) { SwainAudioPlayer.playSound(inSound, MadWorld.returnAudioPosition(this._x)); }; storedv2.reloadMe = function () { if (this.myDataRef.myWeapons[this.myWeapon].myAmmo < this.myDataRef.myWeapons[this.myWeapon].myAmmoMax) { this.myDataRef.myWeapons[this.myWeapon].myAmmo = this.myDataRef.myWeapons[this.myWeapon].myAmmoMax; this.myDataRef.myWeapons[this.myWeapon].myClips -= 1; this.playSound('reload'); } }; storedv2.returnAttackScore = function () { var v1 = new Number(); v1 = 25; if (MadnessGameSelect.gameMode == 'story') { v1 -= 10 * MadnessCharacter.damageDifficultyMod; } return v1; }; storedv2.testAddToLockList = function (inType, inLock, inTarget, inX, inY) { this.myLockList.push(inType + ': ' + inLock + ' ' + inTarget + ' ' + inX + '/' + inY); }; storedv2.traceLockList = function () { trace(' ----- Lock List for unit ' + this._name + ', aka ' + this.myDataRef.myCharacter + ' ----- '); var v2 = 0; while (v2 < this.myLockList.length) { trace(v2 + ': ' + this.myLockList[v2]); ++v2; } trace(' --------------------------------------- '); }; storedv2.checkNoRangeMelee = function () { return this.myAttackTarget._x < this._x && this.myAttackTarget._x > this._x - 120 || this.myAttackTarget._x > this._x && this.myAttackTarget._x < this._x + 120; }; storedv2.canGrapple = function (inTarget) { return (this.myDataRef.amZombie || this.myDataRef.amAbom && !this.myDataRef.noHands) && this.myDataRef.myScale == inTarget.myDataRef.myScale && (inTarget.myStatus == 'idle' || inTarget.myStatus == 'run' || inTarget.myStatus == 'backtrack' || inTarget.myStatus == 'dash' || inTarget.myStatus == 'restrained' && SwainMath.randomNumber(0, 1) == 0 || inTarget.myStatus.substr(0, 5) == 'melee' && (!inTarget.myDataRef.myWeapons[inTarget.myWeapon].melee || inTarget._x > this._x && inTarget.myFacing == 'right' || inTarget._x < this._x && inTarget.myFacing == 'left')); }; storedv2.zombieBite = function () { this.myAttackTarget.amBleeding = true; this.playSound('injury'); if (SwainMath.randomNumber(0, 1) == 0) { this.myAttackTarget.bodyDamage += 1; this.myAttackTarget.bodySpray += 1; this.myAttackTarget.splatterCharacter(10, this.myAttackTarget.myBlood, this.myAttackTarget._x < this._x, this._x, this._y - 70, true); } else { this.myAttackTarget.headDamage += 1; this.myAttackTarget.headSpray += 1; this.myAttackTarget.splatterCharacter(10, this.myAttackTarget.myBlood, this.myAttackTarget._x < this._x, this._x, this._y - 70, true); } this.headSpray += 1; if (this.headSpray > 4) { this.headSpray = 4; } if (this.myAttackTarget.bodySpray > 4) { this.myAttackTarget.bodySpray = 4; } if (this.myAttackTarget.headSpray > 4) { this.myAttackTarget.headSpray = 4; } if (this.myAttackTarget.bodyDamage > 4) { this.myAttackTarget.bodyDamage = 4; } if (this.myAttackTarget.headDamage > 4) { this.myAttackTarget.bodyDamage = 4; } }; storedv2.turnZombie = function () { if (!this.amPlayer && !this.myDataRef.noZombie && this.headDamage < 4 && !this.myDataRef.amSpecial && !this.myDataRef.amZombie && !this.myDataRef.amAbom && this.myDataRef.myScale == 1) { this.myDataRef.createNew(MadnessDataFile.returnZombieType(this.myDataRef.myCharacter)); this.myRoster.removeCharacter(this.myDataRef); this.myDataRef.myRoster = undefined; this.myRoster = this.myDataRef.myRoster; this.myDataRef.myFaction = 'zombie'; this.myFaction = 'zombie'; MadWorld.thisWorld.applyFaction(this.myDataRef); this.myRoster.makeActive(this.myDataRef); this.myDataRef.healMeMinor(); this.refreshStats(); this.noDamage = false; this.mySubWalk = String(SwainMath.randomNumber(1, 3)); this.mySubIdle = String(SwainMath.randomNumber(1, 3)); this.myAttackTarget = undefined; this.myMission = 'engage'; this.resurrectFlashTimer = 30; this.myColor = new Color(this); this.resurrectFlashColor = [10, 10, 10]; MadnessCharacter.adjustSprite(); this.playSound('zombieres'); } else { this.noDamage = true; this.myStatus = 'dead'; this.mySubStatus = '_zombie_bite'; } }; storedv2.resurrectFlash = function () { this.myDataRef.healMeMinor(); this.refreshStats(); this.noDamage = false; if (this.myDataRef.explodeDeath > 0 || this.myDataRef.explodeDeath == undefined) { this.resurrectFlashColor = [10, 10, 10]; this.resurrectFlashTimer = 30; if (this.myDataRef.headGearResurrect) { this.myColor = new Color(this.mySprite.myHead.myPart); } else { this.myColor = new Color(this); } this.playSound('res1'); } else { this.resurrectFlashTimer = 0; this.aimFlash(); this.playSound('res2'); } }; storedv2.resurrectExplode = function () { if (this.myDataRef.explodeDeath != undefined) { if (this.myDataRef.explodeDeath > 0) { --this.myDataRef.explodeDeath; } else { MadnessCharacter.hitExplode('grenade_explode', 'floor', this, this._x, this._y, this._y, 160, 6, 'explodewet', 7, null, null, null); var v3 = 'chunk'; if (this.myDataRef.amZombie) { v3 += '_zombie'; } var v2 = 0; while (v2 < 20) { MadWorld.thisWorld.createParticle(this.myBlood + SwainMath.randomNumber(1, 3), v3, this._x + SwainMath.randomNumber(-5, 5), this._y - 10, SwainMath.randomNumber(-20, 20), SwainMath.randomNumber(-30, -10), SwainMath.randomNumber(-180, 180), SwainMath.randomNumber(-50, 50) / 10, 0.5, this._y + SwainMath.randomNumber(-800, 800) / 100, 100, SwainMath.randomNumber(70, 100), false, 90); this._parent.createParticle('spark' + SwainMath.randomNumber(1, 2), 'drops_' + this.myBlood, this._x + SwainMath.randomNumber(-5, 5), this._y - 10, SwainMath.randomNumber(-20, 20), SwainMath.randomNumber(-20, -10), SwainMath.randomNumber(-180, 180), SwainMath.randomNumber(-50, 50) / 10, 0.5, this._y + SwainMath.randomNumber(-800, 800) / 100, 100, SwainMath.randomNumber(70, 100), false, 90); this._parent.createParticle(this.myBlood + SwainMath.randomNumber(1, 3), 'blood', this._x + SwainMath.randomNumber(-5, 5), this._y - 10, SwainMath.randomNumber(-20, 20), SwainMath.randomNumber(-20, -10), SwainMath.randomNumber(-180, 180), SwainMath.randomNumber(-50, 50) / 10, 0.5, this._y + SwainMath.randomNumber(-800, 800) / 100, 100, SwainMath.randomNumber(70, 100), false, 90); ++v2; } this._visible = false; this.killMe(); this.removeMe(); } } }; storedv2.resurrectionDeath = function (inAttacker) { this.myDataRef.healMeMinor(); this.refreshStats(); this.myHealth = 1; this.noDamage = false; this.applyKnockback(inAttacker, 4, false); }; storedv1.hitExplode = function (inType, inScorch, inSource, inX, inY, inFloor, inRange, inDamage, inSound, inKnockback, inDir, inAutoHit, inSubDeath) { var v1; var v10; var v5 = 0; while (v5 < MadnessCharacter.allRosters.length) { var v2 = 0; while (v2 < MadnessCharacter.allRosters[v5].myActiveMembers.length) { if (inAutoHit != null) { v1 = inAutoHit; --v2; } else { v1 = MadnessCharacter.allRosters[v5].myActiveMembers[v2].mySprite; } if (!v1.deadMan && v1 != inSource && !v1.amDodging && v1 != v10) { if (inAutoHit != null || SwainMath.get_distance2(inX, inFloor, v1._x, v1._y) < inRange) { var v6 = false; if (v1.myHealth > 0) { v6 = true; } v1.myHealth -= inDamage; v1.triggerBossFlee(inDamage); if (v6 && v1.myHealth <= 0) { MadnessGameSelect.appropriateXP(inSource.myDataRef, v1.myDataRef, 'explode'); } if (v1.myHealth <= 0) { v1.myStatus = 'dead'; v1.headDamage += SwainMath.randomNumber(0, 3); v1.bodyDamage += SwainMath.randomNumber(0, 3); if (v1.headDamage > 4) { v1.headDamage = 4; } if (v1.bodyDamage > 4) { v1.bodyDamage = 4; } v1.headSpray += SwainMath.randomNumber(0, 3); v1.bodySpray += SwainMath.randomNumber(0, 3); if (v1.headSpray > 4) { v1.headSpray = 4; } if (v1.bodySpray > 4) { v1.bodySpray = 4; } if (v1.myDataRef.headGearResurrect && v1.headDamage < 4 && inSubDeath == null) { v1.resurrectionDeath(inSource); } } else { if (inKnockback != null) { ++v1.myDataRef.myScale; v1.applyKnockback(inSource, inKnockback, false); --v1.myDataRef.myScale; } } if (inSubDeath != null && v1.myDataRef.myBoss == '' && !v1.myDataRef.amSpecial) { if (v1.myStatus == 'dead') { v1.mySubStatus = inSubDeath; } } else { if (v1.myStatus == 'dead') { v1.mySubStatus = '_fly' + SwainMath.randomNumber(1, 4); } if (inSource._x < v1._x) { v1.mySpeedRight = inKnockback; } else { v1.mySpeedRight = -inDamage * 0.65; } } v1.applyDeath(); v1.magicFlashTimer = 20; v1.myColor = new Color(v1); } } if (inAutoHit != null) { v10 = inAutoHit; inAutoHit = null; if (inRange == -1) { v2 = 999999999; v5 = 9999999999999.0; } } ++v2; } ++v5; } if (inType != null) { var v16 = 1; if (inDir != null) { v16 = inDir; } MadWorld.thisWorld.createEffect(inX, inY, inType, 60 * v16, 60 * v16, 0); } if (inScorch != null) { var v14; var v15; if (inScorch == 'wall') { v14 = 90; v15 = inY; } if (inScorch == 'floor') { v14 = 0; v15 = inFloor; } if (inSource.myRoom.amStairs) { v14 = -90 + inSource.myRoom.upAngle; v15 = inSource._y; } MadWorld.thisWorld.createSplat(inSource._x, v15, 'grenade_scorch', v14); } if (inKnockback != null) { MadWorld.thisWorld.shakeyCam(inKnockback * 0.5); } if (inSound != null) { SwainAudioPlayer.playSound(inSound, MadWorld.returnAudioPosition(inSource._x)); } }; storedv2.freeHands = function () { this.myDataRef.noHands = false; this.myDataRef.autoHit = false; this.myDataRef.myShirt[this.myShirt].myIntegrity = 1; this.mySprite.myHand2._visible = true; this.mySprite.myHand._visible = this.mySprite.myHand2._visible; }; storedv2.grappleSmack = function (inType) { if (inType == 'unarmed') { this.playSound('blunt'); this.myAttackTarget.myHealth -= this.myDataRef.myUnarmed.myDamage / 4; } }; storedv2.castSpell = function () { if (this.myDataRef.myMagic == 'jesus1') { if (this.magicLevel == 1) { var v2; var v3 = this._x; if (this.myFacing == 'left') { v2 = -1; } else { v2 = 1; } v3 += 60 * this.myDataRef.myScale * v2; MadnessCharacter.hitExplode(null, null, this, v3, this._y, this._y, 80, 20, 'explode', 12, null, null, null); this.playSound('magic1_cast'); } if (this.magicLevel == 2) { if (this.myFacing == 'left') { v2 = -1; } else { v2 = 1; } var v6 = SwainMath.randomNumber(-300, 300) / 100; var v7 = 0; var v4 = 0; var v5 = 35; this.playSound('magic2_cast'); MadWorld.thisWorld.createParticle('magic1', 'projectile', this._x + 30 * v2, this._y - 68 * this.myDataRef.myScale, v5 * v2, v4, 90 * v2, v7 * v2, 0.5, this._y + v6, 100, this._yscale * v2, true, 90, this.myDataRef.myWeapons[this.myWeapon]); } } }; storedv1.applyNecessaryStats = function (inChar, inData) { inChar.myMask = 0; inChar.myMouth = 0; inChar.myShirt = 0; inChar.myHat = 0; inChar.headDamage = 0; inChar.bodyDamage = 0; inChar.headSpray = 0; inChar.bodySpray = 0; }; storedv2.wearHalo = function () { this.myDataRef.createArmor('halo'); this.myDataRef.myDodge = 'jesus'; this.myDataRef.myMagic = 'jesus1'; this.myDataRef.applyStats(25, 25, 25, 25, 0, 25, null, 25, 25, 25, 25, 25, 25, 25, 25); MadnessCharacter.adjustSprite(this); this.refreshStats(); this.resurrectFlashTimer = 30; this.myColor = new Color(this); this.resurrectFlashColor = [10, 10, 10]; this.playSound('magic2_explode'); }; storedv2.triggerBossFlee = function (inDamage) { if (this.myDataRef.bossFlee != undefined && inDamage > 0) { if (this.myHealth <= 0) { this.myHealth = 1; } if (!this.targetLock) { this.attractToDoor(this.myDataRef.bossFlee.mySprite); while (this.myDataRef.myEvents.length > 0) { if (this.myDataRef.myEvents[0].myType == 'flee') { this.myDataRef.myEvents[0].myAction(); } this.myDataRef.myEvents.splice(0, 1); } } } }; storedv2.bossEvents = function (inEvent) { MadnessEvents.bossEvents(this, inEvent); }; storedv2.amPressingMove = function () { return this.moveLeft || this.moveRight || this.moveUp || this.moveDown; }; storedv1.damageDifficultyMod = new Number(); storedv1.playerLives = new Number(); storedv2.amPlayer = new Boolean(); storedv2.wounded = new Number(); storedv2.tacRerchargeDelay = 90; storedv2.tacTimer = new Number(); storedv2.tacDisplayTimer = new Number(); storedv2.myHeadArmor = new Number(); storedv2.myBodyArmor = new Number(); storedv2.meleeHealth = new Number(); storedv2.meleeHealthTimer = new Number(); storedv2.grappleTimerMax = 100; storedv2.magicChargeTimer = -1; storedv2.magicLevel2Threshold = 5; storedv2.headSpray = 0; storedv2.bodySpray = 0; storedv2.headDamage = 0; storedv2.bodyDamage = 0; storedv2.headBloodTimer = 0; storedv2.noDamage = false; storedv2.deadMan = false; storedv2.amInjured = false; storedv2.amBleeding = false; storedv2.myWeapon = new Number(); storedv2.myHat = new Number(); storedv2.myMask = new Number(); storedv2.myMouth = new Number(); storedv2.myShirt = new Number(); storedv2.recoilTimer = new Number(); storedv2.deathTimer = new Number(); storedv2.blocking = false; storedv2.pickupTimer = new Number(); storedv2.aimTimer = -1; storedv2.aimFlashTimer = 50; storedv2.resurrectFlashTimer = 0; storedv2.magicFlashTimer = 0; storedv2.lastHitTimer = new Number(); storedv2.emptyClipTimer = new Number(); storedv2.mySpeedRight = new Number(); storedv2.mySpeedDown = new Number(); storedv2.myStatus = new String(); storedv2.myFacing = new String(); storedv2.facingOpposite = false; storedv2.myGameSpeed = new Number(); storedv2.slowmoSpeedMod = new Number(); storedv2.actionSlowdown = false; storedv2.amDodging = false; storedv2.backtrackTimer = new Number(); storedv2.heavySpeedMod = new Number(); storedv2.lastStairsAngle = new Number(); storedv2.moveLeft = false; storedv2.moveRight = false; storedv2.moveUp = false; storedv2.moveDown = false; storedv2.toggleAction = false; storedv2.toggleGuard = false; storedv2.toggleReload = false; storedv2.togglePickup = false; storedv2.toggleSlowmo = false; storedv2.mouseTimer = -1; storedv2.mouseTime2x = 9; storedv2.mouseClick = false; storedv2.mouseReleaseTimer = 2; storedv2.mouseHold = false; storedv2.mouse2x = false; storedv2.myAimX = new Number(); storedv2.myAimY = new Number(); storedv2.mouseLock = false; storedv2.actionTimer = new Number(); storedv2.swapTimer = new Number(); storedv2.rofTimer = new Number(); storedv2.meleeCombos = new Number(); storedv2.meleeComboTimer = new Number(); storedv2.smgAimTimer = 1; storedv2.rofAdjust = new Number(); storedv2.shootWaitBuffer = 30; storedv2.rofLastFrame = 1; storedv2.reloadTimer = -1; storedv2.dashTimer = -1; storedv2.dashTimeEnable = 6; storedv2.lifeSpan = new Number(); storedv2.invincibleTimer = new Number(); storedv2.slowmoTimer = new Number(); storedv2.doorLock = false; storedv2.pathFind = false; storedv2.targetLock = false; storedv2.ignoreRooms = false; storedv2.interactTarget = undefined; storedv2.interactType = new String(); storedv2.myRoom = new Object(); storedv2.targetX = new Number(); storedv2.targetY = new Number(); storedv2.advanceX = new Number(); storedv2.advanceY = new Number(); storedv2.missionTimer = 99999999999.0; storedv2.shotTimer = 99999999999.0; storedv2.inRange = false; storedv2.shootReady = false; storedv2.myMorale = new Number(); storedv2.awake = true; storedv2.freakOutTimer = new Number(); storedv2.myAimAI = new Number(); storedv2.totalFrameDamage = new Number(); storedv2.thrownHook = false; label 137116: ASSetPropFlags(_global.MadnessCharacter.prototype, null, 1); #endinitclip } movieClip 8393 __Packages.MadnessDoors { #initclip if (!_global.MadnessDoors) { var v1 = function () { super(); this.stayOpen = new Array(); this.myEnterers = new Array(); this.myExiters = new Array(); this.mySprites = new Array(); this.myStarts = new Array(); this.onEnterFrame = this.tick; }; _global.MadnessDoors = v1; _global.MadnessDoors extends MovieClip; var v2 = v1.prototype; v2.init = function (inPlaceholder, inDataRef) { this.myDataRef = inDataRef; this.myDataRef.mySprite = this; this.myDir = this.myDataRef.myDir; this.myType = this.myDataRef.myType; this.amLocked = this.myDataRef.amLocked; this.noClose = this.myDataRef.noClose; this.noSpawn = this.myDataRef.noSpawn; this.gotoAndStop(this.myType + '_' + this.myDir); this._x = inPlaceholder._x; this._y = inPlaceholder._y; inPlaceholder._visible = false; var v3 = 0; while (this['start' + String(v3)] != undefined) { this.myStarts.push(this['start' + String(v3)]); this['start' + String(v3)]._visible = false; ++v3; } if (this.myDataRef.myConnection == undefined) { this.myLock._visible = false; } else { if (this.amLocked || this._parent.roomLock || this.myDataRef.myConnection == undefined) { this.myLock.gotoAndStop(1); } else { this.myLock.gotoAndStop(2); } } this.myLock.lockLight.gotoAndStop(this.myLock.lockLight._totalframes); this.myStatus = 'closed'; this.myDoor.stop(); this.myDoorBACK.stop(); this.noBullet._visible = false; var v2 = 0; while (v2 < this.myDataRef.myCharacters.length) { this.addCharacter(this.myDataRef.myCharacters[v2], 'enter'); ++v2; } if (MadnessGameSelect.gameMode == 'arena') { if (this.myDataRef.myConnection == MadnessRoster.storeRoster) { this.myDoor.myArt.amArena.gotoAndStop('gun'); this.myDoorBACK.myArt.amArena.gotoAndStop('gun'); this.myDoor.myArt2.amArena.gotoAndStop('gun'); this.myDoorBACK.myArt2.amArena.gotoAndStop('gun'); } else { this.myDoor.myArt.amArena.gotoAndStop('skull'); this.myDoorBACK.myArt.amArena.gotoAndStop('skull'); this.myDoor.myArt2.amArena.gotoAndStop('skull'); this.myDoorBACK.myArt2.amArena.gotoAndStop('skull'); } } else { if (this.myDataRef.myConnection == undefined && this.myDataRef.myObjective == undefined) { this.myDoor.myArt.amArena.gotoAndStop('employees'); this.myDoorBACK.myArt.amArena.gotoAndStop('employees'); this.myDoor.myArt2.amArena.gotoAndStop('employees'); this.myDoorBACK.myArt2.amArena.gotoAndStop('employees'); if (this.myType == 'door_left') { this.myDoor.myArt.amArena.mySign._xscale = -100; } if (this.myType == 'door_left') { this.myDoor.myArt2.amArena.mySign._xscale = -100; } } else { this.myDoor.myArt.amArena.gotoAndStop('none'); this.myDoorBACK.myArt.amArena.gotoAndStop('none'); this.myDoor.myArt2.amArena.gotoAndStop('none'); this.myDoorBACK.myArt2.amArena.gotoAndStop('none'); } } if (this.myDataRef.myConnection == undefined && this.myDataRef.myObjective == undefined) { this.myDoor.myArt.gotoAndStop(2); this.myDoor.myArt2.gotoAndStop(2); } else { this.myDoor.myArt.gotoAndStop(1); this.myDoor.myArt2.gotoAndStop(1); } }; v2.pauseTick = function () { if (!this._parent.paused) { this.onEnterFrame = this.tick; } }; v2.tick = function () { if (this._parent.paused) { this.onEnterFrame = this.pauseTick; } if (this.mySprites.length == 0) { this.currentStart = 0; this.currentStartIncrement = 1; this.mySpawnTimer = 0; } else { ++this.mySpawnTimer; } if (this.myDoorBACK != undefined) { if (this.myExiters.length > 0) { this.myDoorBACK._visible = true; this.myDoor._visible = false; } if (this.myEnterers.length > 0 || this.myEnterers.length == 0 && this.myExiters.length == 0 && this.mySprites.length == 0) { this.myDoorBACK._visible = false; this.myDoor._visible = true; } } while (this.myExiters.length > 0) { this.mySprites.push(this.makeSprite(this.myExiters[0])); this.myExiters.splice(0, 1); } if (this.myStatus == 'closed' || this.myDoor == undefined) { while (this.myEnterers.length > 0) { this.mySprites.push(this.makeSprite(this.myEnterers[0])); this.myEnterers.splice(0, 1); } if (this.mySprites.length > 0 && !this.amLocked) { this.myStatus = 'opening'; this.myDoor.gotoAndPlay('opening'); this.myDoorBACK.gotoAndPlay('opening'); if (this.myDoor != undefined) { SwainAudioPlayer.playSound('door1', MadWorld.returnAudioPosition(this._x)); } } } if (this.myStatus == 'open' && !this.noClose) { if (this.stayOpen.length == 0 && this.mySprites.length == 0) { this.myStatus = 'closing'; this.myDoor.gotoAndPlay('closing'); this.myDoorBACK.gotoAndPlay('closing'); if (this.myDoor != undefined) { SwainAudioPlayer.playSound('door1', MadWorld.returnAudioPosition(this._x)); } } } if (this.myStatus == 'open' || this.myDoor == undefined) { var v2 = 0; while (v2 < this.mySprites.length) { this.spriteAI(this.mySprites[v2]); ++v2; } } if (this.amLocked || this._parent.roomLock || this.myDataRef.myConnection == undefined) { this.myLock.gotoAndStop(1); } else { this.myLock.gotoAndStop(2); } }; v2.makeSprite = function (inChar) { var v4 = String(SwainMath.randomNumber(0, 999999999)); this.spriteHolder.attachMovie('doors_sprite', 'newChar' + v4, this.spriteHolder.getNextHighestDepth()); var v2 = this.spriteHolder['newChar' + v4]; v2.gotoAndStop('idle'); v2.myMission = inChar.myDoorMission; v2.myDataRef = inChar; v2.reloadTimer = -1; v2.myStatus2 = 'idle'; v2.myWeapon = v2.myDataRef.myWeapon; if (this.myDir == 'right' && v2.myMission == 'enter' || this.myDir == 'left' && v2.myMission == 'exit' || this.myDir == 'down' && SwainMath.randomNumber(0, 1) == 0) { v2.myFacing = 'right'; } else { v2.myFacing = 'left'; } if (v2.myMission != 'exit') { if (this.myDir == 'down') { v2.goTimer = this.mySprites.length + SwainMath.randomNumber(1, 5); } else { v2.goTimer = this.mySprites.length + SwainMath.randomNumber(6, 18); } } if (v2.myMission == 'enter') { v2._x = this.myStarts[this.currentStart]._x; v2._y = this.myStarts[this.currentStart]._y; v2.targetX = 0; v2.targetY = 0; this.adjustCurrentStart(); } else { v2._x = v2.myDoorX - this._x; v2._y = v2.myDoorX - this._y; if (this.myDir == 'right' || this.myDir == 'left') { v2.targetX = this.myExit._x; v2.targetY = this.myExit._y; } else { var v5 = this.myStarts[SwainMath.randomNumber(0, this.myStarts.length - 1)]; v2.targetX = v5._x; v2.targetY = v5._y; } } if (v2.myFacing == 'left') { v2.myAimX = -5; } else { v2.myAimX = 5; } v2.myAimY = v2._y; v2.headDamage = 0; v2.bodydamage = 0; v2.myShirt = 0; v2.myHat = 0; v2.myMouth = 0; v2.myMask = 0; MadnessCharacter.adjustSprite(v2); v2._xscale = MadnessCharacter.setPerspectiveScale(this._x + v2._x, this._y + v2._y, this._parent.determineRoom(this._x, this._y)); v2._xscale *= v2.myDataRef.myScale; v2._yscale = v2._xscale; if (v2.myFacing == 'left') { v2._xscale *= -1; } this.removeFromReserveList(inChar); inChar.mySprite = undefined; return v2; }; v2.removeSprite = function (inSprite, inDelete) { var v2 = 0; while (v2 < this.mySprites.length) { if (inSprite == this.mySprites[v2]) { this.mySprites.splice(v2, 1); break; } ++v2; } if (inDelete) { inSprite.removeMovieClip(); false; } }; v2.addCharacter = function (inChar, inGoal) { inChar.myDoorMission = inGoal; inChar.myDoorX = inChar.mySprite._x; inChar.myDoorY = inChar.mySprite._y; inChar.mySprite = undefined; inChar.loggedX = undefined; inChar.loggedY = undefined; if (inGoal == 'enter') { this.myEnterers.push(inChar); } else { this.myExiters.push(inChar); } }; v2.removeCharacter = function (inChar) { var v2 = 0; while (v2 < this.myEnterers.length) { if (inChar == this.myEnterers[v2]) { this.myEnterers.splice(v2, 1); break; } ++v2; } v2 = 0; while (v2 < this.myExiters.length) { if (inChar == this.myExiters[v2]) { this.myExiters.splice(v2, 1); break; } ++v2; } }; v2.adjustCurrentStart = function () { this.currentStart += this.currentStartIncrement; if (this.currentStart > this.myStarts.length - 1) { this.currentStart = this.myStarts.length - 1; this.currentStartIncrement = -1; } if (this.currentStart < 0) { this.currentStart = 0; this.currentStartIncrement = 1; } }; v2.spriteAI = function (inSprite) { if (this.mySpawnTimer >= inSprite.goTimer && inSprite.myStatus2 == 'idle') { this.mySpawnTimer -= inSprite.goTimer / 1.5; if (!inSprite.myDataRef.amZombie) { inSprite.myStatus2 = 'run'; } else { inSprite.myStatus2 = 'run_zombie'; inSprite.gotoAndStop(inSprite.myStatus2); } } if (inSprite.amDone) { if (!inSprite.myDataRef.amZombie) { inSprite.myStatus2 = 'idle'; } else { inSprite.myStatus2 = 'idle_zombie'; } } inSprite._xscale = MadnessCharacter.setPerspectiveScale(this._x + inSprite._x, this._y + inSprite._y, this._parent.determineRoom(this._x, this._y)); inSprite._xscale *= inSprite.myDataRef.myScale; inSprite._yscale = inSprite._xscale; var v6 = 0; var v7 = 0; if (this.myDir == 'down') { v6 = 25; } else { v7 = 25; } var v8 = 0.95 + 0.95 * _root.myGameSpeed * 0.1; if (inSprite.myStatus2.substr(0, 3) == 'run' && !inSprite.amDone) { if (inSprite._x < inSprite.targetX - v6) { inSprite._x += inSprite.myDataRef.mySpeed * v8; inSprite.myFacing = 'right'; } else { if (inSprite._x > inSprite.targetX + v6) { inSprite._x -= inSprite.myDataRef.mySpeed * v8; inSprite.myFacing = 'left'; inSprite._xscale *= -1; } } if (inSprite._y < inSprite.targetY - v7) { inSprite._y += (inSprite.myDataRef.mySpeed / 2) * v8; } else { if (inSprite._y > inSprite.targetY + v7) { inSprite._y -= (inSprite.myDataRef.mySpeed / 2) * v8; } } } var v5 = this.mySprites; var v4 = 0; while (v4 < v5.length) { if (inSprite._y > v5[v4]._y && inSprite.getDepth() < v5[v4].getDepth()) { inSprite.swapDepths(v5[v4]); } ++v4; } if (inSprite._x <= inSprite.targetX + v6 + inSprite.myDataRef.mySpeed && inSprite._x >= inSprite.targetX + -v6 - inSprite.myDataRef.mySpeed) { if (inSprite._y <= inSprite.targetY + v7 + inSprite.myDataRef.mySpeed / 2 && inSprite._y >= inSprite.targetY + -v7 - inSprite.myDataRef.mySpeed / 2) { if (inSprite.myMission == 'enter') { this._parent.createSprite(inSprite.myDataRef, this, this._x + inSprite._x, this._y + inSprite._y); } v4 = 0; while (v4 < this.myDataRef.myCharacters.length) { if (inSprite.myDataRef == this.myDataRef.myCharacters[v4]) { this.myDataRef.myCharacters.splice(v4, 1); break; } ++v4; } this.removeSprite(inSprite, inSprite.myMission == 'enter' || this.myDir != 'down'); inSprite.amDone = true; inSprite.myStatus2 = 'idle'; } } inSprite.gotoAndStop(inSprite.myStatus2); MadnessCharacter.adjustSprite(inSprite); }; v2.keepDoorOpen = function (inChar) { this.stayOpen.push(inChar); }; v2.removeFromReserveList = function (inChar) { var v2 = 0; while (v2 < this.stayOpen.length) { if (inChar == this.stayOpen[v2]) { this.stayOpen.splice(v2, 1); break; } ++v2; } }; v2.lockMe = function () { this.myDataRef.amLocked = true; this.myDataRef.myConnection.amLocked = true; this.myDataRef.myConnection.mySprite.amLocked = true; this.amLocked = true; }; v2.unlockMe = function () { this.myDataRef.amLocked = false; this.myDataRef.myConnection.amLocked = false; this.myDataRef.myConnection.mySprite.amLocked = false; this.amLocked = false; }; v2.currentStart = 0; v2.currentStartIncrement = 1; ASSetPropFlags(_global.MadnessDoors.prototype, null, 1); } #endinitclip } movieClip 8394 __Packages.MadnessGameSelect { #initclip if (!_global.MadnessGameSelect) { var v1 = function () { super(); this.onEnterFrame = this.tick; }; _global.MadnessGameSelect = v1; _global.MadnessGameSelect extends MovieClip; var v2 = v1.prototype; v2.init = function () { this.setContinueButton(); MadnessGameSelect.currentGameSelect = this; trace('Version ' + MadnessGameSelect.myVersion); if (MadnessGameSelect.myVersion == 1.4) { MadnessGameSelect.gameMode = 'arena'; MadnessSaveData.loadArenaTestData(); MadnessGameSelect.gameMode = MadnessGameSelect.allGameModes[0]; } MadnessSaveData.sizeSave(); MadnessSaveData.loadOptions(); SwainAudioPlayer.playTrack('menu'); }; v2.tick = function () {}; v2.pressNext = function () { this.changeGameMode(1); this.init(); }; v2.pressPrev = function () { this.changeGameMode(-1); this.init(); }; v2.pressStory = function () { MadnessGameSelect.gameMode = 'story'; this.gotoAndStop('story'); this.setContinueButton(); SwainAudioPlayer.playSound('menu1', 0); }; v2.pressArena = function () { MadnessGameSelect.gameMode = 'arena'; this.gotoAndStop('arena'); this.setContinueButton(); SwainAudioPlayer.playSound('menu1', 0); }; v2.pressOptions = function () { this.gotoAndStop('options'); this.setQualityButtons(); this.setMusicButtons(); this.setBackgroundButtons(); SwainAudioPlayer.playSound('menu1', 0); }; v2.pressCredits = function () { this.gotoAndStop('credits'); SwainAudioPlayer.playSound('menu1', 0); }; v2.pressCheats = function () { this.gotoAndStop('cheats'); SwainAudioPlayer.playSound('menu1', 0); }; v2.pressMoarMadness = function () { this.getURL('http://www.newgrounds.com/collection/madness.html', '_blank'); SwainAudioPlayer.playSound('menu1', 0); }; v2.pressQuality = function (inQual) { _root._quality = inQual; this.setQualityButtons(); SwainAudioPlayer.playSound('menu1', 0); MadnessSaveData.saveOptions(); }; v2.setQualityButtons = function () { this.highTEXT._visible = _root._quality == 'HIGH'; this.medTEXT._visible = _root._quality == 'MEDIUM'; this.lowTEXT._visible = _root._quality == 'LOW'; this.highButton._visible = _root._quality != 'HIGH'; this.medButton._visible = _root._quality != 'MEDIUM'; this.lowButton._visible = _root._quality != 'LOW'; }; v2.pressMusic = function (inOn) { trace('t1 ' + SwainAudioPlayer.muteMusic); SwainAudioPlayer.muteMusic(inOn); this.setMusicButtons(); SwainAudioPlayer.playSound('menu1', 0); MadnessSaveData.saveOptions(); }; v2.setMusicButtons = function () { trace(SwainAudioPlayer.musicOn); this.onTEXT._visible = SwainAudioPlayer.musicOn; this.onButton._visible = !SwainAudioPlayer.musicOn; this.offTEXT._visible = !SwainAudioPlayer.musicOn; this.offButton._visible = SwainAudioPlayer.musicOn; }; v2.pressBackground = function (inQual) { MadnessGameSelect.backgroundQuality = inQual; this.setBackgroundButtons(); SwainAudioPlayer.playSound('menu1', 0); MadnessSaveData.saveOptions(); }; v2.setBackgroundButtons = function () { this.highBgTEXT._visible = MadnessGameSelect.backgroundQuality == 'high'; this.lowBgTEXT._visible = MadnessGameSelect.backgroundQuality == 'low'; this.highBgButton._visible = MadnessGameSelect.backgroundQuality != 'high'; this.lowBgButton._visible = MadnessGameSelect.backgroundQuality != 'low'; }; v2.setContinueButton = function () { if (MadnessGameSelect.myVersion == 1.4) { this.continueButton._visible = MadnessSaveData.testSaveExists(); } if (MadnessGameSelect.myVersion == 1.3) { this.continueButton._visible = MadnessGameSelect.testSaveExistsOLD(); } this.continueTEXT._visible = !this.continueButton._visible; }; v2.assignRandomCharacter = function () { var v3 = MadnessGameSelect.gameMode; MadnessGameSelect.gameMode = 'story'; var v2 = new MadnessDataFile(); v2.createNew(MadnessGameSelect.menuCharacters[SwainMath.randomNumber(0, MadnessGameSelect.menuCharacters.length - 1)]); v2.myWeapons[0] = undefined; v2.myWeapons[1] = undefined; MadnessCharacter.applyNecessaryStats(this.charIcon, v2); MadnessStoreHire.updateCharCard(this.charIcon, v2, false); this.charIcon.mySprite.play(); MadnessGameSelect.gameMode = v3; }; v2.changeGameMode = function (inDir) { var v2; var v1 = 0; while (v1 < MadnessGameSelect.allGameModes.length) { if (MadnessGameSelect.gameMode == MadnessGameSelect.allGameModes[v1]) { v2 = v1; break; } ++v1; } var v3; if (v2 == 0 && inDir == -1) { v3 = MadnessGameSelect.allGameModes.length - 1; } else { if (v2 == MadnessGameSelect.allGameModes.length - 1 && inDir == 1) { v3 = 0; } else { v3 = v2 + inDir; } } MadnessGameSelect.gameMode = MadnessGameSelect.allGameModes[v3]; }; v2.pressNew = function () { if (MadnessSaveData.testSaveExists() && MadnessGameSelect.myVersion == 1.4 || MadnessGameSelect.testSaveExistsOLD() && MadnessGameSelect.myVersion == 1.3) { SwainAudioPlayer.playSound('menu1', 0); MadnessPopup.addPopup('yesno', 'You\'re about to ruin the entirety of your data.', null, 425, 180, this, -1, MadnessGameSelect.pressYes, MadnessGameSelect.pressNo); } else { MadnessGameSelect.pressYes(); } }; v2.pressContinue = function () { if (MadnessGameSelect.myVersion == 1.4) { MadnessSaveData.loadGame(); } if (MadnessGameSelect.myVersion == 1.3) { MadnessGameSelect.loadGameOLD(); } MadnessCharacterCreator.newGame = false; if (!MadnessTransition.transitionLock) { _root.createTransition('fade', MadnessGameSelect.gameMode + '_menu_new', null); } SwainAudioPlayer.playSound('menu4', 0); }; v1.pressYes = function () { if (MadnessGameSelect.myVersion == 1.4) { MadnessSaveData.newGame(); } if (MadnessGameSelect.myVersion == 1.3) { MadnessGameSelect.newGameOLD(); } MadnessCharacterCreator.newGame = true; if (!MadnessTransition.transitionLock) { if (MadnessGameSelect.gameMode == 'arena') { MadnessCutscene.storeCutsceneInfo('cutscene_arena1', MadnessGameSelect.gameMode + '_menu_new', null); _root.createTransition('fade', 'cutscene', null); } else { _root.createTransition('fade', MadnessGameSelect.gameMode + '_menu_new', null); } } SwainAudioPlayer.playSound('menu4', 0); }; v1.pressNo = function () { MadnessPopup.currentPopup.myDataRef.closePopup(); SwainAudioPlayer.playSound('menu4', 0); }; v1.closeGameSelect = function () { MadnessGameSelect.currentGameSelect.removeMovieClip(); }; v1.appropriateXP = function (inSource, inTarget, inType) { if (MadnessGameSelect.gameMode == 'arena' && !inTarget.amHarvested) { inTarget.amHarvested = true; var v4 = inTarget.myLevel * 20; if (inSource.myLevel > inTarget.myLevel) { v4 = v4 * 0.7 + v4 * (inTarget.myLevel / inSource.myLevel); } _root.earnedCash += v4; if (inSource == MadnessRoster.playerRoster.teamLeader) { ++inSource.myKills; ++_root.arenaKills; var v5 = inTarget.myLevel * 8; if (v5 < 1) { v5 = 1; } _root.earnedXP += v5; } else { if (inSource.myRoster == MadnessRoster.playerRoster) { ++inSource.myKills; var v5 = inTarget.myLevel * 8; if (v5 < 1) { v5 += 1; } inSource.applyXP(v5); inSource.autoApplyPoints(); } } } if (inSource == MadnessRoster.playerRoster.teamLeader) { if (_root.myGameSpeed == 0) { inSource.mySlowMo += 10; } else { inSource.mySlowMo += 20; } if (inSource.mySlowMo > inSource.mySlowMoMax) { inSource.mySlowMo = inSource.mySlowMoMax; } } }; v1.checkKillMedals = function () { if (!MadnessGameSelect.testMode) { if (_root.arenaKills >= 50) { MadnessMedals.unlockMedal('kills1'); } if (_root.arenaKills >= 200) { MadnessMedals.unlockMedal('kills2'); } if (_root.arenaKills >= 350) { MadnessMedals.unlockMedal('kills3'); } if (_root.arenaKills >= 600) { MadnessMedals.unlockMedal('kills4'); } if (_root.arenaKills >= 1000) { MadnessMedals.unlockMedal('kills5'); } if (_root.arenaKills >= 2000) { MadnessMedals.unlockMedal('kills6'); } if (_root.arenaKills >= 5000) { MadnessMedals.unlockMedal('kills7'); } if (_root.arenaKills >= 9001) { MadnessMedals.unlockMedal('kills8'); } if (_root.arenaKills >= 53594) { MadnessMedals.unlockMedal('kills9'); } } }; v1.beatStage = function (inWorld, inLevel) { trace('Beat level!'); MadnessGameSelect['storyProgressWorld' + String(inWorld)][inLevel] = true; trace(MadnessGameSelect['storyProgressWorld' + String(inWorld)]); if (MadnessGameSelect.myVersion == 1.4) { MadnessSaveData.saveGame(); } if (MadnessGameSelect.myVersion == 1.3) { MadnessGameSelect.saveGameOLD(); } }; v1.gameStarted = function () { if (MadnessGameSelect.gameMode == 'story') { if (MadnessGameSelect.myDifficulty == 'easy') { MadnessCharacter.playerLives = 2; } if (MadnessGameSelect.myDifficulty == 'normal') { MadnessCharacter.playerLives = 1; } if (MadnessGameSelect.myDifficulty == 'hard') { MadnessCharacter.playerLives = 0; } } if (MadnessGameSelect.gameMode == 'arena') { MadnessCharacter.playerLives = 0; } }; v1.testSaveExistsOLD = function () { var v1 = SharedObject.getLocal(MadnessGameSelect.gameMode + MadnessGameSelect.saveName + String(1)); return v1.data.haveSaved != undefined; }; v1.newGameOLD = function () { if (MadnessGameSelect.gameMode == 'story') { MadnessGameSelect.storyProgressWorld0 = [false, false, false, false, false, false, false, false]; } if (MadnessGameSelect.gameMode == 'arena') { MadnessRoster.playerRoster = new MadnessRoster(); MadnessRoster.playerRoster.init('player'); var v2 = new MadnessDataFile(); v2.createNew('arenatest', false); MadnessRoster.playerRoster.addCharacter(v2); MadnessRoster.playerRoster.makeActive(v2); MadnessRoster.playerRoster.myCash = 200000; _root.earnedXP = new Number(); _root.earnedCash = new Number(); MadnessRoster.storeRoster = new MadnessRoster(); MadnessRoster.storeRoster.init('store'); CharacterGenerator.storePopulator(); ItemGenerator.storePopulator(); _root.newArena = true; _root.generateArena(5); } }; v1.loadGameOLD = function () { var v2 = SharedObject.getLocal(MadnessGameSelect.gameMode + MadnessGameSelect.saveName + String(1)); if (!MadnessGameSelect.testSaveExistsOLD()) { trace('No Data'); } else { if (MadnessGameSelect.gameMode == 'story') { MadnessGameSelect.storyProgressWorld0 = v2.data.storyProgressWorld0; if (MadnessGameSelect.storyProgressWorld0 == undefined) { MadnessGameSelect.storyProgressWorld0 = [false, false, false, false, false, false, false, false]; } } if (MadnessGameSelect.gameMode == 'arena') { trace('Attempting Load:'); MadnessRoster.playerRoster = new MadnessRoster(); MadnessRoster.playerRoster.copyRoster(v2.data.playerRoster); MadnessRoster.playerRoster.convertCharactersToMadnessData(v2.data.playerRosterMembers); MadnessRoster.playerRoster.convertActiveMembers(); MadnessRoster.storeRoster = new MadnessRoster(); MadnessRoster.storeRoster.init('store'); CharacterGenerator.storePopulator(); ItemGenerator.storePopulator(); var v3 = v2.data.newArena; if (v3 == undefined) { v3 = false; trace('FAILED to load, resetting new arena boolean'); } _root.newArena = v3; var v4 = v2.data.currentWave; if (v4 == undefined) { v4 = 1; trace('FAILED to load, resetting wave'); } _root.generateArena(v4); } trace('Data LOADED'); } }; v1.saveGameOLD = function () { var v2 = SharedObject.getLocal(MadnessGameSelect.gameMode + MadnessGameSelect.saveName + String(1)); v2.clear(); v2.data.haveSaved = true; if (MadnessGameSelect.gameMode == 'story') { v2.data.storyProgressWorld0 = MadnessGameSelect.storyProgressWorld0; } if (MadnessGameSelect.gameMode == 'arena') { trace('Attempting Save:'); var v3 = new MadnessRoster(); v3.copyRoster(MadnessRoster.playerRoster); v2.data.playerRosterMembers = v3.returnCharactersAsObjects(); v3.myMembers = new Array(); v2.data.playerRoster = Object(v3); v2.data.storeRosterMembers = undefined; delete v2.data.storeRosterMembers; v2.data.storeRoster = undefined; delete v2.data.storeRoster; v2.data.newArena = _root.newArena; v2.data.currentWave = MadnessLevel.currentLevel.totalWaves; } v2.flush(600); if (MadnessGameSelect.gameMode == 'arena') { trace(' SAVE! ' + v2.data.newArena + ' ' + v2.data.currentWave); } trace('After Save: ' + v2.getSize() * 0.001 + ' kb'); }; v1.myDifficulty = 'normal'; v1.backgroundQuality = 'high'; v1.allGameModes = ['story', 'arena', 'options']; v1.gameMode = MadnessGameSelect.allGameModes[0]; v1.saveName = 'MadnessTest3'; v1.menuCharacters = ['hank', 'sanford', 'deimos', 'agent', 'zombie', 'zombie_agent', 'scientist', 'jesus2']; v1.myVersion = 1.4; v1.testMode = false; ASSetPropFlags(_global.MadnessGameSelect.prototype, null, 1); } #endinitclip } movieClip 8395 __Packages.MadnessSaveData { #initclip if (!_global.MadnessSaveData) { var v1 = function () {}; _global.MadnessSaveData = v1; var v2 = v1.prototype; v1.newGame = function () { var v2 = MadnessGameSelect.gameMode; if (v2 == 'story') { MadnessGameSelect.storyProgressWorld0 = [false, false, false, false, false, false, false, false]; MadnessGameSelect.storyProgressWorld1 = [false, false, false, false, false, false]; } if (v2 == 'arena') { MadnessRoster.playerRoster = new MadnessRoster(); MadnessRoster.playerRoster.init('player'); var v3 = new MadnessDataFile(); v3.createNew('arena', false); MadnessRoster.playerRoster.addCharacter(v3); MadnessRoster.playerRoster.makeActive(v3); MadnessRoster.playerRoster.makeLeader(v3); MadnessRoster.playerRoster.myCash = 0; _root.earnedXP = new Number(); _root.earnedCash = new Number(); MadnessRoster.storeRoster = new MadnessRoster(); MadnessRoster.storeRoster.init('store'); CharacterGenerator.storePopulator(); ItemGenerator.storePopulator(); _root.newArena = true; _root.generateArena(1); var v4 = SharedObject.getLocal(v2 + MadnessSaveData.saveName); _root.arenaKills = v4.data.arenaKills; _root.arenaWaves = v4.data.arenaWaves; if (_root.arenaKills == undefined) { _root.arenaKills = 0; } if (_root.arenaWaves == undefined) { _root.arenaWaves = 0; } } trace('New Game!'); MadnessSaveData.saveGame(v2); }; v1.saveGame = function () { var v8 = MadnessGameSelect.gameMode; var v3 = SharedObject.getLocal(v8 + MadnessSaveData.saveName); v3.clear(); v3.data.haveSaved = true; if (v8 == 'story') { v3.data.storyProgressWorld0 = MadnessGameSelect.storyProgressWorld0; v3.data.storyProgressWorld1 = MadnessGameSelect.storyProgressWorld1; v3.data.storyProgressWorld2 = MadnessGameSelect.storyProgressWorld2; v3.data.storyProgressWorld3 = MadnessGameSelect.storyProgressWorld3; } if (v8 == 'arena') { var v4 = new Array(); var v2 = 0; while (v2 < MadnessRoster.playerRoster.myWeapons.length) { v4.push(ItemGenerator.replicateWeapon(MadnessRoster.playerRoster.myWeapons[v2])); ++v2; } var v5 = new Array(); var v10; v2 = 0; while (v2 < MadnessRoster.playerRoster.myArmor.length) { v5.push(ItemGenerator.createArmor(MadnessRoster.playerRoster.myArmor[v2].myType)); ++v2; } var v9; v9 = MadnessDataFile.replicateCharacter(MadnessRoster.playerRoster.teamLeader); var v7 = new Array(); v2 = 0; while (v2 < MadnessRoster.playerRoster.myActiveMembers.length) { if (MadnessRoster.playerRoster.myActiveMembers[v2] != MadnessRoster.playerRoster.teamLeader) { v7.push(MadnessDataFile.replicateCharacter(MadnessRoster.playerRoster.myActiveMembers[v2])); } ++v2; } var v6 = new Array(); v2 = 0; while (v2 < MadnessRoster.playerRoster.myMembers.length) { if (!MadnessRoster.playerRoster.returnActiveCharacter(MadnessRoster.playerRoster.myMembers[v2])) { v6.push(MadnessDataFile.replicateCharacter(MadnessRoster.playerRoster.myMembers[v2])); } ++v2; } v3.data.myWeaponsList = v4; v3.data.myArmorList = v5; v3.data.teamLeader = v9; v3.data.myActiveMembers = v7; v3.data.myInactiveMembers = v6; v3.data.myCash = MadnessRoster.playerRoster.myCash; v3.data.currentWave = MadnessLevel.currentLevel.totalWaves; v3.data.arenaKills = _root.arenaKills; v3.data.arenaWaves = _root.arenaWaves; v3.data.newArena = _root.newArena; v3.data.dataTester = 'FILE INTEGRITY INTACT'; MadnessGameSelect.checkKillMedals(); } v3.flush(1000000); trace('File Saved! Total size: ' + v3.getSize() * 0.001 + ' kb'); }; v1.loadGame = function () { var v5 = MadnessGameSelect.gameMode; var v2 = SharedObject.getLocal(v5 + MadnessSaveData.saveName); if (!MadnessSaveData.testSaveExists()) { MadnessSaveData.newGame(v5); trace('No Data'); } else { if (v5 == 'story') { MadnessGameSelect.storyProgressWorld0 = v2.data.storyProgressWorld0; MadnessGameSelect.storyProgressWorld1 = v2.data.storyProgressWorld1; MadnessGameSelect.storyProgressWorld2 = v2.data.storyProgressWorld2; MadnessGameSelect.storyProgressWorld3 = v2.data.storyProgressWorld3; if (MadnessGameSelect.storyProgressWorld0 == undefined) { MadnessGameSelect.storyProgressWorld0 = [false, false, false, false, false, false, false, false]; } if (MadnessGameSelect.storyProgressWorld1 == undefined) { MadnessGameSelect.storyProgressWorld1 = [false, false, false, false, false, false]; } if (MadnessGameSelect.storyProgressWorld2 == undefined) { MadnessGameSelect.storyProgressWorld2 = [false]; } if (MadnessGameSelect.storyProgressWorld3 == undefined) { MadnessGameSelect.storyProgressWorld3 = [false]; } } if (v5 == 'arena') { MadnessRoster.playerRoster = new MadnessRoster(); MadnessRoster.playerRoster.init('player'); var v3 = 0; while (v3 < v2.data.myWeaponsList.length) { MadnessRoster.playerRoster.addWeapon(ItemGenerator.replicateWeapon(v2.data.myWeaponsList[v3])); ++v3; } var v6; v3 = 0; while (v3 < v2.data.myArmorList.length) { MadnessRoster.playerRoster.addArmor(ItemGenerator.createArmor(v2.data.myArmorList[v3].myType)); ++v3; } v2.data.teamLeader.amSpecial = true; var v4 = MadnessDataFile.replicateCharacter(v2.data.teamLeader); MadnessRoster.playerRoster.addCharacter(v4); MadnessRoster.playerRoster.makeActive(v4); MadnessRoster.playerRoster.makeLeader(v4); v3 = 0; while (v3 < v2.data.myActiveMembers.length) { v2.data.myActiveMembers[v3].amSpecial = true; v4 = MadnessDataFile.replicateCharacter(v2.data.myActiveMembers[v3]); MadnessRoster.playerRoster.addCharacter(v4); MadnessRoster.playerRoster.makeActive(v4); ++v3; } v3 = 0; while (v3 < v2.data.myInactiveMembers.length) { v2.data.myInactiveMembers[v3].amSpecial = true; v4 = MadnessDataFile.replicateCharacter(v2.data.myInactiveMembers[v3]); MadnessRoster.playerRoster.addCharacter(v4); ++v3; } MadnessRoster.storeRoster = new MadnessRoster(); MadnessRoster.storeRoster.init('store'); CharacterGenerator.storePopulator(); ItemGenerator.storePopulator(); MadnessRoster.playerRoster.myCash = v2.data.myCash; _root.earnedXP = new Number(); _root.earnedCash = new Number(); _root.newArena = v2.data.newArena; _root.generateArena(v2.data.currentWave); _root.arenaKills = v2.data.arenaKills; _root.arenaWaves = v2.data.arenaWaves; trace('File Integrity: ' + v2.data.dataTester); if (MadnessRoster.playerRoster.myCash == NaN) { MadnessRoster.playerRoster.myCash = 0; } } trace('File Loaded! Total size: ' + v2.getSize() * 0.001 + ' kb'); } }; v1.testSaveExists = function () { var v1 = MadnessGameSelect.gameMode; var v2 = SharedObject.getLocal(v1 + MadnessSaveData.saveName); return v2.data.haveSaved != undefined; }; v1.sizeSave = function () { var v1 = SharedObject.getLocal(MadnessGameSelect.gameMode + MadnessSaveData.saveName); v1.flush(1000000); }; v1.loadOptions = function () { var v2 = SharedObject.getLocal('options_' + MadnessSaveData.saveName); if (v2.data.optionsSaveCheck) { _root._quality = v2.data.myQuality; SwainAudioPlayer.musicOn = v2.data.muteMusic; MadnessGameSelect.backgroundQuality = v2.data.backgroundQuality; } }; v1.saveOptions = function () { var v2 = SharedObject.getLocal('options_' + MadnessSaveData.saveName); v2.data.optionsSaveCheck = true; v2.data.myQuality = _root._quality; v2.data.muteMusic = SwainAudioPlayer.musicOn; v2.data.backgroundQuality = MadnessGameSelect.backgroundQuality; }; v1.loadArenaTestData = function () { var v3 = SharedObject.getLocal('arenaMadnessTest31'); if (v3.data.haveSaved) { var v2 = new MadnessRoster(); v2.copyRoster(v3.data.playerRoster); v2.convertCharactersToMadnessData(v3.data.playerRosterMembers); v2.convertActiveMembers(); if (v2.teamLeader.myKills > _root.arenaKills) { _root.arenaKills = Number(v2.teamLeader.myKills); } if (v2.teamLeader.myWaves > _root.arenaWaves) { _root.arenaWaves = Number(v2.teamLeader.myWaves); } var v4 = v3.data.newArena; if (v4 == undefined) { v4 = false; } _root.newArena = v4; var v5 = v3.data.currentWave; if (v5 == undefined) { v5 = 1; } _root.generateArena(v5); _root.earnedXP = new Number(); _root.earnedCash = new Number(); if (v2.myActiveMembers.length > 0 && v2.teamLeader.myName != undefined) { MadnessRoster.playerRoster = v2; MadnessSaveData.saveGame(); trace('*** Found Old Data! Replacing ****'); } v3.clear(); } }; v1.lastSaveName = 'MadnessTest3'; v1.saveName = 'MadnessGame2'; ASSetPropFlags(_global.MadnessSaveData.prototype, null, 1); } #endinitclip } movieClip 8396 __Packages.CharacterGenerator { #initclip if (!_global.CharacterGenerator) { var v1 = function () {}; _global.CharacterGenerator = v1; var v2 = v1.prototype; v1.generateCharacter = function (inCharArray, inDifficulty) {}; v1.generateRoster = function (inFaction, inUnitsArray) { var v3 = new MadnessRoster(); v3.init(inFaction); var v2 = 0; while (v2 < inUnitsArray.length) { var v1 = new MadnessDataFile(); v1.createNew(MadnessLevel.badguyShoppingList[SwainMath.randomNumber(0, MadnessLevel.badguyShoppingList.length - 1)]); v3.addCharacter(v1); v3.makeActive(v1); ++v2; } return v3; }; v1.storePopulator = function () { var v9 = MadnessRoster.storeRoster; while (MadnessRoster.storeRoster.myMembers.length > 0) { v9.removeCharacter(v9.myMembers[0]); } var v8 = 0; for (;;) { if (!(v8 < 2 || v8 < 5 && SwainMath.randomNumber(0, 2) < 2)) break; var v4 = new MadnessDataFile(); var v3 = true; if (SwainMath.randomNumber(0, 10) == 0) { var v2 = new Array(); var v6; if (MadnessRoster.playerRoster.teamLeader.myLevel >= 8) { v2.push('blockhead'); } if (MadnessRoster.playerRoster.teamLeader.myLevel >= 12) { v2.push('krinkels'); } if (MadnessRoster.playerRoster.teamLeader.myLevel >= 10) { v2.push('swain'); } if (MadnessRoster.playerRoster.teamLeader.myLevel >= 10) { v2.push('cheshyre'); } if (MadnessRoster.playerRoster.teamLeader.myLevel >= 10) { v2.push('luis'); } if (MadnessRoster.playerRoster.teamLeader.myLevel >= 20) { v2.push('tricky'); } if (MadnessRoster.playerRoster.teamLeader.myLevel >= 20) { v2.push('jesus'); } if (MadnessRoster.playerRoster.teamLeader.myLevel >= 15) { v2.push('deimos'); } if (MadnessRoster.playerRoster.teamLeader.myLevel >= 15) { v2.push('sanford'); } if (MadnessRoster.playerRoster.teamLeader.myLevel >= 30) { v2.push('hank'); } var v7 = 0; for (;;) { if (!(v7 < 3 && v3 == true)) break; v3 = false; v6 = v2[SwainMath.randomNumber(0, v2.length - 1)]; var v5 = 0; while (v5 < MadnessRoster.storeRoster.myMembers.length) { if (MadnessRoster.storeRoster.myMembers[v5].myCharacter == v6) { v3 = true; break; } ++v5; } if (!v3) { v5 = 0; while (v5 < MadnessRoster.playerRoster.myMembers.length) { if (MadnessRoster.playerRoster.myMembers[v5].myCharacter == v6) { v3 = true; break; } ++v5; } } ++v7; } if (!v3) { v4.createNew(v6); v4.applyHireCost(v4.myLevel); v4.myWeapons[0] = undefined; v4.myWeapons[1] = undefined; v4.mixStats(); } } if (v3) { v4.createNew('arena_merc'); v4.randomStats(MadnessRoster.playerRoster.teamLeader.myLevel); ItemGenerator.assignGear(v4, MadnessRoster.playerRoster.teamLeader.myLevel); v4.myName = CharacterGenerator.allNames[SwainMath.randomNumber(0, CharacterGenerator.allNames.length - 1)]; } if (v4 != undefined && v4.myName != undefined) { MadnessRoster.storeRoster.addCharacter(v4); } ++v8; } if (_root.storeHire != undefined) { _root.storeHire.init(); } }; v1.returnWaveList = function (inLevel, inWave) { var v8 = new Array(); var v6 = 3 + Math.floor((inLevel + inWave / 4) / 4); if (v6 > 6) { v6 = 6; } var v9 = new Array(); var v7 = 0; if (inWave == 4 || inWave == 8) { v7 += Math.ceil(inLevel / (8 - inWave) / 5); } var v2 = new Array(); if (MadnessGameSelect.subGameMode == 'standard') { if (inLevel <= 2) { v2 = ['civ', 'civ', 'civ']; } else { if (inLevel <= 4) { v2 = ['civ', 'civ', 'civ', 'civ']; } else { if (inLevel <= 6) { v2 = ['civ', 'civ', 'agent', 'agent']; } else { if (inLevel <= 12) { v2 = ['civ', 'civ', 'agent', 'agent', 'agent']; } else { if (inLevel <= 16) { v2 = ['civ', 'agent', 'agent', 'agent', 'agent', 'agent']; } else { if (inLevel <= 20) { v2 = ['agent', 'agent', 'agent', 'agent', 'agent2', 'agent2']; } else { if (inLevel <= 24) { v2 = ['agent', 'agent', 'agent', 'agent2', 'agent2', 'agent2']; } else { if (inLevel <= 28) { v2 = ['agent', 'agent', 'agent2', 'agent2', 'agent2', 'agent2']; } else { if (inLevel <= 30) { v2 = ['agent', 'agent2', 'agent2', 'agent2', 'agent2', 'agent3']; } else { if (inLevel <= 32) { v2 = ['agent2', 'agent2', 'agent2', 'agent3', 'agent3', 'agent3']; } else { if (inLevel <= 36) { v2 = ['agent2', 'agent2', 'agent3', 'agent3', 'agent3', 'agent3']; } else { v2 = ['agent3', 'agent3', 'agent3', 'agent3', 'agent3', 'agent3', 'agent3']; } } } } } } } } } } } var v5 = new Number(); if (inWave == 8 && inLevel <= 36 && inLevel / 12 == Math.floor(inLevel / 12)) { v5 = Math.floor(inLevel / 12); } if (inWave == 4 && inLevel > 36) { v5 = Math.ceil((inLevel - 36) / 4); } var v3 = 0; while (v3 < v5) { v2.push('fatboy'); ++v3; } if (inLevel > 36 && inWave == 8) { v3 = 0; while (v3 < (inLevel - 36) / 4) { v2.push('fatman'); ++v3; } } if (inWave == 8 && inLevel > 1 && inLevel / 12 != Math.floor(inLevel / 12)) { if (inLevel <= 4) { v2.push('agent'); } else { if (inLevel <= 16) { v2.push('agent2'); } else { if (inLevel <= 28) { v2.push('agent3'); } } } } } if (MadnessGameSelect.subGameMode == 'zombie') { if (inLevel <= 2) { v2 = ['zombie', 'zombie', 'zombie']; } else { if (inLevel <= 4) { v2 = ['zombie', 'zombie', 'zombie', 'zombie']; } else { if (inLevel <= 6) { v2 = ['zombie', 'zombie', 'zombie_agent', 'zombie_agent']; } else { if (inLevel <= 12) { v2 = ['zombie', 'zombie', 'zombie_agent', 'zombie_agent', 'zombie_agent']; } else { if (inLevel <= 16) { v2 = ['zombie', 'zombie_agent', 'zombie_agent', 'zombie_agent', 'zombie_agent']; } else { if (inLevel <= 20) { v2 = ['zombie_agent', 'zombie_agent', 'zombie_agent', 'zombie_agent2', 'zombie_agent2']; } else { if (inLevel <= 24) { v2 = ['zombie_agent', 'zombie_agent', 'zombie_agent2', 'zombie_agent2', 'zombie_agent2']; } else { if (inLevel <= 28) { v2 = ['zombie_agent', 'zombie_agent2', 'zombie_agent2', 'zombie_agent2', 'zombie_agent2']; } else { if (inLevel <= 30) { v2 = ['zombie_agent2', 'zombie_agent2', 'zombie_agent2', 'zombie_agent2', 'zombie_agent3']; } else { if (inLevel <= 32) { v2 = ['zombie_agent2', 'zombie_agent2', 'zombie_agent3', 'zombie_agent3', 'zombie_agent3']; } else { if (inLevel <= 36) { v2 = ['zombie_agent2', 'zombie_agent3', 'zombie_agent3', 'zombie_agent3', 'zombie_agent3']; } else { v2 = ['zombie_agent3', 'zombie_agent3', 'zombie_agent3', 'zombie_agent3', 'zombie_agent3', 'zombie_agent3']; } } } } } } } } } } } v5 = new Number(); if (inLevel > 8 && inWave == 8) { v5 = 1 + Math.floor(inLevel / 16); } if (inLevel > 16 && inWave == 4) { v5 = Math.floor(inLevel / 16); } v3 = 0; while (v3 < v5) { v2.push('zombie_fatboy'); ++v3; } if (inWave == 8 && inLevel > 1 && inLevel / 12 != Math.floor(inLevel / 12)) { if (inLevel <= 4) { v2.push('zombie_agent'); return v2; } if (inLevel <= 16) { v2.push('zombie_agent2'); return v2; } if (inLevel <= 28) { v2.push('zombie_agent3'); } } } return v2; }; v1.returnWaveListPREVIOUS = function (inLevel, inWave) { --inLevel; var v3 = new Array(); var v8 = 3 + Math.floor((inLevel + inWave / 4) / 4); var v2 = new Array(); var v7 = 0; if (inWave == 3 || inWave == 7) { v7 += Math.ceil(inLevel / (8 - inWave) / 5); } var v4 = 0; while (v4 < v8) { if (inLevel + inWave / 4 - 2 < v4 || v4 <= 1) { v3.push('civ'); } else { if (inLevel > 5 && v4 == 2 && inWave > 3) { v3.push('agent2'); } else { if (inLevel > 9 && v4 == 3 && inWave > 4) { v3.push('agent3'); } else { v3.push('agent'); } } } ++v4; } v4 = 0; while (v4 < v7) { if (inLevel + v4 <= 2) { v2.push('agent'); } else { if (inLevel + v4 <= 5) { v2.push('agent2'); } else { if (inLevel + v4 <= 9) { v2.push('agent3'); } else { if (inLevel + v4 <= 15) { v2.push('fatboy'); } else { v2.push('fatman'); } } } } ++v4; } var v6 = new Array(); v4 = 0; while (v4 < v3.length) { v6.push(v3[v4]); ++v4; } v4 = 0; while (v4 < v2.length) { v6.push(v2[v4]); ++v4; } return v6; }; v1.allNames = ['Kurt', 'Stu', 'Willy', 'Geeves', 'Bateman', 'James', 'Axel', 'Bruno', 'Caleb', 'Dale', 'Tucker', 'Felix', 'Fabian', 'Grant', 'Hal', 'Ives', 'Jarvis', 'T.J.', 'Nash', 'Gavyn', 'Don', 'Brooks', 'Bronson', 'Heston', 'Charleton', 'Clint', 'Eastwood', 'Jordan', 'Duane', 'Jacob', 'Stamper', 'Fulp', 'Bandelin', 'Tanner', 'Brick', 'Scooter', 'Roland', 'Blade', 'Logan', 'Xavier', 'Po', 'Thor', 'Odin', 'Loki', 'Zeus', 'Gil', 'Hermes', 'Hercules', 'Hades', 'Apollo', 'Frenchie', 'Aurelius', 'Zeke', 'Yale', 'Wade', 'Vincent', 'Vance', 'Uistean', 'Thorpe', 'Shawn', 'Biddle', 'Johanson', 'Francis', 'Drake', 'Raleigh', 'Quade', 'Pedro', 'Oliver', 'Neal', 'Manuel', 'Landon', 'Keegan', 'Butch', 'Buck', 'Kane', 'Jasper', 'Smalls', 'Ponyboy', 'Godzilla', 'Sailor', 'Charles', 'Mabutu', 'Chumbo', 'Ching', 'Mr.Beautiful', 'Johnny', 'Sticky', 'Duncan', 'Malcolm', 'Malone', 'Professor', 'Coach', 'Ellis', 'Leonardo', 'Michelangelo', 'Donatello', 'Raphael', 'Oney', 'O\'Neal', 'Leon', 'Norton', 'Jacob', 'Fletcher', 'Grisham', 'Graham', 'Harold', 'Watson', 'Holmes', 'Blake', 'Cartiff', 'Ulysses', 'Marty', 'Lloyd', 'Emmett', 'Tiernan', 'Tiberius', 'Thadeus', 'Max', 'Holden', 'Hayden', 'Hadrian', 'Claus', 'Claudius', 'Caesar', 'Fernando', 'Gooseman', 'Hernando', 'Wheeler', 'Ma-Ti', 'Kwame', 'Captain', 'Lee', 'Lucky', 'King', 'Spades', 'Diamonds', 'Clubs', 'Swords', 'Hearts', 'Cadet', 'Niko', 'Roman', 'Brutus', 'Sparticus', 'Clayton', 'Kleeton', 'Cleetus', 'Aden', 'Abram', 'Lee', 'Colby', 'Maynard', 'Jonesy', 'Chauncey', 'Jack', 'Harvey', 'Hugh', 'Tobias', 'Phoenix', 'Simon', 'Alucard', 'Alistar', 'Edgar', 'Edwin', 'Reuben', 'Jonas', 'Dylan', 'Kai', 'Nigel', 'Percy', 'Bruce', 'Alfie', 'Gordon', 'Lebowski', 'Walter', 'Donnie', 'Frank', 'Leo', 'Deadeye', 'Skittles', 'Mr. E', 'Arnold', 'Chuck', 'Sly', 'Statham', 'Jet', 'Dirk', 'Matches', 'Sandman', 'Quintus', 'Ryu', 'Moe', 'Curly', 'Shemp', 'Shep', 'Larry', 'Ricky', 'Addison', 'Adonis', 'Ajay', 'Ari', 'Cale', 'Carlo', 'Castle', 'Dalvin', 'Ethan', 'Eli', 'Ezekiel', 'Fox', 'Snake', 'Wolf', 'Garett', 'Gideon', 'Rocco', 'Judah', 'Mick', 'Sylas', 'Jan', 'Lionel', 'Sabin', 'Setzer', 'Spencer', 'Waylon', 'Wyatt', 'Victor', 'Malakai', 'Fingers', '8-Ball', 'Swastiko', 'Tyrone', 'Filburt', 'Fanny', 'Crowley', 'Grantham', 'Winston', 'Enoch', 'Nucky', 'Priest', 'Brains', 'Sponge', 'Doc', 'Rocky', 'Woody', 'Chubs', 'Snickers', 'Pepsi', 'Bennet', 'Mordecai', 'Percival', 'Samson', 'Terrance', 'Curtis', 'Johan', 'Marcus', 'Kenton', 'Bond', 'Ashton', 'Shepard', 'Rex', 'Tony', 'Ramsay', 'Darius', 'Xerxes', 'Chief', 'Ivan', 'Drago', 'Drachen', 'Vlad', 'Joachim', 'Adolf', 'Heinrich', 'Lungren', 'Dolf', 'Rolf', 'Poopoo', 'Peepee', 'Rigby', 'Heisenberg', 'Pinkman', 'Gus', 'Gayle', 'Conner', 'Marston', 'Jose', 'Dom', 'Micky', 'Donald', 'Church', 'Churchill', 'Gaylord']; ASSetPropFlags(_global.CharacterGenerator.prototype, null, 1); } #endinitclip } movieClip 8397 __Packages.MadnessLevel { #initclip if (!_global.MadnessLevel) { var v1 = function () {}; _global.MadnessLevel = v1; var v2 = v1.prototype; v2.generateLevel = function (inWorld, inLevel) { MadnessLevel.currentLevel = this; this.myLevel = inLevel; this.myWorld = inWorld; MadnessLevel.levelVictory = false; MadnessLevel.levelFailed = false; MadnessLevel.myRooms = new Array(); MadnessLevel.myObjectives = new Array(); MadnessRoster.playerRoster = new MadnessRoster(); MadnessRoster.playerRoster.init('player'); this.generateRooms(inWorld, inLevel); }; v2.generateRooms = function (inWorld, inLevel) { MadnessLevel.myRooms = new Array(); MadnessLevel.myObjectives = new Array(); MadnessLevel.totalRooms = new Number(); MadnessLevel.doorList = new Array(); if (inWorld == 0) { this.defaultDoor = 'door'; if (inLevel == 0) { this.level0_0(); } else { if (inLevel == 1) { this.level0_1(); } else { if (inLevel == 2) { this.level0_2(); } else { if (inLevel == 3) { this.level0_3(); } else { if (inLevel == 4) { this.level0_4(); } else { if (inLevel == 5) { this.level0_5(); } else { if (inLevel == 6) { this.level0_6(); } else { if (inLevel == 7) { this.level0_7(); } } } } } } } } } else { if (inWorld == 1) { this.defaultDoor = 'sidedoor'; if (inLevel == 0) { this.level1_0(); } else { if (inLevel == 1) { this.level1_1(); } else { if (inLevel == 2) { this.level1_2(); } else { if (inLevel == 3) { this.level1_3(); } else { if (inLevel == 4) { this.level1_4(); } else { if (inLevel == 5) { this.level1_5(); } } } } } } } } }; v2.generateArena = function (inStartWave) { trace('Begun, ' + inStartWave); MadnessLevel.currentLevel = this; MadnessLevel.levelVictory = false; MadnessLevel.levelFailed = false; MadnessLevel.myRooms = new Array(); MadnessLevel.myObjectives = new Array(); var v4; var v5; this.totalWaves = inStartWave; this.myDifficulty = Math.floor(this.totalWaves / 2); if (MadnessGameSelect.subGameMode == 'standard') { v4 = 1; this.addRooms(v4, MadnessGameSelect.gameMode); this.defaultDoor = 'door'; v5 = [5]; this.addDoors(MadnessLevel.myRooms, v5); this.setDoorDir(0, 0, 'down'); MadnessLevel.myRooms[0].myDoors[0].myConnection = MadnessRoster.storeRoster; this.addStartPointDoor(MadnessLevel.myRooms[0].myDoors[0]); this.disableDoorSpawn(0, 0); if (_root.newArena) { this.addEvent(MadnessLevel.myRooms[0], MadnessEvents.arena_1_tutorial); } this.setDoorDir(0, 1, 'right'); this.setDoorDir(0, 2, 'down'); this.setDoorDir(0, 3, 'down'); this.setDoorDir(0, 4, 'left'); this.addActivator(0, 'panel'); this.addEvent(MadnessLevel.myRooms[0].myActivators[0], MadnessEvents.arena_1_START); this.addObstacle(0, 'barrel'); this.addObstacle(0, 'barrel'); var v3 = this.totalWaves; while (v3 > 8) { v3 -= 8; } if (v3 == 7) { v3 = 8; } this.applyTrack('stage' + v3, this); } if (MadnessGameSelect.subGameMode == 'zombie') { v4 = 1; this.addRooms(v4, MadnessGameSelect.gameMode); this.defaultDoor = 'sidedoor'; v5 = [6]; this.addDoors(MadnessLevel.myRooms, v5); this.setDoorDir(0, 0, 'down'); MadnessLevel.myRooms[0].myDoors[0].myConnection = MadnessRoster.storeRoster; this.addStartPointDoor(MadnessLevel.myRooms[0].myDoors[0]); this.disableDoorSpawn(0, 0); this.setDoorDir(0, 1, 'right'); this.setDoorDir(0, 2, 'down'); this.setDoorDir(0, 3, 'down'); this.setDoorDir(0, 4, 'down'); this.setDoorDir(0, 5, 'left'); this.addActivator(0, 'panel'); this.addEvent(MadnessLevel.myRooms[0].myActivators[0], MadnessEvents.arena_1_START); this.addObstacle(0, 'box1'); this.addObstacle(0, 'box2'); this.applyTrack('zombie1', this); } }; v2.level0_0 = function () { this.myName = '[1-A] Jail'; this.myDescription = ' In order to bring about the destruction of the Nexus Project and the Nexus Training Program, Hank has been hired to enlist the help of incarcerated agents Sanford and Deimos.'; this.myDifficulty = 4; var v2 = new MadnessDataFile(); v2.createNew('hank'); MadnessRoster.playerRoster.addCharacter(v2); MadnessRoster.playerRoster.makeActive(v2); v2.giveItem(ItemGenerator.createWeapon('glock20', false), 0); v2.giveItem(ItemGenerator.createWeapon('dragonsword', false), 1); v2.myWeapons[0].upgradeSight = true; v2.myWeapons[0].upgradeLaser = true; v2.myWeapons[0].myColor = 1; ItemGenerator.applyUpgrades(v2.myWeapons[0]); v2.myWeapons[0].myClips = 4; v2.myStartup = 'startup3'; v2 = new MadnessDataFile(); v2.createNew('sanford'); MadnessRoster.playerRoster.addCharacter(v2); v2 = new MadnessDataFile(); v2.createNew('deimos'); MadnessRoster.playerRoster.addCharacter(v2); MadnessLevel.totalRooms = 7; this.addRooms(MadnessLevel.totalRooms, MadnessGameSelect.gameMode); MadnessLevel.doorList = [1, 2, 2, 4, 3, 2, 4]; this.addDoors(MadnessLevel.myRooms, MadnessLevel.doorList); this.addStartPoint(MadnessLevel.myRooms[0]); this.setDoorDir(0, 0, 'left'); this.setDoorType(0, 0, 'blast'); this.setDoorDir(1, 0, 'right'); this.setDoorDir(1, 1, 'left'); this.setDoorType(1, 0, 'blast'); this.disableDoorSpawn(1, 0); this.setDoorDir(2, 0, 'right'); this.setDoorDir(2, 1, 'left'); this.disableDoorSpawn(2, 0); this.setDoorDir(3, 0, 'right'); this.setDoorDir(3, 1, 'down'); this.setDoorDir(3, 2, 'down'); this.setDoorDir(3, 3, 'left'); this.disableDoorSpawn(3, 0); this.setDoorDir(4, 0, 'right'); this.setDoorDir(4, 1, 'down'); this.setDoorDir(4, 2, 'left'); this.disableDoorSpawn(4, 0); this.setDoorDir(5, 0, 'right'); this.setDoorDir(5, 1, 'left'); this.setDoorDir(6, 0, 'right'); this.setDoorDir(6, 1, 'down'); this.setDoorType(6, 1, 'spikesJail'); this.disableDoorSpawn(6, 1); this.disableClose(6, 1); this.setDoorDir(6, 2, 'down'); this.setDoorType(6, 2, 'spikesJail'); this.disableDoorSpawn(6, 2); this.disableClose(6, 2); this.setDoorDir(6, 3, 'left'); this.connectDoors(0, 0, '---', 1, 0); this.connectDoors(1, 1, '---', 2, 0); this.connectDoors(2, 1, '---', 3, 0); this.connectDoors(3, 3, '---', 4, 0); this.connectDoors(4, 2, '---', 5, 0); this.connectDoors(5, 1, '---', 6, 0); this.addEvent(MadnessLevel.myRooms[0], MadnessEvents.world_0_0_tutorial1); this.addEvent(MadnessLevel.myRooms[1], MadnessEvents.world_0_0_tutorial2); this.addEvent(MadnessLevel.myRooms[2], MadnessEvents.world_0_0_tutorial3); this.addEvent(MadnessLevel.myRooms[3], MadnessEvents.world_0_0_tutorial4); this.addEvent(MadnessLevel.myRooms[4], MadnessEvents.world_0_0_tutorial5); this.addEvent(MadnessLevel.myRooms[5], MadnessEvents.world_0_0_tutorial6); this.addActivator(2, 'panel'); this.connectActivator(2, 0, '---', MadnessLevel.myRooms[2].myDoors[1], 'unlock'); this.addEvent(MadnessLevel.myRooms[2].myActivators[0], MadnessEvents.world_0_0_tutorial3b); this.addActivator(5, 'lockerLeft'); this.addActivator(6, 'panel'); this.connectActivator(6, 0, '---', MadnessLevel.myRooms[6].myDoors[1], 'unlock'); this.addActivator(6, 'panel'); this.connectActivator(6, 1, '---', MadnessLevel.myRooms[6].myDoors[2], 'unlock'); this.addEvent(MadnessLevel.myRooms[6].myActivators[1], MadnessEvents.world_0_0_prison); this.addActivator(6, 'panel'); this.addObstacle(2, 'empty1'); this.addObstacle(3, 'barrel'); this.addObstacle(5, 'empty2'); this.createNPC(MadnessLevel.myRooms[1], 'civ', 'enemy', 'melee', 5, true, 3); this.createNPC(MadnessLevel.myRooms[1], 'agent', 'enemy', 'melee', 5, true, 1); this.createNPC(MadnessLevel.myRooms[2], 'civ', 'enemy', 'unarmed', 0, true, 1); this.createNPC(MadnessLevel.myRooms[4], 'civ', 'enemy', 'unarmed', 0, true, 3); this.createNPC(MadnessLevel.myRooms[4], 'agent', 'enemy', 'unarmed', 0, true, 1); this.setStartup('stun_surprise', 0); this.createNPC(MadnessLevel.myRooms[5], 'coward', 'enemy', 'unarmed', 0, true, 1); this.addEvent(MadnessLevel.myRooms[5].myCharacters[0], MadnessEvents.world_0_0_closeMedal1); this.resetStartup(); this.createNPC(MadnessLevel.myRooms[6].myDoors[1], 'agent', 'traitors', 'unarmed', 0, true, 1); this.createNPC(MadnessLevel.myRooms[6], 'agent', 'enemy', 'unarmed', 0, true, 2); this.addEvent(MadnessLevel.myRooms[6].myDoors[1].myCharacters[0], MadnessEvents.world_0_0_closeMedal1); this.createRoster(MadnessLevel.myRooms[2], ['civ', 'civ'], 'enemy', 'ranged', 0); this.createRoster(MadnessLevel.myRooms[3], ['agent', 'civ', 'civ', 'civ'], 'enemy', 'ranged', 0); this.createRoster(MadnessLevel.myRooms[3], ['agent', 'civ', 'civ', 'civ'], 'enemy', 'ranged', 0); this.createRoster(MadnessLevel.myRooms[3], ['agent', 'civ', 'civ', 'civ'], 'enemy', 'ranged', 0); this.createRoster(MadnessLevel.myRooms[4], ['agent', 'agent', 'civ'], 'enemy', 'ranged', 0); this.createRoster(MadnessLevel.myRooms[4], ['agent', 'civ', 'civ', 'civ'], 'enemy', 'ranged', 0); this.addNPC(MadnessLevel.myRooms[6].myDoors[2], MadnessRoster.playerRoster.myMembers[MadnessRoster.playerRoster.myMembers.length - 2], true); this.addNPC(MadnessLevel.myRooms[6].myDoors[2], MadnessRoster.playerRoster.myMembers[MadnessRoster.playerRoster.myMembers.length - 1], true); this.addItem(MadnessLevel.myRooms[5].myActivators[0], ItemGenerator.createWeapon('sr3', false)); this.makeObjective(MadnessRoster.playerRoster.myMembers[MadnessRoster.playerRoster.myMembers.length - 2], 'rescue', true, false); this.makeObjective(MadnessRoster.playerRoster.myMembers[MadnessRoster.playerRoster.myMembers.length - 1], 'rescue', true, false); this.myCutsceneStart = 'cutscene_world0_start'; this.applyTrack('stage1', this); }; v2.level0_1 = function () { this.myName = '[1-B] Armory'; this.myDescription = ' We\'re in danger of Nexus Units advancing their equipment loadouts. Hank is required elsewhere, so Sanford and Deimos will have to infiltrate the Armory and put an end to the Nexus weapon stockpile.'; this.myDifficulty = 1; var v2 = new MadnessDataFile(); v2.createNew('sanford'); MadnessRoster.playerRoster.addCharacter(v2); MadnessRoster.playerRoster.makeActive(v2); v2.giveItem(ItemGenerator.createWeapon('hook', false), 0); v2.giveItem(ItemGenerator.createWeapon('glock20', true), 1); v2.myWeapons[1].upgradeSight = false; v2.myWeapons[1].upgradeLaser = true; v2.myWeapons[1].myColor = 1; ItemGenerator.applyUpgrades(v2.myWeapons[1]); v2 = new MadnessDataFile(); v2.createNew('deimos'); MadnessRoster.playerRoster.addCharacter(v2); MadnessRoster.playerRoster.makeActive(v2); v2.giveItem(ItemGenerator.createWeapon('mp7', true), 0); v2.giveItem(ItemGenerator.createWeapon('beretta', true), 1); v2.myWeapons[0].upgradeSight = true; v2.myWeapons[0].upgradeLaser = true; v2.myWeapons[0].myColor = 1; v2.myWeapons[1].upgradeSight = false; v2.myWeapons[1].upgradeLaser = true; v2.myWeapons[1].myColor = 1; ItemGenerator.applyUpgrades(v2.myWeapons[0]); ItemGenerator.applyUpgrades(v2.myWeapons[1]); MadnessLevel.totalRooms = 12; this.addRooms(MadnessLevel.totalRooms, MadnessGameSelect.gameMode); MadnessLevel.doorList = [1, 2, 2, 3, 2, 3, 1, 2, 4, 3, 2, 3]; this.addDoors(MadnessLevel.myRooms, MadnessLevel.doorList); this.addStartPoint(MadnessLevel.myRooms[0]); this.setDoorDir(0, 0, 'left'); this.setDoorDir(1, 0, 'right'); this.setDoorDir(1, 1, 'left'); this.setDoorDir(2, 0, 'right'); this.setDoorDir(2, 1, 'left'); this.setDoorDir(3, 0, 'right'); this.setDoorDir(3, 1, 'down'); this.setDoorDir(3, 2, 'left'); this.setDoorDir(4, 0, 'right'); this.setDoorDir(4, 1, 'down'); this.setDoorDir(5, 0, 'right'); this.setDoorDir(5, 1, 'down'); this.setDoorDir(5, 2, 'down'); this.setDoorDir(6, 0, 'right'); this.setDoorDir(7, 0, 'down'); this.setDoorDir(7, 1, 'down'); this.setDoorDir(8, 0, 'right'); this.setDoorDir(8, 1, 'down'); this.setDoorDir(8, 2, 'down'); this.setDoorDir(8, 3, 'left'); this.setDoorDir(9, 0, 'down'); this.setDoorDir(9, 1, 'down'); this.setDoorDir(9, 2, 'left'); this.setDoorDir(10, 0, 'right'); this.setDoorDir(10, 1, 'left'); this.setDoorDir(11, 0, 'right'); this.setDoorDir(11, 1, 'down'); this.setDoorDir(11, 2, 'left'); this.connectDoors(0, 0, '---', 1, 0); this.connectDoors(1, 1, '---', 2, 0); this.connectDoors(2, 1, '---', 3, 0); this.connectDoors(3, 1, '---', 4, 0); this.connectDoors(3, 2, '---', 5, 0); this.connectDoors(5, 1, '---', 7, 0); this.connectDoors(5, 2, '---', 6, 0); this.connectDoors(7, 1, '---', 8, 2); this.connectDoors(8, 1, '---', 9, 0); this.connectDoors(9, 1, '---', 10, 0); this.connectDoors(10, 1, '---', 11, 0); this.addEvent(MadnessLevel.myRooms[0], MadnessEvents.world_0_1_0); this.addEvent(MadnessLevel.myRooms[6], MadnessEvents.world_0_1_6); this.addActivator(2, 'bomb_crate'); this.addActivator(3, 'panel'); this.addEvent(MadnessLevel.myRooms[3].myActivators[0], MadnessEvents.world_0_1_3_A); this.addActivator(4, 'bomb_crate'); this.addActivator(6, 'lockerLeft'); this.addActivator(6, 'bomb_crate'); this.addActivator(11, 'bomb_crate'); this.addObstacle(1, 'empty1'); this.addObstacle(1, 'empty1'); this.addObstacle(3, 'spikes1'); this.addObstacle(11, 'empty1'); this.setStartup('stun_surprise', 0); this.createNPC(MadnessLevel.myRooms[1], 'civ', 'enemy', 'ranged', 0, true, 0); this.resetStartup(); this.createRoster(MadnessLevel.myRooms[1], ['civ'], 'enemy', 'ranged', 0); this.createNPC(MadnessLevel.myRooms[2], 'civ', 'enemy', 'unarmed', 0, true, 3); this.createNPC(MadnessLevel.myRooms[3], 'civ', 'enemy', 'unarmed', 0, true, 3); this.createRoster(MadnessLevel.myRooms[3], ['civ', 'civ', 'civ'], 'enemy', 'melee', 0); this.createNPC(MadnessLevel.myRooms[4], 'civ', 'enemy', 'melee', 0, true, 1); this.createNPC(MadnessLevel.myRooms[5], 'civ', 'enemy', 'melee', 0, true, 4); this.createRoster(MadnessLevel.myRooms[5], ['civ', 'civ'], 'enemy', 'unarmed', 0); this.createRoster(MadnessLevel.myRooms[5], ['civ', 'civ', 'civ'], 'enemy', 'ranged', 0); this.createNPC(MadnessLevel.myRooms[7], 'civ', 'enemy', 'unarmed', 1, true, 2); this.createRoster(MadnessLevel.myRooms[7], ['civ', 'civ', 'civ'], 'enemy', 'melee', 1); this.createRoster(MadnessLevel.myRooms[7], ['civ', 'civ', 'civ'], 'enemy', 'ranged', 2); this.createNPC(MadnessLevel.myRooms[8], 'civ', 'enemy', 'melee', 1, true, 2); this.createRoster(MadnessLevel.myRooms[8], ['civ', 'agent', 'agent'], 'enemy', 'ranged', 0); this.createRoster(MadnessLevel.myRooms[8], ['civ', 'agent', 'agent'], 'enemy', 'ranged', 3); this.createRoster(MadnessLevel.myRooms[8], ['civ', 'civ', 'civ'], 'enemy', 'melee', 0); this.createRoster(MadnessLevel.myRooms[9], ['civ', 'agent', 'agent'], 'enemy', 'ranged', 0); this.createRoster(MadnessLevel.myRooms[9], ['civ', 'agent', 'agent'], 'enemy', 'ranged', 3); this.createNPC(MadnessLevel.myRooms[11], 'civ', 'enemy', 'melee', 3, true, 3); this.createNPC(MadnessLevel.myRooms[11], 'agent', 'enemy', 'ranged', 3, true, 2); this.createRoster(MadnessLevel.myRooms[11], ['civ', 'agent'], 'enemy', 'ranged', 2); this.createRoster(MadnessLevel.myRooms[11], ['civ', 'civ', 'civ', 'civ', 'agent'], 'enemy', 'ranged', 2); this.createRoster(MadnessLevel.myRooms[11], ['civ', 'agent', 'agent'], 'enemy', 'ranged', 0); this.createRoster(MadnessLevel.myRooms[11], ['civ', 'agent', 'agent'], 'enemy', 'ranged', 3); this.addItem(MadnessLevel.myRooms[6].myActivators[0], ItemGenerator.createWeapon('deagle', false)); this.addItem(MadnessLevel.myRooms[6].myActivators[0], ItemGenerator.createWeapon('97k', false)); this.makeObjective(MadnessLevel.myRooms[2].myActivators[0], 'use', true, false); this.makeObjective(MadnessLevel.myRooms[2], 'clear', true, false); this.makeObjective(MadnessLevel.myRooms[4].myActivators[0], 'use', true, false); this.makeObjective(MadnessLevel.myRooms[4], 'clear', true, false); this.makeObjective(MadnessLevel.myRooms[6].myActivators[1], 'use', true, false); this.makeObjective(MadnessLevel.myRooms[6], 'clear', true, false); this.makeObjective(MadnessLevel.myRooms[11].myActivators[0], 'use', true, false); this.makeObjective(MadnessLevel.myRooms[11], 'clear', true, false); this.applyTrack('stage2', this); }; v2.level0_2 = function () { this.myName = '[1-C] Com-Tower'; this.myDescription = ' Opposition is getting stiff. The probability of hitting the Headquarters of Project Nexus with any reliability will be nil unless we can disrupt its communications array.'; this.myDifficulty = 2; var v2 = new MadnessDataFile(); v2.createNew('sanford'); MadnessRoster.playerRoster.addCharacter(v2); MadnessRoster.playerRoster.makeActive(v2); v2.giveItem(ItemGenerator.createWeapon('hook', false), 0); v2.giveItem(ItemGenerator.createWeapon('glock20', true), 1); v2.myWeapons[1].upgradeSight = false; v2.myWeapons[1].upgradeLaser = true; v2.myWeapons[1].myColor = 1; ItemGenerator.applyUpgrades(v2.myWeapons[1]); v2 = new MadnessDataFile(); v2.createNew('deimos'); MadnessRoster.playerRoster.addCharacter(v2); MadnessRoster.playerRoster.makeActive(v2); v2.giveItem(ItemGenerator.createWeapon('mp7', true), 0); v2.giveItem(ItemGenerator.createWeapon('beretta', true), 1); v2.myWeapons[0].upgradeSight = true; v2.myWeapons[0].upgradeLaser = true; v2.myWeapons[0].myColor = 1; v2.myWeapons[1].upgradeSight = false; v2.myWeapons[1].upgradeLaser = true; v2.myWeapons[1].myColor = 1; ItemGenerator.applyUpgrades(v2.myWeapons[0]); ItemGenerator.applyUpgrades(v2.myWeapons[1]); MadnessLevel.totalRooms = 10; this.addRooms(MadnessLevel.totalRooms, MadnessGameSelect.gameMode); MadnessLevel.doorList = [1, 3, 3, 4, 2, 2, 3, 2, 2, 2]; this.addDoors(MadnessLevel.myRooms, MadnessLevel.doorList); this.addStartPoint(MadnessLevel.myRooms[0]); this.setDoorDir(0, 0, 'left'); this.setDoorDir(1, 0, 'right'); this.setDoorDir(1, 1, 'down'); this.setDoorDir(1, 2, 'left'); this.setDoorDir(2, 0, 'right'); this.setDoorDir(2, 1, 'down'); this.setDoorDir(2, 2, 'left'); this.setDoorDir(3, 0, 'right'); this.setDoorDir(3, 1, 'down'); this.setDoorDir(3, 2, 'down'); this.setDoorDir(3, 3, 'left'); this.setDoorDir(4, 0, 'right'); this.setDoorDir(4, 1, 'left'); this.setDoorDir(5, 0, 'right'); this.setDoorDir(5, 1, 'left'); this.setDoorDir(6, 0, 'right'); this.setDoorDir(6, 1, 'down'); this.setDoorDir(6, 2, 'left'); this.setDoorDir(7, 0, 'right'); this.setDoorDir(7, 1, 'down'); this.setDoorDir(8, 0, 'right'); this.setDoorDir(8, 1, 'left'); this.setDoorDir(9, 0, 'right'); this.setDoorDir(9, 1, 'down'); this.connectDoors(0, 0, '---', 1, 0); this.connectDoors(1, 1, '---', 2, 0); this.connectDoors(1, 2, '---', 3, 0); this.connectDoors(3, 2, '---', 6, 0); this.connectDoors(3, 3, '---', 4, 0); this.connectDoors(4, 1, '---', 5, 0); this.connectDoors(6, 1, '---', 7, 0); this.connectDoors(6, 2, '---', 8, 0); this.connectDoors(8, 1, '---', 9, 0); this.addEvent(MadnessLevel.myRooms[5], MadnessEvents.world_0_2_5); this.addEvent(MadnessLevel.myRooms[9], MadnessEvents.world_0_2_9); this.addActivator(5, 'bomb_power'); this.addActivator(7, 'lockerRight'); this.addActivator(9, 'lockerLeft'); this.addActivator(9, 'bomb_power'); this.setStartup('stun_surprise', 0); this.setStartNPC(); this.createNPC(MadnessLevel.myRooms[0], 'civ', 'enemy', 'ranged', 0, true, 3); this.endStartNPC(); this.resetStartup(); this.createNPC(MadnessLevel.myRooms[1], 'civ', 'enemy', 'melee', 2, true, 4); this.createRoster(MadnessLevel.myRooms[1], ['civ', 'civ'], 'enemy', 'melee', 3); this.createNPC(MadnessLevel.myRooms[2], 'civ', 'enemy', 'unarmed', 2, true, 3); this.createNPC(MadnessLevel.myRooms[2], 'agent', 'enemy', 'melee', 4, true, 2); this.createRoster(MadnessLevel.myRooms[2], ['civ', 'agent', 'agent'], 'enemy', 'ranged', 3); this.createNPC(MadnessLevel.myRooms[3], 'civ', 'enemy', 'ranged', 3, true, 2); this.createRoster(MadnessLevel.myRooms[3], ['agent', 'civ', 'civ'], 'enemy', 'melee', 4); this.createRoster(MadnessLevel.myRooms[3], ['civ'], 'enemy', 'ranged', 2); this.createNPC(MadnessLevel.myRooms[4], 'civ', 'enemy', 'melee', 3, true, 1); this.createNPC(MadnessLevel.myRooms[4], 'agent', 'enemy', 'ranged', 4, true, 2); this.createRoster(MadnessLevel.myRooms[4], ['agent', 'civ', 'civ'], 'enemy', 'ranged', 2); this.createNPC(MadnessLevel.myRooms[5], 'civ', 'enemy', 'ranged', 3, true, 4); this.createNPC(MadnessLevel.myRooms[5], 'civ', 'enemy', 'ranged', 9, true, 5); this.createRoster(MadnessLevel.myRooms[5], ['agent', 'agent', 'agent'], 'enemy', 'ranged', 1); this.createRoster(MadnessLevel.myRooms[5], ['agent', 'agent', 'agent'], 'enemy', 'ranged', 0); this.createRoster(MadnessLevel.myRooms[5], ['agent', 'agent', 'agent', 'agent'], 'enemy', 'melee', 9); this.createRoster(MadnessLevel.myRooms[5], ['agent', 'agent', 'agent', 'agent', 'agent', 'agent'], 'enemy', 'ranged', 3); this.createNPC(MadnessLevel.myRooms[7], 'civ', 'enemy', 'melee', 3, true, 4); this.createRoster(MadnessLevel.myRooms[7], ['civ', 'civ', 'civ'], 'enemy', 'ranged', 1); this.createRoster(MadnessLevel.myRooms[7], ['civ', 'civ', 'civ', 'civ'], 'enemy', 'ranged', 2); this.createRoster(MadnessLevel.myRooms[7], ['civ', 'civ', 'agent'], 'enemy', 'ranged', 2); this.createNPC(MadnessLevel.myRooms[8], 'agent', 'enemy', 'ranged', 4, true, 3); this.createNPC(MadnessLevel.myRooms[9], 'civ', 'enemy', 'melee', 4, true, 2); this.createNPC(MadnessLevel.myRooms[9], 'agent', 'enemy', 'melee', 4, true, 2); this.createRoster(MadnessLevel.myRooms[9], ['agent', 'agent', 'agent'], 'enemy', 'melee', 4); this.createRoster(MadnessLevel.myRooms[9], ['agent', 'agent', 'agent'], 'enemy', 'melee', 6); this.createRoster(MadnessLevel.myRooms[9], ['agent', 'agent', 'agent', 'agent'], 'enemy', 'melee', 9); this.createRoster(MadnessLevel.myRooms[9], ['agent', 'agent', 'agent', 'agent', 'agent', 'agent'], 'enemy', 'ranged', 3); this.addItem(MadnessLevel.myRooms[7].myActivators[0], ItemGenerator.createWeapon('beretta', false)); this.addItem(MadnessLevel.myRooms[7].myActivators[0], ItemGenerator.createWeapon('carbonknife', false)); this.addItem(MadnessLevel.myRooms[9].myActivators[0], ItemGenerator.createWeapon('spas12', false)); this.makeObjective(MadnessLevel.myRooms[5].myActivators[0], 'use', true, false); this.makeObjective(MadnessLevel.myRooms[5], 'clear', true, false); this.makeObjective(MadnessLevel.myRooms[9].myActivators[1], 'use', true, false); this.makeObjective(MadnessLevel.myRooms[9], 'clear', true, false); this.applyTrack('stage3', this); }; v2.level0_3 = function () { this.myName = '[1-D] Barracks'; this.myDescription = ' With Nexus Units reeling from the satelite blackout, we may now launch a stealth strike directly against their most precious and plentiful resource: their manpower. Kill them all!'; this.myDifficulty = 2; var v2 = new MadnessDataFile(); v2.createNew('sanford'); MadnessRoster.playerRoster.addCharacter(v2); MadnessRoster.playerRoster.makeActive(v2); v2.giveItem(ItemGenerator.createWeapon('hook', false), 0); v2.giveItem(ItemGenerator.createWeapon('glock20', true), 1); v2.myWeapons[1].upgradeSight = false; v2.myWeapons[1].upgradeLaser = true; v2.myWeapons[1].myColor = 1; ItemGenerator.applyUpgrades(v2.myWeapons[1]); v2 = new MadnessDataFile(); v2.createNew('deimos'); MadnessRoster.playerRoster.addCharacter(v2); MadnessRoster.playerRoster.makeActive(v2); v2.giveItem(ItemGenerator.createWeapon('mp7', true), 0); v2.giveItem(ItemGenerator.createWeapon('beretta', true), 1); v2.myWeapons[0].upgradeSight = true; v2.myWeapons[0].upgradeLaser = true; v2.myWeapons[0].myColor = 1; v2.myWeapons[1].upgradeSight = false; v2.myWeapons[1].upgradeLaser = true; v2.myWeapons[1].myColor = 1; ItemGenerator.applyUpgrades(v2.myWeapons[0]); ItemGenerator.applyUpgrades(v2.myWeapons[1]); MadnessLevel.totalRooms = 14; this.addRooms(MadnessLevel.totalRooms, MadnessGameSelect.gameMode); MadnessLevel.doorList = [1, 2, 2, 3, 2, 3, 3, 2, 4, 3, 2, 3, 2, 2]; this.addDoors(MadnessLevel.myRooms, MadnessLevel.doorList); this.addStartPoint(MadnessLevel.myRooms[0]); this.setDoorDir(0, 0, 'left'); this.setDoorDir(1, 0, 'right'); this.setDoorDir(1, 1, 'left'); this.setDoorDir(2, 0, 'right'); this.setDoorDir(2, 1, 'left'); this.setDoorDir(3, 0, 'right'); this.setDoorDir(3, 1, 'down'); this.setDoorDir(3, 2, 'left'); this.setDoorDir(4, 0, 'right'); this.setDoorDir(4, 1, 'down'); this.setDoorDir(5, 0, 'right'); this.setDoorDir(5, 1, 'down'); this.setDoorDir(5, 2, 'down'); this.setDoorDir(6, 0, 'right'); this.setDoorDir(6, 1, 'down'); this.setDoorDir(6, 2, 'left'); this.setDoorDir(7, 0, 'right'); this.setDoorDir(7, 1, 'left'); this.setDoorDir(8, 0, 'right'); this.setDoorDir(8, 1, 'down'); this.setDoorDir(8, 2, 'down'); this.setDoorDir(8, 3, 'left'); this.setDoorDir(9, 0, 'right'); this.setDoorDir(9, 1, 'down'); this.setDoorDir(9, 2, 'left'); this.setDoorDir(10, 0, 'right'); this.setDoorDir(10, 1, 'down'); this.setDoorDir(11, 0, 'right'); this.setDoorDir(11, 1, 'down'); this.setDoorDir(11, 2, 'down'); this.setDoorDir(12, 0, 'right'); this.setDoorDir(12, 1, 'left'); this.setDoorDir(13, 0, 'right'); this.setDoorDir(13, 1, 'left'); this.connectDoors(0, 0, '---', 1, 0); this.connectDoors(1, 1, '---', 2, 0); this.connectDoors(2, 1, '---', 3, 0); this.connectDoors(3, 1, '---', 4, 0); this.connectDoors(3, 2, '---', 5, 0); this.connectDoors(5, 1, '---', 6, 0); this.connectDoors(5, 2, '---', 7, 0); this.connectDoors(7, 1, '---', 8, 0); this.connectDoors(8, 1, '---', 9, 0); this.connectDoors(8, 2, '---', 10, 0); this.connectDoors(8, 3, '---', 11, 0); this.connectDoors(11, 1, '---', 12, 0); this.connectDoors(11, 2, '---', 13, 0); this.addEvent(MadnessLevel.myRooms[4], MadnessEvents.world_0_3_4); this.addEvent(MadnessLevel.myRooms[6], MadnessEvents.world_0_3_6); this.addEvent(MadnessLevel.myRooms[10], MadnessEvents.world_0_3_10); this.addEvent(MadnessLevel.myRooms[13], MadnessEvents.world_0_3_13); this.addActivator(3, 'lockerRight'); this.addActivator(3, 'lockerRight'); this.addActivator(5, 'lockerRight'); this.addActivator(8, 'lockerLeft'); this.addActivator(9, 'lockerRight'); this.addActivator(13, 'lockerRight'); this.addObstacle(4, 'empty1'); this.addObstacle(5, 'empty3'); this.addObstacle(8, 'empty1'); this.addObstacle(9, 'empty3'); this.addObstacle(10, 'empty1'); this.addObstacle(13, 'empty3'); this.setStartup('stun_surprise', 0); this.setStartNPC(); this.createNPC(MadnessLevel.myRooms[0], 'civ', 'enemy', 'ranged', 2, true, 1); this.endStartNPC(); this.resetStartup(); this.createNPC(MadnessLevel.myRooms[1], 'civ', 'enemy', 'melee', 4, true, 2); this.createNPC(MadnessLevel.myRooms[1], 'agent', 'enemy', 'ranged', 4, true, 1); this.createRoster(MadnessLevel.myRooms[1], ['agent', 'civ', 'agent'], 'enemy', 'ranged', 2); this.createRoster(MadnessLevel.myRooms[1], ['agent', 'agent', 'agent'], 'enemy', 'ranged', 3); this.createNPC(MadnessLevel.myRooms[2], 'agent', 'enemy', 'ranged', 5, true, 3); this.createRoster(MadnessLevel.myRooms[2], ['civ', 'civ', 'civ'], 'enemy', 'melee', 3); this.createRoster(MadnessLevel.myRooms[2], ['civ'], 'enemy', 'melee', 7); this.createNPC(MadnessLevel.myRooms[3], 'civ', 'enemy', 'unarmed', 4, true, 1); this.createNPC(MadnessLevel.myRooms[4], 'civ', 'enemy', 'melee', 4, true, 1); this.createNPC(MadnessLevel.myRooms[4], 'civ', 'enemy', 'ranged', 5, true, 2); this.createRoster(MadnessLevel.myRooms[4], ['civ'], 'enemy', 'melee', 1); this.createNPC(MadnessLevel.myRooms[5], 'civ', 'enemy', 'melee', 4, true, 2); this.createNPC(MadnessLevel.myRooms[5], 'agent', 'enemy', 'ranged', 4, true, 1); this.createRoster(MadnessLevel.myRooms[5], ['civ', 'civ', 'civ', 'civ'], 'enemy', 'ranged', 1); this.createRoster(MadnessLevel.myRooms[5], ['civ'], 'enemy', 'ranged', 1); this.createRoster(MadnessLevel.myRooms[5], ['civ', 'civ', 'civ', 'civ'], 'enemy', 'ranged', 1); this.createRoster(MadnessLevel.myRooms[5], ['civ', 'civ'], 'enemy', 'ranged', 0); this.createRoster(MadnessLevel.myRooms[5], ['civ', 'civ', 'civ', 'civ'], 'enemy', 'ranged', 0); this.createNPC(MadnessLevel.myRooms[6], 'agent', 'enemy', 'ranged', 5, true, 3); this.createNPC(MadnessLevel.myRooms[7], 'civ', 'enemy', 'melee', 5, true, 1); this.createRoster(MadnessLevel.myRooms[7], ['civ', 'civ', 'civ', 'civ'], 'enemy', 'ranged', 1); this.createRoster(MadnessLevel.myRooms[7], ['civ', 'civ', 'civ', 'civ', 'civ'], 'enemy', 'ranged', 1); this.createRoster(MadnessLevel.myRooms[7], ['civ', 'civ', 'civ', 'civ'], 'enemy', 'ranged', 1); this.createNPC(MadnessLevel.myRooms[8], 'civ', 'enemy', 'melee', 5, true, 1); this.createNPC(MadnessLevel.myRooms[8], 'agent', 'enemy', 'ranged', 5, true, 2); this.createRoster(MadnessLevel.myRooms[8], ['agent', 'agent', 'civ', 'civ'], 'enemy', 'ranged', 3); this.createRoster(MadnessLevel.myRooms[8], ['agent', 'agent', 'civ', 'civ'], 'enemy', 'ranged', 6); this.createNPC(MadnessLevel.myRooms[10], 'civ', 'enemy', 'melee', 5, true, 3); this.createNPC(MadnessLevel.myRooms[10], 'civ', 'enemy', 'unarmed', 5, true, 3); this.createNPC(MadnessLevel.myRooms[10], 'agent', 'enemy', 'unarmed', 5, true, 1); this.createNPC(MadnessLevel.myRooms[11], 'civ', 'enemy', 'melee', 5, true, 1); this.createNPC(MadnessLevel.myRooms[11], 'civ', 'enemy', 'unarmed', 4, true, 1); this.createRoster(MadnessLevel.myRooms[11], ['agent', 'agent', 'civ'], 'enemy', 'ranged', 3); this.createRoster(MadnessLevel.myRooms[11], ['agent', 'agent'], 'enemy', 'ranged', 4); this.createRoster(MadnessLevel.myRooms[11], ['agent', 'agent', 'agent', 'agent'], 'enemy', 'ranged', 6); this.createRoster(MadnessLevel.myRooms[11], ['agent'], 'enemy', 'ranged', 6); this.createNPC(MadnessLevel.myRooms[12], 'agent', 'enemy', 'ranged', 2, true, 2); this.createNPC(MadnessLevel.myRooms[12], 'agent', 'enemy', 'melee', 6, true, 2); this.createRoster(MadnessLevel.myRooms[12], ['agent', 'agent'], 'enemy', 'ranged', 3); this.createNPC(MadnessLevel.myRooms[13], 'agent', 'enemy', 'ranged', 0, true, 2); this.createNPC(MadnessLevel.myRooms[13], 'agent', 'enemy', 'ranged', 4, true, 2); this.createRoster(MadnessLevel.myRooms[13], ['agent', 'civ', 'civ', 'civ'], 'enemy', 'ranged', 3); this.createRoster(MadnessLevel.myRooms[13], ['agent', 'agent', 'civ', 'civ'], 'enemy', 'melee', 10); this.createRoster(MadnessLevel.myRooms[13], ['agent', 'agent', 'agent', 'civ'], 'enemy', 'ranged', 6); this.createRoster(MadnessLevel.myRooms[13], ['agent', 'agent', 'agent', 'agent'], 'enemy', 'ranged', 9); this.createRoster(MadnessLevel.myRooms[13], ['agent', 'agent', 'agent', 'civ'], 'enemy', 'ranged', 2); this.createRoster(MadnessLevel.myRooms[13], ['agent', 'agent', 'agent', 'agent'], 'enemy', 'ranged', 9); this.addItem(MadnessLevel.myRooms[3].myActivators[1], ItemGenerator.createWeapon('glock20', false)); this.addItem(MadnessLevel.myRooms[3].myActivators[1], ItemGenerator.createWeapon('spas12', false)); this.addItem(MadnessLevel.myRooms[5].myActivators[0], ItemGenerator.createWeapon('l337sword', false)); this.addItem(MadnessLevel.myRooms[9].myActivators[0], ItemGenerator.createWeapon('ppk', false)); this.addItem(MadnessLevel.myRooms[9].myActivators[0], ItemGenerator.createWeapon('500long', false)); this.addItem(MadnessLevel.myRooms[13].myActivators[0], ItemGenerator.createWeapon('tmp', false)); this.makeObjective(MadnessLevel.myRooms[4], 'clear', true, false); this.makeObjective(MadnessLevel.myRooms[6], 'clear', true, false); this.makeObjective(MadnessLevel.myRooms[10], 'clear', true, false); this.makeObjective(MadnessLevel.myRooms[13], 'clear', true, false); this.applyTrack('stage4', this); }; v2.level0_4 = function () { this.myName = '[1-E] Recon Hut'; this.myDescription = ' With the Communication Tower down and the Barracks totally obliterated, the Nexus has been forced to adapt. Engineers have been dispatched to convert a nearby Recon Hut into a new Com-Tower. Disable the facility.'; this.myDifficulty = 3; var v2 = new MadnessDataFile(); v2.createNew('sanford'); MadnessRoster.playerRoster.addCharacter(v2); MadnessRoster.playerRoster.makeActive(v2); v2.giveItem(ItemGenerator.createWeapon('hook', false), 0); v2.giveItem(ItemGenerator.createWeapon('glock20', true), 1); v2.myWeapons[1].upgradeSight = false; v2.myWeapons[1].upgradeLaser = true; v2.myWeapons[1].myColor = 1; ItemGenerator.applyUpgrades(v2.myWeapons[1]); v2 = new MadnessDataFile(); v2.createNew('deimos'); MadnessRoster.playerRoster.addCharacter(v2); MadnessRoster.playerRoster.makeActive(v2); v2.giveItem(ItemGenerator.createWeapon('mp7', true), 0); v2.giveItem(ItemGenerator.createWeapon('beretta', true), 1); v2.myWeapons[0].upgradeSight = true; v2.myWeapons[0].upgradeLaser = true; v2.myWeapons[0].myColor = 1; v2.myWeapons[1].upgradeSight = false; v2.myWeapons[1].upgradeLaser = true; v2.myWeapons[1].myColor = 1; ItemGenerator.applyUpgrades(v2.myWeapons[0]); ItemGenerator.applyUpgrades(v2.myWeapons[1]); MadnessLevel.totalRooms = 12; this.addRooms(MadnessLevel.totalRooms, MadnessGameSelect.gameMode); MadnessLevel.doorList = [1, 2, 3, 2, 3, 3, 2, 1, 2, 2, 2, 2]; this.addDoors(MadnessLevel.myRooms, MadnessLevel.doorList); this.addStartPoint(MadnessLevel.myRooms[0]); this.setDoorDir(0, 0, 'left'); this.setDoorDir(1, 0, 'right'); this.setDoorDir(1, 1, 'left'); this.setDoorDir(2, 0, 'right'); this.setDoorDir(2, 1, 'down'); this.setDoorDir(2, 2, 'left'); this.setDoorDir(3, 0, 'right'); this.setDoorDir(3, 1, 'left'); this.setDoorDir(4, 0, 'right'); this.setDoorDir(4, 1, 'down'); this.setDoorDir(4, 2, 'left'); this.setDoorDir(5, 0, 'right'); this.setDoorDir(5, 1, 'down'); this.setDoorDir(5, 2, 'left'); this.setDoorDir(6, 0, 'right'); this.setDoorDir(6, 1, 'left'); this.setDoorDir(7, 0, 'left'); this.setDoorDir(8, 0, 'right'); this.setDoorDir(8, 1, 'down'); this.setDoorDir(9, 0, 'right'); this.setDoorDir(9, 1, 'down'); this.setDoorDir(10, 0, 'right'); this.setDoorDir(10, 1, 'down'); this.setDoorDir(11, 0, 'right'); this.setDoorDir(11, 1, 'down'); this.connectDoors(0, 0, '---', 1, 0); this.connectDoors(1, 1, '---', 2, 0); this.connectDoors(2, 1, '---', 8, 0); this.connectDoors(2, 2, '---', 3, 0); this.connectDoors(3, 1, '---', 4, 0); this.connectDoors(4, 1, '---', 5, 1); this.connectDoors(5, 0, '---', 6, 1); this.connectDoors(6, 0, '---', 7, 0); this.connectDoors(8, 1, '---', 9, 0); this.connectDoors(9, 1, '---', 10, 0); this.connectDoors(10, 1, '---', 11, 0); this.addEvent(MadnessLevel.myRooms[2], MadnessEvents.world_0_4_2_A); this.addActivator(2, 'lockerRight'); this.addActivator(6, 'lockerLeft'); this.addActivator(7, 'bomb_powerLeft'); this.addActivator(11, 'lockerLeft'); this.addActivator(11, 'terminalRight'); this.addEvent(MadnessLevel.myRooms[11].myActivators[1], MadnessEvents.world_0_4_11_A); this.addObstacle(1, 'empty1'); this.addObstacle(2, 'spikes1'); this.addObstacle(3, 'empty3'); this.addObstacle(6, 'empty0'); this.addObstacle(7, 'empty1'); this.addObstacle(8, 'empty1'); this.addObstacle(8, 'empty3'); this.addObstacle(9, 'empty0'); this.addObstacle(11, 'empty1'); this.addObstacle(11, 'empty3'); this.createNPC(MadnessLevel.myRooms[1], 'civ', 'enemy', 'melee', 6, true, 1); this.createNPC(MadnessLevel.myRooms[1], 'civ', 'enemy', 'unarmed', 2, true, 1); this.createNPC(MadnessLevel.myRooms[3], 'civ', 'enemy', 'unarmed', 3, true, 1); this.createNPC(MadnessLevel.myRooms[3], 'agent', 'enemy', 'ranged', 2, true, 1); this.createRoster(MadnessLevel.myRooms[3], ['agent', 'agent', 'civ'], 'enemy', 'ranged', 3); this.createRoster(MadnessLevel.myRooms[3], ['agent', 'agent'], 'enemy', 'melee', 8); this.createRoster(MadnessLevel.myRooms[3], ['agent', 'agent', 'agent', 'civ'], 'enemy', 'ranged', 3); this.createRoster(MadnessLevel.myRooms[3], ['agent', 'agent', 'agent', 'agent'], 'enemy', 'melee', 8); this.createNPC(MadnessLevel.myRooms[4], 'agent', 'enemy', 'ranged', 4, true, 1); this.createRoster(MadnessLevel.myRooms[4], ['agent'], 'enemy', 'ranged', 3); this.createRoster(MadnessLevel.myRooms[4], ['agent', 'agent', 'agent', 'civ'], 'enemy', 'ranged', 3); this.createRoster(MadnessLevel.myRooms[4], ['agent', 'civ'], 'enemy', 'melee', 3); this.createRoster(MadnessLevel.myRooms[4], ['agent', 'agent', 'agent'], 'enemy', 'melee', 8); this.createNPC(MadnessLevel.myRooms[5], 'agent', 'enemy', 'ranged', 4, true, 3); this.createRoster(MadnessLevel.myRooms[5], ['agent', 'agent', 'civ'], 'enemy', 'ranged', 4); this.createNPC(MadnessLevel.myRooms[6], 'agent', 'enemy', 'ranged', 4, true, 2); this.createRoster(MadnessLevel.myRooms[6], ['agent', 'agent', 'civ'], 'enemy', 'ranged', 3); this.createRoster(MadnessLevel.myRooms[6], ['agent', 'agent', 'agent', 'agent'], 'enemy', 'ranged', 5); this.createRoster(MadnessLevel.myRooms[6], ['agent'], 'enemy', 'ranged', 3); this.createNPC(MadnessLevel.myRooms[7], 'civ', 'enemy', 'melee', 4, true, 1); this.createNPC(MadnessLevel.myRooms[7], 'agent', 'enemy', 'ranged', 4, true, 4); this.createNPC(MadnessLevel.myRooms[7], 'agent2', 'enemy', 'ranged', 8, true, 1); this.createNPC(MadnessLevel.myRooms[8], 'agent', 'enemy', 'ranged', 0, true, 2); this.createNPC(MadnessLevel.myRooms[9], 'agent', 'enemy', 'ranged', 3, true, 3); this.createNPC(MadnessLevel.myRooms[9], 'agent', 'enemy', 'ranged', 5, true, 2); this.createRoster(MadnessLevel.myRooms[10], ['agent'], 'enemy', 'ranged', 3); this.createRoster(MadnessLevel.myRooms[10], ['agent', 'agent2'], 'enemy', 'melee', 12); this.createRoster(MadnessLevel.myRooms[10], ['agent'], 'enemy', 'ranged', 3); this.createRoster(MadnessLevel.myRooms[10], ['agent'], 'enemy', 'melee', 3); this.createRoster(MadnessLevel.myRooms[10], ['agent', 'agent'], 'enemy', 'ranged', 5); this.createRoster(MadnessLevel.myRooms[10], ['agent'], 'enemy', 'ranged', 3); this.createNPC(MadnessLevel.myRooms[11], 'agent2', 'enemy', 'ranged', 6, true, 2); this.createNPC(MadnessLevel.myRooms[11], 'agent', 'enemy', 'ranged', 3, true, 3); this.createRoster(MadnessLevel.myRooms[11], ['agent2', 'agent', 'agent'], 'enemy', 'ranged', 4); this.createRoster(MadnessLevel.myRooms[11], ['agent', 'civ'], 'enemy', 'ranged', 5); this.createRoster(MadnessLevel.myRooms[11], ['agent2', 'agent', 'civ'], 'enemy', 'ranged', 5); this.createRoster(MadnessLevel.myRooms[11], ['agent', 'agent'], 'enemy', 'melee', 3); this.createRoster(MadnessLevel.myRooms[11], ['agent', 'agent2', 'civ'], 'enemy', 'ranged', 6); this.createRoster(MadnessLevel.myRooms[11], ['civ', 'agent', 'agent2'], 'enemy', 'ranged', 4); this.createRoster(MadnessLevel.myRooms[11], ['agent2', 'agent2'], 'enemy', 'ranged', 5); this.addItem(MadnessLevel.myRooms[2].myActivators[0], ItemGenerator.createWeapon('machette', false)); this.addItem(MadnessLevel.myRooms[2].myActivators[0], ItemGenerator.createWeapon('beretta', false)); this.addItem(MadnessLevel.myRooms[6].myActivators[0], ItemGenerator.createWeapon('357snub', false)); this.addItem(MadnessLevel.myRooms[6].myActivators[0], ItemGenerator.createWeapon('500snub', false)); this.addItem(MadnessLevel.myRooms[11].myActivators[0], ItemGenerator.createWeapon('oa93', false)); this.addItem(MadnessLevel.myRooms[11].myActivators[0], ItemGenerator.createWeapon('mp5k', false)); this.addItem(MadnessLevel.myRooms[11].myActivators[0], ItemGenerator.createWeapon('m203', false)); this.makeObjective(MadnessLevel.myRooms[7].myActivators[0], 'use', true, false); this.makeObjective(MadnessLevel.myRooms[7], 'clear', true, false); this.applyTrack('stage5', this); }; } else { goto 62113; } storedv2.level0_5 = function () { this.myName = '[1-F] Stronghold'; this.myDescription = ' Intercepted transmissions report the deployment of new G03LM Mk1 units for training at the Nexus Stronghold. Infiltrate the facility, learn what you can, and elminate this new threat.'; this.myDifficulty = 3; var v2 = new MadnessDataFile(); v2.createNew('sanford'); MadnessRoster.playerRoster.addCharacter(v2); MadnessRoster.playerRoster.makeActive(v2); v2.giveItem(ItemGenerator.createWeapon('hook', false), 0); v2.giveItem(ItemGenerator.createWeapon('glock20', true), 1); v2.myWeapons[1].upgradeSight = false; v2.myWeapons[1].upgradeLaser = true; v2.myWeapons[1].myColor = 1; ItemGenerator.applyUpgrades(v2.myWeapons[1]); v2 = new MadnessDataFile(); v2.createNew('deimos'); MadnessRoster.playerRoster.addCharacter(v2); MadnessRoster.playerRoster.makeActive(v2); v2.giveItem(ItemGenerator.createWeapon('mp7', true), 0); v2.giveItem(ItemGenerator.createWeapon('beretta', true), 1); v2.myWeapons[0].upgradeSight = true; v2.myWeapons[0].upgradeLaser = true; v2.myWeapons[0].myColor = 1; v2.myWeapons[1].upgradeSight = false; v2.myWeapons[1].upgradeLaser = true; v2.myWeapons[1].myColor = 1; ItemGenerator.applyUpgrades(v2.myWeapons[0]); ItemGenerator.applyUpgrades(v2.myWeapons[1]); MadnessLevel.totalRooms = 15; this.addRooms(MadnessLevel.totalRooms, MadnessGameSelect.gameMode); MadnessLevel.doorList = [1, 2, 2, 3, 2, 2, 3, 2, 3, 2, 2, 3, 2, 2, 3]; this.addDoors(MadnessLevel.myRooms, MadnessLevel.doorList); this.addStartPoint(MadnessLevel.myRooms[0]); this.setDoorDir(0, 0, 'left'); this.setDoorDir(1, 0, 'right'); this.setDoorDir(1, 1, 'left'); this.setDoorDir(2, 0, 'right'); this.setDoorDir(2, 1, 'left'); this.setDoorDir(3, 0, 'right'); this.setDoorDir(3, 1, 'down'); this.setDoorDir(3, 2, 'left'); this.setDoorDir(4, 0, 'right'); this.setDoorDir(4, 1, 'left'); this.setDoorDir(5, 0, 'right'); this.setDoorDir(5, 1, 'down'); this.setDoorDir(6, 0, 'right'); this.setDoorDir(6, 1, 'down'); this.setDoorDir(6, 2, 'left'); this.setDoorDir(7, 0, 'right'); this.setDoorDir(7, 1, 'left'); this.setDoorDir(8, 0, 'right'); this.setDoorDir(8, 1, 'down'); this.setDoorDir(8, 2, 'left'); this.setDoorDir(9, 0, 'right'); this.setDoorDir(9, 1, 'left'); this.setDoorDir(10, 0, 'right'); this.setDoorDir(10, 1, 'left'); this.setDoorDir(11, 0, 'right'); this.setDoorDir(11, 1, 'down'); this.setDoorDir(11, 2, 'left'); this.setDoorDir(12, 0, 'right'); this.setDoorDir(12, 1, 'left'); this.setDoorDir(13, 0, 'right'); this.setDoorDir(13, 1, 'left'); this.setDoorDir(14, 0, 'right'); this.setDoorDir(14, 1, 'down'); this.setDoorDir(14, 2, 'down'); this.connectDoors(0, 0, '---', 1, 0); this.connectDoors(1, 1, '---', 2, 0); this.connectDoors(2, 1, '---', 3, 0); this.connectDoors(3, 1, '---', 4, 0); this.connectDoors(3, 2, '---', 6, 0); this.connectDoors(4, 1, '---', 5, 0); this.connectDoors(6, 2, '---', 7, 0); this.connectDoors(7, 1, '---', 8, 0); this.connectDoors(8, 1, '---', 9, 0); this.connectDoors(8, 2, '---', 10, 0); this.connectDoors(10, 1, '---', 11, 0); this.connectDoors(11, 1, '---', 12, 0); this.connectDoors(11, 2, '---', 13, 0); this.connectDoors(13, 1, '---', 14, 0); this.addActivator(1, 'lockerRight'); this.addActivator(3, 'lockerLeft'); this.addActivator(4, 'lockerRight'); this.addActivator(5, 'lockerRight'); this.addActivator(7, 'lockerLeft'); this.addActivator(9, 'lockerRight'); this.addActivator(9, 'lockerRight'); this.addActivator(10, 'lockerLeft'); this.addActivator(11, 'lockerLeft'); this.addActivator(12, 'lockerRight'); this.addActivator(12, 'lockerRight'); this.addActivator(12, 'lockerRight'); this.addActivator(13, 'lockerRight'); this.addObstacle(1, 'empty1'); this.addObstacle(1, 'empty3'); this.addObstacle(4, 'empty1'); this.addObstacle(4, 'empty3'); this.addObstacle(5, 'empty3'); this.addObstacle(5, 'empty1'); this.addObstacle(8, 'empty1'); this.addObstacle(9, 'empty1'); this.addObstacle(11, 'empty4'); this.addObstacle(12, 'empty1'); this.addObstacle(12, 'empty1'); this.addObstacle(13, 'empty1'); this.addObstacle(14, 'empty1'); this.addObstacle(14, 'empty1'); this.setStartup('stun_surprise', 0); this.setStartNPC(); this.createNPC(MadnessLevel.myRooms[0], 'agent', 'enemy', 'ranged', 6, true, 2); this.endStartNPC(); this.resetStartup(); this.createNPC(MadnessLevel.myRooms[1], 'agent', 'enemy', 'melee', 7, true, 3); this.createNPC(MadnessLevel.myRooms[2], 'agent', 'enemy', 'melee', 7, true, 3); this.createNPC(MadnessLevel.myRooms[2], 'agent2', 'enemy', 'ranged', 6, true, 1); this.createRoster(MadnessLevel.myRooms[2], ['agent', 'agent', 'agent2'], 'enemy', 'ranged', 4); this.createNPC(MadnessLevel.myRooms[3], 'agent', 'enemy', 'ranged', 6, true, 2); this.createRoster(MadnessLevel.myRooms[3], ['agent', 'agent', 'agent'], 'enemy', 'ranged', 4); this.createRoster(MadnessLevel.myRooms[3], ['agent'], 'enemy', 'ranged', 8); this.createRoster(MadnessLevel.myRooms[3], ['agent', 'agent', 'agent2', 'agent'], 'enemy', 'ranged', 5); this.createNPC(MadnessLevel.myRooms[4], 'agent', 'enemy', 'ranged', 4, true, 1); this.createNPC(MadnessLevel.myRooms[4], 'agent2', 'enemy', 'ranged', 7, true, 1); this.createRoster(MadnessLevel.myRooms[5], ['agent', 'agent2', 'agent2', 'agent', 'agent'], 'enemy', 'melee', 8); this.createRoster(MadnessLevel.myRooms[5], ['agent'], 'enemy', 'melee', 12); this.createNPC(MadnessLevel.myRooms[6], 'agent', 'enemy', 'ranged', 6, true, 4); this.createNPC(MadnessLevel.myRooms[8], 'fatboy', 'enemy', 'fatboy', 10, false, 1); MadnessLevel.myRooms[8].myCharacters[0].giveItem(ItemGenerator.createWeapon('mp5', false), 0); MadnessLevel.myRooms[8].myCharacters[0].myWeapons[0].myClips = 3; MadnessLevel.myRooms[8].myCharacters[0].giveItem(ItemGenerator.createWeapon('mallet', false), 1); this.createNPC(MadnessLevel.myRooms[8], 'agent', 'enemy', 'ranged', 3, true, 2); this.createRoster(MadnessLevel.myRooms[8], ['civ', 'civ'], 'enemy', 'ranged', 4); this.addEvent(MadnessLevel.myRooms[8].myRosters[0], MadnessEvents.world_0_5_8_A); this.createRoster(MadnessLevel.myRooms[9], ['agent', 'agent', 'agent'], 'enemy', 'ranged', 0); this.createRoster(MadnessLevel.myRooms[9], ['agent', 'agent'], 'enemy', 'ranged', 1); this.createRoster(MadnessLevel.myRooms[9], ['agent', 'agent', 'agent', 'agent'], 'enemy', 'melee', 8); this.createNPC(MadnessLevel.myRooms[10], 'agent', 'enemy', 'melee', 6, true, 2); this.createNPC(MadnessLevel.myRooms[10], 'agent', 'enemy', 'unarmed', 6, true, 1); this.createRoster(MadnessLevel.myRooms[10], ['agent', 'agent', 'agent', 'agent', 'agent'], 'enemy', 'ranged', 2); this.createRoster(MadnessLevel.myRooms[10], ['agent', 'agent'], 'enemy', 'ranged', 3); this.createRoster(MadnessLevel.myRooms[10], ['agent', 'agent', 'agent', 'agent', 'agent', 'agent'], 'enemy', 'ranged', 4); this.createNPC(MadnessLevel.myRooms[11], 'agent2', 'enemy', 'melee', 10, true, 2); this.createNPC(MadnessLevel.myRooms[11], 'agent', 'enemy', 'ranged', 6, true, 1); this.createRoster(MadnessLevel.myRooms[11], ['agent', 'agent', 'agent', 'agent', 'agent', 'agent'], 'enemy', 'ranged', 0); this.createRoster(MadnessLevel.myRooms[11], ['agent', 'agent', 'agent', 'agent', 'agent'], 'enemy', 'ranged', 0); this.createRoster(MadnessLevel.myRooms[11], ['agent', 'agent'], 'enemy', 'ranged', 0); this.createNPC(MadnessLevel.myRooms[12], 'civ', 'enemy', 'ranged', 2, true, 4); this.createNPC(MadnessLevel.myRooms[12], 'agent', 'enemy', 'ranged', 6, true, 1); this.createRoster(MadnessLevel.myRooms[12], ['agent2', 'agent', 'agent', 'agent2'], 'enemy', 'ranged', 2); this.createRoster(MadnessLevel.myRooms[12], ['agent', 'agent', 'agent2', 'agent', 'agent', 'agent'], 'enemy', 'ranged', 3); this.createRoster(MadnessLevel.myRooms[12], ['agent', 'agent2', 'agent', 'agent', 'agent2', 'agent'], 'enemy', 'ranged', 4); this.createNPC(MadnessLevel.myRooms[14], 'agent', 'enemy', 'melee', 7, true, 3); this.createRoster(MadnessLevel.myRooms[14], ['fatboy'], 'enemy', 'fatboy', 0); MadnessLevel.myRooms[15].myRosters[0].myActiveMembers[0].giveItem(ItemGenerator.createWeapon('mp5', false), 0); MadnessLevel.myRooms[15].myRosters[0].myActiveMembers[0].myWeapons[0].myClips = 3; MadnessLevel.myRooms[15].myRosters[0].myActiveMembers[0].giveItem(ItemGenerator.createWeapon('mallet', false), 1); this.createRoster(MadnessLevel.myRooms[14], ['agent', 'agent'], 'enemy', 'ranged', 4); this.addEvent(MadnessLevel.myRooms[14].myRosters[1], MadnessEvents.world_0_5_14_A); this.addItem(MadnessLevel.myRooms[1].myActivators[0], ItemGenerator.createWeapon('glock20', false)); this.addItem(MadnessLevel.myRooms[3].myActivators[0], ItemGenerator.createWeapon('glock20', false)); this.addItem(MadnessLevel.myRooms[5].myActivators[0], ItemGenerator.createWeapon('bowieknife', false)); this.addItem(MadnessLevel.myRooms[5].myActivators[0], ItemGenerator.createWeapon('ironsword', false)); this.addItem(MadnessLevel.myRooms[5].myActivators[0], ItemGenerator.createWeapon('hk2', false)); this.addItem(MadnessLevel.myRooms[9].myActivators[0], ItemGenerator.createWeapon('ak74u', false)); this.addItem(MadnessLevel.myRooms[9].myActivators[0], ItemGenerator.createWeapon('carbonsword', false)); this.addItem(MadnessLevel.myRooms[12].myActivators[0], ItemGenerator.createWeapon('ak74', false)); this.addItem(MadnessLevel.myRooms[12].myActivators[2], ItemGenerator.createWeapon('prokiller460', false)); this.addItem(MadnessLevel.myRooms[12].myActivators[2], ItemGenerator.createWeapon('prokiller460', false)); this.makeObjective(MadnessLevel.myRooms[14], 'clear', true, false); this.applyTrack('stage6', this); }; storedv2.level0_6 = function () { this.myName = '[1-G] Bar'; this.myDescription = ' It\'s time to prepare for the final assault on the Nexus Headquarters. A nearby bar is operating as a front for a munitions depot, and hitting this location will benefit us twofold: we\'ll be well-equipped for the final battle, and Nexus morale will plummet.'; this.myDifficulty = 4; var v2 = new MadnessDataFile(); v2.createNew('sanford'); MadnessRoster.playerRoster.addCharacter(v2); MadnessRoster.playerRoster.makeActive(v2); v2.giveItem(ItemGenerator.createWeapon('hook', false), 0); v2.giveItem(ItemGenerator.createWeapon('glock20', true), 1); v2.myWeapons[1].upgradeSight = false; v2.myWeapons[1].upgradeLaser = true; v2.myWeapons[1].myColor = 1; ItemGenerator.applyUpgrades(v2.myWeapons[1]); v2 = new MadnessDataFile(); v2.createNew('deimos'); MadnessRoster.playerRoster.addCharacter(v2); MadnessRoster.playerRoster.makeActive(v2); v2.giveItem(ItemGenerator.createWeapon('mp7', true), 0); v2.giveItem(ItemGenerator.createWeapon('beretta', true), 1); v2.myWeapons[0].upgradeSight = true; v2.myWeapons[0].upgradeLaser = true; v2.myWeapons[0].myColor = 1; v2.myWeapons[1].upgradeSight = false; v2.myWeapons[1].upgradeLaser = true; v2.myWeapons[1].myColor = 1; ItemGenerator.applyUpgrades(v2.myWeapons[0]); ItemGenerator.applyUpgrades(v2.myWeapons[1]); MadnessLevel.totalRooms = 10; this.addRooms(MadnessLevel.totalRooms, MadnessGameSelect.gameMode); MadnessLevel.doorList = [1, 2, 3, 2, 2, 3, 3, 2, 2, 4]; this.addDoors(MadnessLevel.myRooms, MadnessLevel.doorList); this.addStartPoint(MadnessLevel.myRooms[0]); this.setDoorDir(0, 0, 'left'); this.setDoorDir(1, 0, 'right'); this.setDoorDir(1, 1, 'left'); this.setDoorDir(2, 0, 'right'); this.setDoorDir(2, 1, 'down'); this.setDoorDir(2, 2, 'left'); this.setDoorDir(3, 0, 'right'); this.setDoorDir(3, 1, 'left'); this.setDoorDir(4, 0, 'right'); this.setDoorDir(4, 1, 'left'); this.setDoorDir(5, 0, 'right'); this.setDoorDir(5, 1, 'down'); this.setDoorDir(5, 2, 'left'); this.setDoorDir(6, 0, 'right'); this.setDoorDir(6, 1, 'down'); this.setDoorDir(6, 2, 'left'); this.setDoorDir(7, 0, 'right'); this.setDoorDir(7, 1, 'down'); this.setDoorDir(8, 0, 'right'); this.setDoorDir(8, 1, 'left'); this.setDoorDir(9, 0, 'right'); this.setDoorDir(9, 1, 'down'); this.setDoorDir(9, 2, 'down'); this.setDoorDir(9, 3, 'left'); this.connectDoors(0, 0, '---', 1, 0); this.connectDoors(1, 1, '---', 2, 0); this.connectDoors(2, 1, '---', 3, 0); this.connectDoors(2, 2, '---', 4, 0); this.connectDoors(4, 1, '---', 5, 0); this.connectDoors(5, 2, '---', 6, 0); this.connectDoors(6, 2, '---', 7, 0); this.connectDoors(7, 1, '---', 8, 0); this.connectDoors(8, 1, '---', 9, 0); this.addActivator(2, 'lockerLeft'); this.addActivator(3, 'lockerRight'); this.addActivator(3, 'lockerRight'); this.addActivator(3, 'lockerRight'); this.addActivator(6, 'lockerRight'); this.addObstacle(1, 'empty0'); this.addObstacle(1, 'empty3'); this.addObstacle(2, 'empty1'); this.addObstacle(4, 'empty1'); this.addObstacle(6, 'empty3'); this.addObstacle(6, 'empty0'); this.addObstacle(7, 'empty0'); this.addObstacle(7, 'empty0'); this.addObstacle(7, 'empty3'); this.addObstacle(7, 'empty3'); this.addObstacle(7, 'empty3'); this.addObstacle(8, 'empty4'); this.addObstacle(9, 'empty3'); this.addObstacle(9, 'empty3'); this.addObstacle(9, 'empty0'); this.addObstacle(9, 'empty0'); this.addObstacle(9, 'empty0'); this.setStartNPC(); this.createNPC(MadnessLevel.myRooms[0], 'agent', 'enemy', 'ranged', 10, true, 2); this.endStartNPC(); this.createRoster(MadnessLevel.myRooms[0], ['agent', 'agent', 'agent'], 'enemy', 'unarmed', 2); this.createRoster(MadnessLevel.myRooms[0], ['agent', 'agent'], 'enemy', 'ranged', 4); this.createRoster(MadnessLevel.myRooms[0], ['agent', 'agent', 'agent'], 'enemy', 'melee', 2); this.createRoster(MadnessLevel.myRooms[0], ['agent2', 'agent2', 'agent2'], 'enemy', 'melee', 15); this.createNPC(MadnessLevel.myRooms[1], 'agent', 'enemy', 'ranged', 6, true, 4); this.createRoster(MadnessLevel.myRooms[1], ['agent2', 'agent2', 'agent'], 'enemy', 'ranged', 5); this.createRoster(MadnessLevel.myRooms[1], ['agent2', 'agent'], 'enemy', 'ranged', 4); this.createNPC(MadnessLevel.myRooms[2], 'agent', 'enemy', 'ranged', 6, true, 2); this.createNPC(MadnessLevel.myRooms[2], 'agent2', 'enemy', 'ranged', 6, true, 1); this.createNPC(MadnessLevel.myRooms[3], 'agent', 'enemy', 'ranged', 3, true, 2); this.createRoster(MadnessLevel.myRooms[3], ['agent', 'agent2', 'agent', 'agent'], 'enemy', 'ranged', 5); this.createRoster(MadnessLevel.myRooms[3], ['agent', 'agent', 'agent'], 'enemy', 'ranged', 6); this.createNPC(MadnessLevel.myRooms[4], 'agent', 'enemy', 'ranged', 3, true, 2); this.createNPC(MadnessLevel.myRooms[4], 'agent3', 'enemy', 'ranged', 6, true, 1); this.createRoster(MadnessLevel.myRooms[4], ['agent', 'agent2', 'agent'], 'enemy', 'ranged', 5); this.createRoster(MadnessLevel.myRooms[4], ['agent2', 'agent'], 'enemy', 'ranged', 4); this.createRoster(MadnessLevel.myRooms[4], ['agent', 'agent2', 'agent'], 'enemy', 'melee', 8); this.createRoster(MadnessLevel.myRooms[4], ['fatboy'], 'enemy', 'fatboy', 10); MadnessLevel.myRooms[4].myRosters[3].myActiveMembers[0].giveItem(ItemGenerator.createWeapon('mp5', false), 0); MadnessLevel.myRooms[4].myRosters[3].myActiveMembers[0].myWeapons[0].myClips = 3; MadnessLevel.myRooms[4].myRosters[3].myActiveMembers[0].giveItem(ItemGenerator.createWeapon('mallet', false), 1); this.createRoster(MadnessLevel.myRooms[4], ['agent', 'agent'], 'enemy', 'ranged', 5); this.addEvent(MadnessLevel.myRooms[4].myRosters[4], MadnessEvents.world_0_6_4_A); this.createNPC(MadnessLevel.myRooms[5], 'agent', 'enemy', 'ranged', 5, true, 4); this.createRoster(MadnessLevel.myRooms[5], ['agent2', 'agent2'], 'enemy', 'ranged', 5); this.createRoster(MadnessLevel.myRooms[5], ['agent2', 'agent', 'agent', 'agent', 'agent'], 'enemy', 'ranged', 4); this.setStartup('startup_bottle2', 1); this.createNPC(MadnessLevel.myRooms[6], 'civ', 'enemy', 'bottle', 5, false, 3); this.createRoster(MadnessLevel.myRooms[6], ['civ', 'civ', 'civ'], 'enemy', 'bottle', 5); this.createRoster(MadnessLevel.myRooms[6], ['civ', 'civ'], 'enemy', 'bottle', 4); this.setStartNPC(); this.createNPC(MadnessLevel.myRooms[7], 'civ', 'enemy', 'bottle', 5, false, 3); this.createNPC(MadnessLevel.myRooms[7], 'luis', 'enemy', 'bottle', 5, false, 1); this.createNPC(MadnessLevel.myRooms[7], 'swain', 'enemy', 'bottle', 5, false, 1); this.createNPC(MadnessLevel.myRooms[7], 'krinkels', 'enemy', 'bottle', 5, false, 1); this.createNPC(MadnessLevel.myRooms[7], 'cheshyre', 'enemy', 'bottle', 5, false, 1); this.createRoster(MadnessLevel.myRooms[7], ['civ', 'civ', 'civ'], 'enemy', 'bottle', 5); this.createRoster(MadnessLevel.myRooms[7], ['civ', 'civ'], 'enemy', 'bottle', 4); this.createRoster(MadnessLevel.myRooms[7], ['civ', 'civ', 'civ', 'civ'], 'enemy', 'bottle', 5); this.createRoster(MadnessLevel.myRooms[7], ['civ', 'civ', 'civ', 'civ', 'civ'], 'enemy', 'bottle', 4); this.createRoster(MadnessLevel.myRooms[7], ['civ', 'civ', 'civ', 'civ'], 'enemy', 'bottle', 5); this.endStartNPC(); this.createNPC(MadnessLevel.myRooms[8], 'civ', 'enemy', 'bottle', 5, false, 4); this.createRoster(MadnessLevel.myRooms[8], ['civ', 'civ', 'civ'], 'enemy', 'bottle', 5); this.createRoster(MadnessLevel.myRooms[8], ['civ', 'civ', 'civ', 'civ'], 'enemy', 'bottle', 5); this.createRoster(MadnessLevel.myRooms[8], ['civ', 'civ', 'civ'], 'enemy', 'bottle', 5); this.resetStartup(); this.setStartNPC(); this.createNPC(MadnessLevel.myRooms[9], 'fatman', 'enemy', 'unarmed', 5, false, 1); MadnessLevel.myRooms[9].myCharacters[0].giveItem(ItemGenerator.createWeapon('megahammer', false), 0); MadnessLevel.myRooms[9].myCharacters[0].giveItem(ItemGenerator.createWeapon('chaingun', false), 1); this.endStartNPC(); this.setStartup('startup_bottle2', 1); this.createNPC(MadnessLevel.myRooms[9], 'civ', 'enemy', 'bottle', 5, false, 8); this.resetStartup(); this.createRoster(MadnessLevel.myRooms[9], ['agent', 'agent', 'agent', 'agent2'], 'enemy', 'ranged', 7); this.addEvent(MadnessLevel.myRooms[9].myRosters[0], MadnessEvents.world_0_6_9_A); this.addItem(MadnessLevel.myRooms[2].myActivators[0], ItemGenerator.createWeapon('bottle', false)); this.addItem(MadnessLevel.myRooms[2].myActivators[0], ItemGenerator.createWeapon('bottle', false)); this.addItem(MadnessLevel.myRooms[2].myActivators[0], ItemGenerator.createWeapon('bottle', false)); this.addItem(MadnessLevel.myRooms[3].myActivators[0], ItemGenerator.createWeapon('bottle', false)); this.addItem(MadnessLevel.myRooms[3].myActivators[0], ItemGenerator.createWeapon('bottle', false)); this.addItem(MadnessLevel.myRooms[3].myActivators[1], ItemGenerator.createWeapon('bottle', false)); this.addItem(MadnessLevel.myRooms[3].myActivators[1], ItemGenerator.createWeapon('bottle', false)); this.addItem(MadnessLevel.myRooms[3].myActivators[1], ItemGenerator.createWeapon('bottle', false)); this.addItem(MadnessLevel.myRooms[3].myActivators[2], ItemGenerator.createWeapon('bottle', false)); this.addItem(MadnessLevel.myRooms[6].myActivators[0], ItemGenerator.createWeapon('bottle', false)); this.addItem(MadnessLevel.myRooms[6].myActivators[0], ItemGenerator.createWeapon('bottle', false)); this.addItem(MadnessLevel.myRooms[6].myActivators[0], ItemGenerator.createWeapon('bottle', false)); this.makeObjective(MadnessLevel.myRooms[9], 'clear', true, false); this.applyTrack('club1', this); this.applyTrack('club2', MadnessLevel.myRooms[0]); this.applyTrack('boss1', MadnessLevel.myRooms[9]); }; storedv2.level0_7 = function () { this.myName = '[1-H] Nexus H.Q.'; this.myDescription = ' Agents Sanford and Deimos will follow Hank into the heart of Project Nexus and eliminate all threats. The Nexus Training Program is still a mystery to us. Discover what you can, and take no prisoners.'; this.myDifficulty = 4; var v2 = new MadnessDataFile(); v2.createNew('hank'); MadnessRoster.playerRoster.addCharacter(v2); MadnessRoster.playerRoster.makeActive(v2); v2.giveItem(ItemGenerator.createWeapon('glock20', false), 0); v2.giveItem(ItemGenerator.createWeapon('dragonsword', false), 1); v2.myWeapons[0].myClips = 4; v2.myStartup = 'startup3'; v2.myWeapons[0].upgradeSight = true; v2.myWeapons[0].upgradeLaser = true; v2.myWeapons[0].myColor = 1; ItemGenerator.applyUpgrades(v2.myWeapons[0]); v2 = new MadnessDataFile(); v2.createNew('sanford'); MadnessRoster.playerRoster.addCharacter(v2); MadnessRoster.playerRoster.makeActive(v2); v2.giveItem(ItemGenerator.createWeapon('hook', false), 0); v2.giveItem(ItemGenerator.createWeapon('glock20', true), 1); v2.myWeapons[1].upgradeSight = false; v2.myWeapons[1].upgradeLaser = true; v2.myWeapons[1].myColor = 1; ItemGenerator.applyUpgrades(v2.myWeapons[1]); v2 = new MadnessDataFile(); v2.createNew('deimos'); MadnessRoster.playerRoster.addCharacter(v2); MadnessRoster.playerRoster.makeActive(v2); v2.giveItem(ItemGenerator.createWeapon('mp7', true), 0); v2.giveItem(ItemGenerator.createWeapon('beretta', true), 1); v2.myWeapons[0].upgradeSight = true; v2.myWeapons[0].upgradeLaser = true; v2.myWeapons[0].myColor = 1; v2.myWeapons[1].upgradeSight = false; v2.myWeapons[1].upgradeLaser = true; v2.myWeapons[1].myColor = 1; ItemGenerator.applyUpgrades(v2.myWeapons[0]); ItemGenerator.applyUpgrades(v2.myWeapons[1]); MadnessLevel.totalRooms = 16; this.addRooms(MadnessLevel.totalRooms, MadnessGameSelect.gameMode); MadnessLevel.doorList = [1, 2, 2, 3, 2, 2, 3, 1, 2, 3, 2, 2, 3, 2, 2, 3]; this.addDoors(MadnessLevel.myRooms, MadnessLevel.doorList); this.addStartPoint(MadnessLevel.myRooms[0]); this.setDoorDir(0, 0, 'left'); this.setDoorDir(1, 0, 'right'); this.setDoorDir(1, 1, 'left'); this.setDoorDir(2, 0, 'right'); this.setDoorDir(2, 1, 'left'); this.setDoorDir(3, 0, 'right'); this.setDoorDir(3, 1, 'down'); this.setDoorDir(3, 2, 'left'); this.setDoorDir(4, 0, 'down'); this.setDoorDir(4, 1, 'left'); this.setDoorDir(5, 0, 'right'); this.setDoorDir(5, 1, 'left'); this.setDoorDir(6, 0, 'right'); this.setDoorDir(6, 1, 'down'); this.setDoorDir(6, 2, 'left'); this.setDoorDir(7, 0, 'left'); this.setDoorDir(8, 0, 'right'); this.setDoorDir(8, 1, 'left'); this.setDoorDir(9, 0, 'right'); this.setDoorDir(9, 1, 'down'); this.setDoorDir(9, 2, 'left'); this.setDoorDir(10, 0, 'down'); this.setDoorDir(10, 1, 'left'); this.setDoorDir(11, 0, 'right'); this.setDoorDir(11, 1, 'left'); this.setDoorDir(12, 0, 'right'); this.setDoorDir(12, 1, 'down'); this.setDoorDir(12, 2, 'left'); this.setDoorDir(13, 0, 'right'); this.setDoorDir(13, 1, 'left'); this.setDoorDir(14, 0, 'right'); this.setDoorDir(14, 1, 'left'); this.setDoorDir(15, 0, 'right'); this.setDoorDir(15, 1, 'down1'); this.setDoorDir(15, 2, 'down2'); this.setDoorType(15, 1, 'elevator'); this.setDoorType(15, 2, 'elevator'); this.connectDoors(0, 0, '---', 1, 0); this.connectDoors(1, 1, '---', 2, 0); this.connectDoors(2, 1, '---', 3, 1); this.connectDoors(3, 0, '---', 4, 1); this.connectDoors(3, 2, '---', 5, 0); this.connectDoors(5, 1, '---', 6, 1); this.connectDoors(6, 0, '---', 7, 0); this.connectDoors(6, 2, '---', 8, 0); this.connectDoors(8, 1, '---', 9, 1); this.connectDoors(9, 0, '---', 10, 1); this.connectDoors(9, 2, '---', 11, 0); this.connectDoors(11, 1, '---', 12, 1); this.connectDoors(12, 0, '---', 13, 1); this.connectDoors(12, 2, '---', 14, 0); this.connectDoors(14, 1, '---', 15, 0); this.addActivator(4, 'terminalLeft'); this.addEvent(MadnessLevel.myRooms[4].myActivators[0], MadnessEvents.world_0_7_4_A); this.addActivator(4, 'wallsafe'); this.addActivator(7, 'terminalLeft'); this.addEvent(MadnessLevel.myRooms[7].myActivators[0], MadnessEvents.world_0_7_7_A); this.addActivator(7, 'lockerRight'); this.addActivator(7, 'lockerRight'); this.addActivator(10, 'terminalLeft'); this.addEvent(MadnessLevel.myRooms[10].myActivators[0], MadnessEvents.world_0_7_10_A); this.addActivator(13, 'terminalLeft'); this.addEvent(MadnessLevel.myRooms[13].myActivators[0], MadnessEvents.world_0_7_13_A); this.addActivator(14, 'lockerLeft'); this.addItem(MadnessLevel.myRooms[4].myActivators[1], ItemGenerator.createWeapon('binarysword', false)); this.addItem(MadnessLevel.myRooms[7].myActivators[1], ItemGenerator.createWeapon('deagle', false)); this.addItem(MadnessLevel.myRooms[7].myActivators[1], ItemGenerator.createWeapon('dragonsword', false)); this.addItem(MadnessLevel.myRooms[7].myActivators[2], ItemGenerator.createWeapon('mp5', false)); this.addItem(MadnessLevel.myRooms[7].myActivators[2], ItemGenerator.createWeapon('mp7', false)); this.addItem(MadnessLevel.myRooms[14].myActivators[0], ItemGenerator.createWeapon('ar15', false)); this.addItem(MadnessLevel.myRooms[14].myActivators[0], ItemGenerator.createWeapon('m16', false)); this.addItem(MadnessLevel.myRooms[14].myActivators[0], ItemGenerator.createWeapon('hk416', false)); this.addObstacle(1, 'empty4'); this.addObstacle(1, 'empty1'); this.addObstacle(3, 'spikes1'); this.addObstacle(4, 'empty4'); this.addObstacle(4, 'empty4'); this.addObstacle(5, 'empty0'); this.addObstacle(6, 'spikes1'); this.addObstacle(7, 'empty4'); this.addObstacle(7, 'empty0'); this.addObstacle(9, 'spikes1'); this.addObstacle(10, 'empty1'); this.addObstacle(11, 'empty0'); this.addObstacle(12, 'spikes1'); this.addObstacle(12, 'empty1'); this.addObstacle(13, 'empty4'); this.addObstacle(14, 'empty1'); this.setStartNPC(); this.createNPC(MadnessLevel.myRooms[0], 'agent', 'enemy', 'ranged', 8, false, 3); this.createNPC(MadnessLevel.myRooms[0], 'agent2', 'enemy', 'ranged', 14, false, 1); this.endStartNPC(); this.createNPC(MadnessLevel.myRooms[1], 'agent2', 'enemy', 'ranged', 8, false, 3); this.createNPC(MadnessLevel.myRooms[1], 'agent3', 'enemy', 'ranged', 14, false, 1); this.createRoster(MadnessLevel.myRooms[1], ['agent', 'agent', 'agent'], 'enemy', 'melee', 12); this.createRoster(MadnessLevel.myRooms[1], ['agent', 'agent2', 'agent2'], 'enemy', 'ranged', 4); this.createNPC(MadnessLevel.myRooms[2], 'agent2', 'enemy', 'ranged', 10, false, 3); this.createRoster(MadnessLevel.myRooms[2], ['agent', 'agent', 'agent'], 'enemy', 'ranged', 8); this.createRoster(MadnessLevel.myRooms[2], ['agent', 'agent2'], 'enemy', 'melee', 12); this.createRoster(MadnessLevel.myRooms[2], ['agent', 'agent', 'agent'], 'enemy', 'melee', 4); this.createRoster(MadnessLevel.myRooms[2], ['agent', 'agent2', 'agent3'], 'enemy', 'ranged', 4); this.createNPC(MadnessLevel.myRooms[4], 'agent2', 'enemy', 'ranged', 8, false, 4); this.createRoster(MadnessLevel.myRooms[4], ['agent', 'agent', 'agent'], 'enemy', 'ranged', 8); this.createRoster(MadnessLevel.myRooms[4], ['agent', 'agent', 'agent3'], 'enemy', 'ranged', 4); this.createNPC(MadnessLevel.myRooms[5], 'agent', 'enemy', 'ranged', 8, false, 1); this.createNPC(MadnessLevel.myRooms[5], 'agent2', 'enemy', 'melee', 12, false, 2); this.createNPC(MadnessLevel.myRooms[7], 'agent2', 'enemy', 'ranged', 8, false, 4); this.createNPC(MadnessLevel.myRooms[8], 'agent', 'enemy', 'ranged', 8, false, 1); this.createNPC(MadnessLevel.myRooms[8], 'agent2', 'enemy', 'melee', 15, false, 2); this.createRoster(MadnessLevel.myRooms[8], ['agent', 'agent', 'agent'], 'enemy', 'ranged', 8); this.createRoster(MadnessLevel.myRooms[8], ['agent2', 'agent2', 'agent'], 'enemy', 'ranged', 4); this.createNPC(MadnessLevel.myRooms[10], 'agent2', 'enemy', 'melee', 18, false, 7); this.createNPC(MadnessLevel.myRooms[11], 'agent2', 'enemy', 'ranged', 10, false, 2); this.createNPC(MadnessLevel.myRooms[11], 'agent3', 'enemy', 'ranged', 17, false, 1); this.createRoster(MadnessLevel.myRooms[11], ['agent', 'agent', 'agent', 'agent', 'agent'], 'enemy', 'ranged', 3); this.createRoster(MadnessLevel.myRooms[11], ['agent', 'agent', 'agent', 'agent', 'agent'], 'enemy', 'ranged', 2); this.createRoster(MadnessLevel.myRooms[11], ['agent', 'agent', 'agent', 'agent'], 'enemy', 'ranged', 3); this.createRoster(MadnessLevel.myRooms[11], ['agent', 'agent', 'agent', 'agent', 'agent'], 'enemy', 'ranged', 2); this.createNPC(MadnessLevel.myRooms[13], 'agent3', 'enemy', 'ranged', 8, false, 3); this.createRoster(MadnessLevel.myRooms[13], ['agent', 'agent', 'agent2'], 'enemy', 'melee', 3); this.createRoster(MadnessLevel.myRooms[13], ['agent', 'agent'], 'enemy', 'ranged', 5); this.createNPC(MadnessLevel.myRooms[14], 'agent2', 'enemy', 'melee', 8, false, 2); this.createNPC(MadnessLevel.myRooms[14], 'agent3', 'enemy', 'ranged', 19, false, 2); this.setStartNPC(); this.createNPC(MadnessLevel.myRooms[15], 'mag', 'enemy', 'melee', 8, true, 1); MadnessLevel.myRooms[15].myCharacters[0].giveItem(ItemGenerator.createWeapon('ppkmag', false), 0); MadnessLevel.myRooms[15].myCharacters[0].myWeapons[0].myClips = 9999999; this.endStartNPC(); this.createNPC(MadnessLevel.myRooms[15], 'agent2', 'enemy', 'melee', 8, false, 6); this.createNPC(MadnessLevel.myRooms[14], 'agent', 'enemy', 'ranged', 19, false, 5); this.createRoster(MadnessLevel.myRooms[15], ['agent', 'agent', 'agent', 'agent', 'agent'], 'enemy', 'ranged', 3); this.addEvent(MadnessLevel.myRooms[15].myRosters[0], MadnessEvents.world_0_7_15_A); this.makeObjective(MadnessLevel.myRooms[15], 'clear', true, false); this.applyTrack('stage8', this); this.applyTrack('boss1', MadnessLevel.myRooms[15]); this.myCutsceneEnd = 'cutscene_world0_end'; }; storedv2.level1_0 = function () { this.myName = '[1.5-A] Sci-Post'; this.myDescription = ' Fifteen years ago, Project Nexus was the highlight of Nevada\'s research into ressurective cloning, thanks to the efforts of Dr.Christoff, the program\'s chief scientist. Reports vary, but something is said to have gone terribly wrong...'; this.myDifficulty = 4; var v2 = new MadnessDataFile(); v2.createNew('jesus2'); MadnessRoster.playerRoster.addCharacter(v2); MadnessRoster.playerRoster.makeActive(v2); v2.bodyType = 'scientist'; MadnessLevel.totalRooms = 16; this.addRooms(MadnessLevel.totalRooms, MadnessGameSelect.gameMode); MadnessLevel.doorList = [1, 2, 3, 3, 3, 2, 3, 1, 3, 2, 2, 3, 2, 3, 2, 1]; this.addDoors(MadnessLevel.myRooms, MadnessLevel.doorList); this.addStartPoint(MadnessLevel.myRooms[15]); this.setDoorDir2(0, ['right']); this.setDoorDir2(1, ['right', 'left']); this.setDoorDir2(2, ['right', 'left', 'down']); this.setDoorDir2(3, ['right', 'down', 'left']); this.setDoorDir2(4, ['right', 'down', 'left']); this.setDoorDir2(5, ['right', 'left']); this.disableDoorSpawn(5, 0); this.setDoorDir2(6, ['right', 'down', 'left']); this.disableDoorSpawn(6, 0); this.setDoorDir2(7, ['left']); this.setDoorDir2(8, ['right', 'down', 'left']); this.disableDoorSpawn(8, 2); this.setDoorDir2(9, ['right', 'left']); this.setDoorDir2(10, ['right', 'left']); this.lockDoor(10, 0); this.setDoorDir2(11, ['right', 'down', 'down']); this.disableDoorSpawn(11, 2); this.setDoorDir2(12, ['right', 'left']); this.setDoorDir2(13, ['right', 'down', 'down']); this.lockDoor(13, 2); this.disableDoorSpawn(13, 0); this.setDoorDir2(14, ['right', 'left']); this.setDoorDir2(15, ['left']); this.lockDoor(15, 0); this.connectDoors(0, 0, '---', 1, 1); this.connectDoors(1, 0, '---', 2, 1); this.connectDoors(2, 0, '---', 3, 2); this.connectDoors(3, 1, '---', 4, 0); this.connectDoors(3, 0, '---', 5, 1); this.connectDoors(5, 0, '---', 6, 2); this.connectDoors(6, 1, '---', 7, 0); this.connectDoors(6, 0, '---', 8, 0); this.connectDoors(8, 1, '---', 9, 0); this.connectDoors(8, 2, '---', 10, 0); this.connectDoors(10, 1, '---', 11, 0); this.connectDoors(11, 1, '---', 12, 0); this.connectDoors(11, 2, '---', 13, 2); this.connectDoors(13, 1, '---', 14, 0); this.connectDoors(13, 0, '---', 15, 0); this.addEvent(MadnessLevel.myRooms[15], MadnessEvents.world_1_0_15); this.addEvent(MadnessLevel.myRooms[14], MadnessEvents.world_1_0_14); this.addEvent(MadnessLevel.myRooms[11], MadnessEvents.world_1_0_11); this.addEvent(MadnessLevel.myRooms[8], MadnessEvents.world_1_0_8); this.addEvent(MadnessLevel.myRooms[1], MadnessEvents.world_1_0_1); this.addActivator(1, 'lockerLeft'); this.addActivator(4, 'lockerLeft'); this.addActivator(5, 'lockerLeft'); this.addActivator(5, 'lockerRight'); this.addActivator(6, 'lockerLeft'); this.addActivator(7, 'lockerLeft'); this.addActivator(7, 'lockerLeft'); this.addActivator(8, 'lockerRight'); this.addActivator(9, 'lockerLeft'); this.addActivator(9, 'lockerLeft'); this.addActivator(10, 'lockerLeft'); this.addActivator(10, 'terminal2Right'); this.addEvent(MadnessLevel.myRooms[10].myActivators[1], MadnessEvents.world_1_0_10); this.addActivator(14, 'lockerLeft'); this.addActivator(14, 'lockerRight'); this.addActivator2(15, ['terminal2Left', 'lockerLeft']); this.addEvent(MadnessLevel.myRooms[15].myActivators[0], MadnessEvents.world_1_0_15c); this.addWeaponToLocker(15, 1, ['ppk', 'bowieknife', 'glock20']); this.addWeaponToLocker(14, 0, ['97k', 'ironknife']); this.addWeaponToLocker(14, 1, ['500snub', '357snub']); this.addWeaponToLocker(10, 0, ['baton', 'baton', 'baton']); this.addWeaponToLocker(9, 1, ['prokiller460']); this.addWeaponToLocker(7, 1, ['browning', 'glock20', '97k']); this.addWeaponToLocker(6, 0, ['mp7']); this.addWeaponToLocker(5, 0, ['mp5', 'oa93']); this.addWeaponToLocker(5, 1, ['axe', 'spas12']); this.addWeaponToLocker(1, 0, ['fiveseven', 'bowieknife']); this.addSpawner2(5, ['metalDoor', 'metalDoor']); v2 = new MadnessDataFile(); v2.createNew('zombie'); this.setSpawner(5, 0, '---', v2, 'timer', 100, true, 'zombie'); v2 = new MadnessDataFile(); v2.createNew('zombie'); this.setSpawner(5, 1, '---', v2, 'timer', 40, true, 'zombie'); this.addSpawner2(10, ['metalDoor', 'metalDoor']); v2 = new MadnessDataFile(); v2.createNew('zombie'); this.setSpawner(10, 0, '---', v2, 'open', 1, false, 'zombie'); v2 = new MadnessDataFile(); v2.createNew('zombie'); this.setSpawner(10, 1, '---', v2, 'open', 1, false, 'zombie'); this.addSpawner2(13, ['metalDoor']); v2 = new MadnessDataFile(); v2.createNew('zombie'); this.setSpawner(13, 0, '---', v2, 'timer', 80, false, 'zombie'); this.addSpawner2(14, ['metalDoor', 'metalDoor']); v2 = new MadnessDataFile(); v2.createNew('zombie'); this.setSpawner(14, 0, '---', v2, 'timer', 80, false, 'zombie'); v2 = new MadnessDataFile(); v2.createNew('zombie'); this.setSpawner(14, 1, '---', v2, 'timer', 10, false, 'zombie'); this.addObstacle(5, 'box1'); this.addObstacle(14, 'box1b'); this.addObstacle(15, 'box2'); this.addObstacle(1, 'empty4'); this.addObstacle(1, 'empty1'); this.addObstacle(2, 'empty4'); this.addObstacle(3, 'empty0'); this.addObstacle(3, 'empty1'); this.addObstacle(4, 'empty1'); this.addObstacle(4, 'empty0'); this.addObstacle(5, 'empty1'); this.addObstacle(7, 'empty1'); this.addObstacle(7, 'empty0'); this.addObstacle(8, 'empty1'); this.addObstacle(9, 'empty1'); this.addObstacle(12, 'empty1'); this.addObstacle(13, 'empty1'); this.addObstacle(14, 'empty4'); this.addObstacle(15, 'empty4'); this.createNPC(MadnessLevel.myRooms[15], 'scientist', 'player', 'lab', 1, false, 2); this.createNPC(MadnessLevel.myRooms[14], 'scientist', 'player', 'lab', 1, false, 3); this.createNPC(MadnessLevel.myRooms[13], 'scientist', 'player', 'lab', 1, false, 4); this.setStartup('stun_surprise', 0); this.createNPC(MadnessLevel.myRooms[12], 'zombie', 'zombie', 'unarmed', 1, false, 1); this.createRoster(MadnessLevel.myRooms[12], ['scientist'], 'player', 'lab', 1); this.createRoster(MadnessLevel.myRooms[12], ['zombie'], 'zombie', 'zombie', 1); this.createNPC(MadnessLevel.myRooms[11], 'agent_classic', 'player', 'ranged', 1, true, 2); this.createNPC(MadnessLevel.myRooms[11], 'scientist', 'player', 'lab', 1, false, 2); this.resetStartup(); this.createNPC(MadnessLevel.myRooms[11], 'zombie', 'zombie', 'unarmed', 1, false, 2); this.createNPC(MadnessLevel.myRooms[9], 'scientist', 'player', 'lab', 1, false, 2); MadnessLevel.myRooms[9].myCharacters[1].traitBravery = -1; MadnessLevel.myRooms[9].myCharacters[0].traitBravery = -1; this.createNPC(MadnessLevel.myRooms[9], 'agent_classic', 'enemy', 'ranged', 1, false, 2); this.createRoster(MadnessLevel.myRooms[9], ['zombie'], 'zombie', 'zombie', 2); this.createNPC(MadnessLevel.myRooms[8], 'agent_classic', 'enemy', 'ranged', 1, false, 1); this.createNPC(MadnessLevel.myRooms[8], 'scientist', 'player', 'lab', 1, false, 3); MadnessLevel.myRooms[8].myCharacters[2].traitBravery = -1; MadnessLevel.myRooms[8].myCharacters[1].traitBravery = -1; this.createRoster(MadnessLevel.myRooms[8], ['agent_classic', 'agent_classic'], 'enemy', 'ranged', 1); this.createRoster(MadnessLevel.myRooms[8], ['agent_classic', 'agent_classic', 'agent_classic'], 'enemy', 'ranged', 1); this.createRoster(MadnessLevel.myRooms[8], ['agent_classic', 'agent_classic', 'agent_classic', 'agent_classic'], 'enemy', 'ranged', 2); this.createNPC(MadnessLevel.myRooms[7], 'scientist', 'player', 'lab', 1, false, 2); MadnessLevel.myRooms[7].myCharacters[1].traitBravery = -1; MadnessLevel.myRooms[7].myCharacters[0].traitBravery = -1; this.createNPC(MadnessLevel.myRooms[6], 'agent_classic', 'enemy', 'ranged', 1, false, 3); this.createRoster(MadnessLevel.myRooms[6], ['agent_classic'], 'enemy', 'ranged', 2); this.createNPC(MadnessLevel.myRooms[5], 'zombie', 'zombie', 'zombie', 1, false, 4); this.createRoster(MadnessLevel.myRooms[5], ['agent_classic'], 'enemy', 'ranged', 2); this.createNPC(MadnessLevel.myRooms[4], 'scientist', 'player', 'lab', 1, false, 2); MadnessLevel.myRooms[4].myCharacters[1].traitBravery = -1; MadnessLevel.myRooms[4].myCharacters[0].traitBravery = -1; this.createNPC(MadnessLevel.myRooms[4], 'agent_classic', 'enemy', 'ranged', 1, false, 3); this.createRoster(MadnessLevel.myRooms[4], ['agent_classic', 'agent_classic'], 'enemy', 'melee', 2); this.createNPC(MadnessLevel.myRooms[3], 'agent_classic', 'enemy', 'ranged', 1, false, 4); this.createRoster(MadnessLevel.myRooms[3], ['agent_classic', 'agent_classic', 'agent_classic'], 'enemy', 'ranged', 5); this.createRoster(MadnessLevel.myRooms[3], ['agent_classic', 'agent_classic', 'agent_classic'], 'enemy', 'melee', 8); this.createNPC(MadnessLevel.myRooms[2], 'scientist', 'player', 'lab', 1, false, 2); MadnessLevel.myRooms[2].myCharacters[1].traitBravery = -1; MadnessLevel.myRooms[2].myCharacters[0].traitBravery = -1; this.createRoster(MadnessLevel.myRooms[2], ['agent_classic', 'agent_classic', 'agent_classic'], 'enemy', 'ranged', 9); this.createRoster(MadnessLevel.myRooms[2], ['agent_classic', 'agent_classic', 'agent_classic'], 'enemy', 'ranged', 6); this.setStartup('stun_surprise', 0); this.createNPC(MadnessLevel.myRooms[1], 'agent_classic', 'enemy', 'ranged', 1, false, 4); this.resetStartup(); this.createRoster(MadnessLevel.myRooms[1], ['agent_classic', 'agent_classic', 'agent_classic'], 'enemy', 'ranged', 6); this.addEvent(MadnessLevel.myRooms[1].myRosters[0], MadnessEvents.world_1_0_1c); this.setStartNPC(); this.createNPC(MadnessLevel.myRooms[0], 'agent_classic', 'enemy', 'ranged', 1, false, 4); this.endStartNPC(); this.createRoster(MadnessLevel.myRooms[0], ['zombie', 'zombie', 'zombie_scientist'], 'zombie', 'zombie', 6); this.createRoster(MadnessLevel.myRooms[0], ['zombie_scientist'], 'zombie', 'lab', 1); this.createRoster(MadnessLevel.myRooms[0], ['zombie_agent_classic', 'zombie', 'zombie_scientist'], 'zombie', 'zombie', 6); this.makeObjective(MadnessLevel.myRooms[0], 'clear', true, false); this.myCutsceneStart = 'cutscene_world1_start'; this.applyTrack('menu', this); }; goto 62118; label 62113: goto 92402; label 62118: storedv2.level1_1 = function () { this.myName = '[1.5-B] Quarters'; this.myDescription = ' In the distance lay the Science Tower, the seat of all Nexus research, and only the eccentric Dr.Hofnarr had high-level access. Christoff\'s treason would be short-lived if Hofnarr could not be convinced to turn against the organization.'; this.myDifficulty = 3; var v2 = new MadnessDataFile(); v2.createNew('jesus2'); MadnessRoster.playerRoster.addCharacter(v2); MadnessRoster.playerRoster.makeActive(v2); v2.giveItem(ItemGenerator.createWeapon('glock20', false), 0); v2.giveItem(ItemGenerator.createWeapon('carbonsword', false), 1); v2.myWeapons[0].myClips = 3; v2 = new MadnessDataFile(); v2.createNew('tricky2'); MadnessRoster.playerRoster.addCharacter(v2); v2.giveItem(ItemGenerator.createWeapon('ironknife', false), 1); MadnessLevel.totalRooms = 17; this.addRooms(MadnessLevel.totalRooms, MadnessGameSelect.gameMode); MadnessLevel.doorList = [1, 3, 2, 3, 3, 2, 3, 3, 2, 1, 2, 3, 1, 3, 2, 2, 1]; this.addDoors(MadnessLevel.myRooms, MadnessLevel.doorList); this.addStartPoint(MadnessLevel.myRooms[0]); this.setDoorDir2(0, ['left']); this.setDoorDir2(1, ['right', 'down', 'left']); this.setDoorDir2(2, ['right', 'down']); this.setDoorDir2(3, ['right', 'left', 'down']); this.setDoorDir2(4, ['right', 'left', 'down']); this.setDoorDir2(5, ['right', 'left']); this.setDoorDir2(6, ['right', 'down', 'left']); this.setDoorDir2(7, ['right', 'down', 'left']); this.setDoorDir2(8, ['right', 'left']); this.setDoorDir2(9, ['right']); this.setDoorDir2(10, ['right', 'down']); this.setDoorDir2(11, ['right', 'down', 'left']); this.setDoorDir2(12, ['right']); this.setDoorDir2(13, ['right', 'down', 'left']); this.lockDoor(13, 0); this.setDoorDir2(14, ['right', 'left']); this.setDoorDir2(15, ['right', 'left']); this.setDoorDir2(16, ['left']); this.connectDoors(0, 0, '---', 1, 0); this.connectDoors(1, 1, '---', 2, 0); this.connectDoors(1, 2, '---', 3, 0); this.connectDoors(3, 1, '---', 4, 0); this.connectDoors(4, 1, '---', 5, 0); this.connectDoors(5, 1, '---', 6, 0); this.connectDoors(6, 1, '---', 7, 0); this.connectDoors(6, 2, '---', 10, 0); this.connectDoors(7, 1, '---', 8, 0); this.connectDoors(7, 2, '---', 9, 0); this.connectDoors(10, 1, '---', 11, 0); this.connectDoors(11, 2, '---', 12, 0); this.connectDoors(11, 1, '---', 13, 1); this.connectDoors(13, 2, '---', 14, 0); this.connectDoors(13, 0, '---', 15, 1); this.connectDoors(15, 0, '---', 16, 0); this.addEvent(MadnessLevel.myRooms[0], MadnessEvents.world_1_1_0); this.addEvent(MadnessLevel.myRooms[1], MadnessEvents.world_1_1_1); this.addEvent(MadnessLevel.myRooms[6], MadnessEvents.world_1_1_6b); this.addEvent(MadnessLevel.myRooms[8], MadnessEvents.world_1_1_8); this.addEvent(MadnessLevel.myRooms[15], MadnessEvents.world_1_1_15); this.addEvent(MadnessLevel.myRooms[16], MadnessEvents.world_1_1_16); this.addActivator2(2, ['lockerRight', 'lockerRight', 'lockerRight']); this.addActivator2(3, ['lockerRight']); this.addActivator2(4, ['lockerRight']); this.addActivator2(6, ['terminalRightAI']); this.connectActivator(6, 0, '---', MadnessLevel.myRooms[6].myDoors[2], 'unlock'); this.addActivator2(7, ['lockerLeft', 'lockerLeft']); this.addActivator2(9, ['lockerRight', 'lockerRight']); this.addActivator2(12, ['lockerRight']); this.addActivator2(14, ['lockerRight', 'terminalRightAI']); this.connectActivator(14, 1, '---', MadnessLevel.myRooms[13].myDoors[0], 'unlock'); this.addActivator2(16, ['lockerLeft', 'terminalLeftAI']); this.addWeaponToLocker(2, 0, ['mp7', 'fiveseven']); this.addWeaponToLocker(2, 2, ['deagle']); this.addWeaponToLocker(3, 0, ['l337sword']); this.addWeaponToLocker(4, 0, ['glock20', 'prokiller460']); this.addWeaponToLocker(7, 0, ['browning', 'fiveseven']); this.addWeaponToLocker(9, 1, ['fiveseven']); this.addWeaponToLocker(12, 0, ['browning', 'carbonsword']); this.addWeaponToLocker(14, 0, ['500snub', 'uzi']); this.addWeaponToLocker(16, 0, ['pipe', 'baton', 'ppk']); this.addObstacle(10, 'box2b'); this.addObstacle(10, 'box1'); this.addObstacle(16, 'box1'); this.addObstacle(1, 'empty1'); this.addObstacle(1, 'empty4'); this.addObstacle(2, 'empty4'); this.addObstacle(3, 'empty1'); this.addObstacle(4, 'empty4'); this.addObstacle(4, 'empty1'); this.addObstacle(5, 'empty3'); this.addObstacle(5, 'empty1'); this.addObstacle(8, 'empty4'); this.addObstacle(8, 'empty3'); this.addObstacle(9, 'empty4'); this.addObstacle(10, 'empty4'); this.addObstacle(10, 'empty3'); this.addObstacle(12, 'empty0'); this.addObstacle(12, 'empty4'); this.addObstacle(13, 'empty0'); this.addObstacle(14, 'empty1'); this.addObstacle(15, 'empty1'); this.addObstacle(15, 'empty4'); this.addObstacle(15, 'empty1'); this.setStartup('stun_surprise', 0); this.setStartNPC(); this.createNPC(MadnessLevel.myRooms[1], 'agent_classic', 'enemy', 'ranged', 1, true, 3); this.createNPC(MadnessLevel.myRooms[1], 'scientist', 'neutral', 'lab', 1, false, 2); MadnessLevel.myRooms[1].myCharacters[4].traitBravery = -1; MadnessLevel.myRooms[1].myCharacters[3].traitBravery = -1; this.endStartNPC(); this.resetStartup(); this.createRoster(MadnessLevel.myRooms[1], ['agent_classic', 'agent_classic', 'agent_classic'], 'enemy', 'melee', 1); this.createNPC(MadnessLevel.myRooms[2], 'agent_classic', 'enemy', 'ranged', 1, true, 2); this.createRoster(MadnessLevel.myRooms[2], ['agent_classic', 'agent_classic'], 'enemy', 'ranged', 2); this.createNPC(MadnessLevel.myRooms[3], 'agent_classic', 'enemy', 'ranged', 1, true, 2); this.createRoster(MadnessLevel.myRooms[3], ['agent_classic', 'agent_classic'], 'enemy', 'ranged', 2); this.createNPC(MadnessLevel.myRooms[4], 'scientist', 'neutral', 'lab', 1, false, 2); MadnessLevel.myRooms[4].myCharacters[1].traitBravery = -1; MadnessLevel.myRooms[4].myCharacters[0].traitBravery = -1; this.createNPC(MadnessLevel.myRooms[4], 'agent_classic', 'enemy', 'ranged', 2, true, 2); this.createRoster(MadnessLevel.myRooms[4], ['agent_classic', 'agent_classic'], 'enemy', 'ranged', 2); this.createNPC(MadnessLevel.myRooms[5], 'agent_classic', 'enemy', 'ranged', 3, true, 3); this.createRoster(MadnessLevel.myRooms[5], ['agent_classic', 'agent_classic', 'agent_classic'], 'enemy', 'ranged', 4); this.createNPC(MadnessLevel.myRooms[7], 'scientist', 'neutral', 'lab', 1, false, 4); MadnessLevel.myRooms[7].myCharacters[2].traitBravery = -1; MadnessLevel.myRooms[7].myCharacters[1].traitBravery = -1; MadnessLevel.myRooms[7].myCharacters[0].traitBravery = -1; this.createNPC(MadnessLevel.myRooms[9], 'scientist', 'neutral', 'lab', 1, false, 2); MadnessLevel.myRooms[8].myCharacters[1].traitBravery = -1; MadnessLevel.myRooms[8].myCharacters[0].traitBravery = -1; this.createNPC(MadnessLevel.myRooms[9], 'agent_classic', 'enemy', 'ranged', 4, true, 1); this.createRoster(MadnessLevel.myRooms[9], ['agent_classic', 'agent_classic', 'agent_classic'], 'enemy', 'ranged', 2); this.createRoster(MadnessLevel.myRooms[9], ['agent_classic', 'agent_classic'], 'enemy', 'melee', 9); this.createRoster(MadnessLevel.myRooms[9], ['agent_classic', 'agent_classic'], 'enemy', 'ranged', 4); this.addNPC(MadnessLevel.myRooms[8], MadnessRoster.playerRoster.myMembers[1], true); this.createNPC(MadnessLevel.myRooms[10], 'agent_classic', 'enemy', 'ranged', 4, true, 3); this.createRoster(MadnessLevel.myRooms[10], ['agent_classic', 'agent_classic', 'agent_classic'], 'enemy', 'ranged', 4); this.createRoster(MadnessLevel.myRooms[10], ['agent_classic', 'agent_classic'], 'enemy', 'melee', 12); this.createRoster(MadnessLevel.myRooms[10], ['agent_classic', 'agent_classic', 'riot'], 'enemy', 'ranged', 6); this.createNPC(MadnessLevel.myRooms[11], 'riot', 'enemy', 'ranged', 10, true, 2); this.createNPC(MadnessLevel.myRooms[11], 'agent_classic', 'enemy', 'ranged', 5, true, 2); this.createNPC(MadnessLevel.myRooms[12], 'agent_classic', 'enemy', 'ranged', 4, true, 3); this.createRoster(MadnessLevel.myRooms[12], ['agent_classic', 'agent_classic'], 'enemy', 'melee', 12); this.createNPC(MadnessLevel.myRooms[13], 'agent_classic', 'enemy', 'ranged', 2, true, 4); this.createNPC(MadnessLevel.myRooms[14], 'agent_classic', 'enemy', 'melee', 2, true, 3); this.createNPC(MadnessLevel.myRooms[14], 'riot', 'enemy', 'ranged', 9, true, 1); this.createNPC(MadnessLevel.myRooms[15], 'agent_classic', 'enemy', 'ranged', 2, true, 3); this.createRoster(MadnessLevel.myRooms[15], ['riot', 'riot'], 'enemy', 'ranged', 10); this.createRoster(MadnessLevel.myRooms[15], ['riot', 'agent_classic'], 'enemy', 'ranged', 10); this.createNPC(MadnessLevel.myRooms[16], 'agent_classic', 'enemy', 'melee', 2, true, 6); this.createNPC(MadnessLevel.myRooms[16], 'riot', 'enemy', 'ranged', 9, true, 2); this.makeObjective(MadnessLevel.myRooms[16].myActivators[1], 'use', true, false); this.makeObjective(MadnessLevel.myRooms[16], 'clear', true, false); this.makeObjective(MadnessLevel.myRooms[8].myCharacters[0], 'survive', true, false); this.applyTrack('stage2', this); this.applyTrack('menu', MadnessLevel.myRooms[0]); }; storedv2.level1_2 = function () { this.myName = '[1.5-C] Muto-Lab'; this.myDescription = ' Once again on his own, Dr.Christoff began his race to the top of the tower. The outbreak would not be contained for long, and the experiments of Project Nexus proved to be more dangerous than their creators.'; this.myDifficulty = 3; var v2 = new MadnessDataFile(); v2.createNew('jesus2'); MadnessRoster.playerRoster.addCharacter(v2); MadnessRoster.playerRoster.makeActive(v2); v2.giveItem(ItemGenerator.createWeapon('deagle', false), 0); v2.giveItem(ItemGenerator.createWeapon('ironsword', false), 1); v2.myWeapons[0].myClips = 3; v2.myStartup = 'startup3'; v2.createArmor('shades12'); v2 = new MadnessDataFile(); v2.createNew('tricky2'); MadnessRoster.playerRoster.addCharacter(v2); v2.giveItem(ItemGenerator.createWeapon('ironknife', false), 1); MadnessLevel.totalRooms = 21; this.addRooms(MadnessLevel.totalRooms, MadnessGameSelect.gameMode); MadnessLevel.doorList = [1, 2, 2, 4, 2, 2, 2, 1, 3, 2, 2, 3, 2, 2, 2, 2, 3, 3, 1, 2, 2]; this.addDoors(MadnessLevel.myRooms, MadnessLevel.doorList); this.addStartPoint(MadnessLevel.myRooms[0]); this.setDoorDir2(0, ['left']); this.lockDoor(0, 0); this.setDoorDir2(1, ['right', 'left']); this.setDoorDir2(2, ['right', 'left']); this.setDoorDir2(3, ['right', 'down', 'down', 'left']); this.setDoorDir2(4, ['right', 'left']); this.setDoorDir2(5, ['left', 'right']); this.setDoorDir2(6, ['right', 'left']); this.setDoorDir2(7, ['right']); this.setDoorDir2(8, ['right', 'left', 'down']); this.setDoorDir2(9, ['right', 'left']); this.setDoorDir2(10, ['right', 'down']); this.setDoorDir2(11, ['right', 'down', 'left']); this.setDoorDir2(12, ['right', 'left']); this.setDoorDir2(13, ['right', 'left']); this.setDoorDir2(14, ['right', 'left']); this.setDoorDir2(15, ['right', 'left']); this.setDoorDir2(16, ['right', 'down', 'left']); this.setDoorDir2(17, ['right', 'left', 'down']); this.setDoorDir2(18, ['right']); this.setDoorDir2(19, ['right', 'left']); this.setDoorDir2(20, ['down', 'left']); this.connectDoors(0, 0, '---', 1, 0); this.connectDoors(1, 1, '---', 2, 0); this.connectDoors(2, 1, '---', 3, 0); this.connectDoors(3, 1, '---', 4, 1); this.connectDoors(3, 2, '---', 6, 0); this.connectDoors(3, 3, '---', 8, 0); this.connectDoors(4, 0, '---', 5, 0); this.connectDoors(6, 1, '---', 7, 0); this.connectDoors(8, 1, '---', 9, 0); this.connectDoors(9, 1, '---', 10, 0); this.connectDoors(10, 1, '---', 11, 1); this.connectDoors(11, 2, '---', 12, 0); this.connectDoors(11, 0, '---', 15, 1); this.connectDoors(12, 1, '---', 13, 0); this.connectDoors(13, 1, '---', 14, 0); this.connectDoors(15, 0, '---', 16, 2); this.connectDoors(16, 1, '---', 17, 0); this.connectDoors(16, 0, '---', 19, 1); this.connectDoors(17, 1, '---', 18, 0); this.connectDoors(19, 0, '---', 20, 1); this.addEvent(MadnessLevel.myRooms[0], MadnessEvents.world_1_2_0); this.addEvent(MadnessLevel.myRooms[1], MadnessEvents.world_1_2_1); this.addEvent(MadnessLevel.myRooms[2], MadnessEvents.world_1_2_2); this.addEvent(MadnessLevel.myRooms[8], MadnessEvents.world_1_2_8); this.addEvent(MadnessLevel.myRooms[9], MadnessEvents.world_1_2_9); this.addActivator2(0, ['panelAI']); this.addEvent(MadnessLevel.myRooms[0].myActivators[0], MadnessEvents.world_1_2_0b); this.addActivator2(2, ['terminalRight', 'terminalRight']); this.addActivator2(4, ['lockerLeft', 'lockerLeft']); this.addActivator2(5, ['terminal2Left']); this.addEvent(MadnessLevel.myRooms[5].myActivators[0], MadnessEvents.world_1_2_spikes1); this.addActivator2(6, ['lockerLeft']); this.addActivator2(7, ['lockerRight', 'terminal2Right']); this.addEvent(MadnessLevel.myRooms[7].myActivators[1], MadnessEvents.world_1_2_spikes2); this.addActivator2(13, ['lockerLeft']); this.addActivator2(14, ['lockerLeft', 'lockerLeft', 'terminal2Right']); this.addEvent(MadnessLevel.myRooms[14].myActivators[2], MadnessEvents.world_1_2_spikes3); this.addActivator2(15, ['lockerRight']); this.addActivator2(16, ['lockerLeft']); this.addActivator2(17, ['lockerRight']); this.addActivator2(18, ['terminal2Right']); this.addEvent(MadnessLevel.myRooms[18].myActivators[0], MadnessEvents.world_1_2_spikes4); this.addActivator2(19, ['lockerRight']); this.addWeaponToLocker(4, 0, ['prokiller460', 'switchblade']); this.addWeaponToLocker(4, 1, ['machette', 'hammer']); this.addWeaponToLocker(6, 0, ['beretta', '357long']); this.addWeaponToLocker(13, 0, ['billyclub', 'billyclub', 'billyclub']); this.addWeaponToLocker(14, 0, ['ak74', 'spas12']); this.addWeaponToLocker(14, 1, ['hk416', 'ppk', 'ppk']); this.addWeaponToLocker(15, 0, ['fiveseven', 'browning']); this.addWeaponToLocker(17, 0, ['l337sword', 'automagv']); this.addWeaponToLocker(19, 0, ['ak74u', 'mp40']); this.addSpawner2(7, ['metalDoor', 'metalDoor', 'windowLeft']); v2 = new MadnessDataFile(); v2.createNew('abom'); this.setSpawner(7, 0, '---', v2, 'timer', 110, true, 'abom'); v2 = new MadnessDataFile(); v2.createNew('abom'); this.setSpawner(7, 1, '---', v2, 'timer', 120, true, 'abom'); v2 = new MadnessDataFile(); v2.createNew('riot'); this.setSpawner(7, 2, '---', v2, 'timer', 80, true, 'enemy'); v2.giveItem(ItemGenerator.createWeapon('mp7', false), 1); this.addSpawner2(9, ['metalDoor', 'metalDoor']); v2 = new MadnessDataFile(); v2.createNew('abom'); this.setSpawner(9, 0, '---', v2, 'timer', 30, true, 'abom'); v2 = new MadnessDataFile(); v2.createNew('abom'); this.setSpawner(9, 1, '---', v2, 'timer', 70, true, 'abom'); this.addSpawner2(12, ['zipline', 'zipline', 'zipline', 'zipline', 'zipline']); v2 = new MadnessDataFile(); v2.createNew('riot'); this.setSpawner(12, 0, '---', v2, 'timer', 50, false, 'enemy'); v2.giveItem(ItemGenerator.createWeapon('mp7', false), 1); v2 = new MadnessDataFile(); v2.createNew('agent_classic'); this.setSpawner(12, 1, '---', v2, 'timer', 60, false, 'enemy'); v2.giveItem(ItemGenerator.createWeapon('pm9', false), 1); v2 = new MadnessDataFile(); v2.createNew('riot'); this.setSpawner(12, 2, '---', v2, 'timer', 65, false, 'enemy'); v2.giveItem(ItemGenerator.createWeapon('mp5', false), 1); v2 = new MadnessDataFile(); v2.createNew('agent_classic'); this.setSpawner(12, 3, '---', v2, 'timer', 72, false, 'enemy'); v2.giveItem(ItemGenerator.createWeapon('mp5k', false), 1); v2 = new MadnessDataFile(); v2.createNew('agent_classic'); this.setSpawner(12, 4, '---', v2, 'timer', 80, false, 'enemy'); v2.giveItem(ItemGenerator.createWeapon('mp7', false), 1); this.addSpawner2(16, ['zipline', 'zipline', 'zipline', 'zipline', 'zipline']); v2 = new MadnessDataFile(); v2.createNew('agent_classic'); this.setSpawner(16, 0, '---', v2, 'timer', 30, true, 'enemy'); v2.giveItem(ItemGenerator.createWeapon('mp7', false), 1); v2 = new MadnessDataFile(); v2.createNew('agent_classic'); this.setSpawner(16, 1, '---', v2, 'timer', 45, true, 'enemy'); v2.giveItem(ItemGenerator.createWeapon('pm9', false), 1); v2 = new MadnessDataFile(); v2.createNew('agent_classic'); this.setSpawner(16, 2, '---', v2, 'timer', 60, true, 'enemy'); v2.giveItem(ItemGenerator.createWeapon('mp5', false), 1); v2 = new MadnessDataFile(); v2.createNew('agent_classic'); this.setSpawner(16, 3, '---', v2, 'timer', 68, true, 'enemy'); v2.giveItem(ItemGenerator.createWeapon('mp5k', false), 1); this.addSpawner2(20, ['windowRight', 'zipline', 'zipline']); v2 = new MadnessDataFile(); v2.createNew('riot'); this.setSpawner(20, 0, '---', v2, 'timer', 50, true, 'enemy'); v2.giveItem(ItemGenerator.createWeapon('mp7', false), 1); v2 = new MadnessDataFile(); v2.createNew('riot'); this.setSpawner(20, 1, '---', v2, 'timer', 60, true, 'enemy'); v2.giveItem(ItemGenerator.createWeapon('hk2', false), 1); v2 = new MadnessDataFile(); v2.createNew('agent_classic'); this.setSpawner(20, 2, '---', v2, 'timer', 70, true, 'enemy'); v2.giveItem(ItemGenerator.createWeapon('mp7', false), 1); this.addObstacle2(3, ['spikes1', 'spikes1']); this.addObstacle2(11, ['spikes2']); this.addObstacle2(16, ['spikes2']); this.addObstacle(1, 'box1'); this.addObstacle(12, 'box2b'); this.addObstacle(20, 'box2b'); this.addObstacle(1, 'empty0'); this.addObstacle(1, 'empty4'); this.addObstacle(1, 'empty1'); this.addObstacle(4, 'empty1'); this.addObstacle(4, 'empty0'); this.addObstacle(5, 'empty3'); this.addObstacle(5, 'empty3'); this.addObstacle(8, 'empty4'); this.addObstacle(9, 'empty4'); this.addObstacle(9, 'empty4'); this.addObstacle(11, 'empty1'); this.addObstacle(12, 'empty1'); this.addObstacle(14, 'empty0'); this.addObstacle(15, 'empty4'); this.addObstacle(15, 'empty4'); this.addObstacle(17, 'empty4'); this.addObstacle(18, 'empty1'); this.addObstacle(19, 'empty1'); this.addObstacle(19, 'empty1'); this.addObstacle(20, 'empty1'); this.addNPC(MadnessLevel.myRooms[0], MadnessRoster.playerRoster.myMembers[1], true); this.setStartNPC(); this.createNPC(MadnessLevel.myRooms[3], 'abom', 'abom', 'unarmed', 3, true, 2); this.endStartNPC(); this.createNPC(MadnessLevel.myRooms[4], 'abom', 'abom', 'unarmed', 3, true, 1); this.createRoster(MadnessLevel.myRooms[4], ['abom', 'abom'], 'abom', 'unarmed', 1); this.createNPC(MadnessLevel.myRooms[5], 'abom', 'abom', 'unarmed', 3, true, 1); this.createNPC(MadnessLevel.myRooms[6], 'abom', 'abom', 'unarmed', 3, true, 2); this.createRoster(MadnessLevel.myRooms[6], ['abom'], 'abom', 'unarmed', 1); this.createRoster(MadnessLevel.myRooms[6], ['abom'], 'abom', 'unarmed', 1); this.createRoster(MadnessLevel.myRooms[6], ['abom'], 'abom', 'unarmed', 1); this.createNPC(MadnessLevel.myRooms[8], 'riot', 'enemy', 'ranged', 9, true, 2); this.createNPC(MadnessLevel.myRooms[8], 'agent_classic', 'enemy', 'ranged', 4, true, 4); this.createNPC(MadnessLevel.myRooms[9], 'riot', 'enemy', 'ranged', 9, true, 2); this.createNPC(MadnessLevel.myRooms[9], 'agent_classic', 'enemy', 'ranged', 4, true, 1); this.createNPC(MadnessLevel.myRooms[9], 'abom', 'abom', 'unarmed', 3, true, 1); this.createRoster(MadnessLevel.myRooms[9], ['abom'], 'abom', 'unarmed', 1); this.createRoster(MadnessLevel.myRooms[9], ['abom', 'abom', 'abom'], 'abom', 'unarmed', 1); this.createRoster(MadnessLevel.myRooms[9], ['abom', 'abom'], 'abom', 'unarmed', 1); this.createRoster(MadnessLevel.myRooms[10], ['riot', 'riot', 'agent_classic'], 'enemy', 'ranged', 10); this.createRoster(MadnessLevel.myRooms[10], ['abom', 'abom'], 'abom', 'unarmed', 1); this.createRoster(MadnessLevel.myRooms[10], ['agent_classic', 'agent_classic', 'agent_classic'], 'enemy', 'ranged', 6); this.createNPC(MadnessLevel.myRooms[11], 'agent_classic', 'enemy', 'ranged', 6, true, 2); this.setStartNPC(); this.createNPC(MadnessLevel.myRooms[11], 'abom', 'abom', 'unarmed', 3, true, 3); this.endStartNPC(); this.createNPC(MadnessLevel.myRooms[12], 'agent_classic', 'enemy', 'ranged', 6, true, 3); this.createRoster(MadnessLevel.myRooms[12], ['abom'], 'abom', 'unarmed', 1); this.createNPC(MadnessLevel.myRooms[13], 'agent_classic', 'enemy', 'ranged', 6, true, 3); this.createRoster(MadnessLevel.myRooms[13], ['abom', 'abom'], 'abom', 'unarmed', 1); this.createRoster(MadnessLevel.myRooms[13], ['agent_classic', 'agent_classic', 'agent_classic'], 'enemy', 'ranged', 5); this.createNPC(MadnessLevel.myRooms[14], 'agent_classic', 'enemy', 'ranged', 6, true, 2); this.createRoster(MadnessLevel.myRooms[14], ['abom', 'abom'], 'abom', 'unarmed', 1); this.setStartNPC(); this.createNPC(MadnessLevel.myRooms[16], 'abom', 'abom', 'unarmed', 3, false, 1); this.endStartNPC(); this.createNPC(MadnessLevel.myRooms[17], 'abom', 'abom', 'unarmed', 3, false, 4); this.createRoster(MadnessLevel.myRooms[17], ['abom', 'abom'], 'abom', 'unarmed', 1); this.createNPC(MadnessLevel.myRooms[18], 'agent_classic', 'enemy', 'ranged', 12, true, 3); this.createRoster(MadnessLevel.myRooms[18], ['abom', 'abom', 'abom'], 'abom', 'unarmed', 1); this.createRoster(MadnessLevel.myRooms[18], ['abom'], 'abom', 'unarmed', 1); this.createRoster(MadnessLevel.myRooms[18], ['abom', 'abom', 'abom'], 'abom', 'unarmed', 1); this.setStartNPC(); this.createNPC(MadnessLevel.myRooms[19], 'mag2', 'abom', 'unarmed', 4, true, 1); this.endStartNPC(); this.createNPC(MadnessLevel.myRooms[19], 'agent_classic', 'enemy', 'ranged', 12, true, 2); this.createRoster(MadnessLevel.myRooms[19], ['agent_classic', 'agent_classic'], 'enemy', 'ranged', 3); this.addEvent(MadnessLevel.myRooms[19].myRosters[0], MadnessEvents.world_1_2_19); this.createRoster(MadnessLevel.myRooms[19], ['abom', 'abom'], 'abom', 'unarmed', 1); this.makeObjective(MadnessLevel.myRooms[20].myDoors[0], 'exit', true, false); this.applyTrack('zombie1', this); this.applyTrack('boss1', MadnessLevel.myRooms[19]); this.applyTrack('menu', MadnessLevel.myRooms[0]); this.applyTrack('menu', MadnessLevel.myRooms[1]); this.applyTrack('menu', MadnessLevel.myRooms[2]); }; storedv2.level1_3 = function () { this.myName = '[1.5-D] Chapel'; this.myDescription = ' Continuing his ascent, Christoff waded through hordes of Nexus abominations. He cringed at what his science had been used to create, eager to reach the end of his climb and make those responsible pay for what they had done.'; this.myDifficulty = 4; var v2 = new MadnessDataFile(); v2.createNew('jesus2'); MadnessRoster.playerRoster.addCharacter(v2); MadnessRoster.playerRoster.makeActive(v2); v2.giveItem(ItemGenerator.createWeapon('hk2', false), 0); v2.giveItem(ItemGenerator.createWeapon('ironsword', false), 1); v2.myWeapons[0].myClips = 3; v2.myStartup = 'startup3'; v2.createArmor('shades12'); MadnessLevel.totalRooms = 14; this.addRooms(MadnessLevel.totalRooms, MadnessGameSelect.gameMode); MadnessLevel.doorList = [2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2]; this.addDoors(MadnessLevel.myRooms, MadnessLevel.doorList); this.addStartPointDoor(MadnessLevel.myRooms[0].myDoors[0]); this.setDoorDir2(0, ['down', 'left']); this.setDoorDir2(1, ['right', 'left']); this.setDoorDir2(2, ['right', 'left']); this.setDoorDir2(3, ['right', 'left']); this.setDoorDir2(4, ['right', 'left']); this.setDoorDir2(5, ['right', 'down']); this.setDoorDir2(6, ['right', 'down', 'left']); this.setDoorDir2(7, ['right', 'left']); this.setDoorDir2(8, ['right', 'left']); this.setDoorDir2(9, ['right', 'left']); this.setDoorDir2(10, ['right', 'left']); this.setDoorDir2(11, ['right', 'left']); this.setDoorDir2(12, ['right', 'left']); this.setDoorDir2(13, ['down', 'left']); this.connectDoors(0, 1, '---', 1, 0); this.connectDoors(1, 1, '---', 2, 0); this.connectDoors(2, 1, '---', 3, 0); this.connectDoors(3, 1, '---', 4, 0); this.connectDoors(4, 1, '---', 5, 0); this.connectDoors(5, 1, '---', 6, 1); this.connectDoors(6, 2, '---', 7, 0); this.connectDoors(6, 0, '---', 9, 1); this.connectDoors(7, 1, '---', 8, 0); this.connectDoors(9, 0, '---', 10, 1); this.connectDoors(10, 0, '---', 11, 1); this.connectDoors(11, 0, '---', 12, 1); this.connectDoors(12, 0, '---', 13, 1); this.addEvent(MadnessLevel.myRooms[0], MadnessEvents.world_1_3_0); this.addEvent(MadnessLevel.myRooms[1], MadnessEvents.world_1_3_1); this.addEvent(MadnessLevel.myRooms[10], MadnessEvents.world_1_3_10); this.addActivator2(2, ['lockerRight']); this.addActivator2(4, ['lockerLeft']); this.addActivator2(7, ['lockerRight', 'lockerRight', 'lockerRight']); this.addActivator2(8, ['lockerLeft', 'terminalRight']); this.addEvent(MadnessLevel.myRooms[8].myActivators[1], MadnessEvents.world_1_3_spikes1); this.addActivator2(10, ['lockerLeft']); this.addActivator2(13, ['lockerLeft']); this.addWeaponToLocker(2, 0, ['thompson', 'tar21']); this.addWeaponToLocker(4, 0, ['crowbar', 'p1445']); this.addWeaponToLocker(7, 0, ['glock20']); this.addWeaponToLocker(7, 1, ['luger', 'uzi']); this.addWeaponToLocker(7, 2, ['g36', 'gclub', 'glock20']); this.addWeaponToLocker(8, 0, ['357long', 'ar15']); this.addWeaponToLocker(10, 0, ['carbonknife']); this.addWeaponToLocker(13, 0, ['fiveseven', 'mallet', 'usas12']); this.addSpawner2(0, ['metalDoor', 'metalDoor']); v2 = new MadnessDataFile(); v2.createNew('patient'); this.setSpawner(0, 0, '---', v2, 'timer', 10, true, 'enemy'); v2 = new MadnessDataFile(); v2.createNew('patient'); this.setSpawner(0, 1, '---', v2, 'open', 1, false, 'enemy'); this.addSpawner2(2, ['metalDoor']); v2 = new MadnessDataFile(); v2.createNew('patient'); this.setSpawner(2, 0, '---', v2, 'timer', 40, true, 'enemy'); this.addSpawner2(9, ['metalDoor', 'metalDoor']); v2 = new MadnessDataFile(); v2.createNew('patient'); this.setSpawner(9, 0, '---', v2, 'timer', 120, true, 'enemy'); v2 = new MadnessDataFile(); v2.createNew('patient'); this.setSpawner(9, 1, '---', v2, 'open', 40, true, 'enemy'); this.addSpawner2(12, ['metalDoor', 'metalDoor', 'metalDoor']); v2 = new MadnessDataFile(); v2.createNew('patient'); this.setSpawner(12, 0, '---', v2, 'timer', 300, true, 'enemy'); v2 = new MadnessDataFile(); v2.createNew('patient'); this.setSpawner(12, 1, '---', v2, 'timer', 200, true, 'enemy'); v2 = new MadnessDataFile(); v2.createNew('patient'); this.setSpawner(12, 2, '---', v2, 'open', 20, true, 'enemy'); this.addSpawner2(13, ['metalDoor', 'metalDoor']); v2 = new MadnessDataFile(); v2.createNew('patient'); this.setSpawner(13, 0, '---', v2, 'timer', 30, true, 'enemy'); v2 = new MadnessDataFile(); v2.createNew('patient'); this.setSpawner(13, 1, '---', v2, 'open', 50, true, 'enemy'); this.addObstacle2(6, ['spikes2']); this.addObstacle(1, 'box2b'); this.addObstacle(1, 'box1'); this.addObstacle(9, 'box1'); this.addObstacle(1, 'empty1'); this.addObstacle(3, 'empty1'); this.addObstacle(3, 'empty1'); this.addObstacle(4, 'empty4'); this.addObstacle(4, 'empty1'); this.addObstacle(7, 'empty0'); this.addObstacle(8, 'empty0'); this.addObstacle(9, 'empty4'); this.addObstacle(9, 'empty1'); this.addObstacle(10, 'empty1'); this.addObstacle(11, 'empty1'); this.addObstacle(11, 'empty1'); this.addObstacle(12, 'empty1'); this.createNPC(MadnessLevel.myRooms[1], 'riot', 'enemy', 'ranged', 8, false, 2); this.createNPC(MadnessLevel.myRooms[2], 'agent_classic', 'enemy', 'ranged', 5, false, 3); this.createNPC(MadnessLevel.myRooms[3], 'riot', 'enemy', 'ranged', 6, false, 2); this.createNPC(MadnessLevel.myRooms[3], 'patient', 'enemy', 'unarmed', 5, false, 2); this.createNPC(MadnessLevel.myRooms[4], 'agent_classic', 'enemy', 'melee', 15, false, 3); this.createNPC(MadnessLevel.myRooms[4], 'patient', 'enemy', 'unarmed', 3, false, 1); this.createRoster(MadnessLevel.myRooms[4], ['patient', 'patient', 'patient'], 'enemy', 'unarmed', 3); this.createRoster(MadnessLevel.myRooms[4], ['patient', 'patient'], 'enemy', 'melee', 8); this.createNPC(MadnessLevel.myRooms[5], 'patient', 'enemy', 'melee', 8, false, 3); this.createRoster(MadnessLevel.myRooms[5], ['patient', 'patient', 'agent_classic', 'agent_classic'], 'enemy', 'melee', 8); this.setStartNPC(); this.createNPC(MadnessLevel.myRooms[6], 'patient', 'enemy', 'unarmed', 8, false, 1); this.endStartNPC(); this.createNPC(MadnessLevel.myRooms[8], 'patient', 'enemy', 'unarmed', 8, false, 2); this.createRoster(MadnessLevel.myRooms[8], ['patient', 'patient', 'agent_classic', 'agent_classic'], 'enemy', 'ranged', 8); this.createRoster(MadnessLevel.myRooms[8], ['patient', 'patient', 'agent_classic', 'agent_classic'], 'enemy', 'ranged', 8); this.createRoster(MadnessLevel.myRooms[8], ['experiment'], 'enemy', 'unarmed', 8); this.createRoster(MadnessLevel.myRooms[8], ['agent_classic', 'agent_classic'], 'enemy', 'ranged', 8); this.createNPC(MadnessLevel.myRooms[9], 'experiment', 'enemy', 'unarmed', 8, false, 1); this.createNPC(MadnessLevel.myRooms[9], 'agent_classic', 'enemy', 'ranged', 8, false, 3); this.createRoster(MadnessLevel.myRooms[9], ['agent_classic', 'agent_classic'], 'enemy', 'ranged', 8); this.createRoster(MadnessLevel.myRooms[9], ['patient', 'patient'], 'enemy', 'ranged', 8); this.setStartNPC(); this.createNPC(MadnessLevel.myRooms[10], 'phobos', 'enemy', 'none', 8, false, 1); MadnessLevel.myRooms[10].myCharacters[0].bossFlee = MadnessLevel.myRooms[10].myDoors[0]; this.addFleeEvent(MadnessLevel.myRooms[10].myCharacters[0], MadnessEvents.world_1_3_10FLEE); this.endStartNPC(); this.createRoster(MadnessLevel.myRooms[10], ['patient', 'patient', 'agent_classic', 'agent_classic'], 'enemy', 'ranged', 8); this.addEvent(MadnessLevel.myRooms[10].myRosters[0], MadnessEvents.world_1_3_10b); this.createRoster(MadnessLevel.myRooms[11], ['patient', 'agent_classic', 'patient'], 'enemy', 'ranged', 9); this.createRoster(MadnessLevel.myRooms[11], ['patient', 'agent_classic', 'agent_classic'], 'enemy', 'ranged', 9); this.createNPC(MadnessLevel.myRooms[12], 'experiment', 'enemy', 'unarmed', 8, false, 2); this.createRoster(MadnessLevel.myRooms[12], ['patient', 'agent_classic', 'agent_classic', 'agent_classic'], 'enemy', 'melee', 15); this.createRoster(MadnessLevel.myRooms[12], ['patient', 'agent_classic', 'agent_classic', 'agent_classic'], 'enemy', 'melee', 15); this.createRoster(MadnessLevel.myRooms[12], ['patient', 'patient', 'patient'], 'enemy', 'melee', 15); this.createRoster(MadnessLevel.myRooms[12], ['agent_classic', 'agent_classic', 'agent_classic'], 'enemy', 'ranged', 5); this.createRoster(MadnessLevel.myRooms[12], ['patient', 'agent_classic', 'agent_classic'], 'enemy', 'melee', 15); this.createRoster(MadnessLevel.myRooms[12], ['patient', 'agent_classic', 'agent_classic'], 'enemy', 'ranged', 5); this.createRoster(MadnessLevel.myRooms[12], ['patient', 'agent_classic', 'patient'], 'enemy', 'ranged', 5); this.createRoster(MadnessLevel.myRooms[12], ['agent_classic', 'agent_classic', 'agent_classic'], 'enemy', 'ranged', 5); this.createRoster(MadnessLevel.myRooms[12], ['agent_classic', 'agent_classic', 'agent_classic', 'agent_classic'], 'enemy', 'ranged', 5); this.createRoster(MadnessLevel.myRooms[12], ['agent_classic', 'agent_classic', 'agent_classic'], 'enemy', 'ranged', 5); this.createNPC(MadnessLevel.myRooms[13], 'patient', 'enemy', 'unarmed', 8, false, 2); this.makeObjective(MadnessLevel.myRooms[13].myDoors[0], 'exit', true, false); this.applyTrack('zombie2', this); }; storedv2.level1_4 = function () { this.myName = '[1.5-E] Vaults'; this.myDescription = ' Nevada itself was on the brink of collapse under the weight of the Project\'s perverted science. Time was running out, and with no way to know what terrible thing the Nexus would throw at him next, Dr.Christoff prepared for the worst.'; this.myDifficulty = 4; var v2 = new MadnessDataFile(); v2.createNew('jesus2'); MadnessRoster.playerRoster.addCharacter(v2); MadnessRoster.playerRoster.makeActive(v2); v2.giveItem(ItemGenerator.createWeapon('mp5', false), 0); v2.giveItem(ItemGenerator.createWeapon('l337sword', false), 1); v2.myWeapons[0].myClips = 2; v2.myStartup = 'startup3'; v2.createArmor('shades12'); MadnessLevel.totalRooms = 17; this.addRooms(MadnessLevel.totalRooms, MadnessGameSelect.gameMode); MadnessLevel.doorList = [2, 3, 2, 3, 2, 3, 2, 2, 2, 3, 2, 2, 2, 3, 1, 2, 2]; this.addDoors(MadnessLevel.myRooms, MadnessLevel.doorList); this.addStartPointDoor(MadnessLevel.myRooms[0].myDoors[0]); this.setDoorDir2(0, ['down', 'left']); this.setDoorDir2(1, ['right', 'down', 'left']); this.setDoorDir2(2, ['right', 'down']); this.setDoorDir2(3, ['right', 'down', 'left']); this.setDoorDir2(4, ['right', 'left']); this.setDoorDir2(5, ['right', 'down', 'left']); this.setDoorDir2(6, ['left', 'down']); this.setDoorDir2(7, ['right', 'left']); this.setDoorDir2(8, ['right', 'down']); this.setDoorDir2(9, ['right', 'down', 'left']); this.setDoorDir2(10, ['right', 'down']); this.setDoorDir2(11, ['right', 'down']); this.setDoorDir2(12, ['right', 'left']); this.setDoorDir2(13, ['right', 'down', 'left']); this.setDoorDir2(14, ['left']); this.setDoorDir2(15, ['right', 'left']); this.setDoorDir2(16, ['down', 'left']); this.connectDoors(0, 1, '---', 1, 0); this.connectDoors(1, 1, '---', 2, 0); this.connectDoors(1, 2, '---', 3, 0); this.connectDoors(3, 1, '---', 4, 1); this.connectDoors(4, 0, '---', 5, 2); this.connectDoors(5, 1, '---', 6, 0); this.connectDoors(5, 0, '---', 7, 1); this.connectDoors(7, 0, '---', 8, 0); this.connectDoors(8, 1, '---', 9, 0); this.connectDoors(9, 1, '---', 10, 0); this.connectDoors(9, 2, '---', 11, 0); this.connectDoors(11, 1, '---', 12, 1); this.connectDoors(12, 0, '---', 13, 2); this.connectDoors(13, 1, '---', 14, 0); this.connectDoors(13, 0, '---', 15, 1); this.connectDoors(15, 0, '---', 16, 1); this.addEvent(MadnessLevel.myRooms[2], MadnessEvents.world_1_4_2); this.addActivator2(2, ['jesusStand']); this.addEvent(MadnessLevel.myRooms[2].myActivators[0], MadnessEvents.world_1_4_spikes1); MadnessLevel.myRooms[2].myActivators[0].myAnimation = 'use_halo'; this.addActivator2(5, ['lockerRight']); this.addActivator2(6, ['lockerRight', 'terminal2Left']); this.addEvent(MadnessLevel.myRooms[6].myActivators[1], MadnessEvents.world_1_4_spikes2); this.addActivator2(9, ['lockerRight']); this.addActivator2(10, ['terminal2Right']); this.addEvent(MadnessLevel.myRooms[10].myActivators[0], MadnessEvents.world_1_4_spikes3); this.addActivator2(11, ['lockerLeft']); this.addActivator2(13, ['lockerRight', 'lockerRight']); this.addActivator2(14, ['lockerLeft', 'terminal2Left']); this.addEvent(MadnessLevel.myRooms[14].myActivators[1], MadnessEvents.world_1_4_spikes4); this.addActivator2(15, ['lockerRight']); this.addWeaponToLocker(5, 0, ['tangsword', '500long', 'sr3']); this.addWeaponToLocker(6, 0, ['500long', 'mp40', 'dragonsword']); this.addWeaponToLocker(9, 0, ['tmp', 'spas12']); this.addWeaponToLocker(11, 0, ['500long', 'ecannon', 'bat']); this.addWeaponToLocker(13, 0, ['500long', '500long', 'thompson']); this.addWeaponToLocker(13, 1, ['bat', '500long']); this.addWeaponToLocker(14, 0, ['500long', 'ak74']); this.addWeaponToLocker(15, 0, ['mp5', 'dragonsword']); this.addSpawner2(1, ['ground3', 'ground1']); v2 = new MadnessDataFile(); v2.createNew('zombie'); this.setSpawner(1, 0, '---', v2, 'timer', 90, false, 'zombie'); v2 = new MadnessDataFile(); v2.createNew('zombie'); this.setSpawner(1, 1, '---', v2, 'timer', 130, false, 'zombie'); this.addSpawner2(2, ['ground1', 'ground2', 'ground3']); v2 = new MadnessDataFile(); v2.createNew('zombie'); this.setSpawner(2, 0, '---', v2, 'timer', 70, true, 'zombie'); v2 = new MadnessDataFile(); v2.createNew('zombie'); this.setSpawner(2, 1, '---', v2, 'timer', 100, true, 'zombie'); v2 = new MadnessDataFile(); v2.createNew('zombie_agent_classic'); this.setSpawner(2, 2, '---', v2, 'timer', 90, true, 'zombie'); this.addSpawner2(4, ['ground3', 'ground2']); v2 = new MadnessDataFile(); v2.createNew('zombie_agent_classic'); this.setSpawner(4, 0, '---', v2, 'timer', 110, true, 'zombie'); v2 = new MadnessDataFile(); v2.createNew('zombie_agent_classic'); this.setSpawner(4, 1, '---', v2, 'timer', 130, true, 'zombie'); this.addSpawner2(9, ['zipline', 'zipline']); v2 = new MadnessDataFile(); v2.createNew('riot'); this.setSpawner(9, 0, '---', v2, 'timer', 130, true, 'enemy'); v2.giveItem(ItemGenerator.createWeapon('mp7', false), 1); v2 = new MadnessDataFile(); v2.createNew('riot'); this.setSpawner(9, 1, '---', v2, 'timer', 140, true, 'enemy'); v2.giveItem(ItemGenerator.createWeapon('hk2', false), 1); this.addSpawner2(10, ['ground3', 'ground1', 'ground3']); v2 = new MadnessDataFile(); v2.createNew('zombie'); this.setSpawner(10, 0, '---', v2, 'timer', 20, true, 'zombie'); v2 = new MadnessDataFile(); v2.createNew('zombie_agent_classic'); this.setSpawner(10, 1, '---', v2, 'timer', 90, true, 'zombie'); v2 = new MadnessDataFile(); v2.createNew('zombie_agent_classic'); this.setSpawner(10, 2, '---', v2, 'timer', 130, true, 'zombie'); this.addSpawner2(14, ['windowRight', 'zipline', 'zipline', 'zipline', 'zipline']); v2.giveItem(ItemGenerator.createWeapon('mp7', false), 1); v2 = new MadnessDataFile(); v2.createNew('riot'); this.setSpawner(14, 0, '---', v2, 'timer', 300, true, 'enemy'); v2 = new MadnessDataFile(); v2.createNew('riot'); this.setSpawner(14, 1, '---', v2, 'timer', 140, true, 'enemy'); v2.giveItem(ItemGenerator.createWeapon('tmp', false), 1); v2 = new MadnessDataFile(); v2.createNew('riot'); this.setSpawner(14, 2, '---', v2, 'timer', 155, true, 'enemy'); v2.giveItem(ItemGenerator.createWeapon('mp7', false), 1); v2 = new MadnessDataFile(); v2.createNew('riot'); this.setSpawner(14, 3, '---', v2, 'timer', 390, true, 'enemy'); v2.giveItem(ItemGenerator.createWeapon('hk2', false), 1); v2 = new MadnessDataFile(); v2.createNew('riot'); this.setSpawner(14, 4, '---', v2, 'timer', 400, true, 'enemy'); v2.giveItem(ItemGenerator.createWeapon('mp5k', false), 1); this.addSpawner2(15, ['ground3', 'ground1', 'ground3', 'ground2', 'ground3', 'ground1']); v2 = new MadnessDataFile(); v2.createNew('zombie_agent_classic'); this.setSpawner(15, 0, '---', v2, 'timer', 30, true, 'zombie'); v2 = new MadnessDataFile(); v2.createNew('zombie'); this.setSpawner(15, 1, '---', v2, 'timer', 60, true, 'zombie'); v2 = new MadnessDataFile(); v2.createNew('zombie_agent_classic'); this.setSpawner(15, 2, '---', v2, 'timer', 130, true, 'zombie'); v2 = new MadnessDataFile(); v2.createNew('zombie_agent_classic'); this.setSpawner(15, 3, '---', v2, 'timer', 240, true, 'zombie'); v2 = new MadnessDataFile(); v2.createNew('zombie'); this.setSpawner(15, 4, '---', v2, 'timer', 390, true, 'zombie'); v2 = new MadnessDataFile(); v2.createNew('zombie_agent_classic'); this.setSpawner(15, 5, '---', v2, 'timer', 420, true, 'zombie'); this.addObstacle2(1, ['spikes1']); this.addObstacle2(5, ['spikes2']); this.addObstacle2(9, ['spikes1']); this.addObstacle2(13, ['spikes2']); this.addObstacle(2, 'box2b'); this.addObstacle(5, 'box2b'); this.addObstacle(5, 'box1b'); this.addObstacle(10, 'box2'); this.addObstacle(2, 'empty1'); this.addObstacle(4, 'empty1'); this.addObstacle(5, 'empty1'); this.addObstacle(6, 'empty1'); this.addObstacle(7, 'empty0'); this.addObstacle(7, 'empty1'); this.addObstacle(8, 'empty0'); this.addObstacle(9, 'empty4'); this.addObstacle(9, 'empty4'); this.addObstacle(10, 'empty1'); this.addObstacle(10, 'empty4'); this.addObstacle(10, 'empty1'); this.addObstacle(13, 'empty1'); this.addObstacle(13, 'empty0'); this.addObstacle(14, 'empty4'); this.addObstacle(14, 'empty4'); this.addObstacle(15, 'empty1'); this.addObstacle(15, 'empty4'); this.createNPC(MadnessLevel.myRooms[0], 'agent_classic', 'enemy', 'ranged', 5, true, 2); this.setStartNPC(); this.createNPC(MadnessLevel.myRooms[1], 'agent_classic', 'enemy', 'ranged', 5, true, 3); this.endStartNPC(); this.createNPC(MadnessLevel.myRooms[2], 'agent_classic', 'enemy', 'ranged', 5, false, 4); this.createNPC(MadnessLevel.myRooms[3], 'patient', 'enemy', 'ranged', 6, false, 4); this.createRoster(MadnessLevel.myRooms[3], ['patient', 'patient'], 'enemy', 'ranged', 10); this.createNPC(MadnessLevel.myRooms[4], 'patient', 'enemy', 'ranged', 8, false, 2); this.createRoster(MadnessLevel.myRooms[4], ['patient', 'patient'], 'enemy', 'ranged', 14); this.createRoster(MadnessLevel.myRooms[4], ['agent_classic', 'agent_classic'], 'enemy', 'ranged', 10); this.setStartNPC(); this.createNPC(MadnessLevel.myRooms[5], 'agent_classic', 'enemy', 'ranged', 5, false, 1); this.createNPC(MadnessLevel.myRooms[5], 'riot', 'enemy', 'ranged', 5, false, 2); this.createNPC(MadnessLevel.myRooms[5], 'patient', 'enemy', 'ranged', 5, false, 1); this.endStartNPC(); this.createNPC(MadnessLevel.myRooms[6], 'patient', 'enemy', 'ranged', 8, false, 2); this.createNPC(MadnessLevel.myRooms[6], 'agent_classic', 'enemy', 'ranged', 8, false, 2); this.createRoster(MadnessLevel.myRooms[6], ['agent_classic', 'agent_classic', 'agent_classic'], 'enemy', 'ranged', 4); this.createRoster(MadnessLevel.myRooms[6], ['agent_classic', 'agent_classic', 'agent_classic'], 'enemy', 'ranged', 4); this.createRoster(MadnessLevel.myRooms[6], ['patient', 'riot', 'patient'], 'enemy', 'ranged', 9); this.createRoster(MadnessLevel.myRooms[6], ['zombie_riot', 'zombie', 'zombie_agent_classic'], 'zombie', 'zombie', 10); this.createNPC(MadnessLevel.myRooms[7], 'experiment', 'enemy', 'unarmed', 8, false, 1); this.createNPC(MadnessLevel.myRooms[7], 'patient', 'enemy', 'ranged', 8, false, 3); this.createRoster(MadnessLevel.myRooms[7], ['patient', 'riot', 'riot'], 'enemy', 'ranged', 9); this.createRoster(MadnessLevel.myRooms[8], ['zombie_riot', 'zombie', 'zombie'], 'zombie', 'zombie', 4); this.createRoster(MadnessLevel.myRooms[8], ['zombie', 'zombie_riot', 'zombie_agent_classic'], 'zombie', 'zombie', 10); this.createRoster(MadnessLevel.myRooms[8], ['zombie_agent_classic', 'zombie_agent_classic'], 'zombie', 'zombie', 10); this.createRoster(MadnessLevel.myRooms[8], ['patient', 'riot', 'riot'], 'enemy', 'ranged', 9); this.setStartNPC(); this.createNPC(MadnessLevel.myRooms[9], 'zombie_agent_classic', 'zombie', 'zombie', 5, false, 1); this.createNPC(MadnessLevel.myRooms[9], 'zombie_riot', 'zombie', 'zombie', 5, false, 2); this.endStartNPC(); this.createNPC(MadnessLevel.myRooms[10], 'zombie_riot', 'zombie', 'zombie', 5, false, 2); this.createRoster(MadnessLevel.myRooms[10], ['zombie', 'zombie_riot', 'zombie'], 'zombie', 'zombie', 4); this.createRoster(MadnessLevel.myRooms[10], ['zombie', 'zombie_riot', 'zombie_agent_classic'], 'zombie', 'zombie', 10); this.createRoster(MadnessLevel.myRooms[10], ['riot', 'riot'], 'enemy', 'ranged', 9); this.createNPC(MadnessLevel.myRooms[11], 'patient', 'enemy', 'ranged', 8, false, 2); this.createNPC(MadnessLevel.myRooms[11], 'riot', 'enemy', 'ranged', 12, false, 2); this.createRoster(MadnessLevel.myRooms[11], ['agent_classic', 'agent_classic', 'agent_classic'], 'enemy', 'ranged', 4); this.createRoster(MadnessLevel.myRooms[11], ['experiment', 'patient'], 'enemy', 'unarmed', 9); this.createRoster(MadnessLevel.myRooms[11], ['zombie_agent_classic', 'zombie_agent_classic'], 'zombie', 'zombie', 10); this.createNPC(MadnessLevel.myRooms[12], 'patient', 'enemy', 'ranged', 12, false, 4); this.createRoster(MadnessLevel.myRooms[12], ['experiment', 'patient'], 'enemy', 'unarmed', 9); this.createRoster(MadnessLevel.myRooms[12], ['zombie', 'zombie_agent_classic', 'zombie_agent_classic'], 'zombie', 'zombie', 10); this.createRoster(MadnessLevel.myRooms[12], ['zombie_agent_classic', 'zombie_agent_classic'], 'zombie', 'zombie', 10); this.createRoster(MadnessLevel.myRooms[12], ['zombie_riot', 'zombie', 'zombie'], 'zombie', 'zombie', 10); this.setStartNPC(); this.createNPC(MadnessLevel.myRooms[13], 'zombie_agent_classic', 'zombie', 'zombie', 5, false, 4); this.endStartNPC(); this.createNPC(MadnessLevel.myRooms[14], 'agent_classic', 'enemy', 'ranged', 15, false, 3); this.createRoster(MadnessLevel.myRooms[14], ['zombie_agent_classic', 'zombie_agent_classic'], 'zombie', 'zombie', 10); this.createRoster(MadnessLevel.myRooms[14], ['zombie_riot', 'zombie', 'zombie'], 'zombie', 'zombie', 10); this.createRoster(MadnessLevel.myRooms[14], ['riot', 'riot'], 'enemy', 'ranged', 9); this.createNPC(MadnessLevel.myRooms[15], 'riot', 'enemy', 'ranged', 7, false, 2); this.createRoster(MadnessLevel.myRooms[15], ['zombie_scientist', 'zombie_riot', 'zombie_scientist'], 'zombie', 'zombie', 10); this.createRoster(MadnessLevel.myRooms[15], ['zombie_agent_classic', 'zombie_agent_classic'], 'zombie', 'zombie', 8); this.createRoster(MadnessLevel.myRooms[15], ['zombie', 'zombie_agent_classic'], 'zombie', 'zombie', 10); this.createRoster(MadnessLevel.myRooms[15], ['zombie_agent_classic', 'zombie_agent_classic'], 'zombie', 'zombie', 8); this.createRoster(MadnessLevel.myRooms[15], ['zombie_scientist', 'zombie_riot', 'zombie_scientist'], 'zombie', 'zombie', 10); this.createRoster(MadnessLevel.myRooms[15], ['zombie', 'zombie', 'zombie_agent_classic'], 'zombie', 'zombie', 10); this.createRoster(MadnessLevel.myRooms[15], ['zombie_agent_classic', 'zombie_riot', 'zombie_agent_classic'], 'zombie', 'zombie', 10); this.createNPC(MadnessLevel.myRooms[16], 'zombie_agent_classic', 'zombie', 'zombie', 6, false, 3); this.makeObjective(MadnessLevel.myRooms[16].myDoors[0], 'exit', true, false); this.applyTrack('zombie1', this); }; goto 92407; label 92402: goto 106684; label 92407: storedv2.level1_5 = function () { this.myName = '[1.5-F] Solarium'; this.myDescription = ' The bulk of the tower now miles beneath his feet, Christoff set his sights upon his prize: the very artifact powering Project Nexus itself. With it in his posession, he would finally strip the program and its insidious masters of all power. God help them!'; this.myDifficulty = 5; var v2 = new MadnessDataFile(); v2.createNew('jesus2'); MadnessRoster.playerRoster.addCharacter(v2); MadnessRoster.playerRoster.makeActive(v2); v2.giveItem(ItemGenerator.createWeapon('500long', false), 0); v2.giveItem(ItemGenerator.createWeapon('ironsword', false), 1); v2.myWeapons[0].myClips = 3; v2.myStartup = 'startup3'; v2.createArmor('shades12'); v2.createArmor('halo'); v2.myDodge = 'jesus'; v2.myMagic = 'jesus1'; MadnessLevel.totalRooms = 19; this.addRooms(MadnessLevel.totalRooms, MadnessGameSelect.gameMode); MadnessLevel.doorList = [2, 3, 4, 2, 2, 2, 3, 3, 3, 2, 3, 2, 3, 4, 3, 2, 2, 2, 2]; this.addDoors(MadnessLevel.myRooms, MadnessLevel.doorList); this.addStartPointDoor(MadnessLevel.myRooms[0].myDoors[0]); this.setDoorDir2(0, ['down', 'left']); this.setDoorDir2(1, ['right', 'left', 'down']); this.setDoorDir2(2, ['right', 'down', 'down', 'left']); this.lockDoor(2, 3); this.disableDoorSpawn(2, 3); this.setDoorDir2(3, ['right', 'left']); this.setDoorDir2(4, ['right', 'left']); this.setDoorDir2(5, ['right', 'left']); this.setDoorDir2(6, ['right', 'left', 'down']); this.setDoorDir2(7, ['down', 'down', 'left']); this.setDoorDir2(8, ['right', 'left', 'down']); this.setDoorDir2(9, ['right', 'left']); this.setDoorDir2(10, ['down', 'left', 'down']); this.setDoorDir2(11, ['right', 'left']); this.setDoorDir2(12, ['right', 'down', 'left']); this.setDoorDir2(13, ['down', 'right', 'down', 'left']); this.setDoorDir2(14, ['right', 'down', 'down']); this.setDoorDir2(15, ['right', 'left']); this.setDoorDir2(16, ['right', 'left']); this.setDoorDir2(17, ['right', 'left']); this.setDoorDir2(18, ['left', 'right']); this.connectDoors(0, 1, '---', 1, 0); this.connectDoors(1, 1, '---', 2, 0); this.connectDoors(2, 1, '---', 3, 0); this.connectDoors(2, 2, '---', 4, 0); this.connectDoors(2, 3, '---', 5, 0); this.connectDoors(5, 1, '---', 6, 0); this.connectDoors(6, 1, '---', 7, 0); this.connectDoors(7, 1, '---', 8, 1); this.connectDoors(8, 0, '---', 9, 1); this.connectDoors(9, 0, '---', 10, 1); this.connectDoors(10, 0, '---', 11, 0); this.connectDoors(11, 1, '---', 12, 0); this.connectDoors(12, 1, '---', 13, 0); this.connectDoors(12, 2, '---', 14, 0); this.connectDoors(14, 1, '---', 15, 0); this.connectDoors(15, 1, '---', 16, 1); this.connectDoors(16, 0, '---', 17, 1); this.connectDoors(17, 0, '---', 18, 0); this.addEvent(MadnessLevel.myRooms[0], MadnessEvents.world_1_5_0); this.addEvent(MadnessLevel.myRooms[1], MadnessEvents.world_1_5_1); this.addEvent(MadnessLevel.myRooms[2], MadnessEvents.world_1_5_2); this.addEvent(MadnessLevel.myRooms[18], MadnessEvents.world_1_5_18); this.addActivator2(3, ['lockerRight', 'lockerRight']); this.addActivator2(4, ['lockerRight', 'terminalRight']); this.addEvent(MadnessLevel.myRooms[4].myActivators[1], MadnessEvents.world_1_5_4); this.addActivator2(5, ['lockerRight', 'lockerRight']); this.addActivator2(6, ['lockerLeft']); this.addActivator2(8, ['lockerRight']); this.addActivator2(9, ['terminalRight']); this.connectActivator(9, 0, '---', MadnessLevel.myRooms[9].myDoors[0], 'unlock'); this.addActivator2(11, ['lockerLeft']); this.addActivator2(12, ['lockerRight', 'terminalRight']); this.connectActivator(12, 1, '---', MadnessLevel.myRooms[12].myDoors[2], 'unlock'); this.addActivator2(13, ['terminal2Right']); this.addEvent(MadnessLevel.myRooms[13].myActivators[0], MadnessEvents.world_1_5_spikes1); this.addActivator2(14, ['lockerLeft']); this.addActivator2(15, ['lockerLeft']); this.addActivator2(16, ['lockerLeft']); this.addActivator2(17, ['lockerLeft']); this.addWeaponToLocker(3, 0, ['ironknife', '97k', 'fiveseven']); this.addWeaponToLocker(3, 1, ['fiveseven', 'l337sword']); this.addWeaponToLocker(4, 0, ['browning', 'pm9']); this.addWeaponToLocker(5, 0, ['sr3', 'ironknife']); this.addWeaponToLocker(5, 1, ['500long']); this.addWeaponToLocker(6, 0, ['l337sword', 'fnfal', 'oa93']); this.addWeaponToLocker(8, 0, ['uzi', 'crowbar']); this.addWeaponToLocker(11, 0, ['auto9', '500long']); this.addWeaponToLocker(12, 0, ['ironknife', '500long']); this.addWeaponToLocker(14, 0, ['baton', 'aug']); this.addWeaponToLocker(15, 0, ['500long']); this.addWeaponToLocker(16, 0, ['pm9']); this.addWeaponToLocker(17, 0, ['m16', '97k', '500long']); this.addSpawner2(1, ['ground3', 'ground1', 'ground2', 'ground1']); v2 = new MadnessDataFile(); v2.createNew('zombie_agent_classic'); this.setSpawner(1, 0, '---', v2, 'open', 20, false, 'zombie'); v2 = new MadnessDataFile(); v2.createNew('zombie_agent_classic'); this.setSpawner(1, 1, '---', v2, 'timer', 80, false, 'zombie'); v2 = new MadnessDataFile(); v2.createNew('zombie_riot'); this.setSpawner(1, 2, '---', v2, 'timer', 40, false, 'zombie'); v2 = new MadnessDataFile(); v2.createNew('zombie_riot'); this.setSpawner(1, 3, '---', v2, 'timer', 110, false, 'zombie'); this.addSpawner2(2, ['ground3', 'ground1']); v2 = new MadnessDataFile(); v2.createNew('zombie_agent_classic'); this.setSpawner(2, 0, '---', v2, 'timer', 60, false, 'enemy'); v2 = new MadnessDataFile(); v2.createNew('zombie_riot'); this.setSpawner(2, 1, '---', v2, 'timer', 70, false, 'enemy'); this.addSpawner2(12, ['ground3', 'ground1', 'ground2', 'ground1']); v2 = new MadnessDataFile(); v2.createNew('zombie_agent_classic'); this.setSpawner(12, 0, '---', v2, 'timer', 20, false, 'enemy'); v2 = new MadnessDataFile(); v2.createNew('zombie_scientist'); this.setSpawner(12, 1, '---', v2, 'timer', 30, false, 'enemy'); v2 = new MadnessDataFile(); v2.createNew('zombie_riot'); this.setSpawner(12, 2, '---', v2, 'timer', 90, false, 'enemy'); v2 = new MadnessDataFile(); v2.createNew('zombie_agent_classic'); this.setSpawner(12, 3, '---', v2, 'timer', 103, false, 'enemy'); this.addObstacle2(12, ['spikes1']); this.addObstacle(6, 'box2b'); this.addObstacle(8, 'box2b'); this.addObstacle(8, 'box1b'); this.addObstacle(0, 'empty0'); this.addObstacle(1, 'empty0'); this.addObstacle(2, 'empty4'); this.addObstacle(2, 'empty4'); this.addObstacle(3, 'empty1'); this.addObstacle(3, 'empty1'); this.addObstacle(4, 'empty0'); this.addObstacle(5, 'empty0'); this.addObstacle(5, 'empty1'); this.addObstacle(6, 'empty1'); this.addObstacle(6, 'empty1'); this.addObstacle(7, 'empty0'); this.addObstacle(8, 'empty0'); this.addObstacle(8, 'empty1'); this.addObstacle(8, 'empty1'); this.addObstacle(9, 'empty3'); this.addObstacle(10, 'empty4'); this.addObstacle(11, 'empty1'); this.addObstacle(13, 'empty0'); this.addObstacle(14, 'empty1'); this.addObstacle(16, 'empty0'); this.addObstacle(16, 'empty4'); this.addObstacle(17, 'empty4'); this.createNPC(MadnessLevel.myRooms[1], 'riot', 'enemy', 'ranged', 10, true, 2); this.createRoster(MadnessLevel.myRooms[1], ['zombie_riot', 'zombie_agent_classic'], 'zombie', 'zombie', 10); this.createNPC(MadnessLevel.myRooms[2], 'riot', 'enemy', 'ranged', 10, false, 1); this.createNPC(MadnessLevel.myRooms[2], 'agent_classic', 'enemy', 'ranged', 10, false, 2); this.createRoster(MadnessLevel.myRooms[2], ['zombie_riot', 'zombie_agent_classic'], 'enemy', 'zombie', 10); this.createNPC(MadnessLevel.myRooms[3], 'agent_classic', 'enemy', 'ranged', 10, false, 5); this.createNPC(MadnessLevel.myRooms[5], 'experiment', 'enemy', 'unarmed', 10, false, 1); this.createRoster(MadnessLevel.myRooms[5], ['patient', 'patient', 'patient'], 'enemy', 'ranged', 12); this.createNPC(MadnessLevel.myRooms[6], 'abom', 'enemy', 'unarmed', 10, false, 4); this.createNPC(MadnessLevel.myRooms[6], 'agent_classic', 'enemy', 'ranged', 12, false, 4); this.createRoster(MadnessLevel.myRooms[6], ['abom', 'abom', 'abom', 'abom', 'abom'], 'enemy', 'none', 12); this.createRoster(MadnessLevel.myRooms[6], ['abom', 'patient', 'abom', 'abom', 'abom'], 'enemy', 'none', 12); this.createRoster(MadnessLevel.myRooms[6], ['abom', 'abom', 'riot', 'abom', 'abom'], 'enemy', 'none', 12); this.createNPC(MadnessLevel.myRooms[8], 'agent_classic', 'enemy', 'ranged', 12, false, 4); this.createRoster(MadnessLevel.myRooms[8], ['agent_classic', 'agent_classic', 'agent_classic', 'agent_classic', 'agent_classic'], 'enemy', 'melee', 18); this.createRoster(MadnessLevel.myRooms[8], ['agent_classic', 'agent_classic', 'agent_classic', 'agent_classic', 'agent_classic'], 'enemy', 'ranged', 10); this.createRoster(MadnessLevel.myRooms[8], ['agent_classic', 'agent_classic', 'agent_classic', 'agent_classic', 'agent_classic'], 'enemy', 'melee', 18); this.createRoster(MadnessLevel.myRooms[8], ['agent_classic', 'agent_classic', 'agent_classic', 'agent_classic', 'agent_classic'], 'enemy', 'ranged', 8); this.createRoster(MadnessLevel.myRooms[8], ['agent_classic', 'agent_classic', 'agent_classic', 'agent_classic', 'agent_classic'], 'enemy', 'ranged', 10); this.createRoster(MadnessLevel.myRooms[8], ['agent_classic', 'agent_classic', 'agent_classic', 'agent_classic', 'agent_classic'], 'enemy', 'melee', 18); this.createRoster(MadnessLevel.myRooms[8], ['agent_classic', 'agent_classic', 'agent_classic', 'agent_classic', 'agent_classic'], 'enemy', 'ranged', 12); this.createNPC(MadnessLevel.myRooms[9], 'riot', 'enemy', 'ranged', 10, false, 2); this.createNPC(MadnessLevel.myRooms[9], 'zombie_riot', 'enemy', 'zombie', 10, false, 2); this.createNPC(MadnessLevel.myRooms[10], 'riot', 'enemy', 'ranged', 10, false, 4); this.createRoster(MadnessLevel.myRooms[10], ['riot', 'riot', 'patient', 'patient'], 'enemy', 'ranged', 8); this.createRoster(MadnessLevel.myRooms[10], ['riot', 'agent_classic', 'patient', 'patient'], 'enemy', 'ranged', 8); this.createRoster(MadnessLevel.myRooms[10], ['riot', 'agent_classic', 'patient', 'patient'], 'enemy', 'ranged', 8); this.createRoster(MadnessLevel.myRooms[10], ['agent_classic', 'riot', 'patient', 'agent_classic'], 'enemy', 'ranged', 8); this.createNPC(MadnessLevel.myRooms[11], 'experiment', 'enemy', 'unarmed', 10, false, 2); this.createNPC(MadnessLevel.myRooms[14], 'zombie_riot', 'enemy', 'zombie', 10, false, 4); this.createRoster(MadnessLevel.myRooms[14], ['abom', 'abom', 'abom', 'patient'], 'enemy', 'unarmed', 8); this.createRoster(MadnessLevel.myRooms[14], ['abom', 'riot', 'abom', 'abom'], 'enemy', 'none', 8); this.createRoster(MadnessLevel.myRooms[14], ['abom', 'zombie_scientist', 'abom', 'abom'], 'enemy', 'none', 8); this.createRoster(MadnessLevel.myRooms[14], ['abom', 'abom', 'abom', 'abom'], 'enemy', 'none', 8); this.createRoster(MadnessLevel.myRooms[16], ['experiment', 'experiment'], 'enemy', 'none', 8); this.setStartNPC(); this.createNPC(MadnessLevel.myRooms[18], 'phobos', 'enemy', 'none', 15, false, 1); MadnessLevel.myRooms[18].myCharacters[0].giveItem(ItemGenerator.createWeapon('tmp', false), 1); this.addEvent(MadnessLevel.myRooms[18].myCharacters[0], MadnessEvents.world_1_5_18_END); this.endStartNPC(); this.createNPC(MadnessLevel.myRooms[18], 'riot', 'enemy', 'none', 10, false, 2); MadnessLevel.myRooms[18].myCharacters[2].standStill = true; MadnessLevel.myRooms[18].myCharacters[1].standStill = MadnessLevel.myRooms[18].myCharacters[2].standStill; MadnessLevel.myRooms[18].myCharacters[0].standStill = MadnessLevel.myRooms[18].myCharacters[2].standStill; MadnessLevel.myRooms[18].myCharacters[1].loggedX = 600; MadnessLevel.myRooms[18].myCharacters[2].loggedX = 650; MadnessLevel.myRooms[18].myCharacters[1].loggedY = 600; MadnessLevel.myRooms[18].myCharacters[2].loggedY = 750; this.makeObjective(MadnessLevel.myRooms[18], 'clear', true, false); this.myCutsceneEnd = 'cutscene_world1_end'; this.applyTrack('zombie3', this); this.applyTrack('boss1', MadnessLevel.myRooms[18]); }; storedv2.addRooms = function (inRooms, inMode) { var v3 = 0; while (v3 < inRooms) { var v2 = new Object(); MadnessLevel.myRooms.push(v2); v2.myNumber = v3; v2.myDoors = new Array(); v2.myActivators = new Array(); v2.myCharacters = new Array(); v2.myRosters = new Array(); v2.mySpawners = new Array(); v2.myEvents = new Array(); v2.myItems = new Array(); v2.myObstacles = new Array(); if (inMode == 'story') { v2.myType = 'room' + this.myWorld + '_' + this.myLevel + '_' + v3; } if (inMode == 'arena') { if (MadnessGameSelect.subGameMode == 'standard') { v2.myType = 'arena1'; } if (MadnessGameSelect.subGameMode == 'zombie') { v2.myType = 'arena2'; } } v2.myRosters = new Array(); v2.bmpBodies = undefined; ++v3; } }; storedv2.addDoors = function (inRooms, inDoors) { var v3 = 0; while (v3 < inRooms.length) { var v4 = 0; while (v4 < inDoors[v3]) { var v2 = new Object(); inRooms[v3].myDoors.push(v2); v2.myConnection = undefined; v2.mySprite = undefined; v2.amStartPoint = false; v2.myParent = inRooms[v3]; v2.myType = this.defaultDoor; v2.myDir = ''; v2.amLocked = false; v2.myCharacters = new Array(); v2.noSpawn = false; ++v4; } ++v3; } }; storedv2.connectDoors = function (inRoom1, inDoor1, UNUSED, inRoom2, inDoor2) { MadnessLevel.myRooms[inRoom1].myDoors[inDoor1].myConnection = MadnessLevel.myRooms[inRoom2].myDoors[inDoor2]; MadnessLevel.myRooms[inRoom2].myDoors[inDoor2].myConnection = MadnessLevel.myRooms[inRoom1].myDoors[inDoor1]; }; storedv2.setDoorDir = function (inRoom, inDoor, inDir) { MadnessLevel.myRooms[inRoom].myDoors[inDoor].myDir = inDir; }; storedv2.setDoorDir2 = function (inRoom, inDoorArray) { var v2 = 0; while (v2 < inDoorArray.length) { this.setDoorDir(inRoom, v2, inDoorArray[v2]); ++v2; } }; storedv2.setDoorType = function (inRoom, inDoor, inType) { MadnessLevel.myRooms[inRoom].myDoors[inDoor].myType = inType; }; storedv2.disableDoorSpawn = function (inRoom, inDoor) { MadnessLevel.myRooms[inRoom].myDoors[inDoor].noSpawn = true; }; storedv2.disableClose = function (inRoom, inDoor) { MadnessLevel.myRooms[inRoom].myDoors[inDoor].noClose = true; }; storedv2.lockDoor = function (inRoom, inDoor) { MadnessLevel.myRooms[inRoom].myDoors[inDoor].amLocked = true; MadnessLevel.myRooms[inRoom].myDoors[inDoor].mySprite.amLocked = true; MadnessLevel.myRooms[inRoom].myDoors[inDoor].myConnection.amLocked = true; MadnessLevel.myRooms[inRoom].myDoors[inDoor].myConnection.mySprite.amLocked = true; }; storedv2.unlockDoor = function (inRoom, inDoor) { MadnessLevel.myRooms[inRoom].myDoors[inDoor].amLocked = false; MadnessLevel.myRooms[inRoom].myDoors[inDoor].mySprite.amLocked = false; MadnessLevel.myRooms[inRoom].myDoors[inDoor].myConnection.amLocked = false; MadnessLevel.myRooms[inRoom].myDoors[inDoor].myConnection.mySprite.amLocked = false; }; storedv2.addStartPoint = function (inRoom) { inRoom.startPoint = new Object(); inRoom.startPoint.mySprite = undefined; inRoom.startPoint.amStartPoint = true; inRoom.startPoint.myParent = inRoom; inRoom.startPoint.myDir = 'right'; MadnessLevel.startPoint = inRoom.startPoint; }; storedv2.addStartPointDoor = function (inDoor) { MadnessLevel.startPoint = inDoor; }; storedv2.addSpawner = function (inRoom, myType) { var v1 = new Object(); MadnessLevel.myRooms[inRoom].mySpawners.push(v1); v1.myUnit = undefined; v1.myTrigger = undefined; v1.myTimer = undefined; v1.mySprite = undefined; v1.myFaction = 'enemy'; v1.amActive = false; v1.myParent = inRoom; v1.myType = myType; v1.myEvents = new Array(); }; storedv2.addSpawner2 = function (inRoom, inSpawnArray) { var v2 = 0; while (v2 < inSpawnArray.length) { this.addSpawner(inRoom, inSpawnArray[v2]); ++v2; } }; storedv2.setSpawner = function (inRoom, inSpawner, UNUSED, inUnit, inTrigger, inTimer, inActive, inFaction) { MadnessLevel.myRooms[inRoom].mySpawners[inSpawner].myUnit = inUnit; MadnessLevel.myRooms[inRoom].mySpawners[inSpawner].myTrigger = inTrigger; MadnessLevel.myRooms[inRoom].mySpawners[inSpawner].myTimer = inTimer; MadnessLevel.myRooms[inRoom].mySpawners[inSpawner].amActive = inActive; MadnessLevel.myRooms[inRoom].mySpawners[inSpawner].myFaction = inFaction; }; storedv2.addActivator = function (inRoom, myType) { var v1 = new Object(); MadnessLevel.myRooms[inRoom].myActivators.push(v1); v1.myTarget = undefined; v1.mySprite = undefined; v1.myParent = inRoom; v1.myType = myType; v1.myEvents = new Array(); v1.myItems = new Array(); v1.myAnimation = 'use'; }; storedv2.addActivator2 = function (inRoom, inActArray) { var v2 = 0; while (v2 < inActArray.length) { this.addActivator(inRoom, inActArray[v2]); ++v2; } }; storedv2.connectActivator = function (inRoom, inActivator, UNUSED, inTarget, inAction) { var v1 = new Object(); MadnessLevel.myRooms[inRoom].myActivators[inActivator].myEvents.push(v1); v1.myType = inAction; v1.myTarget = inTarget; if (inAction == 'unlock') { inTarget.amLocked = true; inTarget.myConnection.amLocked = true; } if (inAction == 'treasure') { } }; storedv2.addEvent = function (inTarget, inEvent) { var v1 = new Object(); inTarget.myEvents.push(v1); v1.myType = 'function'; v1.myAction = inEvent; }; storedv2.addFleeEvent = function (inTarget, inEvent) { var v1 = new Object(); inTarget.myEvents.push(v1); v1.myType = 'flee'; v1.myAction = inEvent; }; storedv2.addObstacle = function (inRoom, myType) { var v1 = new Object(); MadnessLevel.myRooms[inRoom].myObstacles.push(v1); v1.mySprite = undefined; v1.myParent = inRoom; v1.myType = myType; v1.myEvents = new Array(); }; storedv2.addObstacle2 = function (inRoom, inObstArray) { var v2 = 0; while (v2 < inObstArray.length) { this.addObstacle(inRoom, inObstArray[v2]); ++v2; } }; storedv2.makeObjective = function (inTarget, inType, inRequired, inHidden) { if (inType != 'survive') { MadnessLevel.myObjectives.push(inTarget); } inTarget.myObjective = inType; inTarget.objectiveRequired = inRequired; inTarget.objectiveHidden = inHidden; }; storedv2.linkObjective = function (inThing, inObjective, inReaction) {}; storedv1.completeObjectiveCheck = function (inTarget, inType) { var v4 = false; var v3 = 0; while (v3 < MadnessLevel.myObjectives.length) { if (inTarget == MadnessLevel.myObjectives[v3] && inTarget != undefined) { if (inType == inTarget.myObjective && inType != undefined) { if (inType == 'rescue') { } if (inType == 'clear') { } if (inType == 'use') { } if (inType == 'kill') { } if (inType == 'exit') { } if (inType == 'enter') { } if (inType == 'survive') { } inTarget.myObjective = undefined; MadnessLevel.myObjectives.splice(v3, 1); v4 = true; break; } else { if (inType == 'kill' && (inTarget.myObjective == 'rescue' || inTarget.myObjective == 'survive') && !MadnessLevel.levelFailed) { MadnessLevel.levelFailed = true; MadnessPopup.closeAll(); MadnessPopup.addPopup('lines', 'MISSION FAILED', null, 440, 170, undefined, 90, MadWorld.thisWorld.leaveRoomFunction, null); } } } ++v3; } v3 = 0; while (v3 < MadnessLevel.myObjectives.length) { if (MadnessLevel.myObjectives[v3].objectiveRequired) { break; } ++v3; } if (v4 && (v3 == MadnessLevel.myObjectives.length || MadnessLevel.myObjectives.length == 0)) { MadnessLevel.levelVictory = true; if (MadnessLevel.currentLevel.myWorld == 0 && MadnessLevel.currentLevel.myLevel == 7) { if (MadnessGameSelect.myDifficulty == 'easy') { MadnessMedals.unlockMedal('easy0'); } if (MadnessGameSelect.myDifficulty == 'normal') { MadnessMedals.unlockMedal('normal0'); } if (MadnessGameSelect.myDifficulty == 'hard') { MadnessMedals.unlockMedal('hard0'); if (MadnessRoster.playerRoster.teamLeader.myCharacter != 'hank') { MadnessMedals.unlockMedal('hard0b'); } } } } }; storedv2.createNPC = function (inRoom, inChar, inFaction, inLoadout, inLevel, inSurprised, inTotalGuys) { var v3 = 0; while (v3 < inTotalGuys) { var v2 = new MadnessDataFile(); v2.createNew(inChar); ItemGenerator.equipLoadout(v2, inLoadout, inLevel); v2.amSurprised = inSurprised; v2.startupPoint = this.startPointNPC; if (SwainMath.randomNumber(0, this.startupChance) == 0) { v2.myStartup = this.currentStartup; } v2.myFaction = inFaction; v2.myEvents = new Array(); this.addNPC(inRoom, v2, inSurprised); ++v3; } }; storedv2.addNPC = function (inRoom, inChar, inSurprised) { if (inSurprised) { inChar.myWeapons[1] = undefined; inChar.myWeapon = 1; } inRoom.myCharacters.push(inChar); }; storedv1.removeNPC = function (inRoom, inChar) { var v1 = 0; while (v1 < inRoom.myCharacters.length) { if (inChar == inRoom.myCharacters[v1]) { inRoom.myCharacters.splice(v1, 1); break; } ++v1; } }; storedv2.createRoster = function (inRoom, inCreateArray, inFaction, inLoadout, inLevel) { var v3 = new MadnessRoster(); v3.init(inFaction); var v2 = 0; while (v2 < inCreateArray.length) { var v1 = new MadnessDataFile(); v1.createNew(inCreateArray[v2]); v3.addCharacter(v1); v3.makeActive(v1); ItemGenerator.equipLoadout(v1, inLoadout, inLevel); v1.amSurprised = false; ++v2; } inRoom.myRosters.push(v3); }; storedv1.removeRoster = function (inRoom, inRoster) { var v1 = 0; while (v1 < inRoom.myRosters.length) { if (inRoster == inRoom.myRosters[v1]) { inRoom.myRosters.splice(v1, 1); break; } ++v1; } }; storedv2.addItem = function (inTarget, inItem) { inItem.myColor = SwainMath.randomNumber(1, 2); inTarget.myItems.push(inItem); }; storedv2.addWeaponToLocker = function (inRoom, inLocker, inWeapons) { var v2 = 0; while (v2 < inWeapons.length) { this.addItem(MadnessLevel.myRooms[inRoom].myActivators[inLocker], ItemGenerator.createWeapon(inWeapons[v2], false)); ++v2; } }; storedv2.setStartup = function (inStart, inChance) { this.currentStartup = inStart; this.startupChance = inChance; }; storedv2.resetStartup = function () { this.currentStartup = undefined; }; storedv2.setStartNPC = function () { this.startPointNPC = true; }; storedv2.endStartNPC = function () { this.startPointNPC = false; }; storedv2.applyTrack = function (inTrack, inDestination) { inDestination.myTrack = inTrack; }; storedv1.doorList = new Array(); storedv1.myRooms = new Array(); storedv1.myObjectives = new Array(); storedv1.badguyShoppingList = new Array(); label 106684: ASSetPropFlags(_global.MadnessLevel.prototype, null, 1); #endinitclip } movieClip 8398 __Packages.MadnessEvents { #initclip if (!_global.MadnessEvents) { var v1 = function () {}; _global.MadnessEvents = v1; var v2 = v1.prototype; v1.world_0_0_prison = function () { MadnessLevel.myRooms[2].myDoors[0].noSpawn = false; MadnessLevel.currentLevel.disableDoorSpawn(2, 1); MadnessLevel.myRooms[3].myDoors[0].noSpawn = false; MadnessLevel.currentLevel.disableDoorSpawn(3, 3); MadnessLevel.myRooms[4].myDoors[0].noSpawn = false; MadnessLevel.currentLevel.disableDoorSpawn(4, 2); MadnessLevel.currentLevel.disableDoorSpawn(5, 1); MadnessLevel.currentLevel.createNPC(MadnessLevel.myRooms[2], 'civ', 'enemy', 'ranged', 3, false, 2); MadnessLevel.currentLevel.createNPC(MadnessLevel.myRooms[1], 'agent', 'enemy', 'ranged', 6, false, 4); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[2], ['agent', 'civ', 'civ', 'civ'], 'enemy', 'ranged', 0); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[3], ['agent', 'civ', 'civ', 'civ'], 'enemy', 'ranged', 0); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[4], ['agent', 'civ', 'civ', 'civ'], 'enemy', 'ranged', 0); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[6], ['agent', 'civ'], 'enemy', 'ranged', 0); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[6], ['civ', 'civ', 'civ'], 'enemy', 'ranged', 0); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[6], ['agent', 'agent'], 'enemy', 'ranged', 0); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[6], ['agent', 'agent', 'agent', 'agent', 'agent'], 'enemy', 'ranged', 0); MadnessPopup.addPopup('help', 'Someone will have heard that. Time to bail!', null, 400, 120, MadnessLevel.myRooms[6].myDoors[0].mySprite, 150, null, null, null, null); MadnessLevel.currentLevel.addEvent(MadnessLevel.myRooms[5], MadnessEvents.world_0_0_tutorial7); MadnessLevel.currentLevel.addEvent(MadnessLevel.myRooms[4], MadnessEvents.world_0_0_tutorial8); MadnessLevel.currentLevel.addEvent(MadnessLevel.myRooms[3], MadnessEvents.world_0_0_tutorial9); MadnessLevel.currentLevel.addEvent(MadnessLevel.myRooms[0], MadnessEvents.world_0_0_unlock2); }; v1.world_0_0_tutorial1 = function () { _root.medal1Disable = false; MadnessPopup.addBuffer(15); MadnessPopup.addPopup('help', 'You\'ll be operating this mission as ' + MadnessRoster.playerRoster.teamLeader.myName + '. This man is a badass killing machine, so you should have no problem rescuing Sanford and Deimos.', null, 400, 120, MadnessRoster.playerRoster.teamLeader.mySprite.mySprite.myBody, 210, MadnessEvents.world_0_0_tutorial1b, null); MadnessPopup.addBuffer(5); MadnessPopup.addPopup('help', 'WASD Moves. Use doors by pressing SPACE [Guard] next to them.', null, 500, 120, MadnessLevel.myRooms[0].myDoors[0].mySprite, 200, null, null); }; v1.world_0_0_tutorial1b = function () {}; v1.world_0_0_tutorial2 = function () { MadnessPopup.addPopup('help', 'These idiots just got in your way. Click MOUSE 1 and aim with your mouse to show them why that was a bad idea.', null, 400, 120, MadnessLevel.myRooms[1].myCharacters[0].mySprite, 200, null, null); MadnessPopup.addBuffer(3); MadnessPopup.addPopup('help', 'To swap weapons with your sidearm, press Q.', null, 400, 120, MadnessRoster.playerRoster.teamLeader.mySprite.mySprite.myBody, 220, null, null); }; v1.world_0_0_tutorial3 = function () { MadnessPopup.addBuffer(15); MadnessPopup.addPopup('help', 'Activate this panel with your SPACE bar to get that door open.', null, 400, 120, MadnessLevel.myRooms[2].myActivators[0].mySprite.mySprite.myBox, 2200, null, null); }; v1.world_0_0_tutorial3b = function () { MadnessPopup.closeAll(); }; v1.world_0_0_tutorial4 = function () { MadnessPopup.addBuffer(15); MadnessPopup.addPopup('help', 'Take cover behind objects such as this one by pressing SPACE while holding a ranged weapon.', null, 400, 120, MadnessLevel.myRooms[3].myObstacles[0].mySprite, 150, null, null); MadnessPopup.addBuffer(5); MadnessPopup.addPopup('help', 'You\'ll be protected from enemy fire so long as you\'re not shooting your own weapon.', null, 400, 120, undefined, 120, null, null); MadnessPopup.addBuffer(5); MadnessPopup.addPopup('help', 'Pressing SPACE again will leave cover.', null, 400, 120, undefined, 150, null, null); }; v1.world_0_0_tutorial5 = function () { MadnessPopup.addBuffer(15); MadnessPopup.addPopup('help', 'You may have noticed that you\'re a difficult target to hit. This is due to your TAC-BAR.', null, 400, 120, MadnessRoster.playerRoster.teamLeader.mySprite.mySprite.myBody, 160, null, null); MadnessPopup.addBuffer(5); MadnessPopup.addPopup('help', 'Your TAC-BAR indicates your battle prowess and natural ability to avoid enemy fire. Keep it from hitting empty, and you\'ll never take a bullet.', null, 400, 120, MadnessRoster.playerRoster.teamLeader.mySprite.mySprite.myBody, 220, null, null); MadnessPopup.addBuffer(5); MadnessPopup.addPopup('help', 'Some enemies have TAC-BARs, too. Being fired on from behind or at close range will decimate their (and your!) bar.', null, 400, 120, MadnessRoster.playerRoster.teamLeader.mySprite.mySprite.myBody, 200, null, null); MadnessPopup.addBuffer(50); MadnessPopup.addPopup('help', 'Ok, I\'m done talking about the TAC-BAR. Go that way.', null, 400, 120, MadnessLevel.myRooms[4].myDoors[2].mySprite, 120, null, null); MadnessPopup.addBuffer(100); MadnessPopup.addPopup('help', 'No...really. I\'m done now. This is it.', null, 400, 120, undefined, 120, null, null); MadnessPopup.addBuffer(100); MadnessPopup.addPopup('help', 'The real Hank would have finished this tutorial by now. You should know that.', null, 400, 120, undefined, 120, MadnessEvents.world_0_0_unlock1, null); }; v1.world_0_0_unlock1 = function () { MadnessMedals.unlockMedal('tutorialtext'); }; v1.world_0_0_unlock2 = function () { if (_root.medal1Disable == false) { MadnessMedals.unlockMedal('mercy'); } }; v1.world_0_0_closeMedal1 = function () { _root.medal1Disable = true; }; v1.world_0_0_tutorial6 = function () { MadnessPopup.addBuffer(15); MadnessPopup.addPopup('help', 'Did you notice that SPACE dodges or blocks when holding a ranged or melee weapon?', null, 400, 120, MadnessRoster.playerRoster.teamLeader.mySprite.mySprite.myBody, 150, null, null); MadnessPopup.addBuffer(5); MadnessPopup.addPopup('help', 'Blocking will reduce TAC-BAR damage, while dodging will outright prevent it.', null, 400, 120, MadnessRoster.playerRoster.teamLeader.mySprite.mySprite.myBody, 150, null, null); }; v1.world_0_0_tutorial7 = function () { MadnessPopup.addBuffer(10); MadnessPopup.addPopup('help', 'Pro-Tip: Double tap a direction to dash.', null, 400, 120, MadnessRoster.playerRoster.teamLeader.mySprite.mySprite.myBody, 150, null, null); }; v1.world_0_0_tutorial8 = function () { MadnessPopup.addBuffer(10); MadnessPopup.addPopup('help', 'See that red bar up top? Yeah, that one.', null, 400, 120, _root.gameMenu.tutTarget, 110, null, null); MadnessPopup.addBuffer(5); MadnessPopup.addPopup('help', 'That\'s your Bullet-Time. Kills power it. When it\'s full, press SHIFT to activate it.', null, 400, 120, _root.gameMenu.tutTarget, 190, null, null); }; v1.world_0_0_tutorial9 = function () { MadnessPopup.addBuffer(10); MadnessPopup.addPopup('help', 'Press R to reload. Be careful! This dumps your current clip and all leftover ammo in it.', null, 400, 120, _root.gameMenu.tutTarget, 170, null, null); MadnessPopup.addBuffer(5); MadnessPopup.addPopup('help', 'To drop your weapon or pick up a new one from the floor, press E.', null, 400, 120, _root.gameMenu.tutTarget, 190, null, null); }; v1.world_0_1_0 = function () { if (MadnessRoster.playerRoster.teamLeader.myCharacter == 'sanford') { MadnessPopup.addBuffer(15); MadnessPopup.addPopup('help', 'Sanford always equips a special hook weapon. Throw it like any weapon, but it\'ll come back...sometimes with a snared enemy in tow.', null, 400, 120, MadnessRoster.playerRoster.teamLeader.mySprite.mySprite.myBody, 210, null, null); } }; v1.world_0_1_6 = function () { MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[6], ['civ', 'civ', 'civ'], 'enemy', 'ranged', 0); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[6], ['civ'], 'enemy', 'ranged', 1); }; v1.world_0_2_5 = function () { MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[5], ['civ', 'civ', 'civ'], 'enemy', 'ranged', 0); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[5], ['agent', 'civ'], 'enemy', 'ranged', 1); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[4], ['civ', 'civ', 'civ'], 'enemy', 'ranged', 0); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[4], ['agent', 'civ'], 'enemy', 'ranged', 1); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[3], ['civ', 'civ', 'civ'], 'enemy', 'ranged', 0); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[3], ['agent', 'civ'], 'enemy', 'ranged', 1); }; v1.world_0_2_9 = function () { MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[9], ['civ', 'civ', 'civ'], 'enemy', 'ranged', 0); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[9], ['agent', 'civ'], 'enemy', 'ranged', 1); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[8], ['civ', 'civ', 'civ'], 'enemy', 'ranged', 0); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[8], ['agent', 'civ'], 'enemy', 'ranged', 1); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[6], ['agent', 'civ'], 'enemy', 'ranged', 1); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[6], ['civ', 'civ', 'civ'], 'enemy', 'ranged', 0); }; v1.world_0_1_3_A = function () { MadnessLevel.myRooms[3].myObstacles[0].noClip = true; }; v1.world_0_3_4 = function () { MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[3], ['civ', 'civ', 'civ'], 'enemy', 'ranged', 0); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[3], ['agent', 'civ', 'agent'], 'enemy', 'ranged', 2); }; v1.world_0_3_6 = function () { MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[5], ['agent', 'civ', 'agent'], 'enemy', 'ranged', 2); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[5], ['civ', 'civ', 'civ', 'civ'], 'enemy', 'melee', 2); }; v1.world_0_3_10 = function () { MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[9], ['civ', 'civ', 'civ', 'civ'], 'enemy', 'melee', 5); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[9], ['agent', 'civ', 'agent'], 'enemy', 'ranged', 2); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[8], ['agent', 'civ', 'agent'], 'enemy', 'ranged', 3); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[8], ['civ', 'civ', 'agent', 'civ'], 'enemy', 'ranged', 2); }; v1.world_0_3_13 = function () { MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[11], ['agent', 'civ', 'agent'], 'enemy', 'ranged', 2); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[11], ['civ', 'civ', 'civ', 'civ', 'civ', 'civ'], 'enemy', 'ranged', 1); }; v1.world_0_4_2_A = function () { MadnessPopup.addBuffer(10); MadnessPopup.addPopup('help', 'There must be some way to lower those spikes around here. Better start looking.', null, 400, 120, MadnessLevel.myRooms[2].myObstacles[0].mySprite, 170, null, null); }; v1.world_0_4_11_A = function () { MadnessLevel.myRooms[2].myObstacles[0].noClip = true; MadnessLevel.currentLevel.addEvent(MadnessLevel.myRooms[2], MadnessEvents.world_0_4_11_B); MadnessPopup.addBuffer(10); MadnessPopup.addPopup('help', 'Wonder what that did? Better head back.', null, 400, 120, null, 170, null, null); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[2], ['agent', 'agent', 'civ'], 'enemy', 'ranged', 3); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[2], ['agent', 'agent', 'agent', 'civ'], 'enemy', 'melee', 8); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[2], ['agent', 'agent', 'agent', 'civ'], 'enemy', 'ranged', 3); MadnessLevel.currentLevel.createNPC(MadnessLevel.myRooms[8], 'agent', 'enemy', 'ranged', 4, false, 4); MadnessLevel.currentLevel.createNPC(MadnessLevel.myRooms[9], 'agent', 'enemy', 'ranged', 3, false, 3); }; v1.world_0_4_11_B = function () { MadnessPopup.addBuffer(10); MadnessPopup.addPopup('help', 'It seems activating the terminal has lowered those spikes.', null, 400, 120, MadnessLevel.myRooms[2].myObstacles[0].mySprite, 170, null, null); }; v1.world_0_5_8_A = function () { MadnessPopup.addBuffer(90); MadnessPopup.addPopup('buffer', '', null, 400, 120, null, 30, MadnessEvents.world_0_5_8_B, null); }; v1.world_0_5_8_B = function () { if (MadnessCharacter.doesUnitExist('fatboy')) { MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[8], ['civ', 'civ'], 'enemy', 'ranged', 3); MadnessLevel.currentLevel.addEvent(MadnessLevel.myRooms[8].myRosters[0], MadnessEvents.world_0_5_8_A); } else {} }; v1.world_0_5_14_A = function () { if (!MadnessLevel.levelVictory) { MadnessPopup.addBuffer(90); MadnessPopup.addPopup('buffer', '', null, 400, 120, null, 30, MadnessEvents.world_0_5_14_B, null); } }; v1.world_0_5_14_B = function () { if (MadnessCharacter.doesUnitExist('fatboy')) { MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[14], ['agent', 'agent'], 'enemy', 'ranged', 3); MadnessLevel.currentLevel.addEvent(MadnessLevel.myRooms[14].myRosters[0], MadnessEvents.world_0_5_14_A); } else {} }; v1.world_0_6_4_A = function () { MadnessPopup.addBuffer(120); MadnessPopup.addPopup('buffer', '', null, 400, 120, null, 30, MadnessEvents.world_0_6_4_B, null); }; v1.world_0_6_4_B = function () { if (MadnessCharacter.doesUnitExist('fatboy')) { MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[4], ['agent', 'agent'], 'enemy', 'ranged', 5); MadnessLevel.currentLevel.addEvent(MadnessLevel.myRooms[4].myRosters[MadnessLevel.myRooms[4].myRosters.length - 1], MadnessEvents.world_0_6_4_A); } else {} }; v1.world_0_6_9_A = function () { if (!MadnessLevel.levelVictory) { MadnessPopup.addBuffer(120); MadnessPopup.addPopup('buffer', '', null, 400, 120, null, 30, MadnessEvents.world_0_6_9_B, null); } }; v1.world_0_6_9_B = function () { if (MadnessCharacter.doesUnitExist('fatboy')) { MadnessLevel.currentLevel.myDifficulty = 3; if (SwainMath.randomNumber(0, 1) == 0) { MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[9], ['agent', 'agent', 'agent', 'agent2'], 'enemy', 'ranged', 7); } else { MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[9], ['agent', 'agent', 'agent3'], 'enemy', 'ranged', 7); } MadnessLevel.currentLevel.addEvent(MadnessLevel.myRooms[9].myRosters[0], MadnessEvents.world_0_6_9_A); } else {} }; v1.world_0_7_4_A = function () { MadnessLevel.myRooms[3].myObstacles[0].noClip = true; MadnessLevel.myRooms[3].myObstacles[0].alreadyClosed = true; MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[4], ['agent2', 'agent2'], 'enemy', 'ranged', 6); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[3], ['agent', 'agent2'], 'enemy', 'ranged', 7); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[3], ['agent', 'agent', 'agent'], 'enemy', 'ranged', 7); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[3], ['agent2', 'agent2'], 'enemy', 'ranged', 6); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[3], ['agent'], 'enemy', 'ranged', 4); }; v1.world_0_7_7_A = function () { MadnessLevel.myRooms[6].myObstacles[0].noClip = true; MadnessLevel.myRooms[6].myObstacles[0].alreadyClosed = true; MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[7], ['agent', 'agent2', 'agent2'], 'enemy', 'ranged', 6); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[7], ['agent', 'agent'], 'enemy', 'ranged', 8); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[6], ['agent', 'agent', 'agent', 'agent2'], 'enemy', 'ranged', 7); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[6], ['agent', 'agent', 'agent', 'agent'], 'enemy', 'melee', 15); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[6], ['agent', 'agent2', 'agent2'], 'enemy', 'ranged', 6); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[6], ['agent', 'agent'], 'enemy', 'ranged', 8); }; v1.world_0_7_9_A = function () { if (!MadnessLevel.levelVictory) { MadnessPopup.addBuffer(120); MadnessPopup.addPopup('buffer', '', null, 400, 120, null, 30, MadnessEvents.world_0_7_9_B, null); } }; v1.world_0_7_9_B = function () { if (MadnessCharacter.doesUnitExist('fatboy')) { MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[9], ['agent', 'agent', 'agent2'], 'enemy', 'ranged', 6); MadnessLevel.currentLevel.addEvent(MadnessLevel.myRooms[9].myRosters[MadnessLevel.myRooms[9].myRosters.length - 1], MadnessEvents.world_0_7_9_A); } else {} }; v1.world_0_7_10_A = function () { MadnessLevel.myRooms[9].myObstacles[0].noClip = true; MadnessLevel.myRooms[9].myObstacles[0].alreadyClosed = true; MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[10], ['agent', 'agent', 'agent2', 'agent2'], 'enemy', 'ranged', 8); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[10], ['agent', 'agent2', 'agent', 'agent'], 'enemy', 'ranged', 3); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[10], ['agent', 'agent', 'agent2', 'agent2'], 'enemy', 'ranged', 8); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[10], ['agent', 'agent2', 'agent'], 'enemy', 'melee', 5); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[9], ['agent', 'agent', 'agent'], 'enemy', 'ranged', 7); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[9], ['agent', 'agent', 'agent2', 'agent2'], 'enemy', 'ranged', 8); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[9], ['agent', 'agent2', 'agent', 'agent'], 'enemy', 'melee', 15); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[9], ['agent', 'agent2', 'agent3'], 'enemy', 'ranged', 6); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[9], ['fatboy'], 'enemy', 'fatboy', 1); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[9], ['agent', 'agent'], 'enemy', 'ranged', 8); MadnessLevel.currentLevel.addEvent(MadnessLevel.myRooms[9].myRosters[5], MadnessEvents.world_0_7_9_A); }; v1.world_0_7_12_A = function () { MadnessPopup.addBuffer(120); MadnessPopup.addPopup('buffer', '', null, 400, 120, null, 30, MadnessEvents.world_0_7_12_B, null); }; v1.world_0_7_12_B = function () { if (MadnessCharacter.doesUnitExist('fatboy')) { MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[12], ['agent', 'agent2', 'agent2'], 'enemy', 'ranged', 6); MadnessLevel.currentLevel.addEvent(MadnessLevel.myRooms[12].myRosters[MadnessLevel.myRooms[12].myRosters.length - 1], MadnessEvents.world_0_7_12_A); } else {} }; v1.world_0_7_13_A = function () { MadnessLevel.myRooms[12].myObstacles[0].noClip = true; MadnessLevel.myRooms[12].myObstacles[0].alreadyClosed = true; MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[13], ['agent', 'agent', 'agent3'], 'enemy', 'ranged', 6); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[13], ['agent'], 'enemy', 'ranged', 7); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[13], ['agent2', 'agent', 'agent3'], 'enemy', 'ranged', 6); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[13], ['agent3', 'agent2', 'agent2'], 'enemy', 'ranged', 7); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[12], ['agent', 'agent2', 'agent2'], 'enemy', 'ranged', 7); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[12], ['agent', 'agent', 'agent3'], 'enemy', 'ranged', 6); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[12], ['agent2', 'agent2'], 'enemy', 'ranged', 10); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[12], ['agent3', 'agent3', 'agent3'], 'enemy', 'ranged', 5); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[12], ['fatboy'], 'enemy', 'fatboy', 10); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[12], ['agent', 'agent'], 'enemy', 'ranged', 8); MadnessLevel.currentLevel.addEvent(MadnessLevel.myRooms[12].myRosters[5], MadnessEvents.world_0_7_12_A); }; v1.world_0_7_15_A = function () { if (!MadnessLevel.levelVictory) { MadnessPopup.addBuffer(120); MadnessPopup.addPopup('buffer', '', null, 400, 120, null, 30, MadnessEvents.world_0_7_15_B, null); } }; v1.world_0_7_15_B = function () { if (MadnessCharacter.doesUnitExist('mag')) { MadnessLevel.currentLevel.myDifficulty = 3; if (SwainMath.randomNumber(0, 2) == 0) { MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[15], ['agent', 'agent', 'agent2', 'agent'], 'enemy', 'ranged', 8); } else { if (SwainMath.randomNumber(0, 1) == 0) { MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[15], ['agent2', 'agent2', 'agent'], 'enemy', 'ranged', 8); } else { MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[15], ['agent2', 'agent', 'agent'], 'enemy', 'ranged', 8); } } MadnessLevel.currentLevel.addEvent(MadnessLevel.myRooms[15].myRosters[0], MadnessEvents.world_0_7_15_A); } else {} }; v1.world_1_0_15 = function () { MadnessPopup.addBuffer(20); MadnessPopup.addPopup('talk', 'SOMETHING WRONG, DR.CHRISTOFF?', null, 600, 120, MadnessLevel.myRooms[15].myCharacters[0], 110, null, null); MadnessPopup.addBuffer(15); MadnessPopup.addPopup('talk', 'NOT ANYMORE', null, 250, 120, MadnessRoster.playerRoster.teamLeader, 110, MadnessEvents.world_1_0_15b, null); }; v1.world_1_0_15b = function () { if (MadnessLevel.myRooms[14].myEvents.length > 0) { MadnessLevel.currentLevel.unlockDoor(15, 0); } }; v1.world_1_0_15c = function () { MadnessLevel.myRooms[14].myEvents = new Array(); MadnessLevel.currentLevel.lockDoor(15, 0); MadnessPopup.addBuffer(30, MadnessEvents.world_1_0_15d); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[14], ['zombie', 'zombie'], 'zombie', 'unarmed', 1); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[13], ['zombie'], 'zombie', 'unarmed', 1); MadnessLevel.currentLevel.createNPC(MadnessLevel.myRooms[13], 'zombie', 'zombie', 'unarmed', 1, false, 1); MadnessLevel.currentLevel.createNPC(MadnessLevel.myRooms[14], 'zombie', 'zombie', 'unarmed', 1, false, 1); MadnessLevel.myRooms[14].mySpawners[0].myTrigger = 'open'; MadnessLevel.myRooms[14].mySpawners[0].myUnit = undefined; MadnessLevel.myRooms[14].mySpawners[1].myTrigger = 'open'; MadnessLevel.myRooms[14].mySpawners[1].myUnit = undefined; MadnessLevel.myRooms[13].mySpawners[0].myTrigger = 'open'; MadnessLevel.myRooms[13].mySpawners[0].myUnit = undefined; MadnessLevel.currentLevel.addEvent(MadnessLevel.myRooms[13], MadnessEvents.world_1_0_13); }; v1.world_1_0_15d = function () { MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[15], ['zombie_scientist'], 'zombie', 'scientist', 1); MadnessLevel.currentLevel.unlockDoor(15, 0); MadnessPopup.addBuffer(10, MadnessEvents.world_1_0_15e); MadnessPopup.addPopup('talk', 'OH, HEY JIM...', null, 600, 120, MadnessLevel.myRooms[15].myCharacters[0], 60, null, null); MadnessPopup.addBuffer(5); MadnessPopup.addPopup('talk', 'JIM...?!', null, 600, 120, MadnessLevel.myRooms[15].myCharacters[0], 60, MadnessEvents.world_1_0_15f, null); MadnessLevel.currentLevel.unlockDoor(13, 2); }; v1.world_1_0_15e = function () { MadnessLevel.currentLevel.lockDoor(15, 0); }; v1.world_1_0_15f = function () { SwainAudioPlayer.playTrack('zombie2'); MadnessLevel.currentLevel.applyTrack('zombie2', MadnessLevel.currentLevel); MadnessLevel.currentLevel.unlockDoor(15, 0); }; v1.world_1_0_14 = function () { MadnessPopup.addBuffer(120); MadnessPopup.addPopup('talk', 'DID YOU CATCH THE GAME LAST NIGHT?', null, 250, 120, MadnessLevel.myRooms[14].myCharacters[1], 110, null, null); MadnessPopup.addBuffer(10); MadnessPopup.addPopup('talk', 'SURE DID', null, 250, 120, MadnessLevel.myRooms[14].myCharacters[0], 110, null, null); MadnessPopup.addBuffer(10); MadnessPopup.addPopup('talk', 'WHO DO YOU THINK WILL TAKE IT THIS YEAR?', null, 250, 120, MadnessLevel.myRooms[14].myCharacters[1], 110, null, null); MadnessPopup.addBuffer(30); MadnessPopup.addPopup('talk', '. . .', null, 250, 120, MadnessLevel.myRooms[14].myCharacters[0], 110, null, null); MadnessPopup.addBuffer(30); MadnessPopup.addPopup('talk', 'UH...NEVADA?', null, 250, 120, MadnessLevel.myRooms[14].myCharacters[0], 110, null, null); MadnessPopup.addBuffer(30); MadnessPopup.addPopup('talk', '. . .', null, 250, 120, MadnessLevel.myRooms[14].myCharacters[1], 110, null, null); MadnessPopup.addBuffer(30); MadnessPopup.addPopup('talk', 'YEAH...', null, 250, 120, MadnessLevel.myRooms[14].myCharacters[1], 110, MadnessEvents.world_1_0_14b, null); }; v1.world_1_0_14b = function () {}; v1.world_1_0_13 = function () { MadnessPopup.addBuffer(15); MadnessPopup.addPopup('help', 'Uh oh, Zombehs! If they grab you, it\'s time to panic! Throw them off by mashing your movement keys before your Tac-Bar runs out - zombie bites will deplete your health instantly!', null, 400, 120, MadnessLevel.myRooms[13].myCharacters[MadnessLevel.myRooms[13].myCharacters.length - 1], 300, null, null); }; v1.world_1_0_11 = function () { MadnessPopup.addBuffer(10); MadnessPopup.addPopup('talk', 'CONTAINMENT HAS BEEN BREACHED!', null, 600, 120, MadnessLevel.myRooms[11].myCharacters[0], 120, MadnessEvents.world_1_0_11b, null); }; v1.world_1_0_11b = function () { MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[11], ['scientist', 'scientist'], 'player', 'scientist', 1); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[11], ['zombie_scientist', 'zombie_scientist'], 'zombie', 'scientist', 1); }; v1.world_1_0_10 = function () { MadnessLevel.currentLevel.unlockDoor(10, 0); MadnessLevel.myRooms[10].mySpawners[0].mySprite.amActive = true; MadnessLevel.myRooms[10].mySpawners[0].amActive = MadnessLevel.myRooms[10].mySpawners[0].mySprite.amActive; MadnessLevel.myRooms[10].mySpawners[1].mySprite.amActive = true; MadnessLevel.myRooms[10].mySpawners[1].amActive = MadnessLevel.myRooms[10].mySpawners[1].mySprite.amActive; MadnessLevel.myRooms[10].mySpawners[0].mySprite.thisFrame = 128; MadnessLevel.myRooms[10].mySpawners[0].mySprite.myTimer = 128; MadnessLevel.myRooms[10].mySpawners[0].myTimer = 128; MadnessLevel.myRooms[10].mySpawners[1].mySprite.thisFrame = 128; MadnessLevel.myRooms[10].mySpawners[1].mySprite.myTimer = 128; MadnessLevel.myRooms[10].mySpawners[1].myTimer = 128; MadnessLevel.myRooms[10].mySpawners[0].mySprite.myTrigger = 'open'; MadnessLevel.myRooms[10].mySpawners[0].myTrigger = 'open'; MadnessLevel.myRooms[10].mySpawners[1].mySprite.myTrigger = 'open'; MadnessLevel.myRooms[10].mySpawners[1].myTrigger = 'open'; MadnessSpawner.allSpawners.push(MadnessLevel.myRooms[10].mySpawners[0].mySprite); MadnessSpawner.allSpawners.push(MadnessLevel.myRooms[10].mySpawners[1].mySprite); }; v1.world_1_0_8 = function () { MadnessPopup.addBuffer(10); MadnessPopup.addPopup('talk', 'SORRY, DOC. YOU\'RE A LIABILITY.', null, 400, 130, MadnessLevel.myRooms[8].myCharacters[0], 120, null, null); var v1 = 0; while (v1 < MadnessLevel.myRooms[11].myCharacters.length) { if (MadnessLevel.myRooms[11].myCharacters[v1].myCharacter == 'agent_classic') { MadnessLevel.myRooms[11].myCharacters[v1].myFaction = 'enemy'; MadnessLevel.myRooms[11].myCharacters[v1].myRoster = undefined; } ++v1; } }; v1.world_1_0_1 = function () { MadnessPopup.addBuffer(15, MadnessEvents.world_1_0_1b); MadnessPopup.addPopup('talk', 'EXCUSE ME, GENTLEMEN', null, 400, 150, MadnessRoster.playerRoster.teamLeader, 120, null, null); }; v1.world_1_0_1b = function () { var v1 = 0; while (v1 < MadnessLevel.myRooms[1].myCharacters.length) { MadnessLevel.myRooms[11].myCharacters[v1].myMission = 'engage'; ++v1; } }; v1.world_1_0_1c = function () { MadnessPopup.addBuffer(15); MadnessPopup.addPopup('talk', 'THANK YOU FOR YOUR COOPERATION', null, 400, 150, MadnessRoster.playerRoster.teamLeader, 120, null, null); }; v1.world_1_1_0 = function () { MadnessPopup.addBuffer(10); MadnessPopup.addPopup('talk', 'I CAN TRUST HOFNARR...', null, 400, 140, MadnessRoster.playerRoster.teamLeader, 110, null, null); MadnessPopup.addBuffer(10); MadnessPopup.addPopup('talk', '...JUST HOPE IT\'S MUTUAL', null, 400, 140, MadnessRoster.playerRoster.teamLeader, 110, null, null); }; v1.world_1_1_1 = function () { MadnessPopup.addBuffer(10); MadnessPopup.addPopup('talk', 'HOLD IT, TRAITOR', null, 500, 160, MadnessLevel.myRooms[1].myCharacters[1], 90, null, null); }; v1.world_1_1_6 = function () { MadnessPopup.addBuffer(30); MadnessPopup.addPopup('talk', 'I\'LL HANDLE THIS', null, 600, 160, MadnessRoster.playerRoster.myActiveMembers[1], 90, null, null); }; v1.world_1_1_6b = function () { MadnessPopup.addBuffer(10); MadnessPopup.addPopup('help', 'You do not have clearance to use this terminal.', null, 600, 160, MadnessLevel.myRooms[6].myActivators[0].mySprite, 160, null, null); }; v1.world_1_1_8 = function () { MadnessLevel.currentLevel.lockDoor(8, 0); MadnessPopup.addBuffer(10); MadnessPopup.addPopup('talk', 'YOU\'VE MADE QUITE A MESS, CHRISTOFF', null, 600, 160, MadnessLevel.myRooms[8].myCharacters[0], 100, null, null); MadnessPopup.addBuffer(10); MadnessPopup.addPopup('talk', 'THEY\'VE GONE TOO FAR', null, 400, 160, MadnessRoster.playerRoster.teamLeader, 70, null, null); MadnessPopup.addBuffer(10); MadnessPopup.addPopup('talk', 'IF WE DON\'T STOP THIS NOW...', null, 400, 160, MadnessRoster.playerRoster.teamLeader, 30, MadnessEvents.world_1_1_8b, null); MadnessPopup.addPopup('talk', 'IF WE DON\'T STOP THIS NOW...', null, 400, 160, MadnessRoster.playerRoster.teamLeader, 60, null, null); MadnessPopup.addBuffer(60); MadnessPopup.addPopup('talk', 'I SEE WE HAVE NO OTHER CHOICE', null, 600, 160, MadnessLevel.myRooms[8].myCharacters[0], 100, null, null); }; v1.world_1_1_8b = function () { MadnessLevel.myRooms[8].myCharacters[0].myRoster.makeActive(MadnessLevel.myRooms[8].myCharacters[0]); MadnessLevel.currentLevel.unlockDoor(8, 0); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[8], ['agent_classic', 'agent_classic', 'agent_classic'], 'enemy', 'melee', 10); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[8], ['agent_classic', 'agent_classic', 'agent_classic', 'agent_classic'], 'enemy', 'ranged', 10); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[8], ['agent_classic', 'agent_classic', 'agent_classic', 'agent_classic'], 'enemy', 'ranged', 10); MadnessLevel.currentLevel.addEvent(MadnessLevel.myRooms[6], MadnessEvents.world_1_1_6); }; v1.world_1_1_15 = function () { MadnessPopup.addBuffer(60); MadnessPopup.addPopup('help', 'Remember, the easiest way to wear down an enemy\'s Tac-Bar is with melee, unarmed, or rear attacks.', null, 400, 120, null, 170, null, null, null, null); }; v1.world_1_1_16 = function () { MadnessPopup.addBuffer(50); MadnessPopup.addPopup('talk', 'YA KNOW PHOBOS WILL FINISH US FOR THIS...', null, 600, 160, MadnessRoster.playerRoster.myActiveMembers[1], 120, null, null); MadnessPopup.addBuffer(30); MadnessPopup.addPopup('talk', 'PHOBOS BETTER WATCH HIS BACK', null, 500, 160, MadnessRoster.playerRoster.teamLeader, 90, null, null); }; v1.world_1_2_0 = function () { MadnessPopup.addBuffer(10); MadnessPopup.addPopup('talk', 'EVERYTHING DEPENDS ON YOU NOW', null, 500, 160, MadnessRoster.playerRoster.myMembers[1], 110, null, null); }; v1.world_1_2_0b = function () { MadnessLevel.currentLevel.unlockDoor(0, 0); MadnessPopup.addBuffer(15); MadnessPopup.addPopup('talk', 'GOOD LUCK, OLD FRIEND', null, 500, 160, MadnessRoster.playerRoster.myMembers[1], 110, null, null); MadnessLevel.myRooms[0].myCharacters[0].myRoster.removeCharacter(MadnessLevel.myRooms[0].myCharacters[0]); MadnessLevel.myRooms[0].myCharacters.splice(0, 1); }; v1.world_1_2_1 = function () { MadnessPopup.addBuffer(15); MadnessPopup.addPopup('talk', 'IT\'S A LONG WAY UP...', null, 400, 160, MadnessRoster.playerRoster.teamLeader, 66, null, null); MadnessPopup.addBuffer(15); MadnessPopup.addPopup('talk', '*SIGH*', null, 400, 160, MadnessRoster.playerRoster.teamLeader, 50, null, null); }; v1.world_1_2_2 = function () { MadnessPopup.addBuffer(15); MadnessPopup.addPopup('talk', '. . .', null, 400, 160, MadnessRoster.playerRoster.teamLeader, 60, null, null); }; v1.world_1_2_8 = function () { MadnessPopup.addBuffer(15); MadnessPopup.addPopup('talk', 'INTRUDER!', null, 600, 160, MadnessLevel.myRooms[8].myCharacters[0], 60, null, null); }; v1.world_1_2_9 = function () { MadnessPopup.addBuffer(10); MadnessPopup.addPopup('talk', 'THEY\'RE GETTING LOOSE!', null, 550, 160, MadnessLevel.myRooms[8].myCharacters[0], 60, null, null); }; v1.world_1_2_19 = function () { if (MadnessCharacter.doesUnitExist('mag2')) { MadnessPopup.addBuffer(120); MadnessPopup.addPopup('buffer', '', null, 400, 120, null, 30, MadnessEvents.world_1_2_19b, null); } }; v1.world_1_2_19b = function () { if (MadnessCharacter.doesUnitExist('mag2')) { MadnessLevel.currentLevel.myDifficulty = 3; MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[19], ['agent_classic', 'agent_classic', 'agent_classic'], 'enemy', 'ranged', 12); MadnessLevel.currentLevel.addEvent(MadnessLevel.myRooms[19].myRosters[MadnessLevel.myRooms[19].myRosters.length - 1], MadnessEvents.world_1_2_19); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[19], ['abom', 'abom'], 'abom', 'unarmed', 3); } else {} }; v1.world_1_2_spikes1 = function () { MadnessLevel.myRooms[3].myObstacles[0].noClip = true; MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[5], ['abom', 'abom'], 'abom', 'unarmed', 3); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[5], ['abom'], 'abom', 'unarmed', 3); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[4], ['abom', 'abom'], 'abom', 'unarmed', 3); }; v1.world_1_2_spikes2 = function () { MadnessLevel.myRooms[3].myObstacles[1].noClip = true; MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[6], ['abom', 'abom'], 'abom', 'unarmed', 3); }; v1.world_1_2_spikes3 = function () { MadnessLevel.myRooms[11].myObstacles[0].noClip = true; var v1 = 0; while (v1 < MadnessLevel.myRooms[12].mySpawners.length) { MadnessLevel.myRooms[12].mySpawners[v1].amActive = true; ++v1; } MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[10], ['abom', 'abom'], 'abom', 'unarmed', 3); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[10], ['abom', 'abom'], 'abom', 'unarmed', 3); }; v1.world_1_2_spikes4 = function () { MadnessLevel.myRooms[16].myObstacles[0].noClip = true; MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[17], ['abom', 'abom', 'abom', 'abom'], 'abom', 'unarmed', 3); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[16], ['abom', 'abom'], 'abom', 'unarmed', 3); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[16], ['abom', 'abom', 'abom'], 'abom', 'unarmed', 3); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[16], ['abom', 'abom', 'abom'], 'abom', 'unarmed', 3); }; v1.world_1_3_0 = function () { MadnessPopup.addBuffer(30); MadnessPopup.addPopup('talk', 'WHAT THE HELL IS THIS?!', null, 400, 160, MadnessRoster.playerRoster.teamLeader, 70, null, null); }; v1.world_1_3_1 = function () { MadnessPopup.addBuffer(10); MadnessPopup.addPopup('talk', 'IT\'S CHRISTOFF!', null, 600, 160, MadnessLevel.myRooms[1].myCharacters[0], 60, null, null); MadnessPopup.addBuffer(10); MadnessPopup.addPopup('talk', 'RELEASE THE PATIENTS!', null, 600, 160, MadnessLevel.myRooms[1].myCharacters[1], 90, MadnessEvents.world_1_3_1b, null); }; v1.world_1_3_1b = function () { MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[4], ['patient', 'patient', 'patient'], 'enemy', 'unarmed', 3); }; v1.world_1_3_spikes1 = function () { MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[7], ['patient', 'agent_classic', 'patient'], 'enemy', 'ranged', 6); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[6], ['experiment'], 'enemy', 'unarmed', 14); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[6], ['agent_classic', 'agent_classic', 'agent_classic'], 'enemy', 'melee', 14); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[6], ['patient', 'agent_classic', 'patient'], 'enemy', 'ranged', 5); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[6], ['agent_classic', 'experiment', 'agent_classic'], 'enemy', 'unarmed', 7); MadnessLevel.myRooms[6].myObstacles[0].noClip = true; }; v1.world_1_3_10 = function () { MadnessPopup.addBuffer(20); MadnessPopup.addPopup('talk', 'SO, IT APPEARS THE RUMORS ARE TRUE', null, 400, 160, MadnessLevel.myRooms[10].myCharacters[0], 60, null, null); MadnessPopup.addBuffer(10); MadnessPopup.addPopup('talk', 'YOUR TENURE IS OVER, PHOBOS', null, 600, 160, MadnessRoster.playerRoster.teamLeader, 90, MadnessEvents.world_1_3_1b, null); MadnessPopup.addBuffer(10); MadnessPopup.addPopup('talk', 'WE\'LL SEE, WON\'T WE?', null, 400, 160, MadnessLevel.myRooms[10].myCharacters[0], 60, null, null); }; v1.world_1_3_10FLEE = function () { MadnessPopup.addPopup('talk', 'SEE YOU SOON, DOCTOR', null, 400, 160, MadnessLevel.myRooms[10].myCharacters[0], 90, null, null); }; v1.world_1_3_10b = function () { if (MadnessCharacter.doesUnitExist('phobos')) { MadnessPopup.addBuffer(20); MadnessPopup.addPopup('buffer', '', null, 400, 120, null, 30, MadnessEvents.world_1_3_10c, null); } }; v1.world_1_3_10c = function () { if (MadnessCharacter.doesUnitExist('phobos')) { MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[10], ['patient', 'patient', 'agent_classic', 'agent_classic'], 'enemy', 'ranged', 9); MadnessLevel.currentLevel.addEvent(MadnessLevel.myRooms[10].myRosters[0], MadnessEvents.world_1_3_10b); } else {} }; v1.world_1_4_1 = function () { MadnessPopup.addBuffer(10); MadnessPopup.addPopup('help', 'Your Bullet-Time is now a Magic Bar, for casting spells.', null, 400, 120, _root.gameMenu.tutTarget, 120, null, null, null, null); MadnessPopup.addBuffer(10); MadnessPopup.addPopup('help', 'Tap SHIFT to unleash a slam attack, or hold it to launch a Nexus bolt.', null, 400, 120, MadnessRoster.playerRoster.teamLeader, 150, null, null, null, null); MadnessPopup.addBuffer(30); MadnessPopup.addPopup('help', 'I SAID PRESS SHIFT. I know you weren\'t listening.', null, 400, 120, MadnessRoster.playerRoster.teamLeader, 120, null, null, null, null); }; v1.world_1_4_2 = function () { MadnessPopup.addBuffer(10); MadnessPopup.addPopup('help', 'Before you lies the source of all Nexus power. Reclaim it and redeem yourself!', null, 400, 120, MadnessLevel.myRooms[2].myActivators[0].mySprite, 160, null, null, null, null); }; v1.world_1_4_spikes1 = function () { MadnessPopup.closeAll(); MadnessLevel.currentLevel.createNPC(MadnessLevel.myRooms[1], 'agent_classic', 'enemy', 'ranged', 8, false, 2); var v1 = 0; while (v1 < MadnessLevel.myRooms[1].mySpawners.length) { MadnessLevel.myRooms[1].mySpawners[v1].amActive = true; ++v1; } MadnessLevel.myRooms[1].myObstacles[0].noClip = true; MadnessPopup.addBuffer(20); MadnessPopup.addPopup('help', 'You feel Nexus power coursing through you. Your abilities have all significantly improved!', null, 400, 120, MadnessRoster.playerRoster.teamLeader, 160, null, null, null, null); MadnessLevel.currentLevel.addEvent(MadnessLevel.myRooms[1], MadnessEvents.world_1_4_1); }; v1.world_1_4_spikes2 = function () { MadnessLevel.currentLevel.createNPC(MadnessLevel.myRooms[5], 'patient', 'enemy', 'ranged', 8, false, 2); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[5], ['zombie', 'zombie_agent_classic'], 'zombie', 'zombie', 5); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[5], ['patient', 'patient'], 'abom', 'unarmed', 5); MadnessLevel.myRooms[5].myObstacles[0].noClip = true; }; v1.world_1_4_spikes3 = function () { MadnessLevel.currentLevel.createNPC(MadnessLevel.myRooms[9], 'zombie', 'zombie', 'zombie', 8, false, 2); MadnessLevel.currentLevel.createNPC(MadnessLevel.myRooms[9], 'patient', 'enemy', 'ranged', 8, false, 2); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[9], ['zombie', 'zombie_agent_classic'], 'zombie', 'zombie', 12); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[9], ['zombie', 'zombie_agent_classic'], 'zombie', 'zombie', 5); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[9], ['abom', 'abom'], 'abom', 'unarmed', 5); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[9], ['abom', 'abom'], 'abom', 'unarmed', 5); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[9], ['agent_classic', 'agent_classic', 'riot'], 'enemy', 'ranged', 7); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[9], ['agent_classic', 'agent_classic', 'patient'], 'enemy', 'ranged', 7); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[9], ['experiment'], 'enemy', 'unarmed', 7); MadnessLevel.myRooms[9].myObstacles[0].noClip = true; }; v1.world_1_4_spikes4 = function () { MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[13], ['patient', 'patient'], 'enemy', 'ranged', 7); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[13], ['patient', 'patient', 'patient'], 'enemy', 'ranged', 7); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[13], ['agent_classic', 'agent_classic', 'riot'], 'enemy', 'ranged', 7); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[13], ['agent_classic', 'agent_classic', 'agent_classic'], 'enemy', 'ranged', 12); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[13], ['agent_classic', 'agent_classic', 'riot'], 'enemy', 'ranged', 7); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[13], ['experiment', 'patient'], 'enemy', 'unarmed', 7); MadnessLevel.myRooms[13].myObstacles[0].noClip = true; }; v1.world_1_5_0 = function () { MadnessPopup.addBuffer(10); MadnessPopup.addPopup('talk', 'IT\'S JUDGMENT DAY FOR PROJECT NEXUS', null, 600, 150, MadnessRoster.playerRoster.teamLeader, 120, null, null); }; v1.world_1_5_1 = function () { MadnessPopup.addPopup('talk', 'HOLD THEM OFF!', null, 600, 150, MadnessLevel.myRooms[1].myCharacters[0], 90, null, null); MadnessPopup.addBuffer(10); MadnessPopup.addPopup('talk', 'THE NEXUS HAS NEARLY REGAINED CONTROL', null, 600, 150, MadnessLevel.myRooms[1].myCharacters[0], 120, null, null); }; v1.world_1_5_2 = function () { MadnessPopup.addBuffer(10); MadnessPopup.addPopup('talk', 'NEXUS CONTROL IS ENTACT!', null, 600, 150, MadnessLevel.myRooms[2].myCharacters[0], 120, null, null); }; v1.world_1_5_4 = function () { MadnessLevel.currentLevel.unlockDoor(2, 3); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[4], ['patient', 'zombie_agent_classic'], 'enemy', 'ranged', 7); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[4], ['zombie_agent_classic', 'patient', 'zombie_agent_classic'], 'enemy', 'ranged', 7); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[2], ['agent_classic', 'zombie_agent_classic', 'zombie_agent_classic'], 'enemy', 'ranged', 7); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[2], ['abom', 'abom', 'abom'], 'enemy', 'unarmed', 7); }; v1.world_1_5_spikes1 = function () { MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[13], ['zombie_scientist', 'zombie', 'zombie'], 'enemy', 'zombie', 12); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[13], ['zombie_agent_classic', 'zombie', 'zombie'], 'enemy', 'ranged', 7); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[13], ['zombie_agent_classic', 'zombie_scientist', 'zombie_scientist'], 'enemy', 'zombie', 7); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[13], ['zombie_agent_classic', 'zombie_scientist', 'zombie_scientist'], 'enemy', 'zombie', 7); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[13], ['zombie_riot', 'zombie', 'zombie_riot'], 'enemy', 'zombie', 12); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[13], ['zombie_scientist', 'zombie', 'zombie_riot'], 'enemy', 'zombie', 12); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[12], ['patient', 'zombie_agent_classic'], 'enemy', 'ranged', 7); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[12], ['zombie_agent_classic', 'patient', 'zombie_agent_classic'], 'enemy', 'ranged', 7); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[12], ['zombie_agent_classic', 'agent_classic', 'riot'], 'enemy', 'ranged', 7); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[12], ['agent_classic', 'zombie', 'agent_classic'], 'enemy', 'ranged', 12); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[12], ['zombie_agent_classic', 'agent_classic', 'riot'], 'enemy', 'ranged', 7); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[12], ['experiment', 'patient'], 'enemy', 'unarmed', 7); MadnessLevel.myRooms[12].myObstacles[0].noClip = true; }; v1.world_1_5_18 = function () { MadWorld.freezeCharacters(true); MadnessLevel.myRooms[18].myCharacters[2].mySprite.myFacing = 'right'; MadnessLevel.myRooms[18].myCharacters[1].mySprite.myFacing = 'right'; MadnessLevel.myRooms[18].myCharacters[0].mySprite.myFacing = 'right'; MadnessLevel.myRooms[18].myCharacters[0].mySprite.myAimX = MadnessLevel.myRooms[18].myCharacters[0].mySprite._x + 20; MadnessLevel.myRooms[18].myCharacters[1].mySprite.myAimX = MadnessLevel.myRooms[18].myCharacters[1].mySprite._x + 20; MadnessLevel.myRooms[18].myCharacters[2].mySprite.myAimX = MadnessLevel.myRooms[18].myCharacters[2].mySprite._x + 20; MadnessPopup.addBuffer(10); MadnessPopup.addPopup('talk', 'DO YOU SEE NOW, CHRISTOFF?', null, 300, 170, MadnessLevel.myRooms[18].myCharacters[0], 100, null, null); MadnessPopup.addBuffer(10); MadnessPopup.addPopup('talk', 'DO YOU UNDERSTAND?!', null, 300, 170, MadnessLevel.myRooms[18].myCharacters[0], 100, null, null); MadnessPopup.addBuffer(10); MadnessPopup.addPopup('talk', 'SO LONG AS I LIVE, THE NEXUS CONTROLS ALL!', null, 300, 170, MadnessLevel.myRooms[18].myCharacters[0], 110, null, null); MadnessPopup.addBuffer(10); MadnessPopup.addPopup('talk', 'OH, I\'M WORKING ON THAT', null, 600, 170, MadnessRoster.playerRoster.teamLeader, 30, MadnessEvents.world_1_5_18b, null); MadnessPopup.addPopup('talk', 'OH, I\'M WORKING ON THAT', null, 600, 170, MadnessRoster.playerRoster.teamLeader, 130, null, null); }; v1.world_1_5_18b = function () { MadnessLevel.myRooms[18].myCharacters[2].standStill = false; MadnessLevel.myRooms[18].myCharacters[1].standStill = MadnessLevel.myRooms[18].myCharacters[2].standStill; MadnessLevel.myRooms[18].myCharacters[0].standStill = MadnessLevel.myRooms[18].myCharacters[2].standStill; MadWorld.freezeCharacters(false); MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[18], ['abom', 'riot', 'zombie_riot', 'patient'], 'enemy', 'none', 12); MadnessLevel.currentLevel.addEvent(MadnessLevel.myRooms[18].myRosters[0], MadnessEvents.world_1_5_18c); }; v1.world_1_5_18c = function () { if (MadnessCharacter.doesUnitExist('phobos')) { MadnessPopup.addBuffer(20); MadnessPopup.addPopup('buffer', '', null, 400, 120, null, 30, MadnessEvents.world_1_5_18d, null); } }; v1.world_1_5_18d = function () { if (MadnessCharacter.doesUnitExist('phobos')) { if (SwainMath.randomNumber(0, 3) == 0) { MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[18], ['patient', 'agent_classic', 'zombie_agent_classic', 'agent_classic'], 'enemy', 'ranged', 10); } else { if (SwainMath.randomNumber(0, 2) == 0) { MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[18], ['abom', 'agent_classic', 'zombie_agent_classic', 'agent_classic'], 'enemy', 'ranged', 10); } else { if (SwainMath.randomNumber(0, 1) == 0) { MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[18], ['abom', 'patient', 'agent_classic', 'agent_classic'], 'enemy', 'ranged', 10); } else { MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[18], ['zombie_riot', 'agent_classic', 'agent_classic', 'agent_classic', 'agent_classic'], 'enemy', 'ranged', 10); } } } MadnessLevel.currentLevel.addEvent(MadnessLevel.myRooms[18].myRosters[0], MadnessEvents.world_1_5_18c); } else {} }; v1.world_1_5_18_END = function () { MadnessPopup.addPopup('talk', 'GOODNIGHT, PHOBOS', null, 250, 120, MadnessRoster.playerRoster.teamLeader, 110, null, null); }; v1.arena_1_tutorial = function () { _root.newArena = false; MadnessPopup.addBuffer(10, null); MadnessPopup.addPopup('help', 'Welcome to Project Nexus, Test Subject 1v02P_6, aka "' + MadnessRoster.playerRoster.teamLeader.myName + '".', null, 440, 100, _root.newWorld.myBG.window1.madnessGuy, 140, null, null); MadnessPopup.addBuffer(10, null); MadnessPopup.addPopup('help', 'Today you\'ll be helping us to move combat science forward by engaging in a controlled battle experiment.', null, 440, 100, _root.newWorld.myBG.window1.madnessGuy, 170, null, null); MadnessPopup.addBuffer(10, null); MadnessPopup.addPopup('help', 'If you should perish during the experiment, you will retain your progress, thanks to advances in regenerative cloning. You will, however, return to the beginning of the experiment.', null, 440, 100, _root.newWorld.myBG.window1.madnessGuy, 250, null, null); MadnessPopup.addBuffer(10, null); MadnessPopup.addPopup('help', 'Press the button on the wall to let us know when you\'re ready to begin. You may also return to the Armory when the experiment is not in progress. Good luck, test subject.', null, 440, 100, MadnessLevel.myRooms[0].myActivators[0].mySprite.mySprite.myBox, 230, null, null); }; v1.arena_1_START = function () { if (MadnessRoster.playerRoster.teamLeader.myWeapons[MadnessRoster.playerRoster.teamLeader.mySprite.myWeapon].melee) { MadnessRoster.playerRoster.teamLeader.myStartup = 'startup1'; } else { if (MadnessRoster.playerRoster.teamLeader.myWeapons[MadnessRoster.playerRoster.teamLeader.mySprite.myWeapon] != undefined) { MadnessRoster.playerRoster.teamLeader.myStartup = 'startup3'; } else { MadnessRoster.playerRoster.teamLeader.myStartup = 'startup2b'; } } MadnessLevel.currentLevel.lockDoor(0, 0); MadnessPopup.closeAll(); MadnessPopup.addBuffer(10, null); MadnessPopup.addPopup('lines', 'WAVE ' + String(MadnessLevel.currentLevel.totalWaves), null, 440, 170, undefined, 90, MadnessEvents.arena_1_waves, null); }; v1.arena_1_waves = function () { var v3 = 8; var v2 = Math.ceil(MadnessLevel.currentLevel.totalWaves / 3); var v1 = 1; while (v1 <= v3) { MadnessLevel.currentLevel.createRoster(MadnessLevel.myRooms[0], CharacterGenerator.returnWaveList(MadnessLevel.currentLevel.totalWaves, v1), 'enemy', ItemGenerator.returnWaveLoadout(MadnessLevel.currentLevel.totalWaves, v1), v2 - Math.floor(v1 / 5)); MadnessLevel.myRooms[0].myRosters[MadnessLevel.myRooms[0].myRosters.length - 1].arenanum = v1; ++v1; } MadnessLevel.currentLevel.addEvent(MadnessLevel.myRooms[0].myRosters[MadnessLevel.myRooms[0].myRosters.length - 1], MadnessEvents.arena_1_clear); }; v1.arena_1_clear = function () { MadnessPopup.addPopup('lines', 'WAVE COMPLETE', null, 440, 170, undefined, 90, null, null); MadnessPopup.addBuffer(70, MadnessEvents.arena_1_pause); MadnessPopup.addPopup('arena', '', null, 440, 100, undefined, 50, MadnessEvents.arena_1_reset, null); }; v1.arena_1_dead = function () { MadnessLevel.currentLevel.totalWaves = 1; MadnessSaveData.saveGame(); MadnessPopup.addBuffer(20, MadnessEvents.arena_1_pause); MadnessPopup.addPopup('arena', '', null, 440, 100, undefined, 50, MadnessEvents.arena_1_resetB, null); }; v1.arena_1_pause = function () { MadWorld.thisWorld.pauseGame(); }; v1.arena_1_reset = function () { MadnessLevel.currentLevel.unlockDoor(0, 0); MadnessLevel.currentLevel.addEvent(MadnessLevel.myRooms[0].myActivators[0], MadnessEvents.arena_1_START); if (MadnessRoster.playerRoster.teamLeader.myWaves < MadnessLevel.currentLevel.totalWaves) { MadnessRoster.playerRoster.teamLeader.myWaves = MadnessLevel.currentLevel.totalWaves; } if (_root.arenaWaves < MadnessLevel.currentLevel.totalWaves) { _root.arenaWaves = MadnessLevel.currentLevel.totalWaves; } MadnessRoster.playerRoster.teamLeader.applyXP(_root.earnedXP); _root.earnedXP = 0; MadnessRoster.playerRoster.myCash += _root.earnedCash; _root.earnedCash = 0; MadnessRoster.playerRoster.myCash = Math.floor(MadnessRoster.playerRoster.myCash); ++MadnessLevel.currentLevel.totalWaves; CharacterGenerator.storePopulator(); ItemGenerator.storePopulator(); if (!MadnessTransition.transitionLock) { _root.createTransition('fade', 'arena_menu', null); } MadnessLevel.levelVictory = false; MadnessLevel.levelFailed = false; }; v1.arena_1_resetB = function () { MadnessRoster.playerRoster.teamLeader.applyXP(_root.earnedXP); _root.earnedXP = 0; MadnessRoster.playerRoster.myCash += _root.earnedCash; _root.earnedCash = 0; MadnessRoster.playerRoster.myCash = Math.floor(MadnessRoster.playerRoster.myCash); CharacterGenerator.storePopulator(); ItemGenerator.storePopulator(); if (!MadnessTransition.transitionLock) { _root.createTransition('fade', 'arena_menu', null); } MadnessLevel.levelVictory = false; MadnessLevel.levelFailed = false; }; v1.arena_1_store = function () { if (!MadnessTransition.transitionLock) { _root.createTransition('fade', 'arena_menu', null); } }; } else { goto 41023; } storedv1.bossEvents = function (inChar, inEvent) { if (inChar.myDataRef.myBoss == 'mag1') { if (inEvent == 'start') { inChar.myFacing = 'left'; inChar._parent.attachMovie('start_point', 'bossStart', inChar._parent.getNextHighestDepth()); inChar._parent.bossStart._x = inChar._parent.WPbossfall._x; inChar._parent.bossStart._y = inChar._parent.WPbossfall._y; inChar._parent.bossStart.startFacing = inChar.myFacing; inChar._parent.bossStart._visible = false; } if (inEvent == 'tick') { if (inChar.myDataRef.myBossPhase == 0) { if (inChar.myStatus == 'idle' || inChar.myStatus == 'run' || inChar.myStatus == 'backtrack') { if (inChar._x < MadnessRoster.playerRoster.teamLeader.mySprite._x) { inChar.myFacing = 'right'; } else { inChar.myFacing = 'left'; } } } } if (inEvent == 'kill_boss') { if (inChar.myDataRef.myBossPhase == 0) { inChar.myDataRef.myBossPhase = 1; inChar.myStatus = 'dead'; inChar.mySubStatus = '_stagger_mag1'; inChar.myFacing = inChar._parent.bossStart.startFacing; inChar.mySprite.gotoAndStop(inChar.myStatus + inChar.mySubStatus); inChar.dropGun(); inChar.myDataRef.myWeapons[0].myOwner = undefined; inChar.myDataRef.myWeapons[0] = undefined; inChar.myDataRef.myHealth = 1.0e+022; inChar.myHealth = 1.0e+022; } if (inChar.myDataRef.myBossPhase == 4) { inChar.myDataRef.myBossPhase = 1; inChar.myStatus = 'dead'; inChar.mySubStatus = '_mag1'; inChar.myFacing = inChar._parent.bossStart.startFacing; inChar.mySprite.gotoAndStop(inChar.myStatus + inChar.mySubStatus); inChar.dropGun(); inChar.myDataRef.myWeapons[0].myOwner = undefined; inChar.myDataRef.myWeapons[0] = undefined; } } if (inEvent == 'death1') { inChar.myDataRef.myBossPhase = 2; inChar.myStatus = 'run'; inChar.myMission = 'retreat'; inChar.mySpeed *= 2; inChar.myAccel *= 2; inChar.mySubStatus = '_wounded'; inChar.myFacing = inChar._parent.bossStart.startFacing; inChar.mySprite.gotoAndStop(inChar.myStatus + inChar.mySubStatus); inChar.myDataRef.myHealth = 1.0e+022; inChar.myHealth = 1.0e+022; inChar.attractToMC(inChar._parent.bossStart, ''); } if (inEvent == 'go_to') { if (inChar.myDataRef.myBossPhase == 2) { inChar.myDataRef.myBossPhase = 3; inChar.myDataRef.equipItem(ItemGenerator.createWeapon('ppk', false), 0); inChar.myDataRef.myWeapons[0].noPickup = true; inChar.myDataRef.myWeapons[0].myDamage *= 3; inChar.myDataRef.myWeapons[0].myClips = 2000; inChar.myStatus = 'dead'; inChar.myFacing = inChar._parent.bossStart.startFacing; inChar.mySubStatus = '_stagger_mag2'; inChar.mySprite.gotoAndStop(inChar.myStatus + inChar.mySubStatus); inChar.myDataRef.myHealth = 1.0e+022; inChar.myHealth = 1.0e+022; } } if (inEvent == 'death2') { inChar.myDataRef.myBossPhase = 4; inChar.myStatus = 'incap'; inChar.mySubStatus = '_mag'; inChar.myMission = 'engage'; inChar.rofTimer = 9999; inChar.reloadTimer = -1; inChar.myFacing = inChar._parent.bossStart.startFacing; inChar.myWidth = inChar.myHeight * inChar.myDataRef.myScale; inChar.myDataRef.myWidth = inChar.myWidth; inChar.mySprite.gotoAndStop(inChar.myStatus + inChar.mySubStatus); inChar.myDataRef.myHealth = inChar.myDataRef.myHealthMax / 2; inChar.myHealth = inChar.myDataRef.myHealthMax / 2; inChar.myDataRef.myHealthMax = inChar.myDataRef.myHealth; inChar.myHealthMax = inChar.myHealth; } if (inEvent == 'death3') { inChar.myDataRef.myBossPhase = 5; } } if (inChar.myDataRef.myBoss == 'mag2') { if (inEvent == 'start') { inChar.myMission = 'engage'; MadnessLevel.currentLevel.myDifficulty = 2; inChar.myFacing = 'left'; inChar._parent.attachMovie('start_point', 'bossStart', inChar._parent.getNextHighestDepth()); inChar._parent.bossStart._x = inChar._parent.WPbossfall._x; inChar._parent.bossStart._y = inChar._parent.WPbossfall._y; inChar._parent.bossStart.startFacing = inChar.myFacing; inChar._parent.bossStart._visible = false; } if (inEvent == 'tick') { } if (inEvent == 'kill_boss') { if (inChar.myDataRef.myBossPhase == 0) { inChar.myDataRef.myBossPhase = 1; inChar.myStatus = 'dead'; inChar.mySubStatus = '_mag2'; inChar.myFacing = inChar._parent.bossStart.startFacing; inChar.mySprite.gotoAndStop(inChar.myStatus + inChar.mySubStatus); inChar.dropGun(); inChar.myDataRef.myWeapons[0].myOwner = undefined; inChar.myDataRef.myWeapons[0] = undefined; MadnessLevel.currentLevel.applyTrack(MadnessLevel.currentLevel.myTrack, MadnessLevel.myRooms[19]); SwainAudioPlayer.playTrack(MadWorld.thisWorld.myRoomRef.myTrack); } } } }; label 41023: ASSetPropFlags(_global.MadnessEvents.prototype, null, 1); #endinitclip } movieClip 8399 __Packages.MadnessPopup { #initclip if (!_global.MadnessPopup) { var v1 = function () { super(); this.onEnterFrame = this.tick; }; _global.MadnessPopup = v1; _global.MadnessPopup extends MovieClip; var v2 = v1.prototype; v2.init = function (inDataRef) { this._alpha = 20; this.appearing = true; this.myDataRef = inDataRef; this.myLinkedItem = this.myDataRef.myLinkedItem; if (this.myLinkedItem.myCharacter != undefined) { this.myLinkedItem = this.myDataRef.myLinkedItem.mySprite; } this.myType = inDataRef.myType; this.myText = inDataRef.myText; this.myChar = inDataRef.myChar; this._y = inDataRef.myY; this._x = inDataRef.myX; this.myTimer = inDataRef.myTimer; this.myYesFunction = inDataRef.myYesFunction; this.myNoFunction = inDataRef.myNoFunction; this.gotoAndStop(this.myType); if (this.myType == 'talk') { this.gotoAndPlay(this.myType); } this.myTextField.text = this.myText; this.myTextField2.text = this.myText; if (this.myType == 'mission') { this.myTitle1.text = this.myLinkedItem.myName; this.myTitle2.text = this.myLinkedItem.myName; } if (this.myType == 'talk') { if (this.myLinkedItem.mySprite.myHead != undefined) { this.myLinkedItem = this.myLinkedItem.mySprite.myHead; } this.lineConnectX = 0; this.lineConnectY = this.myTextField.textHeight - 5; if (this.lineConnectY < 40) { this.lineConnectY = 30; } this.moveTarget(); this.drawLine(); } if (this.myType == 'help') { this.myMask._xscale = 100 + 100 * (this.myTextField.textWidth / 20) + 52; this.myMask._yscale = 100 + 100 * (this.myTextField.textHeight / 20) + 76; this.myFrame._visible = false; this.createEmptyMovieClip('borderMC', this.getNextHighestDepth()); this.borderMC.lineStyle(1, 16711680, 100, true, 'normal', 'square', 'miter', 1); this.borderMC.moveTo(-this.myMask._width / 2, 0); this.borderMC.lineTo(this.myMask._width / 2, 0); this.borderMC.lineTo(this.myMask._width / 2, this.myMask._height); this.borderMC.lineTo(-this.myMask._width / 2, this.myMask._height); this.borderMC.lineTo(-this.myMask._width / 2, 0); var v4 = -this.myMask._width / 2; var v3 = 0; this.lineConnectX = 0; this.lineConnectY = this.myMask._height; this.myBG._x = v4; this.myBG._y = v3; this.myFrame._x = v4; this.myFrame._y = v3; this.myTextField._x = 14 + v4; this.myTextField._y = 16 + v3; this.myMask._x = v4; this.myMask._y = v3; if (this.myDataRef.buffer == false) { this.moveTarget(); this.drawLine(); } else { this.myBG._visible = false; this.myFrame._visible = false; this.myTextField._visible = false; this.myMask._visible = false; } } else { this.targetCoord.x = 0; this.targetCoord.y = 0; this.globalToLocal(this.targetCoord); this.myShadow._x = this.targetCoord.x; this.myShadow._y = this.targetCoord.y; } if (this.myType == 'arena') { this.setArenaStats(MadnessRoster.playerRoster.teamLeader); } if (this.myType == 'mission') { this.missionIconAdjust(); this.missionDifficulty(); } MadnessPopup.currentPopup = this; if (this.myType == 'lines') { SwainAudioPlayer.playSound('menu3', 0); } if (this.myType == 'help') { SwainAudioPlayer.playSound('menu1', 0); } if (this.myType == 'talk') { SwainAudioPlayer.playSound('talk', 0); } }; v2.tick = function () { if (this.myTimer > 1) { --this.myTimer; if (this.myType == 'arena' && this.myTimer < 2) { this.myTimer = 2; } } if (this.myTimer == 1) { this.appearing = false; if (this.myType !== 'help' && this.myType != 'lines' || this._alpha <= 0) { if (this.myYesFunction != null) { this.pressYes(false); } this.closePopup(); } } if (this._alpha < 100 && this.appearing) { this._alpha += 20; } if (this._alpha > 0 && !this.appearing) { this._alpha -= 20; } if (this.myDataRef.buffer == false) { this.moveTarget(); this.drawLine(); } if (this.myType == 'arena' && this.myTimer == 2) { this.applyXPFromEarned(); this.setArenaStats(MadnessRoster.playerRoster.teamLeader); } }; v1.beginPopup = function () { var v2 = _root.attachMovie('madness_popup', 'np' + SwainMath.randomNumber(0, 999999999), _root.getNextHighestDepth()); v2.init(MadnessPopup.pendingPopups[0]); v2.onEnterFrame = v2.tick; MadnessPopup.pendingPopups.splice(0, 1); }; v1.addBuffer = function (inTimer, inYesFunction) { var v1 = new Object(); if (MadnessPopup.pendingPopups == undefined) { MadnessPopup.pendingPopups = new Array(); } MadnessPopup.pendingPopups.push(v1); v1.buffer = true; v1.myLinkedItem = v1; v1.myTimer = inTimer; v1.myType = 'buffer'; v1.myYesFunction = inYesFunction; if (MadnessPopup.currentPopup == undefined) { MadnessPopup.beginPopup(); } }; v1.addPopup = function (inType, inText, inChar, inStickX, inStickY, inLinkedItem, inTimer, inYesFunction, inNoFunction) { var v1 = new Object(); if (MadnessPopup.pendingPopups == undefined) { MadnessPopup.pendingPopups = new Array(); } MadnessPopup.pendingPopups.push(v1); v1.buffer = false; v1.myType = inType; v1.myText = inText; v1.myChar = inChar; v1.myY = inStickY; v1.myX = inStickX; v1.myLinkedItem = inLinkedItem; v1.myTimer = inTimer; v1.myYesFunction = inYesFunction; v1.myNoFunction = inNoFunction; if (MadnessPopup.currentPopup == undefined) { MadnessPopup.beginPopup(); } }; v2.closePopup = function () { MadnessPopup.currentPopup.removeMovieClip(); MadnessPopup.currentPopup = undefined; if (MadnessPopup.pendingPopups.length > 0) { MadnessPopup.beginPopup(); } }; v1.closeAll = function () { MadnessPopup.pendingPopups = new Array(); MadnessPopup.currentPopup.closePopup(); }; v2.moveTarget = function () { if (this.myType == 'help' || this.myType == 'talk') { if (this.myLinkedItem._x == undefined) { this.myTarget._visible = false; this.myLineStart._visible = false; } else { this.targetCoord.x = 0; this.targetCoord.y = 0; this.myLinkedItem.localToGlobal(this.targetCoord); this.globalToLocal(this.targetCoord); this.myTarget._x = this.targetCoord.x; this.myTarget._y = this.targetCoord.y; if (this.myType == 'talk') { if (this.myTarget._x < 0) { this.myTarget._xscale = 100; } else { this.myTarget._xscale = -100; } if (this.myTarget._x < 0) { this.myTarget._x += 36; } else { this.myTarget._x -= 36; } } this.myLineStart._x = this.lineConnectX; this.myLineStart._y = this.lineConnectY; } } }; v2.drawLine = function () { if (this.myType == 'help' || this.myType == 'talk') { this.lineMC.removeMovieClip(); if (this.myLinkedItem._x != undefined) { this.createEmptyMovieClip('lineMC', this.getNextHighestDepth()); this.lineMC.lineStyle(1, 16711680, 100, true, 'normal', 'square', 'miter', 1); if (this.myTarget._y <= 0) { this.lineMC.moveTo(this.lineConnectX, 0); this.lineMC.lineTo(this.lineConnectX, this.myTarget._y / 2); } else { this.lineMC.moveTo(this.lineConnectX, this.lineConnectY); this.lineMC.lineTo(this.lineConnectX, this.lineConnectY + (this.myTarget._y - this.lineConnectY) / 2); } if (this.myType == 'talk') { this.lineMC.lineTo(this.myTarget._x, this.myTarget._y); } else { if (this.myTarget._x < this.lineConnectX) { this.lineMC.lineTo(this.myTarget._x + this.myTarget._width / 2, this.myTarget._y); } else { this.lineMC.lineTo(this.myTarget._x - this.myTarget._width / 2, this.myTarget._y); } } } } }; v2.pressYes = function (inPlayerPressedYesManually) { if (inPlayerPressedYesManually) { SwainAudioPlayer.playSound('menu4', 0); } this.myYesFunction(); this.closePopup(); }; v2.pressNo = function () { this.myNoFunction(); this.closePopup(); }; v2.setArenaStats = function (inSource) { this.myLevelTEXT.text = inSource.myLevel; this.myCashTEXT.text = '+ $' + String(Math.floor(MadnessRoster.playerRoster.myCash)); this.xpBar.myBar._xscale = (inSource.myXP / MadnessDataFile.getLevelUpXP(inSource.myLevel, inSource.myXP)) * 100; }; v2.applyXPFromEarned = function () { if (_root.earnedXP > 0) { if (_root.earnedXP > 1) { MadnessRoster.playerRoster.teamLeader.applyXP(_root.earnedXP * 0.1); _root.earnedXP -= _root.earnedXP * 0.1; } else { MadnessRoster.playerRoster.teamLeader.applyXP(_root.earnedXP); _root.earnedXP = 0; } } if (_root.earnedCash > 0) { if (_root.earnedCash > 1) { MadnessRoster.playerRoster.myCash += _root.earnedCash * 0.1; _root.earnedCash -= _root.earnedCash * 0.1; } else { MadnessRoster.playerRoster.myCash += _root.earnedCash; _root.earnedCash = 0; } } }; v2.pressMissionCharacter = function (inSlot) { MadnessRoster.playerRoster.makeLeader(MadnessRoster.playerRoster.myActiveMembers[inSlot]); var v2 = 0; while (v2 < 4) { this['leader' + v2]._visible = MadnessRoster.playerRoster.myActiveMembers[v2] == MadnessRoster.playerRoster.teamLeader; ++v2; } this.missionIconAdjust(); }; v2.rollOverMissionCharacter = function (inSlot) { var v2 = 0; while (v2 < 4) { var v4 = new Color(this['icon' + v2]); var v3 = {'rb': 150, 'gb': 80, 'bb': 80}; if (v2 != inSlot) { v3 = {'rb': 0, 'gb': 0, 'bb': 0}; } v4.setTransform(v3); ++v2; } }; v2.rollOutMissionCharacter = function (inSlot) { var v3 = new Color(this['icon' + inSlot]); var v2 = {'rb': 0, 'gb': 0, 'bb': 0}; v3.setTransform(v2); }; v2.missionIconAdjust = function () { MadnessRoster.playerRoster.readjustActiveOrder(); var v4; var v3; var v2 = 0; while (v2 < 4) { v4 = this['icon' + v2]; v3 = MadnessRoster.playerRoster.myActiveMembers[v2]; v4.deadX._visible = false; if (v3 == undefined) { this['charName' + v2].text = ''; v4.mySprite._visible = false; this['select' + v2]._visible = false; } else { this['charName' + v2].text = v3.myName; MadnessStoreHire.updateCharCard(v4, v3, false); } this['leader' + v2]._visible = v3 == MadnessRoster.playerRoster.teamLeader; ++v2; } }; v2.missionDifficulty = function () { var v3 = ['easy', 'normal', 'hard']; var v2 = 0; while (v2 < v3.length) { this[v3[v2] + 'Difficulty']._visible = v3[v2] == MadnessGameSelect.myDifficulty; this[v3[v2] + 'Button']._visible = v3[v2] != MadnessGameSelect.myDifficulty; ++v2; } }; v2.missionChangeDifficulty = function (inDiff) { if (!MadnessTransition.transitionLock) { MadnessGameSelect.myDifficulty = inDiff; this.missionDifficulty(); } }; v1.returnSkipable = function () { var v1 = 0; while (v1 < MadnessPopup.pendingPopups.length) { if (MadnessPopup.pendingPopups[v1].myType != 'help' && MadnessPopup.pendingPopups[v1].myType != 'buffer') { return false; } ++v1; } return MadnessPopup.currentPopup.myType == 'help' || MadnessPopup.currentPopup.myType == 'buffer' || MadnessPopup.currentPopup == undefined; }; v2.refreshText = function () { this.myTextField.text = this.myText; this.myTextField2.text = this.myText; }; v2.targetCoord = new Object(); ASSetPropFlags(_global.MadnessPopup.prototype, null, 1); } #endinitclip } movieClip 8400 __Packages.MadnessStoreHire { #initclip if (!_global.MadnessStoreHire) { var v1 = function () { super(); }; _global.MadnessStoreHire = v1; _global.MadnessStoreHire extends MovieClip; var v2 = v1.prototype; v2.init = function () { _root.menuBar.myCashTEXT.text = MadnessTeamSetup.returnPlayerCash(); var v5 = 0; while (this['storeIcon' + String(v5)] != undefined) { this['storeIcon' + String(v5)].removeMovieClip(); ++v5; } var v3; var v7 = 1; var v6 = 140; var v4 = 0; while (v4 < MadnessRoster.storeRoster.myMembers.length) { this['storeIcon' + String(v4)].removeMovieClip(); v3 = this.attachMovie('madness_char_icon', 'storeIcon' + String(v4), this.getNextHighestDepth()); v3._x = 425 + v4 * v6 - (MadnessRoster.storeRoster.myMembers.length - 1) * v6 / 2; v3._y = 360; v3.gotoAndStop('hire'); v3.closeCard._visible = true; v3.myDataRef = MadnessRoster.storeRoster.myMembers[v4]; MadnessStoreHire.updateCharCard(v3.spriteGroup, MadnessRoster.storeRoster.myMembers[v4], MadnessRoster.storeRoster.myMembers[v4 - 1] != undefined || v4 == 0); v3.buttonLead._visible = false; v3.charName2TEXT.text = v3.myDataRef.myName; v3.levelTEXT.text = 'Level ' + v3.myDataRef.myLevel; v3.barTEXT.text = MadnessDataFile.findHighestSkill(v3.myDataRef); v3.costTEXT.text = '$' + Math.ceil(v3.myDataRef.myHireCost); MadnessStoreHire.updateIndividualBar(v3.barMerc, v3.myDataRef['skill' + v3.barTEXT.text]); v3.healthTEXT.text = v3.myDataRef.myHealthMax; v3.tacBarTEXT.text = v3.myDataRef.myTacticsMax; v3.mySprite.cacheAsBitmap = true; v3.myShade.cacheAsBitmap = true; v3.amActive.cacheAsBitmap = true; ++v4; } this.resetBuyButtons(); this.displayCash = MadnessStoreHire.setDisplayCash(_root.myCash); this.squadmatesTEXT.text = String(Math.floor(MadnessRoster.playerRoster.teamLeader.statLEAD / 5)); if (Math.floor(MadnessRoster.playerRoster.teamLeader.statLEAD / 5) == 1) { this.squadmatesTEXT.text += ' SQUADMATE'; } else { this.squadmatesTEXT.text += ' SQUADMATES'; } if (MadnessRoster.storeRoster.myMembers.length == 0) { this.noHirelings._visible = true; } else { this.noHirelings._visible = false; } }; v2.pressBuy = function (inCard) { if (MadnessRoster.playerRoster.myCash >= inCard.myDataRef.myHireCost) { if (MadnessRoster.playerRoster.myMembers.length < MadnessRoster.maxRoster) { MadnessRoster.playerRoster.addCharacter(inCard.myDataRef); MadnessRoster.storeRoster.removeCharacter(inCard.myDataRef); MadnessRoster.playerRoster.myCash = Math.floor(MadnessRoster.playerRoster.myCash - inCard.myDataRef.myHireCost); _root.menuBar.myCashTEXT.text = MadnessTeamSetup.returnPlayerCash(); trace('Hire cash set to ' + _root.menuBar.myCashTEXT.text); this.init(); SwainAudioPlayer.playSound('buy', 0); SwainAudioPlayer.playSound('blunt', 0); } else { SwainAudioPlayer.playSound('nobuy', 0); } } else { SwainAudioPlayer.playSound('nobuy', 0); } }; v2.resetBuyButtons = function () {}; v1.setDisplayCash = function (inCash) { return '$' + String(inCash); }; v1.updateBars = function (inLoc, inData) { var v2 = ['barStr', 'barDex', 'barTac', 'barEnd', 'barLead', 'barAwr', 'barPistol', 'barRevolver', 'barSMG', 'barRifle', 'barShotgun', 'barMelee', 'barUnarmed']; var v6 = ['statSTR', 'statDEX', 'statTAC', 'statEND', 'statLEAD', 'statAWR', 'skillPistol', 'skillRevolver', 'skillSMG', 'skillRifle', 'skillShotgun', 'skillMelee', 'skillUnarmed']; var v7; var v3; var v8; inLoc.healthTEXT.text = inData.myHealthMax; inLoc.tacBarTEXT.text = inData.myTacticsMax; inLoc.levelTEXT.text = 'Level ' + inData.myLevel; inLoc.charName2TEXT.text = inData.myName; inLoc.charNameTEXT.text = inData.myName; var v1 = 0; while (v1 < v2.length) { v3 = inLoc[v2[v1]]; MadnessStoreHire.updateIndividualBar(v3, inData[v6[v1]]); ++v1; } }; v1.updateIndividualBar = function (inBar, inValue) { inBar.peg1.gotoAndStop(1); inBar.peg2.gotoAndStop(1); inBar.peg3.gotoAndStop(1); inBar.peg4.gotoAndStop(1); inBar.peg5.gotoAndStop(1); inBar.peg6.gotoAndStop(1); inBar.peg7.gotoAndStop(1); inBar.peg8.gotoAndStop(1); inBar.peg9.gotoAndStop(1); inBar.peg10.gotoAndStop(1); var v1 = 1; var v2 = 0; while (v2 < inValue) { inBar['peg' + v1].nextFrame(); ++v1; if (v1 > 10) { v1 = 1; } ++v2; } }; v1.updateCharCard = function (inCard, inData, inAddTeam) { if (inData != undefined) { inCard.gotoAndStop(1); inCard.myDataRef = inData; if (_root.storeItem != undefined && !_root.storeItem.finished) { inCard.myWeapon = 2; } else { inCard.myWeapon = 0; } if (_root.storeItem != undefined && !_root.storeItem.finished && _root.storeItem.myCategory == 'hat') { inCard.myHat = 2; } else { inCard.myHat = 0; } if (_root.storeItem != undefined && !_root.storeItem.finished && _root.storeItem.myCategory == 'mask') { inCard.myMask = 2; } else { inCard.myMask = 0; } if (_root.storeItem != undefined && !_root.storeItem.finished && _root.storeItem.myCategory == 'mouth') { inCard.myMouth = 2; } else { inCard.myMouth = 0; } if (_root.storeItem != undefined && !_root.storeItem.finished && _root.storeItem.myCategory == 'shirt') { inCard.myShirt = 2; } else { inCard.myShirt = 0; } inCard.myFacing = 'right'; inCard.reloadTimer = -1; inCard.statName = inCard.myDataRef.myName; inCard.mySprite.gotoAndStop(inCard.myDataRef.myIconPos); if (inCard._name == 'spriteGroup') { inCard.mySprite.gotoAndPlay(1); } MadnessCharacter.adjustSprite(inCard); MadnessCharacter.clearWounds(inCard, 'head'); MadnessCharacter.clearWounds(inCard, 'body'); MadnessCharacter.checkWounds(inCard); inCard.weaponSlot0.myWeapon.gotoAndStop(inCard.myDataRef.myWeapons[0].myType); inCard.weaponSlot1.myWeapon.gotoAndStop(inCard.myDataRef.myWeapons[1].myType); ItemGenerator.setItemSprite(inCard.weaponSlot0.myWeapon.mySprite, inCard.myDataRef.myWeapons[0]); ItemGenerator.setItemSprite(inCard.weaponSlot1.myWeapon.mySprite, inCard.myDataRef.myWeapons[1]); if (inCard.myDataRef.myWeapons[0] == undefined) { inCard.weaponSlot0.gotoAndStop(2); } if (inCard.myDataRef.myWeapons[1] == undefined) { inCard.weaponSlot1.gotoAndStop(2); } if (inCard.myDataRef.amSpecial) { inCard.myBG.gotoAndStop(2); } else { inCard.myBG.gotoAndStop(1); } } else { inCard.myDataRef = undefined; inCard.gotoAndStop(2); inCard.addChar._visible = false; } }; v2.rejectCharacter = function (inCard) {}; v2.gunClick = function (inCard, inWeapon) {}; v2.gunRollOver = function (inCard, inWeapon) {}; v2.gunRollOut = function (inCard, inWeapon) {}; v2.displayCash = new String(); v2.myRoster = 'store'; ASSetPropFlags(_global.MadnessStoreHire.prototype, null, 1); } #endinitclip } movieClip 8401 __Packages.MadnessTeamSetup { #initclip if (!_global.MadnessTeamSetup) { var v1 = function () { super(); }; _global.MadnessTeamSetup = v1; _global.MadnessTeamSetup extends MovieClip; var v2 = v1.prototype; v2.init = function () { _root.menuBar.myCashTEXT.text = MadnessTeamSetup.returnPlayerCash(); this.gotoAndStop(1); SwainAudioPlayer.playTrack('menu'); this.removeAllCards(); var v5 = 140; var v3; var v4 = 0; while (v4 < MadnessRoster.playerRoster.myActiveMembers.length) { this['storeIcon' + String(v4)].removeMovieClip(); v3 = this.attachMovie('madness_char_icon', 'storeIcon' + String(v4), this.getNextHighestDepth()); v3._x = 425 + v4 * v5 - (MadnessRoster.playerRoster.myActiveMembers.length - 1) * v5 / 2; v3._y = 380; v3.gotoAndStop(1); v3.closeCard._visible = true; v3.myDataRef = MadnessRoster.playerRoster.myActiveMembers[v4]; MadnessStoreHire.updateCharCard(v3.spriteGroup, MadnessRoster.playerRoster.myActiveMembers[v4], MadnessRoster.playerRoster.myActiveMembers[v4 - 1] != undefined || v4 == 0); this.setLeaderBar(v3); v3.charName2TEXT.text = v3.myDataRef.myName; v3.healthTEXT.text = v3.myDataRef.myHealthMax; v3.tacBarTEXT.text = v3.myDataRef.myTacticsMax; ++v4; } if (MadnessRoster.playerRoster.teamLeader == undefined && this.storeIcon0.spriteGroup.myDataRef != undefined) { this.makeLeader(this.storeIcon0.spriteGroup.myDataRef); } this.displayPage = 0; this.selectData = MadnessRoster.playerRoster.myMembers[0]; }; v2.init2 = function () { _root.menuBar.myCashTEXT.text = MadnessTeamSetup.returnPlayerCash(); this.gotoAndStop(2); SwainAudioPlayer.playTrack('menu'); this.removeAllCards(); var v3; var v7 = 5; var v11 = 80; var v8 = 105; var v5 = 6; var v6 = 3; var v10 = 300; var v9 = 170; if (this.selectData == undefined) { this.selectData = MadnessRoster.playerRoster.myMembers[0]; } var v4 = 0; while (v4 < v6 * v5) { v3 = this.attachMovie('madness_char_portrait', 'portrait' + String(v4), this.getNextHighestDepth()); if (v4 / v5 == Math.floor((v4 + 1) / v5)) { v3._x = v10; } else { v3._x = this['portrait' + (v4 - 1)]._x + v11 + v7; } v3._y = v9 + Math.floor(v4 / v5) * (v8 + v7); if (MadnessRoster.playerRoster.myMembers[v4 + Math.floor(this.displayPage * (v6 * v5))] != undefined) { MadnessStoreHire.updateCharCard(v3, MadnessRoster.playerRoster.myMembers[v4 + Math.floor(this.displayPage * (v6 * v5))], true); v3.amActive._visible = MadnessRoster.playerRoster.returnActiveCharacter(v3.myDataRef); v3.amActive.activeStar.gotoAndStop(1); if (MadnessRoster.playerRoster.teamLeader == v3.myDataRef) { v3.amActive.activeStar.gotoAndStop(2); } v3.myShade._visible = !(MadnessRoster.playerRoster.returnActiveCharacter(v3.myDataRef) || v3.myDataRef == this.selectData); v3.selectMe._visible = v3.myDataRef == this.selectData; } else { v3.gotoAndStop(3); v3.myBG.gotoAndStop(1); } v3.mySprite.cacheAsBitmap = true; v3.myShade.cacheAsBitmap = true; v3.amActive.cacheAsBitmap = true; ++v4; } this.pagePrev._visible = this.displayPage > 0; this.pageNext._visible = Math.floor((MadnessRoster.playerRoster.myMembers.length - 1) / v6 * v5) > this.displayPage; this.pageStringTEXT.text = 'PAGE ' + String(this.displayPage + 1); this.selectDisplay.gotoAndStop('none'); if (this.selectData != undefined) { this.selectDisplay.gotoAndStop(1); } MadnessStoreHire.updateCharCard(this.selectDisplay.spriteGroup, this.selectData, true); MadnessStoreHire.updateBars(this.selectDisplay, this.selectData); this.myButtons.gotoAndStop('main'); if (this.selectData == MadnessRoster.playerRoster.teamLeader) { this.myButtons.buttonSquad.gotoAndStop('leader'); } else { if (MadnessRoster.playerRoster.returnActiveCharacter(this.selectData)) { this.myButtons.buttonSquad.gotoAndStop('active'); } else { if (MadnessRoster.playerRoster.myActiveMembers.length - 1 >= Math.floor(MadnessRoster.playerRoster.teamLeader.statLEAD / 5)) { this.myButtons.buttonSquad.gotoAndStop('full'); } else { this.myButtons.buttonSquad.gotoAndStop('add'); } } } if (this.selectData == MadnessRoster.playerRoster.teamLeader) { this.myButtons.buttonStats.gotoAndStop('player'); this.myButtons.buttonStats.statFlash._visible = this.selectData.statPoints > 0 || this.selectData.skillPoints > 0; } else { this.myButtons.buttonStats.gotoAndStop('follower'); this.myButtons.buttonStats.statFlash._visible = false; } }; v2.init3 = function () { _root.menuBar.myCashTEXT.text = MadnessTeamSetup.returnPlayerCash(); this.gotoAndStop(3); SwainAudioPlayer.playTrack('menu'); this.removeAllCards(); var v7 = 15; var v8 = 72; var v11 = 74; var v13 = 68; var v12 = 17; var v18 = 6; var v17 = 3; var v10 = 310; var v9 = 170; var v3; if (this.statCat == 'stat') { v3 = ['STR', 'DEX', 'TAC', 'END', 'LEAD', 'AWR']; } if (this.statCat == 'skill') { v3 = ['Pistol', 'SMG', 'Rifle', 'Shotgun', 'Melee', 'Unarmed']; } this.selectData = MadnessRoster.playerRoster.teamLeader; var v6 = 0; while (v6 < v3.length) { var v4 = 0; while (v4 < 4) { var v5 = this.attachMovie('perk_peg', 'peg' + String(v6) + '_' + String(v4), this.getNextHighestDepth()); v5._x = v10 + (v6 * v7 + v6 * v8); v5._y = v9 + v11 + v12 * v4; v5.gotoAndStop(1); if (this.selectData[this.statCat + v3[v6]] > v4 + 10 * this.displayPage) { v5.gotoAndStop(2 + this.displayPage); } v5.myStat = v3[v6]; v5.myNum = v4 + 1 + 10 * this.displayPage; v5.justBought._visible = this.purchasedStat == this.statCat + v5.myStat + v5.myNum; v5.amSelected._visible = false; ++v4; } ++v6; } v6 = 0; while (v6 < v3.length) { v4 = 5; while (v4 < 9) { v5 = this.attachMovie('perk_peg', 'peg' + String(v6) + '_' + String(v4), this.getNextHighestDepth()); v5._x = v10 + (v6 * v7 + v6 * v8); v5._y = v9 + v11 + v12 * (v4 - 1) + v13; v5.gotoAndStop(1); if (this.selectData[this.statCat + v3[v6]] > v4 + 10 * this.displayPage) { v5.gotoAndStop(2 + this.displayPage); } v5.myStat = v3[v6]; v5.myNum = v4 + 1 + 10 * this.displayPage; v5.justBought._visible = this.purchasedStat == this.statCat + v5.myStat + v5.myNum; v5.amSelected._visible = false; ++v4; } ++v6; } v6 = 0; while (v6 < v3.length) { v5 = this.attachMovie('perk_5', 'perk' + String(v6) + 'a', this.getNextHighestDepth()); v5._x = v10 + (v6 * v7 + v6 * v8); v5._y = v9 + v11 + v12 * 4; v5.gotoAndStop(1); this.myColorTransform = {'rb': 0, 'gb': 0, 'bb': 0}; if (this.selectData[this.statCat + v3[v6]] > 4 + 10 * this.displayPage) { v5.gotoAndStop(2 + this.displayPage); this.myColorTransform = {'rb': 255, 'gb': 255, 'bb': 255}; } else { v5.myLogo._alpha = 40; } v5.myLogo.gotoAndStop(v3[v6]); this.myColor = new Color(v5.myLogo); this.myColor.setTransform(this.myColorTransform); v5.myStat = v3[v6]; v5.myNum = 5 + 10 * this.displayPage; v5.justBought._visible = this.purchasedStat == this.statCat + v5.myStat + v5.myNum; v5.amSelected._visible = false; ++v6; } v6 = 0; while (v6 < v3.length) { v5 = this.attachMovie('perk_5', 'perk' + String(v6) + 'b', this.getNextHighestDepth()); v5._x = v10 + (v6 * v7 + v6 * v8); v5._y = v9 + v11 + v12 * 8 + v13; v5.gotoAndStop(1); this.myColorTransform = {'rb': 0, 'gb': 0, 'bb': 0}; if (this.selectData[this.statCat + v3[v6]] > 9 + 10 * this.displayPage) { v5.gotoAndStop(2 + this.displayPage); this.myColorTransform = {'rb': 255, 'gb': 255, 'bb': 255}; } else { v5.myLogo._alpha = 40; } v5.myLogo.gotoAndStop(v3[v6]); this.myColor = new Color(v5.myLogo); this.myColor.setTransform(this.myColorTransform); v5.myStat = v3[v6]; v5.myNum = 10 + 10 * this.displayPage; v5.justBought._visible = this.purchasedStat == this.statCat + v5.myStat + v5.myNum; v5.amSelected._visible = false; ++v6; } v6 = 0; while (v6 < v3.length) { v5 = this.attachMovie('perk_icon', 'icon' + String(v6), this.getNextHighestDepth()); v5._x = v10 + (v6 * v7 + v6 * v8); v5._y = v9; v5.gotoAndStop(v3[v6]); v5.myStat = v3[v6]; v5.myNum = 0; if (this.selectData[this.statCat + 'Points'] > 0 && this.selectData[this.statCat + v5.myStat] < this.selectData[this.statCat + 'Cap']) { v5.myBG.gotoAndStop(2); v5.myText.textColor = 16777215; } else { v5.myBG.gotoAndStop(1); v5.myText.textColor = 10066329; } ++v6; } this.pagePrev._visible = this.displayPage > 0; this.pageNext._visible = this.displayPage < 2; this.pageStringTEXT.text = 'PAGE ' + String(this.displayPage + 1); this.myButtons.gotoAndStop('sub'); this.myButtons.buttonBack.gotoAndStop('back'); this.myButtons.buttonAlt.gotoAndStop('none'); if (this.selectData != undefined) { this.selectDisplay.gotoAndStop(5); } else { this.selectDisplay.gotoAndStop('none'); } MadnessStoreHire.updateCharCard(this.selectDisplay.spriteGroup, this.selectData, true); MadnessStoreHire.updateBars(this.selectDisplay, this.selectData); this.myPointsTEXT.text = this.selectData[this.statCat + 'Points']; if (this.selectData[this.statCat + 'Points'] == 0) { this.pointsSpendTEXT.textColor = 10027008; this.myPointsTEXT.textColor = 10027008; } else { this.pointsSpendTEXT.textColor = 16777215; this.myPointsTEXT.textColor = 16777215; } }; v2.addTeammate = function (inData) { MadnessRoster.playerRoster.makeActive(inData); this.init(); }; v2.removeTeammate = function (inCard) { if (inCard.myDataRef != MadnessRoster.playerRoster.teamLeader) { MadnessRoster.playerRoster.removeActive(inCard.myDataRef); this.init(); } }; v2.makeLeader = function (inChar) { MadnessRoster.playerRoster.makeLeader(inChar); var v2 = 0; while (v2 < MadnessRoster.playerRoster.myActiveMembers.length) { this.setLeaderBar(this['storeIcon' + v2]); ++v2; } }; v2.pressPrev = function () { --this.displayPage; this.init2(); SwainAudioPlayer.playSound('menu2', 0); }; v2.pressNext = function () { ++this.displayPage; this.init2(); SwainAudioPlayer.playSound('menu2', 0); }; v2.pressPrev2 = function () { --this.displayPage; this.purchasedStat = ''; this.init3(); SwainAudioPlayer.playSound('menu2', 0); }; v2.pressNext2 = function () { ++this.displayPage; this.purchasedStat = ''; this.init3(); SwainAudioPlayer.playSound('menu2', 0); }; v2.setLeaderBar = function (inCard) { if (MadnessRoster.playerRoster.teamLeader == inCard.spriteGroup.myDataRef && MadnessRoster.playerRoster.teamLeader != undefined) { inCard.buttonLead.gotoAndStop(1); } else { if (inCard.spriteGroup.myDataRef != undefined) { inCard.buttonLead.gotoAndStop(2); } else { inCard.buttonLead.gotoAndStop(3); } } }; v2.pressLeader = function (inSprite) { this.makeLeader(inSprite.spriteGroup.myDataRef); SwainAudioPlayer.playSound('menu1', 0); }; v2.gunClick = function (inCard, inWeapon) { inCard.weaponSlot0.rollCover._visible = false; inCard.weaponSlot1.rollCover._visible = false; this._visible = false; this.selectData = inCard.myDataRef; _root.pickItems(true); SwainAudioPlayer.playSound('menu2', 0); }; v2.gunRollOver = function (inCard, inWeapon) {}; v2.gunRollOut = function (inCard, inWeapon) {}; v2.pressPortrait = function (inPortrait) { this.selectData = inPortrait.myDataRef; this.init2(); SwainAudioPlayer.playSound('menu2', 0); }; v2.pressConfirm = function () { if (MadnessRoster.playerRoster.myActiveMembers.length - 1 < Math.floor(MadnessRoster.playerRoster.teamLeader.statLEAD / 5)) { MadnessRoster.playerRoster.makeActive(this.selectData); this.init2(); SwainAudioPlayer.playSound('menu4', 0); } }; v2.pressRemove = function () { MadnessRoster.playerRoster.removeActive(this.selectData); this.init2(); SwainAudioPlayer.playSound('menu1', 0); }; v2.pressClose = function () { this.init2(); SwainAudioPlayer.playSound('menu1', 0); }; v2.pressStore = function () { _root.pickStore(); SwainAudioPlayer.playSound('menu4', 0); }; v2.pressStats = function (inCat) { if (inCat == '' || this.statCat == undefined) { this.statCat = 'stat'; } else { this.statCat = inCat; } this.displayPage = 0; this.init3(); SwainAudioPlayer.playSound('menu1', 0); }; v2.pressMyGear = function () { this._visible = false; _root.pickItems(true); SwainAudioPlayer.playSound('menu1', 0); }; v2.removeAllCards = function () { var v3 = 0; while (v3 <= MadnessRoster.playerRoster.myActiveMembers.length) { this['storeIcon' + String(v3)].removeMovieClip(); ++v3; } var v4 = 0; while (this['portrait' + String(v4)] != undefined) { this['portrait' + String(v4)].removeMovieClip(); ++v4; } v3 = 0; while (v3 < 6) { var v2 = 0; while (v2 < 4) { this['peg' + String(v3) + '_' + String(v2)].removeMovieClip(); ++v2; } ++v3; } v3 = 0; while (v3 < 6) { this['perk' + String(v3) + 'a'].removeMovieClip(); ++v3; } v3 = 0; while (v3 < 6) { v2 = 5; while (v2 < 9) { this['peg' + String(v3) + '_' + String(v2)].removeMovieClip(); ++v2; } ++v3; } v3 = 0; while (v3 < 6) { this['perk' + String(v3) + 'b'].removeMovieClip(); ++v3; } v3 = 0; while (v3 < 6) { this['icon' + String(v3)].removeMovieClip(); ++v3; } }; v2.clickStat = function (inIcon) { if (this.selectData[this.statCat + 'Points'] > 0 && this.selectData[this.statCat + inIcon.myStat] < this.selectData[this.statCat + 'Cap']) { this.selectData.buyStat(inIcon.myStat, this.statCat); this.displayPage = Math.floor((this.selectData[this.statCat + inIcon.myStat] - 1) / 10); this.purchasedStat = this.statCat + inIcon.myStat + this.selectData[this.statCat + inIcon.myStat]; this.init3(); SwainAudioPlayer.playSound('blunt', 0); } }; v2.displayStatInfo = function (inIcon) { inIcon.amSelected._visible = true; inIcon.amSelected.play(); MadnessDataFile.applyPerkDescription(inIcon.myStat, inIcon.myNum, this.selectDisplay.myNameTEXT, this.selectDisplay.myDescriptionTEXT, this.selectData); }; v1.returnPlayerCash = function () { MadnessRoster.playerRoster.myCash = Math.floor(MadnessRoster.playerRoster.myCash); var v1 = Math.floor(MadnessRoster.playerRoster.myCash); return '$' + v1; }; v2.displayCash = new String(); v2.myRoster = 'team'; v2.displayPage = 0; ASSetPropFlags(_global.MadnessTeamSetup.prototype, null, 1);




http://swfchan.com/40/199014/info.shtml
Created: 31/7 -2019 14:11:46 Last modified: 31/7 -2019 14:11:46 Server time: 22/12 -2024 19:54:10