Skip to content

Conversation

@Flactine
Copy link
Contributor

@Flactine Flactine commented Nov 24, 2025

Overview

This PR introduces three new filtering parameters to the AttachEffect system, providing granular control over which units can receive specific attached effects.

New Features

1. AffectTypes

  • Purpose: Whitelist filter for specific unit types
  • Behavior: If set to a non-empty list, the effect can only be applied to the specified unit types
  • Priority: Highest priority filter (checked first), after PenetratesForceShield.

2. IgnoreTypes

  • Purpose: Blacklist filter for specific unit types
  • Behavior: If set to a non-empty list, the effect cannot be applied to any of the specified unit types
  • Priority: Checked after AffectTypes.

3. AffectTargets

  • Purpose: Category-based filter for unit types
  • Behavior: If set to a non-empty list, the effect can only be applied to units belonging to the specified categories (Infantry, Unit, Aircraft, Building, etc.)
  • Priority: Checked after both type-based filters.

Filtering Logic

The system applies filters in the following order:

AffectTypes (whitelist) → IgnoreTypes (blacklist) → AffectTargets (category)

All checks must pass for the effect to be applied.

Description

  • AffectTypes, if set to a non-empty list, restricts the effect to only be applicable on the specific unit types listed. If this is not set or empty, no whitelist filtering occurs. This check has the highest priority.
  • IgnoreTypes, if set to a non-empty list, prevents the effect from being applied to any of the specific unit types listed. If this is not set or empty, no blacklist filtering occurs. This check is performed after AffectTypes.
  • AffectTargets, if set to a non-empty list, restricts the effect to only be applicable on units belonging to the specified target categories (e.g., infantry, units, aircraft, buildings). This check is performed after both type-based filters.

Usage

[SOMEATTACHEFFECT]
AffectTypes=E1,HTNK,YAPOWR ; List of TechnoTypes
IgnoreTypes=E2,APOC,YATECH ; List of TechnoTypes
AffectTargets=all ; List of TechnoType Enumeration (none|infantry|units|aircraft|buildings|all)

概述

本PR为AttachEffect加入了三个参数,用来判断哪些科技类型能被附加上该AE。

新功能

1. AffectTypes

  • 目的: 特定科技类型的白名单过滤
  • 行为: 若非空,则只有该列表中的单位能够被附加上此AE。
  • 优先级: 拥有较高优先级,在 PenetratesForceShield之后进行判定。

2. IgnoreTypes

  • 目的: 特定科技类型的黑名单过滤
  • 行为: 若非空,则该列表中的单位将不能被附加上此AE。
  • 优先级: 在 AffectTypes之后进行判定。

3. AffectTargets

  • 目的:基于科技类型类别的过滤
  • 行为: 若非空,效果只能适用于属于指定类别的科技类型(步兵,单位,飞机,建筑),默认为all,即全部类型。
  • 优先级: 在前两个功能之后进行判定。

过滤逻辑

按以下顺序应用过滤器:

AffectTypes (白名单) → IgnoreTypes (黑名单) → AffectTargets (类型)

必须通过所有检查才能将AE应用于该科技类型。

描述

  • AffectTypes,如果设置为非空列表,则限制效果仅适用于列出的特定科技类型。如果不设置或为空,则不进行白名单过滤。此检查具有最高优先级。
  • IgnoreTypes,如果设置为非空列表,将阻止效果应用于列出的任何特定科技类型。如果不设置或为空,则不进行黑名单过滤。该检查在AffectTypes之后执行。
  • AffectTargets,如果设置为非空列表,限制效果只适用于属于指定目标类别的科技类型(例如,步兵,单位,飞机,建筑)。此检查在两个基于类型的筛选器之后执行。

Added AffectTypes and IgnoreTypes to AttachEffects
Added Enumeration Determine to AttachEffects.
@TaranDahl TaranDahl added the ⚙️T1 T1 maintainer review is sufficient label Nov 24, 2025
@github-actions
Copy link

github-actions bot commented Nov 24, 2025

Nightly build for this pull request:

This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build.

Added CREDITS and Whats-New
Coronia and others added 3 commits November 25, 2025 13:03
from the bottom organizational and technical assistance acknowledgments to the front specific feature contributors area.
@DeathFishAtEase DeathFishAtEase merged commit fc7162a into Phobos-developers:develop Nov 25, 2025
6 checks passed
DeathFishAtEase added a commit to DeathFishAtEase/Phobos that referenced this pull request Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⚙️T1 T1 maintainer review is sufficient Tested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants