diff --git a/game/modules/tome/data/chats/angolwen-staves-store.lua b/game/modules/tome/data/chats/angolwen-staves-store.lua index 9bb824d29db10f031a0ba6eb1ef0894357c44627..c2501cf52c71efb61696764997a621cf156d6bf9 100644 --- a/game/modules/tome/data/chats/angolwen-staves-store.lua +++ b/game/modules/tome/data/chats/angolwen-staves-store.lua @@ -30,28 +30,49 @@ newChat{ id="welcome", } newChat{ id="training", - text = [[I can briefly go over the basics (talent category Spell/Staff-combat, locked) for a fee of 100 gold pieces. Alternatively, I can provide a more in-depth study for 750.]], + text = [[I can teach you staff combat (talent category Spell/Staff combat). Learning the basics costs 100 gold, while more intensive tutelage to gain proficiency costs 500 gold. Once you're proficient, I can teach you more refined techniques for an additional 750 gold.]], answers = { - {"Just give me the basics.", action=function(npc, player) + {"Just give me the basics (reveals locked talent category) - 100 gold.", action=function(npc, player) -- Normal basic training game.logPlayer(player, "The staff carver spends some time with you, teaching you the basics of staff combat.") player:incMoney(-100) player:learnTalentType("spell/staff-combat", false) + if player:getTalentTypeMastery("spell/staff-combat") < 1 then + player:setTalentTypeMastery("spell/staff-combat", math.min(1.1, player:getTalentTypeMastery("spell/staff-combat") + 0.3)) + game.logPlayer(player, "He is surprised at how quickly you are able to follow his tutelage.") + end player.changed = true end, cond=function(npc, player) if player.money < 100 then return end - --if player:knowTalentType("spell/staff-combat") then return end if player:knowTalentType("spell/staff-combat") or player:knowTalentType("spell/staff-combat") == false then return end return true end}, - {"Please teach me all there is to know.", action=function(npc, player) - game.logPlayer(player, "The staff carver spends a great deal of time going over the finer details of staff combat with you.") + {("Please teach me what I need to know (unlocks talent category) - %d gold."):format(500), + action=function(npc, player) --Normal intensive training + game.logPlayer(player, "The staff carver spends a substantial amount of time teaching you all of the techniques of staff combat.") + player:incMoney(-500) + player:learnTalentType("spell/staff-combat", true) + if player:getTalentTypeMastery("spell/staff-combat") < 1 then -- Special case for previously locked category (escort) + player:setTalentTypeMastery("spell/staff-combat", math.max(1.0, player:getTalentTypeMastery("spell/staff-combat") + 0.3)) + end + if player:getTalentTypeMastery("spell/staff-combat") > 1 then + game.logPlayer(player, "He is impressed with your mastery and shows you a few extra techniques.") + end + player.changed = true + end, + cond=function(npc, player) + if player.money < 500 then return end + if player:knowTalentType("spell/staff-combat") then return end + return true + end}, + {"I'm already proficient, but I want to be an expert (improves talent mastery by 0.2) - 750 gold.", action=function(npc, player) --Enhanced intensive training player:incMoney(-750) player:learnTalentType("spell/staff-combat", true) + player:setTalentTypeMastery("spell/staff-combat", player:getTalentTypeMastery("spell/staff-combat") + 0.2) + game.logPlayer(player, ("The staff carver spends a great deal of time going over the finer details of staff combat with you%s."):format(player:getTalentTypeMastery("spell/staff-combat")>1 and ", including some esoteric techniques" or "")) player.changed = true end, cond=function(npc, player) if player.money < 750 then return end - if player:knowTalentType("spell/staff-combat") then return end - return true + if player:knowTalentType("spell/staff-combat") and player:getTalentTypeMastery("spell/staff-combat") < 1.2 then return true end end}, {"No thanks."}, } diff --git a/game/modules/tome/data/chats/zigur-mindstar-store.lua b/game/modules/tome/data/chats/zigur-mindstar-store.lua index 75bf79e6476639b31360dd73cfe5428c5b91d2e7..5aecd6eb49444d9e75b327555a8ea2169ad35cfe 100644 --- a/game/modules/tome/data/chats/zigur-mindstar-store.lua +++ b/game/modules/tome/data/chats/zigur-mindstar-store.lua @@ -30,29 +30,48 @@ newChat{ id="welcome", } newChat{ id="training", - text = [[I can briefly go over the basics (talent category Wild-gift/Mindstar-mastery, locked) for a fee of 100 gold pieces. Alternatively, I can provide a more in-depth study for 750.]], + text = [[I can teach you mindstar mastery (talent category Wild-gift/Mindstar mastery). Learning the basics costs 100 gold, while more intensive training to gain proficiency costs 500 gold. Once you're proficient, I can teach you some additional skills for 750 gold.]], answers = { - {"Just give me the basics.", action=function(npc, player) + {"Just give me the basics (reveals locked talent category) - 100 gold.", action=function(npc, player) -- Normal basic training game.logPlayer(player, "The shopkeeper spends some time with you, teaching you the basics of channeling energy through mindstars.") player:incMoney(-100) player:learnTalentType("wild-gift/mindstar-mastery", false) + if player:getTalentTypeMastery("wild-gift/mindstar-mastery") < 1 then + player:setTalentTypeMastery("wild-gift/mindstar-mastery", math.min(1.1, player:getTalentTypeMastery("wild-gift/mindstar-mastery") + 0.3)) + game.logPlayer(player, "He is impressed with your affinity for natural forces.") + end player.changed = true end, cond=function(npc, player) if player.money < 100 then return end - --if player:knowTalentType("wild-gift/mindstar-mastery") then return end if player:knowTalentType("wild-gift/mindstar-mastery") or player:knowTalentType("wild-gift/mindstar-mastery") == false then return end return true end}, - {"Please teach me all there is to know.", action=function(npc, player) + {"Please teach me what I need to know (unlocks talent category) - 500 gold.", action=function(npc, player) game.logPlayer(player, "The shopkeeper spends a great deal of time going over the finer details of channeling energy through mindstars with you.") - player:incMoney(-750) + player:incMoney(-500) player:learnTalentType("wild-gift/mindstar-mastery", true) + if player:getTalentTypeMastery("wild-gift/mindstar-mastery") < 1 then -- Special case for previously locked category (escort) + player:setTalentTypeMastery("wild-gift/mindstar-mastery", math.max(1.0, player:getTalentTypeMastery("wild-gift/mindstar-mastery") + 0.3)) + end + if player:getTalentTypeMastery("wild-gift/mindstar-mastery") > 1 then + game.logPlayer(player, "He is impressed with your mastery and shows you a few tricks to handle stronger energy flows.") + end player.changed = true end, cond=function(npc, player) - if player.money < 750 then return end + if player.money < 500 then return end if player:knowTalentType("wild-gift/mindstar-mastery") then return end return true end}, + {"I'm already proficient, but I want to be an expert (improves talent mastery by 0.2) - 750 gold.", action=function(npc, player) --Enhanced intensive training + player:incMoney(-750) + player:learnTalentType("wild-gift/mindstar-mastery", true) + player:setTalentTypeMastery("wild-gift/mindstar-mastery", player:getTalentTypeMastery("wild-gift/mindstar-mastery") + 0.2) + game.logPlayer(player, ("The shopkeeper spends a great deal of time going over the finer details of channeling energy through mindstars with you%s."):format(player:getTalentTypeMastery("wild-gift/mindstar-mastery")>1 and ", and teaches you enhanced mental discipline needed to maintain powerful energy fields" or "")) + player.changed = true + end, cond=function(npc, player) + if player.money < 750 then return end + if player:knowTalentType("wild-gift/mindstar-mastery") and player:getTalentTypeMastery("wild-gift/mindstar-mastery") < 1.2 then return true end + end}, {"No thanks."}, } }