Skip to content
Snippets Groups Projects
Commit 6186fa48 authored by Chris Davidson's avatar Chris Davidson
Browse files

Update Weapon egos

parent 8bae2d4a
No related branches found
No related tags found
No related merge requests found
......@@ -62,12 +62,12 @@ newEntity{
greater_ego = 1,
rarity = 25,
cost = 30,
combat = { physspeed = -0.1 },
wielder = {
combat_atk = resolvers.mbonus_material(10, 5),
combat_atk = resolvers.mbonus_material(20, 5),
inc_stats = {
[Stats.STAT_DEX] = resolvers.mbonus_material(6, 1),
},
combat_physspeed = 0.1,
},
}
......@@ -75,7 +75,7 @@ newEntity{
power_source = {technique=true},
name = "truestriking ", prefix=true, instant_resolve=true,
keywords = {truestriking=true},
level_range = {30, 50},
level_range = {20, 50},
greater_ego = 1,
rarity = 15,
cost = 40,
......@@ -92,7 +92,7 @@ newEntity{
power_source = {technique=true},
name = "warbringer's ", prefix=true, instant_resolve=true,
keywords = {warbringer=true},
level_range = {30, 50},
level_range = {20, 50},
greater_ego = 1,
rarity = 30,
cost = 40,
......@@ -131,7 +131,7 @@ newEntity{
power_source = {technique=true},
name = " of evisceration", suffix=true, instant_resolve=true ,
keywords = {evisc=true},
level_range = {30, 50},
level_range = {20, 50},
greater_ego = 1,
unique_ego = 1,
rarity = 20,
......@@ -142,22 +142,23 @@ newEntity{
},
combat = {
special_on_crit = {
desc=function(self, who, special)
local dam, hf = special.wound(self.combat, who)
return ("Wound the target dealing #RED#%d#LAST# physical damage across 5 turns and reducing healing by %d%%"):format(dam, hf)
end,
wound=function(combat, who)
local dam = math.floor(who:combatStatScale(who:combatPhysicalpower(), 30, 250))
local hf = 50
return dam, hf
end,
fct=function(combat, who, target, dam, special)
if target:canBe("cut") then
local dam, hf = special.wound(combat, who)
local check = math.max(who:combatSpellpower(), who:combatMindpower(), who:combatAttack())
target:setEffect(target.EFF_DEEP_WOUND, 5, {src=who, heal_factor=hf, power=who:physicalCrit(dam) / 5, apply_power=check})
desc=function(self, who, special)
local dam, hf = special.wound(self.combat, who)
return ("Wound the target dealing #RED#%d#LAST# physical damage across 5 turns and reducing healing by %d%%"):format(dam, hf)
end,
wound=function(combat, who)
local dam = math.floor(who:combatStatScale(who:combatPhysicalpower(), 1, 350)) -- Doesn't stack
local hf = 50
return dam, hf
end,
fct=function(combat, who, target, dam, special)
if target:canBe("cut") then
local dam, hf = special.wound(combat, who)
local check = math.max(who:combatSpellpower(), who:combatMindpower(), who:combatAttack())
target:setEffect(target.EFF_DEEP_WOUND, 5, {src=who, heal_factor=hf, power=who:physicalCrit(dam) / 5, apply_power=check})
end
end
end},
},
},
}
......@@ -165,7 +166,7 @@ newEntity{
power_source = {technique=true},
name = " of rage", suffix=true, instant_resolve=true,
keywords = {rage=true},
level_range = {30, 50},
level_range = {20, 50},
greater_ego = 1,
rarity = 25,
cost = 35,
......@@ -184,13 +185,13 @@ newEntity{
power_source = {technique=true},
name = " of ruin", suffix=true, instant_resolve=true,
keywords = {ruin=true},
level_range = {30, 50},
level_range = {40, 50},
greater_ego = 1,
rarity = 20,
cost = 25,
wielder = {
combat_physcrit = resolvers.mbonus_material(10, 5),
combat_critical_power = resolvers.mbonus_material(10, 10),
combat_critical_power = resolvers.mbonus_material(25, 10),
combat_apr = resolvers.mbonus_material(10, 5),
},
}
......@@ -199,7 +200,7 @@ newEntity{
power_source = {technique=true},
name = " of shearing", suffix=true, instant_resolve=true,
keywords = {shearing=true},
level_range = {30, 50},
level_range = {20, 50},
greater_ego = 1,
rarity = 20,
cost = 40,
......@@ -227,61 +228,63 @@ newEntity{
special_on_crit = {
desc=function(self, who, special)
local dam = special.acid_splash(who)
return ("Splash the target with acid dealing #ORCHID#%d#LAST# damage over 5 turns and reducing armor and accuracy by #ORCHID#%d#LAST#"):format(dam, math.ceil(dam / 10))
return ("Splash the target with acid dealing #VIOLET#%d#LAST# damage over 5 turns and reducing armor and accuracy by #VIOLET#%d#LAST#"):format(dam, math.ceil(dam / 8))
end,
acid_splash=function(who)
local dam = math.floor(who:combatStatScale(who:combatSpellpower(), 30, 250))
local dam = math.floor(who:combatStatScale(who:combatSpellpower(), 1, 250))
return dam
end,
fct=function(combat, who, target, dam, special)
local power = special.acid_splash(who)
local check = math.max(who:combatSpellpower(), who:combatMindpower(), who:combatAttack())
target:setEffect(target.EFF_ACID_SPLASH, 5, {apply_power = check, src=who, dam=who:spellCrit(power) / 5, atk = math.ceil(power / 5), armor = math.ceil(power / 5)})
end},
target:setEffect(target.EFF_ACID_SPLASH, 5, {apply_power = check, src=who, dam=who:spellCrit(power) / 5, atk = math.ceil(power / 8), armor = math.ceil(power / 8)})
end
},
},
}
newEntity{
power_source = {arcane=true},
name = "arcing ", prefix=true, instant_resolve=true,
keywords = {arcing=true},
level_range = {1, 50},
unique_ego = 1,
rarity = 5,
cost = 10,
combat = {
special_on_hit = {
desc=function(self, who, special)
local dam = special.arc(who)
return ("25%% chance for lightning to arc to a second target dealing #ORCHID#%d#LAST# damage"):format(dam)
return ("#LIGHT_GREEN#25%%#LAST# chance for lightning to strike from the target to a second target dealing #VIOLET#%d#LAST# damage"):format(dam)
end,
arc=function(who)
local dam = math.floor(who:combatStatScale(who:combatSpellpower(), 30, 250))
local dam = math.floor(who:combatStatScale(who:combatSpellpower(), 1, 150))
return dam
end,
on_kill=1, fct=function(combat, who, target, dam, special)
on_kill=1,
fct=function(combat, who, target, dam, special)
if not rng.percent(25) then return end
local tgts = {}
local x, y = target.x, target.y
local grids = core.fov.circle_grids(x, y, 5, true)
local grids = core.fov.circle_grids(x, y, 10, true)
local tg = {type="beam", range=10, friendlyfire=false, x=target.x, y=target.y}
for x, yy in pairs(grids) do for y, _ in pairs(grids[x]) do
local a = game.level.map(x, y, engine.Map.ACTOR)
if a and a ~= target and who:reactionToward(a) < 0 then
if a and a ~= target and who:reactionToward(a) < 0 and who:canProject(tg, x, y) then
tgts[#tgts+1] = a
end
end end
-- Randomly take targets
local tg = {type="beam", range=5, friendlyfire=false, x=target.x, y=target.y}
if #tgts <= 0 then return end
local a, id = rng.table(tgts)
table.remove(tgts, id)
local target2 = (#tgts >= 0) and rng.table(tgts) or target
local dam = who:spellCrit(special.arc(who))
who:project(tg, a.x, a.y, engine.DamageType.LIGHTNING, rng.avg(1, dam, 3))
game.level.map:particleEmitter(x, y, math.max(math.abs(a.x-x), math.abs(a.y-y)), "lightning", {tx=a.x-x, ty=a.y-y})
if target2 ~= target then who:project({type="hit"}, target.x, target.y, engine.DamageType.LIGHTNING, dam) end
who:project(tg, target2.x, target2.y, engine.DamageType.LIGHTNING, dam)
game.level.map:particleEmitter(x, y, math.max(math.abs(target2.x-x), math.abs(target2.y-y)), "lightning", {tx=target2.x-x, ty=target2.y-y})
game:playSoundNear(who, "talents/lightning")
end},
end
},
},
}
......@@ -334,8 +337,8 @@ newEntity{
rarity = 15,
cost = 30,
combat={
apr = resolvers.mbonus_material(10, 5),
phasing = resolvers.mbonus_material(50, 10)
apr = resolvers.mbonus_material(20, 5),
phasing = resolvers.mbonus_material(10, 10)
},
}
......@@ -348,7 +351,7 @@ newEntity{
cost = 30,
combat={
melee_project = {
[DamageType.BLIGHT] = resolvers.mbonus_material(25, 5),
[DamageType.BLIGHT] = resolvers.mbonus_material(15, 5),
[DamageType.ITEM_BLIGHT_DISEASE] = resolvers.mbonus_material(25, 5),
},
},
......@@ -375,7 +378,7 @@ newEntity{
-- Greater Egos
-- laggy
-- laggy/blocks view, needs new gfx
newEntity{
power_source = {arcane=true},
name = "elemental ", prefix=true, instant_resolve=true,
......@@ -385,38 +388,40 @@ newEntity{
unique_ego = 1,
rarity = 25,
cost = 35,
elemental_values = {dam=resolvers.mbonus_material(25, 5), pen=resolvers.mbonus_material(25, 5)}, -- We can't add this until the element is picked for sure
wielder = {
resists_pen={
[DamageType.ACID] = resolvers.mbonus_material(10, 7),
[DamageType.LIGHTNING] = resolvers.mbonus_material(10, 7),
[DamageType.FIRE] = resolvers.mbonus_material(10, 7),
[DamageType.COLD] = resolvers.mbonus_material(10, 7),
},
resists_pen = resolvers.genericlast(function(e)
return {[e.combat.elemental_element[1]] = e.elemental_values.dam}
end),
inc_damage = resolvers.genericlast(function(e)
return {[e.combat.elemental_element[1]] = e.elemental_values.pen}
end)
},
combat = {
elements = {
{engine.DamageType.FIRE, "flame"},
{engine.DamageType.COLD, "freeze"},
{engine.DamageType.LIGHTNING, "lightning_explosion"},
{engine.DamageType.ACID, "acid"},
},
elemental_element = resolvers.rngtable{
{engine.DamageType.FIRE, "flame", "fire"},
{engine.DamageType.COLD, "freeze", "cold"},
{engine.DamageType.LIGHTNING, "lightning_explosion", "lightning"},
{engine.DamageType.ACID, "acid", "acid"},
},
special_on_hit = {
desc=function(self, who, special)
local dam = special.explosion(who)
return ("Magical explosion of a random element dealing #ORCHID#%d#LAST# damage (1/turn)"):format(dam)
return ("Create an explosion dealing #VIOLET#%d#LAST# %s damage (1/turn)"):format(dam, self.combat.elemental_element and self.combat.elemental_element[3] or "<random on generation>" )
end,
explosion=function(who)
local dam = math.floor(who:combatStatScale(who:combatSpellpower(), 30, 150))
local dam = math.floor(who:combatStatScale(who:combatSpellpower(), 1, 150))
return dam
end,
fct=function(combat, who, target, dam, special)
if who.turn_procs.elemental_explosion then return end
who.turn_procs.elemental_explosion = 1
local elem = rng.table(combat.elements)
local dam = who:spellCrit(special.explosion(who))
local tg = {type="ball", radius=3, range=10, selffire = false, friendlyfire=false}
who:project(tg, target.x, target.y, elem[1], dam, {type=elem[2]})
end},
fct=function(combat, who, target, dam, special)
if table.get(who.turn_procs, "elemental_ego", combat) then return end
table.set(who.turn_procs, "elemental_ego", combat, true)
local dam = who:spellCrit(special.explosion(who))
local elem = combat.elemental_element
local tg = {type="ball", radius=3, range=10, selffire = false, friendlyfire=false}
who:project(tg, target.x, target.y, elem[1], dam, {type=elem[2]})
end
},
},
}
......@@ -444,27 +449,17 @@ newEntity{
power_source = {arcane=true},
name = " of corruption", suffix=true, instant_resolve=true,
keywords = {corruption=true},
level_range = {30, 50},
level_range = {20, 50},
greater_ego = 1,
unique_ego = 1,
rarity = 35,
cost = 40,
combat = {
melee_project = {
[DamageType.ITEM_DARKNESS_NUMBING] = resolvers.mbonus_material(15, 5),
},
special_on_hit = {desc="20% chance to curse the target",
fct=function(combat, who, target, dam, special)
if not rng.percent(20) then return end
local eff = rng.table{"vuln", "defenseless", "impotence", "death", }
local check = math.max(who:combatSpellpower(), who:combatMindpower(), who:combatAttack())
if not who:checkHit(check, target:combatSpellResist()) then return end
if eff == "vuln" then target:setEffect(target.EFF_CURSE_VULNERABILITY, 2, {power=20})
elseif eff == "defenseless" then target:setEffect(target.EFF_CURSE_DEFENSELESSNESS, 2, {power=20})
elseif eff == "impotence" then target:setEffect(target.EFF_CURSE_IMPOTENCE, 2, {power=20})
elseif eff == "death" then target:setEffect(target.EFF_CURSE_DEATH, 2, {src=who, dam=20})
end
end},
talent_on_hit = resolvers.generic(function(e)
local Talents = require "engine.interface.ActorTalents"
local talent = rng.table({Talents.T_CURSE_OF_DEATH, Talents.T_CURSE_OF_DEFENSELESSNESS, Talents.T_CURSE_OF_IMPOTENCE, Talents.T_CURSE_OF_VULNERABILITY})
return { [talent] = {level=resolvers.genericlast(function(e) return e.material_level end), chance=20} }
end),
},
}
......@@ -508,17 +503,17 @@ newEntity{
keywords = {blaze=true},
level_range = {30, 50},
greater_ego = 1,
rarity = 45,
rarity = 30,
cost = 40,
wielder = {
global_speed_add = resolvers.mbonus_material(5, 1, function(e, v) v=v/100 return 0, v end),
global_speed_add = resolvers.mbonus_material(10, 1, function(e, v) v=v/100 return 0, v end),
resists_pen = {
[DamageType.FIRE] = resolvers.mbonus_material(10, 5),
[DamageType.FIRE] = resolvers.mbonus_material(20, 5),
},
},
combat = {
burst_on_crit = {
[DamageType.FIRE] = resolvers.mbonus_material(15, 5),
[DamageType.FIRE] = resolvers.mbonus_material(85, 5),
},
},
}
......@@ -529,87 +524,82 @@ newEntity{
keywords = {caustic=true},
level_range = {30, 50},
greater_ego = 1,
rarity = 45,
rarity = 30,
cost = 40,
wielder = {
life_regen = resolvers.mbonus_material(20, 5, function(e, v) v=v/10 return 0, v end),
combat_apr = resolvers.mbonus_material(10, 5),
resists_pen = {
[DamageType.ACID] = resolvers.mbonus_material(10, 5),
[DamageType.NATURE] = resolvers.mbonus_material(10, 5),
[DamageType.ACID] = resolvers.mbonus_material(20, 5),
[DamageType.NATURE] = resolvers.mbonus_material(20, 5),
},
},
combat = {
melee_project = {
[DamageType.ITEM_ACID_CORRODE] = resolvers.mbonus_material(30, 5),
burst_on_crit = {
[DamageType.ACID] = resolvers.mbonus_material(40, 5),
[DamageType.NATURE] = resolvers.mbonus_material(40, 5),
},
},
}
}
newEntity{
power_source = {nature=true},
name = "glacial ", prefix=true, instant_resolve=true,
keywords = {glacial=true},
name = "stormbringer's ", prefix=true, instant_resolve=true,
keywords = {stormbringer=true},
level_range = {30, 50},
greater_ego = 1,
rarity = 45,
rarity = 30,
cost = 40,
wielder = {
combat_armor = resolvers.mbonus_material(10, 5),
movement_speed = resolvers.mbonus_material(0.3, 0.2),
resists_pen = {
[DamageType.COLD] = resolvers.mbonus_material(10, 5),
[DamageType.COLD] = resolvers.mbonus_material(20, 5),
[DamageType.LIGHTNING] = resolvers.mbonus_material(20, 5),
},
},
combat = {
burst_on_crit = {
[DamageType.ICE] = resolvers.mbonus_material(25, 5),
[DamageType.LIGHTNING] = resolvers.mbonus_material(40, 5),
[DamageType.COLD] = resolvers.mbonus_material(40, 5),
},
},
}
newEntity{
power_source = {nature=true},
name = "enhanced ", prefix=true, instant_resolve=true,
keywords = {enhanced=true},
level_range = {30, 50},
greater_ego = 1,
rarity = 45,
rarity = 30,
cost = 40,
wielder = {
inc_stats = {
[Stats.STAT_STR] = resolvers.mbonus_material(9, 1),
[Stats.STAT_DEX] = resolvers.mbonus_material(9, 1),
[Stats.STAT_MAG] = resolvers.mbonus_material(9, 1),
[Stats.STAT_WIL] = resolvers.mbonus_material(9, 1),
[Stats.STAT_CUN] = resolvers.mbonus_material(9, 1),
[Stats.STAT_CON] = resolvers.mbonus_material(9, 1),
[Stats.STAT_STR] = resolvers.mbonus_material(10, 3),
[Stats.STAT_DEX] = resolvers.mbonus_material(10, 3),
[Stats.STAT_MAG] = resolvers.mbonus_material(10, 3),
[Stats.STAT_WIL] = resolvers.mbonus_material(10, 3),
[Stats.STAT_CUN] = resolvers.mbonus_material(10, 3),
[Stats.STAT_CON] = resolvers.mbonus_material(10, 3),
},
},
combat = {
},
}
newEntity{
power_source = {nature=true},
name = " of nature", suffix=true, instant_resolve=true,
keywords = {nature=true},
level_range = {30, 50},
name = " of enduring", suffix=true, instant_resolve=true,
keywords = {enduring=true},
level_range = {20, 50},
greater_ego = 1,
rarity = 30,
cost = 40,
wielder = {
resists = { all = resolvers.mbonus_material(8, 2) },
resists_pen = {
[DamageType.NATURE] = resolvers.mbonus_material(10, 5),
inc_stats = {
[Stats.STAT_CON] = resolvers.mbonus_material(10, 5),
[Stats.STAT_WIL] = resolvers.mbonus_material(10, 5),
},
},
combat = {
max_life = resolvers.mbonus_material(100, 10),
},
}
----------------------------------------------------------------
-- Antimagic
----------------------------------------------------------------
......@@ -642,7 +632,7 @@ newEntity{
newEntity{
power_source = {antimagic=true},
name = " of persecution", suffix=true, instant_resolve=true,
keywords = {banishment=true},
keywords = {persecution=true},
level_range = {1, 50},
rarity = 20,
cost = 20,
......@@ -656,51 +646,6 @@ newEntity{
}
}
newEntity{
power_source = {antimagic=true},
name = " of purging", suffix=true, instant_resolve=true,
keywords = {purging=true},
level_range = {1, 50},
rarity = 20,
greater_ego = 1,
cost = 20,
combat = {
melee_project={[DamageType.NATURE] = resolvers.mbonus_material(15, 5)},
special_on_hit = {desc="25% chance to remove a magical effect",
fct=function(combat, who, target, dam, special)
if not rng.percent(25) then return end
local effs = {}
-- Go through all spell effects
for eff_id, p in pairs(target.tmp) do
local e = target.tempeffect_def[eff_id]
if e.type == "magical" then
effs[#effs+1] = {"effect", eff_id}
end
end
-- Go through all sustained spells
for tid, act in pairs(target.sustain_talents) do
if act then
local talent = target:getTalentFromId(tid)
if talent.is_spell then effs[#effs+1] = {"talent", tid} end
end
end
local eff = rng.tableRemove(effs)
if eff then
if eff[1] == "effect" then
target:removeEffect(eff[2])
else
target:forceUseTalent(eff[2], {ignore_energy=true})
end
game.logSeen(target, "%s's magic has been #ORCHID#purged#LAST#!", target.name:capitalize())
end
end},
},
}
newEntity{
power_source = {antimagic=true},
name = "inquisitor's ", prefix=true, instant_resolve=true,
......@@ -708,35 +653,39 @@ newEntity{
level_range = {30, 50},
rarity = 45,
greater_ego = 1,
unique_ego = 1,
cost = 40,
combat = {
melee_project = {
[DamageType.ITEM_ANTIMAGIC_MANABURN] = resolvers.mbonus_material(15, 10),
},
special_on_crit = {desc="burns latent spell energy",
fct=function(combat, who, target, dam, special)
local turns = 1 + math.ceil(who:combatMindpower() / 20)
local check = math.max(who:combatSpellpower(), who:combatMindpower(), who:combatAttack())
if not who:checkHit(check, target:combatMentalResist()) then game.logSeen(target, "%s resists!", target.name:capitalize()) return nil end
local tids = {}
for tid, lev in pairs(target.talents) do
local t = target:getTalentFromId(tid)
if t and not target.talents_cd[tid] and t.mode == "activated" and t.is_spell and not t.innate then tids[#tids+1] = t end
end
special_on_crit = {
desc=function(self, who, special)
local manaburn = special.manaburn(who)
return ("Deals #YELLOW#%d#LAST# Manaburn damage and puts 1 random spell talent on cooldown for #YELLOW#%d#LAST# turns (checks Confusion immunity)"):
format(manaburn or 0, 1 + math.ceil(who:combatMindpower() / 20))
end,
manaburn=function(who)
local dam = math.floor(who:combatStatScale(who:combatMindpower(), 1, 150))
return dam
end,
fct=function(combat, who, target, dam, special)
local manaburn = special.manaburn(who)
local tg = {type="hit", range=1}
who:project(tg, target.x, target.y, engine.DamageType.MANABURN, manaburn)
local t = rng.tableRemove(tids)
if not t then return nil end
local damage = t.mana or t.vim or t.positive or t.negative or t.paradox or 0
target.talents_cd[t.id] = turns
local turns = 1 + math.ceil(who:combatMindpower() / 20)
local check = math.max(who:combatSpellpower(), who:combatMindpower(), who:combatAttack())
if not who:checkHit(check, target:combatMentalResist()) or not target:canBe("confusion") then return end
local tg = {type="hit", range=1}
damage = util.getval(damage, target, t)
if type(damage) ~= "number" then damage = 0 end
who:project(tg, target.x, target.y, engine.DamageType.ARCANE, damage)
local tids = {}
for tid, lev in pairs(target.talents) do
local t = target:getTalentFromId(tid)
if t and not target.talents_cd[tid] and t.mode == "activated" and not t.innate and t.is_spell then tids[#tids+1] = t end
end
game.logSeen(target, "%s's %s has been #ORCHID#burned#LAST#!", target.name:capitalize(), t.name)
end},
local t = rng.tableRemove(tids)
target.talents_cd[t.id] = turns
game.logSeen(target, "#YELLOW#%s has their %s spell disrupted for for %d turns!", target.name:capitalize(), t.name, turns)
end
},
},
}
......@@ -746,17 +695,22 @@ newEntity{
keywords = {disruption=true},
level_range = {30, 50},
greater_ego = 1,
unique_ego = 1,
rarity = 50,
cost = 40,
combat = {
inc_damage_type = {
unnatural=resolvers.mbonus_material(25, 5),
},
special_on_hit = {desc="disrupts spell-casting",
fct=function(combat, who, target, dam, special)
local check = math.max(who:combatSpellpower(), who:combatMindpower(), who:combatAttack())
target:setEffect(target.EFF_SPELL_DISRUPTION, 10, {src=who, power = 10, max = 50, apply_power=check})
end},
special_on_hit = {
desc=function(self, who, special)
return ("Cause the target to have a 10%% chance to fail spellcasting and 10%% chance to lose a magical sustain each turn, stacking up to 50%%"):format()
end,
fct=function(combat, who, target, dam, special)
local check = math.max(who:combatSpellpower(), who:combatMindpower(), who:combatAttack())
target:setEffect(target.EFF_SPELL_DISRUPTION, 5, {src=who, power = 10, max = 50, apply_power=check})
end
},
},
}
......@@ -765,10 +719,11 @@ newEntity{
name = " of dampening", suffix=true, instant_resolve=true,
keywords = {dampening=true},
level_range = {1, 50},
rarity = 18,
rarity = 30,
cost = 22,
wielder = {
resists={
all = resolvers.mbonus_material(8, 2),
[DamageType.ACID] = resolvers.mbonus_material(10, 7),
[DamageType.LIGHTNING] = resolvers.mbonus_material(10, 7),
[DamageType.FIRE] = resolvers.mbonus_material(10, 7),
......@@ -799,7 +754,7 @@ newEntity{
name = " of projection", suffix=true, instant_resolve=true,
keywords = {projection=true},
level_range = {1, 50},
rarity = 25,
rarity = 40,
cost = 15,
greater_ego = 1,
unique_ego = 1,
......@@ -809,11 +764,11 @@ newEntity{
on_kill = 1,
desc=function(self, who, special)
local targets = self.combat.projection_targets
return ("Projects up to #LIGHT_STEEL_BLUE#%d#LAST# attacks dealing 30%% weapon damage to random targets in range 7 as mind damage (cannot hit the initial target)"):format(targets or 0)
return ("Projects up to %d attacks dealing 30%% weapon damage to other random targets in range 7 as mind damage (1/turn)"):format(targets or 0)
end,
fct=function(combat, who, target, dam, special)
if who.turn_procs.ego_projection then return end
who.turn_procs.ego_projection = true
fct=function(combat, who, target, dam, special)
if table.get(who.turn_procs, "ego_projection", combat) then return end
table.set(who.turn_procs, "ego_projection", combat, true)
local tg = {type="ball", radius=7}
local grids = who:project(tg, who.x, who.y, function() end)
......@@ -829,7 +784,8 @@ newEntity{
who:attackTargetWith(project_target, combat, engine.DamageType.MIND, 0.3)
end
end
end},
end
},
},
}
......@@ -857,39 +813,38 @@ newEntity{
newEntity{
power_source = {psionic=true},
name = " of amnesia", suffix=true, instant_resolve=true,
keywords = {forgotten=true},
keywords = {amnesia=true},
level_range = {10, 50},
rarity = 30, -- very rare because no one can remember how to make them... haha
rarity = 40, -- very rare because no one can remember how to make them... haha
cost = 15,
greater_ego = 1,
unique_ego = 1,
wielder = {
},
combat = {
special_on_hit = {
desc=function(self, who, special)
return ("25%% chance to put 1 talent on cooldown for #YELLOW#%d#LAST# turns"):format(1 + math.ceil(who:combatMindpower() / 20))
end,
fct=function(combat, who, target, dam, special)
if not rng.percent(25) then return nil end
local turns = 1 + math.ceil(who:combatMindpower() / 20)
local number = 1
local check = math.max(who:combatSpellpower(), who:combatMindpower(), who:combatAttack())
if not who:checkHit(check, target:combatMentalResist()) then game.logSeen(target, "%s resists the amnesia!", target.name:capitalize()) return nil end
local tids = {}
for tid, lev in pairs(target.talents) do
local t = target:getTalentFromId(tid)
if t and not target.talents_cd[tid] and t.mode == "activated" and not t.innate then tids[#tids+1] = t end
end
desc=function(self, who, special)
return ("#LIGHT_GREEN#50%%#LAST# chance to put 1 talent on cooldown for #YELLOW#%d#LAST# turns (checks Confusion immunity)"):format(1 + math.ceil(who:combatMindpower() / 20))
end,
fct=function(combat, who, target, dam, special)
if not rng.percent(50) then return nil end
local turns = 1 + math.ceil(who:combatMindpower() / 20)
local number = 1
local check = math.max(who:combatSpellpower(), who:combatMindpower(), who:combatAttack())
if not who:checkHit(check, target:combatMentalResist()) or not target:canBe("confusion") then return end
for i = 1, number do
local t = rng.tableRemove(tids)
if not t then break end
target.talents_cd[t.id] = turns
game.logSeen(target, "#YELLOW#%s has temporarily forgotten %s!", target.name:capitalize(), t.name)
local tids = {}
for tid, lev in pairs(target.talents) do
local t = target:getTalentFromId(tid)
if t and not target.talents_cd[tid] and t.mode == "activated" and not t.innate then tids[#tids+1] = t end
end
for i = 1, number do
local t = rng.tableRemove(tids)
if not t then break end
target.talents_cd[t.id] = turns
game.logSeen(target, "#YELLOW#%s has temporarily forgotten %s for %d turns!", target.name:capitalize(), t.name, turns)
end
end
end},
},
},
}
......@@ -902,22 +857,22 @@ newEntity{
unique_ego = 1,
rarity = 30,
cost = 30,
wielder = {
},
combat = {
special_on_hit = {desc="20% chance to stun, blind, pin, confuse, or silence the target",
fct=function(combat, who, target, dam, special)
if not rng.percent(20) then return end
local eff = rng.table{"stun", "blind", "pin", "confusion", "silence",}
if not target:canBe(eff) then return end
local check = math.max(who:combatSpellpower(), who:combatMindpower(), who:combatAttack())
if not who:checkHit(check, target:combatMentalResist()) then return end
if eff == "stun" then target:setEffect(target.EFF_STUNNED, 3, {})
elseif eff == "blind" then target:setEffect(target.EFF_BLINDED, 3, {})
elseif eff == "pin" then target:setEffect(target.EFF_PINNED, 3, {})
elseif eff == "confusion" then target:setEffect(target.EFF_CONFUSED, 3, {power=30})
elseif eff == "silence" then target:setEffect(target.EFF_SILENCED, 3, {})
special_on_hit = {
desc="#LIGHT_GREEN#20%#LAST# chance to stun, blind, pin, confuse, or silence the target for 3 turns",
fct=function(combat, who, target, dam, special)
if not rng.percent(20) then return end
local eff = rng.table{"stun", "blind", "pin", "confusion", "silence",}
if not target:canBe(eff) then return end
local check = math.max(who:combatSpellpower(), who:combatMindpower(), who:combatAttack())
if not who:checkHit(check, target:combatMentalResist()) then return end
if eff == "stun" then target:setEffect(target.EFF_STUNNED, 3, {})
elseif eff == "blind" then target:setEffect(target.EFF_BLINDED, 3, {})
elseif eff == "pin" then target:setEffect(target.EFF_PINNED, 3, {})
elseif eff == "confusion" then target:setEffect(target.EFF_CONFUSED, 3, {power=30})
elseif eff == "silence" then target:setEffect(target.EFF_SILENCED, 3, {})
end
end
end},
},
},
}
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