29 string cvar_name = sprintf(
"g_%s_%s_probability", prefix,
30 it.m_canonical_spawnfunc);
33 LOG_WARNF(
"Random items: cvar %s doesn't exist.", cvar_name);
45 if (!e.instagib_needammo)
48 e.instagib_needammo =
false;
55 float dmg = (hp <= 10) ? 5 : 10;
111 M_ARGV(1,
string) =
"vaporizer_cells";
119 if(mon.monsterdef == MON_MAGE)
171 float frag_deathtype =
M_ARGV(3,
float);
173 float frag_mirrordamage =
M_ARGV(5,
float);
181 if(frag_deathtype == DEATH_FALL.m_id)
207 frag_attacker.hitsound_damage_dealt += 1;
218 frag_mirrordamage = 0;
231 if(frag_mirrordamage > 0)
239 Send_Notification(NOTIF_ONE, frag_attacker, MSG_CENTER, CENTER_INSTAGIB_LIVES_REMAINING, armor);
240 frag_attacker.hitsound_damage_dealt += frag_mirrordamage;
242 frag_mirrordamage = 0;
250 M_ARGV(5,
float) = frag_mirrordamage;
272 M_ARGV(0,
string) =
"off";
280 case ITEM_Invisibility:
298 if (remaining_powerups_count == 0)
307 float r =
floor(
random() * remaining_powerups_count);
311 --remaining_powerups_count;
318 switch (item.itemdef)
320 case ITEM_Strength:
case ITEM_Shield:
case ITEM_HealthMega:
case ITEM_ArmorMega:
324 case ITEM_Invisibility:
case ITEM_ExtraLife:
case ITEM_Speed:
349 case WEP_VAPORIZER.m_id:
356 case WEP_DEVASTATOR.m_id:
case WEP_VORTEX.m_id:
365 if(cells && !item.weapon)
373 float frag_deathtype =
M_ARGV(3,
float);
404 if(item.itemdef == ITEM_ExtraLife)
427 M_ARGV(0,
string) =
"InstaGib";
#define MUTATOR_HOOKFUNCTION(...)
#define MUTATOR_RETURNVALUE
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
void SetResource(entity e, Resource res_type, float amount)
Sets the current amount of resource the given entity will have.
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.
const int IT_UNLIMITED_AMMO
const int IT_UNLIMITED_SUPERWEAPONS
int autocvar_g_instagib_ammo_drop
Notification Announcer_PickNumber(int type, int num)
float CVAR_TYPEFLAG_EXISTS
const float EF_FULLBRIGHT
void Damage(entity targ, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
float autocvar_g_friendlyfire
#define DEATH_ISWEAPON(t, w)
#define IL_EACH(this, cond, body)
void Inventory_pickupitem(Pickup this, entity player)
bool Item_IsDefinitionAllowed(entity definition)
Checks whether the items with the specified definition are allowed to spawn.
#define ITEM_IS_LOOT(item)
Returns whether the item is loot.
strcat(_("^F4Countdown stopped!"), "\n^BG", _("Teams are too unbalanced."))
void Send_Notification(NOTIF broadcast, entity client, MSG net_type, Notification net_name,...count)
void Kill_Notification(NOTIF broadcast, entity client, MSG net_type, CPID net_cpid)
ERASEABLE void RandomSelection_Init()
string RandomSelection_chosen_string
#define RandomSelection_AddString(s, weight, priority)
void Item_CopyFields(entity this, entity to)
void StartItem(entity this, entity def)
bool autocvar_g_instagib_ammo_convert_cells
bool autocvar_g_instagib_friendlypush
GameItem instagib_remaining_powerups[INSTAGIB_POWERUP_COUNT]
void instagib_countdown(entity this)
const int INSTAGIB_POWERUP_COUNT
bool autocvar_g_instagib_damagedbycontents
bool autocvar_g_instagib_ammo_convert_bullets
bool autocvar_g_instagib_mirrordamage
bool autocvar_g_instagib_blaster_keepdamage
bool autocvar_g_instagib_ammo_convert_shells
void instagib_stop_countdown(entity e)
bool autocvar_g_instagib_allow_jetpacks
bool autocvar_g_instagib_blaster_keepforce
void instagib_replace_item_with(entity this, GameItem def)
void instagib_ammocheck(entity this)
void instagib_replace_item_with_random_powerup(entity item)
string RandomItems_GetRandomInstagibItemClassName(string prefix)
Returns a random classname of the instagib item.
bool autocvar_g_instagib_ammo_convert_rockets
float autocvar_g_instagib_speed_time
int autocvar_g_instagib_extralives
float autocvar_g_instagib_invisibility_time
IntrusiveList g_instagib_items
float autocvar_g_rm_laser
string RandomItems_GetRandomItemClassName(string prefix)
Returns a random classname of the item.
Header file that describes the random items mutator.
void GiveResource(entity receiver, Resource res_type, float amount)
Gives an entity some resource.
#define FOREACH_CLIENT(cond, body)
float warmup_start_ammo_cells
float warmup_start_ammo_rockets
float warmup_start_ammo_shells
float warmup_start_ammo_nails
float warmup_start_health
WepSet warmup_start_weapons
float warmup_start_armorvalue