Rogue Prefixes - 7 left
- Removed IL edit to rogue weapons that was achievable without it - Rogue prefixes now roll properly with config off - Throwing weapons can now have rogue modifiers, apparently as intended
This commit is contained in:
1 parent
8c78f169d9
commit
9024180db4
4 files changed
+6
-16
No files matched your search
@@ -134,7 +134,6 @@ namespace CalamityMod.ILEditing
|
||||
|
||||
// Fix vanilla bugs exposed by Calamity mechanics
|
||||
Terraria.IL_NPC.NPCLoot += FixSplittingWormBannerDrops;
|
||||
Terraria.On_Item.Prefix += LetRogueItemsBeReforgeable;
|
||||
// Should not be necessary in 1.4
|
||||
// IL.Terraria.Main.DoUpdate += FixProjectileUpdatePriorityProblems;
|
||||
|
||||
|
||||
@@ -135,19 +135,6 @@ namespace CalamityMod.ILEditing
|
||||
}
|
||||
#endregion Fixing Splitting Worm Banner Spam in Deathmode
|
||||
|
||||
#region Let Rogue Items Be Reforgeable
|
||||
private static bool LetRogueItemsBeReforgeable(Terraria.On_Item.orig_Prefix orig, Item self, int pre)
|
||||
{
|
||||
if (self.CountsAsClass<RogueDamageClass>() && self.maxStack == 1 && pre == -3)
|
||||
{
|
||||
PrefixLoader.Roll(self, ref pre, 40, WorldGen.gen ? WorldGen.genRand : Main.rand, PrefixCategory.AnyWeapon);
|
||||
return true;
|
||||
}
|
||||
|
||||
return orig(self, pre);
|
||||
}
|
||||
#endregion Let Rogue Items Be Reforgeable
|
||||
|
||||
#region Fix Projectile Update Priority Problems
|
||||
|
||||
// This IL edit is commented out because it seems to be causing issues, sometimes creating errors preventing Terraria from updating
|
||||
|
||||
@@ -7,6 +7,9 @@ namespace CalamityMod.Items.Weapons.Rogue
|
||||
{
|
||||
public abstract class RogueWeapon : ModItem
|
||||
{
|
||||
// Apparently custom damage classes for weapons still don't allow for generic weapon prefixes
|
||||
public override bool WeaponPrefix() => true;
|
||||
|
||||
public override bool RangedPrefix() => false;
|
||||
|
||||
public override void ModifyResearchSorting(ref ItemGroup itemGroup) => itemGroup = (ItemGroup)CalamityResearchSorting.RogueWeapon;
|
||||
|
||||
@@ -127,7 +127,8 @@ namespace CalamityMod.Prefixes
|
||||
internal float shootSpeedMult = 1f;
|
||||
internal float stealthDmgMult = 1f;
|
||||
|
||||
public override PrefixCategory Category => PrefixCategory.Custom;
|
||||
// The part where it can only be rolled by rogue weapons is done by CanRoll below
|
||||
public override PrefixCategory Category => PrefixCategory.AnyWeapon;
|
||||
|
||||
public RogueWeaponPrefix() { }
|
||||
|
||||
@@ -152,7 +153,7 @@ namespace CalamityMod.Prefixes
|
||||
valueMult *= extraValue;
|
||||
}
|
||||
|
||||
public override bool CanRoll(Item item) => item.CountsAsClass<RogueDamageClass>() && (item.maxStack == 1 || item.AllowReforgeForStackableItem) && GetType() != typeof(RogueWeaponPrefix);
|
||||
public override bool CanRoll(Item item) => item.CountsAsClass<ThrowingDamageClass>() && (item.maxStack == 1 || item.AllowReforgeForStackableItem) && GetType() != typeof(RogueWeaponPrefix);
|
||||
|
||||
public override void SetStats(ref float damageMult, ref float knockbackMult, ref float useTimeMult, ref float scaleMult, ref float shootSpeedMult, ref float manaMult, ref int critBonus)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user