TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ CommandForbiddenStorm()

void Terraria.Player.CommandForbiddenStorm ( )
inline

Definition at line 57792 of file Player.cs.

57793 {
57794 //IL_0053: Unknown result type (might be due to invalid IL or missing references)
57795 //IL_0063: Unknown result type (might be due to invalid IL or missing references)
57796 //IL_0068: Unknown result type (might be due to invalid IL or missing references)
57797 //IL_0073: Unknown result type (might be due to invalid IL or missing references)
57798 //IL_0078: Unknown result type (might be due to invalid IL or missing references)
57799 //IL_007a: Unknown result type (might be due to invalid IL or missing references)
57800 //IL_007f: Unknown result type (might be due to invalid IL or missing references)
57801 //IL_008f: Unknown result type (might be due to invalid IL or missing references)
57802 //IL_0090: Unknown result type (might be due to invalid IL or missing references)
57803 //IL_0082: Unknown result type (might be due to invalid IL or missing references)
57804 //IL_0083: Unknown result type (might be due to invalid IL or missing references)
57805 //IL_010c: Unknown result type (might be due to invalid IL or missing references)
57806 //IL_010d: Unknown result type (might be due to invalid IL or missing references)
57807 //IL_010f: Unknown result type (might be due to invalid IL or missing references)
57808 //IL_0114: Unknown result type (might be due to invalid IL or missing references)
57809 //IL_011b: Unknown result type (might be due to invalid IL or missing references)
57810 //IL_0120: Unknown result type (might be due to invalid IL or missing references)
57811 //IL_0125: Unknown result type (might be due to invalid IL or missing references)
57812 //IL_0127: Unknown result type (might be due to invalid IL or missing references)
57813 //IL_0129: Unknown result type (might be due to invalid IL or missing references)
57814 //IL_012a: Unknown result type (might be due to invalid IL or missing references)
57815 //IL_012f: Unknown result type (might be due to invalid IL or missing references)
57816 //IL_01f5: Unknown result type (might be due to invalid IL or missing references)
57817 //IL_020b: Unknown result type (might be due to invalid IL or missing references)
57818 //IL_0211: Unknown result type (might be due to invalid IL or missing references)
57819 //IL_021f: Unknown result type (might be due to invalid IL or missing references)
57820 //IL_0221: Unknown result type (might be due to invalid IL or missing references)
57821 //IL_014e: Unknown result type (might be due to invalid IL or missing references)
57822 //IL_014f: Unknown result type (might be due to invalid IL or missing references)
57823 //IL_015b: Unknown result type (might be due to invalid IL or missing references)
57824 //IL_0160: Unknown result type (might be due to invalid IL or missing references)
57825 //IL_0165: Unknown result type (might be due to invalid IL or missing references)
57826 //IL_016c: Unknown result type (might be due to invalid IL or missing references)
57827 //IL_0182: Unknown result type (might be due to invalid IL or missing references)
57828 //IL_0188: Unknown result type (might be due to invalid IL or missing references)
57829 //IL_0196: Unknown result type (might be due to invalid IL or missing references)
57830 //IL_0198: Unknown result type (might be due to invalid IL or missing references)
57831 //IL_01b5: Unknown result type (might be due to invalid IL or missing references)
57832 //IL_01bf: Unknown result type (might be due to invalid IL or missing references)
57833 //IL_01c4: Unknown result type (might be due to invalid IL or missing references)
57834 //IL_0325: Unknown result type (might be due to invalid IL or missing references)
57835 //IL_032a: Unknown result type (might be due to invalid IL or missing references)
57836 List<int> list = new List<int>();
57837 for (int i = 0; i < 1000; i++)
57838 {
57839 Projectile projectile = Main.projectile[i];
57840 if (projectile.active && projectile.type == 656 && projectile.owner == whoAmI)
57841 {
57842 list.Add(i);
57843 }
57844 }
57845 bool flag = StrayMethods.CanSpawnSandstormFriendly(MinionRestTargetPoint, 30, 30);
57846 bool num5 = MinionRestTargetPoint == Vector2.Zero;
57847 Vector2 center = base.Center;
57849 if (num5)
57850 {
57851 endPoint = center;
57852 }
57853 int samplesToTake = 10;
57854 float samplingWidth = 60f;
57856 bool flag2 = false;
57857 float[] array = samples;
57858 for (int j = 0; j < array.Length; j++)
57859 {
57860 if (Math.Abs(array[j] - ((Vector2)(ref vectorTowardsTarget)).Length()) < 10f)
57861 {
57862 flag2 = true;
57863 break;
57864 }
57865 }
57866 float num2 = 0f;
57867 for (int k = 0; k < samples.Length; k++)
57868 {
57869 if (samples[k] > num2)
57870 {
57871 num2 = samples[k];
57872 }
57873 }
57874 if (list.Count <= 1)
57875 {
57876 Vector2 vector = center + vectorTowardsTarget.SafeNormalize(Vector2.Zero) * num2;
57877 Vector2 vector2 = vector - center;
57878 if (((Vector2)(ref vector2)).Length() > 0f)
57879 {
57880 for (float num3 = 0f; num3 < ((Vector2)(ref vector2)).Length(); num3 += 15f)
57881 {
57882 Vector2 vector3 = center + vector2 * (num3 / ((Vector2)(ref vector2)).Length());
57883 Dust obj = Main.dust[Dust.NewDust(vector3, 0, 0, 269)];
57884 obj.position = vector3;
57885 obj.fadeIn = 0.5f;
57886 obj.scale = 0.7f;
57887 obj.velocity *= 0.4f;
57888 obj.noLight = true;
57889 }
57890 }
57891 for (float num4 = 0f; num4 < (float)Math.PI * 2f; num4 += (float)Math.PI / 15f)
57892 {
57893 Dust obj2 = Main.dust[Dust.NewDust(vector, 0, 0, 269)];
57894 obj2.position = vector;
57895 obj2.fadeIn = 1f;
57896 obj2.scale = 0.3f;
57897 obj2.noLight = true;
57898 }
57899 }
57900 flag &= list.Count <= 1;
57901 flag = flag && flag2;
57902 if (flag)
57903 {
57904 flag = CheckMana(20, pay: true);
57905 if (flag)
57906 {
57908 }
57909 }
57910 if (!flag)
57911 {
57912 return;
57913 }
57914 foreach (int item in list)
57915 {
57916 Projectile projectile2 = Main.projectile[item];
57917 if (!(projectile2.ai[0] >= 780f))
57918 {
57919 projectile2.ai[0] = 780f + projectile2.ai[0] % 60f;
57920 projectile2.netUpdate = true;
57921 }
57922 }
57925 _ = Main.projectile[Projectile.NewProjectile(projectileSource_SetBonus, MinionRestTargetPoint, Vector2.Zero, 656, damage, 0f, Main.myPlayer)];
57926 }
int whoAmI
The index of this Entity within its specific array. These arrays track the entities in the world....
Definition Entity.cs:16
static DamageClass MagicSummonHybrid
This is a damage class used solely by vanilla forbidden storm. It scales with both magic and summon d...
T:Terraria.ModLoader.DamageClass is used to determine the application of item effects,...
StatModifier GetTotalDamage(DamageClass damageClass)
Calculates a total damage modifier for the player for the provided T:Terraria.ModLoader....
Definition Player.cs:58396
bool CheckMana(int amount, bool pay=false, bool blockQuickMana=false)
Definition Player.cs:57696
IEntitySource GetProjectileSource_SetBonus(int projectileSourceId)
Definition Player.cs:7896
float manaRegenDelay
Definition Player.cs:2152
float maxRegenDelay
Definition Player.cs:1602
Vector2 MinionRestTargetPoint
Definition Player.cs:3119
This object encapsulates context information about the source of a particular spawning event of an It...
float ApplyTo(float baseValue)
Use this to apply the modifiers of this T:Terraria.ModLoader.StatModifier to the baseValue ....

References Terraria.Entity.active, Terraria.Collision.AimingLaserScan(), Terraria.ModLoader.StatModifier.ApplyTo(), Terraria.StrayMethods.CanSpawnSandstormFriendly(), Terraria.Player.CheckMana(), Terraria.Main.dust, Terraria.Player.GetProjectileSource_SetBonus(), Terraria.Player.GetTotalDamage(), Terraria.ModLoader.DamageClass.MagicSummonHybrid, Terraria.Player.manaRegenDelay, Terraria.Player.maxRegenDelay, Terraria.Player.MinionRestTargetPoint, Terraria.Main.myPlayer, Terraria.Dust.NewDust(), Terraria.Projectile.NewProjectile(), Terraria.Projectile.owner, Terraria.Main.projectile, Terraria.Projectile.type, and Terraria.Entity.whoAmI.

Referenced by Terraria.Player.KeyDoubleTap().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: