Commit 490a7df
Add veterancy-based target filtering for weapons and warheads (#2008)
This PR introduces **veterancy-based filtering** for both weapon
targeting and warhead effect application.
---
## 1. Weapon target filtering by target veterancy
Weapons can now restrict which targets they are allowed to attack based
on the target’s veterancy level.
This affects both weapon firing eligibility and weapon selection logic
(except for special cases where weapon selection is fixed by the
engine).
### New INI options:
```ini
[SOMEWEAPON] ; WeaponType
CanTargetVeterancy=all ; List of Affected Veterancy Enumeration (none|rookie|veteran|elite|all)
```
Targets whose veterancy is not included in the specified enumeration
will not be considered valid targets for the weapon.
---
## 2. Warhead effect filtering by target veterancy
Warheads can now conditionally apply their effects based on the target’s
veterancy level.
Unlike weapon filtering, this logic does **not** affect whether a weapon
can fire, but instead determines whether the warhead’s effects will be
applied after detonation.
### New INI options:
```ini
[SOMEWARHEAD] ; WarheadType
AffectsVeterancy=all ; List of Affected Veterancy Enumeration (none|rookie|veteran|elite|all)
```
* The warhead will only affect targets whose veterancy is explicitly
listed in AffectsVeterancy.
---
---
---
本次更新新增了**基于目标等级(Veterancy)的筛选逻辑**,分别作用于**武器攻击判定**和**弹头效果生效判定**。
---
## 1. 基于目标等级的武器筛选
武器现在可以根据目标单位的经验等级,决定是否允许对其进行攻击。
该逻辑不仅影响武器能否开火,也会影响武器选择流程(部分引擎强制固定选择的特殊情况除外)。
### 新增 INI 选项(WeaponType):
```ini
[SOMEWEAPON] ; 武器类型
CanTargetVeterancy=all ; List of Affected Veterancy Enumeration (none|rookie|veteran|elite|all)
```
当目标的等级未被列入指定枚举时,武器将不会将其视为可攻击目标。
---
## 2. 基于目标等级的弹头效果筛选
弹头现在可以根据目标单位的经验等级,决定爆炸后是否对其产生效果。
与武器筛选不同,此逻辑**不影响武器是否开火**,而是作用于爆炸结算阶段。
### 新增 INI 选项:
```ini
[SOMEWARHEAD] ; 弹头类型
AffectsVeterancy=all ; List of Affected Veterancy Enumeration (none|rookie|veteran|elite|all)
```
* 只有等级被列入指定枚举的目标才会受到弹头效果影响
---------
Co-authored-by: Kerbiter <crabiter@vivaldi.net>
Co-authored-by: Netsu_Negi <71598172+NetsuNegi@users.noreply.github.com>1 parent 15e75f2 commit 490a7df
18 files changed
Lines changed: 131 additions & 11 deletions
File tree
- docs
- src
- Ext
- Bullet
- Techno
- WarheadType
- WeaponType
- Utilities
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
678 | 678 | | |
679 | 679 | | |
680 | 680 | | |
681 | | - | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
682 | 684 | | |
683 | 685 | | |
684 | 686 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2348 | 2348 | | |
2349 | 2349 | | |
2350 | 2350 | | |
| 2351 | + | |
2351 | 2352 | | |
2352 | 2353 | | |
2353 | 2354 | | |
| |||
2356 | 2357 | | |
2357 | 2358 | | |
2358 | 2359 | | |
| 2360 | + | |
2359 | 2361 | | |
2360 | 2362 | | |
2361 | 2363 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2992 | 2992 | | |
2993 | 2993 | | |
2994 | 2994 | | |
2995 | | - | |
2996 | | - | |
2997 | | - | |
2998 | | - | |
2999 | | - | |
| 2995 | + | |
| 2996 | + | |
| 2997 | + | |
| 2998 | + | |
| 2999 | + | |
| 3000 | + | |
3000 | 3001 | | |
3001 | 3002 | | |
3002 | 3003 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
518 | 518 | | |
519 | 519 | | |
520 | 520 | | |
| 521 | + | |
| 522 | + | |
521 | 523 | | |
522 | 524 | | |
523 | 525 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
382 | 382 | | |
383 | 383 | | |
384 | 384 | | |
385 | | - | |
| 385 | + | |
386 | 386 | | |
387 | 387 | | |
388 | 388 | | |
| |||
556 | 556 | | |
557 | 557 | | |
558 | 558 | | |
559 | | - | |
| 559 | + | |
| 560 | + | |
560 | 561 | | |
561 | 562 | | |
562 | 563 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
277 | | - | |
| 277 | + | |
278 | 278 | | |
279 | 279 | | |
280 | 280 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
286 | 286 | | |
287 | 287 | | |
288 | 288 | | |
| 289 | + | |
289 | 290 | | |
290 | 291 | | |
291 | 292 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
361 | 361 | | |
362 | 362 | | |
363 | 363 | | |
| 364 | + | |
364 | 365 | | |
365 | 366 | | |
366 | 367 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| |||
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
| 74 | + | |
73 | 75 | | |
74 | 76 | | |
75 | 77 | | |
| |||
0 commit comments