Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
152 changes: 102 additions & 50 deletions plugins/include/tf2.inc
Original file line number Diff line number Diff line change
Expand Up @@ -73,66 +73,65 @@ enum TFTeam

enum TFCond
{
TFCond_Slowed = 0,
//The names below more closely match tf.fgd's entries and internal cond names
TFCond_Aiming = 0,
TFCond_Zoomed,
TFCond_Disguising,
TFCond_Disguised,
TFCond_Cloaked,
TFCond_Ubercharged,
TFCond_TeleportedGlow,
TFCond_Invulnerable,
TFCond_Teleported,
TFCond_Taunting,
TFCond_UberchargeFading,
TFCond_Unknown1, //9
TFCond_CloakFlicker = 9,
TFCond_Teleporting,
TFCond_Kritzkrieged,
TFCond_Unknown2, //12
TFCond_TmpDamageBonus = 12,
TFCond_DeadRingered,
TFCond_Bonked,
TFCond_Dazed,
TFCond_Buffed,
TFCond_Charging,
TFCond_InvulnerableWearingOff,
TFCond_StealthedBlink,
TFCond_SelectedToTeleport,
TFCond_Critboosted,
TFCond_TmpDamageBonus,
TFCond_FeignDeath,
TFCond_Phase,
TFCond_Stunned,
TFCond_OffenseBuff,
TFCond_ShieldCharge,
TFCond_DemoBuff,
TFCond_CritCola,
TFCond_InHealRadius,
TFCond_Healing,
TFCond_OnFire,
TFCond_Overhealed,
TFCond_Jarated,
TFCond_EnergyBuff,
TFCond_RadiusHeal,
TFCond_HealthBuff,
TFCond_Burning,
TFCond_HealthOverhealed,
TFCond_Urine,
TFCond_Bleeding,
TFCond_DefenseBuffed,
TFCond_Milked,
TFCond_DefenseBuff,
TFCond_MadMilk,
TFCond_MegaHeal,
TFCond_RegenBuffed,
TFCond_RegenOnDamageBuff,
TFCond_MarkedForDeath,
TFCond_NoHealingDamageBuff,
TFCond_SpeedBuffAlly, // 32
TFCond_HalloweenCritCandy,
TFCond_CritCanteen,
TFCond_SpeedBoost, // 32
TFCond_CritPumpkin,
TFCond_CritUserBuff,
TFCond_CritDemoCharge,
TFCond_CritHype,
TFCond_CritOnFirstBlood,
TFCond_CritOnWin,
TFCond_CritOnFlagCapture,
TFCond_SodaPopperHype,
TFCond_CritFirstBlood,
TFCond_CritBonusTime,
TFCond_CritCTFCapture,
TFCond_CritOnKill,
TFCond_RestrictToMelee,
TFCond_CannotSwitchFromMelee,
TFCond_DefenseBuffNoCritBlock,
TFCond_Reprogrammed,
TFCond_CritMmmph,
TFCond_DefenseBuffMmmph,
TFCond_FocusBuff,
TFCond_DisguiseRemoved,
TFCond_CritRageBuff,
TFCond_DefenseBuffHigh,
TFCond_SniperChargeRageBuff,
TFCond_DisguiseWearingOff,
TFCond_MarkedForDeathSilent,
TFCond_DisguisedAsDispenser,
TFCond_Sapped,
TFCond_UberchargedHidden,
TFCond_UberchargedCanteen,
TFCond_InvulnerableHideUnlessDamaged,
TFCond_InvulnerableUserBuff,
TFCond_HalloweenBombHead,
TFCond_HalloweenThriller,
TFCond_RadiusHealOnDamage,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Below this are CritOnDamage and UberchargedOnTakeDamage, which in the FGD and internally are "TF_COND_CRITBOOSTED_CARD_EFFECT" and "TF_COND_INVULNERABLE_CARD_EFFECT". I'd say these ought to be changed as well, but CARD_EFFECT means nothing to users in this case, so I was hesitant. Thoughts?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think old names should be kept otherwise all plugins using those conds will fail to compile.
Perhaps

TFCond_UberchargedHidden,
TFCond_UberchargedCanteen,
TFCond_InvulnerableHideUnlessDamage = 51,
TFCond_InvulnerableUserBuff,
So the enum still fine.

Edit: Nvm I saw the second part of your enum.

CritOnDamage is used by MvM robots for alwayscrit attrib so TFCond_AlwaysCrit?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it? I thought AlwaysCrit used CritUserBuff/CritCanteen.
The condition itself seems to be used when the attribute "crit_on_damage" is on a weapon, but if it's used in another situation as well, then CritOnDamage is certainly not the right name for it. I'll change it to CritCardEffect for now until we can figure out where all it gets used.

TFCond_CritOnDamage,
TFCond_UberchargedOnTakeDamage,
TFCond_CritCardEffect,
TFCond_InvulnerableCardEffect,
TFCond_UberBulletResist,
TFCond_UberBlastResist,
TFCond_UberFireResist,
Expand All @@ -154,25 +153,23 @@ enum TFCond
TFCond_HalloweenInHell,
TFCond_HalloweenGhostMode,
TFCond_MiniCritOnKill,
TFCond_DodgeChance, //79
TFCond_ObscuredSmoke = 79,
TFCond_ObscuredSmoke,
TFCond_Parachute,
TFCond_BlastJumping,
TFCond_HalloweenKart,
TFCond_HalloweenKartDash,
TFCond_BalloonHead,
TFCond_MeleeOnly,
TFCond_SwimmingCurse,
TFCond_HalloweenKartNoTurn, //87
TFCond_FreezeInput = 87,
TFCond_FreezeInput,
TFCond_HalloweenKartCage,
TFCond_HasRune,
TFCond_DoNotUse0,
TFCond_RuneStrength,
TFCond_RuneHaste,
TFCond_RuneRegen,
TFCond_RuneResist,
TFCond_RuneVampire,
TFCond_RuneWarlock,
TFCond_RuneReflect,
TFCond_RunePrecision, // 96
TFCond_RuneAgility,
TFCond_GrapplingHook,
Expand All @@ -185,13 +182,68 @@ enum TFCond
TFCond_CritRuneTemp,
TFCond_PasstimeInterception,
TFCond_SwimmingNoEffects,
TFCond_EyeaductUnderworld,
TFCond_Purgatory,
TFCond_RuneKing,
TFCond_RunePlague,
TFCond_RuneSupernova,
TFCond_Plague,
TFCond_KingBuffed,
TFCond_TeamGlows,
TFCond_KnockedIntoAir,
TFCond_CompetitiveWinner,
TFCond_CompetitiveLoser,
TFCond_NoTaunting, // 118

//Legacy SM names for backwards compatibility
TFCond_Slowed = 0,
TFCond_Ubercharged = 5,
TFCond_TeleportedGlow,
TFCond_UberchargeFading = 8,
TFCond_Unknown1 = 9,
TFCond_CloakFlicker = 9,
TFCond_Teleporting,
TFCond_Kritzkrieged,
TFCond_Unknown2,
TFCond_DeadRingered,
TFCond_Bonked,
TFCond_Dazed,
TFCond_Buffed,
TFCond_Charging,
TFCond_CritCola = 19,
TFCond_InHealRadius,
TFCond_Healing,
TFCond_OnFire,
TFCond_Overhealed,
TFCond_Jarated,
TFCond_DefenseBuffed = 26,
TFCond_Milked,
TFCond_RegenBuffed = 29,
TFCond_SpeedBuffAlly = 32,
TFCond_HalloweenCritCandy,
TFCond_CritCanteen,
TFCond_CritHype = 36,
TFCond_CritOnFirstBlood,
TFCond_CritOnWin,
TFCond_CritOnFlagCapture,
TFCond_RestrictToMelee = 41,
TFCond_CritMmmph = 44,
TFCond_DefenseBuffMmmph,
TFCond_FocusBuff,
TFCond_DisguiseRemoved,
TFCond_UberchargedHidden = 51,
TFCond_UberchargedCanteen,
TFCond_CritOnDamage = 56,
TFCond_UberchargedOnTakeDamage,
TFCond_DodgeChance = 79,
TFCond_HalloweenKartNoTurn = 87,
TFCond_HasRune = 89,
TFCond_RuneWarlock = 95,
TFCond_EyeaductUnderworld = 108,
TFCond_KingRune,
TFCond_PlagueRune,
TFCond_SupernovaRune,
TFCond_Plague,
TFCond_KingAura,
TFCond_SpawnOutline, //114
TFCond_KingAura = 113,
TFCond_SpawnOutline,
};

