Add a new super-size powerup

This commit is contained in:
Alayan 2018-09-21 05:43:48 +02:00
parent d3c4dd0b7c
commit 6a9a1a0e7a
4 changed files with 84 additions and 76 deletions

View File

@ -1,6 +1,7 @@
<?xml version="1.0"?>
<powerup>
<item name="zipper" icon="zipper_collect.png" />
<item name="super" icon="super_size.png" />
<item name="bowling" icon="bowling-icon.png"
model="bowling.spm" speed="4.0"
min-height="0.2" max-height="1.0"
@ -131,112 +132,112 @@
<!-- The entry for '1' kart lists more than a single weight
because the others are used for interpolation when
there are two karts or more. -->
<!-- bubble cake bowl zipper plunger switch swattr rubber para anvil -->
<weight single ="140 0 300 100 225 75 160 0 0 0"
multi =" 0 0 0 0 0 0 0 0 0 0" />
<weight single ="150 0 295 130 200 70 135 0 0 0"
multi =" 0 0 20 0 0 0 0 0 0 0" />
<weight single ="150 0 310 135 180 65 135 0 0 0"
multi =" 0 0 25 0 0 0 0 0 0 0" />
<weight single ="155 0 280 180 170 60 125 0 0 0"
multi =" 0 0 30 0 0 0 0 0 0 0" />
<weight single ="170 0 180 275 150 50 85 0 0 0"
multi =" 0 0 90 0 0 0 0 0 0 0" />
<!-- bubble cake bowl zipper plunger switch swattr rubber super para anvil -->
<weight single ="140 0 300 100 225 75 160 0 0 0 0"
multi =" 0 0 0 0 0 0 0 0 0 0 0" />
<weight single ="150 0 295 130 200 70 135 0 0 0 0"
multi =" 0 0 20 0 0 0 0 0 0 0 0" />
<weight single ="150 0 310 135 180 65 135 0 0 0 0"
multi =" 0 0 25 0 0 0 0 0 0 0 0" />
<weight single ="155 0 280 180 170 60 125 0 0 0 0"
multi =" 0 0 30 0 0 0 0 0 0 0 0" />
<weight single ="170 0 180 275 150 50 85 0 0 0 0"
multi =" 0 0 90 0 0 0 0 0 0 0 0" />
</weights>
<weights num-karts="5">
<!-- bubble cake bowl zipper plunger switch swattr rubber para anvil -->
<weight single ="130 80 260 75 230 60 165 0 0 0"
multi =" 0 0 0 0 0 0 0 0 0 0" />
<weight single ="150 135 240 125 140 50 135 0 0 0"
multi =" 0 0 25 0 0 0 0 0 0 0" />
<weight single ="150 135 225 135 135 45 135 15 0 0"
multi =" 0 0 25 0 0 0 0 0 0 0" />
<weight single ="160 120 140 190 110 35 100 80 30 0"
multi =" 0 0 35 0 0 0 0 0 0 0" />
<weight single ="140 105 45 225 0 30 0 50 90 0"
multi =" 40 0 80 175 20 0 0 0 0 0" />
<!-- bubble cake bowl zipper plunger switch swattr rubber super para anvil -->
<weight single ="130 80 260 75 230 60 165 0 0 0 0"
multi =" 0 0 0 0 0 0 0 0 0 0 0" />
<weight single ="150 135 240 125 140 50 135 0 0 0 0"
multi =" 0 0 25 0 0 0 0 0 0 0 0" />
<weight single ="150 135 225 135 135 45 135 15 0 0 0"
multi =" 0 0 25 0 0 0 0 0 0 0 0" />
<weight single ="160 120 140 190 110 35 100 80 0 30 0"
multi =" 0 0 35 0 0 0 0 0 0 0 0" />
<weight single ="140 105 45 225 0 30 0 50 0 90 0"
multi =" 40 0 80 175 20 0 0 0 0 0 0" />
</weights>
<weights num-karts="9">
<!-- bubble cake bowl zipper plunger switch swattr rubber para anvil -->
<weight single ="120 60 290 50 270 40 170 0 0 0"
multi =" 0 0 0 0 0 0 0 0 0 0" />
<weight single ="145 150 225 120 160 35 135 0 0 0"
multi =" 0 0 30 0 0 0 0 0 0 0" />
<weight single ="150 130 205 140 130 30 130 50 0 0"
multi =" 0 0 35 0 0 0 0 0 0 0" />
<weight single ="165 115 130 225 70 25 80 60 40 0"
multi =" 0 0 60 0 30 0 0 0 0 0" />
<weight single ="100 80 35 185 0 15 0 20 75 0"
multi =" 90 0 90 290 20 0 0 0 0 0" />
<!-- bubble cake bowl zipper plunger switch swattr rubber super para anvil -->
<weight single ="120 60 290 50 270 40 170 0 0 0 0"
multi =" 0 0 0 0 0 0 0 0 0 0 0" />
<weight single ="145 150 225 120 160 35 135 0 0 0 0"
multi =" 0 0 30 0 0 0 0 0 0 0 0" />
<weight single ="150 130 205 140 130 30 130 50 0 0 0"
multi =" 0 0 35 0 0 0 0 0 0 0 0" />
<weight single ="165 115 130 225 70 25 80 60 0 40 0"
multi =" 0 0 60 0 30 0 0 0 0 0 0" />
<weight single ="100 80 35 185 0 15 0 20 0 75 0"
multi =" 90 0 90 290 20 0 0 0 0 0 0" />
</weights>
<weights num-karts="14">
<!-- bubble cake bowl zipper plunger switch swattr rubber para anvil -->
<weight single ="110 40 320 25 300 30 175 0 0 0"
multi =" 0 0 0 0 0 0 0 0 0 0" />
<weight single ="140 155 240 110 170 20 135 0 0 0"
multi =" 0 0 30 0 0 0 0 0 0 0" />
<weight single ="150 125 210 145 145 15 120 50 0 0"
multi =" 0 0 40 0 0 0 0 0 0 0" />
<weight single ="135 105 115 220 60 15 70 40 30 0"
multi =" 40 0 80 40 50 0 0 0 0 0" />
<weight single =" 90 70 15 175 0 0 0 0 50 0"
multi ="120 0 125 325 30 0 0 0 0 0" />
<!-- bubble cake bowl zipper plunger switch swattr rubber super para anvil -->
<weight single ="110 40 320 25 300 30 175 0 0 0 0"
multi =" 0 0 0 0 0 0 0 0 0 0 0" />
<weight single ="140 155 240 110 170 20 135 0 0 0 0"
multi =" 0 0 30 0 0 0 0 0 0 0 0" />
<weight single ="150 125 210 145 145 15 120 50 0 0 0"
multi =" 0 0 40 0 0 0 0 0 0 0 0" />
<weight single ="135 105 115 220 60 15 70 40 0 30 0"
multi =" 40 0 80 40 50 0 0 0 0 0 0" />
<weight single =" 90 70 15 175 0 0 0 0 0 50 0"
multi ="120 0 125 325 30 0 0 0 0 0 0" />
</weights>
<weights num-karts="20">
<!-- bubble cake bowl zipper plunger switch swattr rubber para anvil -->
<weight single ="100 0 370 0 330 20 180 0 0 0"
multi =" 0 0 0 0 0 0 0 0 0 0" />
<weight single ="135 160 240 100 185 15 135 0 0 0"
multi =" 0 0 30 0 0 0 0 0 0 0" />
<weight single ="150 120 200 150 140 10 105 50 0 0"
multi =" 0 0 50 0 25 0 0 0 0 0" />
<weight single ="125 90 100 250 50 10 50 30 15 0"
multi =" 50 0 100 50 80 0 0 0 0 0" />
<weight single =" 75 60 0 125 0 0 0 0 35 0"
multi ="150 0 155 400 0 0 0 0 0 0" />
<!-- bubble cake bowl zipper plunger switch swattr rubber super para anvil -->
<weight single ="100 0 370 0 330 20 180 0 0 0 0"
multi =" 0 0 0 0 0 0 0 0 0 0 0" />
<weight single ="135 160 240 100 185 15 135 0 0 0 0"
multi =" 0 0 30 0 0 0 0 0 0 0 0" />
<weight single ="150 120 200 150 140 10 105 50 0 0 0"
multi =" 0 0 50 0 25 0 0 0 0 0 0" />
<weight single ="125 90 100 250 50 10 50 30 0 15 0"
multi =" 50 0 100 50 80 0 0 0 0 0 0" />
<weight single =" 75 60 0 125 0 0 0 0 0 35 0"
multi ="150 0 155 400 0 0 0 0 0 0 0" />
</weights>
</race-weight-list>
<ftl-weight-list>
<weights num-karts="1">
<!-- bubble cake bowl zipper plunger switch swattr rubber para anvil -->
<!-- bubble cake bowl zipper plunger switch swattr rubber super para anvil -->
<!-- This is the entry for the leader: -->
<weight single ="35 0 25 35 25 15 25 0 0 0"
multi ="20 0 0 20 0 0 0 0 0 0" />
<weight single ="35 0 25 35 25 15 25 0 0 0 0"
multi ="20 0 0 20 0 0 0 0 0 0 0" />
<!-- This is the entry for the first non-leader karts: -->
<weight single ="25 0 60 25 58 2 30 0 0 0"
multi =" 0 0 0 0 0 0 0 0 0 0" />
<weight single ="35 0 55 35 25 3 25 0 0 0"
multi =" 0 0 10 0 12 0 0 0 0 0" />
<weight single ="25 0 40 45 15 5 15 10 5 0"
multi ="10 0 15 15 0 0 0 0 0 0" />
<weight single ="25 0 60 25 58 2 30 0 0 0 0"
multi =" 0 0 0 0 0 0 0 0 0 0 0" />
<weight single ="35 0 55 35 25 3 25 0 0 0 0"
multi =" 0 0 10 0 12 0 0 0 0 0 0" />
<weight single ="25 0 40 45 15 5 15 10 0 5 0"
multi ="10 0 15 15 0 0 0 0 0 0 0" />
<!-- This is the entry for the last kart: -->
<weight single ="20 0 15 25 0 0 0 0 15 0"
multi ="20 0 25 80 0 0 0 0 0 0" />
<weight single ="20 0 15 25 0 0 0 0 0 15 0"
multi ="20 0 25 80 0 0 0 0 0 0 0" />
</weights>
</ftl-weight-list>
<battle-weight-list>
<weights num-karts="1">
<!-- bubble cake bowl zipper plunger switch swattr rubber para anvil -->
<weight single ="10 30 60 0 0 10 30 0 0 0"
multi =" 0 0 5 0 0 0 0 0 0 0" />
<!-- bubble cake bowl zipper plunger switch swattr rubber super para anvil -->
<weight single ="10 30 60 0 0 10 30 0 0 0 0"
multi =" 0 0 5 0 0 0 0 0 0 0 0" />
</weights>
</battle-weight-list>
<soccer-weight-list>
<weights num-karts="1">
<!-- bubble cake bowl zipper plunger switch swattr rubber para anvil -->
<weight single =" 0 30 60 0 0 10 30 0 0 0"
multi =" 0 0 5 0 0 0 0 0 0 0" />
<!-- bubble cake bowl zipper plunger switch swattr rubber super para anvil -->
<weight single =" 0 30 60 0 0 10 30 0 0 0 0"
multi =" 0 0 5 0 0 0 0 0 0 0 0" />
</weights>
</soccer-weight-list>
<tutorial-weight-list>
<weights num-karts="1">
<!-- bubble cake bowl zipper plunger switch swattr rubber para anvil -->
<weight single =" 0 0 0 0 0 0 0 0 0 0"
multi =" 0 0 100 0 0 0 0 0 0 0" />
<!-- bubble cake bowl zipper plunger switch swattr rubber super para anvil -->
<weight single =" 0 0 0 0 0 0 0 0 0 0 0"
multi =" 0 0 100 0 0 0 0 0 0 0 0" />
</weights>
</tutorial-weight-list>

