5 [
Attribute(
"10", UIWidgets.EditBox,
"Regeneration speed of related hitzone when consuming this item",
category:
"Regeneration")]
6 protected float m_fItemRegenerationSpeed;
8 [
Attribute(
"10", UIWidgets.EditBox,
"Regeneration duration of related hitzone when consuming this item in seconds",
category:
"Regeneration")]
9 protected float m_fItemRegenerationDuration;
11 [
Attribute(
"0", UIWidgets.EditBox,
"Total amount of regeneration that will be applied to the related hitzone. Will be ignored if m_fItemRegenerationDuration > 0",
category:
"Regeneration")]
12 protected float m_fItemAbsoluteRegenerationAmount;
15 override void ApplyEffect(notnull IEntity target, notnull IEntity user, IEntity item,
ItemUseParameters animParams)
17 super.ApplyEffect(target, user, item, animParams);
19 ChimeraCharacter
char = ChimeraCharacter.Cast(target);
27 array<HitZone> physicalHitZones = {};
28 damageMgr.GetPhysicalHitZones(physicalHitZones);
29 foreach (
HitZone physicalHitZone: physicalHitZones)
40 override bool CanApplyEffect(notnull IEntity target, notnull IEntity user, out SCR_EConsumableFailReason failReason)
42 ChimeraCharacter
char = ChimeraCharacter.Cast(target);
50 array<HitZone> hitzones = {};
51 damageMgr.GetPhysicalHitZones(hitzones);
53 foreach (
HitZone hitzone : hitzones)
55 if (hitzone.GetDamageOverTime(
EDamageType.HEALING) < 0)
57 failReason = SCR_EConsumableFailReason.ALREADY_APPLIED;
65 failReason = SCR_EConsumableFailReason.UNDAMAGED;
71 override bool CanApplyEffectToHZ(notnull IEntity target, notnull IEntity user,
ECharacterHitZoneGroup group, out SCR_EConsumableFailReason failReason = SCR_EConsumableFailReason.NONE)
73 return CanApplyEffect(target, user, failReason);