AttackResult修改
This commit is contained in:
@@ -92,12 +92,13 @@ MonoBehaviour:
|
||||
hudDataIDList:
|
||||
- HUDData_Basic_Default
|
||||
localizationFiles:
|
||||
- {fileID: 4900000, guid: 9072c63645396754ab7c90a266d2e6f8, type: 3}
|
||||
- {fileID: 4900000, guid: b07b620f4c7256843b55609e43977ced, type: 3}
|
||||
- {fileID: 4900000, guid: 189619dba501d344ea1d0f59202d9e6d, type: 3}
|
||||
- {fileID: 4900000, guid: c3a2d38972f95ed41aa340ad6c5ca3b5, type: 3}
|
||||
- {fileID: 4900000, guid: dae5bc8e90366584ca78827dfe470a23, type: 3}
|
||||
- {fileID: 4900000, guid: 769aea741717c4a4bbf3c474056da92f, type: 3}
|
||||
- {fileID: 4900000, guid: e1ad01987651df444878ed7e1da1b9c8, type: 3}
|
||||
- {fileID: 4900000, guid: 5d66745b8665526429012762a60469bd, type: 3}
|
||||
- {fileID: 4900000, guid: b8e11e42fa0f82c41a2cb84cd79ccb79, type: 3}
|
||||
- {fileID: 4900000, guid: dae5bc8e90366584ca78827dfe470a23, type: 3}
|
||||
- {fileID: 4900000, guid: 9072c63645396754ab7c90a266d2e6f8, type: 3}
|
||||
- {fileID: 4900000, guid: 240d7d7c1050c1c498575d637265ab32, type: 3}
|
||||
- {fileID: 4900000, guid: 189619dba501d344ea1d0f59202d9e6d, type: 3}
|
||||
- {fileID: 4900000, guid: 769aea741717c4a4bbf3c474056da92f, type: 3}
|
||||
- {fileID: 4900000, guid: e1ad01987651df444878ed7e1da1b9c8, type: 3}
|
||||
|
||||
@@ -43,17 +43,13 @@ MonoBehaviour:
|
||||
index: 3
|
||||
isKeyDuplicated: 0
|
||||
- Key: BuffStack_WD
|
||||
Value: 1
|
||||
Value: 4
|
||||
index: 4
|
||||
isKeyDuplicated: 0
|
||||
- Key: DamageCount
|
||||
Value: 20
|
||||
index: 5
|
||||
isKeyDuplicated: 0
|
||||
- Key: BuffStack_Corrosion
|
||||
Value: 4
|
||||
index: 6
|
||||
isKeyDuplicated: 0
|
||||
dividerPosProp: 0.5
|
||||
originalAttributes:
|
||||
dictionaryList: []
|
||||
|
||||
@@ -54,5 +54,5 @@ MonoBehaviour:
|
||||
customDescriptions: []
|
||||
prefabRefs: []
|
||||
derivativeCardDataRefs:
|
||||
- CardData_Basic_Strike
|
||||
- CardData_Basic_Tactic
|
||||
derivativeCharacterDataRefs: []
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
CommandGroup mainGroup = TargetListCommandGroup(targetList,
|
||||
new Cmd_ParamFunction<CharacterBase>(0.05f, target =>
|
||||
{
|
||||
CreateCharacterBuff<Buffs.WoundDeterioration>(GetAttribute("BuffStack_WD")).Apply(target, user, this);
|
||||
CreateCharacterBuff<Buffs.WoundDeterioration>(GetAttribute("BuffStack_WD"), GetAttribute("DamageCount")).Apply(target, user, this);
|
||||
}));
|
||||
return new List<CommandBase> { mainGroup };
|
||||
}
|
||||
|
||||
@@ -20,8 +20,8 @@ namespace Continentis.Mods.Basic.Cards
|
||||
mainGroup.AddCommand(new Cmd_PlayAnimation(user.characterView, "Skill"));
|
||||
mainGroup.AddCommand(new Cmd_Function(() =>
|
||||
{
|
||||
CardData holyWaterCardData = GetDerivativeCardData(0);
|
||||
CardInstance.GenerateCardInstance(holyWaterCardData, user.team, "Hand");
|
||||
CardData tacticData = GetDerivativeCardData(0);
|
||||
CardInstance.GenerateCardInstance(tacticData, user.team, "Hand");
|
||||
}));
|
||||
|
||||
return new List<CommandBase> { mainGroup };
|
||||
|
||||
@@ -30,7 +30,10 @@ namespace Continentis.Mods.Basic.Cards
|
||||
}
|
||||
CommandGroup occupiedGroup = new CommandGroup(ExecutionMode.Sequential, new Cmd_Function(1, ()=>
|
||||
{
|
||||
Debug.Log("不插队指令,先于攻击触发,如果先执行抽牌说明插队成功");
|
||||
CommandQueueManager.Instance.AddCommand(new Cmd_Function(() =>
|
||||
{
|
||||
Debug.Log("插队指令,等待动画播放完毕");
|
||||
}), false);
|
||||
}));
|
||||
CommandGroup mainGroup = TargetListCommandGroup(targetList, ExecutionMode.Sequential, ExecutionMode.Sequential, templates.ToArray());
|
||||
CommandGroup finalGroup = new CommandGroup(ExecutionMode.Sequential, new Cmd_Function(()=>
|
||||
@@ -39,7 +42,7 @@ namespace Continentis.Mods.Basic.Cards
|
||||
}));
|
||||
CommandGroup firstGroup = new CommandGroup(ExecutionMode.Sequential, new Cmd_Function(()=>
|
||||
{
|
||||
Debug.Log("插队指令,先抽牌");
|
||||
Debug.Log("插队指令,抽牌");
|
||||
}), new Cmd_DrawCards(user.deckSubmodule, 1));
|
||||
firstGroup.insertAtFirst = true;
|
||||
|
||||
|
||||
@@ -16,8 +16,6 @@ namespace Continentis.Mods.Basic.Cards
|
||||
|
||||
protected override List<CommandBase> PlayEffect(List<CharacterBase> targetList)
|
||||
{
|
||||
base.PlayEffect(targetList);
|
||||
|
||||
CommandGroup mainGroup = TargetListCommandGroup(targetList,
|
||||
new Cmd_PlayAnimation(user.characterView, "Attack"),
|
||||
new Cmd_ParamFunction<CharacterBase>(target =>
|
||||
|
||||
@@ -1,18 +1,32 @@
|
||||
using Continentis.MainGame;
|
||||
using Continentis.MainGame.Character;
|
||||
using SLSFramework.General;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Continentis.Mods.Basic.Buffs
|
||||
{
|
||||
public class WoundDeterioration : CharacterCombatBuffBase
|
||||
{
|
||||
public WoundDeterioration(int stack)
|
||||
private int damageCount;
|
||||
|
||||
public WoundDeterioration(int stack, int damageCount)
|
||||
{
|
||||
Initialize(BuffType.Positive, BuffDispelLevel.Basic);
|
||||
this.damageCount = damageCount;
|
||||
this.contentSubmodule = new ContentSubmodule(this)
|
||||
.AddParameterGetter("Stack", () => unitedStackSubmodule.stackAmount.ToString());
|
||||
.AddParameterGetter("Stack", () => unitedStackSubmodule.stackAmount.ToString())
|
||||
.AddParameterGetter("DamageCount", damageCount.ToString);
|
||||
|
||||
this.iconSubmodule = new IconSubmodule(this);
|
||||
this.unitedStackSubmodule = new UnitedStackSubmodule(this, stack);
|
||||
this.eventSubmodule = new EventSubmodule(this);
|
||||
this.eventSubmodule.onDealAttack.Add("WoundDeterioration", new PrioritizedAction<AttackResult>(atkRes =>
|
||||
{
|
||||
if (atkRes.hurtDamage >= 20)
|
||||
{
|
||||
CreateCharacterBuff<Corrosion>(this.unitedStackSubmodule.stackAmount).Apply(atkRes.target, atkRes.attacker);
|
||||
}
|
||||
}));
|
||||
//TODO: When character damage exceed 20, apply corrision
|
||||
//this.attachedCharacter.eventSubmodule.onFinishAttack.Add;
|
||||
}
|
||||
@@ -23,8 +37,10 @@ namespace Continentis.Mods.Basic.Buffs
|
||||
|
||||
if (FindExistingSameBuff(out existingBuff))
|
||||
{
|
||||
WoundDeterioration existing = existingBuff as WoundDeterioration;
|
||||
|
||||
existingBuff.unitedStackSubmodule.PickHigherStack(this.unitedStackSubmodule);
|
||||
existingBuff.actionCountSubmodule.PickHigherCount(this.actionCountSubmodule);
|
||||
existing!.damageCount = Mathf.Min(existing.damageCount, this.damageCount);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace Continentis.Mods.Basic.Buffs
|
||||
private void OnGetAttacked(AttackResult result)
|
||||
{
|
||||
int stackAmount = unitedStackSubmodule.stackAmount;
|
||||
result.attacker.Attack(attachedCharacter, stackAmount, false, true);
|
||||
result.attacker.Attack(attachedCharacter, stackAmount, null, false, true);
|
||||
}
|
||||
|
||||
private void OnActionStart()
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace Continentis.Mods.Basic.Buffs
|
||||
|
||||
private void OnAfterPlayCard(CardInstance card, List<CharacterBase> targets)
|
||||
{
|
||||
sourceCharacter.Attack(attachedCharacter, unitedStackSubmodule.stackAmount, false, true);
|
||||
sourceCharacter.Attack(attachedCharacter, unitedStackSubmodule.stackAmount, null, false, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -38,7 +38,7 @@ namespace Continentis.Mods.Basic.Buffs
|
||||
|
||||
private void OnActionStart()
|
||||
{
|
||||
sourceCharacter.Attack(attachedCharacter, unitedStackSubmodule.stackAmount, false, true);
|
||||
sourceCharacter.Attack(attachedCharacter, unitedStackSubmodule.stackAmount, null, false, true);
|
||||
unitedStackSubmodule.ReduceStack(1);
|
||||
iconSubmodule.Update();
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace Continentis.Mods.Basic.Buffs
|
||||
this.eventSubmodule = new EventSubmodule(this);
|
||||
this.eventSubmodule.onGetAttacked.Add("EstablishFormation", new PrioritizedAction<AttackResult>(atkResult =>
|
||||
{
|
||||
attachedCharacter.Attack(atkResult.attacker, unitedStackSubmodule.stackAmount, false, true);
|
||||
attachedCharacter.Attack(atkResult.attacker, unitedStackSubmodule.stackAmount, null, false, true);
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace Continentis.Mods.Basic.Buffs
|
||||
private void OnAfterPlayCard(CardInstance card, List<CharacterBase> targets)
|
||||
{
|
||||
int reducedStack = Mathf.Max(1, Mathf.FloorToInt(unitedStackSubmodule.stackAmount * 0.2f));
|
||||
sourceCharacter.Attack(attachedCharacter, reducedStack, true);
|
||||
sourceCharacter.Attack(attachedCharacter, reducedStack, null, true);
|
||||
unitedStackSubmodule.ReduceStack(reducedStack);
|
||||
iconSubmodule.Update();
|
||||
}
|
||||
|
||||
@@ -206,5 +206,6 @@ MonoBehaviour:
|
||||
- CardData_Basic_Torture
|
||||
- CardData_Basic_CompoundPosion
|
||||
- CardData_Basic_WoundDeterioration
|
||||
- CardData_Basic_DivineSmite
|
||||
hudDataRefs:
|
||||
- HUDData_Basic_Default
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 520 KiB |
@@ -0,0 +1,119 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ad17795194f70134c997e767d8f2f45a
|
||||
labels:
|
||||
- UnityAI
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 13
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 1024
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 4
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 256
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 4
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
customData:
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
spriteCustomMetadata:
|
||||
entries: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user