Detonate Ivan Bombs placed by the attacker using custom warhead. - #2365
Detonate Ivan Bombs placed by the attacker using custom warhead.#2365dh381-1 wants to merge 19 commits into
Conversation
|
To Chinese users:
|
|
To Chinese users:
|
|
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. |
| In `rulesmd.ini`: | ||
| ```ini | ||
| [SOMEWEAPON] ; WeaponType | ||
| IvanBomb.Detonate=true ; Enable bomb detonation (true/false), default: false. |
There was a problem hiding this comment.
| IvanBomb.Detonate=true ; Enable bomb detonation (true/false), default: false. | |
| IvanBomb.Detonate=false ; boolean |
If there is a fixed default value, it should be placed as the value on the right side of the equals sign; only the value type should be written after the semicolon.
|
Other codes looking good |
Coronia
left a comment
There was a problem hiding this comment.
I think this doesn't have to be restricted to the owner's bomb. It would also be useful if another unit could detonate it. Something like this:
IvanBomb.Detonate.InvokerOnly -> whether it can only affect your own bomb or not
IvanBomb.Detonate.AffectsType -> TechnoTypes in this list can have their ivan bomb detonated by this warhead. Use empty list for all types
| [SOMEWARHEAD] ; WarheadType | ||
| IvanBomb.Detonate=true ; boolean | ||
| IvanBomb.Detonate.InvokerOnly=false ; boolean | ||
| IvanBomb.Detonate.AffectsType=HTNK,E1 ; List of Registration Name, use empty list for all types |
There was a problem hiding this comment.
It is unreasonable to reinvent a filter here.
| if(pWHExt->IvanBomb_Detonate_InvokerOnly) | ||
| { | ||
| if(pBomb->Owner == pSource && CanAffects) | ||
| pBomb->Detonate(); |
There was a problem hiding this comment.
Invoking a damage in another damage process is dangerous.
IMO resetting the timer would be better.
| IvanBomb.Detonate=true ; boolean | ||
| IvanBomb.Detonate.InvokerOnly=false ; boolean | ||
| IvanBomb.Detonate.PenetrateTransport=true ; boolean | ||
| IvanBomb.Detonate.PenetrateBuilding=true ; boolean |
There was a problem hiding this comment.
rename this to PenetratesGarrison since it can only affect garrisoned buildings, while not the other 'enterable' buildings such as Bio Reactor and Ares' tunnel
What kind of change is this?
Skip Changelog).Skip Changelog,Skip Docs).Skip Docs).Skip Changelog,Skip Docs,Skip Credits).Description
IvanBomb.Detonate.InvokerOnlyto configure whether the warhead can detonate Ivan bombs from other sources.IvanBomb.Detonate.AffectsTypeto configure which targets' Ivan bombs can be detonated by warhead, use empty for all types.In
rulesmd.ini: