Commit feac87a07d79aa31782f896da46ea302889ceccd

Authored by dg
1 parent 13b1bc6d

fix


git-svn-id: http://svn.net-core.org/repos/t-engine4@3340 51575b47-30f0-44d4-a5cc-537603b46e54
... ... @@ -42,7 +42,7 @@ newEntity{
42 42 open_door = true,
43 43 resolvers.sustains_at_birth(),
44 44
45   --- resolvers.inscriptions(2, "infusion"),
  45 + resolvers.inscriptions(2, "infusion"),
46 46
47 47 autolevel = "warrior",
48 48 ai = "dumb_talented_simple", ai_state = { ai_move="move_dmap", talent_in=3, },
... ... @@ -56,17 +56,6 @@ newEntity{
56 56 }
57 57
58 58 newEntity{ base = "BASE_NPC_ORC_GORBAT",
59   - name = "orc TEST", color=colors.YELLOW,
60   - desc = [[A fierce orc attuned to the wilds.]],
61   - level_range = {30, nil}, exp_worth = 1,
62   - rarity = 1,
63   - ai = "tactical",
64   - ai_state = { talent_in=1, },
65   - rank=3,
66   - resolvers.inscriptions(1, {"speed rune"}),
67   -}
68   -
69   -newEntity{ base = "BASE_NPC_ORC_GORBAT",
70 59 name = "orc summoner", color=colors.YELLOW,
71 60 desc = [[A fierce orc attuned to the wilds.]],
72 61 level_range = {30, nil}, exp_worth = 1,
... ...
... ... @@ -358,7 +358,7 @@ newEntity{ base = "BASE_RUNE",
358 358 dur = resolvers.mbonus_level(4, 3),
359 359 power = resolvers.mbonus_level(30, 30, function(e, v) return v * 0.3 end),
360 360 use_stat_mod = 0.3,
361   - nb_uses = 2, --resolvers.mbonus_level(7, 4),
  361 + nb_uses = resolvers.mbonus_level(7, 4),
362 362 },
363 363 inscription_talent = "RUNE:_SPEED",
364 364 }
... ...
... ... @@ -411,6 +411,10 @@ newInscription{
411 411 points = 1,
412 412 is_spell = true,
413 413 tactical = { DEFEND = 3, ESCAPE = 2 },
  414 + on_pre_use = function(self, t)
  415 + local ok, data = pcall(self.getInscriptionData, self, t.short_name)
  416 + return ok and data.nb_uses > 0
  417 + end,
414 418 action = function(self, t)
415 419 local data = self:getInscriptionData(t.short_name)
416 420 self:setEffect(self.EFF_INVISIBILITY, data.dur, {power=data.power + data.inc_stat})
... ... @@ -435,6 +439,10 @@ newInscription{
435 439 is_spell = true,
436 440 no_energy = true,
437 441 tactical = { BUFF = 4 },
  442 + on_pre_use = function(self, t)
  443 + local ok, data = pcall(self.getInscriptionData, self, t.short_name)
  444 + return ok and data.nb_uses > 0
  445 + end,
438 446 action = function(self, t)
439 447 local data = self:getInscriptionData(t.short_name)
440 448 self:setEffect(self.EFF_SPEED, data.dur, {power=(data.power + data.inc_stat) / 100})
... ...