Commit ec68643aaf1a6f4fb2164a58587880ca12f12a4b
Merge branch 'misc174' into 'master'
Misc 1.7.4 See merge request !723
Showing
17 changed files
with
60 additions
and
52 deletions
... | ... | @@ -133,8 +133,8 @@ function _M:trigger(x, y, who) |
133 | 133 | else |
134 | 134 | local tname = who:getName() |
135 | 135 | local str =self.message |
136 | - str = str:gsub("@target@", tname) | |
137 | - str = str:gsub("@Target@", tname:capitalize()) | |
136 | + str = str:noun_sub("@target@", tname) | |
137 | + str = str:noun_sub("@Target@", tname:capitalize()) | |
138 | 138 | game.logSeen(who, "%s", str) |
139 | 139 | end |
140 | 140 | local known, del = false, false | ... | ... |
... | ... | @@ -612,14 +612,10 @@ local function archery_projectile(tx, ty, tg, self, tmp) |
612 | 612 | end |
613 | 613 | |
614 | 614 | -- Siege Arrows |
615 | - if hitted and ammo and ammo.siege_impact and (not self.shattering_impact_last_turn or self.shattering_impact_last_turn < game.turn) then | |
615 | + if hitted and ammo and ammo.siege_impact then | |
616 | 616 | local dam = dam * ammo.siege_impact |
617 | - local invuln = target.invulnerable | |
618 | - game.logSeen(target, "The shattering blow creates a shockwave!") | |
619 | - target.invulnerable = 1 -- Target already hit, don't damage it twice | |
620 | - self:project({type="ball", radius=1, friendlyfire=false}, target.x, target.y, DamageType.PHYSICAL, dam) | |
621 | - target.invulnerable = invuln | |
622 | - self.shattering_impact_last_turn = game.turn | |
617 | + game.logSeen(target, "The siege arrow creates a shockwave!") | |
618 | + self:project({type="ball", radius=1, friendlyfire=false, act_exclude={[target.uid]=true}}, target.x, target.y, DamageType.PHYSICAL, dam) | |
623 | 619 | end |
624 | 620 | |
625 | 621 | if self ~= target then | ... | ... |
... | ... | @@ -2621,7 +2621,9 @@ newDamageType{ |
2621 | 2621 | if target.turn_procs and target.turn_procs.been_retched then |
2622 | 2622 | mult = 0.5 ^ target.turn_procs.been_retched |
2623 | 2623 | end |
2624 | + src:attr("can_heal_necrotic_minions", 1) | |
2624 | 2625 | target:heal(dam * 1.5 * mult, src) |
2626 | + src:attr("can_heal_necrotic_minions", -1) | |
2625 | 2627 | if target.turn_procs then |
2626 | 2628 | target.turn_procs.been_retched = (target.turn_procs.been_retched or 0) + 1 |
2627 | 2629 | end | ... | ... |
... | ... | @@ -222,14 +222,13 @@ newEntity{ |
222 | 222 | |
223 | 223 | charm_on_use = { |
224 | 224 | {100, function(self, who) return ("increase the duration of %d beneficial effects by %d"):tformat(self.extending_amt, self.extending_dur) end, function(self, who) |
225 | - local effs = who:effectsFilter(function(eff) | |
225 | + local eff_ids = who:effectsFilter(function(eff) | |
226 | 226 | if eff.status == "beneficial" and eff.type ~= "other" then return true end |
227 | - end) | |
228 | - if #effs <= 0 then return end | |
229 | - for i = 1, math.floor(self.extending_amt) do | |
230 | - local eff = rng.tableRemove(effs) | |
227 | + end, self.extending_amt) | |
228 | + for _, eff_id in pairs(eff_ids) do | |
229 | + local eff = who:hasEffect(eff_id) | |
231 | 230 | if eff and eff.dur then |
232 | - eff.dur = eff.dur + math.floor(self.extending_amt) | |
231 | + eff.dur = eff.dur + math.floor(self.extending_dur) | |
233 | 232 | end |
234 | 233 | end |
235 | 234 | end}, |
... | ... | @@ -250,14 +249,13 @@ newEntity{ |
250 | 249 | |
251 | 250 | charm_on_use = { |
252 | 251 | {100, function(self, who) return ("increase the duration of %d beneficial effects by %d"):tformat(self.extending_amt, self.extending_dur) end, function(self, who) |
253 | - local effs = who:effectsFilter(function(eff) | |
252 | + local eff_ids = who:effectsFilter(function(eff) | |
254 | 253 | if eff.status == "beneficial" and eff.type ~= "other" then return true end |
255 | - end) | |
256 | - if #effs <= 0 then return end | |
257 | - for i = 1, math.floor(self.extending_amt) do | |
258 | - local eff = rng.tableRemove(effs) | |
254 | + end, self.extending_amt) | |
255 | + for _, eff_id in pairs(eff_ids) do | |
256 | + local eff = who:hasEffect(eff_id) | |
259 | 257 | if eff and eff.dur then |
260 | - eff.dur = eff.dur + math.floor(self.extending_amt) | |
258 | + eff.dur = eff.dur + math.floor(self.extending_dur) | |
261 | 259 | end |
262 | 260 | end |
263 | 261 | end}, | ... | ... |
... | ... | @@ -172,15 +172,27 @@ local make_poltergeist = function(type) |
172 | 172 | } |
173 | 173 | e[#e+1] = resolvers.inscription("IMPLANT:_STEAM_GENERATOR", {cooldown=32, power=10}), |
174 | 174 | make_req(el, o, "steamsaw") |
175 | + elseif o.subtype == "whip" and o.slot_forbid == "OFFHAND" then | |
176 | + class = "Berserker" | |
177 | + e.autolevel = "warrior" | |
178 | + e[#e+1] = resolvers.talents{ | |
179 | + [Talents.T_EXOTIC_WEAPONS_MASTERY]={base=1, every=10, max=5}, | |
180 | + } | |
175 | 181 | elseif o.subtype == "whip" then |
176 | - class = "Corruptor" | |
177 | - e.autolevel = "caster" | |
178 | - e.ai_tactic = resolvers.tactic"ranged" | |
179 | - e[#e+1] = resolvers.talents{ | |
180 | - [Talents.T_CORRUPTED_NEGATION]={base=3, every=12, max=6}, | |
181 | - [Talents.T_DRAIN]={base=5, every=10, max=7}, | |
182 | - [Talents.T_BLOOD_GRASP]={base=4, every=5, max=7}, | |
183 | - } | |
182 | + class = "Marauder" | |
183 | + e.autolevel = "archer" | |
184 | + e[#e+1] = resolvers.talents{ | |
185 | + [Talents.T_EXOTIC_WEAPONS_MASTERY]={base=1, every=10, max=5}, | |
186 | + } | |
187 | + make_req(el, o, "whip") | |
188 | + elseif o.subtype == "trident" then | |
189 | + class = "Bulwark" | |
190 | + e.autolevel = "warrior" | |
191 | + e[#e+1] = resolvers.talents{ | |
192 | + [Talents.T_EXOTIC_WEAPONS_MASTERY]={base=1, every=10, max=5}, | |
193 | + [Talents.T_ARMOUR_TRAINING]=2 | |
194 | + } | |
195 | + make_req(el, o, "shield") | |
184 | 196 | elseif o.type == "weapon" and o.slot_forbid == "OFFHAND" then |
185 | 197 | class = "Berserker" |
186 | 198 | e.autolevel = "warrior" | ... | ... |
... | ... | @@ -521,7 +521,7 @@ newTalent{ |
521 | 521 | end, |
522 | 522 | info = function(self, t) |
523 | 523 | return ([[Your passion for singing the praises of the Moons reaches its zenith. |
524 | - Your Hymns now fire shadowy beams that will hit up to %d of your foes within radius 5 for 1 to %0.2f damage, with a 20%% chance of blinding. | |
524 | + Your Hymns now fire shadowy beams that will hit up to %d of your foes within radius 5 for %0.2f damage, with a 25%% chance of blinding. | |
525 | 525 | This powerful effect will drain %0.1f negative energy each time it fires at at least 1 target; no beam will fire if your negative energy is too low. |
526 | 526 | These values scale with your Spellpower.]]):tformat(t.getTargetCount(self, t), damDesc(self, DamageType.DARKNESS, t.getDamage(self, t)), t.getNegativeDrain(self, t)) |
527 | 527 | end, | ... | ... |
... | ... | @@ -152,9 +152,9 @@ newTalent{ |
152 | 152 | if self.talents_cd[self.T_SUN_BEAM] <= 0 then self.talents_cd[self.T_SUN_BEAM] = nil end |
153 | 153 | else |
154 | 154 | self:setEffect(self.EFF_SUN_VENGEANCE, 2, {}) |
155 | - if self:attr("sun_paladin_avatar") then | |
156 | - self:alterTalentCoolingdown(self.T_JUDGEMENT, -6) | |
157 | - end | |
155 | + end | |
156 | + if self:attr("sun_paladin_avatar") then | |
157 | + self:alterTalentCoolingdown(self.T_JUDGEMENT, -6) | |
158 | 158 | end |
159 | 159 | end, |
160 | 160 | info = function(self, t) | ... | ... |
... | ... | @@ -156,8 +156,13 @@ newTalent{ |
156 | 156 | if self:isTalentActive(t.id) then -- always hit enemies while in the Fearscape (affects AI) |
157 | 157 | return {type="ball", nolock=true, pass_terrain=true, nowarning=true, range=20, radius=20, requires_knowledge=false, selffire=false, block_path=false, block_radius=false} |
158 | 158 | else -- always hit the primary target |
159 | - local tgt = self.ai_target.actor | |
160 | - return {type="hit", range=self:getTalentRange(t), talent=t, x=tgt and tgt.x, y=tgt and tgt.y} | |
159 | + return {type="hit", range=self:getTalentRange(t), talent=t} | |
160 | + end | |
161 | + end, | |
162 | + onAIGetTarget = function(self, t) | |
163 | + if self.ai_target and self.ai_target.actor then | |
164 | + local target = self.ai_target.actor | |
165 | + return target.x, target.y, target | |
161 | 166 | end |
162 | 167 | end, |
163 | 168 | range = 5, |
... | ... | @@ -272,6 +277,7 @@ newTalent{ |
272 | 277 | local ret = { |
273 | 278 | target = target, |
274 | 279 | x = self.x, y = self.y, |
280 | + target_x = target.x, target_y = target.y, | |
275 | 281 | particle = particle, |
276 | 282 | drain_add = 0, |
277 | 283 | } |
... | ... | @@ -317,7 +323,7 @@ newTalent{ |
317 | 323 | self.x, self.y = x1, y1 |
318 | 324 | end |
319 | 325 | end |
320 | - local x2, y2 = util.findFreeGrid(p.x, p.y, 20, true, {[Map.ACTOR]=true}) | |
326 | + local x2, y2 = util.findFreeGrid(p.target_x or p.x, p.target_y or p.y, 20, true, {[Map.ACTOR]=true}) | |
321 | 327 | if not p.target.dead then |
322 | 328 | if x2 then |
323 | 329 | p.target:move(x2, y2, true) | ... | ... |
... | ... | @@ -607,7 +607,7 @@ newTalent{ |
607 | 607 | points = 1, |
608 | 608 | tactical = { ATTACK = {PHYSICAL = 1}, |
609 | 609 | DISABLE = function(self, t, target) |
610 | - return target:checkClassification("unliving") and 0 or self:knowTalent(self.T_DART_LAUNCHER_MASTERY) and 2 or {sleep = 1, poison = 1} | |
610 | + return self:knowTalent(self.T_DART_LAUNCHER_MASTERY) and 2 or {sleep = 1, poison = 1} | |
611 | 611 | end |
612 | 612 | }, |
613 | 613 | range = 5, |
... | ... | @@ -636,7 +636,7 @@ newTalent{ |
636 | 636 | local target = game.level.map(px, py, engine.Map.ACTOR) |
637 | 637 | if not target then return nil end |
638 | 638 | self:project(tg, x, y, DamageType.PHYSICAL, self:physicalCrit(t.getDamage(self,t))) |
639 | - if target:checkClassification("living") and (self:knowTalent(self.T_DART_LAUNCHER_MASTERY) or target:canBe("sleep") and target:canBe("poison")) then | |
639 | + if (self:knowTalent(self.T_DART_LAUNCHER_MASTERY) or target:canBe("sleep") and target:canBe("poison")) then | |
640 | 640 | target:setEffect(target.EFF_SEDATED, 4, {src=self, power=t.getSleepPower(self,t), slow=slow, insomnia=20, no_ct_effect=true, apply_power=self:combatAttack()}) |
641 | 641 | game.level.map:particleEmitter(target.x, target.y, 1, "generic_charge", {rm=180, rM=200, gm=100, gM=120, bm=30, bM=50, am=70, aM=180}) |
642 | 642 | else | ... | ... |
... | ... | @@ -789,7 +789,7 @@ newTalent{ |
789 | 789 | return false -- NPC's don't actually use the action function |
790 | 790 | end, |
791 | 791 | action = function(self, t) |
792 | - local chat = Chat.new("trap-priming", t, self, {player=self, trapping_tids=traps_getunlocked(self, t), chat_talent=t}) | |
792 | + local chat = Chat.new("trap-priming", self, self, {player=self, trapping_tids=traps_getunlocked(self, t), chat_talent=t}) | |
793 | 793 | local d = chat:invoke() |
794 | 794 | d.key:addBinds{ EXIT = function() |
795 | 795 | self:talentDialogReturn(self.trap_primed, self.trap_primed) | ... | ... |
... | ... | @@ -333,7 +333,7 @@ newTalent{ |
333 | 333 | on_arrival = function(self, t, m) |
334 | 334 | local tg = {type="ball", range=self:getTalentRange(t), radius=self:getTalentRadius(t), talent=t, x=m.x, y=m.y} |
335 | 335 | local duration = self:callTalent(self.T_GRAND_ARRIVAL,"effectDuration") |
336 | - local slowdown = self:callTalent(self.T_GRAND_ARRIVAL,"slowStrength") / 100 --divide by 100 to change percent to decimal | |
336 | + local slowdown = self:callTalent(self.T_GRAND_ARRIVAL,"slowStrength") | |
337 | 337 | self:project(tg, m.x, m.y, DamageType.TEMP_EFFECT, {foes=true, eff=self.EFF_SLOW_MOVE, dur=duration, p={power=slowdown}}, {type="flame"}) |
338 | 338 | end, |
339 | 339 | summonTime = function(self, t) return math.floor(self:combatScale(self:getTalentLevel(t), 2, 0, 7, 5)) + self:callTalent(self.T_RESILIENCE, "incDur") end, | ... | ... |
... | ... | @@ -132,6 +132,7 @@ newTalent{ |
132 | 132 | local oh = self:hasOffWeaponType("mindstar") |
133 | 133 | if mh then apply(mh) end |
134 | 134 | if oh then apply(oh) end |
135 | + return true | |
135 | 136 | end, |
136 | 137 | info = function(self, t) |
137 | 138 | return ([[Alter the flow of energies of your equiped mindstars, changing their damage type between nature and mind.]]):tformat() | ... | ... |
... | ... | @@ -102,7 +102,7 @@ newTalent{ |
102 | 102 | local nb = 0 |
103 | 103 | for eff_id, p in pairs(self.tmp) do |
104 | 104 | local e = self.tempeffect_def[eff_id] |
105 | - if e.type == "magical" and e.status == "detrimental" then nb = nb + 1 end | |
105 | + if (e.type == "magical" or e.type == "physical") and e.status == "detrimental" then nb = nb + 1 end | |
106 | 106 | end |
107 | 107 | return nb |
108 | 108 | end, |
... | ... | @@ -110,13 +110,7 @@ newTalent{ |
110 | 110 | local nb = 0 |
111 | 111 | for eff_id, p in pairs(aitarget.tmp) do |
112 | 112 | local e = self.tempeffect_def[eff_id] |
113 | - if e.type == "magical" and e.status == "beneficial" then nb = nb + 1 end | |
114 | - end | |
115 | - for tid, act in pairs(aitarget.sustain_talents) do | |
116 | - if act then | |
117 | - local talent = aitarget:getTalentFromId(tid) | |
118 | - if talent.is_spell then nb = nb + 1 end | |
119 | - end | |
113 | + if (e.type == "magical" or e.type == "physical") and e.status == "beneficial" then nb = nb + 1 end | |
120 | 114 | end |
121 | 115 | return nb^0.5 |
122 | 116 | end}, | ... | ... |
... | ... | @@ -4635,6 +4635,7 @@ newEffect{ |
4635 | 4635 | on_lose = function(self, err) return nil, true end, |
4636 | 4636 | activate = function(self, eff) |
4637 | 4637 | self:effectTemporaryValue(eff, "generic_damage_penalty", eff.power) |
4638 | + self:effectTemporaryValue(eff, "dazzled", 1) | |
4638 | 4639 | end, |
4639 | 4640 | } |
4640 | 4641 | ... | ... |
... | ... | @@ -490,8 +490,7 @@ function _M:drawDialog(kind, actor_to_compare) |
490 | 490 | local text = "" |
491 | 491 | local dur_text = "" |
492 | 492 | |
493 | - -- if player.__te4_uuid and profile.auth and profile.auth.drupid and not config.settings.disable_all_connectivity and config.settings.tome.upload_charsheet then | |
494 | - if true then profile.auth.drupid=1 player.__te4_uuid="jklljkljlk" | |
493 | + if player.__te4_uuid and profile.auth and profile.auth.drupid and not config.settings.disable_all_connectivity and config.settings.tome.upload_charsheet then | |
495 | 494 | local path = "https://te4.org/characters/"..profile.auth.drupid.."/tome/"..player.__te4_uuid |
496 | 495 | local LinkTxt = ("Online URL: #LIGHT_BLUE##{underline}#%s#{normal}#"):tformat(path) |
497 | 496 | local Link_w, Link_h = self.font:size(LinkTxt) | ... | ... |
-
Please register or login to post a comment