From b486d8ac65169c6357e6466a6694600a5250fbbe Mon Sep 17 00:00:00 2001 From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54> Date: Sat, 4 Jun 2011 09:37:13 +0000 Subject: [PATCH] plop git-svn-id: http://svn.net-core.org/repos/t-engine4@3586 51575b47-30f0-44d4-a5cc-537603b46e54 --- game/modules/tome/class/Actor.lua | 18 ++++----- game/modules/tome/class/Object.lua | 2 + game/modules/tome/class/interface/Combat.lua | 2 + .../data/general/objects/boss-artifacts.lua | 4 +- .../data/general/objects/world-artifacts.lua | 38 ++++++++++++++++++- .../tome/data/gfx/particles/arcane_power.lua | 16 ++++---- 6 files changed, 61 insertions(+), 19 deletions(-) diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua index c7ba11da1e..b9980eb494 100644 --- a/game/modules/tome/class/Actor.lua +++ b/game/modules/tome/class/Actor.lua @@ -448,15 +448,6 @@ function _M:defineDisplayCallback() local f_neutral = nil self._mo:displayCallback(function(x, y, w, h, zoom, on_map) - local e - for i = 1, #ps do - e = ps[i] - e:checkDisplay() - if e.ps:isAlive() then e.ps:toScreen(x + w / 2, y + h / 2, true, w / game.level.map.tile_w) - else self:removeParticles(e) - end - end - -- Tactical info if game.level and game.level.map.view_faction then local map = game.level.map @@ -497,6 +488,15 @@ function _M:defineDisplayCallback() end end + local e + for i = 1, #ps do + e = ps[i] + e:checkDisplay() + if e.ps:isAlive() then e.ps:toScreen(x + w / 2, y + h / 2, true, w / game.level.map.tile_w) + else self:removeParticles(e) + end + end + return true end) end diff --git a/game/modules/tome/class/Object.lua b/game/modules/tome/class/Object.lua index 06d84a7a69..65e20ff448 100644 --- a/game/modules/tome/class/Object.lua +++ b/game/modules/tome/class/Object.lua @@ -680,6 +680,8 @@ function _M:getTextualDesc(compare_with) compare_fields(w, compare_with, field, "mana_regen_on_hit", "%+.2f", "Mana when hit: ") compare_fields(w, compare_with, field, "equilibrium_regen_on_hit", "%+.2f", "Equilibrium when hit: ") + compare_fields(w, compare_with, field, "mana_on_crit", "%+.2f", "Mana when firing critical spell: ") + compare_fields(w, compare_with, field, "max_life", "%+.2f", "Maximum life: ") compare_fields(w, compare_with, field, "max_mana", "%+.2f", "Maximum mana: ") compare_fields(w, compare_with, field, "max_stamina", "%+.2f", "Maximum stamina: ") diff --git a/game/modules/tome/class/interface/Combat.lua b/game/modules/tome/class/interface/Combat.lua index 399b1195bc..97ac3ae27d 100644 --- a/game/modules/tome/class/interface/Combat.lua +++ b/game/modules/tome/class/interface/Combat.lua @@ -760,6 +760,8 @@ function _M:spellCrit(dam, add_chance) crit = true game.logSeen(self, "%s's spell attains critical power!", self.name:capitalize()) + if self:attr("mana_on_crit") then self:incMana(self:attr("mana_on_crit")) end + if self:isTalentActive(self.T_BLOOD_FURY) then local t = self:getTalentFromId(self.T_BLOOD_FURY) t.on_crit(self, t) diff --git a/game/modules/tome/data/general/objects/boss-artifacts.lua b/game/modules/tome/data/general/objects/boss-artifacts.lua index e74095b0a6..af68a0be81 100644 --- a/game/modules/tome/data/general/objects/boss-artifacts.lua +++ b/game/modules/tome/data/general/objects/boss-artifacts.lua @@ -500,8 +500,8 @@ newEntity{ base = "BASE_STAFF", dammod = {mag=1.0}, }, wielder = { - combat_spellpower = 25, - combat_spellcrit = 5, + combat_spellpower = 30, + combat_spellcrit = 15, combat_mentalresist = 8, inc_stats = { [Stats.STAT_WIL] = 5, }, }, diff --git a/game/modules/tome/data/general/objects/world-artifacts.lua b/game/modules/tome/data/general/objects/world-artifacts.lua index 646bac4918..37d450014f 100644 --- a/game/modules/tome/data/general/objects/world-artifacts.lua +++ b/game/modules/tome/data/general/objects/world-artifacts.lua @@ -112,6 +112,41 @@ newEntity{ base = "BASE_STAFF", }, } +newEntity{ base = "BASE_STAFF", + power_source = {arcane=true}, + unique = true, + name = "Lost Staff of Archmage Tarelion", + unided_name = "shining staff", + level_range = {37, 50}, + color=colors.VIOLET, + rarity = 250, + desc = [[Archmage Tarelion traveled the world in his youth. But the world is not a nice place and it seems he had to run fast.]], + cost = 400, + material_level = 5, + + require = { stat = { mag=48 }, }, + combat = { + dam = 38, + apr = 4, + dammod = {mag=1.5}, + damtype = DamageType.ARCANE, + }, + wielder = { + inc_stats = { [Stats.STAT_WIL] = 7, [Stats.STAT_MAG] = 8 }, + max_mana = 40, + combat_spellpower = 35, + combat_spellcrit = 15, + inc_damage = { [DamageType.ARCANE] = 24, [DamageType.FIRE] = 24, [DamageType.COLD] = 24, [DamageType.LIGHTNING] = 24, }, + silence_immune = 0.4, + mana_on_crit = 12, + talent_cd_reduction={ + [Talents.T_ICE_STORM] = 2, + [Talents.T_FIREFLASH] = 2, + [Talents.T_CHAIN_LIGHTNING] = 2, + }, + }, +} + newEntity{ base = "BASE_RING", power_source = {nature=true}, unique = true, @@ -1415,11 +1450,12 @@ newEntity{ base = "BASE_STAFF", define_as = "VOICE_TELOS", combat = { dam = 1, }, wielder = { combat_spellpower = 30, + combat_spellcrit = 15, max_mana = 100, inc_stats = { [Stats.STAT_MAG] = 6, [Stats.STAT_WIL] = 5, [Stats.STAT_CUN] = 4 }, lite = 1, - inc_damage = { all=7 }, + inc_damage = { all=14 }, }, } diff --git a/game/modules/tome/data/gfx/particles/arcane_power.lua b/game/modules/tome/data/gfx/particles/arcane_power.lua index 80a4157352..542f5240bd 100644 --- a/game/modules/tome/data/gfx/particles/arcane_power.lua +++ b/game/modules/tome/data/gfx/particles/arcane_power.lua @@ -22,19 +22,21 @@ base_size = 32 return { generator = function() local ad = rng.range(0, 360) local a = math.rad(ad) - local dir = math.rad(ad) + local dir = math.rad(90) local r = rng.range(18, 22) local dirchance = rng.chance(2) + local x = rng.range(-16, 16) + local y = 16 - math.abs(math.sin(x / 16) * 8) return { trail = 1, - life = 10, - size = 4, sizev = -0.1, sizea = 0, + life = rng.range(10, 18), + size = rng.range(2, 3), sizev = 0, sizea = 0.005, - x = r * math.cos(a), xv = 0, xa = 0, - y = r * math.sin(a), yv = 0, ya = 0, - dir = dir, dirv = 0.1, dira = 0, - vel = dirchance and 0.6 or -0.6, velv = 0, vela = dirchance and -0.02 or 0.02, + x = x, xv = 0, xa = 0, + y = y, yv = 0, ya = -0.2, + dir = 0, dirv = 0, dira = 0, + vel = 0, velv = 0, vela = 0, r = rng.range(30, 220)/255, rv = rng.range(0, 10)/100, ra = 0, g = 0, gv = 0, ga = 0, -- GitLab