Commit 2b7b28ea20c1a1674156db5ae9d079587e8fea0a

Authored by DarkGod
2 parents 43bbeee0 4a293056

Merge branch 'master' of git.net-core.org:tome/t-engine4

... ... @@ -6196,9 +6196,11 @@ function _M:postUseTalent(ab, ret, silent)
6196 6196 -- Free melee blow
6197 6197 if ab.is_spell and ab.mode ~= "sustained" and self:knowTalent(self.T_CORRUPTED_STRENGTH) and not self:attr("forbid_corrupted_strength_blow") and not self.turn_procs.corrupted_strength then
6198 6198 local tgts = {}
6199   - for _, c in pairs(util.adjacentCoords(self.x, self.y)) do
6200   - local target = game.level.map(c[1], c[2], Map.ACTOR)
6201   - if target and self:reactionToward(target) < 0 then tgts[#tgts+1] = target end
  6199 + if game.level:hasEntity(self) and self.x and self.y then
  6200 + for _, c in pairs(util.adjacentCoords(self.x, self.y)) do
  6201 + local target = game.level.map(c[1], c[2], Map.ACTOR)
  6202 + if target and self:reactionToward(target) < 0 then tgts[#tgts+1] = target end
  6203 + end
6202 6204 end
6203 6205 if #tgts > 0 then
6204 6206 self.turn_procs.corrupted_strength = true
... ...
... ... @@ -1390,7 +1390,7 @@ function _M:changeLevelReal(lev, zone, params)
1390 1390 if self.level.last_turn and self.level.last_turn < self.turn then
1391 1391 local perc = util.bound(math.floor((self.turn - self.level.last_turn) / 10), 0, 10)
1392 1392 for uid, target in pairs(self.level.entities) do
1393   - if target.life and target.max_life and self.player:reactionToward(target) < 0 then
  1393 + if target.life and target.max_life and ((self.player:reactionToward(target) < 0) or target:attr("hostile_for_level_change")) then
1394 1394 target.life = util.bound(target.life + target.max_life * perc / 10, 0, target.max_life)
1395 1395 target.changed = true
1396 1396 target.talents_cd = {}
... ...
... ... @@ -67,13 +67,15 @@ newBirthDescriptor{
67 67 ["corruption/sanguisuge"]={true, 0.0},
68 68 ["corruption/reaving-combat"]={true, 0.3},
69 69 ["corruption/scourge"]={true, 0.3},
70   - ["corruption/plague"]={true, 0.0},
  70 + ["corruption/plague"]={true, 0.3},
71 71 ["corruption/hexes"]={false, 0.3},
72 72 ["corruption/curses"]={false, 0.3},
73 73 ["corruption/bone"]={true, 0.3},
74 74 ["corruption/torment"]={true, 0.3},
75 75 ["corruption/vim"]={true, 0.0},
76 76 ["corruption/rot"]={false, 0.3},
  77 + ["corruption/vile-life"]={false, 0.0},
  78 +
77 79 },
78 80 talents = {
79 81 [ActorTalents.T_CORRUPTED_STRENGTH] = 1,
... ...
... ... @@ -55,7 +55,7 @@ newBirthDescriptor{
55 55 "#LIGHT_BLUE# * +0 Magic, +4 Willpower, +4 Cunning",
56 56 "#GOLD#Life per level:#LIGHT_BLUE# -2",
57 57 },
58   - power_source = {psionic=true},
  58 + power_source = {psionic=true, technique=true},
59 59 stats = { str=1, wil=4, cun=4, },
60 60 birth_example_particles = {
61 61 function(actor)
... ...
... ... @@ -172,6 +172,7 @@ newBirthDescriptor{
172 172 "#LIGHT_BLUE# * +0 Magic, +0 Willpower, +1 Cunning",
173 173 "#GOLD#Life per level:#LIGHT_BLUE# +0",
174 174 },
  175 + power_source = {technique=true},
175 176 stats = { dex=4, str=4, cun=1, },
176 177 talents_types = {
177 178 ["technique/dualweapon-attack"]={true, 0.3},
... ... @@ -233,7 +234,7 @@ newBirthDescriptor{
233 234 "#GOLD#Life per level:#LIGHT_BLUE# +0",
234 235 },
235 236 --not_on_random_boss = true,
236   - power_source = {technique=true},
  237 + power_source = {technique=true, technique_ranged=true},
237 238 stats = {dex = 4, cun = 4, wil = 1},
238 239 talents_types = {
239 240 -- class
... ...
... ... @@ -235,8 +235,8 @@ newBirthDescriptor{
235 235 "#GOLD##{bold}#Insane mode#WHITE##{normal}#",
236 236 "Similar rules to Nightmare, but with more random bosses!",
237 237 "All zone levels increased by 50% + 1 by the time Player reaches level 10",
238   - "All creature talent levels increased by 80%",
239   - "Unique (fixed) bosses advance in bonus classes 80% faster",
  238 + "All creature talent levels increased by 70%",
  239 + "Unique (fixed) bosses advance in bonus classes 70% faster",
240 240 "Rare creatures are far more frequent and random bosses start to appear",
241 241 "Stairs can not be used for 5 turns after a kill.",
242 242 "Player can earn Insane version of achievements if also playing in Roguelike or Adventure permadeath mode.",
... ... @@ -257,9 +257,9 @@ newBirthDescriptor{
257 257 difficulty_level_mult = 1.5, -- Level multiplier for Zone.level_range, handled in Game.applyDifficulty
258 258 difficulty_level_add = 1, -- Flat value added to Zone.level_range, handled in Game.applyDifficulty
259 259
260   - difficulty_talent_mult = 1.8, -- Talent level multiplier for non-summoned NPC talents and base (non-autoclass) fixedboss talents, handled in NPC.addedToLevel
  260 + difficulty_talent_mult = 1.7, -- Talent level multiplier for non-summoned NPC talents and base (non-autoclass) fixedboss talents, handled in NPC.addedToLevel
261 261 --difficulty_life_mult = 1.2, -- Max life multiplier for hostile non-summoned NPCs, handled in NPC.addedToLevel
262   - fixedboss_class_level_rate_mult = 1.8, -- Multiplier for auto_classes level rates, handled in Actor.levelupClass
  262 + fixedboss_class_level_rate_mult = 1.7, -- Multiplier for auto_classes level rates, handled in Actor.levelupClass
263 263 },
264 264 }
265 265 newBirthDescriptor{
... ...
... ... @@ -125,13 +125,7 @@ setDefaultProjector(function(src, x, y, type, dam, state)
125 125
126 126 local ignore_direct_crits = target:attr 'ignore_direct_crits'
127 127 if crit_power > 1 and ignore_direct_crits then -- Reduce the post crit damage, we have to do this here since most crits are calculated before knowing their target
128   - dam = dam / crit_power
129   - local reduce = (crit_power - 1) * (util.bound(ignore_direct_crits, 0, 100) / 100)
130   - crit_power = math.max(1, crit_power - reduce)
131   - dam = dam * crit_power
132   - print("[PROJECTOR] crit power reduce dam", dam)
133   - end
134   - if crit_power > 1 then
  128 +
135 129 -- Add crit bonus power for being unseen (direct damage only, diminished with range)
136 130 local unseen_crit = src.__is_actor and target.__is_actor and not src.__project_source and src.unseen_critical_power
137 131 if unseen_crit and not target:canSee(src) and src:canSee(target) then
... ... @@ -144,11 +138,16 @@ setDefaultProjector(function(src, x, y, type, dam, state)
144 138 if target.unseen_crit_defense and target.unseen_crit_defense > 0 then
145 139 unseen_crit = math.max(0, unseen_crit*(1 - target.unseen_crit_defense))
146 140 end
147   - dam = dam * (crit_power + unseen_crit)/crit_power
148 141 crit_power = crit_power + unseen_crit
149 142 print("[PROJECTOR] after unseen_critical_power type/dam/range/power", type, dam, d, unseen_crit, "::", crit_power - unseen_crit, "=>", crit_power)
150 143 end
151   - end
  144 + end
  145 +
  146 + dam = dam / crit_power
  147 + local reduce = (crit_power - 1) * (util.bound(ignore_direct_crits, 0, 100) / 100)
  148 + crit_power = math.max(1, crit_power - reduce)
  149 + dam = dam * crit_power
  150 + print("[PROJECTOR] crit power reduce dam", dam)
152 151 end
153 152
154 153 local hd = {"DamageProjector:base", src=src, x=x, y=y, type=type, dam=dam, state=state}
... ...
... ... @@ -105,7 +105,6 @@ newEntity{ base = "BASE_NPC_WILD_DRAKE",
105 105 [Talents.T_CHARGE_LEECH]={base=5, every=5, max = 10},
106 106 [Talents.T_INSATIABLE]={base=5, every=5, max = 30},
107 107 [Talents.T_PHASE_DOOR]={base=5, every=5, max = 10},
108   - [Talents.T_PROBABILITY_TRAVEL]={base=5, every=5, max = 10},
109 108 },
110 109
111 110 resolvers.inscriptions(2, {"phase door rune", "phase door rune"}),
... ...
... ... @@ -124,24 +124,36 @@ newEntity{ base = "BASE_LONGSWORD", define_as = "RIFT_SWORD",
124 124 material_level = 4,
125 125 combat = {
126 126 dam = 40,
127   - apr = 10,
  127 + apr = 40,
128 128 physcrit = 8,
129 129 dammod = {str=0.9,mag=0.2},
130 130 convert_damage={[DamageType.TEMPORAL] = 20},
131   - special_on_hit = {desc="inflicts bonus temporal damage and slows target", fct=function(combat, who, target)
132   - local dam = (20 + who:getMag()/2)
133   - local slow = (10 + who:getMag()/5)/100
134   - who:project({type="hit", range=1}, target.x, target.y, engine.DamageType.CHRONOSLOW, {dam=dam, slow=slow})
  131 + special_on_hit = {
  132 + desc=function(self, who, special)
  133 + local dam, slow = special.proc_values(who)
  134 + return ("deals %d temporal damage and slows enemies in radius 6 of the target by %d%% based on Magic"):format(dam, slow*100)
  135 + end,
  136 + proc_values=function(who)
  137 + local dam = (20 + who:getMag())
  138 + local slow = (30 + who:getMag())/100 -- This doesn't stack with the relatively easy to get basic slow proc, so it gets to be really big
  139 + return dam, slow
  140 + end,
  141 + fct=function(combat, who, target, dam, special)
  142 + local dam, slow = special.proc_values(who)
  143 + who:project({type="ball", range=1, radius=6, friendlyfire=false, selffire=false}, target.x, target.y, engine.DamageType.CHRONOSLOW, {dam=dam, slow=slow})
135 144 end},
136 145 },
137 146 wielder = {
138 147 inc_damage={
139   - [DamageType.TEMPORAL] = 12,
140   - [DamageType.PHYSICAL] = 10,
  148 + [DamageType.TEMPORAL] = 30,
  149 + [DamageType.PHYSICAL] = 30,
141 150 },
  151 + resist_all_on_teleport = 20,
  152 + defense_on_teleport = 20,
  153 + effect_reduction_on_teleport = 20,
142 154 },
143   - max_power = 8, power_regen = 1,
144   - use_talent = { id = Talents.T_RETHREAD, level = 2, power = 8 },
  155 + max_power = 10, power_regen = 1,
  156 + use_talent = { id = Talents.T_BLINK_BLADE, level = 4, power = 10 },
145 157 }
146 158
147 159 newEntity{ base = "BASE_RUNE", define_as = "RUNE_REFLECT",
... ...
... ... @@ -43,7 +43,7 @@ newEntity{
43 43 return ("Wound the target dealing #RED#%d#LAST# physical damage across 5 turns and reducing healing by %d%%"):format(dam, hf)
44 44 end,
45 45 wound=function(combat, who)
46   - local dam = math.floor(who:combatStatScale(who:combatPhysicalpower(), 1, 350)) -- Doesn't stack
  46 + local dam = math.max(15, math.floor(who:combatStatScale(who:combatPhysicalpower(), 1, 350))) -- Doesn't stack
47 47 local hf = 50
48 48 return dam, hf
49 49 end,
... ... @@ -149,7 +149,7 @@ newEntity{
149 149 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))
150 150 end,
151 151 acid_splash=function(who)
152   - local dam = math.floor(who:combatStatScale(who:combatSpellpower(), 1, 250))
  152 + local dam = math.max(15, math.floor(who:combatStatScale(who:combatSpellpower(), 1, 250)))
153 153 return dam
154 154 end,
155 155 fct=function(combat, who, target, dam, special)
... ... @@ -176,7 +176,7 @@ newEntity{
176 176 return ("#LIGHT_GREEN#25%%#LAST# chance for lightning to strike from the target to a second target dealing #VIOLET#%d#LAST# damage"):format(dam)
177 177 end,
178 178 arc=function(who)
179   - local dam = math.floor(who:combatStatScale(who:combatSpellpower(), 1, 150))
  179 + local dam = math.max(15, math.floor(who:combatStatScale(who:combatSpellpower(), 1, 150)))
180 180 return dam
181 181 end,
182 182 on_kill=1,
... ... @@ -314,12 +314,13 @@ newEntity{
314 314 {engine.DamageType.ACID, "acid", "acid"},
315 315 },
316 316 special_on_hit = {
  317 + on_kill = 1,
317 318 desc=function(self, who, special)
318 319 local dam = special.explosion(self.combat, who)
319 320 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>" )
320 321 end,
321 322 explosion=function(self, who)
322   - local dam = math.floor(who:combatStatScale(who:combatSpellpower(), 1, 150)) * (1 + (self.elemental_bonus or 0) / 100)
  323 + local dam = math.max(15, math.floor(who:combatStatScale(who:combatSpellpower(), 1, 150)) * (1 + (self.elemental_bonus or 0) / 100))
323 324 return dam
324 325 end,
325 326 fct=function(combat, who, target, dam, special)
... ... @@ -467,7 +468,7 @@ newEntity{
467 468 return ("#LIGHT_GREEN#20%%#LAST# chance to create an air burst in radius 3 knocking enemies back 2 spaces and dealing #RED#%d#LAST# physical damage"):format(dam)
468 469 end,
469 470 explosion=function(who)
470   - local dam = math.floor(who:combatStatScale(who:combatPhysicalpower(), 1, 250))
  471 + local dam = math.max(15, math.floor(who:combatStatScale(who:combatPhysicalpower(), 1, 250)))
471 472 return dam
472 473 end,
473 474 fct=function(combat, who, target, dam, special)
... ... @@ -498,7 +499,7 @@ newEntity{
498 499 return ("#LIGHT_GREEN#20%%#LAST# chance to create vines that bind the target to the ground dealing #YELLOW#%d#LAST# nature damage and pinning them for 3 turns"):format(dam)
499 500 end,
500 501 damage=function(who)
501   - local dam = math.floor(who:combatStatScale(who:combatMindpower(), 1, 350))
  502 + local dam = math.max(15, math.floor(who:combatStatScale(who:combatMindpower(), 1, 350)))
502 503 return dam
503 504 end,
504 505 fct=function(combat, who, target, dam, special)
... ... @@ -577,7 +578,7 @@ newEntity{
577 578 format(manaburn or 0, 1 + math.ceil(who:combatMindpower() / 20))
578 579 end,
579 580 manaburn=function(who)
580   - local dam = math.floor(who:combatStatScale(who:combatMindpower(), 1, 150))
  581 + local dam = math.max(10, math.floor(who:combatStatScale(who:combatMindpower(), 1, 150)))
581 582 return dam
582 583 end,
583 584 fct=function(combat, who, target, dam, special)
... ... @@ -682,7 +683,7 @@ newEntity{
682 683 return ("#LIGHT_GREEN#20%%#LAST# chance to knock the target back 3 spaces and deal #YELLOW#%d#LAST# physical damage"):format(dam)
683 684 end,
684 685 psychokinetic_damage=function(who)
685   - local dam = math.floor(who:combatStatScale(who:combatMindpower(), 1, 350))
  686 + local dam = math.max(15, math.floor(who:combatStatScale(who:combatMindpower(), 1, 350)))
686 687 return dam
687 688 end,
688 689 fct=function(combat, who, target, dam, special)
... ...
... ... @@ -467,7 +467,7 @@ newEntity{
467 467 format(manaburn or 0, 1 + math.ceil(who:combatMindpower() / 20))
468 468 end,
469 469 manaburn=function(who)
470   - local dam = math.floor(who:combatStatScale(who:combatMindpower(), 1, 150))
  470 + local dam = math.max(10, math.floor(who:combatStatScale(who:combatMindpower(), 1, 150)))
471 471 return dam
472 472 end,
473 473 fct=function(combat, who, target, dam, special)
... ...
... ... @@ -403,6 +403,7 @@ newEntity{
403 403 {engine.DamageType.ACID, "acid", "acid"},
404 404 },
405 405 special_on_hit = {
  406 + on_kill = 1,
406 407 desc=function(self, who, special)
407 408 local dam = special.explosion(who)
408 409 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>" )
... ...
... ... @@ -437,9 +437,9 @@ It seems somebody well versed in antimagic could use it to its fullest potential
437 437
438 438 self:specialWearAdd({"wielder","inc_stats"}, { [Stats.STAT_WIL] = 6, [Stats.STAT_CUN] = 6, [Stats.STAT_CON] = 6})
439 439 self:specialWearAdd({"wielder","combat_spellresist"}, 15)
440   - self:specialSetAdd({"wielder","equilibrium_regen"}, -1)
441   - self:specialSetAdd({"wielder","resists"}, {[engine.DamageType.ARCANE]=40})
442   - self:specialSetAdd({"wielder","resists_cap"}, {[engine.DamageType.ARCANE]=10})
  440 + self:specialWearAdd({"wielder","equilibrium_regen"}, -1)
  441 + self:specialWearAdd({"wielder","resists"}, {[engine.DamageType.ARCANE]=40})
  442 + self:specialWearAdd({"wielder","resists_cap"}, {[engine.DamageType.ARCANE]=10})
443 443 game.logPlayer(who, "#LIGHT_BLUE#You feel a great hero guiding you!")
444 444 end
445 445 end,
... ...
... ... @@ -72,7 +72,6 @@ newTalent{
72 72 local target = game.level.map(px, py, Map.ACTOR)
73 73 if not target then return end
74 74
75   - DamageType:get(DamageType.BLIGHT).projector(self, px, py, DamageType.BLIGHT, dam)
76 75
77 76 local effs = {}
78 77
... ... @@ -104,6 +103,9 @@ newTalent{
104 103 end
105 104 end
106 105 end
  106 +
  107 + DamageType:get(DamageType.BLIGHT).projector(self, px, py, DamageType.BLIGHT, dam)
  108 +
107 109 end)
108 110 local _ _, x, y = self:canProject(tg, x, y)
109 111 game.level.map:particleEmitter(x, y, tg.radius, "circle", {zdepth=6, oversize=1, a=130, appear=8, limit_life=8, speed=5, img="green_demon_fire_circle", radius=tg.radius})
... ... @@ -111,9 +113,9 @@ newTalent{
111 113 return true
112 114 end,
113 115 info = function(self, t)
114   - return ([[Project a corrupted blast of power that deals %0.2f blight damage and removes up to %d magical or physical effects or any type of sustain from any creatures caught in the radius 3 ball.
  116 + return ([[Project a corrupted blast of power that removes up to %d magical or physical effects or any type of sustain and deals %0.2f blight damage to any creatures caught in the radius 3 ball.
115 117 For each effect, the creature has a chance to resist based on its spell save.
116   - The damage will increase with your Spellpower.]]):format(damDesc(self, DamageType.BLIGHT, self:combatTalentSpellDamage(t, 28, 120)), t.getRemoveCount(self, t))
  118 + The damage will increase with your Spellpower.]]):format(t.getRemoveCount(self, t), damDesc(self, DamageType.BLIGHT, self:combatTalentSpellDamage(t, 28, 120)))
117 119 end,
118 120 }
119 121
... ...
... ... @@ -130,13 +130,14 @@ newTalent{
130 130 type = {"corruption/vile-life", 3},
131 131 require = corrs_req3,
132 132 points = 5,
133   - cooldown = 15,
  133 + cooldown = 10,
134 134 vim = 16,
135   - range = 10,
  135 + range = 8,
  136 + radius = 4,
136 137 tactical = { DISABLE = 2 },
137 138 direct_hit = true,
138 139 requires_target = true,
139   - target = function(self, t) return {type="hit", range=self:getTalentRange(t), talent=t} end,
  140 + target = function(self, t) return {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t), friendlyfire=false, talent=t} end,
140 141 getPower = function(self,t) return self:combatLimit(self:combatTalentSpellDamage(t, 4, 100), 100, 0, 0, 18.1, 18.1) end, -- Limit to <100%
141 142 action = function(self, t)
142 143 local tg = self:getTalentTarget(t)
... ... @@ -151,9 +152,9 @@ newTalent{
151 152 return true
152 153 end,
153 154 info = function(self, t)
154   - return ([[You manipulate the vim of your target to temporarily invert all healing done to it (but not regeneration).
  155 + return ([[You manipulate the vim of enemies in radius %d to temporarily invert all healing done to them (but not natural regeneration).
155 156 For 5 turns all healing will instead damage them for %d%% of the healing done as blight.
156   - The effect will increase with your Spellpower.]]):format(t.getPower(self,t))
  157 + The effect will increase with your Spellpower.]]):format(self:getTalentRadius(t), t.getPower(self,t))
157 158 end,
158 159 }
159 160
... ... @@ -162,14 +163,16 @@ newTalent{
162 163 type = {"corruption/vile-life", 4},
163 164 require = corrs_req4,
164 165 points = 5,
165   - cooldown = 10,
  166 + cooldown = 15,
166 167 vim = 18,
167 168 direct_hit = true,
168 169 requires_target = true,
169 170 range = 4,
  171 + no_npc_use = true, -- Bypasses all forms of immunity and such
170 172 target = function(self, t) return {type="hit", range=self:getTalentRange(t), talent=t} end,
171 173 getNb = function(self, t) return math.floor(self:combatTalentScale(t, 2, 4, "log")) end,
172 174 getDam = function(self, t) return self:combatTalentLimit(t, 2, 10, 5) end, --Limit < 10% life/effect
  175 + getVim = function(self, t) return 18 end,
173 176 action = function(self, t)
174 177 local tg = self:getTalentTarget(t)
175 178 local x, y = self:getTarget(tg)
... ... @@ -187,26 +190,17 @@ newTalent{
187 190 end
188 191 end
189 192
190   - local dam = t.getDam(self, t) * self.life / 100
191 193 while #list > 0 and nb > 0 do
192   - if self:checkHit(self:combatSpellpower(), target:combatSpellResist(), 0, 95, 5) then
193   - local eff_id = rng.tableRemove(list)
194   - local p = self.tmp[eff_id]
195   - local e = self.tempeffect_def[eff_id]
196   - local effectParam = self:copyEffect(eff_id)
197   - effectParam.__tmpparticles = nil
198   - if effectParam then
199   - effectParam.src = self
200   -
201   - target:setEffect(eff_id, p.dur, effectParam)
202   - self:removeEffect(eff_id)
203   - local dead, val = self:takeHit(dam, self, {source_talent=t})
204   - target:heal(val, self)
205   - game:delayedLogMessage(self, target, "vile_transplant"..e.desc, ("#CRIMSON##Source# transfers an effect (%s) to #Target#!"):format(e.desc))
206   - end
  194 + local eff_id = rng.tableRemove(list)
  195 + local e = self.tempeffect_def[eff_id]
  196 + self:cloneEffect(eff_id, target, {apply_power = self:combatSpellpower()})
  197 + if target:hasEffect(eff_id) then
  198 + self:removeEffect(eff_id)
  199 + game:delayedLogMessage(self, target, "vile_transplant"..e.desc, ("#CRIMSON##Source# transfers an effect (%s) to #Target#!"):format(e.desc))
  200 + self:incVim(-t.getVim(self, t)) -- Vim costs life if there isn't enough so no need to check total
207 201 end
208   - nb = nb - 1
209 202 end
  203 + nb = nb - 1
210 204 end)
211 205 local _ _, _, _, x, y = self:canProject(tg, x, y)
212 206 game.level.map:particleEmitter(x, y, tg.radius, "circle", {oversize=0.7, g=100, r=100, a=90, limit_life=8, appear=8, speed=2, img="blight_circle", radius=self:getTalentRadius(t)})
... ... @@ -214,9 +208,9 @@ newTalent{
214 208 return true
215 209 end,
216 210 info = function(self, t)
217   - return ([[You transfer up to %d physical or magical detrimental effects currently affecting you to a nearby creature by touching it.
218   - The transfer takes %0.1f%% of your remaining life for each effect transferred and heals the target for the same amount.
  211 + return ([[You transfer up to %d physical or magical detrimental effects currently affecting you to a nearby creature at a cost of %d vim per effect.
  212 + Specific effect immunities will not prevent the transfer.
219 213 The chance to transfer each effect increases with your Spellpower.]]):
220   - format(t.getNb(self, t), t.getDam(self, t))
  214 + format(t.getNb(self, t), t.getVim(self, t))
221 215 end,
222 216 }
... ...
... ... @@ -79,9 +79,10 @@ newTalent{
79 79 end,
80 80 action = function(self, t)
81 81 local tg = self:getTalentTarget(t)
82   - local x, y, target = self:getTarget(tg)
  82 + local x, y = self:getTarget(tg)
83 83 if not x or not y then return nil end
84   - if not self:canProject(tg, x, y) then return end
  84 + local _ _, _, _, x, y = self:canProject(tg, x, y)
  85 +
85 86 local nb = 0
86 87 self:project(tg, x, y, function(px, py)
87 88 local target = game.level.map(px, py, Map.ACTOR)
... ...
... ... @@ -30,7 +30,7 @@ newTalent{
30 30 tactical = { ATTACK = { PHYSICAL = 1, COLD = 1, FIRE = 1, LIGHTNING = 1, ACID = 1 } },
31 31 requires_target = true,
32 32 target = function(self, t) return {type="hit", range=self:getTalentRange(t)} end,
33   - getWeaponDamage = function(self, t) return self:combatTalentWeaponDamage(t, 1.6, 2.3) end,
  33 + getWeaponDamage = function(self, t) return self:combatTalentWeaponDamage(t, 1.2, 2.0) end,
34 34 getBurstDamage = function(self, t) return self:combatTalentMindDamage(t, 20, 230) end,
35 35 getPassiveSpeed = function(self, t) return (self:combatTalentScale(t, 2, 10, 0.5)/100) end,
36 36 radius = function(self, t) return math.floor(self:combatTalentScale(t, 1.5, 3.5)) end,
... ...
... ... @@ -33,7 +33,7 @@ newTalent{
33 33 requires_target = true,
34 34 is_melee = true,
35 35 target = function(self, t) return {type="bolt", range=self:getTalentRange(t), requires_knowledge=false, stop__block=true} end,
36   - range = function(self, t) return math.floor(self:combatTalentScale(t, 6, 10)) end,
  36 + range = function(self, t) return math.min(14, math.floor(self:combatTalentScale(t, 6, 10))) end,
37 37 on_pre_use = function(self, t)
38 38 if self:attr("never_move") then return false end
39 39 return true
... ...
... ... @@ -66,11 +66,11 @@ newTalent{
66 66 effs[#effs+1] = {"effect", eff_id, priority=2}
67 67 elseif e.subtype.confusion and self:getTalentLevel(t) >=3 then
68 68 effs[#effs+1] = {"effect", eff_id, priority=3}
69   - elseif e.subtype.pin and self:getTalentLevel(t) >=4 then
  69 + elseif e.subtype.pin and self:getTalentLevel(t) >=3 then
70 70 effs[#effs+1] = {"effect", eff_id, priority=4}
71   - elseif e.subtype.slow and self:getTalentLevel(t) >=5 then
  71 + elseif e.subtype.disarm and self:getTalentLevel(t) >=4 then
72 72 effs[#effs+1] = {"effect", eff_id, priority=5}
73   - elseif e.subtype.disarm and self:getTalentLevel(t) >=5 then
  73 + elseif e.subtype.slow and self:getTalentLevel(t) >=4 then
74 74 effs[#effs+1] = {"effect", eff_id, priority=6}
75 75 end
76 76 end
... ... @@ -89,8 +89,8 @@ newTalent{
89 89 info = function(self, t)
90 90 local chance = t.getChance(self, t)
91 91 return ([[You've learned to recover quickly from effects that would disable you. Each turn, you have a %d%% chance to recover from a single stun effect.
92   - At talent level 2 you may also recover from blindness, at level 3 confusion, level 4 pins, and level 5 disarms and slows.
93   - Effects will be cleansed with the priority order Stun > Blind > Confusion > Pin > Slow > Disarm.
  92 + At talent level 2 you may also recover from Blindness, at level 3 Confusion and Pins, and level 4 Disarms and Slows.
  93 + Effects will be cleansed with the priority order Stun > Blind > Confusion > Pin > Disarm > Slow.
94 94 Only one effect may be recovered from each turn, and the chance to recover from an effect scales with your Constitution.]]):
95 95 format(chance)
96 96 end,
... ...
... ... @@ -122,12 +122,13 @@ newTalent{
122 122 if not target or not self:canProject(tg, x, y) then return nil end
123 123
124 124 local damage = t.getShieldDamage(self, t)
125   - self:forceUseTalent(self.T_BLOCK, {ignore_energy=true, ignore_cd = true, silent = true})
126 125
127 126 self:attackTargetWith(target, shield_combat, nil, damage)
128 127 self:attackTargetWith(target, shield_combat, nil, damage)
129 128 self:attackTargetWith(target, shield_combat, nil, damage)
130 129
  130 + self:forceUseTalent(self.T_BLOCK, {ignore_energy=true, ignore_cd = true, silent = true})
  131 +
131 132 return true
132 133 end,
133 134 info = function(self, t)
... ...
... ... @@ -193,7 +193,7 @@ uberTalent{
193 193 Whenever you have stored %d damage of one type you unleash a powerful blast at a random enemy dealing %d damage of that type in radius %d and applying one of the following effects:
194 194
195 195 Physical: Slows combat, mind, and spell speed by 20%%.
196   - #GREEN#Acid:#LAST# Deals %d acid damage each turn for 5 turns.
  196 + #GREEN#Acid:#LAST# Deals %d acid damage each turn for 5 turns (%d total).
197 197 #DARK_GREEN#Blight:#LAST# Deals %d blight damage each turn for 5 turns and reduces strength, constitution, and dexterity by %d.
198 198 #GREY#Darkness:#LAST# Reduces damage dealt by %d%% for 5 turns.
199 199 #LIGHT_STEEL_BLUE#Temporal:#LAST# Slows global action speed by %d%% for 5 turns.
... ... @@ -202,7 +202,7 @@ uberTalent{
202 202 Each effect can only happen once per 10 player turns. This does not count as a typical cooldown.
203 203 The damage and effect power increase with your Cunning, the threshold with your level, and the apply power is the highest of your mind or spell power.
204 204 %s]])
205   - :format(t.getThreshold(self, t), t.getDamage(self, t), self:getTalentRadius(t), t.getAcid(self, t), blight_dam, blight_disease, t.getDarkness(self, t), t.getTemporal(self, t), t.getMind(self, t), str)
  205 + :format(t.getThreshold(self, t), t.getDamage(self, t), self:getTalentRadius(t), damDesc(self, DamageType.ACID, t.getAcid(self, t)), damDesc(self, DamageType.ACID, t.getAcid(self, t)*5), blight_dam, blight_disease, t.getDarkness(self, t), t.getTemporal(self, t), t.getMind(self, t), str)
206 206 end,
207 207 }
208 208
... ...
... ... @@ -2525,9 +2525,9 @@ newEffect{
2525 2525 eff.particle = self:addParticles(Particles.new("phantasm_shield", 1))
2526 2526 end,
2527 2527 on_merge = function(self, old_eff, new_eff)
2528   - old_eff.defense = math.min(40, math.max(old_eff.defense, new_eff.defense)) or 0
2529   - old_eff.resists = math.min(40, math.max(old_eff.resists, new_eff.resists)) or 0
2530   - old_eff.effect_reduction = math.min(40, math.max(old_eff.effect_reduction, new_eff.effect_reduction)) or 0
  2528 + old_eff.defense = math.min(40, math.max(old_eff.defense, new_eff.defense + (self:attr("defense_on_teleport") or 0)))
  2529 + old_eff.resists = math.min(40, math.max(old_eff.resists, new_eff.resists + (self:attr("resist_all_on_teleport") or 0)))
  2530 + old_eff.effect_reduction = math.min(40, math.max(old_eff.effect_reduction, new_eff.effect_reduction + (self:attr("effect_reduction_on_teleport") or 0)))
2531 2531
2532 2532 self:removeTemporaryValue("combat_def", old_eff.defid)
2533 2533 self:removeTemporaryValue("resists", old_eff.resid)
... ... @@ -4432,6 +4432,7 @@ newEffect{
4432 4432 self:setTarget() -- clear ai target
4433 4433 eff.olf_faction = self.faction
4434 4434 self.faction = eff.src.faction
  4435 + self:effectTemporaryValue(eff, "hostile_for_level_change", 1)
4435 4436 if core.shader.active() then
4436 4437 local h1x, h1y = self:attachementSpot("head", true) if h1x then eff.particle = self:addParticles(Particles.new("circle", 1, {shader=true, oversize=1, a=225, appear=8, speed=0, img="domination_hex_debuff_aura", base_rot=0, radius=0, x=h1x, y=h1y})) end
4437 4438 end
... ...
... ... @@ -233,6 +233,7 @@ newEffect{
233 233 self.faction = eff.src.faction
234 234 self:effectTemporaryValue(eff, "never_anger", 1)
235 235 self:effectTemporaryValue(eff, "invulnerable", 1)
  236 + self:effectTemporaryValue(eff, "hostile_for_level_change", 1)
236 237 end,
237 238 deactivate = function(self, eff)
238 239 if eff.particle then self:removeParticles(eff.particle) end
... ...
... ... @@ -1101,7 +1101,7 @@ newEffect{
1101 1101 desc = "Cripple",
1102 1102 long_desc = function(self, eff) return ("The target is crippled, reducing melee, spellcasting and mind speed by %d%%."):format(eff.speed*100) end,
1103 1103 type = "physical",
1104   - subtype = { wound=true, cripple=true },
  1104 + subtype = { wound=true, cripple=true, slow=true },
1105 1105 status = "detrimental",
1106 1106 parameters = { speed=0.3 },
1107 1107 on_gain = function(self, err) return "#Target# is crippled." end,
... ...
... ... @@ -56,7 +56,6 @@ newEntity{ define_as = "BRIAGH",
56 56 resolvers.drops{chance=100, nb=5, {type="gem"} },
57 57
58 58 resolvers.talents{
59   - [Talents.T_PROBABILITY_TRAVEL]=10,
60 59 [Talents.T_SUMMON]=1,
61 60 [Talents.T_SAND_BREATH]={base=8, every=8, max=12},
62 61 [Talents.T_STUN]={base=5, every=5, max=8},
... ...
... ... @@ -51,7 +51,7 @@ return {
51 51
52 52 nb_rooms = {0,0,1},
53 53 rooms = {"greater_vault"},
54   - greater_vaults_list = {"dragon_lair", "lava_island", "bandit-fortress", "horror-chamber", "living-weapons", "sleeping-dragons"},
  54 + greater_vaults_list = {"dragon_lair", "lava_island", "horror-chamber", "living-weapons", "sleeping-dragons"},
55 55 lite_room_chance = 100,
56 56 },
57 57 actor = {
... ...
... ... @@ -46,7 +46,7 @@ return {
46 46 edge_entrances = {4,6},
47 47 rooms = {"forest_clearing", {"lesser_vault",8}},
48 48 rooms_config = {forest_clearing={pit_chance=5, filters={{type="insect", subtype="ant"}, {type="insect"}, {type="animal", subtype="snake"}, {type="animal", subtype="canine"}}}},
49   - lesser_vaults_list = {"honey_glade", "troll-hideout", "mage-hideout", "thief-hideout", "plantlife", "mold-path", "bandit-fortress","loot-vault","worms"},
  49 + lesser_vaults_list = {"honey_glade", "troll-hideout", "mage-hideout", "thief-hideout", "plantlife", "mold-path", "loot-vault","worms"},
50 50 ['.'] = "GRASS",
51 51 ['#'] = "TREE",
52 52 up = "GRASS_UP4",
... ...
... ... @@ -37,7 +37,7 @@ function _M:init(actor)
37 37
38 38 self:generateList()
39 39 if self.dont_show then return end
40   - if not config.settings.cheat then game:saveGame() end
  40 + if not config.settings.cheat then game:onTickEnd(function() game:saveGame() end) end
41 41
42 42 local text = [[Death in #{bold}#Tales of Maj'Eyal#{normal}# is usually permanent, but if you have a means of resurrection it will be proposed in the menu below.
43 43 You can dump your character data to a file to remember her/him forever, or you can exit and try once again to survive in the wilds!
... ... @@ -187,7 +187,7 @@ function _M:eidolonPlane()
187 187
188 188 game.log("#LIGHT_RED#From the brink of death you seem to be yanked to another plane.")
189 189 game.player:updateMainShader()
190   - if not config.settings.cheat then game:saveGame() end
  190 + if not config.settings.cheat then game:onTickEnd(function() game:saveGame() end) end
191 191
192 192 self.actor:checkTwoHandedPenalty()
193 193 end)
... ...