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

◆ AI_186_PrincessWeapon()

void Terraria.Projectile.AI_186_PrincessWeapon ( )
inlineprivate

Definition at line 43981 of file Projectile.cs.

43982 {
43983 //IL_0155: Unknown result type (might be due to invalid IL or missing references)
43984 //IL_0160: Unknown result type (might be due to invalid IL or missing references)
43985 //IL_0165: Unknown result type (might be due to invalid IL or missing references)
43986 //IL_0198: Unknown result type (might be due to invalid IL or missing references)
43987 //IL_01b0: Unknown result type (might be due to invalid IL or missing references)
43988 //IL_01b6: Unknown result type (might be due to invalid IL or missing references)
43989 //IL_01b8: Unknown result type (might be due to invalid IL or missing references)
43990 //IL_01bd: Unknown result type (might be due to invalid IL or missing references)
43991 //IL_01c8: Unknown result type (might be due to invalid IL or missing references)
43992 //IL_01cd: Unknown result type (might be due to invalid IL or missing references)
43993 //IL_01d0: Unknown result type (might be due to invalid IL or missing references)
43994 //IL_01d5: Unknown result type (might be due to invalid IL or missing references)
43995 //IL_01d7: Unknown result type (might be due to invalid IL or missing references)
43996 //IL_01dc: Unknown result type (might be due to invalid IL or missing references)
43997 //IL_01e9: Unknown result type (might be due to invalid IL or missing references)
43998 //IL_01ef: Unknown result type (might be due to invalid IL or missing references)
43999 //IL_01f1: Unknown result type (might be due to invalid IL or missing references)
44000 //IL_01f6: Unknown result type (might be due to invalid IL or missing references)
44001 //IL_01f8: Unknown result type (might be due to invalid IL or missing references)
44002 //IL_01fa: Unknown result type (might be due to invalid IL or missing references)
44003 //IL_01fe: Unknown result type (might be due to invalid IL or missing references)
44004 //IL_0203: Unknown result type (might be due to invalid IL or missing references)
44005 //IL_0208: Unknown result type (might be due to invalid IL or missing references)
44006 //IL_020a: Unknown result type (might be due to invalid IL or missing references)
44007 //IL_021e: Unknown result type (might be due to invalid IL or missing references)
44008 //IL_0234: Unknown result type (might be due to invalid IL or missing references)
44009 //IL_0236: Unknown result type (might be due to invalid IL or missing references)
44010 //IL_0287: Unknown result type (might be due to invalid IL or missing references)
44011 //IL_028f: Unknown result type (might be due to invalid IL or missing references)
44012 //IL_029c: Unknown result type (might be due to invalid IL or missing references)
44013 //IL_02a1: Unknown result type (might be due to invalid IL or missing references)
44014 //IL_02c9: Unknown result type (might be due to invalid IL or missing references)
44015 //IL_02cf: Unknown result type (might be due to invalid IL or missing references)
44016 //IL_02d9: Unknown result type (might be due to invalid IL or missing references)
44017 //IL_02de: Unknown result type (might be due to invalid IL or missing references)
44018 //IL_02e3: Unknown result type (might be due to invalid IL or missing references)
44019 //IL_02f1: Unknown result type (might be due to invalid IL or missing references)
44020 //IL_02fe: Unknown result type (might be due to invalid IL or missing references)
44021 //IL_0308: Unknown result type (might be due to invalid IL or missing references)
44022 //IL_030d: Unknown result type (might be due to invalid IL or missing references)
44023 //IL_0312: Unknown result type (might be due to invalid IL or missing references)
44024 //IL_039a: Unknown result type (might be due to invalid IL or missing references)
44025 //IL_03b2: Unknown result type (might be due to invalid IL or missing references)
44026 //IL_03b8: Unknown result type (might be due to invalid IL or missing references)
44027 //IL_03ba: Unknown result type (might be due to invalid IL or missing references)
44028 //IL_03bf: Unknown result type (might be due to invalid IL or missing references)
44029 //IL_03ca: Unknown result type (might be due to invalid IL or missing references)
44030 //IL_03cf: Unknown result type (might be due to invalid IL or missing references)
44031 //IL_03d2: Unknown result type (might be due to invalid IL or missing references)
44032 //IL_03d7: Unknown result type (might be due to invalid IL or missing references)
44033 //IL_03d9: Unknown result type (might be due to invalid IL or missing references)
44034 //IL_03de: Unknown result type (might be due to invalid IL or missing references)
44035 //IL_03eb: Unknown result type (might be due to invalid IL or missing references)
44036 //IL_03f1: Unknown result type (might be due to invalid IL or missing references)
44037 //IL_03f3: Unknown result type (might be due to invalid IL or missing references)
44038 //IL_03f8: Unknown result type (might be due to invalid IL or missing references)
44039 //IL_03fa: Unknown result type (might be due to invalid IL or missing references)
44040 //IL_03fc: Unknown result type (might be due to invalid IL or missing references)
44041 //IL_0406: Unknown result type (might be due to invalid IL or missing references)
44042 //IL_040b: Unknown result type (might be due to invalid IL or missing references)
44043 //IL_0410: Unknown result type (might be due to invalid IL or missing references)
44044 //IL_0412: Unknown result type (might be due to invalid IL or missing references)
44045 //IL_0426: Unknown result type (might be due to invalid IL or missing references)
44046 //IL_043c: Unknown result type (might be due to invalid IL or missing references)
44047 //IL_043e: Unknown result type (might be due to invalid IL or missing references)
44048 //IL_048f: Unknown result type (might be due to invalid IL or missing references)
44049 //IL_0497: Unknown result type (might be due to invalid IL or missing references)
44050 //IL_049e: Unknown result type (might be due to invalid IL or missing references)
44051 //IL_04a3: Unknown result type (might be due to invalid IL or missing references)
44052 //IL_04cb: Unknown result type (might be due to invalid IL or missing references)
44053 //IL_04d5: Unknown result type (might be due to invalid IL or missing references)
44054 //IL_04da: Unknown result type (might be due to invalid IL or missing references)
44055 //IL_035f: Unknown result type (might be due to invalid IL or missing references)
44056 //IL_0364: Unknown result type (might be due to invalid IL or missing references)
44057 //IL_0616: Unknown result type (might be due to invalid IL or missing references)
44058 //IL_0626: Unknown result type (might be due to invalid IL or missing references)
44059 //IL_062c: Unknown result type (might be due to invalid IL or missing references)
44060 //IL_062e: Unknown result type (might be due to invalid IL or missing references)
44061 //IL_0633: Unknown result type (might be due to invalid IL or missing references)
44062 //IL_0635: Unknown result type (might be due to invalid IL or missing references)
44063 //IL_0641: Unknown result type (might be due to invalid IL or missing references)
44064 //IL_0648: Unknown result type (might be due to invalid IL or missing references)
44065 //IL_064d: Unknown result type (might be due to invalid IL or missing references)
44066 //IL_0662: Unknown result type (might be due to invalid IL or missing references)
44067 //IL_0664: Unknown result type (might be due to invalid IL or missing references)
44068 //IL_066b: Unknown result type (might be due to invalid IL or missing references)
44069 //IL_066f: Unknown result type (might be due to invalid IL or missing references)
44070 //IL_0674: Unknown result type (might be due to invalid IL or missing references)
44071 //IL_0697: Unknown result type (might be due to invalid IL or missing references)
44072 //IL_0699: Unknown result type (might be due to invalid IL or missing references)
44073 //IL_06a0: Unknown result type (might be due to invalid IL or missing references)
44074 //IL_06a4: Unknown result type (might be due to invalid IL or missing references)
44075 //IL_06ae: Unknown result type (might be due to invalid IL or missing references)
44076 //IL_06b3: Unknown result type (might be due to invalid IL or missing references)
44077 //IL_0563: Unknown result type (might be due to invalid IL or missing references)
44078 //IL_0581: Unknown result type (might be due to invalid IL or missing references)
44079 //IL_0587: Unknown result type (might be due to invalid IL or missing references)
44080 //IL_0589: Unknown result type (might be due to invalid IL or missing references)
44081 //IL_0598: Unknown result type (might be due to invalid IL or missing references)
44082 //IL_059d: Unknown result type (might be due to invalid IL or missing references)
44083 //IL_05a0: Unknown result type (might be due to invalid IL or missing references)
44084 //IL_05a5: Unknown result type (might be due to invalid IL or missing references)
44085 //IL_05a7: Unknown result type (might be due to invalid IL or missing references)
44086 //IL_05ac: Unknown result type (might be due to invalid IL or missing references)
44087 //IL_05ba: Unknown result type (might be due to invalid IL or missing references)
44088 //IL_05bc: Unknown result type (might be due to invalid IL or missing references)
44089 //IL_05c4: Unknown result type (might be due to invalid IL or missing references)
44090 //IL_05c9: Unknown result type (might be due to invalid IL or missing references)
44091 //IL_0527: Unknown result type (might be due to invalid IL or missing references)
44092 //IL_052c: Unknown result type (might be due to invalid IL or missing references)
44093 float num = 60f;
44094 ai[0] += 1f;
44095 if (ai[0] >= num)
44096 {
44097 Kill();
44098 return;
44099 }
44100 Opacity = Utils.Remap(ai[0], 0f, num, 1f, 0f);
44101 float num11 = ai[0] / num;
44102 float num12 = 1f - (1f - num11) * (1f - num11);
44103 float num13 = 1f - (1f - num12) * (1f - num12);
44104 float num18 = Utils.Remap(ai[0], num - 15f, num, 0f, 1f);
44105 float num14 = num18 * num18;
44106 float num15 = 1f - num14;
44107 scale = (0.4f + 0.6f * num13) * num15;
44108 float num16 = Utils.Remap(ai[0], 20f, num, 0f, 1f);
44109 float num17 = 1f - (1f - num16) * (1f - num16);
44110 float num2 = 1f - (1f - num17) * (1f - num17);
44111 localAI[0] = (0.4f + 0.6f * num2) * num15;
44112 int num3 = width / 2;
44113 Color newColor = Main.hslToRgb(0.92f, 1f, 0.5f) * Opacity;
44114 float num4 = 6f;
44115 float num5 = 2f;
44116 if (num11 < 0.9f)
44117 {
44118 for (int i = 0; i < 3; i++)
44119 {
44120 if (Main.rand.Next(2) == 0)
44121 {
44122 Vector2 val = Vector2.UnitX.RotatedBy(Main.rand.NextFloat() * ((float)Math.PI * 2f));
44123 Vector2 vector11 = val * ((float)num3 * scale);
44124 Vector2 vector12 = base.Center + vector11;
44125 Vector2 vector13 = val.RotatedBy(0.7853981852531433);
44126 vector12 += vector13 * num4;
44127 int num6 = Dust.NewDust(vector12, 0, 0, 267, 0f, 0f, 0, newColor);
44128 Main.dust[num6].position = vector12;
44129 Main.dust[num6].noGravity = true;
44130 Main.dust[num6].scale = 0.3f;
44131 Main.dust[num6].fadeIn = Main.rand.NextFloat() * 1.2f * scale;
44132 Main.dust[num6].velocity = vector13 * scale * (0f - num5);
44133 Main.dust[num6].scale *= scale;
44134 Dust obj = Main.dust[num6];
44135 obj.velocity += velocity * 0.5f;
44136 Dust obj2 = Main.dust[num6];
44137 obj2.position += Main.dust[num6].velocity * -5f;
44138 if (num6 != 6000)
44139 {
44140 Dust dust = Dust.CloneDust(num6);
44141 dust.scale /= 2f;
44142 dust.fadeIn *= 0.85f;
44143 dust.color = new Color(255, 255, 255, 255);
44144 }
44145 }
44146 }
44147 }
44148 if (num11 < 0.9f)
44149 {
44150 for (int j = 0; j < 3; j++)
44151 {
44152 if (Main.rand.Next(2) == 0)
44153 {
44154 Vector2 val2 = Vector2.UnitX.RotatedBy(Main.rand.NextFloat() * ((float)Math.PI * 2f));
44155 Vector2 vector14 = val2 * ((float)num3 * scale);
44156 Vector2 vector15 = base.Center + vector14;
44157 Vector2 vector16 = val2.RotatedBy(0.7853981852531433);
44158 vector15 += vector16 * (0f - num4);
44159 int num7 = Dust.NewDust(vector15, 0, 0, 267, 0f, 0f, 0, newColor);
44160 Main.dust[num7].position = vector15;
44161 Main.dust[num7].noGravity = true;
44162 Main.dust[num7].scale = 0.3f;
44163 Main.dust[num7].fadeIn = Main.rand.NextFloat() * 1.2f * scale;
44164 Main.dust[num7].velocity = vector16 * scale * num5;
44165 Main.dust[num7].scale *= scale;
44166 Main.dust[num7].velocity = velocity * 0.5f;
44167 if (num7 != 6000)
44168 {
44169 Dust dust2 = Dust.CloneDust(num7);
44170 dust2.scale /= 2f;
44171 dust2.fadeIn *= 0.85f;
44172 dust2.color = new Color(255, 255, 255, 255);
44173 }
44174 }
44175 }
44176 }
44177 if (num11 < 0.95f)
44178 {
44179 for (float num8 = 0f; num8 < 0.8f; num8 += 1f)
44180 {
44181 if (Main.rand.Next(4) == 0)
44182 {
44183 Vector2 vector17 = Vector2.UnitX.RotatedBy(Main.rand.NextFloat() * ((float)Math.PI * 2f) + (float)Math.PI / 2f) * ((float)num3 * scale);
44184 Vector2 positionInWorld = base.Center + vector17;
44186 {
44187 PositionInWorld = positionInWorld,
44188 MovementVector = velocity
44189 }, owner);
44190 }
44191 }
44192 }
44193 if (ai[0] == num - 10f)
44194 {
44195 for (float num9 = 0f; num9 < 1f; num9 += 0.25f)
44196 {
44197 Vector2 vector10 = Vector2.UnitX.RotatedBy((float)Math.PI * 2f * num9);
44198 _ = vector10 * ((float)num3 * scale);
44199 Vector2 center = base.Center;
44200 float num10 = 1f;
44202 {
44203 PositionInWorld = center,
44204 MovementVector = vector10 * num10
44205 }, owner);
44207 {
44208 PositionInWorld = center,
44209 MovementVector = vector10 * num10 * 2f
44210 }, owner);
44211 }
44212 }
44213 }
Vector2 velocity
The velocity of this Entity in world coordinates per tick.
Definition Entity.cs:33
int width
The width of this Entity's hitbox, in pixels.
Definition Entity.cs:46
static void RequestParticleSpawn(bool clientOnly, ParticleOrchestraType type, ParticleOrchestraSettings settings, int? overrideInvokingPlayerIndex=null)
int owner
The index of the player who owns this projectile. In Multiplayer, Clients "own" projectiles that they...
float[] ai
An array with 3 slots used for any sort of data storage, which is occasionally synced to the server....
float[] localAI
Acts like F:Terraria.Projectile.ai, but does not sync to the server. Many vanilla T:Terraria....
float scale
Scales how large the projectile will be drawn. Will also affect the hitbox (F:Terraria....

References Terraria.Dust.CloneDust(), Terraria.Main.dust, Terraria.Main.hslToRgb(), Terraria.Dust.NewDust(), Terraria.Main.rand, Terraria.Utils.Remap(), and Terraria.GameContent.Drawing.ParticleOrchestrator.RequestParticleSpawn().

+ Here is the call graph for this function: