mirror of
https://github.com/JezuzLizard/BO2-Reimagined.git
synced 2025-06-11 07:37:56 -05:00
Grief: add sudden death
This commit is contained in:
@ -395,6 +395,7 @@
|
|||||||
* Teams win rounds by getting all enemy players down
|
* Teams win rounds by getting all enemy players down
|
||||||
* First team to win 3 rounds wins the game
|
* First team to win 3 rounds wins the game
|
||||||
* Tie round if both teams die within 5 seconds of eachother
|
* Tie round if both teams die within 5 seconds of eachother
|
||||||
|
* Sudden death after 5 minute round (all players lose 100 health)
|
||||||
* Unlimited zombies
|
* Unlimited zombies
|
||||||
* 2500 health zombies
|
* 2500 health zombies
|
||||||
* 0.5 second zombie spawn rate
|
* 0.5 second zombie spawn rate
|
||||||
|
@ -234,6 +234,10 @@ perk_set_max_health_if_jugg( perk, set_premaxhealth, clamp_health_to_max_health
|
|||||||
{
|
{
|
||||||
max_total_health += level.pers_jugg_upgrade_health_bonus;
|
max_total_health += level.pers_jugg_upgrade_health_bonus;
|
||||||
}
|
}
|
||||||
|
if ( is_true( level.sudden_death ) && isDefined( level.sudden_death_health_loss ) )
|
||||||
|
{
|
||||||
|
max_total_health -= level.sudden_death_health_loss;
|
||||||
|
}
|
||||||
missinghealth = self.maxhealth - self.health;
|
missinghealth = self.maxhealth - self.health;
|
||||||
self setmaxhealth( max_total_health );
|
self setmaxhealth( max_total_health );
|
||||||
self.health -= missinghealth;
|
self.health -= missinghealth;
|
||||||
|
@ -57,6 +57,7 @@ init()
|
|||||||
level thread set_grief_vars();
|
level thread set_grief_vars();
|
||||||
level thread powerup_hud_overlay();
|
level thread powerup_hud_overlay();
|
||||||
level thread round_start_wait(5, true);
|
level thread round_start_wait(5, true);
|
||||||
|
level thread sudden_death();
|
||||||
level thread unlimited_zombies();
|
level thread unlimited_zombies();
|
||||||
level thread remove_round_number();
|
level thread remove_round_number();
|
||||||
level thread remove_status_icons_on_end_game();
|
level thread remove_status_icons_on_end_game();
|
||||||
@ -1115,6 +1116,10 @@ show_grief_hud_msg( msg, msg_parm, offset, delay )
|
|||||||
{
|
{
|
||||||
self notify( "show_grief_hud_msg" );
|
self notify( "show_grief_hud_msg" );
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
self notify( "show_grief_hud_msg2" );
|
||||||
|
}
|
||||||
|
|
||||||
self endon( "disconnect" );
|
self endon( "disconnect" );
|
||||||
|
|
||||||
@ -1144,7 +1149,7 @@ show_grief_hud_msg( msg, msg_parm, offset, delay )
|
|||||||
|
|
||||||
zgrief_hudmsg endon( "death" );
|
zgrief_hudmsg endon( "death" );
|
||||||
|
|
||||||
zgrief_hudmsg thread show_grief_hud_msg_cleanup(self);
|
zgrief_hudmsg thread show_grief_hud_msg_cleanup(self, delay);
|
||||||
|
|
||||||
while ( isDefined( level.hostmigrationtimer ) )
|
while ( isDefined( level.hostmigrationtimer ) )
|
||||||
{
|
{
|
||||||
@ -1185,14 +1190,21 @@ show_grief_hud_msg( msg, msg_parm, offset, delay )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
show_grief_hud_msg_cleanup(player)
|
show_grief_hud_msg_cleanup(player, delay)
|
||||||
{
|
{
|
||||||
self endon( "death" );
|
self endon( "death" );
|
||||||
|
|
||||||
self thread show_grief_hud_msg_cleanup_restart_round();
|
self thread show_grief_hud_msg_cleanup_restart_round();
|
||||||
self thread show_grief_hud_msg_cleanup_end_game();
|
self thread show_grief_hud_msg_cleanup_end_game();
|
||||||
|
|
||||||
player waittill( "show_grief_hud_msg" );
|
if(!isDefined(delay))
|
||||||
|
{
|
||||||
|
player waittill( "show_grief_hud_msg" );
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
player waittill( "show_grief_hud_msg2" );
|
||||||
|
}
|
||||||
|
|
||||||
if ( isDefined( self ) )
|
if ( isDefined( self ) )
|
||||||
{
|
{
|
||||||
@ -1681,6 +1693,47 @@ grief_laststand_weapons_return()
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sudden_death()
|
||||||
|
{
|
||||||
|
level endon("end_game");
|
||||||
|
|
||||||
|
level.sudden_death = 0;
|
||||||
|
level.sudden_death_time = 300;
|
||||||
|
level.sudden_death_health_loss = 100;
|
||||||
|
|
||||||
|
while(1)
|
||||||
|
{
|
||||||
|
level waittill("restart_round_start");
|
||||||
|
|
||||||
|
level.sudden_death = 0;
|
||||||
|
|
||||||
|
time = level waittill_notify_or_timeout("restart_round", level.sudden_death_time);
|
||||||
|
|
||||||
|
if(!isDefined(time))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
level.sudden_death = 1;
|
||||||
|
|
||||||
|
players = get_players();
|
||||||
|
foreach(player in players)
|
||||||
|
{
|
||||||
|
player thread show_grief_hud_msg( "Sudden Death!" );
|
||||||
|
player thread show_grief_hud_msg( "Lose " + level.sudden_death_health_loss + " Health!", undefined, 30, 1 );
|
||||||
|
|
||||||
|
health = player.health;
|
||||||
|
player setMaxHealth(player.maxhealth - level.sudden_death_health_loss);
|
||||||
|
if(player.health > health)
|
||||||
|
{
|
||||||
|
player.health = health;
|
||||||
|
}
|
||||||
|
|
||||||
|
player.premaxhealth -= level.sudden_death_health_loss;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
unlimited_zombies()
|
unlimited_zombies()
|
||||||
{
|
{
|
||||||
while(1)
|
while(1)
|
||||||
|
Reference in New Issue
Block a user