Skip to content

Conversation

@NetsuNegi
Copy link
Contributor

@NetsuNegi NetsuNegi commented Jan 21, 2026

  • In vanilla, computer player's techno always dont attack ironcurtained technos. Now you can customize it.
  • 在原版,电脑玩家的科技类型总是不会攻击受到铁幕保护的科技类型。现在你可以自定义它了.

In rulesmd.ini:

[CombatDamage]
CanAITargetIronCurtained=false                  ; boolean
CanHumanTargetIronCurtained=true            ; boolean

[SOMEWEAPON]                          ; WeaponType
CanTarget.IronCurtained=                  ; boolean

@NetsuNegi NetsuNegi added Needs testing ⚙️T1 T1 maintainer review is sufficient ❓Unhardcoding / Customization Make something more tweakable labels Jan 21, 2026
@github-actions
Copy link

github-actions bot commented Jan 21, 2026

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.

```ini
[CombatDamage]
CanAITargetIronCurtained=false ; boolean
CanHumanTargetIronCurtained=true ; boolean
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the current handling is unnecessary. You only need to:

bool canTargetIronCurtained = !pThis->Owner->IsControlledByHuman() ? RulesExt::Global()->CanHumanTargetIronCurtained : RulesExt::Global()->CanAITargetIronCurtained;

if (pTargetTechno->IsIronCurtained() && !pWeaponExt->CanTarget_IronCurtained.Get(pWeapon->Damage >= 0 ? canTargetIronCurtained : true))
    return CannotFire;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs testing ⚙️T1 T1 maintainer review is sufficient ❓Unhardcoding / Customization Make something more tweakable

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants