-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Beginnings of 0.10- The Etherial Update
Adding the Etherial dimension, and many other changes
- Loading branch information
Showing
154 changed files
with
3,349 additions
and
186 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using Microsoft.Xna.Framework; | ||
using Terraria; | ||
using Terraria.ModLoader; | ||
|
||
namespace Laugicality.Dusts | ||
{ | ||
public class Etherial : ModDust | ||
{ | ||
public override void OnSpawn(Dust dust) | ||
{ | ||
dust.velocity *= 0.2f; | ||
dust.noGravity = true; | ||
dust.noLight = true; | ||
dust.scale *= 2.0f; | ||
} | ||
|
||
public override bool Update(Dust dust) | ||
{ | ||
dust.position += dust.velocity; | ||
dust.rotation += dust.velocity.X * 0.15f; | ||
dust.scale *= 0.99f; | ||
if (dust.scale < 1f) | ||
{ | ||
dust.active = false; | ||
} | ||
return false; | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using Microsoft.Xna.Framework; | ||
using Microsoft.Xna.Framework.Graphics; | ||
using Terraria; | ||
using Terraria.ID; | ||
using Terraria.ModLoader; | ||
using Laugicality; | ||
|
||
namespace Laugicality.Etherial | ||
{ | ||
public class EtherialBkg : ModNPC | ||
{ | ||
public int id = 0; | ||
public int life = 0; | ||
|
||
public override void SetStaticDefaults() | ||
{ | ||
DisplayName.SetDefault(""); | ||
} | ||
|
||
public override void SetDefaults() | ||
{ | ||
life = 16; | ||
//npc.frameWidth = 40; | ||
//npc.frameHeight = 34; | ||
npc.width = 40; | ||
npc.height = 34; | ||
npc.damage = 0; | ||
npc.defense = 12; | ||
npc.lifeMax = 99999; | ||
npc.value = 60f; | ||
npc.knockBackResist = 0f; | ||
npc.aiStyle = 0; | ||
npc.lavaImmune = true; | ||
npc.noGravity = true; | ||
npc.noTileCollide = true; | ||
npc.friendly = true; | ||
npc.dontTakeDamage = true; | ||
music = mod.GetSoundSlot(SoundType.Music, "Sounds/Music/Etherial"); | ||
} | ||
|
||
public override void AI() | ||
{ | ||
life -= 1; | ||
if (life == 0) | ||
npc.life = 0; | ||
} | ||
|
||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
using Microsoft.Xna.Framework; | ||
using Terraria; | ||
using Terraria.ID; | ||
using Terraria.ModLoader; | ||
using Laugicality; | ||
using Laugicality.NPCs; | ||
using System; | ||
using System.Collections.Generic; | ||
using Microsoft.Xna.Framework.Graphics; | ||
using Terraria.Graphics.Effects; | ||
using Terraria.Graphics.Shaders; | ||
|
||
namespace Laugicality.Etherial | ||
{ | ||
public class EtherialShader : ScreenShaderData | ||
{ | ||
private int YIndex; | ||
|
||
public EtherialShader(string passName) | ||
: base(passName) | ||
{ | ||
} | ||
|
||
private void UpdateYIndex() | ||
{ | ||
int YType = ModLoader.GetMod("Laugicality").NPCType("EtherialBkg"); | ||
if (YIndex >= 0 && Main.npc[YIndex].active && Main.npc[YIndex].type == YType) | ||
{ | ||
return; | ||
} | ||
YIndex = -1; | ||
for (int i = 0; i < Main.npc.Length; i++) | ||
{ | ||
if (Main.npc[i].active && Main.npc[i].type == YType) | ||
{ | ||
YIndex = i; | ||
break; | ||
} | ||
} | ||
} | ||
|
||
public override void Apply() | ||
{ | ||
UpdateYIndex(); | ||
if (YIndex != -1) | ||
{ | ||
UseTargetPosition(Main.npc[YIndex].Center); | ||
} | ||
base.Apply(); | ||
} | ||
} | ||
|
||
public class EtherialVisual : CustomSky | ||
{ | ||
private bool isActive = false; | ||
private float intensity = 0f; | ||
private int YIndex = -1; | ||
|
||
public override void Update(GameTime gameTime) | ||
{ | ||
if (isActive && intensity < 1f) | ||
{ | ||
intensity += 0.01f; | ||
} | ||
else if (!isActive && intensity > 0f) | ||
{ | ||
intensity -= 0.01f; | ||
} | ||
} | ||
|
||
private float GetIntensity() | ||
{ | ||
if (this.UpdateYIndex()) | ||
{ | ||
float x = 0f; | ||
if (this.YIndex != -1) | ||
{ | ||
x = Vector2.Distance(Main.player[Main.myPlayer].Center, Main.npc[this.YIndex].Center); | ||
} | ||
return (1f - Utils.SmoothStep(3000f, 6000f, x)) * 0.66f; | ||
} | ||
return 0.66f; | ||
} | ||
|
||
public override Color OnTileColor(Color inColor) | ||
{ | ||
float intensity = this.GetIntensity(); | ||
return new Color(Vector4.Lerp(new Vector4(0.5f, 0.8f, 1f, 1f), inColor.ToVector4(), 1f - intensity)); | ||
} | ||
|
||
private bool UpdateYIndex() | ||
{ | ||
int YType = ModLoader.GetMod("Laugicality").NPCType("EtherialBkg"); | ||
if (YIndex >= 0 && Main.npc[YIndex].active && Main.npc[YIndex].type == YType) | ||
{ | ||
return true; | ||
} | ||
YIndex = -1; | ||
for (int i = 0; i < Main.npc.Length; i++) | ||
{ | ||
if (Main.npc[i].active && Main.npc[i].type == YType) | ||
{ | ||
YIndex = i; | ||
break; | ||
} | ||
} | ||
//this.DoGIndex = DoGIndex; | ||
return YIndex != -1; | ||
} | ||
|
||
public override void Draw(SpriteBatch spriteBatch, float minDepth, float maxDepth) | ||
{ | ||
if (maxDepth >= 0 && minDepth < 0) | ||
{ | ||
float intensity = this.GetIntensity(); | ||
spriteBatch.Draw(Main.blackTileTexture, new Rectangle(0, 0, Main.screenWidth, Main.screenHeight), new Color(77, 19, 0) * intensity); | ||
} | ||
} | ||
|
||
public override float GetCloudAlpha() | ||
{ | ||
return 0f; | ||
} | ||
|
||
public override void Activate(Vector2 position, params object[] args) | ||
{ | ||
isActive = true; | ||
} | ||
|
||
public override void Deactivate(params object[] args) | ||
{ | ||
isActive = false; | ||
} | ||
|
||
public override void Reset() | ||
{ | ||
isActive = false; | ||
} | ||
|
||
public override bool IsActive() | ||
{ | ||
return isActive || intensity > 0f; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
using Terraria; | ||
using Terraria.ID; | ||
using Terraria.ModLoader; | ||
|
||
namespace Laugicality.Items.Consumables | ||
{ | ||
public class EtherialEnergy : ModItem | ||
{ | ||
public override void SetStaticDefaults() | ||
{ | ||
Tooltip.SetDefault("Imbues your body with Etherial energy"); | ||
} | ||
public override void SetDefaults() | ||
{ | ||
item.width = 24; | ||
item.height = 24; | ||
item.maxStack = 1; | ||
item.rare = 1; | ||
item.useAnimation = 45; | ||
item.useTime = 45; | ||
item.useStyle = 4; | ||
item.UseSound = SoundID.Item4; | ||
item.consumable = true; | ||
} | ||
|
||
public override bool CanUseItem(Player player) | ||
{ | ||
var modPlayer = Main.LocalPlayer.GetModPlayer<LaugicalityPlayer>(mod); | ||
return !modPlayer.etherialSlot; | ||
} | ||
|
||
public override bool UseItem(Player player) | ||
{ | ||
var modPlayer = Main.LocalPlayer.GetModPlayer<LaugicalityPlayer>(mod); | ||
modPlayer.etherialSlot = true; | ||
return true; | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
using Terraria; | ||
using Terraria.ModLoader; | ||
|
||
namespace Laugicality.Items.Loot | ||
{ | ||
public class BrainOfEtheria : ModItem | ||
{ | ||
public override void SetStaticDefaults() | ||
{ | ||
Tooltip.SetDefault("+1 to all Mystic powers while in the Etherial"); | ||
} | ||
|
||
public override void SetDefaults() | ||
{ | ||
item.width = 24; | ||
item.height = 24; | ||
item.value = 100; | ||
item.rare = 2; | ||
item.accessory = true; | ||
item.expert = true; | ||
//item.defense = 1000; | ||
//item.lifeRegen = 19; | ||
} | ||
|
||
public override void UpdateAccessory(Player player, bool hideVisual) | ||
{ | ||
var modPlayer = Main.LocalPlayer.GetModPlayer<LaugicalityPlayer>(mod); | ||
if (modPlayer.etherial) | ||
{ | ||
modPlayer.conjurationPower += 1; | ||
modPlayer.illusionPower += 1; | ||
modPlayer.destructionPower += 1; | ||
} | ||
} | ||
/* | ||
public override void AddRecipes() | ||
{ | ||
ModRecipe recipe = new ModRecipe(mod); | ||
recipe.AddIngredient(2328, 4); | ||
recipe.AddTile(null, "AlchemicalInfuser"); | ||
recipe.SetResult(this); | ||
recipe.AddRecipe(); | ||
}*/ | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.