many resprites
No files matched your search
@@ -16,13 +16,12 @@ namespace CalamityMod.Items.Accessories
|
||||
Tooltip.SetDefault("One of the ancient relics\n" +
|
||||
"Enemies that get near you take damage and all damage is increased by 3%\n" +
|
||||
"You grow flowers on the grass beneath you, chance to grow very random dye plants on grassless dirt");
|
||||
Main.RegisterItemAnimation(item.type, new DrawAnimationVertical(4, 7));
|
||||
}
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
item.width = 20;
|
||||
item.height = 20;
|
||||
item.width = 38;
|
||||
item.height = 54;
|
||||
item.value = CalamityGlobalItem.Rarity8BuyPrice;
|
||||
item.rare = 8;
|
||||
item.accessory = true;
|
||||
@@ -33,37 +32,34 @@ namespace CalamityMod.Items.Accessories
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
Lighting.AddLight((int)player.Center.X / 16, (int)player.Center.Y / 16, 0.25f, 0.4f, 0.2f);
|
||||
player.allDamage += 0.03f;
|
||||
int bloomCounter = 0;
|
||||
int num = 186;
|
||||
float num2 = 150f;
|
||||
bool flag = bloomCounter % 60 == 0;
|
||||
int num3 = (int)(10 * player.AverageDamage());
|
||||
int random = Main.rand.Next(10);
|
||||
int buffType = BuffID.DryadsWardDebuff;
|
||||
float range = 150f;
|
||||
bool shouldDealDmg = player.miscCounter % 60 == 0;
|
||||
int dmg = (int)(10 * player.AverageDamage());
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
if (random == 0)
|
||||
if (Main.rand.NextBool(10))
|
||||
{
|
||||
for (int l = 0; l < Main.maxNPCs; l++)
|
||||
{
|
||||
NPC nPC = Main.npc[l];
|
||||
if (nPC.active && !nPC.friendly && nPC.damage > 0 && !nPC.dontTakeDamage && !nPC.buffImmune[num] && Vector2.Distance(player.Center, nPC.Center) <= num2)
|
||||
NPC npc = Main.npc[l];
|
||||
if (npc.active && !npc.friendly && npc.damage > 0 && !npc.dontTakeDamage && !npc.buffImmune[buffType] && Vector2.Distance(player.Center, npc.Center) <= range)
|
||||
{
|
||||
if (nPC.FindBuffIndex(num) == -1)
|
||||
if (npc.FindBuffIndex(buffType) == -1)
|
||||
{
|
||||
nPC.AddBuff(num, 120, false);
|
||||
npc.AddBuff(buffType, 120, false);
|
||||
}
|
||||
if (flag)
|
||||
if (shouldDealDmg)
|
||||
{
|
||||
if (player.whoAmI == Main.myPlayer)
|
||||
{
|
||||
Projectile p = Projectile.NewProjectileDirect(nPC.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), num3, 0f, player.whoAmI, l);
|
||||
Projectile.NewProjectile(npc.Center, Vector2.Zero, ModContent.ProjectileType<DirectStrike>(), dmg, 0f, player.whoAmI, l);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
bloomCounter++;
|
||||
|
||||
//Flower Boots code
|
||||
if (player.whoAmI == Main.myPlayer && player.velocity.Y == 0f && player.grappling[0] == -1)
|
||||
|
||||
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 626 B |
|
Before Width: | Height: | Size: 450 B After Width: | Height: | Size: 622 B |
|
Before Width: | Height: | Size: 447 B After Width: | Height: | Size: 554 B |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 584 B |
|
Before Width: | Height: | Size: 426 B After Width: | Height: | Size: 600 B |
|
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 406 B |
|
Before Width: | Height: | Size: 373 B After Width: | Height: | Size: 441 B |
|
Before Width: | Height: | Size: 401 B After Width: | Height: | Size: 365 B |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 584 B |
|
Before Width: | Height: | Size: 691 B After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 582 B After Width: | Height: | Size: 539 B |
|
Before Width: | Height: | Size: 4.0 KiB After Width: | Height: | Size: 366 B |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 584 B |
|
Before Width: | Height: | Size: 373 B After Width: | Height: | Size: 441 B |
|
Before Width: | Height: | Size: 401 B After Width: | Height: | Size: 365 B |
|
Before Width: | Height: | Size: 453 B After Width: | Height: | Size: 411 B |
@@ -47,11 +47,7 @@ namespace CalamityMod.Projectiles.Rogue
|
||||
{
|
||||
Dust.NewDust(projectile.position + projectile.velocity, projectile.width, projectile.height, 246, projectile.velocity.X * 0.5f, projectile.velocity.Y * 0.5f);
|
||||
}
|
||||
projectile.rotation = (float)Math.Atan2((double)projectile.velocity.Y, (double)projectile.velocity.X) + 2.355f;
|
||||
if (projectile.spriteDirection == -1)
|
||||
{
|
||||
projectile.rotation -= 1.57f;
|
||||
}
|
||||
projectile.rotation = projectile.velocity.ToRotation() + MathHelper.PiOver4;
|
||||
|
||||
Vector2 center = projectile.Center;
|
||||
float maxDistance = 300f;
|
||||
|
||||
|
Before Width: | Height: | Size: 972 B After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 689 B After Width: | Height: | Size: 859 B |
@@ -18,8 +18,8 @@ namespace CalamityMod.Projectiles.Summon
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
projectile.width = 54;
|
||||
projectile.height = 54;
|
||||
projectile.width = 74;
|
||||
projectile.height = 90;
|
||||
projectile.netImportant = true;
|
||||
projectile.friendly = true;
|
||||
projectile.ignoreWater = true;
|
||||
@@ -33,12 +33,11 @@ namespace CalamityMod.Projectiles.Summon
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0.5f / 255f, (255 - projectile.alpha) * 0.5f / 255f, (255 - projectile.alpha) * 0f / 255f);
|
||||
bool flag64 = projectile.type == ModContent.ProjectileType<SolarGod>();
|
||||
Player player = Main.player[projectile.owner];
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
player.AddBuff(ModContent.BuffType<SolarSpiritGod>(), 3600);
|
||||
if (flag64)
|
||||
bool correctMinion = projectile.type == ModContent.ProjectileType<SolarGod>();
|
||||
if (correctMinion)
|
||||
{
|
||||
if (player.dead)
|
||||
{
|
||||
@@ -61,19 +60,20 @@ namespace CalamityMod.Projectiles.Summon
|
||||
}
|
||||
projectile.position.X = (int)projectile.position.X;
|
||||
projectile.position.Y = (int)projectile.position.Y;
|
||||
float num395 = (float)Main.mouseTextColor / 200f - 0.35f;
|
||||
num395 *= 0.2f;
|
||||
projectile.scale = num395 + 0.95f;
|
||||
float sizeScale = (float)Main.mouseTextColor / 200f - 0.35f;
|
||||
sizeScale *= 0.2f;
|
||||
projectile.scale = sizeScale + 0.95f;
|
||||
Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0.5f / 255f, (255 - projectile.alpha) * 0.5f / 255f, (255 - projectile.alpha) * 0f / 255f);
|
||||
if (projectile.localAI[0] == 0f)
|
||||
{
|
||||
projectile.Calamity().spawnedPlayerMinionDamageValue = player.MinionDamage();
|
||||
projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage;
|
||||
int num501 = 50;
|
||||
for (int num502 = 0; num502 < num501; num502++)
|
||||
int dustAmt = 50;
|
||||
for (int d = 0; d < dustAmt; d++)
|
||||
{
|
||||
int num503 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y + 16f), projectile.width, projectile.height - 16, 244, 0f, 0f, 0, default, 1f);
|
||||
Main.dust[num503].velocity *= 2f;
|
||||
Main.dust[num503].scale *= 1.15f;
|
||||
int fire = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y + 16f), projectile.width, projectile.height - 16, 244, 0f, 0f, 0, default, 1f);
|
||||
Main.dust[fire].velocity *= 2f;
|
||||
Main.dust[fire].scale *= 1.15f;
|
||||
}
|
||||
projectile.localAI[0] += 1f;
|
||||
}
|
||||
@@ -91,56 +91,47 @@ namespace CalamityMod.Projectiles.Summon
|
||||
projectile.ai[0] -= 1f;
|
||||
return;
|
||||
}
|
||||
float num396 = projectile.position.X;
|
||||
float num397 = projectile.position.Y;
|
||||
float num398 = 700f;
|
||||
bool flag11 = false;
|
||||
Vector2 targetPos = projectile.position;
|
||||
float maxDistance = 700f;
|
||||
bool foundTarget = false;
|
||||
if (player.HasMinionAttackTargetNPC)
|
||||
{
|
||||
NPC npc = Main.npc[player.MinionAttackTargetNPC];
|
||||
if (npc.CanBeChasedBy(projectile, false))
|
||||
{
|
||||
float num539 = npc.position.X + (float)(npc.width / 2);
|
||||
float num540 = npc.position.Y + (float)(npc.height / 2);
|
||||
float num541 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num539) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num540);
|
||||
if (num541 < num398 && Collision.CanHit(projectile.position, projectile.width, projectile.height, npc.position, npc.width, npc.height))
|
||||
float npcDist = Vector2.Distance(projectile.Center, npc.Center);
|
||||
if (npcDist < maxDistance && Collision.CanHit(projectile.position, projectile.width, projectile.height, npc.position, npc.width, npc.height))
|
||||
{
|
||||
num396 = num539;
|
||||
num397 = num540;
|
||||
flag11 = true;
|
||||
targetPos = npc.Center;
|
||||
foundTarget = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!flag11)
|
||||
if (!foundTarget)
|
||||
{
|
||||
for (int num399 = 0; num399 < Main.maxNPCs; num399++)
|
||||
for (int i = 0; i < Main.maxNPCs; i++)
|
||||
{
|
||||
if (Main.npc[num399].CanBeChasedBy(projectile, false))
|
||||
NPC npc = Main.npc[i];
|
||||
if (npc.CanBeChasedBy(projectile, false))
|
||||
{
|
||||
float num400 = Main.npc[num399].position.X + (float)(Main.npc[num399].width / 2);
|
||||
float num401 = Main.npc[num399].position.Y + (float)(Main.npc[num399].height / 2);
|
||||
float num402 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num400) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num401);
|
||||
if (num402 < num398 && Collision.CanHit(projectile.position, projectile.width, projectile.height, Main.npc[num399].position, Main.npc[num399].width, Main.npc[num399].height))
|
||||
float npcDist = Vector2.Distance(projectile.Center, npc.Center);
|
||||
if (npcDist < maxDistance && Collision.CanHit(projectile.position, projectile.width, projectile.height, npc.position, npc.width, npc.height))
|
||||
{
|
||||
num398 = num402;
|
||||
num396 = num400;
|
||||
num397 = num401;
|
||||
flag11 = true;
|
||||
maxDistance = npcDist;
|
||||
targetPos = npc.Center;
|
||||
foundTarget = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (flag11)
|
||||
if (foundTarget)
|
||||
{
|
||||
float num403 = 15f;
|
||||
Vector2 vector29 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f);
|
||||
float num404 = num396 - vector29.X;
|
||||
float num405 = num397 - vector29.Y;
|
||||
float num406 = (float)Math.Sqrt((double)(num404 * num404 + num405 * num405));
|
||||
num406 = num403 / num406;
|
||||
num404 *= num406;
|
||||
num405 *= num406;
|
||||
Projectile.NewProjectile(projectile.Center.X - 4f, projectile.Center.Y, num404, num405, ModContent.ProjectileType<SolarBeam>(), projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f);
|
||||
float shootSpeed = 15f;
|
||||
Vector2 source = projectile.Center;
|
||||
Vector2 velocity = targetPos - source;
|
||||
velocity.Normalize();
|
||||
velocity *= shootSpeed;
|
||||
Projectile.NewProjectile(source, velocity, ModContent.ProjectileType<SolarBeam>(), projectile.damage, projectile.knockBack, projectile.owner);
|
||||
projectile.ai[0] = 30f;
|
||||
}
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 867 B After Width: | Height: | Size: 945 B |
@@ -18,8 +18,8 @@ namespace CalamityMod.Projectiles.Summon
|
||||
|
||||
public override void SetDefaults()
|
||||
{
|
||||
projectile.width = 46;
|
||||
projectile.height = 46;
|
||||
projectile.width = 50;
|
||||
projectile.height = 50;
|
||||
projectile.netImportant = true;
|
||||
projectile.friendly = true;
|
||||
projectile.ignoreWater = true;
|
||||
@@ -33,12 +33,11 @@ namespace CalamityMod.Projectiles.Summon
|
||||
|
||||
public override void AI()
|
||||
{
|
||||
Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0.25f / 255f, (255 - projectile.alpha) * 0.25f / 255f, (255 - projectile.alpha) * 0f / 255f);
|
||||
bool flag64 = projectile.type == ModContent.ProjectileType<SolarPixie>();
|
||||
Player player = Main.player[projectile.owner];
|
||||
CalamityPlayer modPlayer = player.Calamity();
|
||||
player.AddBuff(ModContent.BuffType<SolarSpirit>(), 3600);
|
||||
if (flag64)
|
||||
bool correctMinion = projectile.type == ModContent.ProjectileType<SolarPixie>();
|
||||
if (correctMinion)
|
||||
{
|
||||
if (player.dead)
|
||||
{
|
||||
@@ -61,19 +60,20 @@ namespace CalamityMod.Projectiles.Summon
|
||||
}
|
||||
projectile.position.X = (int)projectile.position.X;
|
||||
projectile.position.Y = (int)projectile.position.Y;
|
||||
float num395 = (float)Main.mouseTextColor / 200f - 0.35f;
|
||||
num395 *= 0.2f;
|
||||
projectile.scale = num395 + 0.95f;
|
||||
float sizeScale = (float)Main.mouseTextColor / 200f - 0.35f;
|
||||
sizeScale *= 0.2f;
|
||||
projectile.scale = sizeScale + 0.95f;
|
||||
Lighting.AddLight(projectile.Center, (255 - projectile.alpha) * 0.25f / 255f, (255 - projectile.alpha) * 0.25f / 255f, (255 - projectile.alpha) * 0f / 255f);
|
||||
if (projectile.localAI[0] == 0f)
|
||||
{
|
||||
projectile.Calamity().spawnedPlayerMinionDamageValue = player.MinionDamage();
|
||||
projectile.Calamity().spawnedPlayerMinionProjectileDamageValue = projectile.damage;
|
||||
int num501 = 25;
|
||||
for (int num502 = 0; num502 < num501; num502++)
|
||||
int dustAmt = 25;
|
||||
for (int d = 0; d < dustAmt; d++)
|
||||
{
|
||||
int num503 = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y + 16f), projectile.width, projectile.height - 16, 244, 0f, 0f, 0, default, 1f);
|
||||
Main.dust[num503].velocity *= 2f;
|
||||
Main.dust[num503].scale *= 1.15f;
|
||||
int fire = Dust.NewDust(new Vector2(projectile.position.X, projectile.position.Y + 16f), projectile.width, projectile.height - 16, 244, 0f, 0f, 0, default, 1f);
|
||||
Main.dust[fire].velocity *= 2f;
|
||||
Main.dust[fire].scale *= 1.15f;
|
||||
}
|
||||
projectile.localAI[0] += 1f;
|
||||
}
|
||||
@@ -91,72 +91,55 @@ namespace CalamityMod.Projectiles.Summon
|
||||
projectile.ai[0] -= 1f;
|
||||
return;
|
||||
}
|
||||
float num396 = projectile.position.X;
|
||||
float num397 = projectile.position.Y;
|
||||
float num398 = 700f;
|
||||
bool flag11 = false;
|
||||
Vector2 targetPos = projectile.position;
|
||||
float maxDistance = 700f;
|
||||
bool foundTarget = false;
|
||||
if (player.HasMinionAttackTargetNPC)
|
||||
{
|
||||
NPC npc = Main.npc[player.MinionAttackTargetNPC];
|
||||
if (npc.CanBeChasedBy(projectile, false))
|
||||
{
|
||||
float num539 = npc.position.X + (float)(npc.width / 2);
|
||||
float num540 = npc.position.Y + (float)(npc.height / 2);
|
||||
float num541 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num539) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num540);
|
||||
if (num541 < num398 && Collision.CanHit(projectile.position, projectile.width, projectile.height, npc.position, npc.width, npc.height))
|
||||
float npcDist = Vector2.Distance(projectile.Center, npc.Center);
|
||||
if (npcDist < maxDistance && Collision.CanHit(projectile.position, projectile.width, projectile.height, npc.position, npc.width, npc.height))
|
||||
{
|
||||
num396 = num539;
|
||||
num397 = num540;
|
||||
flag11 = true;
|
||||
targetPos = npc.Center;
|
||||
foundTarget = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!flag11)
|
||||
if (!foundTarget)
|
||||
{
|
||||
for (int num399 = 0; num399 < Main.maxNPCs; num399++)
|
||||
for (int i = 0; i < Main.maxNPCs; i++)
|
||||
{
|
||||
if (Main.npc[num399].CanBeChasedBy(projectile, false))
|
||||
NPC npc = Main.npc[i];
|
||||
if (npc.CanBeChasedBy(projectile, false))
|
||||
{
|
||||
float num400 = Main.npc[num399].position.X + (float)(Main.npc[num399].width / 2);
|
||||
float num401 = Main.npc[num399].position.Y + (float)(Main.npc[num399].height / 2);
|
||||
float num402 = Math.Abs(projectile.position.X + (float)(projectile.width / 2) - num400) + Math.Abs(projectile.position.Y + (float)(projectile.height / 2) - num401);
|
||||
if (num402 < num398 && Collision.CanHit(projectile.position, projectile.width, projectile.height, Main.npc[num399].position, Main.npc[num399].width, Main.npc[num399].height))
|
||||
float npcDist = Vector2.Distance(projectile.Center, npc.Center);
|
||||
if (npcDist < maxDistance && Collision.CanHit(projectile.position, projectile.width, projectile.height, npc.position, npc.width, npc.height))
|
||||
{
|
||||
num398 = num402;
|
||||
num396 = num400;
|
||||
num397 = num401;
|
||||
flag11 = true;
|
||||
maxDistance = npcDist;
|
||||
targetPos = npc.Center;
|
||||
foundTarget = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (flag11)
|
||||
if (foundTarget)
|
||||
{
|
||||
float num403 = 30f;
|
||||
Vector2 vector29 = new Vector2(projectile.position.X + (float)projectile.width * 0.5f, projectile.position.Y + (float)projectile.height * 0.5f);
|
||||
float num404 = num396 - vector29.X;
|
||||
float num405 = num397 - vector29.Y;
|
||||
float num406 = (float)Math.Sqrt((double)(num404 * num404 + num405 * num405));
|
||||
num406 = num403 / num406;
|
||||
num404 *= num406;
|
||||
num405 *= num406;
|
||||
int beam = Projectile.NewProjectile(projectile.Center.X - 4f, projectile.Center.Y, num404, num405, ProjectileID.HeatRay, projectile.damage, projectile.knockBack, projectile.owner, 0f, 0f);
|
||||
Main.projectile[beam].magic = false;
|
||||
Main.projectile[beam].minion = true;
|
||||
ProjectileID.Sets.MinionShot[Main.projectile[beam].type] = true;
|
||||
float shootSpeed = 30f;
|
||||
Vector2 source = projectile.Center;
|
||||
Vector2 velocity = targetPos - source;
|
||||
velocity.Normalize();
|
||||
velocity *= shootSpeed;
|
||||
int beam = Projectile.NewProjectile(source, velocity, ProjectileID.HeatRay, projectile.damage, projectile.knockBack, projectile.owner);
|
||||
Main.projectile[beam].Calamity().forceMinion = true;
|
||||
projectile.ai[0] = 50f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override Color? GetAlpha(Color lightColor)
|
||||
{
|
||||
return new Color(200, 200, 200, 200);
|
||||
}
|
||||
public override Color? GetAlpha(Color lightColor) => new Color(200, 200, 200, 200);
|
||||
|
||||
public override bool CanDamage()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
public override bool CanDamage() => false;
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 707 B After Width: | Height: | Size: 388 B |