mirror of
https://github.com/JezuzLizard/BO2-Reimagined.git
synced 2025-06-10 07:08:06 -05:00
Encounter: steal points from EMP Grenade and Meat
This commit is contained in:
@ -201,7 +201,10 @@ player_perk_pause_and_unpause_all_perks(time, owner)
|
||||
{
|
||||
self.last_emped_by = spawnStruct();
|
||||
self.last_emped_by.attacker = owner;
|
||||
self [[level.store_player_damage_info_func]](owner, "emp_grenade_zm", "MOD_GRENADE_SPLASH");
|
||||
|
||||
self.player_damage_callback_score_only = 1;
|
||||
self [[level._game_module_player_damage_callback]](owner, owner, 0, 0, "MOD_GRENADE_SPLASH", "emp_grenade_zm");
|
||||
self.player_damage_callback_score_only = undefined;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -439,7 +439,10 @@ meat_stink_player(who, owner)
|
||||
{
|
||||
who.last_meated_by = spawnStruct();
|
||||
who.last_meated_by.attacker = owner;
|
||||
who [[level.store_player_damage_info_func]](owner, level.item_meat_name, "MOD_UNKNOWN");
|
||||
|
||||
who.player_damage_callback_score_only = 1;
|
||||
who [[level._game_module_player_damage_callback]](owner, owner, 0, 0, "MOD_UNKNOWN", level.item_meat_name);
|
||||
who.player_damage_callback_score_only = undefined;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1661,6 +1661,15 @@ custom_end_screen()
|
||||
|
||||
game_module_player_damage_callback(einflictor, eattacker, idamage, idflags, smeansofdeath, sweapon, vpoint, vdir, shitloc, psoffsettime)
|
||||
{
|
||||
if (isdefined(self.player_damage_callback_score_only))
|
||||
{
|
||||
self do_game_mode_stun_score_steal(eattacker);
|
||||
|
||||
self store_player_damage_info(eattacker, sweapon, smeansofdeath);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
self.last_damage_from_zombie_or_player = 0;
|
||||
|
||||
if (isDefined(eattacker))
|
||||
@ -1730,90 +1739,7 @@ game_module_player_damage_callback(einflictor, eattacker, idamage, idflags, smea
|
||||
{
|
||||
is_melee = true;
|
||||
dir = vdir;
|
||||
amount = 0;
|
||||
|
||||
if (self maps\mp\zombies\_zm_laststand::is_reviving_any())
|
||||
{
|
||||
if (idamage >= 500)
|
||||
{
|
||||
if (!self isOnGround())
|
||||
{
|
||||
amount = 185; // 64 air units
|
||||
}
|
||||
else if (self getStance() == "stand")
|
||||
{
|
||||
amount = 297.5; // 32 units
|
||||
}
|
||||
else if (self getStance() == "crouch")
|
||||
{
|
||||
amount = 215; // 21.33 units
|
||||
}
|
||||
else if (self getStance() == "prone")
|
||||
{
|
||||
amount = 132.5; // 10.66 units
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!self isOnGround())
|
||||
{
|
||||
amount = 142.5; // 48 air units
|
||||
}
|
||||
else if (self getStance() == "stand")
|
||||
{
|
||||
amount = 235; // 24 units
|
||||
}
|
||||
else if (self getStance() == "crouch")
|
||||
{
|
||||
amount = 172.5; // 16 units
|
||||
}
|
||||
else if (self getStance() == "prone")
|
||||
{
|
||||
amount = 112.5; // 8 units
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (idamage >= 500)
|
||||
{
|
||||
if (!self isOnGround())
|
||||
{
|
||||
amount = 350; // 128 air units
|
||||
}
|
||||
else if (self getStance() == "stand")
|
||||
{
|
||||
amount = 540; // 64 units
|
||||
}
|
||||
else if (self getStance() == "crouch")
|
||||
{
|
||||
amount = 377.5; // 42.66 units
|
||||
}
|
||||
else if (self getStance() == "prone")
|
||||
{
|
||||
amount = 215; // 21.33 units
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!self isOnGround())
|
||||
{
|
||||
amount = 265; // 96 air units
|
||||
}
|
||||
else if (self getStance() == "stand")
|
||||
{
|
||||
amount = 420; // 48 units
|
||||
}
|
||||
else if (self getStance() == "crouch")
|
||||
{
|
||||
amount = 297.5; // 32 units
|
||||
}
|
||||
else if (self getStance() == "prone")
|
||||
{
|
||||
amount = 172.5; // 16 units
|
||||
}
|
||||
}
|
||||
}
|
||||
amount = self get_player_push_amount(idamage);
|
||||
|
||||
if (self isOnGround())
|
||||
{
|
||||
@ -1832,10 +1758,7 @@ game_module_player_damage_callback(einflictor, eattacker, idamage, idflags, smea
|
||||
|
||||
if (!is_true(self._being_shellshocked))
|
||||
{
|
||||
score = 100 * maps\mp\zombies\_zm_score::get_points_multiplier(eattacker);
|
||||
self stun_score_steal(eattacker, score);
|
||||
|
||||
eattacker.killsdenied++;
|
||||
self do_game_mode_stun_score_steal(eattacker);
|
||||
}
|
||||
|
||||
if (isDefined(level._effect["butterflies"]))
|
||||
@ -1850,6 +1773,104 @@ game_module_player_damage_callback(einflictor, eattacker, idamage, idflags, smea
|
||||
}
|
||||
}
|
||||
|
||||
get_player_push_amount(idamage)
|
||||
{
|
||||
amount = 0;
|
||||
|
||||
if (self maps\mp\zombies\_zm_laststand::is_reviving_any())
|
||||
{
|
||||
if (idamage >= 500)
|
||||
{
|
||||
if (!self isOnGround())
|
||||
{
|
||||
amount = 185; // 64 air units
|
||||
}
|
||||
else if (self getStance() == "stand")
|
||||
{
|
||||
amount = 297.5; // 32 units
|
||||
}
|
||||
else if (self getStance() == "crouch")
|
||||
{
|
||||
amount = 215; // 21.33 units
|
||||
}
|
||||
else if (self getStance() == "prone")
|
||||
{
|
||||
amount = 132.5; // 10.66 units
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!self isOnGround())
|
||||
{
|
||||
amount = 142.5; // 48 air units
|
||||
}
|
||||
else if (self getStance() == "stand")
|
||||
{
|
||||
amount = 235; // 24 units
|
||||
}
|
||||
else if (self getStance() == "crouch")
|
||||
{
|
||||
amount = 172.5; // 16 units
|
||||
}
|
||||
else if (self getStance() == "prone")
|
||||
{
|
||||
amount = 112.5; // 8 units
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (idamage >= 500)
|
||||
{
|
||||
if (!self isOnGround())
|
||||
{
|
||||
amount = 350; // 128 air units
|
||||
}
|
||||
else if (self getStance() == "stand")
|
||||
{
|
||||
amount = 540; // 64 units
|
||||
}
|
||||
else if (self getStance() == "crouch")
|
||||
{
|
||||
amount = 377.5; // 42.66 units
|
||||
}
|
||||
else if (self getStance() == "prone")
|
||||
{
|
||||
amount = 215; // 21.33 units
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!self isOnGround())
|
||||
{
|
||||
amount = 265; // 96 air units
|
||||
}
|
||||
else if (self getStance() == "stand")
|
||||
{
|
||||
amount = 420; // 48 units
|
||||
}
|
||||
else if (self getStance() == "crouch")
|
||||
{
|
||||
amount = 297.5; // 32 units
|
||||
}
|
||||
else if (self getStance() == "prone")
|
||||
{
|
||||
amount = 172.5; // 16 units
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return amount;
|
||||
}
|
||||
|
||||
do_game_mode_stun_score_steal(eattacker)
|
||||
{
|
||||
score = 100 * maps\mp\zombies\_zm_score::get_points_multiplier(eattacker);
|
||||
self stun_score_steal(eattacker, score);
|
||||
|
||||
eattacker.killsdenied++;
|
||||
}
|
||||
|
||||
do_game_mode_stun_fx(einflictor, eattacker, idamage, idflags, smeansofdeath, sweapon, vpoint, vdir, shitloc, psoffsettime)
|
||||
{
|
||||
pos = vpoint;
|
||||
|
Reference in New Issue
Block a user