Skip to content
Snippets Groups Projects
Commit 10d4af87 authored by dg's avatar dg
Browse files

test

git-svn-id: http://svn.net-core.org/repos/t-engine4@4668 51575b47-30f0-44d4-a5cc-537603b46e54
parent a990f68b
No related branches found
No related tags found
No related merge requests found
......@@ -68,8 +68,8 @@ setDefaultProjector(function(src, x, y, type, dam, tmp, no_martyr)
print("[PROJECTOR] after necrotic increase dam", dam)
end
if target.isTalentActive and target:isTalentActive(target.T_GESTURE_OF_GUARDING) then
local t = target:getTalentFromId(target.T_GESTURE_OF_GUARDING)
if src.isTalentActive and src:isTalentActive(target.T_GESTURE_OF_GUARDING) then
local t = src:getTalentFromId(target.T_GESTURE_OF_GUARDING)
dam = t.on_damageInflicted(target, t, type, dam, src)
end
......
......@@ -40,13 +40,13 @@ newTalent{
game.logPlayer(self, "You do not have a free hand to use Gesture of Pain.")
return false
end
return true
end,
attack = function(self, t, target)
local freeHands = self:getFreeHands()
local freeHands = self:getFreeHands()
local hit = false
local mindpower = self:combatMindpower()
local baseDamage = t.getBaseDamage(self, t)
if self:checkHit(mindpower, target:combatMentalResist()) then
......@@ -59,7 +59,7 @@ newTalent{
game.logSeen(self, "%s resists the Gesture of Pain.", target.name:capitalize())
game:playSoundNear(self, "actions/melee_miss")
end
if not target.dead and freeHands > 1 and self.hate >= 0.1 and rng.chance(t.getSecondAttackChance(self, t)) then
if self:checkHit(mindpower, target:combatMentalResist()) then
local damage = baseDamage * rng.float(0.5, 1)
......@@ -72,11 +72,11 @@ newTalent{
game:playSoundNear(self, "actions/melee_miss")
end
end
if hit then
game.level.map:particleEmitter(target.x, target.y, 1, "melee_attack", {color=colors.VIOLET})
end
return self:combatSpeed(), hit
end,
activate = function(self, t)
......@@ -102,7 +102,7 @@ newTalent{
getMindpowerChange = function(self, t, freeHands)
freeHands = freeHands or self:getFreeHands()
if freeHands == 0 then return 0 end
local change = math.pow(self:getTalentLevel(t), 0.7) * 4
if freeHands > 1 then change = change * 1.4 end
return math.floor(change)
......@@ -123,7 +123,7 @@ newTalent{
getMindCritChange = function(self, t, freeHands)
freeHands = freeHands or self:getFreeHands()
if freeHands == 0 then return 0 end
local change = math.pow(self:getTalentLevel(t), 0.5) * 2
if freeHands > 1 then change = change * 1.4 end
return change
......@@ -145,16 +145,18 @@ newTalent{
getDamageResistChange = function(self, t, distance, freeHands)
freeHands = freeHands or self:getFreeHands()
if freeHands == 0 then return 0 end
local change = math.pow(self:getTalentLevel(t), 0.5) * 1.15
if freeHands > 1 then change = change * 1.4 end
print("===dec by", change,change * math.min(7, distance))
return change * math.min(7, distance)
end,
getIncDamageChange = function(self, t, distance)
local change = -(2 + math.pow(self:getTalentLevel(t), 0.5) * 0.8)
print("===inc by", change,change * math.min(7, distance))
return change * math.min(7, distance)
end,
on_damageRecieved = function(self, t, type, dam, src)
on_damageReceived = function(self, t, type, dam, src)
if src and src.x and src.y and (self.x ~= src.x or self.y ~= src.y) and self:hasLOS(src.x, src.y) then
local distance = core.fov.distance(src.x, src.y, self.x, self.y)
dam = dam * (100 - t.getDamageResistChange(self, t, distance) / 100)
......@@ -168,6 +170,12 @@ newTalent{
end
return dam
end,
activate = function(self, t)
return {}
end,
deactivate = function(self, t, p)
return true
end,
info = function(self, t)
local damageResistChange1 = t.getDamageResistChange(self, t, 1, 1)
local damageResistChangeMax1 = t.getDamageResistChange(self, t, 1000, 1)
......
......@@ -26,6 +26,11 @@ static char *__BIND_PHYSFS_toDependent(dvoid *opaque, const char *name, const ch
else
{
char *f = __PHYSFS_platformCvtToDependent((char *)opaque, name, NULL);
// FIXME: I'm a very very dirty hack; __PHYSFS_platformCvtToDependent is not really meant to return a platform independant path, so why turn it into one (for poor windows users)
char *c = f;
while (*c) { if (*c == '\\') *c = '/'; c++; }
return f;
}
}
......
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