Don't like ads? PRO users don't see any ads ;-)
Guest

More Rogue Ideas

By: a guest on Jul 24th, 2012  |  syntax: None  |  size: 7.83 KB  |  hits: 21  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. newTalent{
  2.         name = "Swashbuckling",
  3.         type = {"cunning/misdirection", 1},
  4.         mode = "sustained",
  5.         points = 5,
  6.         require = techs_cun_req1,
  7.         no_energy = true,
  8.         cooldown = 15,
  9.         sustain_stamina = 20,
  10.         tactical = { BUFF = 2 },
  11.         on_pre_use = function(self, t, silent) if not self:hasDualWeapon() then if not silent then game.logPlayer(self, "You require two weapons to use this talent.") end return false end return true
  12.         activate = function(self, t)
  13.                 local weapon, offweapon = self:hasDualWeapon()
  14.                 if not weapon then
  15.                         game.logPlayer(self, "You cannot use Swashbuckling without dual wielding!")
  16.                         return nil
  17.                 end
  18.  
  19.                 return {
  20.                         apr = self:addTemporaryValue("combat_apr", 2 + (self:getTalentLevel(t) * self:getCun()) / 30),
  21.                         cp = self:addTemporaryValue("combat_critical_power", 10 + (self:getTalentLevel(t) * self:getCun()) / 20),
  22.                         def = self:addTemporaryValue("combat_def", 8 + self:getTalentLevel(t) * self:getCun()) / 30,
  23.                         crit = self:addTemporaryValue("combat_physcrit", (10 + (self:getTalentLevel(t) * 3),
  24.                 }
  25.         end,
  26.         deactivate = function(self, t, p)
  27.                 self:removeTemporaryValue("combat_apr", p.apr),
  28.                 self:removeTemporaryValue("combat_critical_power", p.cp),
  29.                 self:removeTemporaryValue("combat_def", p.def),
  30.                 self:removeTemporaryValue("combat_physcrit", p.crit),
  31.                 return true
  32.         end,
  33.         info = function(self, t)
  34.                 return ([[Utilize your offhand weapon in a flamboyant way, in order to distract your enemy for killing blows with your mainhand weapon. Your critical hit rate is raised by %d%%, your critical hit damage modifier is raised by %d%%, your armor penetration by %d and your Defense is raised by %d. However, your offhand damage is reduced 90%, as you are forced to sacrifice killing blows for distraction value. All bonuses will increase with the user's Cunning.]]):format(10 + (self:getTalentLevel(t) * 3),("combat_critical_power", 10 + (self:getTalentLevel(t) * self:getCun()) / 20),(2 + (self:getTalentLevel(t) * self:getCun()) / 30),("combat_def", (8 + self:getTalentLevel(t) * self:getCun()) / 30)
  35.         end,
  36. }
  37.  
  38. In tome/class/interface/combat.lua:
  39.  
  40. --- Gets the off hand multiplier
  41.         if self:isTalentActive(self.T_SWASHBUCKLING) then
  42.                 offmult = offmult / 10
  43.         end
  44.  
  45. newTalent{
  46.         name = "Weakening Strikes",
  47.         type = {"cunning/misdirection", 2},
  48.         mode = "passive",
  49.         points = 5,
  50.         require = techs_cun_req2,
  51.         mode = "passive",
  52.         do_cut = function(self, t, target, dam)
  53.                 if target:canBe("cut") and rng.percent(10+(getTalentLevel(t)*8)) then                  
  54.                         dam = dam * self:combatTalentWeaponDamage(t, 0.2, 0.5)
  55.                         if self:getTalentLevel(t) >= 5 then
  56.                                 target:setEffect(target.EFF_SLOWING_WOUND, 10, {power=dam / 10, speed=(self:getTalentLevel(t)*3), apply_power=self:combatAttack()})
  57.                         else
  58.                         target:setEffect(target.EFF_BLEEDING, 10, {power=dam / 10, apply_power=self:combatAttack()})
  59.                 end
  60.         end,
  61.         info = function(self, t)
  62.                 return ([[Rend your foe with every attack you do. All attacks now have a %d%% chance of inflicting %d%% of your mainhand weapon's damage in Bleeding damage, over ten turns.
  63.                 At Talent Level 5, you instead inflict Slowing Wounds that reduce the target's speed by %d%%.]]):
  64.                 format(10+(getTalentLevel(t)*8)),(self:combatTalentWeaponDamage(t, 0.2, 0.5) * 100),(self:getTalentLevel(t)*3)
  65.         end,
  66. }
  67.  
  68. In tome/class/interface/combat.lua:
  69.  
  70. -- Weakening Strikes
  71.         if hitted and not target.dead and self:knowTalent(self.T_WEAKENING_STRIKES) then
  72.                 local t = self:getTalentFromId(self.T_WEAKENING_STRIKES)
  73.                 t.do_cut(self, t, target, dam)
  74.         end
  75.  
  76. In tome / data / timed_effects / physical.lua
  77.  
  78. newEffect{
  79.         name = "SLOWING_WOUND", image = "talents/bleeding_edge.png",
  80.         desc = "Slowing Wound",
  81.         long_desc = function(self, eff) return ("Carefully placed hampering wound that bleeds, doing %0.2f physical damage per turn, and decreases global speed by %d%%."):format(eff.power, eff.heal_factor) end,
  82.         type = "physical",
  83.         subtype = { wound=true, cut=true },
  84.         status = "detrimental",
  85.         parameters = {power=10, speed=15},
  86.         on_gain = function(self, err) return "#Target# starts to bleed and slows down.", "+Slowing Wound" end,
  87.         on_lose = function(self, err) return "#Target# stops bleeding and speeds up.", "-Slowing Wound" end,
  88.         on_merge = function(self, old_eff, new_eff)
  89.                 -- Merge the flames! Wait.
  90.                 local olddam = old_eff.power * old_eff.dur
  91.                 local newdam = new_eff.power * new_eff.dur
  92.                 local dur = math.ceil((old_eff.dur + new_eff.dur) / 2)
  93.                 old_eff.dur = dur
  94.                 old_eff.power = (olddam + newdam) / dur
  95.                 return old_eff
  96.         end,
  97.         activate = function(self, eff)
  98.                 eff.tmpid = self:addTemporaryValue("global_speed_add", -eff.speed)
  99.         end,
  100.         on_timeout = function(self, eff)
  101.                 DamageType:get(DamageType.PHYSICAL).projector(eff.src or self, self.x, self.y, DamageType.PHYSICAL, eff.power)
  102.         end,
  103.         deactivate = function(self, eff)
  104.                 self:removeTemporaryValue("global_speed_add", eff.tmpid)
  105.         end,
  106. }
  107.  
  108. newTalent{
  109.         name = "Nimble Movements",
  110.         type = {"cunning/misdirection", 3},
  111.         message = "@Source@ dashes quickly!",
  112.         no_break_stealth = true,
  113.         require = techs_cun_req3,
  114.         points = 5,
  115.         random_ego = "attack",
  116.         stamina = 12,
  117.         cooldown = function(self, t) return math.floor(30 - self:getTalentLevel(t) * 3) end,
  118.         tactical = { CLOSEIN = 3 },
  119.         requires_target = true,
  120.         range = function(self, t) return math.floor(7 + self:getTalentLevel(t) * 0.5) end,
  121.         action = function(self, t)
  122.                 if self:attr("never_move") then game.logPlayer(self, "You can not do that currently.") return end
  123.  
  124.                 local tg = {type="hit", range=self:getTalentRange(t)}
  125.                 local x, y, target = self:getTarget(tg)
  126.                 if not x or not y then return nil end
  127.                 if core.fov.distance(self.x, self.y, x, y) > self:getTalentRange(t) then return nil end
  128.  
  129.                 local block_actor = function(_, bx, by) return game.level.map:checkEntity(bx, by, Map.TERRAIN, "block_move", self) end
  130.                 local l = self:lineFOV(x, y, block_actor)
  131.                 local lx, ly, is_corner_blocked = l:step()
  132.                 if is_corner_blocked or game.level.map:checkAllEntities(lx, ly, "block_move", self) then
  133.                         game.logPlayer(self, "You cannot dash through that!")
  134.                         return
  135.                 end
  136.                 local tx, ty = lx, ly
  137.                 lx, ly, is_corner_blocked = l:step()
  138.                 while lx and ly do
  139.                         if is_corner_blocked or game.level.map:checkAllEntities(lx, ly, "block_move", self) then break end
  140.                         tx, ty = lx, ly
  141.                         lx, ly, is_corner_blocked = l:step()
  142.                 end
  143.  
  144.                 local ox, oy = self.x, self.y
  145.                 self:move(tx, ty, true)
  146.                 if config.settings.tome.smooth_move > 0 then
  147.                         self:resetMoveAnim()
  148.                         self:setMoveAnim(ox, oy, 8, 5)
  149.                 end
  150.  
  151.                 return true
  152.         end,
  153.         info = function(self, t)
  154.                 return ([[Quickly and quietly dash your way to the target square, if it is not blocked by enemies or obstacles in the way. This talent will not break Stealth.]])
  155.         end,
  156. }
  157.  
  158. newTalent{
  159.         name = "Misdirection",
  160.         type = {"cunning/misdirection", 4},
  161.         mode = "passive",
  162.         points = 5,
  163.         require = techs_cun_req4,
  164.         mode = "passive",
  165.         on_learn = function(self, t)
  166.                 self.projectile_evasion = (self.projectile_evasion or 0) + 3
  167.                 self.projectile_evasion_spread = (self.projectile_evasion_spread or 0) + 1
  168.         end,
  169.         on_unlearn = function(self, t)
  170.                 self.projectile_evasion = (self.projectile_evasion or 0) - 3
  171.                 self.projectile_evasion_spread = (self.projectile_evasion_spread or 0) - 1
  172.         end,   
  173.         info = function(self, t)
  174.                 return ([[Your abilities sowing confusion and chaos have reached their peak. Now even your most simple moves confuse your enemies, rendering their offense less effective. Your Defense increases by %d%%, and enemies have a %d%% chance of targetting a random square within %d squares of you. Your bonus percent to Defense will increase with Cunning.]]):
  175.                 format(self:getTalentLevel(self.T_MISDIRECTION) * (0.02 * (1 + self:getCun / 200),self:getTalentLevelRaw(t) * 3 ,self:getTalentLevelRaw(t) * 1)
  176.         end,
  177. }
  178.  
  179. In tome/class/interface/combat.lua:
  180.  
  181.         if self:knowTalent(self.T_MISDIRECTION) then
  182.                 d = d * (1 + self:getTalentLevel(self.T_MISDIRECTION) * (0.02 * (1 + self:getCun / 200))
  183.         end