3 * Daniel Nelson - 8/24/0
5 * Copyright (C) 2000 Daniel Nelson
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 * Daniel Nelson - aluminumangel.org
25 * Each one keeps track of a set of or potential set of elimination combos.
30 #include "GarbageGenerator.h"
31 #include "ComboTabulator.h"
32 #include "SparkleManager.h"
33 #include "SignManager.h"
34 #include "BlockManager.h"
39 void ComboTabulator::initialize ( )
42 special_magnitude
= 0;
44 n_multipliers_this_step
= 0;
45 base_accumulated_score
=0;
46 base_score_this_step
= 0;
48 creation_time_stamp
= Game::time_step
;
50 involvement_count
= 0;
53 void ComboTabulator::reportElimination ( int _magnitude
, Block
&kernel
)
55 // hold the location for standard reward mote creation
59 time_stamp
= Game::time_step
;
61 // only increase the multiplier if this is a late elimination
62 if (Game::time_step
!= creation_time_stamp
) {
65 n_multipliers_this_step
++;
67 SignManager::createSign(x
, y
, ST_MULTIPLIER
, multiplier
- 2);
68 SparkleManager::createRewardMote(x
, y
, multiplier
+ 9);
71 // if this is a special flavor combo match
72 if (BlockManager::isColorlessFlavor(kernel
.flavor
))
73 special_magnitude
+= _magnitude
;
75 // if this is a normal flavor combo match
77 magnitude
+= _magnitude
;