Minor changes to Niko AI for more ✨ monologue ✨
This commit is contained in:
@@ -4,6 +4,7 @@ using Microsoft.Xna.Framework;
|
|||||||
using Terraria;
|
using Terraria;
|
||||||
using Terraria.ID;
|
using Terraria.ID;
|
||||||
using Terraria.ModLoader;
|
using Terraria.ModLoader;
|
||||||
|
using ForgottenWawiTech.Content.Rarities;
|
||||||
|
|
||||||
namespace ForgottenWawiTech.Content.Items.Weapons.Magic
|
namespace ForgottenWawiTech.Content.Items.Weapons.Magic
|
||||||
{
|
{
|
||||||
@@ -30,7 +31,7 @@ namespace ForgottenWawiTech.Content.Items.Weapons.Magic
|
|||||||
Item.damage = 25;
|
Item.damage = 25;
|
||||||
Item.knockBack = 4.5f;
|
Item.knockBack = 4.5f;
|
||||||
Item.DamageType = DamageClass.Magic; // treat beams as melee for synergy
|
Item.DamageType = DamageClass.Magic; // treat beams as melee for synergy
|
||||||
Item.rare = ItemRarityID.Blue; // around early game progression
|
Item.rare = ModContent.RarityType<DeveloperItem>();
|
||||||
Item.value = Item.buyPrice(silver: 50);
|
Item.value = Item.buyPrice(silver: 50);
|
||||||
Item.shoot = ModContent.ProjectileType<BeamAttackWandBeam>();
|
Item.shoot = ModContent.ProjectileType<BeamAttackWandBeam>();
|
||||||
Item.shootSpeed = 12f; // base speed of beams
|
Item.shootSpeed = 12f; // base speed of beams
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ namespace ForgottenWawiTech.Content.NPCs.OriginalNiko
|
|||||||
{
|
{
|
||||||
public override void SetStaticDefaults()
|
public override void SetStaticDefaults()
|
||||||
{
|
{
|
||||||
// DisplayName.SetDefault("Original Niko");
|
|
||||||
Main.npcFrameCount[NPC.type] = 1;
|
Main.npcFrameCount[NPC.type] = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -20,8 +19,8 @@ namespace ForgottenWawiTech.Content.NPCs.OriginalNiko
|
|||||||
{
|
{
|
||||||
NPC.width = 40;
|
NPC.width = 40;
|
||||||
NPC.height = 40;
|
NPC.height = 40;
|
||||||
NPC.damage = 1786;
|
NPC.damage = 2000;
|
||||||
NPC.defense = 290;
|
NPC.defense = 300;
|
||||||
NPC.lifeMax = 1000000;
|
NPC.lifeMax = 1000000;
|
||||||
NPC.HitSound = SoundID.NPCHit1;
|
NPC.HitSound = SoundID.NPCHit1;
|
||||||
NPC.DeathSound = SoundID.NPCDeath1;
|
NPC.DeathSound = SoundID.NPCDeath1;
|
||||||
@@ -101,29 +100,46 @@ namespace ForgottenWawiTech.Content.NPCs.OriginalNiko
|
|||||||
}
|
}
|
||||||
else if (t == 900)
|
else if (t == 900)
|
||||||
{
|
{
|
||||||
string line = "Niko: You think you've seen everything?";
|
string line = "Impressive...";
|
||||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||||
Main.NewText(line, 220, 160, 255);
|
Main.NewText(line, 220, 160, 255);
|
||||||
else
|
else
|
||||||
ChatHelper.BroadcastChatMessage(NetworkText.FromLiteral(line), new Color(220, 160, 255));
|
ChatHelper.BroadcastChatMessage(NetworkText.FromLiteral(line), new Color(220, 160, 255));
|
||||||
}
|
}
|
||||||
else if (t == 2100)
|
else if (t == 1000)
|
||||||
{
|
{
|
||||||
string line = "Niko: There's more yet to come...";
|
string line = "But this has already gone on long enough.";
|
||||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||||
Main.NewText(line, 200, 140, 255);
|
Main.NewText(line, 180, 130, 255);
|
||||||
else
|
else
|
||||||
ChatHelper.BroadcastChatMessage(NetworkText.FromLiteral(line), new Color(200, 140, 255));
|
ChatHelper.BroadcastChatMessage(NetworkText.FromLiteral(line), new Color(180, 130, 255));
|
||||||
}
|
}
|
||||||
|
// TODO: Audio and VO lines here
|
||||||
// After approx 60 seconds (3600 ticks), end invulnerability
|
else if (t == 1500)
|
||||||
if (NPC.ai[2] >= 3600)
|
{
|
||||||
|
string line = "Sky has rated the following film 12 - suitable for ages 12 and above.";
|
||||||
|
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||||
|
Main.NewText(line, 210, 150, 255);
|
||||||
|
else
|
||||||
|
ChatHelper.BroadcastChatMessage(NetworkText.FromLiteral(line), new Color(210, 150, 255));
|
||||||
|
}
|
||||||
|
else if (t == 1800)
|
||||||
|
{
|
||||||
|
string line = "This film contains violence, explicit language, and flashing images."; // this is such a random reference that ill be surprised if anyone gets it especially outside gb
|
||||||
|
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||||
|
Main.NewText(line, 230, 180, 255);
|
||||||
|
else
|
||||||
|
ChatHelper.BroadcastChatMessage(NetworkText.FromLiteral(line), new Color(230, 180, 255));
|
||||||
|
}
|
||||||
|
// TODO: When audio is finished, switch to Noctis Boss 2 theme (remix of In The End? Or something new? TBA)
|
||||||
|
// After approx 42 seconds (2500 ticks), end invulnerability
|
||||||
|
if (NPC.ai[2] >= 2500)
|
||||||
{
|
{
|
||||||
NPC.dontTakeDamage = false;
|
NPC.dontTakeDamage = false;
|
||||||
NPC.ai[0] = 2;
|
NPC.ai[0] = 2;
|
||||||
NPC.netUpdate = true;
|
NPC.netUpdate = true;
|
||||||
|
|
||||||
string announce = "Niko's barrier fades... the battle resumes.";
|
string announce = "Now get out of my sight.";
|
||||||
if (Main.netMode != NetmodeID.MultiplayerClient)
|
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||||
Main.NewText(announce, 255, 150, 100);
|
Main.NewText(announce, 255, 150, 100);
|
||||||
else
|
else
|
||||||
@@ -181,19 +197,32 @@ namespace ForgottenWawiTech.Content.NPCs.OriginalNiko
|
|||||||
|
|
||||||
public override void OnKill()
|
public override void OnKill()
|
||||||
{
|
{
|
||||||
// Spawn NikoNPC when killed
|
// Ending monologue before playing the final track
|
||||||
/* if (Main.netMode != NetmodeID.MultiplayerClient)
|
// Only if Niko was actually defeated (not fled) and hasn't been defeated before
|
||||||
|
if (!WorldDefeatedBosses.Niko)
|
||||||
{
|
{
|
||||||
NPC.NewNPC(NPC.GetSource_Death(), (int)NPC.Center.X, (int)NPC.Center.Y, ModContent.NPCType<NikoNPC>());
|
string line1 = "With a final breath, Niko whispers...";
|
||||||
}
|
string line2 = "\"gg, no re\"";
|
||||||
else
|
string line3 = "The battlefield falls silent as Niko vanishes.";
|
||||||
{
|
if (Main.netMode != NetmodeID.MultiplayerClient)
|
||||||
NetMessage.SendData(MessageID.SpawnNPC, number: ModContent.NPCType<NikoNPC>(), number2: NPC.whoAmI);
|
{
|
||||||
} */
|
Main.NewText(line1, 255, 100, 100);
|
||||||
|
Main.NewText(line2, 200, 50, 50);
|
||||||
|
Main.NewText(line3, 255, 150, 150);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ChatHelper.BroadcastChatMessage(NetworkText.FromLiteral(line1), new Color(255, 100, 100));
|
||||||
|
ChatHelper.BroadcastChatMessage(NetworkText.FromLiteral(line2), new Color(200, 50, 50));
|
||||||
|
ChatHelper.BroadcastChatMessage(NetworkText.FromLiteral(line3), new Color(255, 150, 150));
|
||||||
|
}
|
||||||
// Set a world flag or similar to indicate Niko has been defeated
|
// Set a world flag or similar to indicate Niko has been defeated
|
||||||
WorldDefeatedBosses.Niko = true;
|
WorldDefeatedBosses.Niko = true;
|
||||||
// Immediate sync of world flags
|
// Immediate sync of world flags
|
||||||
WorldDefeatedBosses.Sync(ModContent.GetInstance<ForgottenWawiTech>());
|
WorldDefeatedBosses.Sync(ModContent.GetInstance<ForgottenWawiTech>());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -299,11 +299,11 @@ NPCs: {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Raccoon.DisplayName: Raccoon
|
Raccoon.DisplayName: Mr Raccoon
|
||||||
Niko.DisplayName: Niko
|
Niko.DisplayName: Astramora Noctis
|
||||||
|
|
||||||
NikoNPC: {
|
NikoNPC: {
|
||||||
DisplayName: Niko
|
DisplayName: Astramora Noctis
|
||||||
|
|
||||||
TownNPCMood: {
|
TownNPCMood: {
|
||||||
Content: I am content.
|
Content: I am content.
|
||||||
|
|||||||
Reference in New Issue
Block a user