Skip to content

Commit f811fba

Browse files
Update documentation and Debug Log for Crit.AffectAbovePercent
Before completing the discussion on #1984, first correct the description of this parameter in the documentation and Debug Log based on the current source code.
1 parent 7fded54 commit f811fba

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

docs/New-or-Enhanced-Logics.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2198,7 +2198,7 @@ RemoveMindControl=false ; boolean
21982198
- `Crit.Warhead.FullDetonation` controls whether or not the Warhead is detonated fully on the targets (as part of a dummy weapon) or simply deals area damage and applies Phobos' Warhead effects.
21992199
- `Crit.Affects` can be used to customize types of targets that this Warhead can deal critical hits against. Critical hits cannot affect empty cells or cells containing only TerrainTypes, overlays etc.
22002200
- `Crit.AffectsHouses` can be used to customize houses that this Warhead can deal critical hits against.
2201-
- `Crit.AffectBelowPercent` and `Crit.AffectsAbovePercent` can be used to set the health percentage that targets must be above and/or below/equal to respectively to be affected by critical hits. If target has zero health left this check is bypassed.
2201+
- `Crit.AffectBelowPercent` and `Crit.AffectAbovePercent` can be used to set the health percentage that targets must be above and/or below/equal to respectively to be affected by critical hits. If target has zero health left this check is bypassed.
22022202
- `Crit.AnimList` can be used to set a list of animations used instead of Warhead's `AnimList` if Warhead deals a critical hit to even one target. If `Crit.AnimList.PickRandom` is set (defaults to `AnimList.PickRandom`) then the animation is chosen randomly from the list. If `Crit.AnimList.CreateAll` is set (defaults to `AnimList.CreateAll`), all animations from the list are created.
22032203
- `Crit.AnimOnAffectedTargets`, if set, makes the animation(s) from `Crit.AnimList` play on each affected target *in addition* to animation from Warhead's `AnimList` playing as normal instead of replacing `AnimList` animation. Note that because these animations are independent from `AnimList`, `Crit.AnimList.PickRandom` and `Crit.AnimList.CreateAll` will not default to their `AnimList` counterparts here and need to be explicitly set if needed.
22042204
- `Crit.ActiveChanceAnims` can be used to set animation to be always displayed at the Warhead's detonation coordinates if the current Warhead has a chance to critically hit. If more than one animation is listed, a random one is selected.
@@ -2217,7 +2217,7 @@ Crit.Warhead.FullDetonation=true ; boolean
22172217
Crit.Affects=all ; List of Affected Target Enumeration (none|land|water|infantry|units|buildings|all)
22182218
Crit.AffectsHouses=all ; List of Affected House Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all)
22192219
Crit.AffectBelowPercent=1.0 ; floating point value, percents or absolute (0.0-1.0)
2220-
Crit.AffectsAbovePercent=0.0 ; floating point value, percents or absolute (0.0-1.0)
2220+
Crit.AffectAbovePercent=0.0 ; floating point value, percents or absolute (0.0-1.0)
22212221
Crit.AnimList= ; List of AnimationTypes
22222222
Crit.AnimList.PickRandom= ; boolean
22232223
Crit.AnimList.CreateAll= ; boolean

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7948,12 +7948,12 @@ msgstr "`Crit.AffectsHouses` 可用于自定义此弹头可暴击的目标所属
79487948

79497949
#: ../../New-or-Enhanced-Logics.md:2201
79507950
msgid ""
7951-
"`Crit.AffectBelowPercent` and `Crit.AffectsAbovePercent` can be used to "
7951+
"`Crit.AffectBelowPercent` and `Crit.AffectAbovePercent` can be used to "
79527952
"set the health percentage that targets must be above and/or below/equal "
79537953
"to respectively to be affected by critical hits. If target has zero "
79547954
"health left this check is bypassed."
79557955
msgstr ""
7956-
"`Crit.AffectBelowPercent` 和 `Crit.AffectsAbovePercent` "
7956+
"`Crit.AffectBelowPercent` 和 `Crit.AffectAbovePercent` "
79577957
"用于设置可被暴击影响的单位其当前血量所占百分比必须高于和/或低于/等于的限制。若目标血量为 0 则跳过该检查。"
79587958

79597959
#: ../../New-or-Enhanced-Logics.md:2202
@@ -8023,7 +8023,7 @@ msgid ""
80238023
"Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all)\n"
80248024
"Crit.AffectBelowPercent=1.0 ; floating point value, "
80258025
"percents or absolute (0.0-1.0)\n"
8026-
"Crit.AffectsAbovePercent=0.0 ; floating point value, "
8026+
"Crit.AffectAbovePercent=0.0 ; floating point value, "
80278027
"percents or absolute (0.0-1.0)\n"
80288028
"Crit.AnimList= ; List of AnimationTypes\n"
80298029
"Crit.AnimList.PickRandom= ; boolean\n"
@@ -8049,7 +8049,7 @@ msgstr ""
80498049
"Enumeration (none|owner/self|allies/ally|team|enemies/enemy|all)\n"
80508050
"Crit.AffectBelowPercent=1.0 ; floating point value, "
80518051
"percents or absolute (0.0-1.0)\n"
8052-
"Crit.AffectsAbovePercent=0.0 ; floating point value, "
8052+
"Crit.AffectAbovePercent=0.0 ; floating point value, "
80538053
"percents or absolute (0.0-1.0)\n"
80548054
"Crit.AnimList= ; List of AnimationTypes\n"
80558055
"Crit.AnimList.PickRandom= ; boolean\n"

src/Ext/WarheadType/Body.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ void WarheadTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI)
168168
this->Crit_SuppressWhenIntercepted.Read(exINI, pSection, "Crit.SuppressWhenIntercepted");
169169

170170
if (this->Crit_AffectAbovePercent > this->Crit_AffectBelowPercent)
171-
Debug::Log("[Developer warning][%s] Crit.AffectsAbovePercent is bigger than Crit.AffectsBelowPercent, crit will never activate!\n", pSection);
171+
Debug::Log("[Developer warning][%s] Crit.AffectAbovePercent is bigger than Crit.AffectBelowPercent, crit will never activate!\n", pSection);
172172

173173
this->MindControl_Anim.Read(exINI, pSection, "MindControl.Anim");
174174
this->MindControl_ThreatDelay.Read(exINI, pSection, "MindControl.ThreatDelay");

0 commit comments

Comments
 (0)