Page 1 of 1

[b33] Flame of Urh'Rok giving demonform permanently

Posted: Tue Sep 13, 2011 5:41 pm
by Dervis
Basically after you activate Flame of Urh'Rok the first time, you never have to do it again to get Fearscape healing. I'm not sure if the resists and global speed are deactivating properly due to lack of proper testing.

Code: Select all

newTalent{
	name = "Flame of Urh'Rok",
	type = {"corruption/shadowflame", 3},
	require = corrs_req3,
	mode = "sustained",
	points = 5,
	sustain_vim = 90,
	cooldown = 30,
	tactical = { BUFF = 2 },
	activate = function(self, t)
		game:playSoundNear(self, "talents/flame")
		self.__old_type = {self.type, self.subtype}
		self.type, self.subtype = "demon", "major"
		local power = self:getTalentLevel(t) * 0.03
		return {
			demon = self:addTemporaryValue("demon", 1),
			speed = self:addTemporaryValue("global_speed_add", power),
			res = self:addTemporaryValue("resists", {[DamageType.FIRE]=self:combatTalentSpellDamage(t, 20, 30), [DamageType.DARKNESS]=self:combatTalentSpellDamage(t, 20, 35)}),
			particle = self:addParticles(Particles.new("shadowfire", 1)),
		}
	end,
	deactivate = function(self, t, p)
		self.type, self.subtype = unpack(self.__old_type)
		self.__old_type = nil
		self:removeTemporaryValue("resists", p.res)
		self:removeTemporaryValue("global_speed_add", p.speed)
		self:removeTemporaryValue("demon", p.demon)
		self:removeParticles(p.particle)
		return true
	end,
	info = function(self, t)
		return ([[Call upon the essence of the supreme demon overlord Urh'Rok to turn into a demon.
		While in demon form you gain %d%% fire resistance, %d%% darkness resistance and your global speed is increased by %d%%.
		The flames of the fearscape will heal you while in demon form.
		The resistances and heal will increase with Magic stat.]]):
		format(
			self:combatTalentSpellDamage(t, 20, 30), self:combatTalentSpellDamage(t, 20, 35),
			self:getTalentLevel(t) * 3
		)
	end,
}

Re: [b33] Flame of Urh'Rok giving demonform permanently

Posted: Tue Sep 13, 2011 11:37 pm
by darkgod
fixed