Skip to content

Commit

Permalink
informs for lacking stats
Browse files Browse the repository at this point in the history
  • Loading branch information
brightrim committed Nov 24, 2024
1 parent 2c498ff commit bb57808
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
12 changes: 11 additions & 1 deletion item/wands.lua
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ local inspectGlyphedItem = require("magic.arcane.enchanting.core.inspection_of_g
local glyphTutorial = require("magic.arcane.enchanting.core.tutorial")
local spatial = require("magic.arcane.spatial")
local texts = require("magic.base.texts")
local magic = require("base.magic")

local currentWandUse = {}

Expand All @@ -43,6 +44,11 @@ local magicWands = {}

function M.enchantingSelection(user, wand, actionstate)

if not magic.hasMageAttributes(user) then
user:inform("Mit deinem Mangel an magischen Attributen wüsstest du nicht einmal, wo du anfangen sollst, einen Schrein wie diesen zu benutzen.", "With your lack of magical attributes, you wouldn't know where to begin using a shrine like this.") --chatGPT german
return
end

local forgeItem = common.GetItemInArea(user.pos, 3498, 1, true) -- Check if a glyph ritual shrine is in range

if forgeItem and forgeItem.wear <= 3 then -- 10-15 min left on it
Expand Down Expand Up @@ -167,7 +173,11 @@ function M.UseItem(user, sourceItem, actionstate)
if actionstate == Action.none then
if magicWands[sourceItem.id] then
if user:getMagicType() == 0 and (user:getQuestProgress(37) ~= 0 or user:getMagicFlags(0) > 0) then
selectMagicType(user, sourceItem, actionstate)
if not magic.hasMageAttributes(user) then
user:inform("Mit deiner magischen Fähigkeit weißt du kaum, wie man einen Zauberstab hält, geschweige denn benutzt.", "With your magical ability, you barely know how to hold a wand, much less use one.") --chatgpt german
else
selectMagicType(user, sourceItem, actionstate)
end
else
learnMagic.useMagicWand(user, sourceItem)
end
Expand Down
1 change: 1 addition & 0 deletions magic/arcane/oralCasting.lua
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ local function castMagic(user, actionState, spell, portal)

if spell or portal then
if not magic.hasMageAttributes(user) or user:getQuestProgress(37) == 0 then --checking a quest status every time a character speaks will likely cause more lag than the other checks, hence why its the final check
user:inform("Du sprichst den Zauberspruch, aber nichts passiert, da dir die erforderliche magische Fähigkeit fehlt, um Zauber zu wirken.","You speak the incantation, but nothing happens as you do not have the requires magical prowess to cast spells.") --chatgpt german
return -- user is not a mage
end
end
Expand Down

0 comments on commit bb57808

Please sign in to comment.