Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
12 changes: 12 additions & 0 deletions docs/New-or-Enhanced-Logics.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions docs/Whats-New.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 5 additions & 0 deletions src/Ext/WarheadType/Body.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -397,6 +399,7 @@ void WarheadTypeExt::ExtData::LoadFromINIFile(CCINIClass* const pINI)
|| this->ReverseEngineer
|| this->ReturnWarhead
|| this->PenetratesTransport_Level > 0
|| this->Taunt
);

char tempBuffer[32];
Expand Down Expand Up @@ -654,6 +657,8 @@ void WarheadTypeExt::ExtData::Serialize(T& Stm)

.Process(this->ApplyPerTargetEffectsOnDetonate)

.Process(this->Taunt)

// Ares tags
.Process(this->AffectsEnemies)
.Process(this->AffectsOwner)
Expand Down
4 changes: 4 additions & 0 deletions src/Ext/WarheadType/Body.h
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,8 @@ class WarheadTypeExt
Valueable<bool> PenetratesTransport_DamageAll;
ValueableIdx<VocClass> PenetratesTransport_CleanSound;

Valueable<bool> Taunt;

// Ares tags
// http://ares-developers.github.io/Ares-docs/new/warheads/general.html
Valueable<bool> AffectsEnemies;
Expand Down Expand Up @@ -492,6 +494,8 @@ class WarheadTypeExt
, AnimZAdjust {}

, ApplyPerTargetEffectsOnDetonate {}

, Taunt { false }
{ }

void ApplyConvert(HouseClass* pHouse, TechnoClass* pTarget);
Expand Down
3 changes: 3 additions & 0 deletions src/Ext/WarheadType/Detonate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
Loading