Add option to toggle friendly fire.
This commit is contained in:
parent
298ac79f78
commit
283ebbda34
6 changed files with 31 additions and 2 deletions
|
|
@ -28,6 +28,17 @@ Class SayaCollar : SWWMArmor
|
|||
newdamage = splitdmg[0]+splitdmg[1];
|
||||
}
|
||||
}
|
||||
|
||||
// for friendly fire handling, jammed into here
|
||||
override void ModifyDamage( int damage, Name damageType, out int newdamage, bool passive, Actor inflictor, Actor source, int flags )
|
||||
{
|
||||
int ff = swwm_friendlyfire;
|
||||
if ( !source || !source.IsFriend(Owner) || !ff ) return;
|
||||
// 1: block incoming friendly damage
|
||||
// 2: also block outgoing friendly damage
|
||||
if ( (passive && ff) || (!passive && (ff == 2)) )
|
||||
newdamage = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// high-resonant almasteel plating
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue