SAYS it is multiplying so why is there no clone?
Posted: Wed May 06, 2015 1:00 pm
I give the enemy the talent, even force it to use it, and it SAYS it uses it, and no error popup messages in game, yet there is no effect.
actor:learnTalent(actor.T_MULTIPLY, true)
actor:forceUseTalent(actor.T_MULTIPLY, {ignore_energy=true})
yet if I do,
actor:learnTalent(actor.T_PARADOX_CLONE, true)
actor:forceUseTalent(actor.T_PARADOX_CLONE, {ignore_energy=true})
it makes infinite clones (game ruined) because each makes another, unlike multiply code that apparently is written to prevent that.
And if I give them the paradox clone or multiply but don’t force them to use it, they do not use it.
(This is put in the hunted code I have adapted, listed after
actor:setEffect(actor.EFF_HUNTER_PLAYER, 100, {src=self})
where all the hunters can get buffed with effects and talents, or supposedly….)
So, why the heck does the multiply code make no clones yet says it is used and gives no error? How do I make it work?
Log shows:
orb spinner 17379 dumb ai talents can use Multiply T_MULTIPLY
dumb ai uses T_MULTIPLY
[LOG] Orb spinner uses Multiply.
no more multiply
[LOG] Orb spinner uses Multiply.
no more multiply
no more multiply
[LOG] #00ff00##UID:65:0#Talent Infusion: Wild is ready to use.
[LOG]
[LOG] Orb spinner uses Multiply.
no more multiply
no more multiply
but I will be watching the screen, fight after fight, and there is no more enemy appearing. If I inspect an enemy it always has the talent and the number next to it increases each turn, which I think is the cooldown number but going the wrong direction???
fate weaver 17352 dumb ai talents can use Multiply T_MULTIPLY
fate weaver 17352 dumb ai talents can use Attack T_ATTACK
fate weaver 17352 dumb ai talents can use Rethread T_RETHREAD
dumb ai uses T_ATTACK
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
fate weaver 17352 dumb ai talents can use Multiply T_MULTIPLY
fate weaver 17352 dumb ai talents can use Rethread T_RETHREAD
fate weaver 17352 dumb ai talents can use Webs of Fate T_WEBS_OF_FATE
dumb ai uses T_MULTIPLY
[LOG] Fate weaver uses Multiply.
no more multiply
[LOG] Fate weaver uses Multiply.
no more multiply
okay this looks like error but in the game itself no lua popup:
[LOG] Rested for 75 turns (stop reason: all resources and life at maximum).
[LOG]
no more multiply
Astar fail: destination unreachable
no more multiply
Astar fail: destination unreachable
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
[TARGET] Passing target weaver hatchling from fate spinner to asd
[TARGET] Passing target weaver hatchling from fate spinner to asd
Astar fail: destination unreachable
fate weaver 17369 dumb ai talents can use Webs of Fate T_WEBS_OF_FATE
dumb ai uses T_WEBS_OF_FATE
Astar fail: destination unreachable
Astar fail: destination unreachable
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
Astar fail: destination unreachable
Astar fail: destination unreachable
Astar fail: destination unreachable
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
[TARGET] Passing target weaver hatchling from weaver hatchling to asd
[TARGET] Passing target weaver hatchling from weaver hatchling to asd
[TARGET] Passing target weaver hatchling from weaver hatchling to asd
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
fate weaver 17369 dumb ai talents can use Webs of Fate T_WEBS_OF_FATE
dumb ai uses T_WEBS_OF_FATE
[LOG] Orb spinner uses Multiply.
no more multiply
no more multiply
[LOG] Ran for 5 turns (stop reason: hostile spotted to the southeast (orb spinner)).
[LOG]
[PROFILE] Thread connecting to profiles.te4.org on ports 2257 2258
[LOG] Orb spinner uses Multiply.
no more multiply
[LOG] Orb weaver uses Multiply.
no more multiply
[LOG]
[PROFILE] Thread connecting to profiles.te4.org on ports 2257 2258
orb spinner 17377 dumb ai talents can use Temporal Bolt T_TEMPORAL_BOLT
orb spinner 17377 dumb ai talents can use Multiply T_MULTIPLY
orb spinner 17377 dumb ai talents can use Attack T_ATTACK
dumb ai uses T_ATTACK
This is the multiply talent code, unaltered in npcs.lua:
-- Multiply!!!
newTalent{
name = "Multiply",
type = {"other/other", 1},
cooldown = 3,
range = 10,
requires_target = true,
tactical = { ATTACK = 3 },
action = function(self, t)
if not self.can_multiply or self.can_multiply <= 0 then print("no more multiply") return nil end
-- Find space
local x, y = util.findFreeGrid(self.x, self.y, 1, true, {[Map.ACTOR]=true})
if not x then print("no free space") return nil end
-- Find a place around to clone
self.can_multiply = self.can_multiply - 1
local a
if self.clone_base then a = self.clone_base:clone() else a = self:clone() end
a.can_multiply = a.can_multiply - 1
a.energy.val = 0
a.exp_worth = 0.1
a.inven = {}
a.x, a.y = nil, nil
a:removeAllMOs()
a:removeTimedEffectsOnClone()
if a.can_multiply <= 0 then a:unlearnTalent(t.id) end
print("[MULTIPLY]", x, y, "::", game.level.map(x,y,Map.ACTOR))
print("[MULTIPLY]", a.can_multiply, "uids", self.uid,"=>",a.uid, "::", self.player, a.player)
game.zone:addEntity(game.level, a, "actor", x, y)
a:check("on_multiply", self)
return true
end,
info = function(self, t)
return ([[Multiply yourself!]])
end,
}
What have I missed this time?
actor:learnTalent(actor.T_MULTIPLY, true)
actor:forceUseTalent(actor.T_MULTIPLY, {ignore_energy=true})
yet if I do,
actor:learnTalent(actor.T_PARADOX_CLONE, true)
actor:forceUseTalent(actor.T_PARADOX_CLONE, {ignore_energy=true})
it makes infinite clones (game ruined) because each makes another, unlike multiply code that apparently is written to prevent that.
And if I give them the paradox clone or multiply but don’t force them to use it, they do not use it.
(This is put in the hunted code I have adapted, listed after
actor:setEffect(actor.EFF_HUNTER_PLAYER, 100, {src=self})
where all the hunters can get buffed with effects and talents, or supposedly….)
So, why the heck does the multiply code make no clones yet says it is used and gives no error? How do I make it work?
Log shows:
orb spinner 17379 dumb ai talents can use Multiply T_MULTIPLY
dumb ai uses T_MULTIPLY
[LOG] Orb spinner uses Multiply.
no more multiply
[LOG] Orb spinner uses Multiply.
no more multiply
no more multiply
[LOG] #00ff00##UID:65:0#Talent Infusion: Wild is ready to use.
[LOG]
[LOG] Orb spinner uses Multiply.
no more multiply
no more multiply
but I will be watching the screen, fight after fight, and there is no more enemy appearing. If I inspect an enemy it always has the talent and the number next to it increases each turn, which I think is the cooldown number but going the wrong direction???
fate weaver 17352 dumb ai talents can use Multiply T_MULTIPLY
fate weaver 17352 dumb ai talents can use Attack T_ATTACK
fate weaver 17352 dumb ai talents can use Rethread T_RETHREAD
dumb ai uses T_ATTACK
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
fate weaver 17352 dumb ai talents can use Multiply T_MULTIPLY
fate weaver 17352 dumb ai talents can use Rethread T_RETHREAD
fate weaver 17352 dumb ai talents can use Webs of Fate T_WEBS_OF_FATE
dumb ai uses T_MULTIPLY
[LOG] Fate weaver uses Multiply.
no more multiply
[LOG] Fate weaver uses Multiply.
no more multiply
okay this looks like error but in the game itself no lua popup:
[LOG] Rested for 75 turns (stop reason: all resources and life at maximum).
[LOG]
no more multiply
Astar fail: destination unreachable
no more multiply
Astar fail: destination unreachable
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
[TARGET] Passing target weaver hatchling from fate spinner to asd
[TARGET] Passing target weaver hatchling from fate spinner to asd
Astar fail: destination unreachable
fate weaver 17369 dumb ai talents can use Webs of Fate T_WEBS_OF_FATE
dumb ai uses T_WEBS_OF_FATE
Astar fail: destination unreachable
Astar fail: destination unreachable
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
Astar fail: destination unreachable
Astar fail: destination unreachable
Astar fail: destination unreachable
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
[TARGET] Passing target weaver hatchling from weaver hatchling to asd
[TARGET] Passing target weaver hatchling from weaver hatchling to asd
[TARGET] Passing target weaver hatchling from weaver hatchling to asd
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
no more multiply
fate weaver 17369 dumb ai talents can use Webs of Fate T_WEBS_OF_FATE
dumb ai uses T_WEBS_OF_FATE
[LOG] Orb spinner uses Multiply.
no more multiply
no more multiply
[LOG] Ran for 5 turns (stop reason: hostile spotted to the southeast (orb spinner)).
[LOG]
[PROFILE] Thread connecting to profiles.te4.org on ports 2257 2258
[LOG] Orb spinner uses Multiply.
no more multiply
[LOG] Orb weaver uses Multiply.
no more multiply
[LOG]
[PROFILE] Thread connecting to profiles.te4.org on ports 2257 2258
orb spinner 17377 dumb ai talents can use Temporal Bolt T_TEMPORAL_BOLT
orb spinner 17377 dumb ai talents can use Multiply T_MULTIPLY
orb spinner 17377 dumb ai talents can use Attack T_ATTACK
dumb ai uses T_ATTACK
This is the multiply talent code, unaltered in npcs.lua:
-- Multiply!!!
newTalent{
name = "Multiply",
type = {"other/other", 1},
cooldown = 3,
range = 10,
requires_target = true,
tactical = { ATTACK = 3 },
action = function(self, t)
if not self.can_multiply or self.can_multiply <= 0 then print("no more multiply") return nil end
-- Find space
local x, y = util.findFreeGrid(self.x, self.y, 1, true, {[Map.ACTOR]=true})
if not x then print("no free space") return nil end
-- Find a place around to clone
self.can_multiply = self.can_multiply - 1
local a
if self.clone_base then a = self.clone_base:clone() else a = self:clone() end
a.can_multiply = a.can_multiply - 1
a.energy.val = 0
a.exp_worth = 0.1
a.inven = {}
a.x, a.y = nil, nil
a:removeAllMOs()
a:removeTimedEffectsOnClone()
if a.can_multiply <= 0 then a:unlearnTalent(t.id) end
print("[MULTIPLY]", x, y, "::", game.level.map(x,y,Map.ACTOR))
print("[MULTIPLY]", a.can_multiply, "uids", self.uid,"=>",a.uid, "::", self.player, a.player)
game.zone:addEntity(game.level, a, "actor", x, y)
a:check("on_multiply", self)
return true
end,
info = function(self, t)
return ([[Multiply yourself!]])
end,
}
What have I missed this time?