做不出来
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Cielonos.MainGame.Inventory.Collections
|
||||
{
|
||||
/// <summary>
|
||||
/// 光子折跃器 / Photon Warper
|
||||
/// Polychrome的扩展器,若敌人在2米之外,重攻击(AttackRA)在起手(Startup)结束时折跃至其身前2米。
|
||||
/// </summary>
|
||||
public class PhotonWarper : ExtenderBase
|
||||
{
|
||||
public override void OnObtained()
|
||||
{
|
||||
hostType = typeof(Polychrome);
|
||||
base.OnObtained();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3ca70fc0fb31f3b4e82f0842a8744722
|
||||
@@ -1,15 +1,12 @@
|
||||
using System.Collections.Generic;
|
||||
using ChocDino.UIFX;
|
||||
using Cielonos.MainGame.Buffs.Character;
|
||||
using Cielonos.MainGame.Characters;
|
||||
using Cielonos.MainGame.Effects.Feedback;
|
||||
using Cielonos.MainGame.FunctionalAnimation;
|
||||
using Cielonos.MainGame.UI;
|
||||
using SLSUtilities.Feedback;
|
||||
using SLSUtilities.General;
|
||||
using SLSUtilities.FunctionalAnimation;
|
||||
using SLSUtilities.WwiseAssistance;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace Cielonos.MainGame.Inventory.Collections
|
||||
{
|
||||
@@ -27,12 +24,19 @@ namespace Cielonos.MainGame.Inventory.Collections
|
||||
functionSm?.Update(player.selfTimeSm.DeltaTime);
|
||||
}
|
||||
|
||||
if (Keyboard.current.xKey.wasPressedThisFrame)
|
||||
/*if (Keyboard.current.xKey.wasPressedThisFrame)
|
||||
{
|
||||
SetBlock();
|
||||
player.reactionSc.blockSm.GetBlockSource("Polychrome_Block").PerfectBlock(null, player.CenterPosition + player.transform.forward);
|
||||
RemoveBlock();
|
||||
}
|
||||
|
||||
if (Keyboard.current.zKey.wasPressedThisFrame)
|
||||
{
|
||||
player.reactionSc.dodgeSm.ApplyDodge(DodgeSource.Default(player));
|
||||
player.reactionSc.dodgeSm.GetCurrentDodgeSource()?.PerfectDodge(null);
|
||||
player.reactionSc.dodgeSm.RemoveDodge("DefaultDodge");
|
||||
}*/
|
||||
}
|
||||
|
||||
public override void OnEquipped()
|
||||
@@ -174,16 +178,6 @@ namespace Cielonos.MainGame.Inventory.Collections
|
||||
}
|
||||
}
|
||||
|
||||
private bool TryPlayParryAttack(Enemy parryTarget, List<Enemy> availableEnemies)
|
||||
{
|
||||
if (parryTarget != null && !availableEnemies.Contains(parryTarget))
|
||||
{
|
||||
float distance = Vector3.Distance(player.transform.position.Flatten(), parryTarget.transform.position.Flatten());
|
||||
return PlayTargetedAnimation(distance > 2f ? "DodgeParryAttack" : "BlockParryAttack", parryTarget);
|
||||
}
|
||||
return PlayTargetedAnimation("BlockParryAttack");
|
||||
}
|
||||
|
||||
public override void OnSecondaryPress()
|
||||
{
|
||||
if (player.statusSm.HasStatus(StatusType.Stun))
|
||||
@@ -236,7 +230,7 @@ namespace Cielonos.MainGame.Inventory.Collections
|
||||
return;
|
||||
}
|
||||
|
||||
if (player.inputSc.IsHoldingSpecialA)
|
||||
if (player.inputSc.IsHoldingSpecialB)
|
||||
{
|
||||
if (functionSm["DisruptionAttack"].IsAvailable())
|
||||
{
|
||||
@@ -274,11 +268,51 @@ namespace Cielonos.MainGame.Inventory.Collections
|
||||
|
||||
if (functionSm["HeavyAttack"].IsAvailable())
|
||||
{
|
||||
Enemy target = CombatManager.EnemySm.GetBestEnemy(availableEnemies);
|
||||
//Enemy target = CombatManager.EnemySm.GetBestEnemy(availableEnemies);
|
||||
Enemy nt = CombatManager.EnemySm.GetBestEnemy(CombatManager.EnemySm.GetEnemiesInRadius(player.transform.position, 15));
|
||||
string nextNodeName = comboSm.main.GetNextNodeName("R");
|
||||
bool keepAdsorption = nextNodeName is "RC";
|
||||
if (PlayTargetedAnimation("Attack" + nextNodeName, target, 1f, keepAdsorption))
|
||||
|
||||
bool shouldWarp = false;
|
||||
Vector3 targetPos = Vector3.zero;
|
||||
if (nt != null && nextNodeName == "RA" && HasExtender<PhotonWarper>())
|
||||
{
|
||||
nextNodeName = "RB";
|
||||
float distance = Vector3.Distance(player.transform.position, nt.transform.position);
|
||||
if (distance > 2f)
|
||||
{
|
||||
shouldWarp = true;
|
||||
player.movementSc.SmartTurnToTarget(nt, 360, true);
|
||||
targetPos = player.movementSc.GetSafePositionNearTarget(nt, 1.0f);
|
||||
}
|
||||
}
|
||||
|
||||
if (nt != null && (shouldWarp || nextNodeName is "RC"))
|
||||
{
|
||||
player.movementSc.SmartTurnToTarget(nt, 360, true);
|
||||
}
|
||||
|
||||
if (PlayTargetedAnimation("Attack" + nextNodeName, nt, 1f, keepAdsorption))
|
||||
{
|
||||
if (shouldWarp)
|
||||
{
|
||||
var interval = fullBodyFuncAnimSm.currentData.Interval(IntervalType.Startup);
|
||||
float warpDuration = fullBodyFuncAnimSm.GetIntervalScaledDuration(IntervalType.Startup);
|
||||
fullBodyFuncAnimSm.currentRuntimeFuncAnim.AddAnimEvent(interval.StartTime, new SetFuncAnimSpeed()
|
||||
{
|
||||
applyMode = SetFuncAnimSpeed.SpeedApplyMode.Override,
|
||||
getFromBehaviorTree = false,
|
||||
targetSpeed = 1f
|
||||
});
|
||||
fullBodyFuncAnimSm.currentRuntimeFuncAnim.AddAnimEvent(interval.EndTime, new SetFuncAnimSpeed()
|
||||
{
|
||||
applyMode = SetFuncAnimSpeed.SpeedApplyMode.Override,
|
||||
getFromBehaviorTree = false,
|
||||
targetSpeed = 1f
|
||||
});
|
||||
player.movementSc.Teleport(targetPos, warpDuration);
|
||||
}
|
||||
|
||||
float totalTime = fullBodyFuncAnimSm.GetIntervalScaledDuration(IntervalType.Startup) - 0.2f;
|
||||
CombatManager.EnemySm.activeEnemiesList.ForEach(enemy =>
|
||||
{
|
||||
@@ -288,8 +322,28 @@ namespace Cielonos.MainGame.Inventory.Collections
|
||||
functionSm["HeavyAttack"].Execute();
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
||||
bool TryPlayParryAttack(Enemy parryTarget, List<Enemy> enemies)
|
||||
{
|
||||
if (parryTarget != null && !enemies.Contains(parryTarget))
|
||||
{
|
||||
float distance = Vector3.Distance(player.transform.position.Flatten(), parryTarget.transform.position.Flatten());
|
||||
return PlayTargetedAnimation(distance > 2f ? "DodgeParryAttack" : "BlockParryAttack", parryTarget);
|
||||
}
|
||||
return PlayTargetedAnimation("BlockParryAttack");
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnSpecialAPress()
|
||||
{
|
||||
if (functionSm["UltimateAttack"].IsAvailable())
|
||||
{
|
||||
PlayTargetedAnimation("UltimateAttack");
|
||||
functionSm["UltimateAttack"].Execute();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnSpecialCPress()
|
||||
{
|
||||
comboSm.main.Reset();
|
||||
@@ -314,11 +368,6 @@ namespace Cielonos.MainGame.Inventory.Collections
|
||||
|
||||
player.selfTimeSm.AddLocalTimer(0.04f, () => RemoveBlock());
|
||||
}
|
||||
|
||||
public override void OnSpecialBPress()
|
||||
{
|
||||
PlayTargetedAnimation("UltimateAttack");
|
||||
}
|
||||
}
|
||||
|
||||
public partial class Polychrome
|
||||
@@ -400,27 +449,4 @@ namespace Cielonos.MainGame.Inventory.Collections
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// =================================================================
|
||||
// 以下为已废弃的 ExtraUIContainer 相关代码 / Deprecated ExtraUIContainer Codes
|
||||
// =================================================================
|
||||
/*
|
||||
public partial class Polychrome
|
||||
{
|
||||
private PolychromeExtraUIContainer ExtraUIContainer => extraUIContainer as PolychromeExtraUIContainer;
|
||||
|
||||
// OnEquipped:
|
||||
// extraUIContainer = Instantiate(extraUIContainerPrefab, PlayerCanvas.MainWeaponUIArea.transform).GetComponent<MainWeaponExtraUIContainer>();
|
||||
// extraUIContainer.mainWeapon = this;
|
||||
|
||||
// OnUnequipped:
|
||||
// Destroy(extraUIContainer.gameObject);
|
||||
|
||||
// UpdateVisuals:
|
||||
// if (ExtraUIContainer != null)
|
||||
// {
|
||||
// ExtraUIContainer.SetStars(level);
|
||||
// }
|
||||
}
|
||||
*/
|
||||
}
|
||||
@@ -1,13 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using ChocDino.UIFX;
|
||||
using Cielonos.MainGame.Buffs.Character;
|
||||
using Cielonos.MainGame.Characters;
|
||||
using Cielonos.MainGame.Effects.Feedback;
|
||||
using Cielonos.MainGame.UI;
|
||||
using SLSUtilities.Feedback;
|
||||
using SLSUtilities.General;
|
||||
using SLSUtilities.FunctionalAnimation;
|
||||
using SLSUtilities.WwiseAssistance;
|
||||
using UnityEngine;
|
||||
using Random = UnityEngine.Random;
|
||||
@@ -114,11 +106,9 @@ namespace Cielonos.MainGame.Inventory.Collections
|
||||
|
||||
slash.Initialize<NormalArea>(player, this, Fraction.Enemy)
|
||||
.SetAttackSubmodule<NormalArea>(attackUnit)
|
||||
.SetTimeSubmodule<NormalArea>(2f, 0f, 0.22f)
|
||||
.SetTimeSubmodule<NormalArea>(2f, 0.02f, 0.24f)
|
||||
.SetHitSubmodule<NormalArea>(0.07f, 3);
|
||||
|
||||
slash.SetImpulseSubmodule(1f).WithRepulsion(5f);
|
||||
|
||||
slash.hitSm.AddHitSound(AK.EVENTS.POLYCHROME_HEAVYATTACKLHIT)
|
||||
.AddHitEvent((enemy, hitPosition) =>
|
||||
{
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
using Cielonos.MainGame.Characters;
|
||||
using SLSUtilities.General;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Cielonos.MainGame.Inventory.Collections
|
||||
@@ -8,7 +10,7 @@ namespace Cielonos.MainGame.Inventory.Collections
|
||||
/// - 提供与激情系统等级相关的属性加成。
|
||||
/// - 加成效果根据激情等级逐级递增,最高可达 SSS 级别。
|
||||
/// 具体效果如下:
|
||||
/// - C级:+4 能量回复,+0 攻击获得能量,0% 攻击速度,0% 暴击率,0% 受到的最终伤害倍率
|
||||
/// - C级:+3 能量回复,+0 攻击获得能量,0% 攻击速度,0% 暴击率,0% 受到的最终伤害倍率
|
||||
/// - B级:+2 能量回复,+0 攻击获得能量,1% 攻击速度,2% 暴击率,0% 受到的最终伤害倍率
|
||||
/// - A级:+1 能量回复,+0 攻击获得能量,2% 攻击速度,4% 暴击率,0% 受到的最终伤害倍率
|
||||
/// - S级:+0 能量回复,+1 攻击获得能量,3% 攻击速度,6% 暴击率,5% 受到的最终伤害倍率
|
||||
@@ -38,8 +40,8 @@ namespace Cielonos.MainGame.Inventory.Collections
|
||||
|
||||
public override void OnDiscarded()
|
||||
{
|
||||
base.OnDiscarded();
|
||||
_passionSystem.OnLevelChanged -= Refresh;
|
||||
base.OnDiscarded();
|
||||
}
|
||||
|
||||
private void Refresh(int oldLevel, int newLevel)
|
||||
@@ -51,6 +53,7 @@ namespace Cielonos.MainGame.Inventory.Collections
|
||||
private void UpdateAttributes()
|
||||
{
|
||||
passiveAttributeSm.charAttrNumericChange[CharacterAttribute.EnergyRegeneration] = GetEnergyRegen();
|
||||
passiveAttributeSm.charAttrNumericChange[CharacterAttribute.EnergyGainByAttack] = GetEnergyGainByAttack();
|
||||
passiveAttributeSm.chaAttrPercentageChangeOfAccumulation[CharacterAttribute.AttackSpeed] = GetAttackSpeed();
|
||||
passiveAttributeSm.charAttrNumericChange[CharacterAttribute.CriticalAttackChance] = GetCriticalAttackChance();
|
||||
passiveAttributeSm.chaAttrPercentageChangeOfMultiplication[CharacterAttribute.FinalDamageReceivedMultiplier] = GetFinalDamageReceivedMultiplier();
|
||||
@@ -63,7 +66,7 @@ namespace Cielonos.MainGame.Inventory.Collections
|
||||
{
|
||||
return PassionLevel switch
|
||||
{
|
||||
0 => 4.0f, // C-Rank
|
||||
0 => 3.0f, // C-Rank
|
||||
1 => 2.0f, // B-Rank
|
||||
2 => 1.0f, // A-Rank
|
||||
_ => 0.0f // S, SS, SSS (Ranks 3, 4, 5)
|
||||
|
||||
Reference in New Issue
Block a user