Petards Vs Mega Building problem. FIXED

Post Reply
User avatar
phoenixffyrnig
Posts: 774
Joined: Fri Nov 29, 2019 1:07 pm
Location: It changes, frequently.

Petards Vs Mega Building problem. FIXED

Post by phoenixffyrnig »

It seems like no matter which square of the mega building is targeted by a petardier, the splash damage is dealt as if it was the bottom left tile. Units adjacent to the petardier receive no damage unless also in range of bottom left tile.

Related question - Which tile should be the epicentre of the blast, is it the tile the petardier occupied, or the tile that he targets?

I recall we had the same problem some time back with hwacha and their splash damage (the hwacha generation before this current one), so it is possibly the same issue, a unit's ability action not recognising which square of a mega is being targeted.
I also play an RTS game called Life 8-)
And I also like drinking beer! :D
User avatar
phoenixffyrnig
Posts: 774
Joined: Fri Nov 29, 2019 1:07 pm
Location: It changes, frequently.

Re: Petards Vs Mega Building problem.

Post by phoenixffyrnig »

Further testing shows this affects both of petardier's abilities. It also shows that it is rather weak Vs Megas. Explode Self does 114 dam to a basic castle, Set Petard does 75ish. Same numbers with and without Area Damage. Should Area Damage apply? If not, does this unit need a boost?
I also play an RTS game called Life 8-)
And I also like drinking beer! :D
User avatar
b2198
Posts: 798
Joined: Mon Aug 30, 2021 5:48 pm
Location: Brazil

Re: Petards Vs Mega Building problem.

Post by b2198 »

phoenixffyrnig wrote: Sat Dec 11, 2021 1:39 pm I recall we had the same problem some time back with hwacha and their splash damage (the hwacha generation before this current one), so it is possibly the same issue, a unit's ability action not recognising which square of a mega is being targeted.
Actually I think we still have that issue with hwachas, just tested it in ME.
phoenixffyrnig wrote: Sat Dec 11, 2021 3:09 pm Further testing shows this affects both of petardier's abilities. It also shows that it is rather weak Vs Megas. Explode Self does 114 dam to a basic castle, Set Petard does 75ish. Same numbers with and without Area Damage. Should Area Damage apply? If not, does this unit need a boost?
Yeah, half the cost of a trebuchet for 1/4 the damage (without area damage, with area damage it's way less) and having to get close to actually do any damage seems very weak to me.

But wait, shouldn't the damage of Explode Self be 0.7*165 - 2 = 113.5 on the target tile + 0.7/2*1.65 - 2 = 55.75 damage on the surrounding tiles? Or maybe 165 - 2 = 163 on the target tile + 165*0.7 - 2 = 113.5 on the surrounding tiles + 165*0.7/2 - 2 = 55.75 on the tiles 2 tiles apart from the target? Maybe it's the first one and it's not dealing area damage at all to multi-tile buildings, only to the bottom left tile, and the 113.5 is being rounded up in this case? Yeah, I think that checks out, because Set Petard would deal 192*0.4 - 2 = 74.8 damage, which would 4 times out of 5 be rounded up to 75.
Green is the correct color, other colors are "less correct".
User avatar
Endru1241
Posts: 2717
Joined: Fri Sep 11, 2015 8:43 am
Location: Poland

Re: Petards Vs Mega Building problem.

Post by Endru1241 »

I was meant to check this earlier, but somehow forgot.

The problem with damage is because of effect damage lack proper options.
SYSTEM_SPECIAL_EFFECT_ENVIRONMENTAL is not perfect, but would work a little better here, however it's deprecated until some new way of selection is made (at least I am under such assumption, based on the fact, that I was asked to get rid of it).
The only option left is SYSTEM_SPECIAL_EFFECT_TARGET_AND_AREA, which was made for very specific usage - with some spells in mind.
And considering not very standard assumption, that spell resisted or avoided in any way - it doesn't work at all.

Somewhere in the future there will be another way to affect an area with effects (new system special or some effect specs), but right now we are stuck with that.

Limitations:
-If original effect is resisted it is not applied on area (fortunately we have all damaging effect ignore resistance, as in AoS it's mental resistance - not applied to physical attacks).
-If original effect is targeting multi-tile unit - only unit is passed to later code, so area effect is applied centered over unit starting tile (left bottom tile).
-Area effect is counting units in range and not tiles, so it's never applied more than once on multi-tile unit.
-Just as all effects it cannot have miss chance based on speed.
-Just as all effects it cannot be centered on random adjacent tile upon miss.
-Just as all effects there is no way to change area of effect, damage decrease on further area during the game (no effect, tech can change it).
Additional limitations if set as weapon effect:
- If unit dies from attack effect is not applied.
- If attack misses (changes tile to adjacent) - effect is not applied

So we have buggy Hwacha, buggy explosions etc.

Exact theoretical damage is for Set Petard:
12 damage normally,
24 vs ships
26 vs structures, siege machines
54 vs fortifications
132 vs gates
192 vs megas
On tile targetted and it's decreased to 40% at 1

Exact theoretical damage for self explode
15
30 vs ships, siege, structures
67 vs fortifications
165 vs megas
On tile targetted and it's decreased to 70% at 1, to 49% at 2

It checks for everything, but multi-tiled units.
Fort only takes 18 damage !
b2198 wrote: Sat Dec 11, 2021 8:23 pm But wait, shouldn't the damage of Explode Self be 0.7*165 - 2 = 113.5 on the target tile + 0.7/2*1.65 - 2 = 55.75 damage on the surrounding tiles? Or maybe 165 - 2 = 163 on the target tile + 165*0.7 - 2 = 113.5 on the surrounding tiles + 165*0.7/2 - 2 = 55.75 on the tiles 2 tiles apart from the target? Maybe it's the first one and it's not dealing area damage at all to multi-tile buildings, only to the bottom left tile, and the 113.5 is being rounded up in this case? Yeah, I think that checks out, because Set Petard would deal 192*0.4 - 2 = 74.8 damage, which would 4 times out of 5 be rounded up to 75.
It seems those calcs are exactly right.
I tested on monastery (no armor to decrease damage from effect) and it got 76 from Set Petard and 115 from Self Explode.
No idea why it counts as if it was 1 tile further.

I'll write to stratego about this bug.

But considering that effect damage is independent on size - bonuses has to be changed anyway.
Age of Strategy design leader
Post Reply

Return to “Units/techs/effects”