moved flasks to a switch case

This commit is contained in:
termigator1359 committed 2020-06-09 22:17:50 -04:00
1 parent 2c6c72b846
commit 18cbd1c3e4
3 files changed
+102 -129

No files matched your search

+97 -125
View File
@@ -4361,37 +4361,30 @@ namespace CalamityMod.CalPlayer
}
if (item.Calamity().rogue)
{
if (player.meleeEnchant > 0)
{
if (player.meleeEnchant == 1)
{
target.AddBuff(BuffID.Venom, 60 * Main.rand.Next(5, 10), false);
}
if (player.meleeEnchant == 2)
{
target.AddBuff(BuffID.CursedInferno, 60 * Main.rand.Next(3, 7), false);
}
if (player.meleeEnchant == 3)
{
target.AddBuff(BuffID.OnFire, 60 * Main.rand.Next(3, 7), false);
}
if (player.meleeEnchant == 5)
{
target.AddBuff(BuffID.Ichor, 60 * Main.rand.Next(10, 20), false);
}
if (player.meleeEnchant == 6)
{
target.AddBuff(BuffID.Confused, 60 * Main.rand.Next(1, 4), false);
}
if (player.meleeEnchant == 8)
{
target.AddBuff(BuffID.Poisoned, 60 * Main.rand.Next(5, 10), false);
}
/*if (player.meleeEnchant == 4)
{
target.AddBuff(BuffID.Midas, 120, false);
}*/
}
switch (player.meleeEnchant)
{
case 1:
target.AddBuff(BuffID.Venom, 60 * Main.rand.Next(5, 10), false);
break;
case 2:
target.AddBuff(BuffID.CursedInferno, 60 * Main.rand.Next(3, 7), false);
break;
case 3:
target.AddBuff(BuffID.OnFire, 60 * Main.rand.Next(3, 7), false);
break;
case 5:
target.AddBuff(BuffID.Ichor, 60 * Main.rand.Next(10, 20), false);
break;
case 6:
target.AddBuff(BuffID.Confused, 60 * Main.rand.Next(1, 4), false);
break;
case 8:
target.AddBuff(BuffID.Poisoned, 60 * Main.rand.Next(5, 10), false);
break;
/*case 4:
target.AddBuff(BuffID.Midas, 120, false);
break;*/
}
}
if (holyWrath)
{
@@ -4560,37 +4553,30 @@ namespace CalamityMod.CalPlayer
}
if (proj.Calamity().rogue)
{
if (player.meleeEnchant > 0)
{
if (player.meleeEnchant == 1)
{
target.AddBuff(BuffID.Venom, 60 * Main.rand.Next(5, 10), false);
}
if (player.meleeEnchant == 2)
{
target.AddBuff(BuffID.CursedInferno, 60 * Main.rand.Next(3, 7), false);
}
if (player.meleeEnchant == 3)
{
target.AddBuff(BuffID.OnFire, 60 * Main.rand.Next(3, 7), false);
}
if (player.meleeEnchant == 5)
{
target.AddBuff(BuffID.Ichor, 60 * Main.rand.Next(10, 20), false);
}
if (player.meleeEnchant == 6)
{
target.AddBuff(BuffID.Confused, 60 * Main.rand.Next(1, 4), false);
}
if (player.meleeEnchant == 8)
{
target.AddBuff(BuffID.Poisoned, 60 * Main.rand.Next(5, 10), false);
}
if (player.meleeEnchant == 4)
{
target.AddBuff(BuffID.Midas, 120, false);
}
}
switch (player.meleeEnchant)
{
case 1:
target.AddBuff(BuffID.Venom, 60 * Main.rand.Next(5, 10), false);
break;
case 2:
target.AddBuff(BuffID.CursedInferno, 60 * Main.rand.Next(3, 7), false);
break;
case 3:
target.AddBuff(BuffID.OnFire, 60 * Main.rand.Next(3, 7), false);
break;
case 5:
target.AddBuff(BuffID.Ichor, 60 * Main.rand.Next(10, 20), false);
break;
case 6:
target.AddBuff(BuffID.Confused, 60 * Main.rand.Next(1, 4), false);
break;
case 8:
target.AddBuff(BuffID.Poisoned, 60 * Main.rand.Next(5, 10), false);
break;
/*case 4:
target.AddBuff(BuffID.Midas, 120, false);
break;*/
}
if (etherealExtorter)
{
if (ZoneSunkenSea)
@@ -4715,37 +4701,30 @@ namespace CalamityMod.CalPlayer
}
if (item.Calamity().rogue)
{
if (player.meleeEnchant > 0)
{
if (player.meleeEnchant == 1)
{
target.AddBuff(BuffID.Venom, 60 * Main.rand.Next(5, 10), false);
}
if (player.meleeEnchant == 2)
{
target.AddBuff(BuffID.CursedInferno, 60 * Main.rand.Next(3, 7), false);
}
if (player.meleeEnchant == 3)
{
target.AddBuff(BuffID.OnFire, 60 * Main.rand.Next(3, 7), false);
}
if (player.meleeEnchant == 5)
{
target.AddBuff(BuffID.Ichor, 60 * Main.rand.Next(10, 20), false);
}
if (player.meleeEnchant == 6)
{
target.AddBuff(BuffID.Confused, 60 * Main.rand.Next(1, 4), false);
}
if (player.meleeEnchant == 8)
{
target.AddBuff(BuffID.Poisoned, 60 * Main.rand.Next(5, 10), false);
}
/*if (player.meleeEnchant == 4)
{
target.AddBuff(BuffID.Midas, 120, false);
}*/
}
switch (player.meleeEnchant)
{
case 1:
target.AddBuff(BuffID.Venom, 60 * Main.rand.Next(5, 10), false);
break;
case 2:
target.AddBuff(BuffID.CursedInferno, 60 * Main.rand.Next(3, 7), false);
break;
case 3:
target.AddBuff(BuffID.OnFire, 60 * Main.rand.Next(3, 7), false);
break;
case 5:
target.AddBuff(BuffID.Ichor, 60 * Main.rand.Next(10, 20), false);
break;
case 6:
target.AddBuff(BuffID.Confused, 60 * Main.rand.Next(1, 4), false);
break;
case 8:
target.AddBuff(BuffID.Poisoned, 60 * Main.rand.Next(5, 10), false);
break;
/*case 4:
target.AddBuff(BuffID.Midas, 120, false);
break;*/
}
}
if (holyWrath)
{
@@ -4909,37 +4888,30 @@ namespace CalamityMod.CalPlayer
}
if (proj.Calamity().rogue)
{
if (player.meleeEnchant > 0)
{
if (player.meleeEnchant == 1)
{
target.AddBuff(BuffID.Venom, 60 * Main.rand.Next(5, 10), false);
}
if (player.meleeEnchant == 2)
{
target.AddBuff(BuffID.CursedInferno, 60 * Main.rand.Next(3, 7), false);
}
if (player.meleeEnchant == 3)
{
target.AddBuff(BuffID.OnFire, 60 * Main.rand.Next(3, 7), false);
}
if (player.meleeEnchant == 5)
{
target.AddBuff(BuffID.Ichor, 60 * Main.rand.Next(10, 20), false);
}
if (player.meleeEnchant == 6)
{
target.AddBuff(BuffID.Confused, 60 * Main.rand.Next(1, 4), false);
}
if (player.meleeEnchant == 8)
{
target.AddBuff(BuffID.Poisoned, 60 * Main.rand.Next(5, 10), false);
}
/*if (player.meleeEnchant == 4)
{
switch (player.meleeEnchant)
{
case 1:
target.AddBuff(BuffID.Venom, 60 * Main.rand.Next(5, 10), false);
break;
case 2:
target.AddBuff(BuffID.CursedInferno, 60 * Main.rand.Next(3, 7), false);
break;
case 3:
target.AddBuff(BuffID.OnFire, 60 * Main.rand.Next(3, 7), false);
break;
case 5:
target.AddBuff(BuffID.Ichor, 60 * Main.rand.Next(10, 20), false);
break;
case 6:
target.AddBuff(BuffID.Confused, 60 * Main.rand.Next(1, 4), false);
break;
case 8:
target.AddBuff(BuffID.Poisoned, 60 * Main.rand.Next(5, 10), false);
break;
/*case 4:
target.AddBuff(BuffID.Midas, 120, false);
}*/
}
break;*/
}
if (etherealExtorter)
{
if (ZoneSunkenSea)
@@ -4951,10 +4923,10 @@ namespace CalamityMod.CalPlayer
target.AddBuff(ModContent.BuffType<SulphuricPoisoning>(), 120, false);
target.AddBuff(ModContent.BuffType<Irradiated>(), 300, false);
}
if (Main.moonPhase == 6) //first quarter
/*if (Main.moonPhase == 6) //first quarter
{
target.AddBuff(BuffID.Midas, 120, false);
}
}*/
if (ZoneCalamity && CalamityMod.fireWeaponList.Contains(player.ActiveItem().type))
{
target.AddBuff(ModContent.BuffType<AbyssalFlames>(), 240, false);
+4 -4
View File
@@ -3087,13 +3087,13 @@ namespace CalamityMod.CalPlayer
float num3 = player.position.Y - Main.player[myPlayer].position.Y;
if ((float)Math.Sqrt((double)(arg * arg + num3 * num3)) < 800f)
Main.player[myPlayer].AddBuff(43, 20, true);
Main.player[myPlayer].AddBuff(BuffID.PaladinsShield, 20, true);
}
}
}
if (player.statLife <= (int)(player.statLifeMax2 * 0.5))
player.AddBuff(62, 5, true);
player.AddBuff(BuffID.IceBarrier, 5, true);
if (player.statLife <= (int)(player.statLifeMax2 * 0.15))
player.endurance += 0.05f;
}
@@ -3112,13 +3112,13 @@ namespace CalamityMod.CalPlayer
float num3 = player.position.Y - Main.player[myPlayer].position.Y;
if ((float)Math.Sqrt((double)(arg * arg + num3 * num3)) < 800f)
Main.player[myPlayer].AddBuff(43, 20, true);
Main.player[myPlayer].AddBuff(BuffID.PaladinsShield, 20, true);
}
}
}
if (player.statLife <= (int)(player.statLifeMax2 * 0.5))
player.AddBuff(62, 5, true);
player.AddBuff(BuffID.IceBarrier, 5, true);
if (player.statLife <= (int)(player.statLifeMax2 * 0.15))
player.endurance += 0.05f;
}
+1
View File
@@ -2,6 +2,7 @@ using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using System;
using Terraria;
using Terraria.ID;
using Terraria.ModLoader;
namespace CalamityMod.Projectiles.Magic
{