View File

@ -170,6 +170,9 @@ void Powerup::set(PowerupManager::PowerupType type, int n)
case PowerupManager::POWERUP_ZIPPER:
break ;
case PowerupManager::POWERUP_SUPER_SIZE:
break ;
case PowerupManager::POWERUP_BOWLING:
m_sound_use = SFXManager::get()->createSoundSource("bowling_shoot");
break ;
@ -276,6 +279,9 @@ void Powerup::use()
case PowerupManager::POWERUP_ZIPPER:
m_kart->handleZipper(NULL, true);
break ;
case PowerupManager::POWERUP_SUPER_SIZE:
m_kart->setSuper();
break ;
case PowerupManager::POWERUP_SWITCH:
{
ItemManager::get()->switchItems();

View File

@ -105,7 +105,7 @@ PowerupManager::PowerupType
static std::string powerup_names[] = {
"", /* Nothing */
"bubblegum", "cake", "bowling", "zipper", "plunger", "switch",
"swatter", "rubber-ball", "parachute", "anchor"
"swatter", "rubber-ball", "super", "parachute", "anchor"
};
for(unsigned int i=POWERUP_FIRST; i<=POWERUP_LAST; i++)

View File

@ -132,6 +132,7 @@ public:
POWERUP_CAKE,
POWERUP_BOWLING, POWERUP_ZIPPER, POWERUP_PLUNGER,
POWERUP_SWITCH, POWERUP_SWATTER, POWERUP_RUBBERBALL,
POWERUP_SUPER_SIZE,
POWERUP_PARACHUTE,
POWERUP_ANVIL, //powerup.cpp assumes these two come last
POWERUP_LAST=POWERUP_ANVIL,