1# package Grizli; 2 3# Grizli's images are scaled by a factor of 0.763 4 5require 'DataHelper.pl'; 6use strict; 7 8sub LoadGrizli 9{ 10 my ( @Frames, %FrameLookup, %Frames, %States, %Shorthands, 11 $Doodad, $Con, $Con2, 12 @States1, 13 $framedesc, $key, $value, $framename, $nextst, $st, $lastchar, $nextchar, $codename ); 14 15$codename='Grizli'; 16 17@Frames = LoadFrames( "$codename.dat.txt", 250, 100 ); 18%FrameLookup = CreateFrameLookup( scalar @Frames -1, 19"start", 14, "stand", 6, "walk", 15, 20"turn", 9, "falling", 15, "laying", 1, 21"getup", 16, "hurt", 9, "kneeling", 4, 22"onknees", 5, "kneelingpunch",5, "kneelingkick", 5, 23"fun", 9, 24"highpunch", 9, "lowpunch", 6, "highkick", 6, 25"lowkick", 6, "sweep", 15, "groinkick", 7, 26"kneekick", 8, "elbow", 12, "spin", 17, 27"grenade", 10, "uppercut", 17, "throw", 19, 28"highpunched", 11, "lowpunched", 6, "groinkicked", 8, 29"kneelingpunched",5, "kneelingkicked", 4, "thrown", 14, 30"specpunch", 6, "nunchaku", 15, 31"swept", 16, "won", 20, "threat", 12, 32"block", 6, "stomp", 11, 33); 34 35 36$Doodad = 37 { 'T' => 1, 38 'W' => 64, 39 'H' => 64, 40 'SX' => 15, 41 'SY' => 0, 42 'FRAMES'=> 6, 43 'SA' => 1/25, 44 }; 45 46 47$Con = { 48'forw'=>'Walk', 49'back'=>'Back', 50'jump'=>'Jump', 51'jumpfw'=>'JumpFW', 52'jumpbw'=>'JumpBW', 53'block'=>'Block', 54'down'=>'Kneeling', 55 56'hpunch'=>'HighPunch', 57'lpunch'=>'LowPunch', 58'hkick'=>'HighKick', 59'lkick'=>'LowKick', 60'lkickBF'=>'GroinKick', 61'lkickF'=>'KneeKick', 62'hpunchD'=>'Uppercut', 63'hpunchF'=>'Elbow', 64'hkickB'=>'Spin', 65'lkickB'=>'Sweep', 66 67'lpunchBD'=>'Grenade', 68'hpunchFF'=>'Poke', 69'lkickDD'=>'Stomp', 70'hpunchBFB'=>'Nunchaku', 71}; 72 73 74$Con2 = { 75'lkick'=>'KneelingKick', 76'hkick'=>'KneelingKick', 77'hpunch'=>'KneelingUppercut', 78'lpunch'=>'KneelingPunch', 79}; 80 81 82 83@States1 = ( 84# 1. BASIC MOVES 85 86{ 'N'=>'Start', 'DEL'=>5, 'S'=>'+start' }, 87{ 'N'=>'Stand', 'DEL'=>10, 'S'=>'+stand', 'CON'=>$Con, 'SITU'=>'Ready' }, 88{ 'N'=>'Turn', 'DEL'=>5, 'S'=>'+turn', 'DELTAXN'=>-10, 'TURNN'=>1, }, 89{ 'N'=>'Hurt', 'DEL'=>8, 'S'=>'+hurt,-hurt' }, 90{ 'N'=>'Won', 'DEL'=>8, 'S'=>'+won', 'NEXTSTN'=> 'Won2' }, 91{ 'N'=>'Won2', 'DEL'=>1000,'S'=>'won n', 'NEXTST'=>'Won2', }, 92{ 'N'=>'Fun', 'DEL'=>8, 'S'=>'+fun,-fun', 'CON'=>$Con, 'SITU'=>'Ready' }, 93{ 'N'=>'Threat', 'DEL'=>5, 'S'=>'+threat', 'CON'=>$Con, 'SITU'=>'Ready' }, 94WalkingFrames( \%FrameLookup, \@Frames, 0, 75, $Con ), 95BlockStates( FindLastFrame( \%FrameLookup, 'block' ), 5 ), 96KneelingStates( FindLastFrame( \%FrameLookup, 'kneeling' ), 97 FindLastFrame( \%FrameLookup, 'onknees' ), 7, $Con2 ), 98JumpStates( \%FrameLookup, 99 {'lkick'=>'JumpKick', 'hkick'=>'JumpKick', 100 'lpunch'=>'JumpPunch', 'hpunch'=>'JumpPunch'} ), 101 102# 2. OFFENSIVE MOVES 103 104{ 'N'=>'KneelingPunch', 'DEL'=>5, 'S'=>'+kneelingpunch,-kneelingpunch', 'SITU'=>'Crouch', 105 'HIT'=>'Hit', 'NEXTSTN'=>'Onknees' }, 106{ 'N'=>'KneelingKick', 'DEL'=>5, 'S'=>'+kneelingkick,-kneelingkick', 'SITU'=>'Crouch', 107 'HIT'=>'Hit', 'NEXTSTN'=>'Onknees' }, 108{ 'N'=>'KneelingUppercut','DEL'=>5, 'S'=>'kneeling 4-3,uppercut 6-n', 109 'HIT'=>'Uppercut' }, 110{ 'N'=>'HighPunch', 'DEL'=>5, 'S'=>'+highpunch', 111 'HIT'=>'Highhit' }, 112{ 'N'=>'LowPunch', 'DEL'=>5, 'S'=>'+lowpunch,-lowpunch', 113 'HIT'=>'Hit' }, 114{ 'N'=>'HighKick', 'DEL'=>5, 'S'=>'+highkick,-highkick', 115 'HIT'=>'Hit' }, 116{ 'N'=>'LowKick', 'DEL'=>5, 'S'=>'+lowkick,-lowkick', 117 'HIT'=>'Leghit' }, 118{ 'N'=>'GroinKick', 'DEL'=>5, 'S'=>'+groinkick,-groinkick', 119 'HIT'=>'Groinhit' }, 120{ 'N'=>'KneeKick', 'DEL'=>5, 'S'=>'+kneekick,-kneekick', 121 'HIT'=>'Hit' }, 122{ 'N'=>'Elbow', 'DEL'=>5, 'S'=>'+elbow', 123 'HIT'=>'Highhit' }, 124{ 'N'=>'Spin', 'DEL'=>5, 'S'=>'+spin', 125 'HIT'=>'Hit' }, 126{ 'N'=>'Sweep', 'DEL'=>7, 'S'=>'+sweep', 127 'HIT'=>'Hit' }, 128{ 'N'=>'Grenade', 'DEL'=>5, 'S'=>'+grenade', 129 'DEL12'=>15, 'DOODAD'=>'ZoliShot' }, 130{ 'N'=>'Uppercut', 'DEL'=>5, 'S'=>'+uppercut', 131 'HIT'=>'Uppercut' }, 132{ 'N'=>'Throw', 'DEL'=>8, 'S'=>'+throw' }, 133 134{ 'N'=>'Poke', 'DEL'=>5, 'S'=>'+specpunch,_specpunch', 135 'HIT'=>'Highhit' }, 136{ 'N'=>'Stomp', 'DEL'=>7, 'S'=>'+stomp', 137 'HIT'=>'Fall', 'CODE6'=>'::AddEarthquake(25);', 'SOUND6'=>'MAX_COMBO' }, 138{ 'N'=>'Nunchaku', 'DEL'=>7, 'S'=>'+nunchaku', 139 'HIT'=>'Hit' }, 140 141# 3. HURT MOVES 142 143{ 'N'=>'Falling', 'DEL'=>5, 'S'=>'falling 1-11, falling 15-12, falling 12-n, laying 1', 144 'DEL16'=>7, 'DEL17'=>7, 'DEL18'=>7, 'DEL19'=>7, 'DEL20'=>7, 'DEL21'=>7, 145 'DELN'=>500, 'NEXTN'=>'Laying', 'SITU'=>'Falling', }, 146{ 'N'=>'Laying', 'DEL'=>1000,'S'=>'+laying', 147 'SITU'=>'Falling' }, 148{ 'N'=>'Getup', 'DEL'=>5, 'S'=>'+getup', 149 'SITU'=>'Falling', 150 'CON8'=>{'down'=>'Onknees'}, 151 'CON8'=>{'down'=>'Onknees'}, 152}, 153{ 'N'=>'Dead', 'DEL'=>10000, 'S'=>'laying 1', 154 'SITU'=>'Falling', 'NEXTST'=>'Dead' }, 155 156{ 'N'=>'Swept', 'DEL'=>5, 'S'=>'+swept' }, 157 158{ 'N'=>'KneelingPunched', 'DEL'=>5, 'S'=>'+kneelingpunched,-kneelingpunched', 159 'SITU'=>'Crouch', 'NEXTSTN'=>'Onknees' }, 160{ 'N'=>'KneelingKicked', 'DEL'=>5, 'S'=>'kneelingkicked 3-n, kneelingkicked n-3', 161 'SITU'=>'Crouch', 'NEXTSTN'=>'Onknees' }, 162 163{ 'N'=>'HighPunched', 'DEL'=>8, 'S'=>'+highpunched' }, 164{ 'N'=>'LowPunched', 'DEL'=>5, 'S'=>'+lowpunched,-lowpunched' }, 165{ 'N'=>'GroinKicked', 'DEL'=>7, 'S'=>'+groinkicked,-groinkicked' }, 166{ 'N'=>'Thrown', 'DEL'=>5, 'S'=>'+thrown' }, 167 168); 169 170 171 172# 2. CREATE STATES 173 174foreach $framedesc (@States1) 175{ 176 AddStates( \%States, \%FrameLookup, $framedesc ); 177} 178 179 180 181# Automatically add NEXTST for states which don't have one. 182 183FixStates( \%FrameLookup, \%States ); 184 185TravelingStates( \%FrameLookup, \@Frames, \%States, "falling", 1, 18 ); 186TravelingStates( \%FrameLookup, \@Frames, \%States, "getup", 1, 16 ); 187#TravelingStates( \%FrameLookup, \@Frames, \%States, "won", 0, 0 ); 188 189%States = ( FindShorthands( \%States ), %States ); 190 191# %::GrizliStates = %States; 192# @::GrizliFrames = @Frames; 193 194::RegisterFighter( { 195 'ID' => 8, 196 'GENDER' => 1, 197 'DATAVERSION' => 1, 198 'STARTCODE' => sub {}, 199 'FRAMES' => \@Frames, 200 'STATES' => \%States, 201 'CODENAME' => $codename, 202 'DATASIZE' => 7138871, 203} ); 204 205} 206 207LoadGrizli(); 208 209return 1; 210 211