Weird behavior with vile life and arcane shield

Where bugs go to lie down and rest

Moderator: Moderator

Message
Author
ghostbuster
Uruivellas
Posts: 617
Joined: Mon Oct 09, 2006 7:47 pm

Weird behavior with vile life and arcane shield

#1 Post by ghostbuster »

Vile life gives you an healing on any crit. It is great in general.

The problem is when you cast a criting healing spell (healing light, arcane reconstruction). In that case, you get the vile life healing then the real healing. And if you have arcane shield, the shield will be created by vile life and you get no shield from the real healing, dramatically reducing the shield you get from any heal.

Radon26
Sher'Tul
Posts: 1439
Joined: Mon Jun 23, 2014 11:50 am

Re: Weird behavior with vile life and arcane shield

#2 Post by Radon26 »

arcane shield is not spposed to triger from triggered heals... only the big ones.
also, can arcane reconstruction really crit?

ghostbuster
Uruivellas
Posts: 617
Joined: Mon Oct 09, 2006 7:47 pm

Re: Weird behavior with vile life and arcane shield

#3 Post by ghostbuster »

arcane shield is not spposed to triger from triggered heals... only the big ones.
It does not trigger on regen, but otherwise, there is no test on the value of the heal. Here is the code.

Code: Select all

--- Called before healing
function _M:onHeal(value, src)
....
	if self:attr("arcane_shield") and self:attr("allow_on_heal") and value > 0 and not self:hasEffect(self.EFF_DAMAGE_SHIELD) then
		self:setEffect(self.EFF_DAMAGE_SHIELD, 3, {power=value * self.arcane_shield / 100})
	end
....
also, can arcane reconstruction really crit?
Yes, it does.

Effigy
Uruivellas
Posts: 970
Joined: Fri Oct 10, 2014 4:00 pm

Re: Weird behavior with vile life and arcane shield

#4 Post by Effigy »

I think most damage shields will overwrite an existing shield if the magnitude is greater. It seems Arcane Shield should be calculating the value of the new shield and only exiting if it would be weaker than your current shield.

This seems pretty simple, so I could try to fix it myself.

ghostbuster
Uruivellas
Posts: 617
Joined: Mon Oct 09, 2006 7:47 pm

Re: Weird behavior with vile life and arcane shield

#5 Post by ghostbuster »

To avoid replacing useful shields, I think the test should
replace if
old duration <= 3
and old power <= power
and old max power <= power (in case the player intends to cast aegis on the old shield)

It would replace vile life shields and provide a new shield on heal if it is better than the old one.

Effigy
Uruivellas
Posts: 970
Joined: Fri Oct 10, 2014 4:00 pm

Re: Weird behavior with vile life and arcane shield

#6 Post by Effigy »

I can compare the shield's current power and duration, but I don't see a way to compare max power if the shield has already taken damage. I'll look a bit and see if I can find it.

Effigy
Uruivellas
Posts: 970
Joined: Fri Oct 10, 2014 4:00 pm

Re: Weird behavior with vile life and arcane shield

#7 Post by Effigy »

I couldn't find where the max shield value is stored, and even if I did know I'm afraid the logic is going to get convoluted trying to account for Aegis. For instance, we'd have to check that whether the player knows Aegis and whether Aegis is on cooldown or else we'd want to replace the existing shield if power and duration are longer regardless of max shield power. Most players aren't going to know about this logic and it might seem inconsistent to them.

Is it ok to just compare current shield power and duration without worrying about the max power? If so, I think I have it fixed already. I need to do a little more testing to make sure I didn't miss some edge case.

Radon26
Sher'Tul
Posts: 1439
Joined: Mon Jun 23, 2014 11:50 am

Re: Weird behavior with vile life and arcane shield

#8 Post by Radon26 »

can you create a new shield without touching the "max shield"? so that only "current shield" is replaced.
if you could do that, you wouldn't have to do checks for aegis.

Effigy
Uruivellas
Posts: 970
Joined: Fri Oct 10, 2014 4:00 pm

Re: Weird behavior with vile life and arcane shield

#9 Post by Effigy »

I think I may have figured it out, but it's taking a while to test this stuff.

