Elements the Game Forum - Free Online Fantasy Card Game

Elements the Game => Report In-game Issues => Issue Archive => Topic started by: CactusKing on May 11, 2018, 07:09:38 am

Title: Skull Shield and 0hp creatures
Post by: CactusKing on May 11, 2018, 07:09:38 am
I was playing a ball lightning fractal deck against someone (AI) who had a skull buckler equipped, and when the balls attacked every single one of them would turn into a skeleton. I fractalled some more and eventually had a full field of them. I don't think this was intended but I think it's due to some sort of 'if' event in the code that triggers if a creature dies while attacking and skull shield is in play, regardless of it it was the shield that killed it.
It would be interesting to see if poisoned creatures always turn into skeletons on death when this shield is in play, based on the same bug.
Title: Re: Skull Shield and 0hp creatures
Post by: moehrpi on May 11, 2018, 08:45:51 am
Skull Shield always triggers for 0-HP creatures. For 1-HP creates the probability is 1/2; for 2-HP creatures it should be 1/3. It works as intended, give Skull Shield some love.
Title: Re: Skull Shield and 0hp creatures
Post by: CactusKing on May 11, 2018, 08:49:33 am
My bad, thought it was a consistent chance for everything.
Title: Re: Skull Shield and 0hp creatures
Post by: iancudorinmarian on May 11, 2018, 08:50:10 am
Skull Shield formula:

p = 1/(2*hp)

p - probability of creature dying
hp - creature's hp

So a 0 hp creature theoretically has a chance of dying of infinity.
Title: Re: Skull Shield and 0hp creatures
Post by: moehrpi on May 12, 2018, 09:19:47 am
So a 0 hp creature theoretically has a chance of dying of infinity.

That's a bold statement. :o

Thanks for the correct formula. ;)
Title: Re: Skull Shield and 0hp creatures
Post by: iancudorinmarian on May 12, 2018, 09:35:56 am
So a 0 hp creature theoretically has a chance of dying of infinity.

That's a bold statement. :o

Thanks for the correct formula. ;)
Well, obviously EtG's code checks if the creatures's hp is 0 and just assigns the probability a value of 1 :P

I just thought it's funny to think about it that way.
blarg: