1# package Agent; 2 3 4require 'DataHelper.pl'; 5use strict; 6 7sub LoadAgent 8{ 9 my ( @Frames, %FrameLookup, %Frames, %States, %Shorthands, 10 $Doodad, $Con, $Con2, 11 @States1, 12 $framedesc, $key, $value, $framename, $nextst, $st, $lastchar, $nextchar, $codename ); 13 14$codename = 'Agent'; 15 16@Frames = LoadFrames( "$codename.dat.txt", 245, 70 ); 17%FrameLookup = CreateFrameLookup( scalar @Frames -1, 18'stand', 1, 19'dummy', 3, 20'start', 7, 21'walk', 10, 22'turn', 9, 23'falling', 9, 24'laying', 1, 25'hurt', 6, 26'won', 23, 27'block', 4, 28'kneeling', 3, 29'onknees', 1, 30'kneelingpunch', 4, 31'kneelingkick', 6, 32'kneelingpunched', 6, 33'kneelingkicked', 4, 34'fun', 11, 35'funb', 6, 36'threat', 7, 37'highpunch', 8, 38'lowpunch', 8, 39'highkick', 4, 40'lowkick', 3, 41'groinkick', 4, 42'kneekick', 8, 43'elbow', 6, 44'spin', 13, 45'sweep', 9, 46'grenade', 6, 47'uppercut', 8, 48'throw', 14, 49'highpunched', 5, 50'lowpunched', 9, 51'groinkicked', 6, 52'swept',3, 53'thrown', 14, 54'killkenny', 16, 55'specpunch', 7 56); 57 58 59 60$Con = { 61'forw'=>'Walk', 62'back'=>'Back', 63'jump'=>'Jump', 64'jumpfw'=>'JumpFW', 65'jumpbw'=>'JumpBW', 66'block'=>'Block', 67'down'=>'Kneeling', 68 69'hpunch'=>'HighPunch', 70'lpunch'=>'LowPunch', 71'hkick'=>'HighKick', 72'lkick'=>'LowKick', 73'lkickBF'=>'GroinKick', 74'lkickF'=>'KneeKick', 75'hpunchD'=>'Uppercut', 76'hpunchF'=>'Elbow', 77'hkickB'=>'Spin', 78'lkickB'=>'Sweep', 79 80'lpunchBD'=>'Grenade', 81'lpunchFF'=>'KillKenny', 82'hpunchFF'=>'SpecPunch', 83}; 84 85 86$Con2 = { 87'lkick'=>'KneelingKick', 88'hkick'=>'KneelingKick', 89'hpunch'=>'KneelingUppercut', 90'lpunch'=>'KneelingPunch', 91}; 92 93 94 95@States1 = ( 96# 1. BASIC MOVES 97 98{ 'N'=>'Start', 'DEL'=>5, 'S'=>'+start,-start' }, 99{ 'N'=>'Stand', 'DEL'=>7, 'S'=>'+stand', 'CON'=>$Con, 'SITU'=>'Ready' }, 100{ 'N'=>'Turn', 'DEL'=>5, 'S'=>'+turn', 'TURNN'=>1, }, 101{ 'N'=>'Hurt', 'DEL'=>8, 'S'=>'+hurt,-hurt' }, 102{ 'N'=>'Won', 'DEL'=>8, 'S'=>'+won', 'NEXTSTN'=> 'Won2' }, 103{ 'N'=>'Won2', 'DEL'=>1000,'S'=>'won n', 'NEXTST'=>'Won2', }, 104{ 'N'=>'Fun', 'DEL'=>8, 'S'=>'+fun,-fun', 'CON'=>$Con, 'SITU'=>'Ready' }, 105{ 'N'=>'Funb', 'DEL'=>8, 'S'=>'+funb,-funb', 'CON'=>$Con, 'SITU'=>'Ready' }, 106{ 'N'=>'Threat', 'DEL'=>5, 'S'=>'+threat,-threat', 'CON'=>$Con, 'SITU'=>'Ready' }, 107WalkingFrames( \%FrameLookup, \@Frames, 0, 110, $Con ), 108BlockStates( FindLastFrame( \%FrameLookup, 'block' ), 5 ), 109KneelingStates( FindLastFrame( \%FrameLookup, 'kneeling' ), 110 FindLastFrame( \%FrameLookup, 'onknees' ), 7, $Con2 ), 111JumpStates( \%FrameLookup, 112 {'lkick'=>'JumpKick', 'hkick'=>'JumpKick', 113 'lpunch'=>'JumpPunch', 'hpunch'=>'JumpPunch'} ), 114 115# 2. OFFENSIVE MOVES 116 117{ 'N'=>'KneelingPunch', 'DEL'=>5, 'S'=>'+kneelingpunch,-kneelingpunch', 'SITU'=>'Crouch', 118 'HIT'=>'Hit', 'NEXTSTN'=>'Onknees' }, 119{ 'N'=>'KneelingKick', 'DEL'=>5, 'S'=>'+kneelingkick,-kneelingkick', 'SITU'=>'Crouch', 120 'HIT'=>'Hit', 'NEXTSTN'=>'Onknees' }, 121{ 'N'=>'KneelingUppercut','DEL'=>5, 'S'=>'kneeling 3-2,uppercut 2-n', 122 'HIT'=>'Uppercut' }, 123{ 'N'=>'HighPunch', 'DEL'=>7, 'S'=>'+highpunch', 124 'HIT'=>'Highhit' }, 125{ 'N'=>'LowPunch', 'DEL'=>7, 'S'=>'+lowpunch', 126 'HIT'=>'Hit' }, 127{ 'N'=>'HighKick', 'DEL'=>7, 'S'=>'+highkick,_highkick', 128 'HIT'=>'Hit' }, 129{ 'N'=>'LowKick', 'DEL'=>7, 'S'=>'+lowkick,_lowkick', 130 'HIT'=>'Leghit' }, 131{ 'N'=>'GroinKick', 'DEL'=>7, 'S'=>'+groinkick,-groinkick', 132 'HIT'=>'Groinhit' }, 133{ 'N'=>'KneeKick', 'DEL'=>6, 'S'=>'+kneekick', 134 'HIT'=>'Hit' }, 135{ 'N'=>'Elbow', 'DEL'=>5, 'S'=>'+elbow,-elbow', 136 'HIT'=>'Highhit' }, 137{ 'N'=>'Spin', 'DEL'=>5, 'S'=>'+spin', 138 'HIT'=>'Hit' }, 139{ 'N'=>'Sweep', 'DEL'=>7, 'S'=>'+sweep', 140 'HIT'=>'Hit' }, 141{ 'N'=>'Grenade', 'DEL'=>5, 'S'=>'+grenade,-grenade', 142 'DEL12'=>15, 'DOODAD'=>'ZoliShot' }, 143{ 'N'=>'Uppercut', 'DEL'=>6, 'S'=>'+uppercut', 144 'HIT'=>'Uppercut' }, 145{ 'N'=>'Throw', 'DEL'=>8, 'S'=>'+throw' }, 146 147{ 'N'=>'KillKenny', 'DEL'=>5, 'S'=>'+killkenny', 148 'HIT'=>'Highhit', }, 149{ 'N'=>'SpecPunch', 'DEL'=>6, 'S'=>'+specpunch,-specpunch', 150 'HIT'=>'Uppercut', 'CODE7'=>'::AddEarthquake(25);' }, 151 152# 3. HURT MOVES 153 154{ 'N'=>'Falling', 'DEL'=>5, 'S'=>'+falling', 155 'DEL16'=>7, 'DEL17'=>7, 'DEL18'=>7, 'DEL19'=>7, 'DEL20'=>7, 'DEL21'=>7, 156 'DELN'=>500, 'NEXTN'=>'Laying', 'SITU'=>'Falling', }, 157{ 'N'=>'Laying', 'DEL'=>1000,'S'=>'laying n', 158 'SITU'=>'Falling' }, 159{ 'N'=>'Getup', 'DEL'=>5, 'S'=>'_falling', 160 'SITU'=>'Falling', 161 'CON8'=>{'down'=>'Onknees'}, 162 'CON8'=>{'down'=>'Onknees'}, 163}, 164{ 'N'=>'Dead', 'DEL'=>10000, 'S'=>'laying 1', 165 'SITU'=>'Falling', 'NEXTST'=>'Dead' }, 166 167{ 'N'=>'Swept', 'DEL'=>8, 'S'=>'+swept,-swept' }, 168 169{ 'N'=>'KneelingPunched', 'DEL'=>5, 'S'=>'+kneelingpunched', 170 'SITU'=>'Crouch', 'NEXTSTN'=>'Onknees' }, 171{ 'N'=>'KneelingKicked', 'DEL'=>5, 'S'=>'+kneelingkicked,_kneelingkicked', 172 'SITU'=>'Crouch', 'NEXTSTN'=>'Onknees' }, 173 174{ 'N'=>'HighPunched', 'DEL'=>8, 'S'=>'highpunched n-2, +highpunched' }, 175{ 'N'=>'LowPunched', 'DEL'=>5, 'S'=>'+lowpunched' }, 176{ 'N'=>'GroinKicked', 'DEL'=>7, 'S'=>'+groinkicked,-groinkicked' }, 177{ 'N'=>'Thrown', 'DEL'=>5, 'S'=>'+thrown' }, 178 179); 180 181 182 183# 2. CREATE STATES 184 185foreach $framedesc (@States1) 186{ 187 AddStates( \%States, \%FrameLookup, $framedesc ); 188} 189 190 191 192# Automatically add NEXTST for states which don't have one. 193 194FixStates( \%FrameLookup, \%States ); 195 196TravelingStates( \%FrameLookup, \@Frames, \%States, "falling", 0, 0 ); 197TravelingStates( \%FrameLookup, \@Frames, \%States, "won", 0, 0 ); 198 199%States = ( FindShorthands( \%States ), %States ); 200 201# %::UPiStates = %States; 202# @::UPiFrames = @Frames; 203 204::RegisterFighter( { 205 'ID' => 100, 206 'GENDER' => 1, 207 'DATAVERSION' => 1, 208 'STARTCODE' => sub {}, 209 'FRAMES' => \@Frames, 210 'STATES' => \%States, 211 'CODENAME' => $codename, 212 'DATASIZE' => 4542272, 213 'GAMEVERSION' => 0.4, 214 215 'NAME' =>'Agent Boogie', 216 'TEAM' =>'Schonherz', 217 'STYLE' =>'Neo-bang-fu', 218 'AGE' =>'22', 219 'WEIGHT' =>'80kg', 220 'HEIGHT' =>'180cm', 221 'SHOE' =>'44', 222 'STORY' => 223'Once upon a time, there was a competition named after the infamous hostel Schonherz. In this competition 224several hundred different tasks are sent out to be solved by a similar number of students. Creating this 225character was part of such a task.', 226 227 'NAME.hu' =>'Agent Krampusz', 228 'TEAM.hu' =>'Schonherz', 229 'STYLE.hu' =>'Neo-puff-fu', 230 'AGE.hu' =>'22', 231 'WEIGHT.hu' =>'80kg', 232 'HEIGHT.hu' =>'180cm', 233 'SHOE.hu' =>'44', 234 'STORY.hu' => 235'Once upon a time, there was a competition named after the infamous hostel Schonherz. In this competition 236several hundred different tasks are sent out to be solved by a similar number of students. Creating this 237character was part of such a task.', 238} ); 239 240} 241 242LoadAgent(); 243 244return 1; 245 246