Merge branch 'master' into tiny-misc-changes
No files matched your search
|
Before Width: | Height: | Size: 434 B After Width: | Height: | Size: 541 B |
@@ -0,0 +1,36 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using CalamityMod.Projectiles.Summon;
|
||||
using Terraria;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
namespace CalamityMod.Buffs.Summon
|
||||
{
|
||||
public class GastricBelcherBuff : ModBuff
|
||||
{
|
||||
public override void SetDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Gastric Aberration");
|
||||
Description.SetDefault("The aquatic aberration will protect you");
|
||||
Main.buffNoTimeDisplay[Type] = true;
|
||||
Main.buffNoSave[Type] = true;
|
||||
}
|
||||
|
||||
public override void Update(Player player, ref int buffIndex)
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
if (player.ownedProjectileCounts[ModContent.ProjectileType<GastricBelcher>()] > 0)
|
||||
{
|
||||
modPlayer.gastricBelcher = true;
|
||||
}
|
||||
if (!modPlayer.gastricBelcher)
|
||||
{
|
||||
player.DelBuff(buffIndex);
|
||||
buffIndex--;
|
||||
}
|
||||
else
|
||||
{
|
||||
player.buffTime[buffIndex] = 18000;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
After Width: | Height: | Size: 752 B |
@@ -14,6 +14,7 @@ using CalamityMod.Items.TreasureBags;
|
||||
using CalamityMod.Items.Weapons.Magic;
|
||||
using CalamityMod.Items.Weapons.Melee;
|
||||
using CalamityMod.Items.Weapons.Ranged;
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using CalamityMod.Items.Weapons.Summon;
|
||||
using CalamityMod.NPCs;
|
||||
using CalamityMod.NPCs.Abyss;
|
||||
@@ -51,6 +52,7 @@ using Terraria.ID;
|
||||
using Terraria.Localization;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ModLoader.IO;
|
||||
using Terraria.ModLoader.Config;
|
||||
|
||||
namespace CalamityMod.CalPlayer
|
||||
{
|
||||
@@ -81,6 +83,7 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
#region No Category
|
||||
public static bool areThereAnyDamnBosses = false;
|
||||
public static bool areThereAnyDamnEvents = false;
|
||||
public bool drawBossHPBar = true;
|
||||
public bool shouldDrawSmallText = true;
|
||||
private const int saveVersion = 0;
|
||||
@@ -92,10 +95,12 @@ namespace CalamityMod.CalPlayer
|
||||
public int actualMaxLife = 0;
|
||||
public int deathModeUnderworldTime = 0;
|
||||
public int deathModeBlizzardTime = 0;
|
||||
public static int chaosStateDuration = 600;
|
||||
public static int chaosStateDuration = 360;
|
||||
public static int chaosStateDurationBoss = 600;
|
||||
public bool killSpikyBalls = false;
|
||||
public Projectile lastProjectileHit;
|
||||
public double acidRoundMultiplier = 1D;
|
||||
public int waterLeechTarget = -1;
|
||||
#endregion
|
||||
|
||||
#region External variables -- Only set by Mod.Call
|
||||
@@ -190,6 +195,7 @@ namespace CalamityMod.CalPlayer
|
||||
public int profanedSoulWeaponType = 0;
|
||||
public int hurtSoundTimer = 0;
|
||||
public int danceOfLightCharge = 0;
|
||||
public int shadowPotCooldown = 0;
|
||||
#endregion
|
||||
|
||||
#region Sound
|
||||
@@ -228,6 +234,7 @@ namespace CalamityMod.CalPlayer
|
||||
public bool stealthStrikeHalfCost = false;
|
||||
public bool stealthStrikeAlwaysCrits = false;
|
||||
public bool wearingRogueArmor = false;
|
||||
public float accStealthGenBoost = 0f;
|
||||
|
||||
public float throwingDamage = 1f;
|
||||
public float throwingVelocity = 1f;
|
||||
@@ -839,6 +846,7 @@ namespace CalamityMod.CalPlayer
|
||||
public bool rDevil = false;
|
||||
public bool aValkyrie = false;
|
||||
public bool apexShark = false;
|
||||
public bool gastricBelcher = false;
|
||||
public bool squirrel = false;
|
||||
public bool hauntedDishes = false;
|
||||
public bool stormjaw = false;
|
||||
@@ -1280,6 +1288,7 @@ namespace CalamityMod.CalPlayer
|
||||
throwingAmmoCost75 = false;
|
||||
throwingAmmoCost66 = false;
|
||||
throwingAmmoCost50 = false;
|
||||
accStealthGenBoost = 0f;
|
||||
|
||||
dashMod = 0;
|
||||
externalAbyssLight = 0;
|
||||
@@ -1786,6 +1795,7 @@ namespace CalamityMod.CalPlayer
|
||||
eAxe = false;
|
||||
endoCooper = false;
|
||||
apexShark = false;
|
||||
gastricBelcher = false;
|
||||
squirrel = false;
|
||||
hauntedDishes = false;
|
||||
stormjaw = false;
|
||||
@@ -1893,6 +1903,7 @@ namespace CalamityMod.CalPlayer
|
||||
planarSpeedBoost = 0;
|
||||
galileoCooldown = 0;
|
||||
soundCooldown = 0;
|
||||
shadowPotCooldown = 0;
|
||||
rage = 0;
|
||||
adrenaline = 0;
|
||||
raiderStack = 0;
|
||||
@@ -2345,6 +2356,10 @@ namespace CalamityMod.CalPlayer
|
||||
|
||||
ZoneSulphur = (CalamityWorld.sulphurTiles > 30 || (player.ZoneOverworldHeight && sulphurPosX)) && !ZoneAbyss;
|
||||
|
||||
//Overriding 1.4's ass req boosts
|
||||
if (Main.snowTiles > 300)
|
||||
player.ZoneSnow = true;
|
||||
|
||||
Mod fargos = ModLoader.GetMod("Fargowiltas");
|
||||
if (fargos != null)
|
||||
{
|
||||
@@ -2508,12 +2523,14 @@ namespace CalamityMod.CalPlayer
|
||||
player.Teleport(teleportLocation, 4, 0);
|
||||
NetMessage.SendData(65, -1, -1, null, 0, (float)player.whoAmI, teleportLocation.X, teleportLocation.Y, 1, 0, 0);
|
||||
|
||||
int duration = chaosStateDuration;
|
||||
if (areThereAnyDamnBosses || areThereAnyDamnEvents)
|
||||
duration = chaosStateDurationBoss;
|
||||
if (eScarfCooldown)
|
||||
player.AddBuff(BuffID.ChaosState, (int)(chaosStateDuration * 1.5), true);
|
||||
else if (scarfCooldown)
|
||||
player.AddBuff(BuffID.ChaosState, chaosStateDuration * 2, true);
|
||||
else
|
||||
player.AddBuff(BuffID.ChaosState, chaosStateDuration, true);
|
||||
duration = (int)(chaosStateDuration * 1.5);
|
||||
else if (scarfCooldown)
|
||||
duration = chaosStateDuration * 2;
|
||||
player.AddBuff(BuffID.ChaosState, duration, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2561,12 +2578,14 @@ namespace CalamityMod.CalPlayer
|
||||
player.Teleport(teleportLocation, 1, 0);
|
||||
NetMessage.SendData(65, -1, -1, null, 0, (float)player.whoAmI, teleportLocation.X, teleportLocation.Y, 1, 0, 0);
|
||||
|
||||
if (eScarfCooldown)
|
||||
player.AddBuff(BuffID.ChaosState, (int)(chaosStateDuration * 1.5), true);
|
||||
else if (scarfCooldown)
|
||||
player.AddBuff(BuffID.ChaosState, chaosStateDuration * 2, true);
|
||||
else
|
||||
player.AddBuff(BuffID.ChaosState, chaosStateDuration, true);
|
||||
int duration = chaosStateDuration;
|
||||
if (areThereAnyDamnBosses || areThereAnyDamnEvents)
|
||||
duration = chaosStateDurationBoss;
|
||||
if (eScarfCooldown)
|
||||
duration = (int)(chaosStateDuration * 1.5);
|
||||
else if (scarfCooldown)
|
||||
duration = chaosStateDuration * 2;
|
||||
player.AddBuff(BuffID.ChaosState, duration, true);
|
||||
|
||||
int numDust = 40;
|
||||
Vector2 step = playerToTeleport / numDust;
|
||||
@@ -4007,9 +4026,9 @@ namespace CalamityMod.CalPlayer
|
||||
acidRoundMultiplier = 1D;
|
||||
}
|
||||
//Prismatic Breaker is a weird hybrid melee-ranged weapon so include it too. Why are you using desert prowler post-Yharon? don't ask me
|
||||
if (desertProwler && (item.ranged/* || item.type == ModContent.ItemType<PrismaticBreaker>()*/))
|
||||
if (desertProwler && (item.ranged || item.type == ModContent.ItemType<PrismaticBreaker>()))
|
||||
{
|
||||
flat += 2f;
|
||||
flat += 1f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7763,7 +7782,7 @@ namespace CalamityMod.CalPlayer
|
||||
float dashDistance;
|
||||
if (dashMod == 1) //Counter and Evasion Scarf
|
||||
{
|
||||
dashDistance = evasionScarf ? 16.9f : 14.5f;
|
||||
dashDistance = evasionScarf ? 16.3f : 14.5f;
|
||||
int direction = 0;
|
||||
bool justDashed = false;
|
||||
if (dashTimeMod > 0)
|
||||
@@ -8272,7 +8291,7 @@ namespace CalamityMod.CalPlayer
|
||||
{
|
||||
if (evasionScarf)
|
||||
{
|
||||
player.AddBuff(ModContent.BuffType<EvasionScarfBoost>(), CalamityUtils.SecondsToFrames(6f));
|
||||
player.AddBuff(ModContent.BuffType<EvasionScarfBoost>(), CalamityUtils.SecondsToFrames(9f));
|
||||
player.AddBuff(ModContent.BuffType<EvasionScarfCooldown>(), player.chaosState ? CalamityUtils.SecondsToFrames(20f) : CalamityUtils.SecondsToFrames(13f));
|
||||
}
|
||||
else
|
||||
@@ -8817,8 +8836,8 @@ namespace CalamityMod.CalPlayer
|
||||
}
|
||||
|
||||
public override void PreUpdate()
|
||||
{
|
||||
tailFrameUp++;
|
||||
{
|
||||
tailFrameUp++;
|
||||
if (tailFrameUp == 8)
|
||||
{
|
||||
tailFrame++;
|
||||
@@ -9840,6 +9859,10 @@ namespace CalamityMod.CalPlayer
|
||||
if (etherealExtorter && Main.moonPhase == 3) // 3 = Waning Crescent
|
||||
stealthGenStandstill += 0.15f;
|
||||
|
||||
//Accessory modifiers can boost these stats
|
||||
stealthGenStandstill += accStealthGenBoost;
|
||||
stealthGenMoving += accStealthGenBoost;
|
||||
|
||||
//
|
||||
// Other code which affects stealth generation goes here.
|
||||
// Increase stealthGenStandstill (default 1.0) to give a % boost to stealth gen while standing still.
|
||||
@@ -11113,6 +11136,7 @@ namespace CalamityMod.CalPlayer
|
||||
int frame = HandlePSCAnimationFrames(animType);
|
||||
player.legFrame.Y = player.legFrame.Height * frame;
|
||||
}
|
||||
waterLeechTarget = -1;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -56,6 +56,9 @@ namespace CalamityMod.CalPlayer
|
||||
// Bool for any existing bosses, true if any boss NPC is active
|
||||
CalamityPlayer.areThereAnyDamnBosses = CalamityGlobalNPC.AnyBossNPCS();
|
||||
|
||||
// Bool for any existing events, true if any event is active
|
||||
CalamityPlayer.areThereAnyDamnEvents = CalamityGlobalNPC.AnyEvents(player);
|
||||
|
||||
// If any boss NPC is active, apply Zen to the player to reduce spawn rate
|
||||
if (CalamityPlayer.areThereAnyDamnBosses)
|
||||
{
|
||||
@@ -894,6 +897,8 @@ namespace CalamityMod.CalPlayer
|
||||
modPlayer.galileoCooldown--;
|
||||
if (modPlayer.soundCooldown > 0)
|
||||
modPlayer.soundCooldown--;
|
||||
if (modPlayer.shadowPotCooldown > 0)
|
||||
modPlayer.shadowPotCooldown--;
|
||||
if (modPlayer.raiderCooldown > 0)
|
||||
modPlayer.raiderCooldown--;
|
||||
if (modPlayer.gSabatonCooldown > 0)
|
||||
@@ -3549,7 +3554,7 @@ namespace CalamityMod.CalPlayer
|
||||
if (modPlayer.prismaticLasers > 1800 && player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
float shootSpeed = 18f;
|
||||
int dmg = (int)(150 * player.MagicDamage());
|
||||
int dmg = (int)(50 * player.MagicDamage());
|
||||
Vector2 startPos = player.RotatedRelativePoint(player.MountedCenter, true);
|
||||
Vector2 velocity = Main.MouseWorld - startPos;
|
||||
if (player.gravDir == -1f)
|
||||
@@ -3568,7 +3573,7 @@ namespace CalamityMod.CalPlayer
|
||||
travelDist = shootSpeed / travelDist;
|
||||
}
|
||||
|
||||
int laserAmt = 2;
|
||||
int laserAmt = Main.rand.Next(2);
|
||||
for (int index = 0; index < laserAmt; index++)
|
||||
{
|
||||
startPos = new Vector2(player.Center.X + (float)(Main.rand.Next(201) * -(float)player.direction) + (Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f);
|
||||
@@ -3590,7 +3595,8 @@ namespace CalamityMod.CalPlayer
|
||||
velocity.Y *= travelDist;
|
||||
velocity.X += (float)Main.rand.Next(-50, 51) * 0.02f;
|
||||
velocity.Y += (float)Main.rand.Next(-50, 51) * 0.02f;
|
||||
Projectile.NewProjectile(startPos, velocity, ModContent.ProjectileType<MagicNebulaShot>(), dmg, 4f, player.whoAmI, 0f, (float)Main.rand.Next(10));
|
||||
int laser = Projectile.NewProjectile(startPos, velocity, ModContent.ProjectileType<MagicNebulaShot>(), dmg, 4f, player.whoAmI, 0f, Main.rand.Next(10));
|
||||
Main.projectile[laser].localNPCHitCooldown = 5;
|
||||
}
|
||||
Main.PlaySound(SoundID.Item12, player.position);
|
||||
}
|
||||
|
||||
@@ -121,6 +121,7 @@ namespace CalamityMod
|
||||
public static Texture2D AstralSky;
|
||||
public static Effect CustomShader;
|
||||
public static Effect LightShader;
|
||||
public static Effect TentacleShader;
|
||||
|
||||
// DR data structure
|
||||
public static SortedDictionary<int, float> DRValues;
|
||||
@@ -286,6 +287,7 @@ namespace CalamityMod
|
||||
AstralSky = ModContent.GetTexture("CalamityMod/ExtraTextures/AstralSky");
|
||||
CustomShader = GetEffect("Effects/CustomShader");
|
||||
LightShader = GetEffect("Effects/LightBurstShader");
|
||||
TentacleShader = GetEffect("Effects/TentacleShader");
|
||||
|
||||
Filters.Scene["CalamityMod:DevourerofGodsHead"] = new Filter(new DoGScreenShaderData("FilterMiniTower").UseColor(0.4f, 0.1f, 1.0f).UseOpacity(0.5f), EffectPriority.VeryHigh);
|
||||
SkyManager.Instance["CalamityMod:DevourerofGodsHead"] = new DoGSky();
|
||||
@@ -320,6 +322,8 @@ namespace CalamityMod
|
||||
Filters.Scene["CalamityMod:LightBurst"] = new Filter(new ScreenShaderData(new Ref<Effect>(LightShader), "BurstPass"), EffectPriority.VeryHigh);
|
||||
Filters.Scene["CalamityMod:LightBurst"].Load();
|
||||
|
||||
GameShaders.Misc["CalamityMod:SubsumingTentacle"] = new MiscShaderData(new Ref<Effect>(TentacleShader), "BurstPass");
|
||||
|
||||
RipperUI.Reset();
|
||||
AstralArcanumUI.Load(this);
|
||||
|
||||
@@ -638,7 +642,9 @@ namespace CalamityMod
|
||||
ModContent.ProjectileType<MagnomalyBeam>(),
|
||||
ModContent.ProjectileType<MagnomalyAura>(),
|
||||
ModContent.ProjectileType<RainbowTrail>(),
|
||||
ModContent.ProjectileType<PrismaticBeam>()
|
||||
ModContent.ProjectileType<PrismaticBeam>(),
|
||||
ModContent.ProjectileType<ExoLight>(),
|
||||
ModContent.ProjectileType<ExoLightBomb>()
|
||||
};
|
||||
|
||||
projectileDestroyExceptionList = new List<int>()
|
||||
@@ -1297,7 +1303,9 @@ namespace CalamityMod
|
||||
ItemID.WaspGun,
|
||||
ItemID.Keybrand,
|
||||
ItemID.PulseBow,
|
||||
ItemID.PaladinsHammer
|
||||
ItemID.PaladinsHammer,
|
||||
ItemID.SolarEruption,
|
||||
ItemID.DayBreak
|
||||
};
|
||||
|
||||
thirtyThreeDamageBuffList = new List<int>()
|
||||
@@ -1376,7 +1384,8 @@ namespace CalamityMod
|
||||
ItemID.DD2BetsyBow,
|
||||
ItemID.InfluxWaver,
|
||||
ItemID.Xenopopper,
|
||||
ItemID.ElectrosphereLauncher
|
||||
ItemID.ElectrosphereLauncher,
|
||||
ItemID.OpticStaff //Note: got local i frames so it should be better
|
||||
};
|
||||
|
||||
pumpkinMoonBuffList = new List<int>()
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace CalamityMod.Events
|
||||
{ ModContent.NPCType<Skyfin>(), new AcidRainSpawnData(1, 1f, AcidRainSpawnRequirement.Water) },
|
||||
{ ModContent.NPCType<Trilobite>(), new AcidRainSpawnData(1, 1f, AcidRainSpawnRequirement.Water) },
|
||||
{ ModContent.NPCType<WaterLeech>(), new AcidRainSpawnData(1, 1f, AcidRainSpawnRequirement.Water) },
|
||||
{ ModContent.NPCType<SulfurousSkater>(), new AcidRainSpawnData(1, 1f, AcidRainSpawnRequirement.Anywhere) }
|
||||
{ ModContent.NPCType<SulfurousSkater>(), new AcidRainSpawnData(1, 0.4f, AcidRainSpawnRequirement.Anywhere) }
|
||||
};
|
||||
|
||||
public static Dictionary<int, AcidRainSpawnData> PossibleEnemiesPolter = new Dictionary<int, AcidRainSpawnData>()
|
||||
@@ -71,7 +71,7 @@ namespace CalamityMod.Events
|
||||
{ ModContent.NPCType<Skyfin>(), new AcidRainSpawnData(1, 1f, AcidRainSpawnRequirement.Water) },
|
||||
{ ModContent.NPCType<Trilobite>(), new AcidRainSpawnData(1, 1f, AcidRainSpawnRequirement.Water) },
|
||||
{ ModContent.NPCType<WaterLeech>(), new AcidRainSpawnData(1, 1f, AcidRainSpawnRequirement.Water) },
|
||||
{ ModContent.NPCType<SulfurousSkater>(), new AcidRainSpawnData(1, 1f, AcidRainSpawnRequirement.Anywhere) },
|
||||
{ ModContent.NPCType<SulfurousSkater>(), new AcidRainSpawnData(1, 0.4f, AcidRainSpawnRequirement.Anywhere) },
|
||||
{ ModContent.NPCType<GammaSlime>(), new AcidRainSpawnData(1, 1f, AcidRainSpawnRequirement.Anywhere) }
|
||||
};
|
||||
|
||||
@@ -132,9 +132,9 @@ namespace CalamityMod.Events
|
||||
}
|
||||
}
|
||||
if (CalamityWorld.downedPolterghast)
|
||||
return (int)(180 * Math.Log(playerCount + Math.E - 1));
|
||||
return (int)(140 * Math.Log(playerCount + Math.E - 1));
|
||||
else if (CalamityWorld.downedAquaticScourge)
|
||||
return (int)(125 * Math.Log(playerCount + Math.E - 1));
|
||||
return (int)(115 * Math.Log(playerCount + Math.E - 1));
|
||||
else
|
||||
return (int)(90 * Math.Log(playerCount + Math.E - 1));
|
||||
}
|
||||
|
||||
|
After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 961 B |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
@@ -16,8 +16,8 @@ namespace CalamityMod.Items.Accessories
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 20;
|
||||
item.height = 20;
|
||||
item.width = 40;
|
||||
item.height = 50;
|
||||
item.value = Item.buyPrice(0, 15, 0, 0);
|
||||
item.rare = 5;
|
||||
item.accessory = true;
|
||||
|
||||
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 3.0 KiB |
@@ -15,7 +15,7 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
DisplayName.SetDefault("Asgard's Valor");
|
||||
Tooltip.SetDefault("Grants immunity to fire blocks and knockback\n" +
|
||||
"Immune to most debuffs including Brimstone Flames, Holy Flames, and Glacial State\n" +
|
||||
"Immune to most debuffs including Brimstone Flames, and Glacial State\n" +
|
||||
"10% damage reduction while submerged in liquid\n" +
|
||||
"+20 max life\n" +
|
||||
"Grants a holy dash which can be used to ram enemies\n" +
|
||||
@@ -51,7 +51,6 @@ namespace CalamityMod.Items.Accessories
|
||||
player.buffImmune[BuffID.Cursed] = true;
|
||||
player.buffImmune[BuffID.Darkness] = true;
|
||||
player.buffImmune[ModContent.BuffType<BrimstoneFlames>()] = true;
|
||||
player.buffImmune[ModContent.BuffType<HolyFlames>()] = true;
|
||||
player.buffImmune[ModContent.BuffType<GlacialState>()] = true;
|
||||
player.statLifeMax2 += 20;
|
||||
if (Collision.DrownCollision(player.position, player.width, player.height, player.gravDir))
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace CalamityMod.Items.Accessories
|
||||
}
|
||||
if (player.ownedProjectileCounts[ProjectileType<HowlsHeartHowl>()] < 1)
|
||||
{
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ProjectileType<HowlsHeartHowl>(), (int)(HowlDamage * player.MinionDamage()), 1f, player.whoAmI, 0f, 0f);
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -1f, ProjectileType<HowlsHeartHowl>(), (int)(HowlDamage * player.MinionDamage()), 1f, player.whoAmI, 0f, 1f);
|
||||
}
|
||||
if (player.ownedProjectileCounts[ProjectileType<HowlsHeartCalcifer>()] < 1)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using CalamityMod.CalPlayer;
|
||||
using Terraria;
|
||||
using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
|
||||
@@ -15,6 +16,7 @@ namespace CalamityMod.Items.Accessories
|
||||
"Increased minion knockback\n" +
|
||||
"Grants shadowflame powers to all minions\n" +
|
||||
"Minions make enemies cry on hit");
|
||||
Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(8, 4));
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
|
||||
|
Before Width: | Height: | Size: 654 B After Width: | Height: | Size: 1.0 KiB |
@@ -97,6 +97,10 @@ namespace CalamityMod.Items.Accessories
|
||||
{
|
||||
WaterBonuses = true;
|
||||
}
|
||||
else if (!player.IsUnderwater())
|
||||
{
|
||||
WaterBonuses = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (WaterBonuses || player.IsUnderwater())
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace CalamityMod.Items.Armor
|
||||
|
||||
public override void UpdateArmorSet(Player player)
|
||||
{
|
||||
player.setBonus = "Ranged attacks deal an extra 2 flat damage\n" +
|
||||
player.setBonus = "Ranged attacks deal an extra 1 flat damage\n" +
|
||||
"Ranged crits can rarely whip up a sandstorm";
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
modPlayer.desertProwler = true;
|
||||
|
||||
@@ -32,6 +32,7 @@ using Terraria.DataStructures;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
using Terraria.ModLoader.IO;
|
||||
using Terraria.Utilities;
|
||||
|
||||
namespace CalamityMod.Items
|
||||
{
|
||||
@@ -55,17 +56,33 @@ namespace CalamityMod.Items
|
||||
}
|
||||
#endregion
|
||||
|
||||
public bool rogue = false;
|
||||
public bool rogue = false;
|
||||
public float StealthGenBonus;
|
||||
|
||||
public int timesUsed = 0;
|
||||
public int timesUsed = 0;
|
||||
|
||||
// Rarity is provided both as the classic int and the new enum.
|
||||
public CalamityRarity customRarity = CalamityRarity.NoEffect;
|
||||
public int postMoonLordRarity
|
||||
{
|
||||
get => (int)customRarity;
|
||||
set => customRarity = (CalamityRarity)value;
|
||||
}
|
||||
// Rarity is provided both as the classic int and the new enum.
|
||||
public CalamityRarity customRarity = CalamityRarity.NoEffect;
|
||||
public int postMoonLordRarity
|
||||
{
|
||||
get => (int)customRarity;
|
||||
set => customRarity = (CalamityRarity)value;
|
||||
}
|
||||
|
||||
///See RogueWeapon.cs for rogue modifier shit
|
||||
#region Modifiers
|
||||
public CalamityGlobalItem()
|
||||
{
|
||||
StealthGenBonus = 1f;
|
||||
}
|
||||
|
||||
public override GlobalItem Clone(Item item, Item itemClone)
|
||||
{
|
||||
CalamityGlobalItem myClone = (CalamityGlobalItem)base.Clone(item, itemClone);
|
||||
myClone.StealthGenBonus = StealthGenBonus;
|
||||
return myClone;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region SetDefaults
|
||||
public override void SetDefaults(Item item)
|
||||
@@ -949,12 +966,14 @@ namespace CalamityMod.Items
|
||||
{
|
||||
if (!Collision.SolidCollision(teleportLocation, player.width, player.height))
|
||||
{
|
||||
int duration = CalamityPlayer.chaosStateDuration;
|
||||
if (CalamityPlayer.areThereAnyDamnBosses || CalamityPlayer.areThereAnyDamnEvents)
|
||||
duration = CalamityPlayer.chaosStateDurationBoss;
|
||||
if (modPlayer.eScarfCooldown)
|
||||
player.AddBuff(BuffID.ChaosState, (int)(CalamityPlayer.chaosStateDuration * 1.5), true);
|
||||
duration = (int)(CalamityPlayer.chaosStateDuration * 1.5);
|
||||
else if (modPlayer.scarfCooldown)
|
||||
player.AddBuff(BuffID.ChaosState, CalamityPlayer.chaosStateDuration * 2, true);
|
||||
else
|
||||
player.AddBuff(BuffID.ChaosState, CalamityPlayer.chaosStateDuration, true);
|
||||
duration = CalamityPlayer.chaosStateDuration * 2;
|
||||
player.AddBuff(BuffID.ChaosState, duration, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -965,6 +984,7 @@ namespace CalamityMod.Items
|
||||
#region Modify Tooltips
|
||||
public override void ModifyTooltips(Item item, List<TooltipLine> tooltips)
|
||||
{
|
||||
#region Custom Rarities#
|
||||
TooltipLine tt2 = tooltips.FirstOrDefault(x => x.Name == "ItemName" && x.mod == "Terraria");
|
||||
if (tt2 != null)
|
||||
{
|
||||
@@ -1086,6 +1106,25 @@ namespace CalamityMod.Items
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Accessory Modifier Display
|
||||
if (item.accessory)
|
||||
{
|
||||
if (!item.social && item.prefix > 0)
|
||||
{
|
||||
float stealthGenBoost = item.Calamity().StealthGenBonus - 1f;
|
||||
if (stealthGenBoost > 0)
|
||||
{
|
||||
TooltipLine StealthGen = new TooltipLine(mod, "PrefixStealthGenBoost", "+" + Math.Round(stealthGenBoost * 100f) + "% stealth generation")
|
||||
{
|
||||
isModifier = true
|
||||
};
|
||||
tooltips.Add(StealthGen);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
/*if (item.ammo == 97)
|
||||
{
|
||||
@@ -2779,7 +2818,7 @@ Provides heat and cold protection in Death Mode";
|
||||
|
||||
// Plantera
|
||||
case ItemID.PlanteraBossBag:
|
||||
DropHelper.DropItem(player, ModContent.ItemType<LivingShard>(), 8, 11);
|
||||
DropHelper.DropItem(player, ModContent.ItemType<LivingShard>(), 16, 22);
|
||||
float bFluxChance = DropHelper.LegendaryDropRateFloat;
|
||||
DropHelper.DropItemCondition(player, ModContent.ItemType<BlossomFlux>(), CalamityWorld.revenge, bFluxChance);
|
||||
DropHelper.DropItemChance(player, ItemID.JungleKey, 5);
|
||||
@@ -2955,6 +2994,15 @@ Provides heat and cold protection in Death Mode";
|
||||
{
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
|
||||
if (item.prefix > 0)
|
||||
{
|
||||
float stealthGenBoost = item.Calamity().StealthGenBonus - 1f;
|
||||
if (stealthGenBoost > 0)
|
||||
{
|
||||
modPlayer.accStealthGenBoost += stealthGenBoost;
|
||||
}
|
||||
}
|
||||
|
||||
if (item.type == ItemID.FireGauntlet)
|
||||
{
|
||||
player.meleeDamage += 0.04f;
|
||||
|
||||
@@ -41,10 +41,7 @@ namespace CalamityMod.Items.Fishing.AstralCatches
|
||||
item.useStyle = 1;
|
||||
}
|
||||
|
||||
public override bool CanRightClick()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
public override bool CanRightClick() => true;
|
||||
|
||||
public override void RightClick(Player player)
|
||||
{
|
||||
@@ -65,7 +62,7 @@ namespace CalamityMod.Items.Fishing.AstralCatches
|
||||
}
|
||||
|
||||
// Weapons
|
||||
DropHelper.DropItemFromSetCondition(player, CalamityWorld.downedAstrageldon, 0.2f,
|
||||
DropHelper.DropItemFromSetCondition(player, CalamityWorld.downedAstrageldon,
|
||||
ModContent.ItemType<StellarKnife>(),
|
||||
ModContent.ItemType<AstralachneaStaff>(),
|
||||
ModContent.ItemType<TitanArm>(),
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Fishing.AstralCatches
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 60;
|
||||
item.damage = 55;
|
||||
item.ranged = true;
|
||||
item.width = 38;
|
||||
item.height = 34;
|
||||
|
||||
@@ -31,10 +31,7 @@ namespace CalamityMod.Items.Fishing.BrimstoneCragCatches
|
||||
item.useStyle = 1;
|
||||
}
|
||||
|
||||
public override bool CanRightClick()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
public override bool CanRightClick() => true;
|
||||
|
||||
public override void RightClick(Player player)
|
||||
{
|
||||
|
||||
@@ -4,6 +4,11 @@ using CalamityMod.Items.Pets;
|
||||
using CalamityMod.Items.Placeables;
|
||||
using CalamityMod.Items.SummonItems.Invasion;
|
||||
using CalamityMod.Items.Potions;
|
||||
using CalamityMod.Items.Weapons.Magic;
|
||||
using CalamityMod.Items.Weapons.Melee;
|
||||
using CalamityMod.Items.Weapons.Ranged;
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using CalamityMod.Items.Weapons.Summon;
|
||||
using CalamityMod.Tiles.Abyss;
|
||||
using CalamityMod.World;
|
||||
using Terraria;
|
||||
@@ -36,10 +41,7 @@ namespace CalamityMod.Items.Fishing.SulphurCatches
|
||||
item.useStyle = 1;
|
||||
}
|
||||
|
||||
public override bool CanRightClick()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
public override bool CanRightClick() => true;
|
||||
|
||||
public override void RightClick(Player player)
|
||||
{
|
||||
@@ -76,8 +78,25 @@ namespace CalamityMod.Items.Fishing.SulphurCatches
|
||||
DropHelper.DropItemChance(player, ModContent.ItemType<ReaperTooth>(), 0.25f, 5, 10);
|
||||
}
|
||||
|
||||
// Weapons
|
||||
DropHelper.DropItemFromSetCondition(player, NPC.downedBoss3,
|
||||
ModContent.ItemType<Archerfish>(),
|
||||
ModContent.ItemType<BallOFugu>(),
|
||||
ModContent.ItemType<HerringStaff>(),
|
||||
ModContent.ItemType<Lionfish>(),
|
||||
ModContent.ItemType<BlackAnurian>());
|
||||
|
||||
DropHelper.DropItemFromSetCondition(player, CalamityWorld.downedAquaticScourgeAcidRain,
|
||||
ModContent.ItemType<SkyfinBombers>(),
|
||||
ModContent.ItemType<NuclearRod>(),
|
||||
ModContent.ItemType<SulphurousGrabber>(),
|
||||
ModContent.ItemType<FlakToxicannon>(),
|
||||
ModContent.ItemType<SpentFuelContainer>(),
|
||||
ModContent.ItemType<SlitheringEels>(),
|
||||
ModContent.ItemType<BelchingSaxophone>());
|
||||
|
||||
// Equipment
|
||||
DropHelper.DropItemFromSetCondition(player, NPC.downedBoss3, 0.25f,
|
||||
DropHelper.DropItemFromSetCondition(player, NPC.downedBoss3,
|
||||
ModContent.ItemType<StrangeOrb>(),
|
||||
ModContent.ItemType<DepthCharm>(),
|
||||
ModContent.ItemType<IronBoots>(),
|
||||
|
||||
@@ -40,10 +40,7 @@ namespace CalamityMod.Items.Fishing.SunkenSeaCatches
|
||||
item.useStyle = 1;
|
||||
}
|
||||
|
||||
public override bool CanRightClick()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
public override bool CanRightClick() => true;
|
||||
|
||||
public override void RightClick(Player player)
|
||||
{
|
||||
@@ -61,7 +58,7 @@ namespace CalamityMod.Items.Fishing.SunkenSeaCatches
|
||||
}
|
||||
|
||||
// Weapons
|
||||
DropHelper.DropItemFromSetCondition(player, CalamityWorld.downedCLAM && Main.hardMode, 0.2f,
|
||||
DropHelper.DropItemFromSetCondition(player, CalamityWorld.downedCLAM && Main.hardMode,
|
||||
ModContent.ItemType<ShellfishStaff>(),
|
||||
ModContent.ItemType<ClamCrusher>(),
|
||||
ModContent.ItemType<Poseidon>(),
|
||||
|
||||
|
Before Width: | Height: | Size: 445 B After Width: | Height: | Size: 658 B |
@@ -18,7 +18,6 @@ namespace CalamityMod.Items.Mounts
|
||||
mountData.fatigueMax = 0;
|
||||
mountData.fallDamage = 0f;
|
||||
mountData.runSpeed = 12f;
|
||||
mountData.dashSpeed = 12f;
|
||||
mountData.heightBoost = 44;
|
||||
mountData.acceleration = 0.2f;
|
||||
mountData.jumpHeight = 10;
|
||||
@@ -56,7 +55,7 @@ namespace CalamityMod.Items.Mounts
|
||||
mountData.swimFrameDelay = mountData.inAirFrameDelay;
|
||||
mountData.swimFrameStart = mountData.inAirFrameStart;
|
||||
|
||||
mountData.dashSpeed = 25f;
|
||||
mountData.dashSpeed = 18.5f;
|
||||
mountData.dashingFrameCount = mountData.flyingFrameCount;
|
||||
mountData.dashingFrameDelay = 5;
|
||||
mountData.dashingFrameStart = mountData.flyingFrameStart;
|
||||
|
||||
@@ -40,8 +40,7 @@ namespace CalamityMod.Items.Potions
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
recipe.AddIngredient(ModContent.ItemType<Shadowfish>());
|
||||
recipe.AddIngredient(ItemID.InvisibilityPotion);
|
||||
recipe.AddIngredient(ItemID.AlchemyTable);
|
||||
recipe.AddTile(TileID.Bottles);
|
||||
recipe.AddTile(TileID.AlchemyTable);
|
||||
recipe.SetResult(this, 2);
|
||||
recipe.AddRecipe();
|
||||
recipe = new ModRecipe(mod);
|
||||
|
||||
|
Before Width: | Height: | Size: 417 B After Width: | Height: | Size: 913 B |
@@ -8,8 +8,8 @@ namespace CalamityMod.Items.SummonItems
|
||||
{
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Ancient Medallion");
|
||||
Tooltip.SetDefault("A very old temple medallion\n" +
|
||||
DisplayName.SetDefault("Death Whistle");
|
||||
Tooltip.SetDefault("A very old temple whistle\n" +
|
||||
"Summons the Ravager");
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace CalamityMod.Items.SummonItems
|
||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||
{
|
||||
NPC.NewNPC((int)(player.position.X + (float)Main.rand.Next(-100, 101)), (int)(player.position.Y - 250f), ModContent.NPCType<RavagerBody>(), 0, 0f, 0f, 0f, 0f, 255);
|
||||
Main.PlaySound(SoundID.Roar, player.position, 0);
|
||||
Main.PlaySound(SoundID.Roar, player.position, 2);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 621 B After Width: | Height: | Size: 751 B |
|
Before Width: | Height: | Size: 698 B After Width: | Height: | Size: 632 B |
|
Before Width: | Height: | Size: 623 B After Width: | Height: | Size: 726 B |
|
Before Width: | Height: | Size: 758 B After Width: | Height: | Size: 861 B |
|
Before Width: | Height: | Size: 839 B After Width: | Height: | Size: 790 B |
|
Before Width: | Height: | Size: 593 B After Width: | Height: | Size: 965 B |
|
Before Width: | Height: | Size: 700 B After Width: | Height: | Size: 869 B |
@@ -15,7 +15,8 @@ namespace CalamityMod.Items.Tools
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 60;
|
||||
item.width = 62;
|
||||
item.height = 62;
|
||||
item.damage = 500;
|
||||
item.melee = true;
|
||||
item.useAnimation = 16;
|
||||
@@ -27,7 +28,6 @@ namespace CalamityMod.Items.Tools
|
||||
item.knockBack = 8f;
|
||||
item.UseSound = SoundID.Item1;
|
||||
item.autoReuse = true;
|
||||
item.height = 60;
|
||||
item.tileBoost += 5;
|
||||
item.value = Item.buyPrice(1, 20, 0, 0);
|
||||
item.rare = 10;
|
||||
|
||||
|
Before Width: | Height: | Size: 532 B After Width: | Height: | Size: 1.2 KiB |
@@ -4,6 +4,7 @@ using CalamityMod.Items.Weapons.Magic;
|
||||
using CalamityMod.Items.Weapons.Melee;
|
||||
using CalamityMod.Items.Weapons.Ranged;
|
||||
using CalamityMod.Items.Weapons.Rogue;
|
||||
using CalamityMod.Items.Weapons.Summon;
|
||||
using CalamityMod.NPCs.Leviathan;
|
||||
using CalamityMod.World;
|
||||
using Terraria;
|
||||
@@ -52,6 +53,7 @@ namespace CalamityMod.Items.TreasureBags
|
||||
DropHelper.DropItemChance(player, ModContent.ItemType<Atlantis>(), 3);
|
||||
DropHelper.DropItemChance(player, ModContent.ItemType<BrackishFlask>(), 3);
|
||||
DropHelper.DropItemChance(player, ModContent.ItemType<LeviathanTeeth>(), 3);
|
||||
DropHelper.DropItemChance(player, ModContent.ItemType<GastricBelcherStaff>(), 3);
|
||||
|
||||
// Equipment
|
||||
DropHelper.DropItem(player, ModContent.ItemType<LeviathanAmbergris>());
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace CalamityMod.Items.TreasureBags
|
||||
|
||||
// Materials
|
||||
DropHelper.DropItem(player, ModContent.ItemType<UnholyEssence>(), 25, 35);
|
||||
DropHelper.DropItem(player, ModContent.ItemType<DivineGeode>(), 15, 25);
|
||||
DropHelper.DropItem(player, ModContent.ItemType<DivineGeode>(), 20, 30);
|
||||
|
||||
// Weapons
|
||||
DropHelper.DropItemChance(player, ModContent.ItemType<HolyCollider>(), 3);
|
||||
|
||||
@@ -18,9 +18,9 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 60;
|
||||
item.damage = 99;
|
||||
item.magic = true;
|
||||
item.mana = 12;
|
||||
item.mana = 8;
|
||||
item.width = 52;
|
||||
item.height = 52;
|
||||
item.useTime = 17;
|
||||
|
||||
@@ -19,9 +19,9 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 98;
|
||||
item.damage = 45;
|
||||
item.damage = 55;
|
||||
item.magic = true;
|
||||
item.mana = 14;
|
||||
item.mana = 12;
|
||||
item.useAnimation = 7;
|
||||
item.useTime = 7;
|
||||
item.useStyle = 5;
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 36;
|
||||
item.damage = 40;
|
||||
item.magic = true;
|
||||
item.mana = 17;
|
||||
item.width = 56;
|
||||
|
||||
@@ -20,8 +20,8 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
item.mana = 6;
|
||||
item.width = 28;
|
||||
item.height = 30;
|
||||
item.useTime = 18;
|
||||
item.useAnimation = 18;
|
||||
item.useTime = 20;
|
||||
item.useAnimation = 20;
|
||||
item.useStyle = 5;
|
||||
item.noMelee = true;
|
||||
item.knockBack = 3.5f;
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 20;
|
||||
item.damage = 15;
|
||||
item.magic = true;
|
||||
item.mana = 7;
|
||||
item.width = 34;
|
||||
@@ -31,64 +31,60 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
item.rare = 2;
|
||||
item.UseSound = SoundID.Item8;
|
||||
item.autoReuse = true;
|
||||
item.shoot = 590;
|
||||
item.shoot = ProjectileID.TruffleSpore;
|
||||
item.shootSpeed = 1f;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOrigin()
|
||||
{
|
||||
return new Vector2(15, 15);
|
||||
}
|
||||
public override Vector2? HoldoutOrigin() => new Vector2(15, 15);
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
int i = Main.myPlayer;
|
||||
float num72 = item.shootSpeed;
|
||||
Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true);
|
||||
Vector2 value = Vector2.UnitX.RotatedBy((double)player.fullRotation, default);
|
||||
Vector2 vector3 = Main.MouseWorld + vector2;
|
||||
float num78 = (float)Main.mouseX + Main.screenPosition.X + vector2.X;
|
||||
float num79 = (float)Main.mouseY + Main.screenPosition.Y + vector2.Y;
|
||||
float speed = item.shootSpeed;
|
||||
Vector2 source = player.RotatedRelativePoint(player.MountedCenter, true);
|
||||
float xDist = (float)Main.mouseX + Main.screenPosition.X + source.X;
|
||||
float yDist = (float)Main.mouseY + Main.screenPosition.Y + source.Y;
|
||||
Vector2 spawnVec = new Vector2(xDist, yDist);
|
||||
if (player.gravDir == -1f)
|
||||
{
|
||||
num79 = Main.screenPosition.Y + (float)Main.screenHeight + (float)Main.mouseY + vector2.Y;
|
||||
spawnVec.Y = Main.screenPosition.Y + (float)Main.screenHeight + (float)Main.mouseY + source.Y;
|
||||
}
|
||||
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
|
||||
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
|
||||
float distance = spawnVec.Length();
|
||||
if ((float.IsNaN(spawnVec.X) && float.IsNaN(spawnVec.Y)) || (spawnVec.X == 0f && spawnVec.Y == 0f))
|
||||
{
|
||||
num78 = (float)player.direction;
|
||||
num79 = 0f;
|
||||
num80 = num72;
|
||||
spawnVec.X = (float)player.direction;
|
||||
spawnVec.Y = 0f;
|
||||
distance = speed;
|
||||
}
|
||||
else
|
||||
{
|
||||
num80 = num72 / num80;
|
||||
distance = speed / distance;
|
||||
}
|
||||
|
||||
int num107 = 3;
|
||||
for (int num108 = 0; num108 < num107; num108++)
|
||||
int projAmt = 3;
|
||||
for (int projIndex = 0; projIndex < projAmt; projIndex++)
|
||||
{
|
||||
vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y);
|
||||
vector2.X = (vector2.X + player.Center.X) / 2f + (float)Main.rand.Next(-100, 101);
|
||||
vector2.Y -= (float)(50 * num108);
|
||||
num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X;
|
||||
num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y;
|
||||
if (num79 < 0f)
|
||||
source = new Vector2(player.Center.X + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y);
|
||||
source.X = (source.X + player.Center.X) / 2f + (float)Main.rand.Next(-100, 101);
|
||||
source.Y -= (float)(50 * projIndex);
|
||||
spawnVec.X = (float)Main.mouseX + Main.screenPosition.X - source.X;
|
||||
spawnVec.Y = (float)Main.mouseY + Main.screenPosition.Y - source.Y;
|
||||
if (spawnVec.Y < 0f)
|
||||
{
|
||||
num79 *= -1f;
|
||||
spawnVec.Y *= -1f;
|
||||
}
|
||||
if (num79 < 20f)
|
||||
if (spawnVec.Y < 20f)
|
||||
{
|
||||
num79 = 20f;
|
||||
spawnVec.Y = 20f;
|
||||
}
|
||||
num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
|
||||
num80 = num72 / num80;
|
||||
num78 *= num80;
|
||||
num79 *= num80;
|
||||
float speedX4 = num78 + (float)Main.rand.Next(-180, 181) * 0.02f;
|
||||
float speedY5 = num79 + (float)Main.rand.Next(-180, 181) * 0.02f;
|
||||
int proj = Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5, type, damage, knockBack, i, 0f, (float)Main.rand.Next(3));
|
||||
distance = spawnVec.Length();
|
||||
distance = speed / distance;
|
||||
spawnVec.X *= distance;
|
||||
spawnVec.Y *= distance;
|
||||
spawnVec.X += (float)Main.rand.Next(-180, 181) * 0.02f;
|
||||
spawnVec.Y += (float)Main.rand.Next(-180, 181) * 0.02f;
|
||||
int proj = Projectile.NewProjectile(source, spawnVec, type, damage, knockBack, player.whoAmI, 0f, Main.rand.Next(3));
|
||||
Main.projectile[proj].Calamity().forceMagic = true;
|
||||
Main.projectile[proj].timeLeft = CalamityUtils.SecondsToFrames(8f);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Items.Placeables.Ores;
|
||||
using CalamityMod.Projectiles.Magic;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Microsoft.Xna.Framework;
|
||||
@@ -12,15 +11,19 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
{
|
||||
public class SubsumingVortex : ModItem
|
||||
{
|
||||
public const int MaxVortexCount = 4;
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Subsuming Vortex");
|
||||
Tooltip.SetDefault("Fires 3 vortexes of elemental energy");
|
||||
Tooltip.SetDefault("Fires a giant slow-moving vortex\n" +
|
||||
"When an enemy is nearby, the vortex releases tentacles that redirect towards the enemy.\n" +
|
||||
"After some time, the vortex slows down, charges, and eventually explodes.\n" +
|
||||
$"Only {MaxVortexCount} vortexes can exist at once.");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 520;
|
||||
item.damage = 480;
|
||||
item.magic = true;
|
||||
item.mana = 20;
|
||||
item.width = 38;
|
||||
@@ -28,14 +31,14 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
item.UseSound = SoundID.Item84;
|
||||
item.useTime = 20;
|
||||
item.useAnimation = 20;
|
||||
item.useStyle = 5;
|
||||
item.useStyle = ItemUseStyleID.HoldingOut;
|
||||
item.noMelee = true;
|
||||
item.knockBack = 5f;
|
||||
item.value = Item.buyPrice(2, 50, 0, 0);
|
||||
item.rare = 10;
|
||||
item.autoReuse = true;
|
||||
item.shoot = ModContent.ProjectileType<Vortex>();
|
||||
item.shootSpeed = 9f;
|
||||
item.shoot = ModContent.ProjectileType<EnormousConsumingVortex>();
|
||||
item.shootSpeed = 7f;
|
||||
item.Calamity().customRarity = CalamityRarity.Violet;
|
||||
}
|
||||
|
||||
@@ -45,16 +48,11 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
spriteBatch.Draw(ModContent.GetTexture("CalamityMod/Items/Weapons/Magic/SubsumingVortexGlow"), item.Center - Main.screenPosition, null, Color.White, rotation, origin, 1f, SpriteEffects.None, 0f);
|
||||
}
|
||||
|
||||
public override bool CanUseItem(Player player) => player.ownedProjectileCounts[item.shoot] < MaxVortexCount;
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
int num6 = 3;
|
||||
for (int index = 0; index < num6; ++index)
|
||||
{
|
||||
float SpeedX = speedX + (float)Main.rand.Next(-50, 51) * 0.05f;
|
||||
float SpeedY = speedY + (float)Main.rand.Next(-50, 51) * 0.05f;
|
||||
float ai = Main.rand.NextFloat() + 0.5f;
|
||||
Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, damage, knockBack, player.whoAmI, 0.0f, ai);
|
||||
}
|
||||
Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Magic
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 10;
|
||||
item.damage = 12;
|
||||
item.magic = true;
|
||||
item.mana = 4;
|
||||
item.width = 44;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.Hybrid;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -36,13 +35,6 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.Calamity().customRarity = CalamityRarity.Turquoise;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
Main.projectile[proj].Calamity().forceMelee = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
|
||||
@@ -16,7 +16,8 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 58;
|
||||
item.width = 56;
|
||||
item.height = 56;
|
||||
item.damage = 25;
|
||||
item.melee = true;
|
||||
item.useAnimation = 25;
|
||||
@@ -25,7 +26,6 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.knockBack = 4f;
|
||||
item.UseSound = SoundID.Item1;
|
||||
item.autoReuse = false;
|
||||
item.height = 58;
|
||||
item.value = Item.buyPrice(0, 4, 0, 0);
|
||||
item.rare = 3;
|
||||
item.shoot = ModContent.ProjectileType<BloodScythe>();
|
||||
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
@@ -15,8 +15,8 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 72;
|
||||
item.height = 76;
|
||||
item.width = 60;
|
||||
item.height = 64;
|
||||
item.damage = 158;
|
||||
item.melee = true;
|
||||
item.useAnimation = 10;
|
||||
|
||||
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.2 KiB |
@@ -60,7 +60,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
if (target.type == NPCID.TargetDummy || !target.canGhostHeal)
|
||||
if (target.type == NPCID.TargetDummy || !target.canGhostHeal || player.moonLeech)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -75,7 +75,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void OnHitPvp(Player player, Player target, int damage, bool crit)
|
||||
{
|
||||
int healAmount = Main.rand.Next(3) + 1;
|
||||
if (Main.rand.NextBool(2))
|
||||
if (Main.rand.NextBool(2) && !player.moonLeech)
|
||||
{
|
||||
player.statLife += healAmount;
|
||||
player.HealEffect(healAmount);
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
if (target.life <= 0)
|
||||
if (target.life <= 0 && !player.moonLeech)
|
||||
{
|
||||
float randomSpeedX = (float)Main.rand.Next(3);
|
||||
float randomSpeedY = (float)Main.rand.Next(3, 5);
|
||||
@@ -46,7 +46,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void OnHitPvp(Player player, Player target, int damage, bool crit)
|
||||
{
|
||||
if (target.statLife <= 0)
|
||||
if (target.statLife <= 0 && !player.moonLeech)
|
||||
{
|
||||
float randomSpeedX = (float)Main.rand.Next(3);
|
||||
float randomSpeedY = (float)Main.rand.Next(3, 5);
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.width = 44;
|
||||
item.height = 44;
|
||||
|
||||
item.damage = 800;
|
||||
item.damage = 666;
|
||||
|
||||
item.melee = true;
|
||||
item.knockBack = 9f;
|
||||
|
||||
@@ -15,13 +15,14 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetStaticDefaults()
|
||||
{
|
||||
DisplayName.SetDefault("Devil's Devastation");
|
||||
Tooltip.SetDefault("Fires a spread of demonic blades and blasts\n" +
|
||||
Tooltip.SetDefault("Fires a spread of demonic scythes\n" + "Pitchforks rise from the underworld to skewer your foes\n" +
|
||||
"Critical hits cause shadowflame explosions");
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 74;
|
||||
item.width = 118;
|
||||
item.height = 118;
|
||||
item.damage = 520;
|
||||
item.melee = true;
|
||||
item.useAnimation = 20;
|
||||
@@ -31,7 +32,6 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.knockBack = 6.75f;
|
||||
item.UseSound = SoundID.Item1;
|
||||
item.autoReuse = true;
|
||||
item.height = 74;
|
||||
item.value = Item.buyPrice(1, 80, 0, 0);
|
||||
item.rare = 10;
|
||||
item.shoot = ModContent.ProjectileType<Oathblade>();
|
||||
@@ -41,58 +41,63 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
//Shoot 3 oathblades in a spread
|
||||
int index = 8;
|
||||
for (int j = -index; j <= index; j += index)
|
||||
{
|
||||
Vector2 perturbedSpeed = new Vector2(speedX, speedY).RotatedBy(MathHelper.ToRadians(j));
|
||||
Projectile.NewProjectile(position.X, position.Y, perturbedSpeed.X, perturbedSpeed.Y, type, damage, knockBack, player.whoAmI, 0.0f, 0.0f);
|
||||
Projectile.NewProjectile(position, perturbedSpeed, type, damage, knockBack, player.whoAmI, 0f, 0f);
|
||||
}
|
||||
|
||||
float num72 = item.shootSpeed;
|
||||
Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true);
|
||||
float num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X;
|
||||
float num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y;
|
||||
//Not actually sure what this middle code does
|
||||
float speed = item.shootSpeed;
|
||||
Vector2 source = player.RotatedRelativePoint(player.MountedCenter, true);
|
||||
float directionX = (float)Main.mouseX + Main.screenPosition.X - source.X;
|
||||
float directionY = (float)Main.mouseY + Main.screenPosition.Y - source.Y;
|
||||
if (player.gravDir == -1f)
|
||||
{
|
||||
num79 = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - vector2.Y;
|
||||
directionY = Main.screenPosition.Y + (float)Main.screenHeight - (float)Main.mouseY - source.Y;
|
||||
}
|
||||
float num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
|
||||
if ((float.IsNaN(num78) && float.IsNaN(num79)) || (num78 == 0f && num79 == 0f))
|
||||
Vector2 direction = new Vector2(directionX, directionY);
|
||||
float aimDist = direction.Length();
|
||||
if ((float.IsNaN(direction.X) && float.IsNaN(direction.Y)) || (direction.X == 0f && direction.Y == 0f))
|
||||
{
|
||||
num78 = (float)player.direction;
|
||||
num79 = 0f;
|
||||
num80 = num72;
|
||||
direction.X = (float)player.direction;
|
||||
direction.Y = 0f;
|
||||
aimDist = speed;
|
||||
}
|
||||
else
|
||||
{
|
||||
num80 = num72 / num80;
|
||||
aimDist = speed / aimDist;
|
||||
}
|
||||
|
||||
int num107 = 3;
|
||||
for (int num108 = 0; num108 < num107; num108++)
|
||||
//Shoot 9 tridents from below
|
||||
int projAmt = 3; //Since the method spawns 3 projectiles, it spawns 9 total
|
||||
for (int projIndex = 0; projIndex < projAmt; projIndex++)
|
||||
{
|
||||
vector2 = new Vector2(player.position.X + (float)player.width * 0.5f + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y - 600f);
|
||||
vector2.X = (vector2.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201);
|
||||
vector2.Y -= (float)(100 * num108);
|
||||
num78 = (float)Main.mouseX + Main.screenPosition.X - vector2.X;
|
||||
num79 = (float)Main.mouseY + Main.screenPosition.Y - vector2.Y;
|
||||
if (num79 < 0f)
|
||||
source = new Vector2(player.Center.X + (float)(Main.rand.Next(201) * -(float)player.direction) + ((float)Main.mouseX + Main.screenPosition.X - player.position.X), player.MountedCenter.Y + 600f);
|
||||
source.X = (source.X + player.Center.X) / 2f + (float)Main.rand.Next(-200, 201);
|
||||
source.Y += (float)(100 * projIndex);
|
||||
direction.X = (float)Main.mouseX + Main.screenPosition.X - source.X;
|
||||
direction.Y = (float)Main.mouseY + Main.screenPosition.Y - source.Y;
|
||||
if (direction.Y < 0f)
|
||||
{
|
||||
num79 *= -1f;
|
||||
direction.Y *= -1f;
|
||||
}
|
||||
if (num79 < 20f)
|
||||
if (direction.Y < 20f)
|
||||
{
|
||||
num79 = 20f;
|
||||
direction.Y = 20f;
|
||||
}
|
||||
num80 = (float)Math.Sqrt((double)(num78 * num78 + num79 * num79));
|
||||
num80 = num72 / num80;
|
||||
num78 *= num80;
|
||||
num79 *= num80;
|
||||
float speedX4 = num78 + (float)Main.rand.Next(-40, 41) * 0.02f;
|
||||
float speedY5 = num79 + (float)Main.rand.Next(-40, 41) * 0.02f;
|
||||
Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5, ModContent.ProjectileType<DemonBlast>(), damage, knockBack, player.whoAmI, 0f, (float)Main.rand.Next(5));
|
||||
Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5, ModContent.ProjectileType<DemonBlastType2>(), damage, knockBack, player.whoAmI, 0f, (float)Main.rand.Next(3));
|
||||
Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5, ModContent.ProjectileType<DemonBlastType3>(), damage, knockBack, player.whoAmI, 0f, 1f);
|
||||
aimDist = direction.Length();
|
||||
aimDist = speed / aimDist;
|
||||
direction.X *= aimDist;
|
||||
direction.Y *= aimDist;
|
||||
direction.X += Main.rand.NextFloat(-40f, 40f) * 0.02f;
|
||||
direction.Y += Main.rand.NextFloat(-40f, 40f) * 0.02f;
|
||||
direction.Y *= -1;
|
||||
Projectile.NewProjectile(source, direction, ModContent.ProjectileType<DemonBlast>(), damage, knockBack, player.whoAmI, 0f, Main.rand.Next(5));
|
||||
Projectile.NewProjectile(source, direction, ModContent.ProjectileType<DemonBlast>(), damage, knockBack, player.whoAmI, 0f, Main.rand.Next(3));
|
||||
Projectile.NewProjectile(source, direction, ModContent.ProjectileType<DemonBlast>(), damage, knockBack, player.whoAmI, 0f, 1f);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -126,42 +131,39 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
target.AddBuff(BuffID.ShadowFlame, 900);
|
||||
target.AddBuff(BuffID.OnFire, 900);
|
||||
player.ApplyDamageToNPC(target, (int)(item.damage * player.MeleeDamage()) * 4, 0f, 0, false);
|
||||
float num50 = 1.7f;
|
||||
float num51 = 0.8f;
|
||||
float num52 = 2f;
|
||||
Vector2 value3 = (target.rotation - 1.57079637f).ToRotationVector2();
|
||||
float scalar1 = 1.7f;
|
||||
float scalar2 = 0.8f;
|
||||
float scalar3 = 2f;
|
||||
Vector2 value3 = (target.rotation - MathHelper.PiOver2).ToRotationVector2();
|
||||
Vector2 value4 = value3 * target.velocity.Length();
|
||||
Main.PlaySound(SoundID.Item14, target.position);
|
||||
int num3;
|
||||
for (int num53 = 0; num53 < 40; num53 = num3 + 1)
|
||||
for (int i = 0; i < 40; i++)
|
||||
{
|
||||
int num54 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 173, 0f, 0f, 200, default, num50);
|
||||
Dust dust = Main.dust[num54];
|
||||
dust.position = target.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)target.width / 2f;
|
||||
int dustInt = Dust.NewDust(target.position, target.width, target.height, 173, 0f, 0f, 200, default, scalar1);
|
||||
Dust dust = Main.dust[dustInt];
|
||||
dust.position = target.Center + Vector2.UnitY.RotatedByRandom(Math.PI) * Main.rand.NextFloat() * target.width / 2f;
|
||||
dust.noGravity = true;
|
||||
dust.velocity.Y -= 4.5f;
|
||||
dust.velocity *= 3f;
|
||||
dust.velocity += value4 * Main.rand.NextFloat();
|
||||
num54 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 173, 0f, 0f, 100, default, num51);
|
||||
dust.position = target.Center + Vector2.UnitY.RotatedByRandom(3.1415927410125732) * (float)Main.rand.NextDouble() * (float)target.width / 2f;
|
||||
dustInt = Dust.NewDust(target.position, target.width, target.height, 173, 0f, 0f, 100, default, scalar2);
|
||||
dust.position = target.Center + Vector2.UnitY.RotatedByRandom(Math.PI) * Main.rand.NextFloat() * target.width / 2f;
|
||||
dust.velocity.Y -= 3f;
|
||||
dust.velocity *= 2f;
|
||||
dust.noGravity = true;
|
||||
dust.fadeIn = 1f;
|
||||
dust.color = Color.Crimson * 0.5f;
|
||||
dust.velocity += value4 * Main.rand.NextFloat();
|
||||
num3 = num53;
|
||||
}
|
||||
for (int num55 = 0; num55 < 20; num55 = num3 + 1)
|
||||
for (int j = 0; j < 20; j++)
|
||||
{
|
||||
int num56 = Dust.NewDust(new Vector2(target.position.X, target.position.Y), target.width, target.height, 173, 0f, 0f, 0, default, num52);
|
||||
Dust dust = Main.dust[num56];
|
||||
dust.position = target.Center + Vector2.UnitX.RotatedByRandom(3.1415927410125732).RotatedBy((double)target.velocity.ToRotation(), default) * (float)target.width / 3f;
|
||||
int dustInt = Dust.NewDust(target.position, target.width, target.height, 173, 0f, 0f, 0, default, scalar3);
|
||||
Dust dust = Main.dust[dustInt];
|
||||
dust.position = target.Center + Vector2.UnitX.RotatedByRandom(Math.PI).RotatedBy((double)target.velocity.ToRotation(), default) * target.width / 3f;
|
||||
dust.noGravity = true;
|
||||
dust.velocity.Y -= 1.5f;
|
||||
dust.velocity *= 0.5f;
|
||||
dust.velocity += value4 * (0.6f + 0.6f * Main.rand.NextFloat());
|
||||
num3 = num55;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 3.1 KiB |
@@ -92,7 +92,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Projectile.NewProjectile(startPos, velocity, ModContent.ProjectileType<Exocomet>(), (int)(item.damage * player.MeleeDamage()), knockback, player.whoAmI, 0f, ai1);
|
||||
}
|
||||
}
|
||||
if (target.type == NPCID.TargetDummy || !target.canGhostHeal)
|
||||
if (target.type == NPCID.TargetDummy || !target.canGhostHeal || player.moonLeech)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -134,6 +134,8 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Projectile.NewProjectile(startPos, velocity, ModContent.ProjectileType<Exocomet>(), (int)(item.damage * player.MeleeDamage()), item.knockBack, player.whoAmI, 0f, ai1);
|
||||
}
|
||||
}
|
||||
if (player.moonLeech)
|
||||
return;
|
||||
int healAmount = Main.rand.Next(5) + 5;
|
||||
player.statLife += healAmount;
|
||||
player.HealEffect(healAmount);
|
||||
|
||||
@@ -86,14 +86,14 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
float speedY5 = num79 + (float)Main.rand.Next(-180, 181) * 0.02f;
|
||||
Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5, ModContent.ProjectileType<EarthProj>(), (int)(item.damage * (player.allDamage + player.meleeDamage - 1f)), knockback, player.whoAmI, 0f, (float)Main.rand.Next(10));
|
||||
}
|
||||
if (target.type == NPCID.TargetDummy || !target.canGhostHeal)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
target.defense -= 50;
|
||||
}
|
||||
if (target.type == NPCID.TargetDummy || !target.canGhostHeal || player.moonLeech)
|
||||
{
|
||||
return;
|
||||
}
|
||||
int heal = Main.rand.Next(1, 69);
|
||||
player.statLife += heal;
|
||||
player.HealEffect(heal);
|
||||
@@ -145,6 +145,8 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
float speedY5 = num79 + (float)Main.rand.Next(-180, 181) * 0.02f;
|
||||
Projectile.NewProjectile(vector2.X, vector2.Y, speedX4, speedY5, ModContent.ProjectileType<EarthProj>(), (int)(item.damage * (player.allDamage + player.meleeDamage - 1f)), item.knockBack, player.whoAmI, 0f, (float)Main.rand.Next(10));
|
||||
}
|
||||
if (player.moonLeech)
|
||||
return;
|
||||
int heal = Main.rand.Next(1, 69);
|
||||
player.statLife += heal;
|
||||
player.HealEffect(heal);
|
||||
|
||||
@@ -63,10 +63,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool AltFunctionUse(Player player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
public override bool AltFunctionUse(Player player) => true;
|
||||
|
||||
public override bool CanUseItem(Player player)
|
||||
{
|
||||
@@ -157,7 +154,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
target.AddBuff(BuffID.Frostburn, 240);
|
||||
target.AddBuff(BuffID.OnFire, 240);
|
||||
target.AddBuff(BuffID.Ichor, 240);
|
||||
if (target.type == NPCID.TargetDummy || !target.canGhostHeal)
|
||||
if (target.type == NPCID.TargetDummy || !target.canGhostHeal || player.moonLeech)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -177,6 +174,8 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
target.AddBuff(BuffID.Frostburn, 240);
|
||||
target.AddBuff(BuffID.OnFire, 240);
|
||||
target.AddBuff(BuffID.Ichor, 240);
|
||||
if (player.moonLeech)
|
||||
return;
|
||||
int healAmount = Main.rand.Next(10) + 10;
|
||||
player.statLife += healAmount;
|
||||
player.HealEffect(healAmount);
|
||||
|
||||
@@ -36,13 +36,6 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.Calamity().customRarity = CalamityRarity.PureGreen;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
Main.projectile[proj].Calamity().forceMelee = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI)
|
||||
{
|
||||
Vector2 origin = new Vector2(31f, 29f);
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.Hybrid;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -35,13 +34,6 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.shootSpeed = 16f;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
Main.projectile[proj].Calamity().forceMelee = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
|
||||
@@ -17,7 +17,8 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 76;
|
||||
item.width = 74;
|
||||
item.height = 74;
|
||||
item.damage = 64;
|
||||
item.melee = true;
|
||||
item.useAnimation = 25;
|
||||
@@ -27,7 +28,6 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.knockBack = 6.5f;
|
||||
item.UseSound = SoundID.Item1;
|
||||
item.autoReuse = true;
|
||||
item.height = 76;
|
||||
item.value = Item.buyPrice(0, 36, 0, 0);
|
||||
item.rare = 5;
|
||||
item.shoot = ModContent.ProjectileType<ForbiddenOathbladeProjectile>();
|
||||
|
||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.6 KiB |
@@ -44,7 +44,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
target.defense -= 15;
|
||||
}
|
||||
if (target.defense <= 0 && target.canGhostHeal)
|
||||
if (target.defense <= 0 && target.canGhostHeal && !player.moonLeech)
|
||||
{
|
||||
player.statLife += 4;
|
||||
player.HealEffect(4);
|
||||
@@ -58,7 +58,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, randomSpeedX, -randomSpeedY, ModContent.ProjectileType<RainBolt>(), (int)(item.damage * (player.allDamage + player.meleeDamage - 1f) * 0.75f), knockback, player.whoAmI);
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -randomSpeedY, ModContent.ProjectileType<RainBolt>(), (int)((float)item.damage * (player.allDamage + player.meleeDamage - 1f) * 0.75f), knockback, player.whoAmI);
|
||||
}
|
||||
if (target.life <= 0)
|
||||
if (target.life <= 0 && !player.moonLeech)
|
||||
{
|
||||
float randomSpeedX = (float)Main.rand.Next(9);
|
||||
float randomSpeedY = (float)Main.rand.Next(6, 15);
|
||||
@@ -79,7 +79,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, randomSpeedX, -randomSpeedY, ModContent.ProjectileType<RainBolt>(), (int)(item.damage * (player.allDamage + player.meleeDamage - 1f) * 0.75f), item.knockBack, player.whoAmI);
|
||||
Projectile.NewProjectile(player.Center.X, player.Center.Y, 0f, -randomSpeedY, ModContent.ProjectileType<RainBolt>(), (int)((float)item.damage * (player.allDamage + player.meleeDamage - 1f) * 0.75f), item.knockBack, player.whoAmI);
|
||||
}
|
||||
if (target.statLife <= 0)
|
||||
if (target.statLife <= 0 && !player.moonLeech)
|
||||
{
|
||||
float randomSpeedX = (float)Main.rand.Next(9);
|
||||
float randomSpeedY = (float)Main.rand.Next(6, 15);
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 110;
|
||||
item.width = item.height = 102;
|
||||
item.damage = 300;
|
||||
item.melee = true;
|
||||
item.useAnimation = 18;
|
||||
@@ -31,7 +31,6 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.knockBack = 7f;
|
||||
item.UseSound = SoundID.Item1;
|
||||
item.autoReuse = true;
|
||||
item.height = 110;
|
||||
item.value = Item.buyPrice(2, 50, 0, 0);
|
||||
item.rare = 10;
|
||||
item.shoot = ModContent.ProjectileType<JudgementBlah>();
|
||||
|
||||
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
@@ -54,7 +54,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
if (target.type == NPCID.TargetDummy || !target.canGhostHeal)
|
||||
if (target.type == NPCID.TargetDummy || !target.canGhostHeal || player.moonLeech)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -64,6 +64,8 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void OnHitPvp(Player player, Player target, int damage, bool crit)
|
||||
{
|
||||
if (player.moonLeech)
|
||||
return;
|
||||
player.statLife += 5;
|
||||
player.HealEffect(5);
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
target.defense -= 10;
|
||||
|
||||
// Healing effect does not trigger versus dummies
|
||||
if (target.type == NPCID.TargetDummy)
|
||||
if (target.type == NPCID.TargetDummy || player.moonLeech)
|
||||
return;
|
||||
|
||||
if (target.defense <= 0 && target.canGhostHeal)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.Hybrid;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -34,13 +33,6 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.shootSpeed = 16f;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
Main.projectile[proj].Calamity().forceMelee = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
public class Nadir : ModItem
|
||||
{
|
||||
public static int BaseDamage = 800;
|
||||
public static int BaseDamage = 700;
|
||||
public static float ShootSpeed = 12f;
|
||||
|
||||
public override void SetStaticDefaults()
|
||||
|
||||
@@ -17,8 +17,8 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 34;
|
||||
item.width = 78;
|
||||
item.height = 78;
|
||||
item.width = 70;
|
||||
item.height = 70;
|
||||
item.melee = true;
|
||||
item.useAnimation = 24;
|
||||
item.useStyle = 1;
|
||||
|
||||
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.5 KiB |
@@ -53,11 +53,10 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 400;
|
||||
item.damage = 1200;
|
||||
item.crit += 8;
|
||||
item.useAnimation = 15;
|
||||
item.useStyle = 1;
|
||||
item.useTime = 15;
|
||||
item.useTime = item.useAnimation = 15;
|
||||
item.useTurn = true;
|
||||
item.melee = true;
|
||||
item.knockBack = 7f;
|
||||
@@ -91,7 +90,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
{
|
||||
if (player.altFunctionUse == 2)
|
||||
{
|
||||
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ModContent.ProjectileType<PrismaticWave>(), damage * 2, knockBack, player.whoAmI, 0f, 0f);
|
||||
Projectile.NewProjectile(position.X, position.Y, speedX, speedY, ModContent.ProjectileType<PrismaticWave>(), (int)(damage * 1), knockBack, player.whoAmI, 0f, 0f);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using CalamityMod.Projectiles.Hybrid;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -34,13 +33,6 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.shootSpeed = 12f;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
Main.projectile[proj].Calamity().forceMelee = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 18;
|
||||
item.damage = 1550;
|
||||
item.damage = 1300;
|
||||
item.melee = true;
|
||||
item.noMelee = true;
|
||||
item.noUseGraphic = true;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.Hybrid;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -33,13 +32,6 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.shootSpeed = 11.5f;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
Main.projectile[proj].Calamity().forceMelee = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
|
||||
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
@@ -20,10 +20,10 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 75;
|
||||
item.damage = 80;
|
||||
item.knockBack = 4.5f;
|
||||
item.melee = true;
|
||||
item.useAnimation = item.useTime = 15;
|
||||
item.useAnimation = item.useTime = 14;
|
||||
item.autoReuse = true;
|
||||
item.shoot = ModContent.ProjectileType<TenebreusTidesProjectile>();
|
||||
item.shootSpeed = 12f;
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
if (target.type == NPCID.TargetDummy || !target.canGhostHeal)
|
||||
if (target.type == NPCID.TargetDummy || !target.canGhostHeal || player.moonLeech)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -80,6 +80,8 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void OnHitPvp(Player player, Player target, int damage, bool crit)
|
||||
{
|
||||
if (player.moonLeech)
|
||||
return;
|
||||
int healAmount = Main.rand.Next(2) + 2;
|
||||
player.statLife += healAmount;
|
||||
player.HealEffect(healAmount);
|
||||
|
||||
@@ -91,7 +91,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
target.AddBuff(BuffID.Frostburn, 600);
|
||||
target.AddBuff(BuffID.OnFire, 600);
|
||||
target.AddBuff(BuffID.Ichor, 300);
|
||||
if (target.type == NPCID.TargetDummy || !target.canGhostHeal)
|
||||
if (target.type == NPCID.TargetDummy || !target.canGhostHeal || player.moonLeech)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -110,6 +110,8 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
target.AddBuff(BuffID.Frostburn, 600);
|
||||
target.AddBuff(BuffID.OnFire, 600);
|
||||
target.AddBuff(BuffID.Ichor, 300);
|
||||
if (player.moonLeech)
|
||||
return;
|
||||
int healAmount = Main.rand.Next(3) + 2;
|
||||
player.statLife += healAmount;
|
||||
player.HealEffect(healAmount);
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.Hybrid;
|
||||
using CalamityMod.Tiles.Furniture.CraftingStations;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -37,13 +36,6 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.Calamity().customRarity = CalamityRarity.Developer;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
Main.projectile[proj].Calamity().forceMelee = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void OnHitNPC(Player player, NPC target, int damage, float knockback, bool crit)
|
||||
{
|
||||
if (target.type == NPCID.TargetDummy)
|
||||
if (target.type == NPCID.TargetDummy || player.moonLeech)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -67,6 +67,8 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void OnHitPvp(Player player, Player target, int damage, bool crit)
|
||||
{
|
||||
if (player.moonLeech)
|
||||
return;
|
||||
int healAmount = Main.rand.Next(6) + 1;
|
||||
if (Main.rand.NextBool(2))
|
||||
{
|
||||
|
||||
@@ -18,7 +18,8 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 78;
|
||||
item.width = 88;
|
||||
item.height = 88;
|
||||
item.damage = 200;
|
||||
item.melee = true;
|
||||
item.useAnimation = 23;
|
||||
@@ -28,7 +29,6 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.knockBack = 7.5f;
|
||||
item.UseSound = SoundID.Item1;
|
||||
item.autoReuse = true;
|
||||
item.height = 78;
|
||||
item.value = Item.buyPrice(0, 80, 0, 0);
|
||||
item.rare = 8;
|
||||
item.shoot = ModContent.ProjectileType<ForbiddenOathbladeProjectile>();
|
||||
|
||||
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 2.2 KiB |
@@ -1,6 +1,5 @@
|
||||
using CalamityMod.Items.Materials;
|
||||
using CalamityMod.Projectiles.Hybrid;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Terraria;
|
||||
using Terraria.ID;
|
||||
using Terraria.ModLoader;
|
||||
@@ -18,7 +17,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 14;
|
||||
item.damage = 81;
|
||||
item.damage = 87;
|
||||
item.noMelee = true;
|
||||
item.noUseGraphic = true;
|
||||
item.autoReuse = true;
|
||||
@@ -35,13 +34,6 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
item.shootSpeed = 14f;
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
int proj = Projectile.NewProjectile(position, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI);
|
||||
Main.projectile[proj].Calamity().forceMelee = true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
ModRecipe recipe = new ModRecipe(mod);
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Melee
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 300;
|
||||
item.damage = 130;
|
||||
item.melee = true;
|
||||
item.rare = 8;
|
||||
item.width = 72;
|
||||
|
||||
@@ -18,10 +18,10 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 101;
|
||||
item.damage = 49;
|
||||
item.ranged = true;
|
||||
item.useTime = 15;
|
||||
item.useAnimation = 15;
|
||||
item.useTime = 18;
|
||||
item.useAnimation = 18;
|
||||
item.knockBack = 2f;
|
||||
item.autoReuse = true;
|
||||
item.shoot = ModContent.ProjectileType<AuroraFire>();
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 32;
|
||||
item.damage = 27;
|
||||
item.ranged = true;
|
||||
item.width = 64;
|
||||
item.height = 30;
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
item.UseSound = SoundID.Item10;
|
||||
item.autoReuse = true;
|
||||
item.shootSpeed = 20f;
|
||||
item.shoot = ModContent.ProjectileType<TriploonProj>();
|
||||
item.shoot = ModContent.ProjectileType<DualpoonProj>();
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
@@ -38,28 +38,27 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
return new Vector2(-5, 0);
|
||||
}
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true);
|
||||
float num117 = 0.314159274f;
|
||||
int num118 = 2;
|
||||
Vector2 vector7 = new Vector2(speedX, speedY);
|
||||
vector7.Normalize();
|
||||
vector7 *= 40f;
|
||||
bool flag11 = Collision.CanHit(vector2, 0, 0, vector2 + vector7, 0, 0);
|
||||
for (int num119 = 0; num119 < num118; num119++)
|
||||
{
|
||||
float num120 = (float)num119 - ((float)num118 - 1f) / 2f;
|
||||
Vector2 value9 = vector7.RotatedBy((double)(num117 * num120), default);
|
||||
if (!flag11)
|
||||
{
|
||||
value9 -= vector7;
|
||||
}
|
||||
int harpoon = Projectile.NewProjectile(vector2.X + value9.X, vector2.Y + value9.Y, speedX, speedY, type, damage, knockBack, player.whoAmI, 0.0f, 0.0f);
|
||||
Main.projectile[harpoon].timeLeft = 300;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
Vector2 source = player.RotatedRelativePoint(player.MountedCenter, true);
|
||||
float piOverTen = MathHelper.Pi * 0.1f;
|
||||
int projCount = 2;
|
||||
Vector2 velocity = new Vector2(speedX, speedY);
|
||||
velocity.Normalize();
|
||||
velocity *= 40f;
|
||||
bool canHit = Collision.CanHit(source, 0, 0, source + velocity, 0, 0);
|
||||
for (int projIndex = 0; projIndex < projCount; projIndex++)
|
||||
{
|
||||
float num120 = projIndex - (projCount - 1f) / 2f;
|
||||
Vector2 offset = velocity.RotatedBy((double)(piOverTen * num120), default);
|
||||
if (!canHit)
|
||||
{
|
||||
offset -= velocity;
|
||||
}
|
||||
Projectile.NewProjectile(source.X + offset.X, source.Y + offset.Y, speedX, speedY, type, damage, knockBack, player.whoAmI, 0f, 0f);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void AddRecipes()
|
||||
{
|
||||
|
||||
@@ -20,8 +20,8 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
item.damage = 54;
|
||||
item.ranged = true;
|
||||
item.width = 16;
|
||||
item.height = 16;
|
||||
item.width = 152;
|
||||
item.height = 58;
|
||||
item.useTime = 10;
|
||||
item.useAnimation = 10;
|
||||
item.reuseDelay = 5;
|
||||
|
||||
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.6 KiB |
@@ -18,7 +18,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 27;
|
||||
item.damage = 31;
|
||||
item.ranged = true;
|
||||
item.width = 18;
|
||||
item.height = 36;
|
||||
@@ -38,26 +38,26 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override bool Shoot(Player player, ref Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
|
||||
{
|
||||
Vector2 vector2 = player.RotatedRelativePoint(player.MountedCenter, true);
|
||||
float num117 = 0.314159274f;
|
||||
int num118 = 3;
|
||||
Vector2 vector7 = new Vector2(speedX, speedY);
|
||||
vector7.Normalize();
|
||||
vector7 *= 40f;
|
||||
bool flag11 = Collision.CanHit(vector2, 0, 0, vector2 + vector7, 0, 0);
|
||||
for (int num119 = 0; num119 < num118; num119++)
|
||||
Vector2 source = player.RotatedRelativePoint(player.MountedCenter, true);
|
||||
float piOverTen = MathHelper.Pi * 0.1f;
|
||||
int arrowAmt = 3;
|
||||
Vector2 velocity = new Vector2(speedX, speedY);
|
||||
velocity.Normalize();
|
||||
velocity *= 40f;
|
||||
bool canHit = Collision.CanHit(source, 0, 0, source + velocity, 0, 0);
|
||||
for (int projIndex = 0; projIndex < arrowAmt; projIndex++)
|
||||
{
|
||||
float num120 = (float)num119 - ((float)num118 - 1f) / 2f;
|
||||
Vector2 value9 = vector7.RotatedBy((double)(num117 * num120), default);
|
||||
if (!flag11)
|
||||
float num120 = (float)projIndex - ((float)arrowAmt - 1f) / 2f;
|
||||
Vector2 offset = velocity.RotatedBy((double)(piOverTen * num120), default);
|
||||
if (!canHit)
|
||||
{
|
||||
value9 -= vector7;
|
||||
offset -= velocity;
|
||||
}
|
||||
if (type == ProjectileID.WoodenArrowFriendly)
|
||||
{
|
||||
type = ProjectileID.FireArrow;
|
||||
}
|
||||
int num121 = Projectile.NewProjectile(vector2.X + value9.X, vector2.Y + value9.Y, speedX, speedY, type, damage, knockBack, player.whoAmI, 0f, 0f);
|
||||
int num121 = Projectile.NewProjectile(source + offset, new Vector2(speedX, speedY), type, damage, knockBack, player.whoAmI, 0f, 0f);
|
||||
Main.projectile[num121].noDropItem = true;
|
||||
}
|
||||
for (int i = 0; i < 2; i++)
|
||||
@@ -78,7 +78,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
default:
|
||||
break;
|
||||
}
|
||||
int index = Projectile.NewProjectile(position.X, position.Y, SpeedX, SpeedY, type, (int)(damage * 0.5f), knockBack, player.whoAmI, 0f, 0f);
|
||||
int index = Projectile.NewProjectile(position, new Vector2(SpeedX, SpeedY), type, (int)(damage * 0.5f), knockBack, player.whoAmI, 0f, 0f);
|
||||
Main.projectile[index].noDropItem = true;
|
||||
Main.projectile[index].usesLocalNPCImmunity = true;
|
||||
Main.projectile[index].localNPCHitCooldown = 10;
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 32;
|
||||
item.damage = 27;
|
||||
item.ranged = true;
|
||||
item.crit += 20;
|
||||
item.width = 36;
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 38;
|
||||
item.damage = 45;
|
||||
item.ranged = true;
|
||||
item.width = 44;
|
||||
item.height = 26;
|
||||
@@ -31,7 +31,7 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
item.autoReuse = true;
|
||||
item.shootSpeed = 9f;
|
||||
item.shoot = ModContent.ProjectileType<NeedlerProj>();
|
||||
item.useAmmo = 97;
|
||||
item.useAmmo = AmmoID.Bullet;
|
||||
}
|
||||
|
||||
public override Vector2? HoldoutOffset()
|
||||
|
||||
@@ -20,12 +20,12 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.damage = 210;
|
||||
item.damage = 200;
|
||||
item.ranged = true;
|
||||
item.width = 84;
|
||||
item.height = 34;
|
||||
item.useTime = 8;
|
||||
item.useAnimation = 8;
|
||||
item.useTime = 9;
|
||||
item.useAnimation = 9;
|
||||
item.useStyle = 5;
|
||||
item.noMelee = true;
|
||||
item.knockBack = 4.5f;
|
||||
@@ -48,11 +48,12 @@ namespace CalamityMod.Items.Weapons.Ranged
|
||||
{
|
||||
// Fire the Onyx Shard that is characteristic of the Onyx Blaster
|
||||
// The shard deals triple damage and double knockback
|
||||
int shardDamage = 3 * damage;
|
||||
int shardDamage = (int)(2.5 * damage);
|
||||
float shardKB = 2f * knockBack;
|
||||
float shardVelocityX = (speedX + (float)Main.rand.Next(-25, 26) * 0.05f) * 0.9f;
|
||||
float shardVelocityY = (speedY + (float)Main.rand.Next(-25, 26) * 0.05f) * 0.9f;
|
||||
Projectile.NewProjectile(position.X, position.Y, shardVelocityX, shardVelocityY, ProjectileID.BlackBolt, shardDamage, shardKB, player.whoAmI, 0f, 0f);
|
||||
int onyx = Projectile.NewProjectile(position.X, position.Y, shardVelocityX, shardVelocityY, ProjectileID.BlackBolt, shardDamage, shardKB, player.whoAmI, 0f, 0f);
|
||||
Main.projectile[onyx].timeLeft -= 20;
|
||||
|
||||
// Fire three symmetric pairs of bullets alongside it
|
||||
Vector2 baseVelocity = new Vector2(speedX, speedY);
|
||||
|
||||