Geists! [Slowly getting closer to done!]

A place to post your add ons and ideas for them

Moderator: Moderator

Message
Author
Zaive
Archmage
Posts: 313
Joined: Mon May 24, 2010 1:33 pm

Re: Geists! [Slowly getting closer to done!]

#61 Post by Zaive »

Actually, it only works if enveil is active. So... working as intended then? I mean you really shouldn't be getting the bonus stealth if you aren't even in stealth...

Yeah. See:

Code: Select all

        if self:attr("stealth") then
            real_increase = self:attr("stealth") * (t.getIncrease(self, t) or 0) * n
        end
        if n ~= 0 and real_increase ~= 0 then
            self:setEffect(self.EFF_SHADOW_ALLIANCE, 1, {power=real_increase})
        end
This little snipped of code causes the buff to only activate if you already have stealth from another source.
Last edited by Zaive on Fri Sep 12, 2014 8:11 pm, edited 2 times in total.
Burb Lulls wrote:"FLURRYFLURRYFLURRYFLURRYFLURRYFLURRY"

NemesisZeru
Archmage
Posts: 335
Joined: Wed Jan 15, 2014 12:56 pm
Location: Somewhere, probably.

Re: Geists! [Slowly getting closer to done!]

#62 Post by NemesisZeru »

Zaive wrote:Actually, it only works if enveil is active. So... working as intended then? I mean you really shouldn't be getting the bonus stealth if you aren't even in stealth...
Oohhh. I didn't think of that. I thought the buff had to be active BEFORE you stealthed to get the bonus(Not that you could get the buff to stealth power while in stealth). Thanks for explaining!

Zaive
Archmage
Posts: 313
Joined: Mon May 24, 2010 1:33 pm

Re: Geists! [Slowly getting closer to done!]

#63 Post by Zaive »

The projector function in Unveil needs everything that uses "target" to be in an "if target then" block in order to prevent it from trying to access the "target" variable when it's nil (no enemy on that square).

Almost have unveil working. The problem now is that it checks for mindcrit on EVERY SINGLE SQUARE IT TARGETS, resulting in "*insert name here*'s mind surges with critical power!" about 10 or so times. Uh. I think I'm gonna need to change that...
Last edited by Zaive on Fri Sep 12, 2014 8:33 pm, edited 2 times in total.
Burb Lulls wrote:"FLURRYFLURRYFLURRYFLURRYFLURRYFLURRY"

NemesisZeru
Archmage
Posts: 335
Joined: Wed Jan 15, 2014 12:56 pm
Location: Somewhere, probably.

Re: Geists! [Slowly getting closer to done!]

#64 Post by NemesisZeru »

Zaive wrote:The projector function in Enveil needs everything that uses "target" to be in an "if target then" block in order to prevent it from trying to access the "target" variable when it's nil (no enemy on that square).

Almost have enveil working. The problem now is that it checks for mindcrit on EVERY SINGLE SQUARE IT TARGETS, resulting in "*insert name here*'s mind surges with critical power!" about 10 or so times. Uh. I think I'm gonna need to change that...
Huh, lol. That's...interesting. Thanks again for the help with Enveil. I really appreciate it. x3

Er, you mean Unveil for the second one. Or did you mean Enveil(the stealth talent) for the first one? Admittedly, the names ARE a bit too similar. Maybe that should be something I change. I like the alliterative-ness of it, but it also causes confusion sometimes. :P
Last edited by NemesisZeru on Fri Sep 12, 2014 8:30 pm, edited 1 time in total.

Zaive
Archmage
Posts: 313
Joined: Mon May 24, 2010 1:33 pm

Re: Geists! [Slowly getting closer to done!]

#65 Post by Zaive »

Unveil. Yes. That one. Fixed the post above.

The problem is, is that it checks for mind crit inside the projector function, which triggers on each square the attack reaches. In order for it to just crit on the spell itself, you'd need to check for crit outside the projector function and then somehow get the result of that into projector.

It would be fairly easy to make it check for crit on each enemy it hits rather than every square, but that doesn't really follow with how spells normally work.
Last edited by Zaive on Fri Sep 12, 2014 8:40 pm, edited 1 time in total.
Burb Lulls wrote:"FLURRYFLURRYFLURRYFLURRYFLURRYFLURRY"

NemesisZeru
Archmage
Posts: 335
Joined: Wed Jan 15, 2014 12:56 pm
Location: Somewhere, probably.

Re: Geists! [Slowly getting closer to done!]

#66 Post by NemesisZeru »

Zaive wrote:Unveil. Yes. That one. Fixed the post above.

The problem is, is that it checks for mind crit inside the projector function, which triggers on each square the attack reaches. In order for it to just crit on the spell itself, you'd need to check for crit outside the projector function and then somehow get the result of that into projector.

It would be fairly easy to make it check for crit on each enemy it hits rather than every square,, but that doesn't really follow with how spells normally work.
Ah. Well, Unveil is an unusual spell. It's already doing new, weird things...what's one more? If you can make it check for crit on each enemy it hits, that'd probably be best.

Also, Dark Exchange is...weird. It's coded, but since it has nothing between the {s, it does nothing, leaving me uncertain what I need to put there to get it to work as intended. Trying to ask around to figure out how to fix it. Outside of that...maybe I'm being too optimistic, but I think it might be in a release-able state sooner then later. :D


Edit: Talking to Forger on the IRC, and he had this to say on the crit spam:

(Another possible solution was here, which he told me to ignore, sense this one makes more sense)
[16:43] <Forger101> Or even better just move line 188 to above line 182

Gonna give it a try. :D

