1# package Cumi; 2 3# Cumi's images are scaled: 4 5require 'DataHelper.pl'; 6 7use strict; 8 9sub LoadCumi 10{ 11 my ( @Frames, %FrameLookup, %Frames, %States, %Shorthands, 12 $Doodad, $Con, $Con2, 13 @States1, 14 $framedesc, $key, $value, $framename, $nextst, $st, $lastchar, $nextchar, $codename ); 15 16$codename = 'Cumi'; 17 18@Frames = LoadFrames( "$codename.dat.txt", 320, 50 ); 19%FrameLookup = CreateFrameLookup( scalar @Frames -1, 20"start", 18, "stand", 4, "walk", 14, 21"turn", 8, "falling", 12, "laying", 1, 22"getup", 19, "hurt", 9, "swept", 6, 23"won", 26, "block", 4, "kneeling", 4, 24"onknees", 1, "kneelingpunch",4, "kneelingkick", 5, 25"fun", 7, "threat", 6, "highpunch", 4, 26"lowpunch", 5, "highkick", 6, "lowkick", 6, "sweep", 14, 27"groinkick", 6, "kneekick", 6, "elbow", 5, 28"grenade", 7, "uppercut", 8, 29"throw", 24, "spit", 5, "highpunched", 5, "lowpunched", 5, 30"groinkicked", 17, "kneelingpunched",4, "kneelingkicked", 5, 31"thrown", 7, "baseball", 27, 32); 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'lkickB'=>'Sweep', 65 66'lpunchBD'=>'Grenade', 67'hpunchFF'=>'Spit', 68'lkickFDB'=>'Baseball', 69}; 70 71 72$Con2 = { 73'lkick'=>'KneelingKick', 74'hkick'=>'KneelingKick', 75'hpunch'=>'KneelingUppercut', 76'lpunch'=>'KneelingPunch', 77}; 78 79 80 81 82@States1 = ( 83# 1. BASIC MOVES 84 85{ 'N'=>'Start', 'DEL'=>5, 'S'=>'start 1-8, start 8-1, start 9-n' }, 86{ 'N'=>'Stand', 'DEL'=>7, 'S'=>'+stand,_stand', 'CON'=>$Con, 'SITU'=>'Ready' }, 87{ 'N'=>'Turn', 'DEL'=>5, 'S'=>'+turn', 'TURNN'=>1, }, 88{ 'N'=>'Hurt', 'DEL'=>8, 'S'=>'+hurt,-hurt' }, 89{ 'N'=>'Won', 'DEL'=>8, 'S'=>'+won', 'NEXTSTN'=> 'Won2' }, 90{ 'N'=>'Won2', 'DEL'=>1000,'S'=>'won n', 'NEXTST'=>'Won2', }, 91{ 'N'=>'Fun', 'DEL'=>8, 'S'=>'+fun,-fun', 'CON'=>$Con, 'SITU'=>'Ready' }, 92{ 'N'=>'Threat', 'DEL'=>5, 'S'=>'+threat,-threat', 'CON'=>$Con, 'SITU'=>'Ready' }, 93WalkingFrames( \%FrameLookup, \@Frames, 4, 110, $Con ), 94BlockStates( FindLastFrame( \%FrameLookup, 'block' ), 5 ), 95KneelingStates( FindLastFrame( \%FrameLookup, 'kneeling' ), 96 FindLastFrame( \%FrameLookup, 'onknees' ), 7, $Con2 ), 97JumpStates( \%FrameLookup, 98 {'lkick'=>'JumpKick', 'hkick'=>'JumpKick', 99 'lpunch'=>'JumpPunch', 'hpunch'=>'JumpPunch'} ), 100 101# 2. OFFENSIVE MOVES 102 103{ 'N'=>'KneelingPunch', 'DEL'=>5, 'S'=>'+kneelingpunch,-kneelingpunch', 'SITU'=>'Crouch', 104 'HIT'=>'Hit', 'NEXTSTN'=>'Onknees' }, 105{ 'N'=>'KneelingKick', 'DEL'=>5, 'S'=>'+kneelingkick,-kneelingkick', 'SITU'=>'Crouch', 106 'HIT'=>'Hit', 'NEXTSTN'=>'Onknees' }, 107{ 'N'=>'KneelingUppercut','DEL'=>5, 'S'=>'kneeling 4-3,uppercut 6-n,-uppercut', 108 'HIT'=>'Uppercut' }, 109{ 'N'=>'HighPunch', 'DEL'=>5, 'S'=>'+highpunch,-highpunch', 110 'HIT'=>'Highhit' }, 111{ 'N'=>'LowPunch', 'DEL'=>5, 'S'=>'+lowpunch,-lowpunch', 112 'HIT'=>'Hit' }, 113{ 'N'=>'HighKick', 'DEL'=>5, 'S'=>'+highkick,-highkick', 114 'HIT'=>'Hit' }, 115{ 'N'=>'LowKick', 'DEL'=>5, 'S'=>'+lowkick,-lowkick', 116 'HIT'=>'Leghit' }, 117{ 'N'=>'GroinKick', 'DEL'=>5, 'S'=>'+groinkick,-groinkick', 118 'HIT'=>'Groinhit' }, 119{ 'N'=>'KneeKick', 'DEL'=>5, 'S'=>'+kneekick,-kneekick', 120 'HIT'=>'Hit' }, 121{ 'N'=>'Elbow', 'DEL'=>5, 'S'=>'+elbow,-elbow', 122 'HIT'=>'Highhit' }, 123{ 'N'=>'Sweep', 'DEL'=>7, 'S'=>'+sweep', 124 'HIT'=>'Hit' }, 125{ 'N'=>'Grenade', 'DEL'=>5, 'S'=>'+grenade,-grenade', 126 'DEL12'=>15, 'DOODAD'=>'ZoliShot' }, 127{ 'N'=>'Uppercut', 'DEL'=>5, 'S'=>'+uppercut,-uppercut', 128 'HIT'=>'Uppercut' }, 129{ 'N'=>'Throw', 'DEL'=>8, 'S'=>'+throw' }, 130{ 'N'=>'Spit', 'DEL'=>7, 'S'=>'+spit,-spit' }, 131{ 'N'=>'Baseball', 'DEL'=>6, 'S'=>'+baseball,baseball 5-1', 132 'HIT'=>'Fall' }, 133 134 135# 3. HURT MOVES 136 137{ 'N'=>'Falling', 'DEL'=>5, 'S'=>'+falling, laying 1', 138 'DELN'=>500, 'NEXTN'=>'Laying', 'SITU'=>'Falling', }, 139{ 'N'=>'Laying', 'DEL'=>1000,'S'=>'+laying', 140 'SITU'=>'Falling' }, 141{ 'N'=>'Getup', 'DEL'=>5, 'S'=>'+getup', 142 'SITU'=>'Falling', 143 'CON8'=>{'down'=>'Onknees'}, 144 'CON8'=>{'down'=>'Onknees'}, 145}, 146{ 'N'=>'Dead', 'DEL'=>10000, 'S'=>'laying 1', 147 'SITU'=>'Falling', 'NEXTST'=>'Dead' }, 148 149{ 'N'=>'Swept', 'DEL'=>5, 'S'=>'+swept,-swept' }, 150 151{ 'N'=>'KneelingPunched', 'DEL'=>5, 'S'=>'+kneelingpunched,-kneelingpunched', 152 'SITU'=>'Crouch', 'NEXTSTN'=>'Onknees' }, 153{ 'N'=>'KneelingKicked', 'DEL'=>5, 'S'=>'kneelingkicked 3-n, kneelingkicked n-3', 154 'SITU'=>'Crouch', 'NEXTSTN'=>'Onknees' }, 155{ 'N'=>'KneelingKicked','DEL'=>5, 'S'=>'+kneelingkicked,-kneelingkicked' }, 156 157{ 'N'=>'HighPunched', 'DEL'=>8, 'S'=>'highpunched 2-n, -highpunched' }, 158{ 'N'=>'LowPunched', 'DEL'=>5, 'S'=>'+lowpunched,-lowpunched' }, 159{ 'N'=>'GroinKicked', 'DEL'=>7, 'S'=>'+groinkicked' }, 160{ 'N'=>'Thrown', 'DEL'=>5, 'S'=>'+thrown' }, 161 162); 163 164 165 166# 2. CREATE STATES: %CumiStates 167 168foreach $framedesc (@States1) 169{ 170 AddStates( \%States, \%FrameLookup, $framedesc ); 171} 172 173 174 175# Automatically add NEXTST for states which don't have one. 176 177FixStates( \%FrameLookup, \%States ); 178TravelingStates( \%FrameLookup, \@Frames, \%States, "falling", 1, 13 ); 179TravelingStates( \%FrameLookup, \@Frames, \%States, "getup", 1, 19 ); 180 181%States = ( FindShorthands( \%States ), %States ); 182 183# %::CumiStates = %States; 184# @::CumiFrames = @Frames; 185 186::RegisterFighter( { 187 'ID' => 4, 188 'GENDER' => 1, 189 'DATAVERSION' => 1, 190 'STARTCODE' => sub {}, 191 'FRAMES' => \@Frames, 192 'STATES' => \%States, 193 'CODENAME' => $codename, 194 'DATASIZE' => 5365949, 195} ); 196} 197 198 199LoadCumi(); 200 201return 1; 202 203