Skip to content

Commit

Permalink
Fixed NPC spawn condition
Browse files Browse the repository at this point in the history
  • Loading branch information
Aurocosh committed Sep 20, 2022
1 parent e6bbced commit 0cf6b39
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 23 deletions.
2 changes: 1 addition & 1 deletion Content/NPCs/SpellwrightNPC.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public override bool CanTownNPCSpawn(int numTownNPCs, int money)
for (int k = 0; k < 255; k++)
{
Player player = Main.player[k];
if (player.active && player.statManaMax > 100)
if (player.active && player.statManaMax >= 100)
return true;
}

Expand Down
25 changes: 4 additions & 21 deletions Localization/en-US.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ Mods: {
SpellIsDisabled: Spell is disabled
ModifiersInvalid: Spell modifier is invalid
ArgumentInvalid: Spell argument is invalid
LevelTooLow: Your level is too low
NoResonatorToBind: You have no spell resonator to which you can bind the spell
LevelTooLow: My level is too low
NoResonatorToBind: I have no spell resonator to which I can bind the spell
AlreadyUnlocked: Spell is already unlocked
NotUnlocked: Spell is not yet unlocked
NotEnoughReagents: Not enough reagents. Reagents required: {0}
Expand Down Expand Up @@ -139,23 +139,6 @@ Mods: {
}

PageHandler: {
Home:{
Guide: Guide
SpellTypes: Spell types
SpellModifiers: Spell modifiers
SpellUnlock: Spell unlocking
SpellReagents: Spell reagents
SpellLevels: Spell Levels
Spells: Spells
FavoriteSpells: Favorite spells
UsableSpells: Usable spells
KnownSpells: Known spells
LockedSpells: Locked spells
SpellCosts: Spell costs
Other: Other
PlayerStatus: Player status
}

Static: {
Home:
'''Menu
Expand Down Expand Up @@ -189,7 +172,7 @@ Mods: {
4) After reading Spellwright Teachings talk to the Spellwright again. In order to unlock your spellcrafting ability you have to consume a mystic fruit. There are two types: *[Bizarre Fruit]<ModItem:BizarreFruit> and *[Purified Fruit]<ModItem:PurifiedFruit>. Either one of the fruits will work. Purified Fruit can be bought from Spellwrights store. It is an expensive, but very safe option. Bizarre Fruit you can get for free, but this fruit is much more dangerous to eat. Talk to Spellwright and choose the option "Ask for mystic fruit" and he will give you one Bizarre Fruit free of charge.
5) Eat whichever fruit you got and it will inflict you with a serious debuff for a while. Survive the duration of this debuff and if you do then it will unlock spellcasting for you.
6) Congrats, you are now a fledgeling Spellwright yourself and can cast four basic spells included in Spellwright Teachings.
7) To cast a spell press 'Start incantation' keybind and type in the spell incantation. For example you can type in 'Return' and press enter. When you do so you will be teleported to your spawn location.
7) To cast a spell press 'Start incantation' keybind and type in the spell incantation. For example, you can type in 'Return' and press enter. When you do so you will be teleported to your spawn location.

#[Relevant keybinds]{Header:2}
Start incantation (X by default) - This button will open the spellcasting interface. Simple press of this button will open spellcasting ui, but if you press this button while holding a smart cursor button (Shift by default) then your ingame guidebook will open instead. If you unlocked ingame guidebook, but didn't learn spellcasting yet, then either pressing this button with or without the smart cursor button will open the guidebook.
Expand All @@ -206,7 +189,7 @@ Mods: {

You can get this Spellwright Teachings for free from an npc called Spellwright. This npc will come to your world as soon as your mana will be higher or equal to 100. You don't need to purchase this book from Spellwright, talk to him and choose the dialog option "Ask about spellcraft" and he will give you this book for free. After you acquired Spellwright Teachings your next step is to read through this book. This book is a consumable item, take it in your hand and left click to study it. Upon use the book will disappear, and you will learn essential knowledge of spellcraft, basic spells and unlock an ingame guidebook.

After reading Spellwright Teachings you have to talk to Spellwright again. In order to unlock your spellcrafting ability you have to consume a special mystic fruit. There are two types of mystic fruits that you can eat: *[Bizarre Fruit]<ModItem:BizarreFruit> and *[Purified Fruit]<ModItem:PurifiedFruit>. You don't need to eat both fruits, either one is enough. The only difference between those fruits is that Purified Fruit is much safer and much less likely to kill you. This type of mystic fruit is much safer, but Spellwright won't give it to you for free. You will have to purchase it from his store for a hefty sum. You can alternatively choose a safer option and consume Bizarre Fruit. You can get Bizarre Fruit for free from Spellwright. Talk to him and choose the option "Ask for mystic fruit" and he will give you one Bizarre Fruit for free. If you consume Bizarre Fruit and it kills you, then you can come back to Spellwright and ask for another one, he will give you as many as you need for free.
After reading Spellwright Teachings you have to talk to Spellwright again. In order to unlock your spellcrafting ability you have to consume a special mystic fruit. There are two types of mystic fruits that you can eat: *[Bizarre Fruit]<ModItem:BizarreFruit> and *[Purified Fruit]<ModItem:PurifiedFruit>. You don't need to eat both fruits, either one is enough. The only difference between those fruits is that Purified Fruit is much safer and much less likely to kill you. This type of mystic fruit is much safer, but Spellwright won't give it to you for free. You will have to purchase it from his store for a hefty sum. You can alternatively choose a cheaper option and consume Bizarre Fruit. You can get Bizarre Fruit for free from Spellwright. Talk to him and choose the option "Ask for mystic fruit" and he will give you one Bizarre Fruit for free. If you consume Bizarre Fruit and it kills you, then you can come back to Spellwright and ask for another one, he will give you as many as you need for free.

Eat whichever fruit you got and it will inflict you with a serious debuff called 'Soul Disturbance'. Both mystic fruits will inflict you with this debuff, but the duration of the debuff will be drastically different depending on the type of fruit. Duration will be very long if you consume Bizarre Fruit and it will be very short if you consume Purified Fruit. Soul disturbance debuff will torment you with random and unpredictable effects while it is active. To overcome this trial you just have to survive for the duration of this debuff. When the effect of this debuff ends it will unlock your spellcasting ability permanently.

Expand Down
2 changes: 1 addition & 1 deletion build.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
displayName = Spellwright
author = Aurocosh
version = 0.8.1.2
version = 0.8.1.3
dllReferences = NetSerializer
languageVersion = 7
buildIgnore = *.csproj, *.sln, *.user, *.md, obj\*, bin\*, .vs\*, .git\*, .gitignore
Expand Down

0 comments on commit 0cf6b39

Please sign in to comment.