Commit b5c914748cc5cdb0e45ba1f72ef7574cdb08c7f2

Authored by DarkGod
1 parent 0abf2d10

some updates to fallen

... ... @@ -79,6 +79,24 @@ newBirthDescriptor{
79 79 game_state = {
80 80 campaign_name = "maj-eyal",
81 81 supports_lich_transform = "lichform",
  82 + supports_fallen_transform = function(actor)
  83 + -- Didn't save the merchant
  84 + if actor:hasQuest("lost-merchant") then
  85 + if actor:hasQuest("lost-merchant"):isCompleted("evil") then return true end
  86 + if actor:hasQuest("lost-merchant"):isFailed() then return true end
  87 + if not actor:hasQuest("lost-merchant"):isCompleted("saved") then return true end
  88 + end
  89 + -- Let Melinda die
  90 + if (actor:hasQuest("kryl-feijan-escape") and actor:hasQuest("kryl-feijan-escape"):isStatus(engine.Quest.FAILED)) then return true end
  91 + -- Sided with the Grand Corruptor
  92 + if (actor:hasQuest("anti-antimagic") and actor:hasQuest("anti-antimagic"):isStatus(engine.Quest.DONE)) then return true end
  93 + -- Killed an escort yourself
  94 + local id = world:getCurrentAchievementDifficultyId(game, "ESCORT_KILL")
  95 + if actor.achievement_data[id] and actor.achievement_data[id].nb > 0 then return true end
  96 + -- Lumberjack massacre
  97 + if (actor:hasQuest("lumberjack-cursed") and (actor:hasQuest("lumberjack-cursed").lumberjacks_died or 0) >= 20) then return true end
  98 + return false
  99 + end,
82 100 stores_restock_by_level = 1,
83 101 __allow_rod_recall = true,
84 102 __allow_transmo_chest = true,
... ...
... ... @@ -27,7 +27,8 @@ newTalent{
27 27 require = techs_strdex_req1,
28 28 points = 5,
29 29 random_ego = "attack",
30   - stamina = function(self, t) return self:knowTalent(self.T_STEAMROLLER) and 2 or 22 end,
  30 + stamina = function(self, t) return not self:attr("swap_combat_techniques_hate") and (self:knowTalent(self.T_STEAMROLLER) and 2 or 22) end,
  31 + hate = function(self, t) return self:attr("swap_combat_techniques_hate") and (self:knowTalent(self.T_STEAMROLLER) and 1 or 6) end,
31 32 cooldown = function(self, t) return math.ceil(self:combatTalentLimit(t, 0, 36, 20)) end, --Limit to >0
32 33 tactical = { ATTACK = { weapon = 1, stun = 1 }, CLOSEIN = 3 },
33 34 requires_target = true,
... ... @@ -95,7 +96,8 @@ newTalent{
95 96 points = 5,
96 97 require = techs_strdex_req2,
97 98 cooldown = 30,
98   - sustain_stamina = 30,
  99 + sustain_stamina = function(self, t) return not self:attr("swap_combat_techniques_hate") and 30 end,
  100 + sustain_hate = function(self, t) return self:attr("swap_combat_techniques_hate") and 9 end,
99 101 tactical = { BUFF = 1 },
100 102 getAtk = function(self, t) return self:combatScale(self:getTalentLevel(t) * self:getDex(), 4, 0, 37, 500) end,
101 103 getCrit = function(self, t)
... ... @@ -128,7 +130,8 @@ newTalent{
128 130 points = 5,
129 131 random_ego = "attack",
130 132 cooldown = 25,
131   - stamina = 25,
  133 + stamina = function(self, t) return not self:attr("swap_combat_techniques_hate") and 25 end,
  134 + hate = function(self, t) return self:attr("swap_combat_techniques_hate") and 7 end,
132 135 require = techs_strdex_req3,
133 136 no_energy = true,
134 137 tactical = { BUFF = 2 },
... ... @@ -149,7 +152,8 @@ newTalent{
149 152 points = 5,
150 153 random_ego = "utility",
151 154 cooldown = 55,
152   - stamina = 25,
  155 + stamina = function(self, t) return not self:attr("swap_combat_techniques_hate") and 25 end,
  156 + hate = function(self, t) return self:attr("swap_combat_techniques_hate") and 7 end,
153 157 no_energy = true,
154 158 require = techs_strdex_req4,
155 159 random_boss_rarity = 33, -- common tree on classes and global speed is immensely powerful
... ...
... ... @@ -300,35 +300,13 @@ uberTalent{
300 300 require = {
301 301 birth_descriptors={{"subclass", "Sun Paladin"}},
302 302 special={desc=_t"Unlocked the Fallen evolution", fct=function(self) return profile.mod.allow_build.paladin_fallen end},
303   - special2={
304   - desc=_t"Commit a heinous act",
305   - fct=function(self)
306   - if game.state.birth.ignore_prodigies_special_reqs then return true end
307   - -- Didn't save the merchant
308   - if self:hasQuest("lost-merchant") then
309   - if self:hasQuest("lost-merchant"):isCompleted("evil") then return true end
310   - if self:hasQuest("lost-merchant"):isFailed() then return true end
311   - if not self:hasQuest("lost-merchant"):isCompleted("saved") then return true end
312   - end
313   - -- Let Melinda die
314   - if (self:hasQuest("kryl-feijan-escape") and self:hasQuest("kryl-feijan-escape"):isStatus(engine.Quest.FAILED)) then return true end
315   - -- Sided with the Grand Corruptor
316   - if (self:hasQuest("anti-antimagic") and self:hasQuest("anti-antimagic"):isStatus(engine.Quest.DONE)) then return true end
317   - -- Killed an escort yourself
318   - local id = world:getCurrentAchievementDifficultyId(game, "ESCORT_KILL")
319   - if self.achievement_data[id] and self.achievement_data[id].nb > 0 then return true end
320   - -- Lumberjack massacre
321   - if (self:hasQuest("lumberjack-cursed") and (self:hasQuest("lumberjack-cursed").lumberjacks_died or 0) >= 20) then return true end
322   - return false
323   - end
324   - },
  303 + special2={desc=_t"Committed a heinous act", fct=function(self) if not game.state.birth.supports_fallen_transform then return true else return game.state.birth.supports_fallen_transform(self) end end},
325 304 stat = {mag=25},
326 305 },
327 306 is_class_evolution = "Sun Paladin",
328 307 cant_steal = true,
329 308 mode = "passive",
330 309 no_npc_use = true,
331   -
332 310 unlearnTalents = function(self, t, cats)
333 311 local tids = {}
334 312 local types = {}
... ... @@ -371,17 +349,49 @@ uberTalent{
371 349 ["technique/shield-offense"] = true,
372 350 }
373 351 t.unlearnTalents(self, t, removes)
  352 +
  353 + self:attr("swap_combat_techniques_hate", 1)
374 354
375 355 self:learnTalent(self.T_DIRGE_ACOLYTE, true, 1)
376 356 self:learnTalent(self.T_SELF_HARM, true, 1)
  357 +
  358 + game.bignews:say(120, "#CRIMSON#You give in to the darkness. You have fallen!")
377 359
378 360 self:incHate(100)
  361 +
  362 + -- Remove stamina bar if we dont need it anymore
  363 + local remove = true
  364 + for tid, lvl in pairs(self.talents) do
  365 + local t = self:getTalentFromId(tid)
  366 + if t.stamina and util.getval(t.stamina, self, t) then remove = false break end
  367 + if t.sustain_stamina and util.getval(t.sustain_stamina, self, t) then remove = false break end
  368 + if t.drain_stamina and util.getval(t.drain_stamina, self, t) then remove = false break end
  369 + end
  370 + if remove then
  371 + self:unlearnTalent(self.T_STAMINA_POOL)
  372 + end
379 373 end,
380 374 info = function(self, t)
381 375 return ([[The code of the Sun Paladins can be a heavy burden. Wouldn't you like to let go?
382   -To give in to the darkness?
  376 + #{italic}##GREY#To give in to the darkness?#LAST##{normal}#
  377 +
  378 + #CRIMSON#This evolution fundamentally alters your class and character in a huge way. Do not take it lightly.#LAST#
  379 +
  380 + Any offensive combat techniques or unlockable Celestial talent trees you know will be exchanged for cursed versions, allowing you to cut a bloody trail through enemies, turning your radiance to gloom, and more while also gaining new combat styles and defenses.
  381 +
  382 + The following talent trees are swapped:
  383 + - #GOLD#Radiance#LAST# turns into #CRIMSON#Gloom#LAST#: Project onto others your own hate, hindering them
  384 + - #GOLD#Guardian#LAST# turns into #CRIMSON#Crimson Templar#LAST#: Use the power of blood to control and defeat the fools that oppose you
  385 + - #GOLD#Crusader#LAST# turns into #CRIMSON#Black Sun#LAST#: Call upon the energies of dead suns to crush your foes
  386 +
  387 + You will learn the following talents trees:
  388 + - #CRIMSON#Bloodstained#LAST#: Make your foes bleed!
  389 + - #CRIMSON#Darkside#LAST#: Every light casts a shadow, yours is powerful indeed
  390 + - #CRIMSON#Self-Hatred#LAST#: Manifest your self hatred through bleeding
  391 + - #CRIMSON#Dirge#LAST#: Sing of death and sorrow to strength your resolve
383 392
384   -Any offensive combat techniques or unlockable Celestial talent trees you know will be exchanged for cursed versions, allowing you to cut a bloody trail through enemies, turning your radiance to gloom, and more.
385   -You also gain new generic trees: the Fallen's defensive Dirges and Self-Destructive combat style.]]):tformat()
  393 + You will forget the following talent trees: Shield Offense, Two-handed Assault.
  394 + Also the cost of any talents of the Combat Techniques tree will be converted to hate instead of stamina.
  395 + ]]):tformat()
386 396 end,
387 397 }
... ...