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

◆ NebulaLevelup()

void Terraria.Player.NebulaLevelup ( int type)
inline

Definition at line 53639 of file Player.cs.

53640 {
53641 if (whoAmI != Main.myPlayer)
53642 {
53643 return;
53644 }
53645 int timeToAdd = 480;
53646 for (int i = 0; i < maxBuffs; i++)
53647 {
53648 if (buffType[i] >= type && buffType[i] < type + 3)
53649 {
53650 DelBuff(i);
53651 }
53652 }
53653 switch (type)
53654 {
53655 case 173:
53656 nebulaLevelLife = (int)MathHelper.Clamp(nebulaLevelLife + 1, 0f, 3f);
53658 break;
53659 case 176:
53660 nebulaLevelMana = (int)MathHelper.Clamp(nebulaLevelMana + 1, 0f, 3f);
53662 break;
53663 case 179:
53666 break;
53667 }
53668 }
static float Clamp(float value, float min, float max)
Definition MathHelper.cs:46
int nebulaLevelLife
Definition Player.cs:703
static readonly int maxBuffs
Definition Player.cs:1191
int nebulaLevelDamage
Definition Player.cs:709
int nebulaLevelMana
Definition Player.cs:705
void AddBuff(int type, int timeToAdd, bool quiet=true, bool foodHack=false)
Definition Player.cs:4441
void DelBuff(int b)
Definition Player.cs:4602

References Microsoft.Xna.Framework.MathHelper.Clamp(), Terraria.Main.myPlayer, and System.type.