HousePet
Perspiring Physicist
Posts: 6215
Joined: Sun Sep 09, 2012 7:43 am

Re: Weird behavior with vile life and arcane shield

#10 Post by HousePet »

Would be simpler to stop Vile Life from triggering on heal effects.
My feedback meter decays into coding. Give me feedback and I make mods.

Radon26
Sher'Tul
Posts: 1439
Joined: Mon Jun 23, 2014 11:50 am

Re: Weird behavior with vile life and arcane shield

#11 Post by Radon26 »

or allowing it to stack like bathe in light does? just a suggestion.

Effigy
Uruivellas
Posts: 970
Joined: Fri Oct 10, 2014 4:00 pm

Re: Weird behavior with vile life and arcane shield

#12 Post by Effigy »

Ok, it seems to be working. I can keep the existing shield's max power and update the current value.

I'm debating how to handle duration in this case. If I carry forward an existing shield's max power (to use with Aegis), I can either keep the existing duration or set the duration to 3 turns (Arcane Shield default). My first instinct is to set duration to 3 turns if the current duration is less, because it would suck to use Arcane Reconstruction and end up with a shield that only lasts 1-2 because you refreshed an existing shield.

On the other hand, setting the duration to 3 turns and keeping the old shield's max power could potentially lead to refreshing a shield indefinitely with frequent heals, and possibly abusing this with Aegis or other talents. This may not be as abusable as it sounds because it requires specific conditions that aren't really easy to sustain over time, but there is some degree of exploitability.

Right now I'm leaning toward refreshing the duration to 3 turns and implementing code like that used by Weapon of Light and Bathe in Light, which only allow you to refresh the duration 20 times before the shield ends. What do you guys think?

Radon26
Sher'Tul
Posts: 1439
Joined: Mon Jun 23, 2014 11:50 am

Re: Weird behavior with vile life and arcane shield

#13 Post by Radon26 »

1. for BiL and WoL, if they refresh a shield 20 times, it explodes.
thats 1 way.
2, comeone. you have like what... 5 decent heals in the entire game...
-arcane reconstruction (aegis)
-realign (FEM)
-healing touch (nature stuff)
-healing wave (moss)
-second life (celestial combat)
-healing light (light)
-undeath link (necrosis)
-consume soul (animus)
-blood grasp (blood)
-body reversion (age manipulation)
-devour life (dark sustencance)

alright fine, that's more than 5. 11 actually, and may be more. still, you are not going to pick more than 3 of them.
aside from that, you cannot realistically sustain your shield from just vile life, shield of light and on summon heals.
in a fight you are constantly being bombarded with spells, arrows, and some DoTs.
even if you can sustain duration, it will not be possible to sustain the shield value.
even the weapon of light put on 2 daggers would not be good enough.

hmm... aegis, vile life, daggers and weapon of light... hmm...

Effigy
Uruivellas
Posts: 970
Joined: Fri Oct 10, 2014 4:00 pm

Re: Weird behavior with vile life and arcane shield

#14 Post by Effigy »

I was mainly thinking about the Vile Life heal, because you could easily trigger that once per turn with high spell crit. It would only refresh a shield with Arcane Shield if your current shield power is less than the shield you'd get from the Vile Life heal, but it could potentially extend the shield forever if there's no restriction on how often it can be refreshed. It won't increase the max shield value though, so it doesn't have the scaling potential of something like Bathe in Light.

Also, I don't necessarily have to allow extending 20 times like Bathe in Light. I could make it just allow refreshing duration once, but after that just refresh the shield power if it's greater than the current value and keep the existing duration. I don't like the fact that Bathe directly ends the shield after 20 refreshes and don't plan to implement that part. I would rather Bathe in Light and Weapon of Light just stopped modifying the shield after 20 refreshes instead of ending it, but that's a different discussion.

HousePet
Perspiring Physicist
Posts: 6215
Joined: Sun Sep 09, 2012 7:43 am

Re: Weird behavior with vile life and arcane shield

#15 Post by HousePet »

Given that Vile Life can trigger multiple times per turn, I think it would be best if it didn't trigger on heal effects.
My feedback meter decays into coding. Give me feedback and I make mods.

Post Reply