Commit 08d4edbe052ce299bca5471129e03730130de8d1
1 parent
a4c226df
Added a check to newEffect to ensure unicity of the id
Showing
2 changed files
with
1 additions
and
28 deletions
... | ... | @@ -56,6 +56,7 @@ function _M:newEffect(t) |
56 | 56 | -- I18N |
57 | 57 | t.desc = _t(t.desc) |
58 | 58 | |
59 | + assert(not self.tempeffect_def["EFF_"..t.name], "effect already exists with id EFF_"..t.name) | |
59 | 60 | self.tempeffect_def["EFF_"..t.name] = t |
60 | 61 | t.id = "EFF_"..t.name |
61 | 62 | self["EFF_"..t.name] = "EFF_"..t.name | ... | ... |
... | ... | @@ -542,34 +542,6 @@ newEffect{ |
542 | 542 | } |
543 | 543 | |
544 | 544 | newEffect{ |
545 | - name = "HUSK_OFS", image = "talents/animus_purge.png", | |
546 | - desc = _t"Husk out of sight", | |
547 | - long_desc = function(self, eff) return _t"The husk is out of sight of its host; direct control will be lost!" end, | |
548 | - type = "other", | |
549 | - subtype = { miscellaneous=true }, | |
550 | - status = "detrimental", | |
551 | - parameters = { }, | |
552 | - on_gain = function(self, err) return _t"#LIGHT_RED##Target# is out of sight of its master; direct control will break!", _t"+Out of sight" end, | |
553 | - activate = function(self, eff) | |
554 | - end, | |
555 | - deactivate = function(self, eff) | |
556 | - end, | |
557 | - on_timeout = function(self, eff) | |
558 | - if game.player ~= self then return true end | |
559 | - | |
560 | - if eff.dur <= 1 then | |
561 | - game:onTickEnd(function() | |
562 | - game.logPlayer(self, "#LIGHT_RED#You lost sight of your husk for too long; it disintegrates!") | |
563 | - game.player:runStop(_t"husk out of sight") | |
564 | - game.player:restStop(_t"husk out of sight") | |
565 | - game.party:setPlayer(self.summoner) | |
566 | - self:die(self) | |
567 | - end) | |
568 | - end | |
569 | - end, | |
570 | -} | |
571 | - | |
572 | -newEffect{ | |
573 | 545 | name = "CONTINUUM_DESTABILIZATION", |
574 | 546 | desc = _t"Continuum Destabilization", |
575 | 547 | long_desc = function(self, eff) return ("The target has been affected by space or time manipulations and is becoming more resistant to them (+%d)."):tformat(eff.power) end, | ... | ... |
-
Please register or login to post a comment