更新
This commit is contained in:
@@ -27,7 +27,7 @@ namespace Continentis.Mods.Basic.Cards.Assassin
|
||||
_sharpnessCount = 0;
|
||||
if (user.combatBuffSubmodule.HasBuff<Buffs.Sharpness>())
|
||||
_sharpnessCount = user.combatBuffSubmodule.GetBuff<Buffs.Sharpness>().unitedStackSubmodule.stackAmount;
|
||||
user.Attack(target, GetTargetedFinalDamage(target));
|
||||
AttackTarget(target, GetTargetedFinalDamage(target));
|
||||
}),
|
||||
Cmd.Do(() =>
|
||||
CreateCharacterBuff<Buffs.Sharpness>(_sharpnessCount).Apply(user, user, this)
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace Continentis.Mods.Basic.Cards.Assassin
|
||||
|
||||
CommandGroup mainGroup = ForEachTarget(targetList, target => Cmd.Parallel(
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
Cmd.After(0.2f, () => user.Attack(target, GetTargetedFinalDamage(target)))
|
||||
Cmd.After(0.2f, () => AttackTarget(target, GetTargetedFinalDamage(target)))
|
||||
));
|
||||
|
||||
mainGroup.AddCommand(Cmd.Do(() =>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
@@ -19,13 +20,13 @@ namespace Continentis.Mods.Basic.Cards.Assassin
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
new Cmd_PlaySFX("SFX_Basic_SwordStrike"),
|
||||
new Cmd_SpawnVFX("VFX_Basic_RedImpact"),
|
||||
Cmd.Do(() => user.Attack(target, GetTargetedFinalDamage(target)))
|
||||
Cmd.Do(() => AttackTarget(target, GetTargetedFinalDamage(target)))
|
||||
));
|
||||
}
|
||||
|
||||
public override int GetTargetedFinalDamage(CharacterBase target, List<string> elementalTags = null)
|
||||
public override int GetTargetedFinalDamage(CharacterBase target, AttackContext ctx = null)
|
||||
{
|
||||
var baseDamage = base.GetTargetedFinalDamage(target, elementalTags);
|
||||
var baseDamage = base.GetTargetedFinalDamage(target, ctx);
|
||||
var extraDamage = 0;
|
||||
if (target.combatBuffSubmodule.HasBuff<Buffs.Corrosion>())
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Continentis.Mods.Basic
|
||||
|
||||
CommandGroup mainGroup = ForEachTarget(targetList, target => Cmd.Parallel(
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
Cmd.After(0.2f, () => user.Attack(target, GetTargetedFinalDamage(target)))
|
||||
Cmd.After(0.2f, () => AttackTarget(target, GetTargetedFinalDamage(target)))
|
||||
));
|
||||
|
||||
mainGroup.AddCommand(Cmd.Do(() =>
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
// 动画先播,随后对所有目标同时发起攻击
|
||||
CommandGroup attackAllTargets = ForEachTarget(
|
||||
targetList,
|
||||
target => Cmd.Sequential(Cmd.Do(() => user.Attack(target, GetTargetedFinalDamage(target)))),
|
||||
target => Cmd.Sequential(Cmd.Do(() => AttackTarget(target, GetTargetedFinalDamage(target)))),
|
||||
ExecutionMode.Parallel);
|
||||
|
||||
return Cmd.Sequential(
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
return ForEachTarget(targetList, target =>
|
||||
Cmd.After(0.2f, () =>
|
||||
{
|
||||
user.Attack(target, GetTargetedFinalDamage(target));
|
||||
AttackTarget(target, GetTargetedFinalDamage(target));
|
||||
CreateCharacterBuff<Burn>(GetAttribute("BuffStack_Burn")).Apply(target, user, this);
|
||||
})
|
||||
);
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
for (int i = 0; i < attackCount; i++)
|
||||
{
|
||||
perTargetGroup.AddCommand(Cmd.After(0.4f, () =>
|
||||
user.Attack(target, GetTargetedFinalDamage(target))
|
||||
AttackTarget(target, GetTargetedFinalDamage(target))
|
||||
));
|
||||
}
|
||||
return perTargetGroup;
|
||||
|
||||
8
Assets/Mods/Basic/Cards/Scripts/General/Attack.meta
Normal file
8
Assets/Mods/Basic/Cards/Scripts/General/Attack.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4bdfa3d6f97889c4192b3f89c9a5ab51
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -6,7 +6,11 @@ using SLSFramework.General;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
public class Strike : CardLogicBase
|
||||
/// <summary>
|
||||
/// 顺劈斩:对全体敌人造成物理斩击伤害,数值受到力量和敏捷增减影响。
|
||||
/// AOE范围由卡牌数据的目标配置决定,Logic层无需额外处理。
|
||||
/// </summary>
|
||||
public class Cleave : CardLogicBase
|
||||
{
|
||||
public override void SetUpLogicComponents()
|
||||
{
|
||||
@@ -15,19 +19,15 @@ namespace Continentis.Mods.Basic.Cards
|
||||
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
// 旧版使用 Cmd_PlayAnimation.AddAction 在动画 70% 处注入伤害,
|
||||
// 现改为 Cmd.Parallel 同步触发动画与延迟伤害,保留 0.7s 等效延迟
|
||||
return ForEachTarget(targetList, target => Cmd.Parallel(
|
||||
return Cmd.Sequential(
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
new Cmd_PlaySFX("SFX_Basic_SwordStrike"),
|
||||
new Cmd_SpawnVFX("VFX_Basic_RedImpact"),
|
||||
Cmd.After(0.7f, () => user.Attack(target, GetTargetedFinalDamage(target)))
|
||||
));
|
||||
ForEachTarget(targetList, target => Cmd.Do(() => AttackTarget(target, GetTargetedFinalDamage(target))))
|
||||
);
|
||||
}
|
||||
|
||||
public override void ApplyAttributeChangesByCard()
|
||||
{
|
||||
LogicComponent<CardLogicComponent_Attack>().SetDamage_Strike();
|
||||
LogicComponent<CardLogicComponent_Attack>().SetDamage_Slash();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 53886cfa8ac7b2f45ab5ca9a15bf4c30
|
||||
84
Assets/Mods/Basic/Cards/Scripts/General/Attack/FireBall.cs
Normal file
84
Assets/Mods/Basic/Cards/Scripts/General/Attack/FireBall.cs
Normal file
@@ -0,0 +1,84 @@
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using Continentis.Mods.Basic.Buffs;
|
||||
using SLSFramework.General;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
/// <summary>
|
||||
/// 火球术:对指定目标造成主伤害并附加大量灼烧,对其余所有敌人造成溅射伤害并附加少量灼烧。
|
||||
/// targetList[0] 为主目标,其余为溅射目标(由卡牌数据目标配置决定)。
|
||||
/// </summary>
|
||||
public class FireBall : CardLogicBase
|
||||
{
|
||||
private const string DAMAGE_MAIN = "Damage_Main";
|
||||
private const string DAMAGE_OTHERS = "Damage_Others";
|
||||
private const string BURN_STACK_MAIN = "Buff_Burn_Stack_Main";
|
||||
private const string BURN_STACK_OTHERS = "Buff_Burn_Stack_Others";
|
||||
private const string DISPLAY_DAMAGE_MAIN = "Display_Damage_Main";
|
||||
private const string DISPLAY_DAMAGE_OTHERS = "Display_Damage_Others";
|
||||
|
||||
private AttackContext MainCtx => AttackContext.Default(card)
|
||||
.WithDamageKeywords("Fire")
|
||||
.WithBaseDamageAttribute(DAMAGE_MAIN);
|
||||
|
||||
private AttackContext OthersCtx => AttackContext.Default(card)
|
||||
.WithDamageKeywords("Fire")
|
||||
.WithBaseDamageAttribute(DAMAGE_OTHERS);
|
||||
|
||||
public override void SetUpLogicComponents()
|
||||
{
|
||||
AddLogicComponent<CardLogicComponent_Attack>();
|
||||
}
|
||||
|
||||
/// <summary>选中主目标时,更新主目标与溅射目标的伤害预览。</summary>
|
||||
public override void TargetingEffect(CharacterBase target)
|
||||
{
|
||||
card.SetAttribute(DISPLAY_DAMAGE_MAIN, GetTargetedFinalDamage(target, MainCtx));
|
||||
card.SetAttribute(DISPLAY_DAMAGE_OTHERS, GetNoTargetFinalDamage(OthersCtx));
|
||||
}
|
||||
|
||||
/// <summary>取消选中时,以无目标模式刷新两套伤害预览。</summary>
|
||||
public override void UntargetingEffect()
|
||||
{
|
||||
card.SetAttribute(DISPLAY_DAMAGE_MAIN, GetNoTargetFinalDamage(MainCtx));
|
||||
card.SetAttribute(DISPLAY_DAMAGE_OTHERS, GetNoTargetFinalDamage(OthersCtx));
|
||||
}
|
||||
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
CharacterBase mainTarget = targetList[0];
|
||||
|
||||
return Cmd.Sequential(
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
Cmd.Do(() =>
|
||||
{
|
||||
// 主目标:主伤害 + 大量灼烧
|
||||
AttackContext mainCtx = MainCtx;
|
||||
AttackTarget(mainTarget, GetTargetedFinalDamage(mainTarget, mainCtx), mainCtx);
|
||||
CreateCharacterBuff<Burn>(GetAttribute(BURN_STACK_MAIN)).Apply(mainTarget, user, this);
|
||||
|
||||
// 溅射目标:溅射伤害 + 少量灼烧
|
||||
AttackContext othersCtx = OthersCtx;
|
||||
for (int i = 1; i < targetList.Count; i++)
|
||||
{
|
||||
CharacterBase other = targetList[i];
|
||||
AttackTarget(other, GetTargetedFinalDamage(other, othersCtx), othersCtx);
|
||||
CreateCharacterBuff<Burn>(GetAttribute(BURN_STACK_OTHERS)).Apply(other, user, this);
|
||||
}
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
public override void ApplyAttributeChangesByCard()
|
||||
{
|
||||
// 主伤害:奥术加成写入 Damage_Main
|
||||
LogicComponent<CardLogicComponent_Attack>().SetDamage_Arcane(DAMAGE_MAIN);
|
||||
// 溅射伤害:奥术加成写入 Damage_Others(数值由卡牌数据配置)
|
||||
LogicComponent<CardLogicComponent_Attack>().SetDamage_Arcane(DAMAGE_OTHERS);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
@@ -7,7 +8,7 @@ using SLSFramework.General;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
public class FireBall : CardLogicBase
|
||||
public class FireBolt : CardLogicBase
|
||||
{
|
||||
public override void SetUpLogicComponents()
|
||||
{
|
||||
@@ -18,10 +19,11 @@ namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
return ForEachTarget(targetList, target => Cmd.Parallel(
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
Cmd.After(0.2f, () =>
|
||||
Cmd.Do(() =>
|
||||
{
|
||||
user.Attack(target, GetTargetedFinalDamage(target));
|
||||
CreateCharacterBuff<Burn>(GetAttribute("BuffStack_Burn")).Apply(target, user, this);
|
||||
AttackContext mainCtx = AttackContext.Default(card).WithDamageKeywords("Fire");
|
||||
AttackTarget(target, GetTargetedFinalDamage(target, mainCtx), mainCtx);
|
||||
CreateCharacterBuff<Burn>(GetAttribute("Buff_Burn_Stack")).Apply(target, user, this);
|
||||
})
|
||||
));
|
||||
}
|
||||
60
Assets/Mods/Basic/Cards/Scripts/General/Attack/FireRays.cs
Normal file
60
Assets/Mods/Basic/Cards/Scripts/General/Attack/FireRays.cs
Normal file
@@ -0,0 +1,60 @@
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using Continentis.Mods.Basic.Buffs;
|
||||
using SLSFramework.General;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
/// <summary>
|
||||
/// 火焰射线:选择 3 次目标(可重复),对每个选中的目标造成火焰伤害并施加灼烧 Buff。
|
||||
/// 卡牌数据需配置 targetCount = 3,关键词需包含 AllowDuplicateTargets 和 TargetEnemies。
|
||||
/// </summary>
|
||||
public class FireRays : CardLogicBase
|
||||
{
|
||||
private const string BUFF_BURN_STACK = "Buff_Burn_Stack";
|
||||
|
||||
private AttackContext FireCtx => AttackContext.Default(card)
|
||||
.WithDamageKeywords("Fire");
|
||||
|
||||
public override void SetUpLogicComponents()
|
||||
{
|
||||
AddLogicComponent<CardLogicComponent_Attack>();
|
||||
}
|
||||
|
||||
/// <summary>选中目标时更新伤害预览。</summary>
|
||||
public override void TargetingEffect(CharacterBase target)
|
||||
{
|
||||
card.SetAttribute("DisplayDamage", GetTargetedFinalDamage(target, FireCtx));
|
||||
}
|
||||
|
||||
/// <summary>取消选中时以无目标模式刷新预览。</summary>
|
||||
public override void UntargetingEffect()
|
||||
{
|
||||
card.SetAttribute("DisplayDamage", GetNoTargetFinalDamage(FireCtx));
|
||||
}
|
||||
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
// targetList 可包含重复目标(由多目标选择系统传入)
|
||||
return Cmd.Sequential(
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
ForEachTarget(targetList, target => Cmd.Do(() =>
|
||||
{
|
||||
AttackContext ctx = FireCtx;
|
||||
AttackTarget(target, GetTargetedFinalDamage(target, ctx), ctx);
|
||||
|
||||
int burnStacks = GetAttribute(BUFF_BURN_STACK);
|
||||
CreateCharacterBuff<Burn>(burnStacks).Apply(target, user);
|
||||
}))
|
||||
);
|
||||
}
|
||||
|
||||
public override void ApplyAttributeChangesByCard()
|
||||
{
|
||||
LogicComponent<CardLogicComponent_Attack>().SetDamage_Arcane();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 15155284a8c7da44f958a40b7eb6846c
|
||||
@@ -6,6 +6,9 @@ using SLSFramework.General;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
/// <summary>
|
||||
/// 突刺:造成物理伤害,数值受到敏捷增减影响。
|
||||
/// </summary>
|
||||
public class Prick : CardLogicBase
|
||||
{
|
||||
public override void SetUpLogicComponents()
|
||||
@@ -19,7 +22,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
|
||||
return ForEachTarget(targetList, target => Cmd.Parallel(
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
Cmd.After(0.1f, () => user.Attack(target, GetTargetedFinalDamage(target)))
|
||||
Cmd.After(0.1f, () => AttackTarget(target, GetTargetedFinalDamage(target)))
|
||||
));
|
||||
}
|
||||
|
||||
61
Assets/Mods/Basic/Cards/Scripts/General/Attack/SandStorm.cs
Normal file
61
Assets/Mods/Basic/Cards/Scripts/General/Attack/SandStorm.cs
Normal file
@@ -0,0 +1,61 @@
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using Continentis.Mods.Basic.Buffs;
|
||||
using SLSFramework.General;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
/// <summary>
|
||||
/// 沙暴:对全体敌人造成多段伤害,并附加致盲 Buff。
|
||||
/// AOE 范围由卡牌数据的目标配置决定,动画只播放一次。
|
||||
/// </summary>
|
||||
public class SandStorm : CardLogicBase
|
||||
{
|
||||
private AttackContext EarthCtx => AttackContext.Default(card).WithDamageKeywords("Earth");
|
||||
|
||||
public override void SetUpLogicComponents()
|
||||
{
|
||||
AddLogicComponent<CardLogicComponent_Attack>();
|
||||
}
|
||||
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
int hitCount = GetAttribute("HitCount");
|
||||
|
||||
CommandGroup hitsGroup = Cmd.Sequential();
|
||||
for (int i = 0; i < hitCount; i++)
|
||||
{
|
||||
hitsGroup.AddCommand(Cmd.After(0.5f, () =>
|
||||
{
|
||||
foreach (CharacterBase target in targetList)
|
||||
{
|
||||
AttackTarget(target, GetTargetedFinalDamage(target), EarthCtx);
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
int blindCount = GetAttribute("Buff_Blind_Count");
|
||||
CommandGroup debuffGroup = Cmd.Sequential(Cmd.Do(() =>
|
||||
{
|
||||
foreach (CharacterBase target in targetList)
|
||||
{
|
||||
CreateCharacterBuff<Blind>(blindCount).Apply(target, user);
|
||||
}
|
||||
}));
|
||||
|
||||
return Cmd.Sequential(
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
hitsGroup,
|
||||
debuffGroup
|
||||
);
|
||||
}
|
||||
|
||||
public override void ApplyAttributeChangesByCard()
|
||||
{
|
||||
LogicComponent<CardLogicComponent_Attack>().SetDamage_Arcane();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7dfda7769fd24c248aaa0e7b015d8610
|
||||
@@ -0,0 +1,76 @@
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using Continentis.Mods.Basic.Buffs;
|
||||
using SLSFramework.General;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
/// <summary>
|
||||
/// 炽焰斩:对目标造成物理斩击伤害、火焰伤害,并施加灼烧 Buff。
|
||||
/// 两次伤害分别走独立的属性修正通道,卡牌关键词仅作标记用途。
|
||||
/// </summary>
|
||||
public class SearingSlash : CardLogicBase
|
||||
{
|
||||
private const string DAMAGE_PHYSICS = "Damage_Physics";
|
||||
private const string DAMAGE_FIRE = "Damage_Fire";
|
||||
private const string BUFF_BURN_STACK = "Buff_Burn_Stack";
|
||||
|
||||
private AttackContext PhysicsCtx => AttackContext.Default(card)
|
||||
.WithDamageKeywords("Physics")
|
||||
.WithBaseDamageAttribute(DAMAGE_PHYSICS);
|
||||
|
||||
private AttackContext FireCtx => AttackContext.Default(card)
|
||||
.WithDamageKeywords("Fire")
|
||||
.WithBaseDamageAttribute(DAMAGE_FIRE);
|
||||
|
||||
public override void SetUpLogicComponents()
|
||||
{
|
||||
AddLogicComponent<CardLogicComponent_Attack>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 选中目标时更新两种伤害的预览数值。
|
||||
/// </summary>
|
||||
public override void TargetingEffect(CharacterBase target)
|
||||
{
|
||||
card.SetAttribute("Display_Damage_Physics", GetTargetedFinalDamage(target, PhysicsCtx));
|
||||
card.SetAttribute("Display_Damage_Fire", GetTargetedFinalDamage(target, FireCtx));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 取消选中目标时,以无目标模式重新计算预览数值。
|
||||
/// </summary>
|
||||
public override void UntargetingEffect()
|
||||
{
|
||||
card.SetAttribute("Display_Damage_Physics", GetNoTargetFinalDamage(PhysicsCtx));
|
||||
card.SetAttribute("Display_Damage_Fire", GetNoTargetFinalDamage(FireCtx));
|
||||
}
|
||||
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
return ForEachTarget(targetList, target => Cmd.Sequential(
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
Cmd.Do(() =>
|
||||
{
|
||||
AttackContext physCtx = PhysicsCtx;
|
||||
AttackTarget(target, GetTargetedFinalDamage(target, physCtx), physCtx);
|
||||
|
||||
AttackContext fireCtx = FireCtx;
|
||||
AttackTarget(target, GetTargetedFinalDamage(target, fireCtx), fireCtx);
|
||||
|
||||
int burnStacks = GetAttribute(BUFF_BURN_STACK);
|
||||
CreateCharacterBuff<Burn>(burnStacks).Apply(target, user);
|
||||
})
|
||||
));
|
||||
}
|
||||
|
||||
public override void ApplyAttributeChangesByCard()
|
||||
{
|
||||
LogicComponent<CardLogicComponent_Attack>().SetDamage_Slash(DAMAGE_PHYSICS);
|
||||
LogicComponent<CardLogicComponent_Attack>().SetDamage_Default(DAMAGE_FIRE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 32b57059835baf64b967b999158d863f
|
||||
@@ -6,6 +6,9 @@ using SLSFramework.General;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
/// <summary>
|
||||
/// 斩击:造成物理伤害,数值受到力量和敏捷增减影响。
|
||||
/// </summary>
|
||||
public class Slash : CardLogicBase
|
||||
{
|
||||
public override void SetUpLogicComponents()
|
||||
@@ -17,7 +20,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
return ForEachTarget(targetList, target => Cmd.Parallel(
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
Cmd.Do(() => user.Attack(target, GetTargetedFinalDamage(target)))
|
||||
Cmd.Do(() => AttackTarget(target, GetTargetedFinalDamage(target)))
|
||||
));
|
||||
}
|
||||
|
||||
@@ -2,12 +2,14 @@ using System.Collections.Generic;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using Continentis.Mods.Basic.Buffs;
|
||||
using SLSFramework.General;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
public class FireBolt : CardLogicBase
|
||||
/// <summary>
|
||||
/// 打击:造成物理伤害,数值受到力量增减影响。
|
||||
/// </summary>
|
||||
public class Strike : CardLogicBase
|
||||
{
|
||||
public override void SetUpLogicComponents()
|
||||
{
|
||||
@@ -16,21 +18,17 @@ namespace Continentis.Mods.Basic.Cards
|
||||
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
base.PlayEffect(targetList);
|
||||
|
||||
return ForEachTarget(targetList, target => Cmd.Parallel(
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
Cmd.After(0.2f, () =>
|
||||
{
|
||||
user.Attack(target, GetTargetedFinalDamage(target));
|
||||
new Burn(GetAttribute("BuffLayer_Burn")).Apply(target, user, this);
|
||||
})
|
||||
//new Cmd_PlaySFX("SFX_Basic_SwordStrike"),
|
||||
//new Cmd_SpawnVFX("VFX_Basic_RedImpact"),
|
||||
Cmd.Do(() => AttackTarget(target, GetTargetedFinalDamage(target)))
|
||||
));
|
||||
}
|
||||
|
||||
public override void ApplyAttributeChangesByCard()
|
||||
{
|
||||
LogicComponent<CardLogicComponent_Attack>().SetDamage_Arcane();
|
||||
LogicComponent<CardLogicComponent_Attack>().SetDamage_Strike();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,8 +17,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
base.PlayEffect(targetList);
|
||||
|
||||
return Cmd.Parallel(
|
||||
new Cmd_PlayAnimation(user.characterView, "Skill"),
|
||||
return Cmd.Parallel(new Cmd_PlayAnimation(user.characterView, "Skill"),
|
||||
Cmd.After(0.2f, () => user.AddBlock(GetAttribute("Block")))
|
||||
);
|
||||
}
|
||||
|
||||
@@ -11,13 +11,9 @@ namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
base.PlayEffect(targetList);
|
||||
|
||||
return ForEachTarget(targetList, target => Cmd.Parallel(
|
||||
new Cmd_PlayAnimation(user.characterView, "Skill"),
|
||||
Cmd.After(0.2f, () =>
|
||||
CreateCharacterBuff<Burn>(GetAttribute("BuffStack_Burn")).Apply(target, user, this)
|
||||
)
|
||||
Cmd.After(0.2f, () => CreateCharacterBuff<Burn>(GetAttribute("BuffStack_Burn")).Apply(target, user, this))
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
8
Assets/Mods/Basic/Cards/Scripts/General/Power.meta
Normal file
8
Assets/Mods/Basic/Cards/Scripts/General/Power.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a0d1630d2beb7284b8c2aaf4be44c18b
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
8
Assets/Mods/Basic/Cards/Scripts/General/Skill.meta
Normal file
8
Assets/Mods/Basic/Cards/Scripts/General/Skill.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 69daf5c683fd38742aaf8c22d2c0ebe3
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,33 @@
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame.Base;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using SLSFramework.General;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
/// <summary>
|
||||
/// 初级侦测术:移除目标的 DodgeRemoveAmount 点闪避。
|
||||
/// </summary>
|
||||
public class BasicDetection : CardLogicBase
|
||||
{
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
return ForEachTarget(targetList, target => Cmd.Parallel(
|
||||
new Cmd_PlayAnimation(user.characterView, "Action"),
|
||||
Cmd.Do(() => {
|
||||
int amount = GetAttribute("DodgeRemoveAmount");
|
||||
int currentDodge = target.GetAttribute(CharacterAttributes.Dodge);
|
||||
int removeAmount = UnityEngine.Mathf.Min(amount, currentDodge);
|
||||
|
||||
if (removeAmount > 0)
|
||||
{
|
||||
target.ModifyAttribute(CharacterAttributes.Dodge, -removeAmount);
|
||||
target.characterView.hudContainer.UpdateAllHUD();
|
||||
}
|
||||
})
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3b59594e6393ac740b545a5ccaba4e80
|
||||
@@ -0,0 +1,22 @@
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using SLSFramework.General;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
public class BasicHealing : CardLogicBase
|
||||
{
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
return ForEachTarget(targetList, target => Cmd.Parallel(
|
||||
new Cmd_PlayAnimation(user.characterView, "Action"),
|
||||
Cmd.Do(() =>
|
||||
{
|
||||
target.Heal(GetAttribute("HealAmount"));
|
||||
})));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5c53a310aa1468e48ab76ab5dc11bfd5
|
||||
@@ -0,0 +1,29 @@
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using SLSFramework.General;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
/// <summary>
|
||||
/// 初级净化术:对目标施加弱驱散(Basic),移除所有可被弱驱散驱散的负面Buff。
|
||||
/// 友方目标时驱散负面Buff;敌方目标时驱散正面Buff(由 Dispel 内部判定)。
|
||||
/// </summary>
|
||||
public class BasicPurification : CardLogicBase
|
||||
{
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
return ForEachTarget(targetList, target => Cmd.Parallel(
|
||||
new Cmd_PlayAnimation(user.characterView, "Action"),
|
||||
Cmd.Do(() =>
|
||||
{
|
||||
List<CharacterCombatBuffBase> dispelled = target.combatBuffSubmodule.Dispel(BuffDispelLevel.Basic, user);
|
||||
Debug.Log($"[BasicPurification] 对 {target.data.displayName} 执行弱驱散,移除了 {dispelled.Count} 个Buff。");
|
||||
})
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f3172551bc0b3e044bc1245dd4981a25
|
||||
28
Assets/Mods/Basic/Cards/Scripts/General/Skill/Bless.cs
Normal file
28
Assets/Mods/Basic/Cards/Scripts/General/Skill/Bless.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using SLSFramework.General;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
/// <summary>
|
||||
/// 祝福术:目标的下{Buff_Blessing_Stack}张卡牌获得1点通用增益影响,持续{Buff_Blessing_Duration}回合。
|
||||
/// </summary>
|
||||
public class Bless : CardLogicBase
|
||||
{
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
return ForEachTarget(targetList, target => Cmd.Parallel(
|
||||
new Cmd_PlayAnimation(user.characterView, "Action"),
|
||||
Cmd.Do(() =>
|
||||
{
|
||||
int stack = GetAttribute("Buff_Blessing_Stack");
|
||||
int duration = GetAttribute("Buff_Blessing_Duration");
|
||||
CreateCharacterBuff<Buffs.Blessing>(stack, duration).Apply(target, user, this);
|
||||
})
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d33479718f28afc4ab7d0df6616a1562
|
||||
94
Assets/Mods/Basic/Cards/Scripts/General/Skill/Command.cs
Normal file
94
Assets/Mods/Basic/Cards/Scripts/General/Skill/Command.cs
Normal file
@@ -0,0 +1,94 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Continentis.MainGame;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Combat;
|
||||
using Continentis.MainGame.Commands;
|
||||
using SLSFramework.General;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
/// <summary>
|
||||
/// 命令术:对目标执行一次感知检定:
|
||||
/// <para>对敌人:若感知低于{PerceptionThreshold_Remove},随机移除一个意图;若低于{PerceptionThreshold_Change},随机改变一个意图</para>
|
||||
/// <para>对玩家英雄:若感知检定未通过,将一张"扼制"卡牌放入目标的抽牌堆</para>
|
||||
/// </summary>
|
||||
public class Command : CardLogicBase
|
||||
{
|
||||
private static readonly Color HintGreen = new Color(0.2f, 0.85f, 0.3f);
|
||||
private static readonly Color HintRed = new Color(0.9f, 0.2f, 0.2f);
|
||||
|
||||
public override void Initialize(CardInstance cardInstance)
|
||||
{
|
||||
base.Initialize(cardInstance);
|
||||
|
||||
// 战场角色变化时刷新 hintShadow,托管机制自动取消订阅
|
||||
CombatEventCollection events = CombatMainManager.Instance.eventCollection;
|
||||
SubscribeCombatEvent(events.onCharacterDeath, new PrioritizedAction<CharacterBase>(_ => InvalidateHint()));
|
||||
SubscribeCombatEvent(events.onCharacterJoin, new PrioritizedAction<CharacterBase>(_ => InvalidateHint()));
|
||||
}
|
||||
|
||||
/// <summary>抽到此牌时刷新 hintShadow。</summary>
|
||||
protected override void OnDraw() => InvalidateHint();
|
||||
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
return ForEachTarget(targetList, target => Cmd.Parallel(
|
||||
new Cmd_PlayAnimation(user.characterView, "Action"),
|
||||
Cmd.Do(() =>
|
||||
{
|
||||
if (target is PlayerHero)
|
||||
PlayEffectOnPlayer(target);
|
||||
else
|
||||
PlayEffectOnEnemy(target);
|
||||
})
|
||||
));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 检查场上是否存在感知低于阈值的可用目标。
|
||||
/// 有可用目标时返回绿色,无可用目标时返回红色。
|
||||
/// </summary>
|
||||
public override Color? GetHintColor()
|
||||
{
|
||||
if (user == null || card.handCardView == null) return null;
|
||||
|
||||
card.DetectTargetsValidity(out List<CharacterBase> valid, out _, out _);
|
||||
if (valid.Count == 0) return HintRed;
|
||||
|
||||
int changeThreshold = GetAttribute("Perception_Threshold_High");
|
||||
bool hasEffectiveTarget = valid.Any(t =>
|
||||
t.GetAttribute(CharacterAttributes.Perception) < changeThreshold);
|
||||
|
||||
return hasEffectiveTarget ? HintGreen : HintRed;
|
||||
}
|
||||
|
||||
/// <summary>对敌方目标:根据感知检定移除或改变意图。</summary>
|
||||
private void PlayEffectOnEnemy(CharacterBase target)
|
||||
{
|
||||
int removeThreshold = GetAttribute("Perception_Threshold_Low");
|
||||
int changeThreshold = GetAttribute("Perception_Threshold_High");
|
||||
int perception = target.GetAttribute(CharacterAttributes.Perception);
|
||||
|
||||
if (perception < removeThreshold)
|
||||
target.intentionSubmodule.RemoveRandomIntendedCard();
|
||||
else if (perception < changeThreshold)
|
||||
target.intentionSubmodule.ChangeRandomIntendedCard();
|
||||
}
|
||||
|
||||
/// <summary>对玩家英雄:感知检定未通过时,向目标抽牌堆塞入一张"扼制"卡牌。</summary>
|
||||
private void PlayEffectOnPlayer(CharacterBase target)
|
||||
{
|
||||
int stifleThreshold = GetAttribute("Perception_Threshold_Low");
|
||||
int disruptionThreshold = GetAttribute("Perception_Threshold_High");
|
||||
int perception = target.GetAttribute(CharacterAttributes.Perception);
|
||||
|
||||
if (perception < stifleThreshold)
|
||||
CardInstance.GenerateCardInstance(GetDerivativeCardData(0), target, Piles.Draw);
|
||||
else if (perception < disruptionThreshold)
|
||||
CardInstance.GenerateCardInstance(GetDerivativeCardData(1), target, Piles.Draw);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 50fb290b3c3aa634294239492dbb9f54
|
||||
@@ -0,0 +1,25 @@
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
using Continentis.Mods.Basic.Buffs;
|
||||
using SLSFramework.General;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
/// <summary>
|
||||
/// 光耀印记:对目标施加本回合 Buff,使其物理攻击每段额外造成 {BuffStack} 点伤害。
|
||||
/// </summary>
|
||||
public class MarkOfRadiance : CardLogicBase
|
||||
{
|
||||
public override CommandGroup PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
return ForEachTarget(targetList, target => Cmd.Parallel(
|
||||
new Cmd_PlayAnimation(user.characterView, "Skill"),
|
||||
Cmd.Do(() =>
|
||||
CreateCharacterBuff<Buffs.MarkOfRadiance>(GetAttribute("Buff_MarkOfRadiance_Stack")).Apply(target, user, this)
|
||||
)
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d8dc25f4aad95844688111d6de3fd1e4
|
||||
8
Assets/Mods/Basic/Cards/Scripts/General/Status.meta
Normal file
8
Assets/Mods/Basic/Cards/Scripts/General/Status.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 00f2ddd3ff2976d4f97842a5fae219e4
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
10
Assets/Mods/Basic/Cards/Scripts/General/Status/Disturbed.cs
Normal file
10
Assets/Mods/Basic/Cards/Scripts/General/Status/Disturbed.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using Continentis.MainGame.Card;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
public class Disturbed : CardLogicBase
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2dd4de96073ace447b3bb89c2a976068
|
||||
13
Assets/Mods/Basic/Cards/Scripts/General/Status/Stifled.cs
Normal file
13
Assets/Mods/Basic/Cards/Scripts/General/Status/Stifled.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Continentis.MainGame.Card;
|
||||
|
||||
namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
/// <summary>
|
||||
/// 扼制:消耗1点体力的状态卡牌,具有"消耗"和"MustPlayFirst"关键词。
|
||||
/// 在打出之前,玩家不能打出其它卡牌。打出后被消耗。
|
||||
/// </summary>
|
||||
public class Stifled : CardLogicBase
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 515145e62e598aa48a1b23ef66b8c943
|
||||
@@ -19,7 +19,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
CommandGroup mainGroup = ForEachTarget(targetList, target => Cmd.Parallel(
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
Cmd.Do(() => user.Attack(target, GetTargetedFinalDamage(target)))
|
||||
Cmd.Do(() => AttackTarget(target, GetTargetedFinalDamage(target)))
|
||||
));
|
||||
|
||||
List<CharacterBase> allies = CombatMainManager.Instance.characterController.GetAllAllies(user);
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
new Cmd_PlaySFX("SFX_Basic_SwordStrike"),
|
||||
new Cmd_SpawnVFX("VFX_Basic_RedImpact"),
|
||||
Cmd.Do(() => user.Attack(target, GetTargetedFinalDamage(target)))
|
||||
Cmd.Do(() => AttackTarget(target, GetTargetedFinalDamage(target)))
|
||||
));
|
||||
|
||||
mainGroup.AddCommand(Cmd.Do(() =>
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
new Cmd_PlaySFX("SFX_Basic_GeneralMeleeImpact").SetDelay(0.2f),
|
||||
new Cmd_SpawnVFX("VFX_Basic_DefaultAttack").SetDelay(0.2f),
|
||||
Cmd.Do(() => user.Attack(target, GetTargetedFinalDamage(target)))
|
||||
Cmd.Do(() => AttackTarget(target, GetTargetedFinalDamage(target)))
|
||||
));
|
||||
|
||||
LogicComponent<CardLogicComponent_SelectHandCards>().AddSelectionCommands(ref mainGroup);
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
perTargetGroup.AddCommand(Cmd.After(0.4f, () =>
|
||||
{
|
||||
user.Attack(target, GetTargetedFinalDamage(target));
|
||||
AttackTarget(target, GetTargetedFinalDamage(target));
|
||||
Debug.Log("攻击命令触发");
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
CommandGroup mainGroup = ForEachTarget(targetList, target => Cmd.Parallel(
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
Cmd.After(0.2f, () => user.Attack(target, GetTargetedFinalDamage(target)))
|
||||
Cmd.After(0.2f, () => AttackTarget(target, GetTargetedFinalDamage(target)))
|
||||
));
|
||||
|
||||
mainGroup.AddCommand(Cmd.Do(() =>
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
{
|
||||
return ForEachTarget(targetList, target => Cmd.Parallel(
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
Cmd.Do(() => user.Attack(target, GetTargetedFinalDamage(target)))
|
||||
Cmd.Do(() => AttackTarget(target, GetTargetedFinalDamage(target)))
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
Cmd.After(0.1f, () =>
|
||||
{
|
||||
user.Attack(target, GetTargetedFinalDamage(target));
|
||||
AttackTarget(target, GetTargetedFinalDamage(target));
|
||||
CreateCharacterBuff<Weak>().Apply(target, user, this);
|
||||
})
|
||||
),
|
||||
|
||||
@@ -23,11 +23,11 @@ namespace Continentis.Mods.Basic.Cards
|
||||
target => Cmd.Sequential(
|
||||
Cmd.Parallel(
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
Cmd.Do(() => user.Attack(target, GetTargetedFinalDamage(target)))
|
||||
Cmd.Do(() => AttackTarget(target, GetTargetedFinalDamage(target)))
|
||||
),
|
||||
Cmd.Parallel(
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
Cmd.Do(() => user.Attack(target, GetTargetedFinalDamage(target)))
|
||||
Cmd.Do(() => AttackTarget(target, GetTargetedFinalDamage(target)))
|
||||
)
|
||||
),
|
||||
ExecutionMode.Sequential);
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
|
||||
return ForEachTarget(targetList, target => Cmd.Parallel(
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
Cmd.After(0.2f, () => user.Attack(target, GetTargetedFinalDamage(target)))
|
||||
Cmd.After(0.2f, () => AttackTarget(target, GetTargetedFinalDamage(target)))
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
Cmd.After(0.2f, () =>
|
||||
{
|
||||
user.Attack(target, GetTargetedFinalDamage(target));
|
||||
AttackTarget(target, GetTargetedFinalDamage(target));
|
||||
new Blind(GetAttribute("BuffLayer_Blind")).Apply(target, user, this);
|
||||
})
|
||||
));
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
|
||||
return ForEachTarget(targetList, target => Cmd.Parallel(
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
Cmd.After(0.2f, () => user.Attack(target, GetTargetedFinalDamage(target)))
|
||||
Cmd.After(0.2f, () => AttackTarget(target, GetTargetedFinalDamage(target)))
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
|
||||
return ForEachTarget(targetList, target => Cmd.Parallel(
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
Cmd.After(0.1f, () => user.Attack(target, GetTargetedFinalDamage(target)))
|
||||
Cmd.After(0.1f, () => AttackTarget(target, GetTargetedFinalDamage(target)))
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using Continentis.MainGame;
|
||||
using Continentis.MainGame.Card;
|
||||
using Continentis.MainGame.Character;
|
||||
using Continentis.MainGame.Commands;
|
||||
@@ -29,14 +30,14 @@ namespace Continentis.Mods.Basic.Cards
|
||||
LogicComponent<CardLogicComponent_Attack>().SetDamage_Arcane();
|
||||
}
|
||||
|
||||
public override int GetTargetedFinalDamage(CharacterBase target, List<string> elementalTags = null)
|
||||
public override int GetTargetedFinalDamage(CharacterBase target, AttackContext ctx = null)
|
||||
{
|
||||
float baseDamageFromSuppress = 0;
|
||||
|
||||
if (target is CombatNPC npc && user.IsOpponent(npc))
|
||||
baseDamageFromSuppress = npc.actionCountThisRound == 0 ? 4f : 0f;
|
||||
|
||||
base.GetFinalDamage(target, elementalTags, out float baseDamageAfterOffset, out float elementalAmplifier, out float magicAmplifier, out float finalAmplifier);
|
||||
base.GetFinalDamage(target, ctx, out float baseDamageAfterOffset, out float elementalAmplifier, out float magicAmplifier, out float finalAmplifier);
|
||||
|
||||
float finalDamage = (baseDamageAfterOffset + baseDamageFromSuppress) * elementalAmplifier * magicAmplifier * finalAmplifier;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user