Skip to content

Commit 9afc212

Browse files
committed
Fix CanKill calculation and RecountBurst doc
1 parent ccc2df9 commit 9afc212

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

docs/New-or-Enhanced-Logics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1661,7 +1661,7 @@ CombatAlert.Suppress= ; boolean
16611661

16621662
### Recount burst index
16631663

1664-
- You can now make technos recount their current burst index when they have changed the firing weapon or have maintained for a period of time without any targets. Defaults to `[General] -> RecountBurst`, which defaults to false.
1664+
- You can now make technos recount their current burst index when they have changed the firing weapon or have maintained for a period of time without any targets (take the larger value of last firing weapon's `ROF` and 30 frames). Defaults to `[General] -> RecountBurst`, which defaults to false.
16651665

16661666
In `rulesmd.ini`:
16671667
```ini

docs/locale/zh_CN/LC_MESSAGES/New-or-Enhanced-Logics.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6310,7 +6310,7 @@ msgid ""
63106310
"without any targets. Defaults to `[General] -> RecountBurst`, which "
63116311
"defaults to false."
63126312
msgstr ""
6313-
"现在你可以让单位在更换了开火武器或一段时间内没有目标的情况下重置当前的连发索引。默认为 `[General] -> "
6313+
"现在你可以让单位在更换了开火武器或一段时间内没有目标(取上一次发射武器的 `ROF` 与 30 帧的较大值)的情况下重置当前的连发索引。默认为 `[General] -> "
63146314
"RecountBurst`,其默认为 false。"
63156315

63166316
#: ../../New-or-Enhanced-Logics.md:1669

src/Ext/Techno/Hooks.ReceiveDamage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ DEFINE_HOOK(0x701900, TechnoClass_ReceiveDamage_Shield, 0x6)
127127

128128
if (pThis->Health > 0 && (!pWHExt->CanKill || pExt->AE.Unkillable) // Check if the warhead can not kill targets
129129
// Update remaining damage and check if the target will die and should be avoided
130-
&& MapClass::GetTotalDamage(nDamageLeft, args->WH, pThis->GetTechnoType()->Armor, 0) >= pThis->Health)
130+
&& MapClass::GetTotalDamage(nDamageLeft, args->WH, pThis->GetTechnoType()->Armor, args->DistanceToEpicenter) >= pThis->Health)
131131
{
132132
*args->Damage = 0;
133133
pThis->Health = 1;

0 commit comments

Comments
 (0)