Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- newEntity{ base = "BASE_GEM", define_as = "CRYSTAL_FOCUS",
- power_source = {arcane=true},
- unique = true,
- unided_name = "scintillating crystal",
- name = "Crystal Focus", subtype = "multi-hued",
- color = colors.WHITE, image = "object/artifact/crystal_focus.png",
- level_range = {5, 12},
- desc = [[This crystal radiates the power of the Spellblaze itself.]],
- special_desc = function(self) return "(The created item can be activated to recover the Focus.)" end,
- rarity = 200,
- identified = false,
- cost = 50,
- material_level = 2,
- color_attributes = {
- damage_type = 'ARCANE',
- alt_damage_type = 'ARCANE_SILENCE',
- particle = 'manathrust',
- },
- wielder = {
- inc_stats = {[Stats.STAT_MAG] = 5 },
- inc_damage = {[DamageType.ARCANE] = 20, [DamageType.BLIGHT] = 20 },
- },
- max_power = 1, power_regen = 1,
- use_power = { name = "combine with a weapon (makes a non enchanted weapon into an artifact)", 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" or o.subtype == "shield") and o.subtype ~= "mindstar" and not o.egoed and not o.unique and not o.rare and not o.archery end, function(o, item)
- local oldname = o:getName{do_color=true}
- -- Remove the gem
- who:removeObject(gem_inven, gem_item)
- who:sortInven(gem_inven)
- local Entity = require("engine.Entity")
- local ActorStats = require("engine.interface.ActorStats")
- local crystalline_ego = Entity.new{
- name = "crystalline weapon",
- no_unique_lore = true,
- is_crystalline_weapon = true,
- power_source = {arcane=true},
- wielder = {
- combat_spellpower = 12,
- combat_dam = 12,
- inc_stats = {
- [ActorStats.STAT_WIL] = 3,
- [ActorStats.STAT_CON] = 3,
- },
- inc_damage = {ARCANE=10},
- },
- set_list = { {"is_crystalline_armor", true} },
- on_set_complete = function(self, wearer)
- self.talent_on_spell = { {chance=10, talent="T_MANATHRUST", level=3} }
- local weapon = self.combat or self.wielder.combat or self.special_combat
- if weapon then weapon.talent_on_hit = { T_MANATHRUST = {level=3, chance=10} } end
- self:specialSetAdd({"wielder","combat_spellcrit"}, 10)
- self:specialSetAdd({"wielder","combat_physcrit"}, 10)
- self:specialSetAdd({"wielder","resists_pen"}, {[engine.DamageType.ARCANE]=20, [engine.DamageType.PHYSICAL]=15})
- game.logPlayer(wearer, "#GOLD#As the crystalline weapon and armour are brought together, they begin to emit a constant humming.")
- end,
- on_set_broken = function(self, wearer)
- local weapon = self.combat or self.wielder.combat or self.special_combat
- self.talent_on_spell = nil
- if weapon then weapon.talent_on_hit = nil end
- game.logPlayer(wearer, "#GOLD#The humming from the crystalline artifacts fades as they are separated.")
- end,
- resolvers.generic(function(o)
- o.name = "Crystalline "..o.name:capitalize()
- o.unique = o.name
- o.desc = (o.desc or "") .." Transformed with the power of the Spellblaze."
- end),
- resolvers.generic(function(o)
- if o.combat and o.combat.dam then
- o.combat.dam = o.combat.dam * 1.25
- o.combat.damtype = engine.DamageType.ARCANE
- elseif o.wielder.combat and o.wielder.combat.dam then
- o.wielder.combat.dam = o.wielder.combat.dam * 1.25
- o.wielder.combat.convert_damage = o.wielder.combat.convert_damage or {}
- o.wielder.combat.convert_damage[engine.DamageType.ARCANE] = 100
- elseif o.special_combat then
- if o.special_combat.dam then
- o.special_combat.dam = o.special_combat.dam * 1.25
- o.special_combat.damtype = engine.DamageType.ARCANE
- end
- if o.special_combat.block then
- o.special_combat.block = o.special_combat.block * 1.25
- end
- end
- o.power = 1
- o.max_power = 1
- o.power_regen = 1
- o.use_no_wear = true
- o.use_power = { name = "recover the Crystal Focus (destroys this weapon)", power = 1, use = function(self, who, inven, item)
- local art_list = mod.class.Object:loadList("/data/general/objects/objects-maj-eyal.lua")
- local o = art_list.CRYSTAL_FOCUS:clone()
- o:resolve()
- o:resolve(nil, true)
- o:identify(true)
- who:addObject(who.INVEN_INVEN, o)
- who:sortInven(who.INVEN_INVEN)
- local name = self:getName({no_count=true, force_id=true, no_add_name=true})
- for i, h in ipairs(who.hotkey) do
- if h[2] == name then who.hotkey[i] = nil end
- end
- who.changed = true
- game.logPlayer(who, "You created: %s", o:getName{do_color=true})
- return {used=true, id=true, destroy=true}
- end }
- end),
- resolvers.genericlast(function(o) if o.wielder.learn_talent then o.wielder.learn_talent["T_COMMAND_STAFF"] = nil end end),
- fake_ego = true,
- }
- game.zone:applyEgo(o, crystalline_ego, "object", true)
- local images = {
- battleaxe = "object/artifact/2haxe_crystalline.png",
- greatmaul = "object/artifact/2hmace_crystalline.png",
- greatsword = "object/artifact/2hsword_crystalline.png",
- dagger = "object/artifact/dagger_crystalline.png",
- longsword = "object/artifact/1hsword_crystalline.png",
- mace = "object/artifact/1hmace_crystalline.png",
- waraxe = "object/artifact/1haxe_crystalline.png",
- shield = "object/artifact/shield_crystalline.png",
- staff = "object/artifact/staff_crystalline.png",
- trident = "object/artifact/trident_crystalline.png",
- hands = "object/artifact/gauntlets_crystalline.png",
- }
- if images[o.subtype] then o.image = images[o.subtype] o:removeAllMOs() end
- o:resolve()
- who:sortInven()
- who.changed = true
- game.logPlayer(who, "You fix the crystal on the %s and create the %s.", oldname, o:getName{do_color=true})
- end)
- end,
- no_npc_use = true},
- }
- newEntity{ base = "BASE_GEM", define_as = "CRYSTAL_HEART",
- power_source = {arcane=true},
- unique = true,
- unided_name = "coruscating crystal",
- name = "Crystal Heart", subtype = "multi-hued",
- color = colors.RED, image = "object/artifact/crystal_heart.png",
- level_range = {35, 42},
- desc = [[This crystal is huge, easily the size of your head. It sparkles brilliantly almost of its own accord.]],
- special_desc = function(self) return "(The created item can be activated to recover the Heart.)" end,
- rarity = 250,
- identified = false,
- cost = 200,
- material_level = 5,
- color_attributes = {
- damage_type = 'ARCANE',
- alt_damage_type = 'ARCANE_SILENCE',
- particle = 'manathrust',
- },
- wielder = {
- inc_stats = {[Stats.STAT_CON] = 5 },
- resists = {[DamageType.ARCANE] = 20, [DamageType.BLIGHT] = 20 },
- },
- max_power = 1, power_regen = 1,
- use_power = { name = "combine with a suit of body armor (makes a non enchanted armour into an artifact)", 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 and not o.rare end, function(o, item)
- local oldname = o:getName{do_color=true}
- -- Remove the gem
- who:removeObject(gem_inven, gem_item)
- who:sortInven(gem_inven)
- local Entity = require("engine.Entity")
- local ActorStats = require("engine.interface.ActorStats")
- local crystalline_ego = Entity.new{
- name = "crystalline armour",
- no_unique_lore = true,
- is_crystalline_armor = true,
- power_source = {arcane=true},
- wielder = {
- combat_spellresist = 35,
- combat_physresist = 25,
- inc_stats = {
- [ActorStats.STAT_MAG] = 8,
- [ActorStats.STAT_CON] = 8,
- [ActorStats.STAT_LCK] = 12,
- },
- resists = {ARCANE=35, PHYSICAL=15},
- poison_immune=0.6,
- disease_immune=0.6,
- },
- set_list = { {"is_crystalline_weapon", true} },
- on_set_complete = function(self, who)
- self:specialSetAdd({"wielder","stun_immune"}, 0.5)
- self:specialSetAdd({"wielder","blind_immune"}, 0.5)
- end,
- resolvers.generic(function(o)
- o.name = "Crystalline "..o.name:capitalize()
- o.unique = o.name
- o.desc = (o.desc or "") .." Transformed with the power of the Spellblaze."
- end),
- resolvers.generic(function(o)
- -- This is supposed to add 1 def for crap cloth robes if for some reason you choose it instead of better robes, and then multiply by 1.25.
- o.wielder.combat_def = ((o.wielder.combat_def or 0) + 2) * 1.7
- -- Same for armour. Yay crap cloth!
- o.wielder.combat_armor = ((o.wielder.combat_armor or 0) + 3) * 1.7
- o.power = 1
- o.max_power = 1
- o.power_regen = 1
- o.use_no_wear = true
- o.use_power = { name = "recover the Crystal Heart (destroys this armour)", power = 1, use = function(self, who, inven, item)
- local art_list = mod.class.Object:loadList("/data/general/objects/objects-maj-eyal.lua")
- local o = art_list["CRYSTAL_HEART"]:clone()
- o:resolve()
- o:resolve(nil, true)
- o:identify(true)
- who:addObject(who.INVEN_INVEN, o)
- who:sortInven(who.INVEN_INVEN)
- local name = self:getName({no_count=true, force_id=true, no_add_name=true})
- for i, h in ipairs(who.hotkey) do
- if h[2] == name then who.hotkey[i] = nil end
- end
- who.changed = true
- game.logPlayer(who, "You created: %s", o:getName{do_color=true})
- return {used=true, id=true, destroy=true}
- end }
- end),
- }
- game.zone:applyEgo(o, crystalline_ego, "object", true)
- local images = {
- cloth = "object/artifact/cloth_armour_crystalline.png",
- leather = "object/artifact/leather_armour_crystalline.png",
- heavy = "object/artifact/heavy_armour_crystalline.png",
- massive = "object/artifact/massive_armour_crystalline.png",
- }
- if images[o.subtype] then o.image = images[o.subtype] o:removeAllMOs() end
- o:resolve()
- who:sortInven()
- who.changed = true
- game.logPlayer(who, "You fix the crystal on the %s and create the %s.", oldname, o:getName{do_color=true})
- end)
- end,
- no_npc_use = true},
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement