From e2f26499bb7d955bf76f6c8b5f46f9fa636f953f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=88=AA=E5=91=B3=E9=BA=BB=E9=85=B1?= <93972760+TaranDahl@users.noreply.github.com> Date: Sat, 21 Feb 2026 22:40:31 +0800 Subject: [PATCH 1/2] core --- CREDITS.md | 1 + docs/New-or-Enhanced-Logics.md | 12 ++++++++++++ docs/Whats-New.md | 1 + src/Ext/WarheadType/Body.cpp | 4 ++++ src/Ext/WarheadType/Body.h | 4 ++++ src/Ext/WarheadType/Detonate.cpp | 3 +++ 6 files changed, 25 insertions(+) diff --git a/CREDITS.md b/CREDITS.md index fbb87e8397..a404812446 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -706,6 +706,7 @@ This page lists all the individual contributions to the project by their author. - Weapon range finding in cylinder - Allow jumpjet climbing ignore building height - Fix an issue where the AI's regular targeting would also target garrisonable buildings + - Taunt warhead - **solar-III (凤九歌)** - Target scanning delay customization (documentation) - Skip target scanning function calling for unarmed technos (documentation) diff --git a/docs/New-or-Enhanced-Logics.md b/docs/New-or-Enhanced-Logics.md index 83f2fafb5d..36a4d98498 100644 --- a/docs/New-or-Enhanced-Logics.md +++ b/docs/New-or-Enhanced-Logics.md @@ -2766,6 +2766,18 @@ SpawnsCrate(N).Type= ; Powerup crate type enum (money|unit|healbase|cloak|ex SpawnsCrate(N).Weight=1 ; integer ``` +### Taunt warhead + +- Now you can use the following tags to make the warhead "taunt" the target, override its current mission, and force it to attack the source of the damage. + - The taunted target will behaves like doing retaliation. + - If there is no source unit for the damage, the taunt will not take effect. + +In `rulesmd.ini`: +```ini +[SOMEWARHEAD] ; WarheadType +Taunt=false ; boolean +``` + ### Toggle per-target warhead effects apply timing - Now you can set the following flag to `false` to apply the **Phobos** warhead effects that take effect on each target when taking damage, rather than when the projectiles detonate. diff --git a/docs/Whats-New.md b/docs/Whats-New.md index 81bb10c619..70f0826955 100644 --- a/docs/Whats-New.md +++ b/docs/Whats-New.md @@ -1254,6 +1254,7 @@ Vanilla fixes: - Allowed observers to see a selected building's radial indicator (by Trsdy) - Allow voxel projectiles to use `AnimPalette` and `FirersPalette` (by NetsuNegi) - Fixed the issue where the AI's regular targeting would also target garrisonable buildings (by TaranDahl) +- Taunt warhead (by TaranDahl) Phobos fixes: - Fixed shields being able to take damage when the parent TechnoType was under effects of a `Temporal` Warhead (by Starkku) diff --git a/src/Ext/WarheadType/Body.cpp b/src/Ext/WarheadType/Body.cpp index c5faf5c179..029d9ebfdd 100644 --- a/src/Ext/WarheadType/Body.cpp +++ b/src/Ext/WarheadType/Body.cpp @@ -338,6 +338,8 @@ void WarheadTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI) this->PenetratesTransport_DamageAll.Read(exINI, pSection, "PenetratesTransport.DamageAll"); this->PenetratesTransport_CleanSound.Read(exINI, pSection, "PenetratesTransport.CleanSound"); + this->Taunt.Read(exINI, pSection, "Taunt"); + // Convert.From & Convert.To TypeConvertGroup::Parse(this->Convert_Pairs, exINI, pSection, AffectedHouse::All); @@ -654,6 +656,8 @@ void WarheadTypeExt::ExtData::Serialize(T& Stm) .Process(this->ApplyPerTargetEffectsOnDetonate) + .Process(this->Taunt) + // Ares tags .Process(this->AffectsEnemies) .Process(this->AffectsOwner) diff --git a/src/Ext/WarheadType/Body.h b/src/Ext/WarheadType/Body.h index 07dd37b7eb..41acdffa76 100644 --- a/src/Ext/WarheadType/Body.h +++ b/src/Ext/WarheadType/Body.h @@ -232,6 +232,8 @@ class WarheadTypeExt Valueable PenetratesTransport_DamageAll; ValueableIdx PenetratesTransport_CleanSound; + Valueable Taunt; + // Ares tags // http://ares-developers.github.io/Ares-docs/new/warheads/general.html Valueable AffectsEnemies; @@ -492,6 +494,8 @@ class WarheadTypeExt , AnimZAdjust {} , ApplyPerTargetEffectsOnDetonate {} + + , Taunt { false } { } void ApplyConvert(HouseClass* pHouse, TechnoClass* pTarget); diff --git a/src/Ext/WarheadType/Detonate.cpp b/src/Ext/WarheadType/Detonate.cpp index 41ffd75b44..595289ef48 100644 --- a/src/Ext/WarheadType/Detonate.cpp +++ b/src/Ext/WarheadType/Detonate.cpp @@ -211,6 +211,9 @@ void WarheadTypeExt::ExtData::DetonateOnOneUnit(HouseClass* pHouse, TechnoClass* if (this->PenetratesTransport_Level > 0 && damage) this->ApplyPenetratesTransport(pTarget, pOwner, pHouse, coords, damage, distance); + if (this->Taunt && pOwner) + pTarget->Override_Mission(Mission::Attack, pOwner, nullptr); + // This might change the target's armor type this->ApplyShieldModifiers(pTarget); From 051e094394d654e0412a7448ce45dfe3cced18de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=88=AA=E5=91=B3=E9=BA=BB=E9=85=B1?= <93972760+TaranDahl@users.noreply.github.com> Date: Mon, 23 Feb 2026 22:56:51 +0800 Subject: [PATCH 2/2] Update Body.cpp --- src/Ext/WarheadType/Body.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Ext/WarheadType/Body.cpp b/src/Ext/WarheadType/Body.cpp index 029d9ebfdd..589b162dfa 100644 --- a/src/Ext/WarheadType/Body.cpp +++ b/src/Ext/WarheadType/Body.cpp @@ -399,6 +399,7 @@ void WarheadTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI) || this->ReverseEngineer || this->ReturnWarhead || this->PenetratesTransport_Level > 0 + || this->Taunt ); char tempBuffer[32];