Skip to content
Snippets Groups Projects
Commit 9cca26be authored by dg's avatar dg
Browse files

Shield blocks now trigger a on_block(self, src, type, dam, eff) call on the shield if it exists

git-svn-id: http://svn.net-core.org/repos/t-engine4@5190 51575b47-30f0-44d4-a5cc-537603b46e54
parent 066b5b64
No related branches found
No related tags found
No related merge requests found
......@@ -113,7 +113,7 @@ newTalent{
no_unlearn_last = true,
action = function(self, t)
local staff = self:hasStaffWeapon()
if not staff then
if not staff or not staff.wielder or not staff.wielder.learn_talent or not staff.wielder.learn_talent[self.T_COMMAND_STAFF] then
game.logPlayer(self, "You must be holding a staff.")
return
end
......
......@@ -1784,6 +1784,8 @@ newEffect{
eff.dur = 0
local amt = util.bound(dam - eff.power, 0, dam)
local blocked = dam - amt
local shield = self:hasShield()
if shield then shield:check("on_block", self, src, type, dam, eff) end
if eff.properties.br then self:heal(blocked) end
if eff.properties.ref and src.life then DamageType.defaultProjector(src, src.x, src.y, type, blocked, tmp, true) end
if (self:knowTalent(self.T_RIPOSTE) or amt == 0) and src.life then src:setEffect(src.EFF_COUNTERSTRIKE, 1 + dur_inc, {power=eff.power, no_ct_effect=true, src=self, crit_inc=crit_inc, nb=nb}) end
......
......@@ -6,11 +6,9 @@
* md5sum saves & save it online to check local tempering
* donator's fight club
* redo traps:
- spinning "laser" trap
- boulder trap
- flood trap
- delayed explosion trap
- summon trap
-
- wildfire trap (random sprays of flames, like dark tendrils)
- gust of wind trap (for X turn a strong wind blows in a random direction, force-moving things
* slaves in the ring of blood zone should be freed once slaver is dead = achievement for many
* sub-tile entities, like the spiders for the arachnomancer: split a tile in 16 (4x4)
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