Skip to content
Snippets Groups Projects
Commit 537c3408 authored by dg's avatar dg
Browse files

Crystal Focus & Heart can not be applied on rare items

Gems can not be put on rare items


git-svn-id: http://svn.net-core.org/repos/t-engine4@5320 51575b47-30f0-44d4-a5cc-537603b46e54
parent cc503095
No related branches found
No related tags found
No related merge requests found
......@@ -18,7 +18,7 @@
-- darkgod@te4.org
local imbue_ring = function(npc, player)
player:showInventory("Imbue which ring?", player:getInven("INVEN"), function(o) return o.type == "jewelry" and o.subtype == "ring" and not o.egoed and not o.unique end, function(ring, ring_item)
player:showInventory("Imbue which ring?", player:getInven("INVEN"), function(o) return o.type == "jewelry" and o.subtype == "ring" and not o.egoed and not o.unique and not o.rare end, function(ring, ring_item)
player:showInventory("Use which gem?", player:getInven("INVEN"), function(gem) return gem.type == "gem" and (gem.material_level or 99) <= ring.material_level and gem.imbue_powers end, function(gem, gem_item)
local price = 10 + gem.material_level * 5 + ring.material_level * 7
if price > player.money then require("engine.ui.Dialog"):simplePopup("Not enough money", "This costs "..price.." gold, you need more gold.") return end
......@@ -38,7 +38,7 @@ local imbue_ring = function(npc, player)
end
local artifact_imbue_amulet = function(npc, player)
player:showInventory("Imbue which amulet?", player:getInven("INVEN"), function(o) return o.type == "jewelry" and o.subtype == "amulet" and not o.egoed and not o.unique end, function(amulet, amulet_item)
player:showInventory("Imbue which amulet?", player:getInven("INVEN"), function(o) return o.type == "jewelry" and o.subtype == "amulet" and not o.egoed and not o.unique and not o.rare end, function(amulet, amulet_item)
player:showInventory("Use which first gem?", player:getInven("INVEN"), function(gem1) return gem1.type == "gem" and (gem1.material_level or 99) <= amulet.material_level and gem1.imbue_powers end, function(gem1, gem1_item)
player:showInventory("Use which second gem?", player:getInven("INVEN"), function(gem2) return gem2.type == "gem" and (gem2.material_level or 99) <= amulet.material_level and gem1.name ~= gem2.name and gem2.imbue_powers end, function(gem2, gem2_item)
local price = 390
......
......@@ -872,7 +872,7 @@ newEntity{ base = "BASE_GEM", define_as = "CRYSTAL_FOCUS",
max_power = 1, power_regen = 1,
use_power = { name = "combine with a weapon", power = 1, use = function(self, who, gem_inven, gem_item)
who:showInventory("Fuse with which weapon?", who:getInven("INVEN"), function(o) return (o.type == "weapon" or o.subtype == "hands") and o.subtype ~= "mindstar" and not o.egoed and not o.unique end, function(o, item)
who:showInventory("Fuse with which weapon?", who:getInven("INVEN"), function(o) return (o.type == "weapon" or o.subtype == "hands") and o.subtype ~= "mindstar" and not o.egoed and not o.unique and not o.rare end, function(o, item)
local oldname = o:getName{do_color=true}
-- Remove the gem
......@@ -939,7 +939,7 @@ newEntity{ base = "BASE_GEM", define_as = "CRYSTAL_HEART",
max_power = 1, power_regen = 1,
use_power = { name = "combine with a suit of body armor", power = 1, use = function(self, who, gem_inven, gem_item)
-- Body armour only, can be cloth, light, heavy, or massive though. No clue if o.slot works for this.
who:showInventory("Fuse with which armor?", who:getInven("INVEN"), function(o) return o.type == "armor" and o.slot == "BODY" and not o.egoed and not o.unique end, function(o, item)
who:showInventory("Fuse with which armor?", who:getInven("INVEN"), function(o) return o.type == "armor" and o.slot == "BODY" and not o.egoed and not o.unique and not o.rare end, function(o, item)
local oldname = o:getName{do_color=true}
-- Remove the gem
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment