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

plop

git-svn-id: http://svn.net-core.org/repos/t-engine4@6764 51575b47-30f0-44d4-a5cc-537603b46e54
parent 319a575e
No related branches found
No related tags found
No related merge requests found
......@@ -247,6 +247,7 @@ function _M:useTalentMessage(ab)
str = str:gsub("@source@", self.name)
str = str:gsub("@target@", tname)
str = str:gsub("@Target@", tname:capitalize())
str = str:gsub("@hisher@", string.his_her(self))
return str
end
......
......@@ -1296,6 +1296,8 @@ function _M:setupCommands()
print("===============")
end end,
[{"_g","ctrl"}] = function() if config.settings.cheat then
game.level.map:particleEmitter(game.player.x, game.player.y, 1, "burning-steam", {})
do return end
local f, err = loadfile("/data/general/events/crystaline-forest.lua")
print(f, err)
setfenv(f, setmetatable({level=self.level, zone=self.zone}, {__index=_G}))
......
......@@ -35,7 +35,10 @@ function _M:archeryAcquireTargets(tg, params)
game.logPlayer(self, "You must wield a bow or a sling (%s)!", ammo)
return nil
end
if not ammo or (ammo.combat.shots_left <= 0 and not ammo.infinite) then
local infinite = ammo.infinite or self:attr("infinite_ammo")
if not ammo or (ammo.combat.shots_left <= 0 and not infinite) then
game.logPlayer(self, "You do not have enough ammo left!")
return nil
end
......@@ -75,7 +78,7 @@ function _M:archeryAcquireTargets(tg, params)
local runfire = function(weapon, targets)
if params.one_shot then
local a = ammo
if not ammo.infinite and ammo.combat.shots_left > 0 then
if not infinite and ammo.combat.shots_left > 0 then
ammo.combat.shots_left = ammo.combat.shots_left - 1
end
if a then
......@@ -102,7 +105,7 @@ function _M:archeryAcquireTargets(tg, params)
for i = 1, params.multishots or 1 do
local a = ammo
if not ammo.infinite then
if not infinite then
if ammo.combat.shots_left > 0 then ammo.combat.shots_left = ammo.combat.shots_left - 1
else break
end
......@@ -147,7 +150,7 @@ function _M:archeryAcquireTargets(tg, params)
if sound then game:playSoundNear(self, sound) end
-- if not ammo.infinite and (ammo.combat.shots_left < 10 or ammo:getNumber() == 50 or ammo:getNumber() == 40 or ammo:getNumber() == 25) then
-- if not infinite and (ammo.combat.shots_left < 10 or ammo:getNumber() == 50 or ammo:getNumber() == 40 or ammo:getNumber() == 25) then
-- game.logPlayer(self, "You only have %s left!", ammo:getName{do_color=true})
-- end
......
......@@ -1818,6 +1818,16 @@ function _M:hasMassiveArmor()
return armor
end
--- Check if the actor has a cloak
function _M:hasCloak()
if not self:getInven("CLOAK") then return end
local cloak = self:getInven("CLOAK")[1]
if not cloak then
return nil
end
return cloak
end
-- Unarmed Combat; this handles grapple checks and building combo points
-- Builds Comob; reduces the cooldown on all unarmed abilities on cooldown by one
function _M:buildCombo()
......
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