Descriptions of buffs/powerups were somewhat based on https://gitlab.com/xonotic/xonotic/-/wikis/Buffs and https://gitlab.com/xonotic/xonotic/-/wikis/Powerups.
ATTRIB(GameItem, m_glow, bool, false);
ATTRIB(GameItem, m_respawnsound, Sound, SND_ITEMRESPAWN);
#endif
+ METHOD(GameItem, describe, string(GameItem this))
+ {
+ TC(GameItem, this);
+ return SUPER(Object).describe(this);
+ }
METHOD(GameItem, display, void(GameItem this, void(string name, string icon) returns))
{
TC(GameItem, this);
ATTRIB(Ammo, m_respawntimejitter, float(), GET(g_pickup_respawntimejitter_ammo));
ATTRIB(Ammo, m_pickupanyway, float(), GET(g_pickup_ammo_anyway));
#endif
+ METHOD(Ammo, describe, string(Ammo this))
+ {
+ TC(Ammo, this);
+ return SUPER(Pickup).describe(this);
+ }
ENDCLASS(Ammo)
#endif
CLASS(Shells, Ammo)
+ METHOD(Shells, describe, string(Shells this))
+ {
+ TC(Shells, this);
+ return _("The Shells ammo type is used by the Shotgun and Overkill Shotgun");
+ }
ENDCLASS(Shells)
REGISTER_ITEM(Shells, Shells) {
#endif
CLASS(Bullets, Ammo)
+ METHOD(Bullets, describe, string(Bullets this))
+ {
+ TC(Bullets, this);
+ return _("The Bullets ammo type is used by the MachineGun, Rifle, Overkill MachineGun, and Overkill Heavy Machine Gun");
+ }
ENDCLASS(Bullets)
REGISTER_ITEM(Bullets, Bullets) {
SetResourceExplicit(item, RES_ROCKETS, g_pickup_rockets);
}
#endif
-REGISTER_ITEM(Rockets, Ammo) {
+
+CLASS(Rockets, Ammo)
+ METHOD(Rockets, describe, string(Rockets this))
+ {
+ TC(Rockets, this);
+ return _("The Rockets ammo type is used by the Devastator, Mortar, Mine Layer, Hagar, T.A.G. Seeker, and Overkill Rocket Propelled Chainsaw");
+ }
+ENDCLASS(Rockets)
+
+REGISTER_ITEM(Rockets, Rockets) {
this.m_canonical_spawnfunc = "item_rockets";
#ifdef GAMEQC
this.spawnflags = ITEM_FLAG_NORMAL | ITEM_FLAG_RESOURCE;
SetResourceExplicit(item, RES_CELLS, g_pickup_cells);
}
#endif
-REGISTER_ITEM(Cells, Ammo) {
+
+CLASS(Cells, Ammo)
+ METHOD(Cells, describe, string(Cells this))
+ {
+ TC(Cells, this);
+ return _("The Cells ammo type is used by the Vortex, Crylink, Electro, Heavy Laser Assault Cannon, Arc, and Vaporizer");
+ }
+ENDCLASS(Cells)
+
+REGISTER_ITEM(Cells, Cells) {
this.m_canonical_spawnfunc = "item_cells";
#ifdef GAMEQC
this.spawnflags = ITEM_FLAG_NORMAL | ITEM_FLAG_RESOURCE;
#include <server/items/items.qh>
#endif
+// small armor
#ifdef GAMEQC
MODEL(ArmorSmall_ITEM, Item_Model("item_armor_small.md3"));
SOUND(ArmorSmall, Item_Sound("armor1"));
}
#endif
-REGISTER_ITEM(ArmorSmall, Armor) {
+CLASS(ArmorSmall, Armor)
+ METHOD(ArmorSmall, describe, string(ArmorSmall this))
+ {
+ TC(ArmorSmall, this);
+ return _("The Small armor provides you a small amount of armor when picked up, "
+ "protecting you from damage by absorbing incoming hits until it is depleted");
+ }
+ENDCLASS(ArmorSmall)
+
+REGISTER_ITEM(ArmorSmall, ArmorSmall) {
this.m_canonical_spawnfunc = "item_armor_small";
#ifdef GAMEQC
this.spawnflags = ITEM_FLAG_NORMAL | ITEM_FLAG_RESOURCE;
SPAWNFUNC_ITEM(item_armor_small, ITEM_ArmorSmall)
+// medium armor
#ifdef GAMEQC
MODEL(ArmorMedium_ITEM, Item_Model("item_armor_medium.md3"));
SOUND(ArmorMedium, Item_Sound("armor10"));
}
#endif
-REGISTER_ITEM(ArmorMedium, Armor) {
+CLASS(ArmorMedium, Armor)
+ METHOD(ArmorMedium, describe, string(ArmorMedium this))
+ {
+ TC(ArmorMedium, this);
+ return _("The Medium armor provides you a medium amount of armor when picked up, "
+ "protecting you from damage by absorbing incoming hits until it is depleted");
+ }
+ENDCLASS(ArmorMedium)
+
+REGISTER_ITEM(ArmorMedium, ArmorMedium) {
this.m_canonical_spawnfunc = "item_armor_medium";
#ifdef GAMEQC
this.spawnflags = ITEM_FLAG_NORMAL | ITEM_FLAG_RESOURCE;
SPAWNFUNC_ITEM(item_armor_medium, ITEM_ArmorMedium)
+// big armor
#ifdef GAMEQC
MODEL(ArmorBig_ITEM, Item_Model("item_armor_big.md3"));
SOUND(ArmorBig, Item_Sound("armor17_5"));
}
#endif
-REGISTER_ITEM(ArmorBig, Armor) {
+CLASS(ArmorBig, Armor)
+ METHOD(ArmorBig, describe, string(ArmorBig this))
+ {
+ TC(ArmorBig, this);
+ return _("The Big armor provides you a large amount of armor when picked up, "
+ "protecting you from damage by absorbing incoming hits until it is depleted");
+ }
+ENDCLASS(ArmorBig)
+
+REGISTER_ITEM(ArmorBig, ArmorBig) {
this.m_canonical_spawnfunc = "item_armor_big";
#ifdef GAMEQC
this.spawnflags = ITEM_FLAG_NORMAL | ITEM_FLAG_RESOURCE;
SPAWNFUNC_ITEM(item_armor_big, ITEM_ArmorBig)
+// mega armor
#ifdef GAMEQC
MODEL(ArmorMega_ITEM, Item_Model("item_armor_large.md3"));
SOUND(ArmorMega, Item_Sound("armor25"));
}
#endif
-REGISTER_ITEM(ArmorMega, Armor) {
+CLASS(ArmorMega, Armor)
+ METHOD(ArmorMega, describe, string(ArmorMega this))
+ {
+ TC(ArmorMega, this);
+ return _("The Mega armor provides you a huge amount of armor when picked up, "
+ "protecting you from damage by absorbing incoming hits until it is depleted\n\n"
+ "It tends to be one of the most highly contested items on a map, particularly in game modes like Duel");
+ }
+ENDCLASS(ArmorMega)
+
+REGISTER_ITEM(ArmorMega, ArmorMega) {
this.m_canonical_spawnfunc = "item_armor_mega";
#ifdef GAMEQC
this.spawnflags = ITEM_FLAG_NORMAL | ITEM_FLAG_RESOURCE;
#include <server/items/items.qh>
#endif
+// small health
#ifdef GAMEQC
MODEL(HealthSmall_ITEM, Item_Model("g_h1.md3"));
SOUND(HealthSmall, Item_Sound("minihealth"));
}
#endif
-REGISTER_ITEM(HealthSmall, Health) {
+CLASS(HealthSmall, Health)
+ METHOD(HealthSmall, describe, string(HealthSmall this))
+ {
+ TC(HealthSmall, this);
+ return _("The Small health restores a small amount of health when picked up, "
+ "helping you recover from damage taken during combat");
+ }
+ENDCLASS(HealthSmall)
+
+REGISTER_ITEM(HealthSmall, HealthSmall) {
this.m_canonical_spawnfunc = "item_health_small";
#ifdef GAMEQC
this.spawnflags = ITEM_FLAG_NORMAL | ITEM_FLAG_RESOURCE;
this.m_respawntimejitter = GET(g_pickup_respawntimejitter_health_small);
this.m_pickupanyway = GET(g_pickup_healthsmall_anyway);
this.m_iteminit = item_healthsmall_init;
-
#endif
}
SPAWNFUNC_ITEM(item_health_small, ITEM_HealthSmall)
+// medium health
#ifdef GAMEQC
MODEL(HealthMedium_ITEM, Item_Model("g_h25.md3"));
SOUND(HealthMedium, Item_Sound("mediumhealth"));
}
#endif
-REGISTER_ITEM(HealthMedium, Health) {
+CLASS(HealthMedium, Health)
+ METHOD(HealthMedium, describe, string(HealthMedium this))
+ {
+ TC(HealthMedium, this);
+ return _("The Medium health restores a medium amount of health when picked up, "
+ "helping you recover from damage taken during combat");
+ }
+ENDCLASS(HealthMedium)
+
+REGISTER_ITEM(HealthMedium, HealthMedium) {
this.m_canonical_spawnfunc = "item_health_medium";
#ifdef GAMEQC
this.spawnflags = ITEM_FLAG_NORMAL | ITEM_FLAG_RESOURCE;
SPAWNFUNC_ITEM(item_health_medium, ITEM_HealthMedium)
+// big health
#ifdef GAMEQC
MODEL(HealthBig_ITEM, Item_Model("g_h50.md3"));
SOUND(HealthBig, Item_Sound("mediumhealth"));
}
#endif
-REGISTER_ITEM(HealthBig, Health) {
+CLASS(HealthBig, Health)
+ METHOD(HealthBig, describe, string(HealthBig this))
+ {
+ TC(HealthBig, this);
+ return _("The Big health restores a large amount of health when picked up, "
+ "helping you recover from damage taken during combat");
+ }
+ENDCLASS(HealthBig)
+
+REGISTER_ITEM(HealthBig, HealthBig) {
this.m_canonical_spawnfunc = "item_health_big";
#ifdef GAMEQC
this.spawnflags = ITEM_FLAG_NORMAL | ITEM_FLAG_RESOURCE;
}
#endif
-REGISTER_ITEM(HealthMega, Health) {
+CLASS(HealthMega, Health)
+ METHOD(HealthMega, describe, string(HealthMega this))
+ {
+ TC(HealthMega, this);
+ return _("The Mega health restores a huge amount of health when picked up, "
+ "helping you recover from damage taken during combat\n\n"
+ "It tends to be one of the most highly contested items on a map, particularly in game modes like Duel");
+ }
+ENDCLASS(HealthMega)
+
+REGISTER_ITEM(HealthMega, HealthMega) {
this.m_canonical_spawnfunc = "item_health_mega";
#ifdef GAMEQC
this.spawnflags = ITEM_FLAG_NORMAL | ITEM_FLAG_RESOURCE;
.int m_itemid;
#endif
+// jetpack powerup
#ifdef GAMEQC
MODEL(Jetpack_ITEM, Item_Model("g_jetpack.md3"));
#endif
#endif
CLASS(Jetpack, Powerup)
+ METHOD(Jetpack, describe, string(Jetpack this))
+ {
+ TC(Jetpack, this);
+ return _("The Jetpack allows you to fly around the map for a short period, "
+ "providing increased mobility, maneuverability, and the ability to reach higher ground\n\n"
+ "It consumes Fuel ammo while operating, so make sure you don't run out when you're high up!");
+ }
ENDCLASS(Jetpack)
REGISTER_ITEM(Jetpack, Jetpack) {
SPAWNFUNC_ITEM(item_jetpack, ITEM_Jetpack)
+// fuel ammo
#ifdef GAMEQC
MODEL(JetpackFuel_ITEM, Item_Model("g_fuel.md3"));
#endif
+CLASS(JetpackFuel, Ammo)
+ METHOD(JetpackFuel, describe, string(JetpackFuel this))
+ {
+ TC(JetpackFuel, this);
+ return _("The Fuel ammo type is used by the Jetpack");
+ }
+ENDCLASS(JetpackFuel)
+
#ifdef SVQC
PROPERTY(int, g_pickup_fuel);
void ammo_fuel_init(Pickup this, entity item)
SetResourceExplicit(item, RES_FUEL, g_pickup_fuel);
}
#endif
-REGISTER_ITEM(JetpackFuel, Ammo) {
+REGISTER_ITEM(JetpackFuel, JetpackFuel) {
this.m_canonical_spawnfunc = "item_fuel";
#ifdef GAMEQC
this.spawnflags = ITEM_FLAG_NORMAL | ITEM_FLAG_RESOURCE;
SPAWNFUNC_ITEM(item_fuel, ITEM_JetpackFuel)
+// fuel regenerator powerup
#ifdef GAMEQC
MODEL(JetpackRegen_ITEM, Item_Model("g_fuelregen.md3"));
#endif
#endif
CLASS(JetpackRegen, Powerup)
+ METHOD(JetpackRegen, describe, string(JetpackRegen this))
+ {
+ TC(JetpackRegen, this);
+ return _("The Fuel Regenerator powerup regenerates Fuel needed for the Jetpack until the powerup expires, "
+ "so you can continue flying around for longer"
+ "Since it is a powerup, it will drop if you die while holding it");
+ }
ENDCLASS(JetpackRegen)
REGISTER_ITEM(JetpackRegen, JetpackRegen) {
ATTRIB(AmmoBuff, m_icon, string, "buff_ammo");
ATTRIB(AmmoBuff, m_skin, int, 3);
ATTRIB(AmmoBuff, m_color, vector, '0.76 1 0.1');
+ METHOD(AmmoBuff, describe, string(AmmoBuff this))
+ {
+ TC(AmmoBuff, this);
+ return _("The Ammo Buff gives you infinite ammo until the buff expires, so you don't need to worry about running out of ammo");
+ }
ENDCLASS(AmmoBuff)
-REGISTER_BUFF(AMMO, NEW(AmmoBuff));
+REGISTER_BUFF(AMMO, AmmoBuff);
BUFF_SPAWNFUNCS(ammo, BUFF_AMMO)
BUFF_SPAWNFUNC_Q3COMPAT(item_ammoregen, BUFF_AMMO)
ATTRIB(ResistanceBuff, m_icon, string, "buff_resistance");
ATTRIB(ResistanceBuff, m_skin, int, 0);
ATTRIB(ResistanceBuff, m_color, vector, '0.36 1 0.07');
+ METHOD(ResistanceBuff, describe, string(ResistanceBuff this))
+ {
+ TC(ResistanceBuff, this);
+ return _("The Resistance Buff greatly reduces your damage taken while the buff is active");
+ }
ENDCLASS(ResistanceBuff)
-REGISTER_BUFF(RESISTANCE, NEW(ResistanceBuff));
+REGISTER_BUFF(RESISTANCE, ResistanceBuff);
BUFF_SPAWNFUNCS(resistance, BUFF_RESISTANCE)
BUFF_SPAWNFUNC_Q3COMPAT(item_guard, BUFF_RESISTANCE)
ATTRIB(MedicBuff, m_icon, string, "buff_medic");
ATTRIB(MedicBuff, m_skin, int, 1);
ATTRIB(MedicBuff, m_color, vector, '1 0.12 0');
+ METHOD(MedicBuff, describe, string(MedicBuff this))
+ {
+ TC(MedicBuff, this);
+ return _("The Medic Buff increases health regeneration speed, increases the maximum health you can have before health starts to rot, and reduces health rot speed until the buff expires\n\n"
+ "It also gives you a chance to survive a fatal hit, with a small amount of health left over");
+ }
ENDCLASS(MedicBuff)
-REGISTER_BUFF(MEDIC, NEW(MedicBuff));
+REGISTER_BUFF(MEDIC, MedicBuff);
BUFF_SPAWNFUNCS(medic, BUFF_MEDIC)
BUFF_SPAWNFUNC_Q3COMPAT(item_regen, BUFF_MEDIC)
BUFF_SPAWNFUNC_Q3COMPAT(item_revival, BUFF_MEDIC)
ATTRIB(BashBuff, m_icon, string, "buff_bash");
ATTRIB(BashBuff, m_skin, int, 5);
ATTRIB(BashBuff, m_color, vector, '1 0.39 0');
+ METHOD(BashBuff, describe, string(BashBuff this))
+ {
+ TC(BashBuff, this);
+ return _("The Bash Buff increases knockback force you deal, and makes you immune to knockback while the buff is active\n\n"
+ "It also slightly increases knockback you deal to yourself");
+ }
ENDCLASS(BashBuff)
-REGISTER_BUFF(BASH, NEW(BashBuff));
+REGISTER_BUFF(BASH, BashBuff);
BUFF_SPAWNFUNCS(bash, BUFF_BASH)
BUFF_SPAWNFUNC_Q3COMPAT(item_scout, BUFF_BASH)
ATTRIB(VampireBuff, m_icon, string, "buff_vampire");
ATTRIB(VampireBuff, m_skin, int, 2);
ATTRIB(VampireBuff, m_color, vector, '1 0 0.24');
+ METHOD(VampireBuff, describe, string(VampireBuff this))
+ {
+ TC(VampireBuff, this);
+ return _("The Vampire Buff converts some of the damage you deal to enemies and monsters into health for yourself, until the buff expires");
+ }
ENDCLASS(VampireBuff)
-REGISTER_BUFF(VAMPIRE, NEW(VampireBuff));
+REGISTER_BUFF(VAMPIRE, VampireBuff);
BUFF_SPAWNFUNCS(vampire, BUFF_VAMPIRE)
BUFF_SPAWNFUNC_Q3COMPAT(holdable_invulnerability, BUFF_VAMPIRE)
ATTRIB(DisabilityBuff, m_icon, string, "buff_disability");
ATTRIB(DisabilityBuff, m_skin, int, 7);
ATTRIB(DisabilityBuff, m_color, vector, '0.94 0.3 1');
+ METHOD(DisabilityBuff, describe, string(DisabilityBuff this))
+ {
+ TC(DisabilityBuff, this);
+ return _("The Disability Buff causes your enemies and monsters to slow down for a few seconds when you attack them, while the buff is active\n\n"
+ "This is particularly useful against speedy players, especially in Capture The Flag");
+ }
ENDCLASS(DisabilityBuff)
-REGISTER_BUFF(DISABILITY, NEW(DisabilityBuff));
+REGISTER_BUFF(DISABILITY, DisabilityBuff);
BUFF_SPAWNFUNCS(disability, BUFF_DISABILITY)
CLASS(VengeanceBuff, Buff)
ATTRIB(VengeanceBuff, m_icon, string, "buff_vengeance");
ATTRIB(VengeanceBuff, m_skin, int, 15);
ATTRIB(VengeanceBuff, m_color, vector, '1 0.23 0.61');
+ METHOD(VengeanceBuff, describe, string(VengeanceBuff this))
+ {
+ TC(VengeanceBuff, this);
+ return _("The Vengeance Buff reciprocates a portion of the damage enemies deal to you onto them, until the buff expires");
+ }
ENDCLASS(VengeanceBuff)
-REGISTER_BUFF(VENGEANCE, NEW(VengeanceBuff));
+REGISTER_BUFF(VENGEANCE, VengeanceBuff);
BUFF_SPAWNFUNCS(vengeance, BUFF_VENGEANCE)
BUFF_SPAWNFUNC_Q3COMPAT(holdable_kamikaze, BUFF_VENGEANCE)
ATTRIB(JumpBuff, m_icon, string, "buff_jump");
ATTRIB(JumpBuff, m_skin, int, 10);
ATTRIB(JumpBuff, m_color, vector, '0.24 0.78 1');
+ METHOD(JumpBuff, describe, string(JumpBuff this))
+ {
+ TC(JumpBuff, this);
+ return _("The Jump Buff greatly increases your jump height, while the buff is active");
+ }
ENDCLASS(JumpBuff)
-REGISTER_BUFF(JUMP, NEW(JumpBuff));
+REGISTER_BUFF(JUMP, JumpBuff);
BUFF_SPAWNFUNCS(jump, BUFF_JUMP)
BUFF_SPAWNFUNC_Q3COMPAT(item_jumper, BUFF_JUMP)
ATTRIB(InfernoBuff, m_icon, string, "buff_inferno");
ATTRIB(InfernoBuff, m_skin, int, 16);
ATTRIB(InfernoBuff, m_color, vector, '1 0.62 0');
+ METHOD(InfernoBuff, describe, string(InfernoBuff this))
+ {
+ TC(InfernoBuff, this);
+ return _("The Inferno Buff sets any enemies or monsters you attack alight, dealing burn damage to them for several seconds until the buff expires");
+ }
ENDCLASS(InfernoBuff)
-REGISTER_BUFF(INFERNO, NEW(InfernoBuff));
+REGISTER_BUFF(INFERNO, InfernoBuff);
BUFF_SPAWNFUNCS(inferno, BUFF_INFERNO)
BUFF_SPAWNFUNC_Q3COMPAT(item_doubler, BUFF_INFERNO)
ATTRIB(SwapperBuff, m_icon, string, "buff_swapper");
ATTRIB(SwapperBuff, m_skin, int, 17);
ATTRIB(SwapperBuff, m_color, vector, '0.63 0.36 1');
+ METHOD(SwapperBuff, describe, string(SwapperBuff this))
+ {
+ TC(SwapperBuff, this);
+ return _("The Swapper Buff allows you to press the \"dropweapon\" bind to switch places with a nearby enemy once\n\n"
+ "A common usage of this Buff is to jump over the map's void, then swap with an enemy, to cause them to fall into the void");
+ }
ENDCLASS(SwapperBuff)
-REGISTER_BUFF(SWAPPER, NEW(SwapperBuff));
+REGISTER_BUFF(SWAPPER, SwapperBuff);
BUFF_SPAWNFUNCS(swapper, BUFF_SWAPPER)
BUFF_SPAWNFUNC_Q3COMPAT(holdable_teleporter, BUFF_SWAPPER)
ATTRIB(MagnetBuff, m_icon, string, "buff_magnet");
ATTRIB(MagnetBuff, m_skin, int, 18);
ATTRIB(MagnetBuff, m_color, vector, '1 0.95 0.18');
+ METHOD(MagnetBuff, describe, string(MagnetBuff this))
+ {
+ TC(MagnetBuff, this);
+ return _("The Magnet Buff greatly increases your item pickup range, collecting nearby items for you while the buff is active");
+ }
ENDCLASS(MagnetBuff)
-REGISTER_BUFF(MAGNET, NEW(MagnetBuff));
+REGISTER_BUFF(MAGNET, MagnetBuff);
BUFF_SPAWNFUNCS(magnet, BUFF_MAGNET)
CLASS(LuckBuff, Buff)
ATTRIB(LuckBuff, m_icon, string, "buff_luck");
ATTRIB(LuckBuff, m_skin, int, 19);
ATTRIB(LuckBuff, m_color, vector, '1 0.23 0.44');
+ METHOD(LuckBuff, describe, string(LuckBuff this))
+ {
+ TC(LuckBuff, this);
+ return _("While you have the Luck Buff, each attack has a chance of being a critical hit with greatly increased damage");
+ }
ENDCLASS(LuckBuff)
-REGISTER_BUFF(LUCK, NEW(LuckBuff));
+REGISTER_BUFF(LUCK, LuckBuff);
BUFF_SPAWNFUNCS(luck, BUFF_LUCK)
CLASS(FlightBuff, Buff)
ATTRIB(FlightBuff, m_icon, string, "buff_flight");
ATTRIB(FlightBuff, m_skin, int, 11);
ATTRIB(FlightBuff, m_color, vector, '0.23 0.44 1');
+ METHOD(FlightBuff, describe, string(FlightBuff this))
+ {
+ TC(FlightBuff, this);
+ return _("While you have the Flight Buff, you can crouch while midair to switch your gravity, allowing flight");
+ }
ENDCLASS(FlightBuff)
-REGISTER_BUFF(FLIGHT, NEW(FlightBuff));
+REGISTER_BUFF(FLIGHT, FlightBuff);
BUFF_SPAWNFUNCS(flight, BUFF_FLIGHT)
BUFF_SPAWNFUNC_Q3COMPAT(item_flight, BUFF_FLIGHT)
#include <common/mutators/mutator/waypoints/all.qh>
#endif
-#define REGISTER_BUFF(id, inst) \
- REGISTER(StatusEffect, BUFF_##id, m_id, inst)
+#define REGISTER_BUFF(id, class) REGISTER(StatusEffect, BUFF_##id, m_id, NEW(class))
#include <common/mutators/mutator/status_effects/_mod.qh>
CLASS(Buff, StatusEffects)
}
#ifdef SVQC
METHOD(Buff, m_time, float(Buff this))
- { return cvar(strcat("g_buffs_", this.netname, "_time")); }
+ {
+ return cvar(strcat("g_buffs_", this.netname, "_time"));
+ }
#endif
+ METHOD(Buff, describe, string(Buff this)) {
+ TC(Buff, this);
+ return SUPER(Object).describe(this);
+ }
ENDCLASS(Buff)
STATIC_INIT(REGISTER_BUFFS) {
SetResourceExplicit(item, RES_CELLS, autocvar_g_instagib_ammo_drop);
}
#endif
-REGISTER_ITEM(VaporizerCells, Ammo) {
+
+CLASS(VaporizerCells, Ammo)
+ METHOD(VaporizerCells, describe, string(VaporizerCells this))
+ {
+ TC(VaporizerCells, this);
+ return _("The Vaporizer ammo is sometimes present on maps when InstaGib is enabled, providing ammo for the Vaporizer");
+ }
+ENDCLASS(VaporizerCells)
+
+REGISTER_ITEM(VaporizerCells, VaporizerCells) {
this.m_canonical_spawnfunc = "item_vaporizer_cells";
#ifdef GAMEQC
this.spawnflags = ITEM_FLAG_MUTATORBLOCKED;
SOUND(ExtraLife, Item_Sound("megahealth"));
#endif
-REGISTER_ITEM(ExtraLife, Powerup) {
+CLASS(ExtraLife, Powerup)
+ METHOD(ExtraLife, describe, string(ExtraLife this))
+ {
+ TC(ExtraLife, this);
+ return _("The Extra Life powerup acts as armor in InstaGib. "
+ "If a player is shot while having one or more Extra Lives, they will survive the shot but suffer strong knockback");
+ }
+ENDCLASS(ExtraLife)
+
+REGISTER_ITEM(ExtraLife, ExtraLife) {
this.m_canonical_spawnfunc = "item_extralife";
#ifdef GAMEQC
this.m_model = MDL_ExtraLife_ITEM;
ATTRIB(Invisibility, m_name, string, _("Invisibility"));
ATTRIB(Invisibility, m_color, vector, '0.5 0.5 1');
ATTRIB(Invisibility, m_icon, string, "buff_invisible");
+ METHOD(Invisibility, describe, string(Invisibility this))
+ {
+ TC(Invisibility, this);
+ return _("The Invisibility powerup increases your translucency while the powerup is active, making it more difficult for enemies to see you. "
+ "This powerup is often present in InstaGib\n\n"
+ "Since it is a powerup, it will drop if you die while holding it");
+ }
ENDCLASS(Invisibility)
REGISTER_STATUSEFFECT(Invisibility, NEW(Invisibility));
ATTRIB(Shield, netname, string, "invincible"); // NOTE: referring to as invincible so that it matches the powerup item
ATTRIB(Shield, m_name, string, _("Shield"));
ATTRIB(Shield, m_icon, string, "shield");
+ METHOD(Shield, describe, string(Shield this))
+ {
+ TC(Shield, this);
+ return _("The Shield powerup greatly decreases the damage you take until the powerup expires, having a compounding effect with armor. "
+ "It also makes you more resistant to knockback\n\n"
+ "Since it is a powerup, it will drop if you die while holding it");
+ }
ENDCLASS(Shield)
REGISTER_STATUSEFFECT(Shield, NEW(Shield));
ATTRIB(Speed, m_name, string, _("Speed"));
ATTRIB(Speed, m_color, vector, '0.1 1 0.84');
ATTRIB(Speed, m_icon, string, "buff_speed");
+ METHOD(Speed, describe, string(Speed this))
+ {
+ TC(Speed, this);
+ return _("The Speed powerup increases your movement speed, attack speed, and health regeneration speed while the powerup is active. "
+ "However, it also makes you a bit more vulnerable to incoming attacks\n\n"
+ "Since it is a powerup, it will drop if you die while holding it");
+ }
ENDCLASS(Speed)
REGISTER_STATUSEFFECT(Speed, NEW(Speed));
ATTRIB(Strength, netname, string, "strength");
ATTRIB(Strength, m_name, string, _("Strength"));
ATTRIB(Strength, m_icon, string, "strength");
+ METHOD(Strength, describe, string(Strength this))
+ {
+ TC(Strength, this);
+ return _("The Strength powerup greatly increases the damage you deal, until the powerup expires. "
+ "It also increases the knockback that your attacks deal\n\n"
+ "The damage and knockback you deal to yourself also increases but by a smaller amount\n\n"
+ "Since it is a powerup, it will drop if you die while holding it");
+ }
ENDCLASS(Strength)
REGISTER_STATUSEFFECT(Strength, NEW(Strength));
#ifdef GAMEQC
ATTRIB(Powerups, m_sound_rm, Sound, SND_POWEROFF);
#endif
+ METHOD(Powerups, describe, string(Powerups this))
+ {
+ TC(Powerups, this);
+ return SUPER(Object).describe(this);
+ }
ENDCLASS(Powerups)