new FORCE_CHANCE_TO_HIT might be buggy

Having trouble with the game? Report issues and get help here. Read this first!

Moderator: Forum Moderators

Forum rules
Before reporting issues in this section, you must read the following topic:
Post Reply
vghetto
Posts: 755
Joined: November 2nd, 2019, 5:12 pm

new FORCE_CHANCE_TO_HIT might be buggy

Post by vghetto »

Hi,

The new implementation of FORCE_CHANCE_TO_HIT might be buggy in 1.15 when the other side has magical attacks.
To test set the cth to 0 against a silver mage for example.
User avatar
Pentarctagon
Project Manager
Posts: 5531
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: new FORCE_CHANCE_TO_HIT might be buggy

Post by Pentarctagon »

Are you saying that when attacking a silver mage, and you use FORCE_CHANCE_TO_HIT on the unit that's attacking, something isn't working? It'd be really strange for the defender's weapon special to affect a macro used to affect the attacker's weapon.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
vghetto
Posts: 755
Joined: November 2nd, 2019, 5:12 pm

Re: new FORCE_CHANCE_TO_HIT might be buggy

Post by vghetto »

Hi,
For illustration, try attached scenario in 1.14 and 1.15. Use ranged attacks.
In 1.14 none of the silver mage ranged attacks will land.
In 1.15 they will hit.

Code: Select all

{FORCE_CHANCE_TO_HIT (side=2) (side=1) 0 ()}
Attachments
_main.cfg
(2.42 KiB) Downloaded 196 times
User avatar
Pentarctagon
Project Manager
Posts: 5531
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: new FORCE_CHANCE_TO_HIT might be buggy

Post by Pentarctagon »

Alright, that's a known issue, with a fix proposed in #5213. So hopefully it'll be resolved in 1.15.8 (since there isn't enough time before 1.15.7).

edit-
Apparently the [pr] tag doesn't want the leading # between the tags.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
vghetto
Posts: 755
Joined: November 2nd, 2019, 5:12 pm

Re: new FORCE_CHANCE_TO_HIT might be buggy

Post by vghetto »

Post Reply