const Float:TFCondDuration_Infinite = -1.0;
Expand Down
18 changes: 18 additions & 0 deletions plugins/include/tf2_stocks.inc
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,21 @@ enum {
TF_CUSTOM_MERASMUS_DECAPITATION,
TF_CUSTOM_CANNONBALL_PUSH,
TF_CUSTOM_TAUNT_ALLCLASS_GUITAR_RIFF,
TF_CUSTOM_THROWABLE,
TF_CUSTOM_THROWABLE_KILL,
TF_CUSTOM_SPELL_TELEPORT,
TF_CUSTOM_SPELL_SKELETON,
TF_CUSTOM_SPELL_MIRV,
TF_CUSTOM_SPELL_METEOR,
TF_CUSTOM_SPELL_LIGHTNING,
TF_CUSTOM_SPELL_FIREBALL,
TF_CUSTOM_SPELL_MONOCULUS,
TF_CUSTOM_SPELL_BLASTJUMP,
TF_CUSTOM_SPELL_BATS,
TF_CUSTOM_SPELL_TINY,
TF_CUSTOM_KART,
TF_CUSTOM_GIANT_HAMMER,
TF_CUSTOM_RUNE_REFLECT,
};

// Weapon codes as used in some events, such as player_death
Expand Down Expand Up @@ -250,6 +265,9 @@ enum {
TF_WEAPON_SPELLBOOK_PROJECTILE,
TF_WEAPON_SNIPERRIFLE_CLASSIC,
TF_WEAPON_PARACHUTE,
TF_WEAPON_GRAPPLINGHOOK,
TF_WEAPON_PASSTIME_GUN,
TF_WEAPON_CHARGED_SMG,
};

// TF2 Weapon Loadout Slots
Expand Down