Commit bc50953cbca9cb595a3df4bfbb64b981c7e87b92

Authored by DarkGod
2 parents 0e82ff63 6a651824

Merge branch 'fix-purging-trap-immunity' into 'master'

Fix Purging Trap to check silence immunity.

The silence aspect of the trap will check silence immunity of the target before applying silence.

See merge request !772
... ... @@ -1883,8 +1883,12 @@ newTalent{
1883 1883 local who = game.level.map(px, py, engine.Map.ACTOR)
1884 1884 if who == self.summoner then return end
1885 1885 if who then
1886   - who:setEffect(who.EFF_SILENCED, self.dur, {apply_power=self.check_hit})
1887 1886
  1887 + if who:canBe("silence") then
  1888 + who:setEffect(who.EFF_SILENCED, self.dur, {apply_power=self.check_hit})
  1889 + else
  1890 + game.logSeen(who, "%s resists the silence!", who:getName():capitalize())
  1891 + end
1888 1892 local effs = {}
1889 1893
1890 1894 -- Go through all spell effects
... ...