TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches
Terraria.ModLoader.MagicDamageClass Class Reference
+ Inheritance diagram for Terraria.ModLoader.MagicDamageClass:
+ Collaboration diagram for Terraria.ModLoader.MagicDamageClass:

Public Member Functions

virtual StatInheritanceData GetModifierInheritance (DamageClass damageClass)
 This lets you define the classes that this T:Terraria.ModLoader.DamageClass will benefit from (other than itself) for the purposes of stat bonuses, such as damage and crit chance. This is used to allow extensive specifications for what your damage class can and can't benefit from in terms of other classes' stat bonuses.
 
virtual bool GetEffectInheritance (DamageClass damageClass)
 This lets you define the classes that this T:Terraria.ModLoader.DamageClass will count as (other than itself) for the purpose of armor and accessory effects, such as Spectre armor's bolts on magic attacks, or Magma Stone's Hellfire debuff on melee attacks.
For a more in-depth explanation and demonstration, see ExampleMod's ExampleDamageClass.cs
 
virtual void SetDefaultStats (Player player)
 This lets you define default stat modifiers for all items of this class (e.g. base crit chance).
 
virtual bool ShowStatTooltipLine (Player player, string lineName)
 Overriding this lets you disable standard statistical tooltip lines displayed on items associated with this T:Terraria.ModLoader.DamageClass. All tooltip lines are enabled by default.
 
override void SetupContent ()
 If you make a new ModType, seal this override, and call M:Terraria.ModLoader.ModType.SetStaticDefaults in it.
 
bool CountsAsClass< T > ()
 
bool CountsAsClass (DamageClass damageClass)
 This is used to check if this T:Terraria.ModLoader.DamageClass has been set to inherit effects from the provided T:Terraria.ModLoader.DamageClass, as dictated by M:Terraria.ModLoader.DamageClass.GetEffectInheritance(Terraria.ModLoader.DamageClass)
 
virtual void Load ()
 Allows you to perform one-time loading tasks. Beware that mod content has not finished loading here, things like ModContent lookup tables or ID Sets are not fully populated.
 
virtual bool IsLoadingEnabled (Mod mod)
 Allows you to stop M:Terraria.ModLoader.Mod.AddContent(Terraria.ModLoader.ILoadable) from actually adding this content. Useful for items that can be disabled by a config.
 
virtual void SetStaticDefaults ()
 Allows you to modify the properties after initial loading has completed.
 
virtual void Unload ()
 Allows you to safely unload things you added in M:Terraria.ModLoader.ModType.Load.
 
string PrettyPrintName ()
 
virtual TModType Clone (TEntity newEntity)
 Create a copy of this instanced global. Called when an entity is cloned.
 
virtual TModType NewInstance (TEntity entity)
 Create a new instance of this ModType for a specific entity.
 

Protected Member Functions

override void Register ()
 
virtual void InitTemplateInstance ()
 Create dummy objects for instanced mod-types.
 
override void InitTemplateInstance ()
 Create dummy objects for instanced mod-types.
 
virtual void ValidateType ()
 Check for the correct overrides of different hook methods and fields and properties.
 
TEntity CreateTemplateEntity ()
 

Properties

override string LangKey [get]
 
override LocalizedText DisplayName [get]
 
static DamageClass Default = new DefaultDamageClass() [get, private set]
 Default damage class for non-classed weapons and items, does not benefit from Generic bonuses.
 
static DamageClass Generic = new GenericDamageClass() [get, private set]
 Base damage class for all weapons. All vanilla damage classes inherit bonuses applied to this class. Accessories which benefit all classes provide bonuses via the Generic class.
 
static DamageClass Melee = new MeleeDamageClass() [get, private set]
 
static DamageClass MeleeNoSpeed = new MeleeNoSpeedDamageClass() [get, private set]
 This is a damage class used by various projectile-only vanilla melee weapons. Attack speed has no effect on items with this damage class.
 
static DamageClass Ranged = new RangedDamageClass() [get, private set]
 
static DamageClass Magic = new MagicDamageClass() [get, private set]
 
static DamageClass Summon = new SummonDamageClass() [get, private set]
 
static DamageClass SummonMeleeSpeed = new SummonMeleeSpeedDamageClass() [get, private set]
 This is a damage class used solely by vanilla whips. It benefits from melee attackSpeed bonuses.
 
static DamageClass MagicSummonHybrid = new MagicSummonHybridDamageClass() [get, private set]
 This is a damage class used solely by vanilla forbidden storm. It scales with both magic and summon damage modifiers.
 
static DamageClass Throwing = new ThrowingDamageClass() [get, private set]
 Class provided for modders who want to coordinate throwing accessories and items. Not used by any vanilla items.
 
int Type [get, set]
 The internal ID of this T:Terraria.ModLoader.DamageClass.
 
virtual string LocalizationCategory [get]
 The category used by this modded content for use in localization keys. Localization keys follow the pattern of "Mods.{ModName}.{Category}.{ContentName}.{DataName}". The Localization wiki pageexplains how custom T:Terraria.ModLoader.ModType classes can utilize this.
 
virtual bool UseStandardCritCalcs [get]
 This lets you decide whether or not your damage class will use standard crit chance calculations. Setting this to false will also hide the critical strike chance line in the tooltip of any item that uses this T:Terraria.ModLoader.DamageClass.
 
Mod Mod [get, set]
 The mod this belongs to.
 
virtual string Name [get]
 The internal name of this.
 
string FullName [get]
 The internal name of this, including the mod it is from.
 
TEntity Entity [get, set]
 
virtual bool IsCloneable [get]
 Whether or not this type is cloneable. Cloning is supported if
all reference typed fields in each sub-class which doesn't override Clone are marked with [CloneByReference].
 
virtual bool CloneNewInstances [get]
 Whether to create new instances of this mod type via M:Terraria.ModLoader.ModType`2.Clone(`0) or via the default constructor Defaults to false (default constructor).
 

Private Member Functions

void ILoadable. Load (Mod mod)
 Called when loading the type.
 

Private Attributes

bool? _isCloneable
 

Detailed Description

Definition at line 3 of file MagicDamageClass.cs.


The documentation for this class was generated from the following file: