Shield / new features about shield stole
works when the ShieldDamage > 0
[SOMEWARHEAD]
Shield.Assimilate=false ; boolean, whether this warhead will recover its owner's shield by damaging another shield
Shield.Assimilate.Multiplier=1.0 ; double, recovered multiplier by assimilation, values from [0.0,10.0]
Shield.Steal=false ; boolean, whether this warhead will steal target's shield to its owner, when its owner doesn't have any shield
Shield.Steal.Multiplier=0.0 ; double, how many hp percents are the shield after stolen, values from [0.0,1.0]
[SOMESHIELDTYPE]
CanBeAssimilated=true ; boolean, whether this shield can be assimilated
CanBeStolen=true ; boolean, whether this shield can be stolen
Nightly build for this pull request:
- compiled-dll-e2b4e0a6c3e160c065773594a0ad37485a1140db.zip This comment is automatic and is meant to allow guests to get latest nightly builds without registering. It is updated on every successful build.
Shield stealing to restore your own health as well as stealing another object's entire ShieldType both seem to be working correctly. I was able to use:
- non-respawning zero initial health shields were respawned and filled up by shield.steal
- shields can be successfully stolen based on their type, and this works between technotypes (infantry can steal tank shields, buildings can steal aircraft shields, etc.)
- shields not specified to be stolen cannot be stolen
I wonder if the naming for turning on warhead-based stealing could be a bit better. This is just personal opinion, but perhaps Shield.Steal= could perhaps be Shield.Assimilate= to match second tag (Shield.Assimilate.Rate). Or Shield.Assimilate.Rate renamed to be Shield.Steal.Rate=?
EDIT: If you test this PR, make sure to check the changed Documentation as the updated tags are found there and not in the initial comment.