5718 {
5722 if (typeCache == 244 && tileFrameX == 18 && tileFrameY == 18 &&
_rand.
Next(2) == 0)
5723 {
5725 {
5727 }
5729 {
5731 }
5733 {
5735 }
5737 {
5739 }
5741 {
5743 }
5744 }
5745 if (typeCache == 565 && tileFrameX == 0 && tileFrameY == 18 &&
_rand.
Next(3) == 0 && ((Main.drawToScreen &&
_rand.
Next(4) == 0) || !Main.drawToScreen))
5746 {
5749 float scale = 8f + Main.rand.NextFloat() * 1.6f;
5751 Vector2 velocity = Main.rand.NextVector2Circular(0.7f, 0.25f) * 0.4f + Main.rand.NextVector2CircularEdge(1f, 0.4f) * 0.1f;
5752 velocity *= 4f;
5753 Gore.NewGorePerfect(position, velocity,
type, scale);
5754 }
5755 if (typeCache == 215 && tileFrameY < 36 &&
_rand.
Next(3) == 0 && ((Main.drawToScreen &&
_rand.
Next(4) == 0) || !Main.drawToScreen) && tileFrameY == 0)
5756 {
5757 int num2 = Dust.NewDust(
new Vector2(i * 16 + 2,
j * 16 - 4), 4, 8, 31, 0f, 0f, 100);
5758 if (tileFrameX == 0)
5759 {
5761 }
5762 if (tileFrameX == 36)
5763 {
5765 }
5770 }
5771 if (typeCache == 592 && tileFrameY == 18 &&
_rand.
Next(3) == 0)
5772 {
5773 if ((Main.drawToScreen &&
_rand.
Next(6) == 0) || !Main.drawToScreen)
5774 {
5775 int num3 = Dust.NewDust(
new Vector2(i * 16 + 2,
j * 16 + 4), 4, 8, 31, 0f, 0f, 100);
5776 if (tileFrameX == 0)
5777 {
5779 }
5780 if (tileFrameX == 36)
5781 {
5783 }
5788 }
5789 }
5790 else if (typeCache == 406 && tileFrameY == 54 && tileFrameX == 0 &&
_rand.
Next(3) == 0)
5791 {
5794 if (Main.WindForVisuals < 0f)
5795 {
5796 velocity2.X = 0f - Main.WindForVisuals;
5797 }
5800 {
5802 }
5804 {
5806 }
5807 else
5808 {
5810 }
5811 }
5812 else if (typeCache == 452 && tileFrameY == 0 && tileFrameX == 0 &&
_rand.
Next(3) == 0)
5813 {
5816 if (Main.WindForVisuals < 0f)
5817 {
5818 velocity3.X = 0f - Main.WindForVisuals;
5819 }
5820 int num4 = Main.tileFrame[typeCache];
5823 {
5825 }
5826 }
5828 {
5830 }
5832 {
5834 }
5835 if (typeCache == 666 &&
_rand.
Next(100) == 0 &&
j - 1 > 0 && !
WorldGen.ActiveAndWalkableTile(i,
j - 1))
5836 {
5838 {
5839 PositionInWorld =
new Vector2(i * 16 + 8,
j * 16 - 8)
5840 });
5841 }
5842 if (!num)
5843 {
5844 return;
5845 }
5846 if (typeCache == 238 &&
_rand.
Next(10) == 0)
5847 {
5848 int num5 = Dust.NewDust(
new Vector2(i * 16,
j * 16), 16, 16, 168);
5851 }
5852 if (typeCache == 139)
5853 {
5854 if (tileCache.frameX == 36 && tileCache.frameY % 36 == 0 && (
int)Main.timeForVisualEffects % 7 == 0 &&
_rand.
Next(3) == 0)
5855 {
5859 velocity4.X *= 1f + (float)
_rand.
Next(-50, 51) * 0.01f;
5860 velocity4.Y *= 1f + (float)
_rand.
Next(-50, 51) * 0.01f;
5862 {
5863 position4.X -= 8f;
5864 }
5866 {
5867 position4.X -= 4f;
5868 }
5870 }
5871 }
5872 else if (typeCache == 463)
5873 {
5874 if (tileFrameY == 54 && tileFrameX == 0)
5875 {
5876 for (
int k = 0;
k < 4;
k++)
5877 {
5879 {
5880 Dust dust = Dust.NewDustDirect(
new Vector2(i * 16 + 4,
j * 16), 36, 8, 16);
5881 dust.noGravity = true;
5882 dust.alpha = 140;
5883 dust.fadeIn = 1.2f;
5885 }
5886 }
5887 }
5888 if (tileFrameY == 18 && (tileFrameX == 0 || tileFrameX == 36))
5889 {
5890 for (
int l = 0;
l < 1;
l++)
5891 {
5893 {
5894 Dust
dust2 = Dust.NewDustDirect(
new Vector2(i * 16,
j * 16), 8, 8, 274);
5895 dust2.position =
new Vector2(i * 16 + 8,
j * 16 + 8);
5896 dust2.position.X += ((tileFrameX == 36) ? 4 : (-4));
5897 dust2.noGravity = true;
5898 dust2.alpha = 128;
5899 dust2.fadeIn = 1.2f;
5900 dust2.noLight = true;
5901 dust2.velocity =
new Vector2(0f,
_rand.NextFloatDirection() * 1.2f);
5902 }
5903 }
5904 }
5905 }
5906 else if (typeCache == 497)
5907 {
5908 if (tileCache.frameY / 40 == 31 && tileCache.frameY % 40 == 0)
5909 {
5910 for (
int m = 0;
m < 1;
m++)
5911 {
5913 {
5914 Dust
dust3 = Dust.NewDustDirect(
new Vector2(i * 16,
j * 16 + 8), 16, 12, 43);
5915 dust3.noGravity = true;
5916 dust3.alpha = 254;
5918 dust3.scale = 0.7f;
5920 dust3.noLight = true;
5921 }
5922 }
5923 }
5924 }
5925 else if (typeCache == 165 && tileFrameX >= 162 && tileFrameX <= 214 && tileFrameY == 72)
5926 {
5928 {
5929 int num7 = Dust.NewDust(
new Vector2(i * 16 + 2,
j * 16 + 6), 8, 4, 153);
5934 }
5935 }
5936 else if (typeCache == 42 && tileFrameX == 0)
5937 {
5938 int num8 = tileFrameY / 36;
5939 int num9 = tileFrameY / 18 % 2;
5941 {
5943 {
5944 int num10 = Dust.NewDust(
new Vector2(i * 16 + 4,
j * 16 + 4), 8, 8, 58, 0f, 0f, 150);
5946 }
5948 {
5952 }
5953 }
5955 {
5956 int num12 = Dust.NewDust(
new Vector2(i * 16 + 4,
j * 16), 8, 8, 59, 0f, 0f, 100);
5958 {
5960 }
5963 }
5964 }
5965 if (typeCache == 4 &&
_rand.
Next(40) == 0 && tileFrameX < 66)
5966 {
5970 num15 = tileFrameX
switch
5971 {
5972 22 => Dust.NewDust(
new Vector2(i * 16 + 6,
j * 16), 4, 4,
num14, 0f, 0f, 100),
5973 44 => Dust.NewDust(
new Vector2(i * 16 + 2,
j * 16), 4, 4,
num14, 0f, 0f, 100),
5974 _ => Dust.NewDust(
new Vector2(i * 16 + 4,
j * 16), 4, 4,
num14, 0f, 0f, 100),
5975 };
5977 {
5979 }
5983 {
5986 }
5987 }
5988 if (typeCache == 93 &&
_rand.
Next(40) == 0 && tileFrameX == 0)
5989 {
5990 int num16 = tileFrameY / 54;
5991 if (tileFrameY / 18 % 3 == 0)
5992 {
5995 {
5996 case 0:
5997 case 6:
5998 case 7:
5999 case 8:
6000 case 10:
6001 case 14:
6002 case 15:
6003 case 16:
6005 break;
6006 case 20:
6008 break;
6009 default:
6011 break;
6012 }
6014 {
6015 int num18 = Dust.NewDust(
new Vector2(i * 16 + 4,
j * 16 + 2), 4, 4,
num17, 0f, 0f, 100);
6017 {
6019 }
6022 }
6023 }
6024 }
6025 if (typeCache == 100 &&
_rand.
Next(40) == 0 && tileFrameX < 36)
6026 {
6027 int num19 = tileFrameY / 36;
6028 if (tileFrameY / 18 % 2 == 0)
6029 {
6032 {
6033 case 0:
6034 case 5:
6035 case 7:
6036 case 8:
6037 case 10:
6038 case 12:
6039 case 14:
6040 case 15:
6041 case 16:
6043 break;
6044 case 20:
6046 break;
6047 default:
6049 break;
6050 }
6052 {
6057 {
6059 }
6062 }
6063 }
6064 }
6065 if (typeCache == 98 &&
_rand.
Next(40) == 0 && tileFrameY == 0 && tileFrameX == 0)
6066 {
6067 int num22 = Dust.NewDust(
new Vector2(i * 16 + 12,
j * 16 + 2), 4, 4, 6, 0f, 0f, 100);
6069 {
6071 }
6074 }
6075 if (typeCache == 49 && tileFrameX == 0 &&
_rand.
Next(2) == 0)
6076 {
6077 int num23 = Dust.NewDust(
new Vector2(i * 16 + 4,
j * 16 - 4), 4, 4, 172, 0f, 0f, 100);
6079 {
6081 }
6082 else
6083 {
6086 }
6089 }
6090 if (typeCache == 372 && tileFrameX == 0 &&
_rand.
Next(2) == 0)
6091 {
6092 int num24 = Dust.NewDust(
new Vector2(i * 16 + 4,
j * 16 - 4), 4, 4, 242, 0f, 0f, 100);
6094 {
6096 }
6097 else
6098 {
6101 }
6104 }
6105 if (typeCache == 646 && tileFrameX == 0)
6106 {
6108 }
6109 if (typeCache == 34 &&
_rand.
Next(40) == 0 && tileFrameX < 54)
6110 {
6111 int num25 = tileFrameY / 54;
6112 int num26 = tileFrameX / 18 % 3;
6113 if (tileFrameY / 18 % 3 == 1 &&
num26 != 1)
6114 {
6117 {
6118 case 0:
6119 case 1:
6120 case 2:
6121 case 3:
6122 case 4:
6123 case 5:
6124 case 12:
6125 case 13:
6126 case 16:
6127 case 19:
6128 case 21:
6130 break;
6131 case 25:
6133 break;
6134 default:
6136 break;
6137 }
6139 {
6140 int num28 = Dust.NewDust(
new Vector2(i * 16,
j * 16 + 2), 14, 6,
num27, 0f, 0f, 100);
6142 {
6144 }
6147 }
6148 }
6149 }
6150 if (typeCache == 83)
6151 {
6152 int style = tileFrameX / 18;
6154 {
6156 }
6157 }
6158 if (typeCache == 22 &&
_rand.
Next(400) == 0)
6159 {
6160 Dust.NewDust(
new Vector2(i * 16,
j * 16), 16, 16, 14);
6161 }
6162 else if ((typeCache == 23 || typeCache == 24 || typeCache == 32) &&
_rand.
Next(500) == 0)
6163 {
6164 Dust.NewDust(
new Vector2(i * 16,
j * 16), 16, 16, 14);
6165 }
6166 else if (typeCache == 25 &&
_rand.
Next(700) == 0)
6167 {
6168 Dust.NewDust(
new Vector2(i * 16,
j * 16), 16, 16, 14);
6169 }
6170 else if (typeCache == 112 &&
_rand.
Next(700) == 0)
6171 {
6172 Dust.NewDust(
new Vector2(i * 16,
j * 16), 16, 16, 14);
6173 }
6174 else if (typeCache == 31 &&
_rand.
Next(20) == 0)
6175 {
6176 if (tileFrameX >= 36)
6177 {
6178 int num29 = Dust.NewDust(
new Vector2(i * 16,
j * 16), 16, 16, 5, 0f, 0f, 100);
6181 }
6182 else
6183 {
6184 Dust.NewDust(
new Vector2(i * 16,
j * 16), 16, 16, 14, 0f, 0f, 100);
6185 }
6186 }
6187 else if (typeCache == 26 &&
_rand.
Next(20) == 0)
6188 {
6189 if (tileFrameX >= 54)
6190 {
6191 int num30 = Dust.NewDust(
new Vector2(i * 16,
j * 16), 16, 16, 5, 0f, 0f, 100);
6195 }
6196 else
6197 {
6198 Dust.NewDust(
new Vector2(i * 16,
j * 16), 16, 16, 14, 0f, 0f, 100);
6199 }
6200 }
6201 else if ((typeCache == 71 || typeCache == 72) && tileCache.color() == 0 &&
_rand.
Next(500) == 0)
6202 {
6203 Dust.NewDust(
new Vector2(i * 16,
j * 16), 16, 16, 41, 0f, 0f, 250,
default(
Color), 0.8f);
6204 }
6205 else if ((typeCache == 17 || typeCache == 77 || typeCache == 133) &&
_rand.
Next(40) == 0)
6206 {
6207 if (tileFrameX == 18 && tileFrameY == 18)
6208 {
6209 int num31 = Dust.NewDust(
new Vector2(i * 16 - 4,
j * 16 - 6), 8, 6, 6, 0f, 0f, 100);
6211 {
6213 }
6214 }
6215 }
6216 else if (typeCache == 405 &&
_rand.
Next(20) == 0)
6217 {
6218 if (tileFrameX == 18 && tileFrameY == 18)
6219 {
6220 int num32 = Dust.NewDust(
new Vector2(i * 16 - 4,
j * 16 - 6), 24, 10, 6, 0f, 0f, 100);
6222 {
6224 }
6225 }
6226 }
6227 else if (typeCache == 37 &&
_rand.
Next(250) == 0)
6228 {
6231 {
6233 }
6234 }
6235 else if ((typeCache == 58 || typeCache == 76 || typeCache == 684) &&
_rand.
Next(250) == 0)
6236 {
6239 {
6241 }
6243 }
6244 else if (typeCache == 61)
6245 {
6246 if (tileFrameX == 144 &&
_rand.
Next(60) == 0)
6247 {
6248 int num35 = Dust.NewDust(
new Vector2(i * 16,
j * 16), 16, 16, 44, 0f, 0f, 250,
default(
Color), 0.4f);
6250 }
6251 }
6252 else if (Main.tileShine[typeCache] > 0)
6253 {
6254 if (tileLight.
R <= 20 && tileLight.
B <= 20 && tileLight.
G <= 20)
6255 {
6256 return;
6257 }
6260 {
6262 }
6264 {
6266 }
6269 {
6270 return;
6271 }
6273 switch (typeCache)
6274 {
6275 case 178:
6276 {
6277 switch (tileFrameX / 18)
6278 {
6279 case 0:
6281 break;
6282 case 1:
6284 break;
6285 case 2:
6287 break;
6288 case 3:
6290 break;
6291 case 4:
6293 break;
6294 case 5:
6296 break;
6297 case 6:
6299 break;
6300 }
6303 return;
6304 }
6305 case 63:
6307 break;
6308 }
6309 if (typeCache == 64)
6310 {
6312 }
6313 if (typeCache == 65)
6314 {
6316 }
6317 if (typeCache == 66)
6318 {
6320 }
6321 if (typeCache == 67)
6322 {
6324 }
6325 if (typeCache == 68)
6326 {
6328 }
6329 if (typeCache == 12 || typeCache == 665)
6330 {
6332 }
6333 if (typeCache == 639)
6334 {
6336 }
6337 if (typeCache == 204)
6338 {
6340 }
6341 if (typeCache == 211)
6342 {
6344 }
6347 }
6348 else if (Main.tileSolid[tileCache.type] && Main.shimmerAlpha > 0f && (tileLight.
R > 20 || tileLight.
B > 20 || tileLight.
G > 20))
6349 {
6352 {
6354 }
6356 {
6358 }
6361 {
6366 }
6367 }
6368 }
static float Clamp(float value, float min, float max)
bool IsAlchemyPlantHarvestable(int style)
void EmitLivingTreeLeaf(int i, int j, int leafGoreType)
void EmitAlchemyHerbParticles(int j, int i, int style)
bool IsVisible(Tile tile)
static readonly short Count