Zaive
Archmage
Posts: 313
Joined: Mon May 24, 2010 1:33 pm

Re: Geists! [Slowly getting closer to done!]

#67 Post by Zaive »

Replace Unveil's projector with this:

Code: Select all

        local projector = function(x, y)

        	-- make sure this is at the top of the file above NewTalentType: local map = require "engine.Map"
			target = game.level.map(x, y, map.ACTOR)

			if target then 
                -- Get Damage
                dam = self:mindCrit(self:combatTalentStatDamage(t, "cun", 40, 400))
                
                -- Double damage on hidden foes
                if target:attr("stealth") or target:attr("invisible") then
                    dam = dam * 2
                end
                -- Deal Darkness Damage
                DamageType:get(DamageType.DARKNESS).projector(self, x, y, DamageType.DARKNESS, dam)

                -- Cause status effects to target
                target:setEffect(target.EFF_LUMINESCENCE, t.getDuration(self, t), {apply_power=self:combatSpellpower()})
                target:setEffect(target.EFF_CONFUSED, t.getDuration(self, t), {power=t.getConfusion(self, t), apply_power=self:combatSpellpower ()})
        	end
        end
That should do it for Unveil. I haven't checked if the status effects work since I keep one-shotting everything, though I can confirm that the damage doubles for hidden enemies.

Dark Exchange is acting nutty. after I activate it once the attack tab of my character sheet breaks, even if I deactivate it again.
So I guess it is doing something.

... I should really just get on the IRC.
Last edited by Zaive on Fri Sep 12, 2014 8:54 pm, edited 1 time in total.
Burb Lulls wrote:"FLURRYFLURRYFLURRYFLURRYFLURRYFLURRY"

NemesisZeru
Archmage
Posts: 335
Joined: Wed Jan 15, 2014 12:56 pm
Location: Somewhere, probably.

Re: Geists! [Slowly getting closer to done!]

#68 Post by NemesisZeru »

Zaive wrote:Replace Unveil's projector with this:

Code: Select all

        local projector = function(x, y)

        	-- make sure this is at the top of the file above NewTalentType: local map = require "engine.Map"
			target = game.level.map(x, y, map.ACTOR)

			if target then 
                -- Get Damage
                dam = self:mindCrit(self:combatTalentStatDamage(t, "cun", 40, 400))
                
                -- Double damage on hidden foes
                if target:attr("stealth") or target:attr("invisible") then
                    dam = dam * 2
                end
                -- Deal Darkness Damage
                DamageType:get(DamageType.DARKNESS).projector(self, x, y, DamageType.DARKNESS, dam)

                -- Cause status effects to target
                target:setEffect(target.EFF_LUMINESCENCE, t.getDuration(self, t), {apply_power=self:combatSpellpower()})
                target:setEffect(target.EFF_CONFUSED, t.getDuration(self, t), {power=t.getConfusion(self, t), apply_power=self:combatSpellpower ()})
        	end
        end
That should do it for Unveil. I haven't checked if the status effects work since I keep one-shotting everything, though I can confirm that the damage doubles for hidden enemies.
Heh, yeah. The damage numbers need a bit of work, but that can wait until the initial release. Added the code in, and I'll give it a try shortly. I have a killer headache, but excitement drives me. If all goes well, I think I might be able to release v1.0 tonight. :D

NemesisZeru
Archmage
Posts: 335
Joined: Wed Jan 15, 2014 12:56 pm
Location: Somewhere, probably.

Re: Geists! [Slowly getting closer to done!]

#69 Post by NemesisZeru »

Zaive wrote:Replace Unveil's projector with this:

Code: Select all

        local projector = function(x, y)

        	-- make sure this is at the top of the file above NewTalentType: local map = require "engine.Map"
			target = game.level.map(x, y, map.ACTOR)

			if target then 
                -- Get Damage
                dam = self:mindCrit(self:combatTalentStatDamage(t, "cun", 40, 400))
                
                -- Double damage on hidden foes
                if target:attr("stealth") or target:attr("invisible") then
                    dam = dam * 2
                end
                -- Deal Darkness Damage
                DamageType:get(DamageType.DARKNESS).projector(self, x, y, DamageType.DARKNESS, dam)

                -- Cause status effects to target
                target:setEffect(target.EFF_LUMINESCENCE, t.getDuration(self, t), {apply_power=self:combatSpellpower()})
                target:setEffect(target.EFF_CONFUSED, t.getDuration(self, t), {power=t.getConfusion(self, t), apply_power=self:combatSpellpower ()})
        	end
        end
That should do it for Unveil. I haven't checked if the status effects work since I keep one-shotting everything, though I can confirm that the damage doubles for hidden enemies.

Dark Exchange is acting nutty. after I activate it once the attack tab of my character sheet breaks, even if I deactivate it again.
So I guess it is doing something.

... I should really just get on the IRC.
Yeah, I'm not sure what to do about Dark Exchange currently. Fortunately, I think it might actually be the last big roadblock we have. :D

As for getting on the IRC, feel free! I'm on there basically 24/7. It'd certainly help us avoid accidentally ninja'ing eachother, too. :3

NemesisZeru
Archmage
Posts: 335
Joined: Wed Jan 15, 2014 12:56 pm
Location: Somewhere, probably.

Re: Geists! [Slowly getting closer to done!]

#70 Post by NemesisZeru »

Almost done! Everything but Dark Exchange is working! It shows the numbers on the tooltip, but no actual stats seem to be gained.

http://hastebin.com/makacijuxo.lua

If all goes well, release will be tomorrow. :3

Post Reply