Phobos icon indicating copy to clipboard operation
Phobos copied to clipboard

Shield / new features about shield stole

Open Loritas opened this issue 4 years ago • 2 comments

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

Loritas avatar Dec 28 '21 06:12 Loritas

Nightly build for this pull request:

github-actions[bot] avatar Dec 28 '21 09:12 github-actions[bot]

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.

SMxReaver avatar May 06 '22 17:05 SMxReaver