|
@@ -46,19 +46,32 @@ public class SoulBoom : MonoBehaviour
|
|
|
Vector3 pos2 = transform.position;
|
|
Vector3 pos2 = transform.position;
|
|
|
target = (pos1 - pos2).normalized;
|
|
target = (pos1 - pos2).normalized;
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- characters[i].BeHit
|
|
|
|
|
- (attackInfo.damage, Vector3.zero,
|
|
|
|
|
- attackInfo.changeHurt, attackInfo.repelValue);
|
|
|
|
|
- characters[i].ChangeState(CharacterState.Hurt);
|
|
|
|
|
- characters[i].rb.AddForce(target * attackInfo.force);
|
|
|
|
|
-
|
|
|
|
|
- if (isTransfiguration)
|
|
|
|
|
|
|
+ if((characters[i].isTran && characters[i].pc.hp- attackInfo.damage < 0 )
|
|
|
|
|
+ ||characters[i].hp - attackInfo.damage < 0)
|
|
|
{
|
|
{
|
|
|
- characters[i].isSoulUnstable = true;
|
|
|
|
|
- characters[i].soulUnstableTime = soulUnstableTime;
|
|
|
|
|
- characters[i].ChangeMat(2);
|
|
|
|
|
|
|
+ characters[i].BeHit
|
|
|
|
|
+ (attackInfo.damage, Vector3.zero,
|
|
|
|
|
+ attackInfo.changeHurt, attackInfo.repelValue);
|
|
|
}
|
|
}
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ characters[i].BeHit
|
|
|
|
|
+ (attackInfo.damage, Vector3.zero,
|
|
|
|
|
+ attackInfo.changeHurt, attackInfo.repelValue);
|
|
|
|
|
+
|
|
|
|
|
+ characters[i].ChangeState(CharacterState.Hurt);
|
|
|
|
|
+ characters[i].rb.AddForce(target * attackInfo.force);
|
|
|
|
|
+
|
|
|
|
|
+ if (isTransfiguration)
|
|
|
|
|
+ {
|
|
|
|
|
+ characters[i].isSoulUnstable = true;
|
|
|
|
|
+ characters[i].soulUnstableTime = soulUnstableTime;
|
|
|
|
|
+ characters[i].ChangeMat(2);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|