reforge cleanup + comments

This commit is contained in:
Ozzatron committed 2022-09-02 13:23:37 -04:00
1 parent ecd94db7fc
commit 0ff3b941b4
1 file changed
+20 -7
+20 -7
View File
@@ -171,10 +171,10 @@ namespace CalamityMod
{
int[][] accessoryReforgeTiers = new int[][]
{
/* 0 */ new int[] { PrefixID.Hard, PrefixID.Jagged, PrefixID.Brisk, PrefixID.Wild, PrefixID.Arcane, GetCalPrefix("Quiet") },
/* 0 */ new int[] { PrefixID.Hard, PrefixID.Jagged, PrefixID.Brisk, PrefixID.Wild, GetCalPrefix("Quiet") },
/* 1 */ new int[] { PrefixID.Guarding, PrefixID.Spiked, PrefixID.Precise, PrefixID.Fleeting, PrefixID.Rash, GetCalPrefix("Cloaked") },
/* 2 */ new int[] { PrefixID.Armored, PrefixID.Angry, PrefixID.Hasty2, PrefixID.Intrepid, PrefixID.Arcane, GetCalPrefix("Camouflaged") },
/* 3 */ new int[] { PrefixID.Warding, PrefixID.Menacing, PrefixID.Quick2, PrefixID.Violent, PrefixID.Lucky, GetCalPrefix("Silent") },
/* 3 */ new int[] { PrefixID.Warding, PrefixID.Menacing, PrefixID.Lucky, PrefixID.Quick2, PrefixID.Violent, GetCalPrefix("Silent") },
};
prefix = IteratePrefix(rand, accessoryReforgeTiers, currentPrefix);
}
@@ -182,17 +182,30 @@ namespace CalamityMod
// MELEE (includes tools and whips)
else if (item.CountsAsClass<MeleeDamageClass>() || item.CountsAsClass<SummonMeleeSpeedDamageClass>())
{
// Terrarian (has its own special "Legendary" for marketing reasons)
if (item.type == ItemID.Terrarian)
{
int[][] terrarianReforgeTiers = new int[][]
{
/* 0 */ new int[] { PrefixID.Keen, PrefixID.Forceful, PrefixID.Strong },
/* 1 */ new int[] { PrefixID.Hurtful, PrefixID.Ruthless, PrefixID.Zealous },
/* 2 */ new int[] { PrefixID.Superior, PrefixID.Demonic, PrefixID.Godly },
/* 3 */ new int[] { PrefixID.Legendary2 },
};
prefix = IteratePrefix(rand, terrarianReforgeTiers, currentPrefix);
}
// Yoyos, Flails, Spears, etc.
if ((item.channel || item.noMelee) && item.type != ItemID.Zenith && item.useStyle != ItemUseStyleID.Rapier)
// Spears actually work fine with Legendary, but vanilla doesn't give it to them, so we won't either.
// Zenith and rapiers are specifically excluded from this, so they get broadsword reforges despite not scaling with melee speed.
else if ((item.channel || item.noMelee) && item.type != ItemID.Zenith && item.useStyle != ItemUseStyleID.Rapier)
{
// The Terrarian can get a special "Legendary" reforge
bool terrarian = item.type == ItemID.Terrarian;
int[][] meleeNoSpeedReforgeTiers = new int[][]
{
/* 0 */ new int[] { PrefixID.Keen, PrefixID.Forceful, PrefixID.Strong },
/* 1 */ new int[] { PrefixID.Hurtful, PrefixID.Ruthless, PrefixID.Zealous },
/* 2 */ terrarian ? new int[] { PrefixID.Superior, PrefixID.Demonic, PrefixID.Godly } : new int[] { PrefixID.Superior, PrefixID.Demonic },
/* 3 */ terrarian ? new int[] { PrefixID.Legendary2 } : new int[] { PrefixID.Godly }
/* 2 */ new int[] { PrefixID.Superior, PrefixID.Demonic },
/* 3 */ new int[] { PrefixID.Godly }
};
prefix = IteratePrefix(rand, meleeNoSpeedReforgeTiers, currentPrefix);
}