英雄升级系统
This commit is contained in:
parent
58e9369a9a
commit
f72d3063fb
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
@ -0,0 +1,114 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d5a27efad4939cd45a0827dca57e6400
|
||||
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: 100
|
||||
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: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
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: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1128,7 +1128,7 @@ MonoBehaviour:
|
||||
SkillType: 0
|
||||
TechType: 0
|
||||
ActionName: "\u5EFA\u9020\u82F1\u96C4\u795E\u50CF[\u9A6C]"
|
||||
Desc: "\u5728\u6CA1\u6709\u68EE\u6797\u7684<color=yellow>\u5E73\u539F</color>\u4E0A\u5EFA\u9020<color=yellow>\u82F1\u96C4\u795E\u50CF[\u9A6C]</color>\uFF0C\u968F\u56DE\u5408\u589E\u957F\u63D0\u5347\u7B49\u7EA7\u3002\u6BCF\u4E2A\u795E\u50CF\u63D0\u4F9B\u989D\u59161\u6B21<color=yellow>\u82F1\u96C4[\u9A6C]</color>\u590D\u6D3B\u673A\u4F1A\u3002"
|
||||
Desc: "\u5728<color=yellow>\u5E73\u539F</color>\u4E0A\u5EFA\u9020<color=yellow>\u82F1\u96C4\u795E\u50CF[\u8F66]</color>\u3002\u6839\u636E\u5EFA\u7B51\u7B49\u7EA7\u6BCF\u56DE\u5408\u63D0\u4F9B\u5BF9\u5E94\u82F1\u96C4\u7684\u7ECF\u9A8C\u70B9\u3002\u6BCF\u5EA7\u57CE\u5E02\u4EC5\u80FD\u62E5\u6709\u4E00\u5EA7\u795E\u50CF\u3002"
|
||||
NeedTechDesc: 0
|
||||
TechDesc:
|
||||
NeedLockDesc: 0
|
||||
@ -1193,7 +1193,7 @@ MonoBehaviour:
|
||||
SkillType: 0
|
||||
TechType: 0
|
||||
ActionName: "\u5EFA\u9020\u82F1\u96C4\u795E\u50CF[\u540E]"
|
||||
Desc: "\u5728<color=yellow>\u68EE\u6797</color>\u4E0A\u5EFA\u9020<color=yellow>\u82F1\u96C4\u795E\u50CF[\u540E]</color>\uFF0C\u968F\u56DE\u5408\u589E\u957F\u63D0\u5347\u7B49\u7EA7\u3002\u6BCF\u4E2A\u795E\u50CF\u63D0\u4F9B\u989D\u59161\u6B21<color=yellow>\u82F1\u96C4[\u540E]</color>\u590D\u6D3B\u673A\u4F1A\u3002"
|
||||
Desc: "\u5728<color=yellow>\u68EE\u6797</color>\u4E0A\u5EFA\u9020<color=yellow>\u82F1\u96C4\u795E\u50CF[\u8F66]</color>\u3002\u6839\u636E\u5EFA\u7B51\u7B49\u7EA7\u6BCF\u56DE\u5408\u63D0\u4F9B\u5BF9\u5E94\u82F1\u96C4\u7684\u7ECF\u9A8C\u70B9\u3002\u6BCF\u5EA7\u57CE\u5E02\u4EC5\u80FD\u62E5\u6709\u4E00\u5EA7\u795E\u50CF\u3002"
|
||||
NeedTechDesc: 0
|
||||
TechDesc:
|
||||
NeedLockDesc: 0
|
||||
@ -1258,7 +1258,7 @@ MonoBehaviour:
|
||||
SkillType: 0
|
||||
TechType: 0
|
||||
ActionName: "\u5EFA\u9020\u82F1\u96C4\u795E\u50CF[\u8F66]"
|
||||
Desc: "\u5728<color=yellow>\u5C71\u8109</color>\u4E0A\u5EFA\u9020<color=yellow>\u82F1\u96C4\u795E\u50CF[\u8F66]</color>\uFF0C\u968F\u56DE\u5408\u589E\u957F\u63D0\u5347\u7B49\u7EA7\u3002\u6BCF\u4E2A\u795E\u50CF\u63D0\u4F9B\u989D\u59161\u6B21<color=yellow>\u82F1\u96C4[\u8F66]</color>\u590D\u6D3B\u673A\u4F1A\u3002"
|
||||
Desc: "\u5728<color=yellow>\u5C71\u8109</color>\u4E0A\u5EFA\u9020<color=yellow>\u82F1\u96C4\u795E\u50CF[\u8F66]</color>\u3002\u6839\u636E\u5EFA\u7B51\u7B49\u7EA7\u6BCF\u56DE\u5408\u63D0\u4F9B\u5BF9\u5E94\u82F1\u96C4\u7684\u7ECF\u9A8C\u70B9\u3002\u6BCF\u5EA7\u57CE\u5E02\u4EC5\u80FD\u62E5\u6709\u4E00\u5EA7\u795E\u50CF\u3002"
|
||||
NeedTechDesc: 0
|
||||
TechDesc:
|
||||
NeedLockDesc: 0
|
||||
@ -1323,12 +1323,12 @@ MonoBehaviour:
|
||||
SkillType: 0
|
||||
TechType: 0
|
||||
ActionName: "\u5EFA\u9020\u82F1\u96C4\u795E\u50CF[\u76F8]"
|
||||
Desc: "\u5728<color=yellow>\u6D77\u6D0B</color>\u5EFA\u9020<color=yellow>\u82F1\u96C4\u795E\u50CF[\u76F8]</color>\uFF0C\u968F\u56DE\u5408\u589E\u957F\u63D0\u5347\u7B49\u7EA7\u3002\u6BCF\u4E2A\u795E\u50CF\u63D0\u4F9B\u989D\u59161\u6B21<color=yellow>\u82F1\u96C4[\u76F8]</color>\u590D\u6D3B\u673A\u4F1A\u3002"
|
||||
Desc: "\u5728<color=yellow>\u6D77\u6D0B</color>\u4E0A\u5EFA\u9020<color=yellow>\u82F1\u96C4\u795E\u50CF[\u8F66]</color>\u3002\u6839\u636E\u5EFA\u7B51\u7B49\u7EA7\u6BCF\u56DE\u5408\u63D0\u4F9B\u5BF9\u5E94\u82F1\u96C4\u7684\u7ECF\u9A8C\u70B9\u3002\u6BCF\u5EA7\u57CE\u5E02\u4EC5\u80FD\u62E5\u6709\u4E00\u5EA7\u795E\u50CF\u3002"
|
||||
NeedTechDesc: 0
|
||||
TechDesc:
|
||||
NeedLockDesc: 0
|
||||
LockDesc:
|
||||
Icon: {fileID: 21300000, guid: 50fa0b7a0cca4b84da0103b9aae16035, type: 3}
|
||||
Icon: {fileID: 21300000, guid: 99dd94d608de75e4fbc5a5bf6d268951, type: 3}
|
||||
VarientIcon: 1
|
||||
IconList:
|
||||
- IgnoreCivId: 0
|
||||
@ -1367,7 +1367,72 @@ MonoBehaviour:
|
||||
Name:
|
||||
HasLevel: 0
|
||||
LevelSprite: []
|
||||
Cost: 20
|
||||
Cost: 10
|
||||
CityExp: 1
|
||||
NoNeedTech: 0
|
||||
SpriteSize: {x: 0, y: 0}
|
||||
SpritePos: {x: 0, y: 0}
|
||||
- ActionId:
|
||||
ActionType: 1
|
||||
WonderType: 0
|
||||
ResourceType: 28
|
||||
FeatureType: 0
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
GridMiscActionType: 0
|
||||
SkillType: 0
|
||||
TechType: 0
|
||||
ActionName: "\u5EFA\u9020\u82F1\u96C4\u795E\u50CF[\u738B]"
|
||||
Desc: "\u5728<color=yellow>\u5E73\u539F</color>\u4E0A\u5EFA\u9020<color=yellow>\u82F1\u96C4\u795E\u50CF[\u8F66]</color>\u3002\u6839\u636E\u5EFA\u7B51\u7B49\u7EA7\u6BCF\u56DE\u5408\u63D0\u4F9B\u5BF9\u5E94\u82F1\u96C4\u7684\u7ECF\u9A8C\u70B9\u3002\u6BCF\u5EA7\u57CE\u5E02\u4EC5\u80FD\u62E5\u6709\u4E00\u5EA7\u795E\u50CF\u3002"
|
||||
NeedTechDesc: 0
|
||||
TechDesc:
|
||||
NeedLockDesc: 0
|
||||
LockDesc:
|
||||
Icon: {fileID: 21300000, guid: abeaa360cf7cd6e48a135f3bde446d83, type: 3}
|
||||
VarientIcon: 1
|
||||
IconList:
|
||||
- IgnoreCivId: 0
|
||||
IgnoreForceId: 0
|
||||
CivId: 0
|
||||
ForceId: 0
|
||||
Sprite: {fileID: 21300000, guid: c366b4bba8a7e254998ce0b49f0ab7d2, type: 3}
|
||||
SpriteGlow: {fileID: 0}
|
||||
Name:
|
||||
HasLevel: 0
|
||||
LevelSprite: []
|
||||
- IgnoreCivId: 0
|
||||
IgnoreForceId: 0
|
||||
CivId: 0
|
||||
ForceId: 0
|
||||
Sprite: {fileID: 21300000, guid: c366b4bba8a7e254998ce0b49f0ab7d2, type: 3}
|
||||
SpriteGlow: {fileID: 0}
|
||||
Name:
|
||||
HasLevel: 0
|
||||
LevelSprite: []
|
||||
- IgnoreCivId: 0
|
||||
IgnoreForceId: 0
|
||||
CivId: 0
|
||||
ForceId: 0
|
||||
Sprite: {fileID: 21300000, guid: c366b4bba8a7e254998ce0b49f0ab7d2, type: 3}
|
||||
SpriteGlow: {fileID: 0}
|
||||
Name:
|
||||
HasLevel: 0
|
||||
LevelSprite: []
|
||||
- IgnoreCivId: 0
|
||||
IgnoreForceId: 0
|
||||
CivId: 0
|
||||
ForceId: 0
|
||||
Sprite: {fileID: 21300000, guid: c366b4bba8a7e254998ce0b49f0ab7d2, type: 3}
|
||||
SpriteGlow: {fileID: 0}
|
||||
Name:
|
||||
HasLevel: 0
|
||||
LevelSprite: []
|
||||
Cost: 10
|
||||
CityExp: 1
|
||||
NoNeedTech: 0
|
||||
SpriteSize: {x: 0, y: 0}
|
||||
|
||||
@ -256,7 +256,7 @@ MonoBehaviour:
|
||||
- Resource: 19
|
||||
Sprite: {fileID: 21300000, guid: 6f4a07570c3b81447b644fcd70ac932e, type: 3}
|
||||
ResourceName: "\u82F1\u96C4\u795E\u50CF[\u9A6C]{param}"
|
||||
ResourceDesc: "\u6BCF\u56DE\u5408\u63D0\u4F9B\u5BF9\u5E94\u82F1\u96C4\u7684\u7ECF\u9A8C\u70B9\u3002\u6BCF\u5EA7\u57CE\u5E02\u53EA\u80FD\u62E5\u6709\u4E00\u5EA7\u795E\u50CF\u3002"
|
||||
ResourceDesc: "\u53EA\u80FD\u5728<color=yellow>\u5E73\u539F</color>\u4E0A\u5EFA\u9020\u3002\u6839\u636E\u5EFA\u7B51\u7B49\u7EA7\u6BCF\u56DE\u5408\u63D0\u4F9B\u5BF9\u5E94\u82F1\u96C4\u7684\u7ECF\u9A8C\u70B9\u3002\u6BCF\u5EA7\u57CE\u5E02\u4EC5\u80FD\u62E5\u6709\u4E00\u5EA7\u795E\u50CF\u3002"
|
||||
Exp: 1
|
||||
ChessType: 4
|
||||
CivIdForceIdNotFromPlayer: 0
|
||||
@ -390,7 +390,7 @@ MonoBehaviour:
|
||||
- Resource: 20
|
||||
Sprite: {fileID: 21300000, guid: e9c2cca80ae3d074297e9c86f8a4f06c, type: 3}
|
||||
ResourceName: "\u82F1\u96C4\u795E\u50CF[\u540E]{param}"
|
||||
ResourceDesc: "\u6BCF\u56DE\u5408\u63D0\u4F9B\u5BF9\u5E94\u82F1\u96C4\u7684\u7ECF\u9A8C\u70B9\u3002\u6BCF\u5EA7\u57CE\u5E02\u53EA\u80FD\u62E5\u6709\u4E00\u5EA7\u795E\u50CF\u3002"
|
||||
ResourceDesc: "\u53EA\u80FD\u5728<color=yellow>\u68EE\u6797</color>\u4E0A\u5EFA\u9020\u3002\u6839\u636E\u5EFA\u7B51\u7B49\u7EA7\u6BCF\u56DE\u5408\u63D0\u4F9B\u5BF9\u5E94\u82F1\u96C4\u7684\u7ECF\u9A8C\u70B9\u3002\u6BCF\u5EA7\u57CE\u5E02\u4EC5\u80FD\u62E5\u6709\u4E00\u5EA7\u795E\u50CF\u3002"
|
||||
Exp: 1
|
||||
ChessType: 2
|
||||
CivIdForceIdNotFromPlayer: 0
|
||||
@ -524,7 +524,7 @@ MonoBehaviour:
|
||||
- Resource: 21
|
||||
Sprite: {fileID: 21300000, guid: f331bd3bf4f6da14eb9c197b9b15cb72, type: 3}
|
||||
ResourceName: "\u82F1\u96C4\u795E\u50CF[\u8F66]{param}"
|
||||
ResourceDesc: "\u6BCF\u56DE\u5408\u63D0\u4F9B\u5BF9\u5E94\u82F1\u96C4\u7684\u7ECF\u9A8C\u70B9\u3002\u6BCF\u5EA7\u57CE\u5E02\u53EA\u80FD\u62E5\u6709\u4E00\u5EA7\u795E\u50CF\u3002"
|
||||
ResourceDesc: "\u53EA\u80FD\u5728<color=yellow>\u5C71\u8109</color>\u4E0A\u5EFA\u9020\u3002\u6839\u636E\u5EFA\u7B51\u7B49\u7EA7\u6BCF\u56DE\u5408\u63D0\u4F9B\u5BF9\u5E94\u82F1\u96C4\u7684\u7ECF\u9A8C\u70B9\u3002\u6BCF\u5EA7\u57CE\u5E02\u4EC5\u80FD\u62E5\u6709\u4E00\u5EA7\u795E\u50CF\u3002"
|
||||
Exp: 1
|
||||
ChessType: 5
|
||||
CivIdForceIdNotFromPlayer: 0
|
||||
@ -658,7 +658,7 @@ MonoBehaviour:
|
||||
- Resource: 22
|
||||
Sprite: {fileID: 21300000, guid: 99dd94d608de75e4fbc5a5bf6d268951, type: 3}
|
||||
ResourceName: "\u82F1\u96C4\u795E\u50CF[\u76F8]{param}"
|
||||
ResourceDesc: "\u6BCF\u56DE\u5408\u63D0\u4F9B\u5BF9\u5E94\u82F1\u96C4\u7684\u7ECF\u9A8C\u70B9\u3002\u6BCF\u5EA7\u57CE\u5E02\u53EA\u80FD\u62E5\u6709\u4E00\u5EA7\u795E\u50CF\u3002"
|
||||
ResourceDesc: "\u53EA\u80FD\u5728<color=yellow>\u6D77\u6D0B</color>\u4E0A\u5EFA\u9020\u3002\u6839\u636E\u5EFA\u7B51\u7B49\u7EA7\u6BCF\u56DE\u5408\u63D0\u4F9B\u5BF9\u5E94\u82F1\u96C4\u7684\u7ECF\u9A8C\u70B9\u3002\u6BCF\u5EA7\u57CE\u5E02\u4EC5\u80FD\u62E5\u6709\u4E00\u5EA7\u795E\u50CF\u3002"
|
||||
Exp: 1
|
||||
ChessType: 3
|
||||
CivIdForceIdNotFromPlayer: 0
|
||||
@ -1132,7 +1132,7 @@ MonoBehaviour:
|
||||
- Resource: 28
|
||||
Sprite: {fileID: 21300000, guid: 20212381332c7a74ebcc703dd24b3a11, type: 3}
|
||||
ResourceName: "\u82F1\u96C4\u795E\u50CF[\u738B]{param}"
|
||||
ResourceDesc: "\u6BCF\u56DE\u5408\u63D0\u4F9B\u5BF9\u5E94\u82F1\u96C4\u7684\u7ECF\u9A8C\u70B9\u3002\u6BCF\u5EA7\u57CE\u5E02\u53EA\u80FD\u62E5\u6709\u4E00\u5EA7\u795E\u50CF\u3002"
|
||||
ResourceDesc: "\u53EA\u80FD\u5728<color=yellow>\u5E73\u539F</color>\u4E0A\u5EFA\u9020\u3002\u6839\u636E\u5EFA\u7B51\u7B49\u7EA7\u6BCF\u56DE\u5408\u63D0\u4F9B\u5BF9\u5E94\u82F1\u96C4\u7684\u7ECF\u9A8C\u70B9\u3002\u6BCF\u5EA7\u57CE\u5E02\u4EC5\u80FD\u62E5\u6709\u4E00\u5EA7\u795E\u50CF\u3002"
|
||||
Exp: 1
|
||||
ChessType: 1
|
||||
CivIdForceIdNotFromPlayer: 0
|
||||
|
||||
@ -29,6 +29,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 1
|
||||
CityLevelUpActionType: 0
|
||||
@ -42,6 +43,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 2
|
||||
CityLevelUpActionType: 0
|
||||
@ -55,6 +57,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 4
|
||||
CityLevelUpActionType: 0
|
||||
@ -68,6 +71,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 6
|
||||
CityLevelUpActionType: 0
|
||||
@ -81,6 +85,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 1
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -94,6 +99,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -107,6 +113,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -120,6 +127,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -133,6 +141,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -146,6 +155,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -159,6 +169,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -172,6 +183,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -194,6 +206,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -207,6 +220,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -229,6 +243,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -242,6 +257,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -264,6 +280,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -286,6 +303,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -299,6 +317,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -321,6 +340,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 7
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -334,6 +354,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -356,6 +377,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 14
|
||||
GiantType: 4
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -369,6 +391,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -391,6 +414,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -413,6 +437,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 4
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -435,6 +460,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -457,6 +483,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -479,6 +506,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -492,6 +520,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -514,6 +543,21 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 14
|
||||
GiantType: 2
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
GridMiscActionType: 0
|
||||
SkillType: 0
|
||||
TechType: 0
|
||||
- ActionType: 1
|
||||
WonderType: 0
|
||||
ResourceType: 28
|
||||
FeatureType: 0
|
||||
TerrainType: 0
|
||||
UnitType: 14
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -536,6 +580,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 2
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -558,6 +603,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -571,6 +617,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 7
|
||||
CityLevelUpActionType: 0
|
||||
@ -593,6 +640,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -606,6 +654,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -619,6 +668,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -641,6 +691,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 5
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -654,6 +705,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -676,6 +728,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -698,6 +751,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 14
|
||||
GiantType: 1
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -711,6 +765,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -733,6 +788,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -755,6 +811,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -768,6 +825,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -790,6 +848,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 3
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -803,6 +862,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -825,6 +885,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 6
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -838,6 +899,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -860,6 +922,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -873,6 +936,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -895,6 +959,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 14
|
||||
GiantType: 5
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -908,6 +973,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -930,6 +996,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -943,6 +1010,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -956,6 +1024,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -978,6 +1047,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -991,6 +1061,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 12
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -1013,6 +1084,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 11
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -1026,6 +1098,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -1048,6 +1121,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -1061,6 +1135,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -1083,6 +1158,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 13
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -1096,6 +1172,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 5
|
||||
CityLevelUpActionType: 0
|
||||
@ -1118,6 +1195,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 14
|
||||
GiantType: 3
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
@ -1131,6 +1209,7 @@ MonoBehaviour:
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
|
||||
@ -1128,7 +1128,7 @@ MonoBehaviour:
|
||||
SkillType: 0
|
||||
TechType: 0
|
||||
ActionName: 1186
|
||||
Desc: 1237
|
||||
Desc: 1483
|
||||
NeedTechDesc: 0
|
||||
TechDesc:
|
||||
NeedLockDesc: 0
|
||||
@ -1193,7 +1193,7 @@ MonoBehaviour:
|
||||
SkillType: 0
|
||||
TechType: 0
|
||||
ActionName: 1188
|
||||
Desc: 1238
|
||||
Desc: 1484
|
||||
NeedTechDesc: 0
|
||||
TechDesc:
|
||||
NeedLockDesc: 0
|
||||
@ -1258,7 +1258,7 @@ MonoBehaviour:
|
||||
SkillType: 0
|
||||
TechType: 0
|
||||
ActionName: 1190
|
||||
Desc: 1239
|
||||
Desc: 1485
|
||||
NeedTechDesc: 0
|
||||
TechDesc:
|
||||
NeedLockDesc: 0
|
||||
@ -1323,12 +1323,12 @@ MonoBehaviour:
|
||||
SkillType: 0
|
||||
TechType: 0
|
||||
ActionName: 1192
|
||||
Desc: 1240
|
||||
Desc: 1486
|
||||
NeedTechDesc: 0
|
||||
TechDesc:
|
||||
NeedLockDesc: 0
|
||||
LockDesc:
|
||||
Icon: {fileID: 21300000, guid: 50fa0b7a0cca4b84da0103b9aae16035, type: 3}
|
||||
Icon: {fileID: 21300000, guid: 99dd94d608de75e4fbc5a5bf6d268951, type: 3}
|
||||
VarientIcon: 1
|
||||
IconList:
|
||||
- IgnoreCivId: 0
|
||||
@ -1367,7 +1367,72 @@ MonoBehaviour:
|
||||
Name:
|
||||
HasLevel: 0
|
||||
LevelSprite: []
|
||||
Cost: 20
|
||||
Cost: 10
|
||||
CityExp: 1
|
||||
NoNeedTech: 0
|
||||
SpriteSize: {x: 0, y: 0}
|
||||
SpritePos: {x: 0, y: 0}
|
||||
- ActionId:
|
||||
ActionType: 1
|
||||
WonderType: 0
|
||||
ResourceType: 28
|
||||
FeatureType: 0
|
||||
TerrainType: 0
|
||||
UnitType: 0
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
GridMiscActionType: 0
|
||||
SkillType: 0
|
||||
TechType: 0
|
||||
ActionName: 1487
|
||||
Desc: 1483
|
||||
NeedTechDesc: 0
|
||||
TechDesc:
|
||||
NeedLockDesc: 0
|
||||
LockDesc:
|
||||
Icon: {fileID: 21300000, guid: abeaa360cf7cd6e48a135f3bde446d83, type: 3}
|
||||
VarientIcon: 1
|
||||
IconList:
|
||||
- IgnoreCivId: 0
|
||||
IgnoreForceId: 0
|
||||
CivId: 0
|
||||
ForceId: 0
|
||||
Sprite: {fileID: 21300000, guid: c366b4bba8a7e254998ce0b49f0ab7d2, type: 3}
|
||||
SpriteGlow: {fileID: 0}
|
||||
Name:
|
||||
HasLevel: 0
|
||||
LevelSprite: []
|
||||
- IgnoreCivId: 0
|
||||
IgnoreForceId: 0
|
||||
CivId: 0
|
||||
ForceId: 0
|
||||
Sprite: {fileID: 21300000, guid: c366b4bba8a7e254998ce0b49f0ab7d2, type: 3}
|
||||
SpriteGlow: {fileID: 0}
|
||||
Name:
|
||||
HasLevel: 0
|
||||
LevelSprite: []
|
||||
- IgnoreCivId: 0
|
||||
IgnoreForceId: 0
|
||||
CivId: 0
|
||||
ForceId: 0
|
||||
Sprite: {fileID: 21300000, guid: c366b4bba8a7e254998ce0b49f0ab7d2, type: 3}
|
||||
SpriteGlow: {fileID: 0}
|
||||
Name:
|
||||
HasLevel: 0
|
||||
LevelSprite: []
|
||||
- IgnoreCivId: 0
|
||||
IgnoreForceId: 0
|
||||
CivId: 0
|
||||
ForceId: 0
|
||||
Sprite: {fileID: 21300000, guid: c366b4bba8a7e254998ce0b49f0ab7d2, type: 3}
|
||||
SpriteGlow: {fileID: 0}
|
||||
Name:
|
||||
HasLevel: 0
|
||||
LevelSprite: []
|
||||
Cost: 10
|
||||
CityExp: 1
|
||||
NoNeedTech: 0
|
||||
SpriteSize: {x: 0, y: 0}
|
||||
|
||||
@ -256,7 +256,7 @@ MonoBehaviour:
|
||||
- Resource: 19
|
||||
Sprite: {fileID: 21300000, guid: 6f4a07570c3b81447b644fcd70ac932e, type: 3}
|
||||
ResourceName: 1442
|
||||
ResourceDesc: 1477
|
||||
ResourceDesc: 1488
|
||||
Exp: 1
|
||||
ChessType: 4
|
||||
CivIdForceIdNotFromPlayer: 0
|
||||
@ -390,7 +390,7 @@ MonoBehaviour:
|
||||
- Resource: 20
|
||||
Sprite: {fileID: 21300000, guid: e9c2cca80ae3d074297e9c86f8a4f06c, type: 3}
|
||||
ResourceName: 1443
|
||||
ResourceDesc: 1477
|
||||
ResourceDesc: 1489
|
||||
Exp: 1
|
||||
ChessType: 2
|
||||
CivIdForceIdNotFromPlayer: 0
|
||||
@ -524,7 +524,7 @@ MonoBehaviour:
|
||||
- Resource: 21
|
||||
Sprite: {fileID: 21300000, guid: f331bd3bf4f6da14eb9c197b9b15cb72, type: 3}
|
||||
ResourceName: 1444
|
||||
ResourceDesc: 1477
|
||||
ResourceDesc: 1490
|
||||
Exp: 1
|
||||
ChessType: 5
|
||||
CivIdForceIdNotFromPlayer: 0
|
||||
@ -658,7 +658,7 @@ MonoBehaviour:
|
||||
- Resource: 22
|
||||
Sprite: {fileID: 21300000, guid: 99dd94d608de75e4fbc5a5bf6d268951, type: 3}
|
||||
ResourceName: 1445
|
||||
ResourceDesc: 1477
|
||||
ResourceDesc: 1491
|
||||
Exp: 1
|
||||
ChessType: 3
|
||||
CivIdForceIdNotFromPlayer: 0
|
||||
@ -1132,7 +1132,7 @@ MonoBehaviour:
|
||||
- Resource: 28
|
||||
Sprite: {fileID: 21300000, guid: 20212381332c7a74ebcc703dd24b3a11, type: 3}
|
||||
ResourceName: 1478
|
||||
ResourceDesc: 1477
|
||||
ResourceDesc: 1488
|
||||
Exp: 1
|
||||
ChessType: 1
|
||||
CivIdForceIdNotFromPlayer: 0
|
||||
|
||||
@ -9350,4 +9350,70 @@ MonoBehaviour:
|
||||
EN:
|
||||
JP:
|
||||
KR:
|
||||
- ID: 1482
|
||||
ZH: "\u82F1\u96C4\u795E\u50CF[\u738B]"
|
||||
TDZH:
|
||||
EN:
|
||||
JP:
|
||||
KR:
|
||||
- ID: 1483
|
||||
ZH: "\u5728<color=yellow>\u5E73\u539F</color>\u4E0A\u5EFA\u9020<color=yellow>\u82F1\u96C4\u795E\u50CF[\u8F66]</color>\u3002\u6839\u636E\u5EFA\u7B51\u7B49\u7EA7\u6BCF\u56DE\u5408\u63D0\u4F9B\u5BF9\u5E94\u82F1\u96C4\u7684\u7ECF\u9A8C\u70B9\u3002\u6BCF\u5EA7\u57CE\u5E02\u4EC5\u80FD\u62E5\u6709\u4E00\u5EA7\u795E\u50CF\u3002"
|
||||
TDZH:
|
||||
EN:
|
||||
JP:
|
||||
KR:
|
||||
- ID: 1484
|
||||
ZH: "\u5728<color=yellow>\u68EE\u6797</color>\u4E0A\u5EFA\u9020<color=yellow>\u82F1\u96C4\u795E\u50CF[\u8F66]</color>\u3002\u6839\u636E\u5EFA\u7B51\u7B49\u7EA7\u6BCF\u56DE\u5408\u63D0\u4F9B\u5BF9\u5E94\u82F1\u96C4\u7684\u7ECF\u9A8C\u70B9\u3002\u6BCF\u5EA7\u57CE\u5E02\u4EC5\u80FD\u62E5\u6709\u4E00\u5EA7\u795E\u50CF\u3002"
|
||||
TDZH:
|
||||
EN:
|
||||
JP:
|
||||
KR:
|
||||
- ID: 1485
|
||||
ZH: "\u5728<color=yellow>\u5C71\u8109</color>\u4E0A\u5EFA\u9020<color=yellow>\u82F1\u96C4\u795E\u50CF[\u8F66]</color>\u3002\u6839\u636E\u5EFA\u7B51\u7B49\u7EA7\u6BCF\u56DE\u5408\u63D0\u4F9B\u5BF9\u5E94\u82F1\u96C4\u7684\u7ECF\u9A8C\u70B9\u3002\u6BCF\u5EA7\u57CE\u5E02\u4EC5\u80FD\u62E5\u6709\u4E00\u5EA7\u795E\u50CF\u3002"
|
||||
TDZH:
|
||||
EN:
|
||||
JP:
|
||||
KR:
|
||||
- ID: 1486
|
||||
ZH: "\u5728<color=yellow>\u6D77\u6D0B</color>\u4E0A\u5EFA\u9020<color=yellow>\u82F1\u96C4\u795E\u50CF[\u8F66]</color>\u3002\u6839\u636E\u5EFA\u7B51\u7B49\u7EA7\u6BCF\u56DE\u5408\u63D0\u4F9B\u5BF9\u5E94\u82F1\u96C4\u7684\u7ECF\u9A8C\u70B9\u3002\u6BCF\u5EA7\u57CE\u5E02\u4EC5\u80FD\u62E5\u6709\u4E00\u5EA7\u795E\u50CF\u3002"
|
||||
TDZH:
|
||||
EN:
|
||||
JP:
|
||||
KR:
|
||||
- ID: 1487
|
||||
ZH: "\u5EFA\u9020\u82F1\u96C4\u795E\u50CF[\u738B]"
|
||||
TDZH:
|
||||
EN:
|
||||
JP:
|
||||
KR:
|
||||
- ID: 1488
|
||||
ZH: "\u53EA\u80FD\u5728<color=yellow>\u5E73\u539F</color>\u4E0A\u5EFA\u9020\u3002\u6839\u636E\u5EFA\u7B51\u7B49\u7EA7\u6BCF\u56DE\u5408\u63D0\u4F9B\u5BF9\u5E94\u82F1\u96C4\u7684\u7ECF\u9A8C\u70B9\u3002\u6BCF\u5EA7\u57CE\u5E02\u4EC5\u80FD\u62E5\u6709\u4E00\u5EA7\u795E\u50CF\u3002"
|
||||
TDZH:
|
||||
EN:
|
||||
JP:
|
||||
KR:
|
||||
- ID: 1489
|
||||
ZH: "\u53EA\u80FD\u5728<color=yellow>\u68EE\u6797</color>\u4E0A\u5EFA\u9020\u3002\u6839\u636E\u5EFA\u7B51\u7B49\u7EA7\u6BCF\u56DE\u5408\u63D0\u4F9B\u5BF9\u5E94\u82F1\u96C4\u7684\u7ECF\u9A8C\u70B9\u3002\u6BCF\u5EA7\u57CE\u5E02\u4EC5\u80FD\u62E5\u6709\u4E00\u5EA7\u795E\u50CF\u3002"
|
||||
TDZH:
|
||||
EN:
|
||||
JP:
|
||||
KR:
|
||||
- ID: 1490
|
||||
ZH: "\u53EA\u80FD\u5728<color=yellow>\u5C71\u8109</color>\u4E0A\u5EFA\u9020\u3002\u6839\u636E\u5EFA\u7B51\u7B49\u7EA7\u6BCF\u56DE\u5408\u63D0\u4F9B\u5BF9\u5E94\u82F1\u96C4\u7684\u7ECF\u9A8C\u70B9\u3002\u6BCF\u5EA7\u57CE\u5E02\u4EC5\u80FD\u62E5\u6709\u4E00\u5EA7\u795E\u50CF\u3002"
|
||||
TDZH:
|
||||
EN:
|
||||
JP:
|
||||
KR:
|
||||
- ID: 1491
|
||||
ZH: "\u53EA\u80FD\u5728<color=yellow>\u6D77\u6D0B</color>\u4E0A\u5EFA\u9020\u3002\u6839\u636E\u5EFA\u7B51\u7B49\u7EA7\u6BCF\u56DE\u5408\u63D0\u4F9B\u5BF9\u5E94\u82F1\u96C4\u7684\u7ECF\u9A8C\u70B9\u3002\u6BCF\u5EA7\u57CE\u5E02\u4EC5\u80FD\u62E5\u6709\u4E00\u5EA7\u795E\u50CF\u3002"
|
||||
TDZH:
|
||||
EN:
|
||||
JP:
|
||||
KR:
|
||||
- ID: 1492
|
||||
ZH: "\u7A0D\u540E"
|
||||
TDZH:
|
||||
EN:
|
||||
JP:
|
||||
KR:
|
||||
TargetTypes: 0100000001000000010000000100000001000000
|
||||
|
||||
@ -550,6 +550,20 @@ MonoBehaviour:
|
||||
GridMiscActionType: 0
|
||||
SkillType: 0
|
||||
TechType: 0
|
||||
- ActionType: 1
|
||||
WonderType: 0
|
||||
ResourceType: 28
|
||||
FeatureType: 0
|
||||
TerrainType: 0
|
||||
UnitType: 14
|
||||
GiantType: 0
|
||||
UnitLevel: 0
|
||||
Vegetation: 0
|
||||
UnitActionType: 0
|
||||
CityLevelUpActionType: 0
|
||||
GridMiscActionType: 0
|
||||
SkillType: 0
|
||||
TechType: 0
|
||||
- TechType: 11
|
||||
TechName: 1146
|
||||
Description: 1147
|
||||
|
||||
@ -30,12 +30,98 @@ Transform:
|
||||
m_ConstrainProportionsScale: 1
|
||||
m_Children:
|
||||
- {fileID: 1629036782627515946}
|
||||
- {fileID: 4515218762254562506}
|
||||
- {fileID: 7643894704330690970}
|
||||
- {fileID: 7597913857267369124}
|
||||
- {fileID: 2447044730748655038}
|
||||
- {fileID: 7253150367794244744}
|
||||
- {fileID: 238235408702768509}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &2287771882545851403
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 4515218762254562506}
|
||||
- component: {fileID: 5107513750921626001}
|
||||
m_Layer: 0
|
||||
m_Name: PatchouliAttack
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!4 &4515218762254562506
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2287771882545851403}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0.5, y: 1, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 5169141587389585031}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &5107513750921626001
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2287771882545851403}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 0
|
||||
m_RayTraceProcedural: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 0
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: -124165537
|
||||
m_SortingLayer: 5
|
||||
m_SortingOrder: 1
|
||||
m_Sprite: {fileID: 21300000, guid: 05040bdeced39e347931f063944b5387, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 1.22, y: 1.37}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!1 &2566396127388267820
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -489,6 +575,90 @@ SpriteRenderer:
|
||||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!1 &8097235727333775927
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7643894704330690970}
|
||||
- component: {fileID: 76298133647849419}
|
||||
m_Layer: 0
|
||||
m_Name: RemiliaAttack
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
--- !u!4 &7643894704330690970
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8097235727333775927}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0.5, y: 1, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 5169141587389585031}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &76298133647849419
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8097235727333775927}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 0
|
||||
m_RayTraceProcedural: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 0
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: -124165537
|
||||
m_SortingLayer: 5
|
||||
m_SortingOrder: 1
|
||||
m_Sprite: {fileID: 21300000, guid: 14709f5d06fabd448899454e9f03aa07, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 1.22, y: 1.37}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!1 &8770295179056561766
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1089,7 +1089,31 @@ namespace RuntimeData
|
||||
return GetPlayerIdByUnitId(uid, out var pid1) && pid1 == PlayerMap.SelfPlayerData.Id;
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
//判断英雄的真实level
|
||||
public uint GetGiantRealLv(GiantType giantType, PlayerData player)
|
||||
{
|
||||
if (player == null) return 0;
|
||||
//获取unitTypeInfo,level=0时的信息
|
||||
if(!Table.Instance.UnitTypeDataAssets.GetUnitTypeInfo(UnitType.Giant, giantType,0,
|
||||
out var Lv0Info))
|
||||
return 0;
|
||||
//确认玩家最新的hero的unitLevel,获得level=realLv的info
|
||||
var realLv = Table.Instance.GiantExpToLevel(player.giantExp[(uint)Lv0Info.ChessType]);
|
||||
|
||||
//判断有没有解锁科技,没有的话,realLv = 0
|
||||
var action = new CommonActionId();
|
||||
action.ActionType = CommonActionType.TrainUnit;
|
||||
action.UnitType = UnitType.Giant;
|
||||
action.GiantType = giantType;
|
||||
if (!player.TechTree.CheckActionCan(action))
|
||||
realLv = 0;
|
||||
|
||||
return (uint)realLv;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -252,10 +252,11 @@ namespace RuntimeData
|
||||
// 用于记录累计击杀多少 unit
|
||||
public int TotalKill;
|
||||
|
||||
//记录伟人的复活冷却时间 ,下标直接从ChessType的Enum对应的uint转过来
|
||||
public int[] giantTimes = new int[6];
|
||||
public GiantType FirstHero;
|
||||
//记录伟人的累计经验,下标直接从ChessType的Enum对应的uint转过来
|
||||
public int[] giantExp = new int[6];
|
||||
//记录伟人的复活冷却cd惩罚
|
||||
public int[] giantPenalty = new int[6];
|
||||
public List<uint> MeetPlayers;
|
||||
public List<uint> CurAttackPlayers;
|
||||
public List<uint> LastAttackPlayers;
|
||||
@ -297,12 +298,7 @@ namespace RuntimeData
|
||||
MeetPlayers = new List<uint>();
|
||||
MeetPlayers.Add(Id);
|
||||
InitData(civId,forceId);
|
||||
for(int i = 0;i < 5; i++)
|
||||
giantTimes[i] = 1;
|
||||
|
||||
//TODO 临时给芙兰用的。后面一定要改掉
|
||||
giantTimes[3] = 4;
|
||||
giantTimes[0] = 1000000;
|
||||
}
|
||||
|
||||
public PlayerData(PlayerData copyData)
|
||||
@ -314,7 +310,9 @@ namespace RuntimeData
|
||||
CradleCityId = copyData.CradleCityId;
|
||||
Alive = copyData.Alive;
|
||||
PlayerWealth2 = copyData.PlayerWealth2;
|
||||
PlayerTechPoint = copyData.PlayerTechPoint;
|
||||
|
||||
FirstHero = copyData.FirstHero;
|
||||
Sight = new MapSightData(copyData.Sight);
|
||||
TechTree = new TechTreeData(copyData.TechTree);
|
||||
Wonder = new WonderData(copyData.Wonder);
|
||||
@ -332,9 +330,13 @@ namespace RuntimeData
|
||||
TotalKill = copyData.TotalKill;
|
||||
|
||||
foreach (var skill in copyData.Skills) Skills.Add(skill.GetCopySkill());
|
||||
//拷贝giantTimes
|
||||
for (int i = 0; i < 5; i++)
|
||||
giantTimes[i] = copyData.giantTimes[i];
|
||||
//拷贝giantExp和giantPenalty
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
giantExp[i] = copyData.giantExp[i];
|
||||
giantPenalty[i] = copyData.giantPenalty[i];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void DeepCopy(PlayerData copyData)
|
||||
@ -346,7 +348,9 @@ namespace RuntimeData
|
||||
CradleCityId = copyData.CradleCityId;
|
||||
Alive = copyData.Alive;
|
||||
PlayerWealth2 = copyData.PlayerWealth2;
|
||||
|
||||
PlayerTechPoint = copyData.PlayerTechPoint;
|
||||
|
||||
FirstHero = copyData.FirstHero;
|
||||
Sight.DeepCopy(copyData.Sight);
|
||||
TechTree.DeepCopy(copyData.TechTree);
|
||||
Wonder.DeepCopy(copyData.Wonder);
|
||||
@ -373,6 +377,12 @@ namespace RuntimeData
|
||||
if (copyData.GetSkill(Skills[i].GetSkillType(), out _)) continue;
|
||||
Skills.RemoveAt(i);
|
||||
}
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
giantExp[i] = copyData.giantExp[i];
|
||||
giantPenalty[i] = copyData.giantPenalty[i];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void InitData(uint civId,uint forceId)
|
||||
@ -390,6 +400,9 @@ namespace RuntimeData
|
||||
public void OnTurnStart(MapData map)
|
||||
{
|
||||
Turn++;
|
||||
//减少1点伟人复活冷却的时间点
|
||||
for (int i = 0; i < 6; i++)
|
||||
if (giantPenalty[i] > 0) giantPenalty[i]--;
|
||||
LastAttackPlayers.Clear();
|
||||
foreach (var id in CurAttackPlayers) LastAttackPlayers.Add(id);
|
||||
CurAttackPlayers.Clear();
|
||||
|
||||
@ -212,7 +212,20 @@ namespace RuntimeData
|
||||
{
|
||||
if (!Table.Instance.UnitTypeDataAssets.GetUnitTypeInfo(UnitType, GiantType,UnitLevel, out var info))
|
||||
return 0;
|
||||
if (GetHealthRatio() <= 0.5f) return info.Cost * 0.5f;
|
||||
//如果是英雄,要单独结算,按照英雄的不同等级定价结算
|
||||
if (UnitType == UnitType.Giant)
|
||||
return UnitLevel switch
|
||||
{
|
||||
0 => 8,
|
||||
1 => 11,
|
||||
2 => 13,
|
||||
3 => 15,
|
||||
4 => 20,
|
||||
5 => 30,
|
||||
_ => 0
|
||||
};
|
||||
//如果生命值低于50%,得分打8折
|
||||
if (GetHealthRatio() <= 0.5f) return info.Cost * 0.8f;
|
||||
return info.Cost;
|
||||
}
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ public enum TerrainType { None,Land, ShallowSea, DeepSea } // 海陆层
|
||||
public enum TerrainFeature { None, Mountain,Road } // 地形层
|
||||
public enum Vegetation { None, Trees } // 植被层
|
||||
public enum ResourceType { None, Fish, Starfish, Metal, Animal, Fruit, Crop, CityCenter, Treasure, Farm, Mine, LumberHut,Port,Sawmill,Forge,Windmill, Wonder,Bridge,Market,Temple,ForestTemple,MountainTemple,WaterTemple,Tower,Academy,Military,NavalBase,Preserve,KingTemple } // 资源层+建筑层
|
||||
public enum AttackAnimType {None,Melee,Arrow,Bomb}
|
||||
public enum AttackAnimType {None,Melee,Arrow,Bomb,RemiliaAttack,PatchouliAttack}
|
||||
public enum MainObjectType { None,Grid,City,Unit,Player}
|
||||
|
||||
public enum ChessType {None,King,Queen,Bishop,Knight,Rook} //每个单位
|
||||
@ -554,7 +554,7 @@ public class Table
|
||||
3 => 60,
|
||||
2 => 20,
|
||||
1 => 5,
|
||||
0 => 1,
|
||||
0 => 0,
|
||||
_ => 160
|
||||
};
|
||||
}
|
||||
|
||||
@ -388,12 +388,12 @@ namespace Logic.Action
|
||||
}
|
||||
|
||||
// TrainUnit 建造unit的行为逻辑
|
||||
foreach (UnitType unitType in System.Enum.GetValues(typeof(UnitType)))
|
||||
foreach (UnitType unitType in Enum.GetValues(typeof(UnitType)))
|
||||
{
|
||||
if(unitType == UnitType.None) continue;
|
||||
if (unitType == UnitType.Giant)
|
||||
{
|
||||
foreach (GiantType giantType in System.Enum.GetValues(typeof(GiantType)))
|
||||
foreach (GiantType giantType in Enum.GetValues(typeof(GiantType)))
|
||||
{
|
||||
if(giantType == GiantType.None) continue;
|
||||
commonActionId = new CommonActionId
|
||||
@ -402,7 +402,7 @@ namespace Logic.Action
|
||||
UnitType = unitType,
|
||||
GiantType = giantType
|
||||
};
|
||||
ActionLogicDict[commonActionId] = new TrainUnitAction(commonActionId);
|
||||
ActionLogicDict[commonActionId] = new TrainUnitActionTrainGiant(commonActionId);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
@ -996,449 +996,6 @@ namespace Logic.Action
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// TrainUnit 训练单位类
|
||||
public class TrainUnitAction : ActionLogicBase
|
||||
{
|
||||
public TrainUnitAction(CommonActionId id) : base(id)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override bool Execute(CommonActionParams actionParams, bool isMoment)
|
||||
{
|
||||
if (_actionId.UnitType == UnitType.None)
|
||||
return false;
|
||||
if (actionParams.MainObjectType == MainObjectType.City && actionParams.CityData == null)
|
||||
return false;
|
||||
if (actionParams.MainObjectType == MainObjectType.Grid && actionParams.GridData == null)
|
||||
return false;
|
||||
|
||||
GridData gridData = null;
|
||||
CityData cityData = null;
|
||||
//如果是city产兵
|
||||
if (actionParams.MainObjectType == MainObjectType.City)
|
||||
{
|
||||
cityData = actionParams.CityData;
|
||||
//从city处获得准确的gridData
|
||||
if (!actionParams.MapData.GetGridDataByCityId(actionParams.CityData.Id, out gridData))
|
||||
return false;
|
||||
}
|
||||
|
||||
//否则如果是grid产兵
|
||||
if (actionParams.MainObjectType == MainObjectType.Grid)
|
||||
{
|
||||
//从actionParams获得准确的gridData
|
||||
gridData = actionParams.GridData;
|
||||
if (actionParams.CityData != null)
|
||||
cityData = actionParams.CityData;
|
||||
else
|
||||
actionParams.MapData.GetCityDataByTerritoryGid(gridData.Id, out cityData);
|
||||
|
||||
}
|
||||
|
||||
if (gridData == null)
|
||||
return false;
|
||||
|
||||
//减去花费
|
||||
actionParams.PlayerData.PlayerWealth -= GetCost();
|
||||
//英雄可生产次数-1
|
||||
if (_actionId.UnitType == UnitType.Giant)
|
||||
actionParams.PlayerData.giantTimes[Table.Instance.GiantToInt(_actionId.GiantType)]--;
|
||||
//生产新单位
|
||||
var newUnit = actionParams.MapData.AddUnitData(gridData.Id,cityData.Id,_actionId.UnitType,_actionId.GiantType);
|
||||
|
||||
cityData.CityInfoRenderMark = true;
|
||||
//更新视野
|
||||
Main.PlayerLogic.UpdateSight(actionParams.MapData,actionParams.PlayerData,actionParams.MapData.GridMap.GetAroundGridIdList(newUnit.GetSightRange(),gridData));
|
||||
|
||||
//如果是真mapdata,增加得分,然后处理得分动画
|
||||
if (Main.MapData == actionParams.MapData)// && actionParams.PlayerData.Id == actionParams.MapData.PlayerMap.SelfPlayerData.Id)
|
||||
{
|
||||
var v1 = Table.Instance.GridToWorld(gridData);
|
||||
int score = GetCost() * 5;
|
||||
if (actionParams.PlayerData.Id == actionParams.MapData.PlayerMap.SelfPlayerData.Id)
|
||||
{
|
||||
var faithPanel = GameObject.Find("UICanvas/TopBarPanel/FaithPanel/Icon").transform;
|
||||
var endPos = faithPanel.position;
|
||||
MapRenderer.Instance.ProjectileManager.CreateProjectile(v1,endPos,ProjectileType.Faith,ProjectileMoveType.CoinParabola,score);
|
||||
}
|
||||
AchievementDataManager.Instance.OnTrainUnit(actionParams.MapData, actionParams.PlayerData, actionParams.CityData, newUnit);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool CheckCan(CommonActionParams actionParam)
|
||||
{
|
||||
PlayerData playerData;
|
||||
GridData gridData;
|
||||
CityData cityData;
|
||||
|
||||
//如果是城市产兵
|
||||
if (actionParam.MainObjectType == MainObjectType.City)
|
||||
{
|
||||
//鲁棒性
|
||||
if (actionParam.CityData == null)
|
||||
return false;
|
||||
cityData = actionParam.CityData;
|
||||
//如果player操作的city不是自己的city
|
||||
if (!actionParam.MapData.GetPlayerDataByCityId(actionParam.CityData.Id, out playerData)
|
||||
|| playerData.Id != actionParam.PlayerData.Id)
|
||||
return false;
|
||||
if (!actionParam.MapData.GetGridDataByCityId(actionParam.CityData.Id, out gridData))
|
||||
return false;
|
||||
//如果没科技,return
|
||||
if(!actionParam.PlayerData.TechTree.CheckActionCan(_actionId))
|
||||
return false;
|
||||
//如果是城市生产,无法生产水生unit
|
||||
if (Table.Instance.UnitTypeDataAssets.GetUnitTypeInfo(_actionId.UnitType,_actionId.GiantType,_actionId.UnitLevel,out var info)
|
||||
&& info.LandType == LandType.WaterAndAshore
|
||||
&& actionParam.CityData != null)
|
||||
return false;
|
||||
//如果是unit,但是不是boat,那不存在unit生产的可能
|
||||
if (actionParam.UnitData != null && actionParam.UnitData.UnitType != UnitType.Boat)
|
||||
return false;
|
||||
//如果是unit-boat,那生产的unit不能是boat
|
||||
if (actionParam.UnitData != null && _actionId.UnitType == UnitType.Boat)
|
||||
return false;
|
||||
//如果城市已经满员,不能生产,但是可以显示,所以要照常返回
|
||||
if (actionParam.MapData.CheckIfCityFullPopulation(actionParam.CityData))
|
||||
return false;
|
||||
//如果城市上面有单位,不能生产,不显示
|
||||
if (actionParam.MapData.GetUnitDataByGid(gridData.Id, out var unitData))
|
||||
return false;
|
||||
//判断钱够不够
|
||||
if (GetCost() > actionParam.PlayerData.PlayerWealth)
|
||||
return false;
|
||||
//如果是伟人,要检查unique属性,同事检查有没有生产次数
|
||||
if (_actionId.UnitType == UnitType.Giant)
|
||||
{
|
||||
//检查生产次数够不够
|
||||
if(actionParam.PlayerData.giantTimes[Table.Instance.GiantToInt( _actionId.GiantType)] <= 0)
|
||||
return false;
|
||||
//获取unitTypeInfo
|
||||
if(!Table.Instance.UnitTypeDataAssets.GetUnitTypeInfo(_actionId.UnitType, _actionId.GiantType,_actionId.UnitLevel,
|
||||
out var unitTypeInfo))
|
||||
return false;
|
||||
//如果有Unique且全场已经有1个了
|
||||
if (unitTypeInfo.Skills.Contains(SkillType.UNIQUE))
|
||||
{
|
||||
if (Main.PlayerLogic.GetMapUnitTypeCount(actionParam.MapData, _actionId.UnitType, _actionId.GiantType) > 0)
|
||||
return false;
|
||||
}
|
||||
//如果有QUARTER且全场已经有4个了
|
||||
if (unitTypeInfo.Skills.Contains(SkillType.QUARTER))
|
||||
{
|
||||
if(Main.PlayerLogic.GetMapUnitTypeCount(actionParam.MapData,_actionId.UnitType, _actionId.GiantType) > 3)
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
//如果是grid产兵
|
||||
if (actionParam.MainObjectType == MainObjectType.Grid)
|
||||
{
|
||||
if (actionParam.GridData == null)
|
||||
return false;
|
||||
gridData = actionParam.GridData;
|
||||
if (!actionParam.MapData.GetCityDataByTerritoryGid(gridData.Id, out cityData))
|
||||
return false;
|
||||
if (!actionParam.MapData.GetPlayerDataByCityId(cityData.Id, out playerData))
|
||||
return false;
|
||||
|
||||
//如果领土不是player自己的
|
||||
if (playerData.Id != actionParam.PlayerData.Id)
|
||||
return false;
|
||||
//如果没科技,return
|
||||
if(!actionParam.PlayerData.TechTree.CheckActionCan(_actionId))
|
||||
return false;
|
||||
|
||||
//如果城市已经满员,不能生产,但是可以显示,所以checkcan return 0 checkshow return 1
|
||||
if (actionParam.MapData.CheckIfCityFullPopulation(cityData))
|
||||
return false;
|
||||
//如果格子上面有单位,不能生产,不显示
|
||||
if (actionParam.MapData.GetUnitDataByGid(gridData.Id, out var _))
|
||||
return false;
|
||||
//判断钱够不够
|
||||
if (GetCost() > actionParam.PlayerData.PlayerWealth)
|
||||
return false;
|
||||
//如果是伟人,要检查unique属性
|
||||
if (_actionId.UnitType == UnitType.Giant)
|
||||
{
|
||||
//获取unitTypeInfo
|
||||
if(!Table.Instance.UnitTypeDataAssets.GetUnitTypeInfo(_actionId.UnitType, _actionId.GiantType,_actionId.UnitLevel,
|
||||
out var unitTypeInfo))
|
||||
return false;
|
||||
//如果有Unique且全场已经有1个了
|
||||
if (unitTypeInfo.Skills.Contains(SkillType.UNIQUE))
|
||||
{
|
||||
if (Main.PlayerLogic.GetMapUnitTypeCount(actionParam.MapData, _actionId.UnitType, _actionId.GiantType) > 0)
|
||||
return false;
|
||||
}
|
||||
//如果有QUARTER且全场已经有4个了
|
||||
if (unitTypeInfo.Skills.Contains(SkillType.QUARTER))
|
||||
{
|
||||
if(Main.PlayerLogic.GetMapUnitTypeCount(actionParam.MapData,_actionId.UnitType, _actionId.GiantType) > 3)
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//----------终于进入正式的特判环节,前面都是通用判断,下面开始进入白名单
|
||||
//红魔馆妖精女仆在树林生产
|
||||
if (playerData.PlayerForceId == 0 && gridData.Vegetation == Vegetation.Trees
|
||||
&& (gridData.Resource == ResourceType.Animal ||
|
||||
gridData.Resource == ResourceType.None)
|
||||
&& _actionId.UnitType == UnitType.Warrior)
|
||||
return true;
|
||||
|
||||
//军营产兵
|
||||
if (gridData.Resource == ResourceType.Military)
|
||||
{
|
||||
if (Table.Instance.UnitTypeDataAssets.GetUnitTypeInfo(_actionId.UnitType,_actionId.GiantType,_actionId.UnitLevel,out var info)
|
||||
&& info.LandType == LandType.WaterAndAshore)
|
||||
return false;
|
||||
//如果是伟人,要检查unique属性,同事检查有没有生产次数
|
||||
if (_actionId.UnitType == UnitType.Giant)
|
||||
{
|
||||
//检查生产次数够不够
|
||||
if(actionParam.PlayerData.giantTimes[Table.Instance.GiantToInt( _actionId.GiantType)] <= 0)
|
||||
return false;
|
||||
//获取unitTypeInfo
|
||||
if(!Table.Instance.UnitTypeDataAssets.GetUnitTypeInfo(_actionId.UnitType, _actionId.GiantType,_actionId.UnitLevel,
|
||||
out var unitTypeInfo))
|
||||
return false;
|
||||
//如果有Unique且全场已经有1个了
|
||||
if (unitTypeInfo.Skills.Contains(SkillType.UNIQUE))
|
||||
{
|
||||
if (Main.PlayerLogic.GetMapUnitTypeCount(actionParam.MapData, _actionId.UnitType, _actionId.GiantType) > 0)
|
||||
return false;
|
||||
}
|
||||
//如果有QUARTER且全场已经有4个了
|
||||
if (unitTypeInfo.Skills.Contains(SkillType.QUARTER))
|
||||
{
|
||||
if(Main.PlayerLogic.GetMapUnitTypeCount(actionParam.MapData,_actionId.UnitType, _actionId.GiantType) > 3)
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
//下面全部是神像产兵
|
||||
if (_actionId.UnitType == UnitType.Giant
|
||||
&& _actionId.GiantType == GiantType.EgyptianFlandre
|
||||
&& playerData.PlayerForceId == 0
|
||||
&& playerData.PlayerCivId == 0
|
||||
&& gridData.Resource == ResourceType.Temple)
|
||||
return true;
|
||||
if (_actionId.UnitType == UnitType.Giant
|
||||
&& _actionId.GiantType == GiantType.EgyptianPatchouli
|
||||
&& playerData.PlayerForceId == 0
|
||||
&& playerData.PlayerCivId == 0
|
||||
&& gridData.Resource == ResourceType.ForestTemple)
|
||||
return true;
|
||||
if (_actionId.UnitType == UnitType.Giant
|
||||
&& _actionId.GiantType == GiantType.EgyptianMeiling
|
||||
&& playerData.PlayerForceId == 0
|
||||
&& playerData.PlayerCivId == 0
|
||||
&& gridData.Resource == ResourceType.MountainTemple)
|
||||
return true;
|
||||
if (_actionId.UnitType == UnitType.Giant
|
||||
&& _actionId.GiantType == GiantType.EgyptianSakuya
|
||||
&& playerData.PlayerForceId == 0
|
||||
&& playerData.PlayerCivId == 0
|
||||
&& gridData.Resource == ResourceType.WaterTemple)
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
}
|
||||
public override bool CheckShow(CommonActionParams actionParam)
|
||||
{
|
||||
PlayerData playerData;
|
||||
GridData gridData;
|
||||
CityData cityData;
|
||||
//如果是格子行使TrainUnit,直接return
|
||||
if (actionParam.MainObjectType == MainObjectType.City)
|
||||
{
|
||||
//魯棒性
|
||||
if (actionParam.CityData == null)
|
||||
return false;
|
||||
if (!actionParam.MapData.GetPlayerDataByCityId(actionParam.CityData.Id, out playerData)
|
||||
|| playerData.Id != actionParam.PlayerData.Id)
|
||||
return false;
|
||||
if (!actionParam.MapData.GetGridDataByCityId(actionParam.CityData.Id, out gridData))
|
||||
return false;
|
||||
//如果没科技,return
|
||||
if(!actionParam.PlayerData.TechTree.CheckActionCan(_actionId))
|
||||
return false;
|
||||
//如果是城市生产,无法生产水生unit
|
||||
if (Table.Instance.UnitTypeDataAssets.GetUnitTypeInfo(_actionId.UnitType,_actionId.GiantType,_actionId.UnitLevel,out var info)
|
||||
&& info.LandType == LandType.WaterAndAshore
|
||||
&& actionParam.CityData != null)
|
||||
return false;
|
||||
//如果是unit,但是不是boat,那不存在unit生产的可能
|
||||
if (actionParam.UnitData != null && actionParam.UnitData.UnitType != UnitType.Boat)
|
||||
return false;
|
||||
//如果是unit-boat,那生产的unit不能是boat
|
||||
if (actionParam.UnitData != null && _actionId.UnitType == UnitType.Boat)
|
||||
return false;
|
||||
//如果城市已经满员,不能生产,但是可以显示,所以要照常返回
|
||||
//if (actionParam.MapData.CheckIfCityFullPopulation(actionParam.CityData) >= actionParam.CityData.Level)
|
||||
// return false;
|
||||
//如果城市上面有单位,不能生产,不显示
|
||||
if (actionParam.MapData.GetUnitDataByGid(gridData.Id, out var unitData))
|
||||
return false;
|
||||
//如果是伟人,处理UNIQUE和QUARTER的情况
|
||||
if (_actionId.UnitType == UnitType.Giant)
|
||||
{
|
||||
|
||||
//检查生产次数够不够
|
||||
if(actionParam.PlayerData.giantTimes[Table.Instance.GiantToInt( _actionId.GiantType)] <= 0)
|
||||
return false;
|
||||
//获取unitTypeInfo
|
||||
if(!Table.Instance.UnitTypeDataAssets.GetUnitTypeInfo(_actionId.UnitType, _actionId.GiantType,_actionId.UnitLevel,
|
||||
out var unitTypeInfo))
|
||||
return false;
|
||||
//如果有Unique且全场已经有1个了
|
||||
if (unitTypeInfo.Skills.Contains(SkillType.UNIQUE))
|
||||
{
|
||||
if (Main.PlayerLogic.GetMapUnitTypeCount(actionParam.MapData, _actionId.UnitType, _actionId.GiantType) > 0)
|
||||
return false;
|
||||
}
|
||||
//如果有QUARTER且全场已经有4个了
|
||||
if (unitTypeInfo.Skills.Contains(SkillType.QUARTER))
|
||||
{
|
||||
if(Main.PlayerLogic.GetMapUnitTypeCount(actionParam.MapData,_actionId.UnitType, _actionId.GiantType) > 3)
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//如果是grid产兵
|
||||
if (actionParam.MainObjectType == MainObjectType.Grid)
|
||||
{
|
||||
if (actionParam.GridData == null)
|
||||
return false;
|
||||
gridData = actionParam.GridData;
|
||||
if (!actionParam.MapData.GetCityDataByTerritoryGid(gridData.Id, out cityData))
|
||||
return false;
|
||||
if (!actionParam.MapData.GetPlayerDataByCityId(cityData.Id, out playerData))
|
||||
return false;
|
||||
|
||||
//如果领土不是player自己的
|
||||
if (playerData.Id != actionParam.PlayerData.Id)
|
||||
return false;
|
||||
//如果没科技,return
|
||||
if(!actionParam.PlayerData.TechTree.CheckActionCan(_actionId))
|
||||
return false;
|
||||
|
||||
//如果城市已经满员,不能生产,但是可以显示,所以checkcan return 0 checkshow return 1
|
||||
//if (actionParam.MapData.CheckIfCityFullPopulation(cityData))
|
||||
//return false;
|
||||
//如果格子上面有单位,不能生产,不显示
|
||||
if (actionParam.MapData.GetUnitDataByGid(gridData.Id, out var _))
|
||||
return false;
|
||||
//判断钱够不够
|
||||
//if (GetCost() > actionParam.PlayerData.PlayerWealth)
|
||||
//return false;
|
||||
//如果是伟人,要检查unique属性
|
||||
if (_actionId.UnitType == UnitType.Giant)
|
||||
{
|
||||
//获取unitTypeInfo
|
||||
if(!Table.Instance.UnitTypeDataAssets.GetUnitTypeInfo(_actionId.UnitType, _actionId.GiantType,_actionId.UnitLevel,
|
||||
out var unitTypeInfo))
|
||||
return false;
|
||||
//如果有Unique且全场已经有1个了
|
||||
if (unitTypeInfo.Skills.Contains(SkillType.UNIQUE))
|
||||
{
|
||||
if (Main.PlayerLogic.GetMapUnitTypeCount(actionParam.MapData, _actionId.UnitType, _actionId.GiantType) > 0)
|
||||
return false;
|
||||
}
|
||||
//如果有QUARTER且全场已经有4个了
|
||||
if (unitTypeInfo.Skills.Contains(SkillType.QUARTER))
|
||||
{
|
||||
if(Main.PlayerLogic.GetMapUnitTypeCount(actionParam.MapData,_actionId.UnitType, _actionId.GiantType) > 3)
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//----------终于进入正式的特判环节,前面都是通用判断,下面开始进入白名单
|
||||
//红魔馆妖精女仆在树林生产
|
||||
if (playerData.PlayerForceId == 0 && gridData.Vegetation == Vegetation.Trees
|
||||
&& (gridData.Resource == ResourceType.Animal ||
|
||||
gridData.Resource == ResourceType.None)
|
||||
&& _actionId.UnitType == UnitType.Warrior)
|
||||
return true;
|
||||
|
||||
|
||||
//军营产兵
|
||||
if (gridData.Resource == ResourceType.Military)
|
||||
{
|
||||
if (Table.Instance.UnitTypeDataAssets.GetUnitTypeInfo(_actionId.UnitType,_actionId.GiantType,_actionId.UnitLevel,out var info)
|
||||
&& info.LandType == LandType.WaterAndAshore)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
//下面都是神像产兵
|
||||
if (_actionId.UnitType == UnitType.Giant
|
||||
&& _actionId.GiantType == GiantType.EgyptianFlandre
|
||||
&& playerData.PlayerForceId == 0
|
||||
&& playerData.PlayerCivId == 0
|
||||
&& gridData.Resource == ResourceType.Temple)
|
||||
return true;
|
||||
if (_actionId.UnitType == UnitType.Giant
|
||||
&& _actionId.GiantType == GiantType.EgyptianPatchouli
|
||||
&& playerData.PlayerForceId == 0
|
||||
&& playerData.PlayerCivId == 0
|
||||
&& gridData.Resource == ResourceType.ForestTemple)
|
||||
return true;
|
||||
if (_actionId.UnitType == UnitType.Giant
|
||||
&& _actionId.GiantType == GiantType.EgyptianMeiling
|
||||
&& playerData.PlayerForceId == 0
|
||||
&& playerData.PlayerCivId == 0
|
||||
&& gridData.Resource == ResourceType.MountainTemple)
|
||||
return true;
|
||||
if (_actionId.UnitType == UnitType.Giant
|
||||
&& _actionId.GiantType == GiantType.EgyptianSakuya
|
||||
&& playerData.PlayerForceId == 0
|
||||
&& playerData.PlayerCivId == 0
|
||||
&& gridData.Resource == ResourceType.WaterTemple)
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override bool ExecuteViewBefore(CommonActionParams actionParams)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool ExecuteViewAfter(CommonActionParams actionParams)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -130,14 +130,9 @@ namespace Logic.Action
|
||||
else if (_actionId.ResourceType == ResourceType.Temple
|
||||
|| _actionId.ResourceType == ResourceType.ForestTemple
|
||||
|| _actionId.ResourceType == ResourceType.WaterTemple
|
||||
|| _actionId.ResourceType == ResourceType.MountainTemple)
|
||||
|| _actionId.ResourceType == ResourceType.MountainTemple
|
||||
|| _actionId.ResourceType == ResourceType.KingTemple)
|
||||
{
|
||||
var giantRank = Table.Instance.TempleToInt(_actionId.ResourceType);
|
||||
//TODO 临时写法,直给芙兰用的
|
||||
if (_actionId.ResourceType == ResourceType.Temple && actionParams.PlayerData.PlayerCivId == 0)
|
||||
actionParams.PlayerData.giantTimes[giantRank] += 4;
|
||||
else
|
||||
actionParams.PlayerData.giantTimes[giantRank]++;
|
||||
cityExp = Table.Instance.QueryActionExp(_actionId);
|
||||
actionParams.GridData.Resource = _actionId.ResourceType;
|
||||
actionParams.GridData.buildingLevel = 1;
|
||||
|
||||
639
Unity/Assets/Scripts/Logic/Action/TrainUnitActionLogic.cs
Normal file
639
Unity/Assets/Scripts/Logic/Action/TrainUnitActionLogic.cs
Normal file
@ -0,0 +1,639 @@
|
||||
/*
|
||||
* @Author: 白哉
|
||||
* @Description: 行为逻辑类
|
||||
* @Date: 2025年04月10日 星期四 11:04:44
|
||||
* @Modify:
|
||||
*/
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Logic.AI;
|
||||
using Logic.CrashSight;
|
||||
using RuntimeData;
|
||||
using UnityEngine;
|
||||
using TH1Renderer;
|
||||
using TH1Resource;
|
||||
using UnityEditor;
|
||||
using UnityEngineInternal;
|
||||
|
||||
|
||||
//这里是所有BuildAction派生子类的实现模块
|
||||
namespace Logic.Action
|
||||
{
|
||||
|
||||
|
||||
// TrainUnit 训练单位类
|
||||
public class TrainUnitAction : ActionLogicBase
|
||||
{
|
||||
public TrainUnitAction(CommonActionId id) : base(id)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
protected bool TrainUnitActionCheckBaseData(CommonActionParams actionParam)
|
||||
{
|
||||
if (actionParam.PlayerData == null) return false;
|
||||
return true;
|
||||
}
|
||||
protected bool TrainUnitActionCheckHasTech(CommonActionParams actionParam)
|
||||
{
|
||||
//如果没科技,return
|
||||
if(!actionParam.PlayerData.TechTree.CheckActionCan(_actionId))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
protected bool TrainUnitActionCheckWaterUnit()
|
||||
{
|
||||
if (Table.Instance.UnitTypeDataAssets.GetUnitTypeInfo(_actionId.UnitType,_actionId.GiantType,_actionId.UnitLevel,out var info)
|
||||
&& info.LandType == LandType.WaterAndAshore)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
protected bool TrainUnitActionCheckCityFullPop(CommonActionParams actionParam)
|
||||
{
|
||||
if (actionParam.MainObjectType == MainObjectType.City)
|
||||
{
|
||||
if (actionParam.MapData.CheckIfCityFullPopulation(actionParam.CityData)) return true;
|
||||
}
|
||||
|
||||
if (actionParam.MainObjectType == MainObjectType.Grid)
|
||||
{
|
||||
if (!actionParam.MapData.GetCityDataByTerritoryGid(actionParam.GridData.Id, out var city)) return true;
|
||||
if (actionParam.MapData.CheckIfCityFullPopulation(city)) return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected bool TrainUnitActionCheckCityBelongPlayer(CommonActionParams actionParam)
|
||||
{
|
||||
if (actionParam.PlayerData == null) return false;
|
||||
if (!actionParam.MapData.GetPlayerDataByCityId(actionParam.CityData.Id, out var playerData)
|
||||
|| playerData.Id != actionParam.PlayerData.Id)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
protected bool TrainUnitActionCheckGridBelongPlayer(CommonActionParams actionParam)
|
||||
{
|
||||
if (actionParam.GridData == null ||
|
||||
!actionParam.MapData.GetPlayerDataByTerritoryGridId(actionParam.GridData.Id, out var player))
|
||||
return false;
|
||||
if (player.Id != actionParam.PlayerData.Id)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
protected bool TrainUnitActionCheckUnitOnCity(CommonActionParams actionParam)
|
||||
{
|
||||
if (!actionParam.MapData.GetGridDataByCityId(actionParam.CityId, out var grid)) return true;
|
||||
if (actionParam.MapData.GetUnitDataByGid(grid.Id, out var unitData)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
protected bool TrainUnitActionCheckUnitOnGrid(CommonActionParams actionParam)
|
||||
{
|
||||
if (actionParam.MapData.GetUnitDataByGid(actionParam.GridData.Id, out var unitData)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
protected bool TrainUnitActionCheckMoneyEnough(CommonActionParams actionParam)
|
||||
{
|
||||
if (GetCost() > actionParam.PlayerData.PlayerWealth) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool Execute(CommonActionParams actionParams, bool isMoment)
|
||||
{
|
||||
if (_actionId.UnitType == UnitType.None)
|
||||
return false;
|
||||
if (actionParams.MainObjectType == MainObjectType.City && actionParams.CityData == null)
|
||||
return false;
|
||||
if (actionParams.MainObjectType == MainObjectType.Grid && actionParams.GridData == null)
|
||||
return false;
|
||||
|
||||
GridData gridData = null;
|
||||
CityData cityData = null;
|
||||
//如果是city产兵
|
||||
if (actionParams.MainObjectType == MainObjectType.City)
|
||||
{
|
||||
cityData = actionParams.CityData;
|
||||
//从city处获得准确的gridData
|
||||
if (!actionParams.MapData.GetGridDataByCityId(actionParams.CityData.Id, out gridData))
|
||||
return false;
|
||||
}
|
||||
|
||||
//否则如果是grid产兵
|
||||
if (actionParams.MainObjectType == MainObjectType.Grid)
|
||||
{
|
||||
//从actionParams获得准确的gridData
|
||||
gridData = actionParams.GridData;
|
||||
if (actionParams.CityData != null)
|
||||
cityData = actionParams.CityData;
|
||||
else
|
||||
actionParams.MapData.GetCityDataByTerritoryGid(gridData.Id, out cityData);
|
||||
|
||||
}
|
||||
|
||||
if (gridData == null)
|
||||
return false;
|
||||
|
||||
//减去花费
|
||||
actionParams.PlayerData.PlayerWealth -= GetCost();
|
||||
|
||||
//生产新单位
|
||||
var newUnit = actionParams.MapData.AddUnitData(gridData.Id,cityData.Id,_actionId.UnitType,_actionId.GiantType);
|
||||
|
||||
cityData.CityInfoRenderMark = true;
|
||||
//更新视野
|
||||
Main.PlayerLogic.UpdateSight(actionParams.MapData,actionParams.PlayerData,actionParams.MapData.GridMap.GetAroundGridIdList(newUnit.GetSightRange(),gridData));
|
||||
|
||||
//如果是真mapdata,增加得分,然后处理得分动画
|
||||
if (Main.MapData == actionParams.MapData)// && actionParams.PlayerData.Id == actionParams.MapData.PlayerMap.SelfPlayerData.Id)
|
||||
{
|
||||
var v1 = Table.Instance.GridToWorld(gridData);
|
||||
int score = GetCost() * 5;
|
||||
if (actionParams.PlayerData.Id == actionParams.MapData.PlayerMap.SelfPlayerData.Id)
|
||||
{
|
||||
var faithPanel = GameObject.Find("UICanvas/TopBarPanel/FaithPanel/Icon").transform;
|
||||
var endPos = faithPanel.position;
|
||||
MapRenderer.Instance.ProjectileManager.CreateProjectile(v1,endPos,ProjectileType.Faith,ProjectileMoveType.CoinParabola,score);
|
||||
}
|
||||
AchievementDataManager.Instance.OnTrainUnit(actionParams.MapData, actionParams.PlayerData, actionParams.CityData, newUnit);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool CheckCan(CommonActionParams actionParam)
|
||||
{
|
||||
GridData gridData;
|
||||
PlayerData playerData;
|
||||
CityData cityData;
|
||||
|
||||
//step #0 基础鲁棒性 (playerData不能为空)
|
||||
if (!TrainUnitActionCheckBaseData(actionParam)) return false;
|
||||
|
||||
//Part1 如果是城市产兵
|
||||
if (actionParam.MainObjectType == MainObjectType.City)
|
||||
{
|
||||
|
||||
//step #1 city产兵的特殊鲁棒性
|
||||
if (actionParam.CityData == null) return false;
|
||||
//step #2 check player操作的city 是不是自己的city,存储gridData
|
||||
if (!TrainUnitActionCheckCityBelongPlayer(actionParam)) return false;
|
||||
//step #3 赋值gridData(city的位置)
|
||||
if (!actionParam.MapData.GetGridDataByCityId(actionParam.CityData.Id, out gridData)) return false;
|
||||
//step #4如果没科技,return
|
||||
if(!TrainUnitActionCheckHasTech(actionParam)) return false;
|
||||
//step #5确认是否是水生unit
|
||||
if (TrainUnitActionCheckWaterUnit()) return false;
|
||||
//step #6 确认城市是否满员
|
||||
if (TrainUnitActionCheckCityFullPop(actionParam)) return false;
|
||||
//step #7 如果城市上面有单位,不能生产,不显示
|
||||
if (TrainUnitActionCheckUnitOnCity(actionParam)) return false;
|
||||
//step #8 判断钱够不够
|
||||
if (!TrainUnitActionCheckMoneyEnough(actionParam)) return false;
|
||||
//step #9 只处理非英雄
|
||||
if (_actionId.UnitType == UnitType.Giant) return false;
|
||||
return true;
|
||||
}
|
||||
//Part2 如果是grid产兵
|
||||
if (actionParam.MainObjectType == MainObjectType.Grid)
|
||||
{
|
||||
//step #1 确认基础鲁棒性
|
||||
if (actionParam.GridData == null) return false;
|
||||
gridData = actionParam.GridData;
|
||||
//step #2 进行基础赋值
|
||||
if (!actionParam.MapData.GetCityDataByTerritoryGid(gridData.Id, out cityData)) return false;
|
||||
if (!actionParam.MapData.GetPlayerDataByCityId(cityData.Id, out playerData)) return false;
|
||||
//step #3 check city是不是player的
|
||||
if (!TrainUnitActionCheckGridBelongPlayer(actionParam)) return false;
|
||||
//step #4 如果没科技,return
|
||||
if (!TrainUnitActionCheckHasTech(actionParam)) return false;
|
||||
//step #5 如果城市满员
|
||||
if (TrainUnitActionCheckCityFullPop(actionParam)) return false;
|
||||
//step #6如果格子上面有单位,不能生产,不显示
|
||||
if (TrainUnitActionCheckUnitOnGrid(actionParam)) return false;
|
||||
//step #7判断钱够不够
|
||||
if (!TrainUnitActionCheckMoneyEnough(actionParam)) return false;
|
||||
//step #8 只处理非英雄
|
||||
if (_actionId.UnitType == UnitType.Giant) return false;
|
||||
|
||||
//----------终于进入正式的特判环节,前面都是通用判断,下面开始进入白名单
|
||||
//Part 2.1
|
||||
//红魔馆妖精女仆在树林生产
|
||||
if (playerData.PlayerForceId == 0 && gridData.Vegetation == Vegetation.Trees
|
||||
&& (gridData.Resource == ResourceType.Animal ||
|
||||
gridData.Resource == ResourceType.None)
|
||||
&& _actionId.UnitType == UnitType.Warrior)
|
||||
return true;
|
||||
|
||||
//Part 2.2
|
||||
//军营产兵
|
||||
if (gridData.Resource == ResourceType.Military)
|
||||
{
|
||||
//step #1 如果水生unit,不行
|
||||
if(TrainUnitActionCheckWaterUnit()) return false;
|
||||
//step #2 如果是伟人,return
|
||||
if (_actionId.UnitType == UnitType.Giant) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
public override bool CheckShow(CommonActionParams actionParam)
|
||||
{
|
||||
GridData gridData;
|
||||
PlayerData playerData;
|
||||
CityData cityData;
|
||||
|
||||
//step #0 基础鲁棒性 (playerData不能为空)
|
||||
if (!TrainUnitActionCheckBaseData(actionParam)) return false;
|
||||
|
||||
//Part1 如果是城市产兵
|
||||
if (actionParam.MainObjectType == MainObjectType.City)
|
||||
{
|
||||
|
||||
//step #1 city产兵的特殊鲁棒性
|
||||
if (actionParam.CityData == null) return false;
|
||||
//step #2 check player操作的city 是不是自己的city,存储gridData
|
||||
if (!TrainUnitActionCheckCityBelongPlayer(actionParam)) return false;
|
||||
//step #3 赋值gridData(city的位置)
|
||||
if (!actionParam.MapData.GetGridDataByCityId(actionParam.CityData.Id, out gridData)) return false;
|
||||
//step #4如果没科技,return
|
||||
if(!TrainUnitActionCheckHasTech(actionParam)) return false;
|
||||
//step #5确认是否是水生unit
|
||||
if (TrainUnitActionCheckWaterUnit()) return false;
|
||||
//step #6 确认城市是否满员
|
||||
//if (TrainUnitActionCheckCityFullPop(actionParam)) return false;
|
||||
//step #7 如果城市上面有单位,不能生产,不显示
|
||||
if (TrainUnitActionCheckUnitOnCity(actionParam)) return false;
|
||||
//step #8 判断钱够不够
|
||||
//if (!TrainUnitActionCheckMoneyEnough(actionParam)) return false;
|
||||
//step #9 只处理非英雄
|
||||
if (_actionId.UnitType == UnitType.Giant) return false;
|
||||
return true;
|
||||
}
|
||||
//Part2 如果是grid产兵
|
||||
if (actionParam.MainObjectType == MainObjectType.Grid)
|
||||
{
|
||||
//step #1 确认基础鲁棒性
|
||||
if (actionParam.GridData == null) return false;
|
||||
gridData = actionParam.GridData;
|
||||
//step #2 进行基础赋值
|
||||
if (!actionParam.MapData.GetCityDataByTerritoryGid(gridData.Id, out cityData)) return false;
|
||||
if (!actionParam.MapData.GetPlayerDataByCityId(cityData.Id, out playerData)) return false;
|
||||
//step #3 check city是不是player的
|
||||
if (!TrainUnitActionCheckGridBelongPlayer(actionParam)) return false;
|
||||
//step #4 如果没科技,return
|
||||
if (!TrainUnitActionCheckHasTech(actionParam)) return false;
|
||||
//step #5 如果城市满员
|
||||
//if (TrainUnitActionCheckCityFullPop(actionParam)) return false;
|
||||
//step #6如果格子上面有单位,不能生产,不显示
|
||||
if (TrainUnitActionCheckUnitOnGrid(actionParam)) return false;
|
||||
//step #7判断钱够不够
|
||||
//if(!TrainUnitActionCheckMoneyEnough(actionParam)) return false
|
||||
//step #8 只处理非英雄
|
||||
if (_actionId.UnitType == UnitType.Giant) return false;
|
||||
|
||||
//----------终于进入正式的特判环节,前面都是通用判断,下面开始进入白名单
|
||||
//Part 2.1
|
||||
//红魔馆妖精女仆在树林生产
|
||||
if (playerData.PlayerForceId == 0 && gridData.Vegetation == Vegetation.Trees
|
||||
&& (gridData.Resource == ResourceType.Animal ||
|
||||
gridData.Resource == ResourceType.None)
|
||||
&& _actionId.UnitType == UnitType.Warrior)
|
||||
return true;
|
||||
|
||||
//Part 2.2
|
||||
//军营产兵
|
||||
if (gridData.Resource == ResourceType.Military)
|
||||
{
|
||||
//step #1 如果水生unit,不行
|
||||
if(TrainUnitActionCheckWaterUnit()) return false;
|
||||
//step #2 如果是伟人,return
|
||||
if (_actionId.UnitType == UnitType.Giant) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
return false;
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override bool ExecuteViewBefore(CommonActionParams actionParams)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool ExecuteViewAfter(CommonActionParams actionParams)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public class TrainUnitActionTrainGiant : TrainUnitAction
|
||||
{
|
||||
private GridData _finalGrid;
|
||||
private CityData _finalCity;
|
||||
private UnitData _newUnit;
|
||||
|
||||
public TrainUnitActionTrainGiant(CommonActionId id) : base(id){}
|
||||
|
||||
//确认英雄的冷却cd
|
||||
private bool CheckGiantHasColdTime(CommonActionParams actionParam)
|
||||
{
|
||||
if (actionParam.PlayerData == null) return false;
|
||||
if (actionParam.PlayerData.giantPenalty[(uint)_actionId.GiantType] > 0) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
//判断场上的giant是否已经有一个了(会处理芙兰这种quartet的情况)
|
||||
|
||||
private bool CheckGiantHasOne(CommonActionParams actionParam)
|
||||
{
|
||||
//获取unitTypeInfo,level=0时的信息
|
||||
if(!Table.Instance.UnitTypeDataAssets.GetUnitTypeInfo(_actionId.UnitType, _actionId.GiantType,_actionId.UnitLevel,
|
||||
out var Lv0Info))
|
||||
return true;
|
||||
//确认玩家最新的hero的unitLevel,获得level=realLv的info
|
||||
var realLv = Table.Instance.GiantExpToLevel(actionParam.PlayerData.giantExp[(uint)Lv0Info.ChessType]);
|
||||
if (!TrainUnitActionCheckHasTech(actionParam))
|
||||
realLv = 0;
|
||||
if(!Table.Instance.UnitTypeDataAssets.GetUnitTypeInfo(_actionId.UnitType, _actionId.GiantType,(uint)realLv,
|
||||
out var info))
|
||||
return true;
|
||||
//如果有Unique且全场已经有1个了
|
||||
if (info.Skills.Contains(SkillType.UNIQUE))
|
||||
{
|
||||
if (Main.PlayerLogic.GetMapUnitTypeCount(actionParam.MapData, _actionId.UnitType, _actionId.GiantType) > 0) return true;
|
||||
}
|
||||
//如果有QUARTER且全场已经有4个了
|
||||
if (info.Skills.Contains(SkillType.QUARTER))
|
||||
{
|
||||
if(Main.PlayerLogic.GetMapUnitTypeCount(actionParam.MapData,_actionId.UnitType, _actionId.GiantType) > 3)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
public override bool Execute(CommonActionParams actionParams, bool isMoment)
|
||||
{
|
||||
//step #0 鲁棒性检查
|
||||
if (!CheckCan(actionParams)) return false;
|
||||
//step #1 获得准确的gridData和对应的cityData
|
||||
//step #1 part1 如果是city产英雄
|
||||
if (actionParams.MainObjectType == MainObjectType.City)
|
||||
{
|
||||
_finalCity = actionParams.CityData;
|
||||
//从city处获得准确的gridData
|
||||
if (!actionParams.MapData.GetGridDataByCityId(actionParams.CityData.Id, out _finalGrid))
|
||||
return false;
|
||||
}
|
||||
//step #1 part2 否则如果是grid产英雄
|
||||
if (actionParams.MainObjectType == MainObjectType.Grid)
|
||||
{
|
||||
//从actionParams获得准确的gridData
|
||||
_finalGrid = actionParams.GridData;
|
||||
if (actionParams.CityData != null)
|
||||
_finalCity = actionParams.CityData;
|
||||
else
|
||||
actionParams.MapData.GetCityDataByTerritoryGid(_finalGrid.Id, out _finalCity);
|
||||
}
|
||||
if (_finalGrid == null) return false;
|
||||
|
||||
//step #2 确定giant的真实level
|
||||
var realLv = actionParams.MapData.GetGiantRealLv(_actionId.GiantType,actionParams.PlayerData);
|
||||
//如果还没拥有科技,那只能是lv0
|
||||
if (!TrainUnitActionCheckHasTech(actionParams)) realLv = 0;
|
||||
//step #3 生产新单位
|
||||
_newUnit = actionParams.MapData.AddUnitData(_finalGrid.Id,_finalCity.Id,_actionId.UnitType,_actionId.GiantType,realLv);
|
||||
//step #4 更新新单位周围的视野
|
||||
Main.PlayerLogic.UpdateSight(actionParams.MapData,actionParams.PlayerData,actionParams.MapData.GridMap.GetAroundGridIdList(_newUnit.GetSightRange(),_finalGrid));
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool CheckCan(CommonActionParams actionParam)
|
||||
{
|
||||
//step #0 基础鲁棒性 (playerData不能为空 不是英雄则直接排除
|
||||
if(_actionId.UnitType != UnitType.Giant) return false;
|
||||
if (!TrainUnitActionCheckBaseData(actionParam)) return false;
|
||||
|
||||
GridData gridData;
|
||||
PlayerData playerData;
|
||||
CityData cityData;
|
||||
|
||||
|
||||
//Part1 如果是城市产英雄
|
||||
if (actionParam.MainObjectType == MainObjectType.City)
|
||||
{
|
||||
|
||||
//step #1 city产兵的特殊鲁棒性
|
||||
if (actionParam.CityData == null) return false;
|
||||
//step #2 check player操作的city 是不是自己的city,存储gridData
|
||||
if (!TrainUnitActionCheckCityBelongPlayer(actionParam)) return false;
|
||||
//step #3 赋值gridData(city的位置)
|
||||
if (!actionParam.MapData.GetGridDataByCityId(actionParam.CityData.Id, out gridData)) return false;
|
||||
//step #4如果没科技,且不是首发英雄,return
|
||||
if(!TrainUnitActionCheckHasTech(actionParam) && actionParam.PlayerData.FirstHero != _actionId.GiantType) return false;
|
||||
//step #5 确认城市是否满员
|
||||
if (TrainUnitActionCheckCityFullPop(actionParam)) return false;
|
||||
//step #6 如果城市上面有单位,不能生产,不显示
|
||||
if (TrainUnitActionCheckUnitOnCity(actionParam)) return false;
|
||||
//step #7 如果英雄在冷却cd
|
||||
if (CheckGiantHasColdTime(actionParam)) return false;
|
||||
//step #8 如果英雄违反了UNIQUE或类似的技能如QUARTET
|
||||
if (CheckGiantHasOne(actionParam)) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
//Part2 如果是grid产英雄
|
||||
if (actionParam.MainObjectType == MainObjectType.Grid)
|
||||
{
|
||||
//step #1 确认基础鲁棒性
|
||||
if (actionParam.GridData == null) return false;
|
||||
gridData = actionParam.GridData;
|
||||
//step #2 进行基础赋值
|
||||
if (!actionParam.MapData.GetCityDataByTerritoryGid(gridData.Id, out cityData)) return false;
|
||||
if (!actionParam.MapData.GetPlayerDataByCityId(cityData.Id, out playerData)) return false;
|
||||
//step #3 check grid是不是player的
|
||||
if (TrainUnitActionCheckGridBelongPlayer(actionParam)) return false;
|
||||
//step #4如果没科技,且不是首发英雄,return
|
||||
if(!TrainUnitActionCheckHasTech(actionParam) && actionParam.PlayerData.FirstHero != _actionId.GiantType) return false;
|
||||
//step #5 如果城市满员
|
||||
if (TrainUnitActionCheckCityFullPop(actionParam)) return false;
|
||||
//step #6如果格子上面有单位,不能生产,不显示
|
||||
if (TrainUnitActionCheckUnitOnGrid(actionParam)) return false;
|
||||
//step #7 如果英雄在冷却cd
|
||||
if (CheckGiantHasColdTime(actionParam)) return false;
|
||||
//step #8 如果英雄违反了UNIQUE或类似的技能如QUARTET
|
||||
if (CheckGiantHasOne(actionParam)) return false;
|
||||
|
||||
//Part 2.3
|
||||
//下面全部是神像产兵
|
||||
if (_actionId.UnitType == UnitType.Giant
|
||||
&& _actionId.GiantType == GiantType.EgyptianFlandre
|
||||
&& playerData.PlayerForceId == 0
|
||||
&& playerData.PlayerCivId == 0
|
||||
&& gridData.Resource == ResourceType.Temple)
|
||||
return true;
|
||||
if (_actionId.UnitType == UnitType.Giant
|
||||
&& _actionId.GiantType == GiantType.EgyptianPatchouli
|
||||
&& playerData.PlayerForceId == 0
|
||||
&& playerData.PlayerCivId == 0
|
||||
&& gridData.Resource == ResourceType.ForestTemple)
|
||||
return true;
|
||||
if (_actionId.UnitType == UnitType.Giant
|
||||
&& _actionId.GiantType == GiantType.EgyptianMeiling
|
||||
&& playerData.PlayerForceId == 0
|
||||
&& playerData.PlayerCivId == 0
|
||||
&& gridData.Resource == ResourceType.MountainTemple)
|
||||
return true;
|
||||
if (_actionId.UnitType == UnitType.Giant
|
||||
&& _actionId.GiantType == GiantType.EgyptianSakuya
|
||||
&& playerData.PlayerForceId == 0
|
||||
&& playerData.PlayerCivId == 0
|
||||
&& gridData.Resource == ResourceType.WaterTemple)
|
||||
return true;
|
||||
if (_actionId.UnitType == UnitType.Giant
|
||||
&& _actionId.GiantType == GiantType.EgyptianRemilia
|
||||
&& playerData.PlayerForceId == 0
|
||||
&& playerData.PlayerCivId == 0
|
||||
&& gridData.Resource == ResourceType.KingTemple)
|
||||
return true;
|
||||
|
||||
}
|
||||
return false;
|
||||
|
||||
}
|
||||
public override bool CheckShow(CommonActionParams actionParam)
|
||||
{
|
||||
//step #0 基础鲁棒性 (playerData不能为空 不是英雄则直接排除
|
||||
if(_actionId.UnitType != UnitType.Giant) return false;
|
||||
if (!TrainUnitActionCheckBaseData(actionParam)) return false;
|
||||
|
||||
GridData gridData;
|
||||
PlayerData playerData;
|
||||
CityData cityData;
|
||||
|
||||
|
||||
//Part1 如果是城市产英雄
|
||||
if (actionParam.MainObjectType == MainObjectType.City)
|
||||
{
|
||||
|
||||
//step #1 city产兵的特殊鲁棒性
|
||||
if (actionParam.CityData == null) return false;
|
||||
//step #2 check player操作的city 是不是自己的city,存储gridData
|
||||
if (!TrainUnitActionCheckCityBelongPlayer(actionParam)) return false;
|
||||
//step #3 赋值gridData(city的位置)
|
||||
if (!actionParam.MapData.GetGridDataByCityId(actionParam.CityData.Id, out gridData)) return false;
|
||||
//step #4如果没科技,且不是首发英雄,return
|
||||
if(!TrainUnitActionCheckHasTech(actionParam) && actionParam.PlayerData.FirstHero != _actionId.GiantType) return false;
|
||||
//step #5 确认城市是否满员
|
||||
//if (TrainUnitActionCheckCityFullPop(actionParam)) return false;
|
||||
//step #6 如果城市上面有单位,不能生产,不显示
|
||||
if (TrainUnitActionCheckUnitOnCity(actionParam)) return false;
|
||||
//step #7 如果英雄在冷却cd
|
||||
//if (CheckGiantHasColdTime(actionParam)) return false;
|
||||
//step #8 如果英雄违反了UNIQUE或类似的技能如QUARTET
|
||||
if (CheckGiantHasOne(actionParam)) return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
//Part2 如果是grid产英雄
|
||||
if (actionParam.MainObjectType == MainObjectType.Grid)
|
||||
{
|
||||
//step #1 确认基础鲁棒性
|
||||
if (actionParam.GridData == null) return false;
|
||||
gridData = actionParam.GridData;
|
||||
//step #2 进行基础赋值
|
||||
if (!actionParam.MapData.GetCityDataByTerritoryGid(gridData.Id, out cityData)) return false;
|
||||
if (!actionParam.MapData.GetPlayerDataByCityId(cityData.Id, out playerData)) return false;
|
||||
//step #3 check grid是不是player的
|
||||
if (TrainUnitActionCheckGridBelongPlayer(actionParam)) return false;
|
||||
//step #4如果没科技,且不是首发英雄,return
|
||||
if(!TrainUnitActionCheckHasTech(actionParam) && actionParam.PlayerData.FirstHero != _actionId.GiantType) return false;
|
||||
//step #5 如果城市满员
|
||||
//if (TrainUnitActionCheckCityFullPop(actionParam)) return false;
|
||||
//step #6如果格子上面有单位,不能生产,不显示
|
||||
if (TrainUnitActionCheckUnitOnGrid(actionParam)) return false;
|
||||
//step #7 如果英雄在冷却cd
|
||||
//if (CheckGiantHasColdTime(actionParam)) return false;
|
||||
//step #8 如果英雄违反了UNIQUE或类似的技能如QUARTET
|
||||
if (CheckGiantHasOne(actionParam)) return false;
|
||||
|
||||
//Part 2.3
|
||||
//下面全部是神像产兵
|
||||
if (_actionId.UnitType == UnitType.Giant
|
||||
&& _actionId.GiantType == GiantType.EgyptianFlandre
|
||||
&& playerData.PlayerForceId == 0
|
||||
&& playerData.PlayerCivId == 0
|
||||
&& gridData.Resource == ResourceType.Temple)
|
||||
return true;
|
||||
if (_actionId.UnitType == UnitType.Giant
|
||||
&& _actionId.GiantType == GiantType.EgyptianPatchouli
|
||||
&& playerData.PlayerForceId == 0
|
||||
&& playerData.PlayerCivId == 0
|
||||
&& gridData.Resource == ResourceType.ForestTemple)
|
||||
return true;
|
||||
if (_actionId.UnitType == UnitType.Giant
|
||||
&& _actionId.GiantType == GiantType.EgyptianMeiling
|
||||
&& playerData.PlayerForceId == 0
|
||||
&& playerData.PlayerCivId == 0
|
||||
&& gridData.Resource == ResourceType.MountainTemple)
|
||||
return true;
|
||||
if (_actionId.UnitType == UnitType.Giant
|
||||
&& _actionId.GiantType == GiantType.EgyptianSakuya
|
||||
&& playerData.PlayerForceId == 0
|
||||
&& playerData.PlayerCivId == 0
|
||||
&& gridData.Resource == ResourceType.WaterTemple)
|
||||
return true;
|
||||
if (_actionId.UnitType == UnitType.Giant
|
||||
&& _actionId.GiantType == GiantType.EgyptianRemilia
|
||||
&& playerData.PlayerForceId == 0
|
||||
&& playerData.PlayerCivId == 0
|
||||
&& gridData.Resource == ResourceType.KingTemple)
|
||||
return true;
|
||||
|
||||
}
|
||||
return false;
|
||||
|
||||
|
||||
}
|
||||
|
||||
public override bool ExecuteViewBefore(CommonActionParams actionParams)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool ExecuteViewAfter(CommonActionParams actionParams)
|
||||
{
|
||||
//step #0 如果不是真map 不做动画
|
||||
if (Main.MapData != actionParams.MapData) return false;
|
||||
|
||||
//step #1 更新产兵的格子的renderMark
|
||||
_finalCity.CityInfoRenderMark = true;
|
||||
|
||||
//step #2 增加得分,然后处理得分动画
|
||||
var v1 = Table.Instance.GridToWorld(_finalGrid);
|
||||
int score = GetCost() * 5;
|
||||
if (actionParams.PlayerData.Id == actionParams.MapData.PlayerMap.SelfPlayerData.Id)
|
||||
{
|
||||
var faithPanel = GameObject.Find("UICanvas/TopBarPanel/FaithPanel/Icon").transform;
|
||||
var endPos = faithPanel.position;
|
||||
MapRenderer.Instance.ProjectileManager.CreateProjectile(v1,endPos,ProjectileType.Faith,ProjectileMoveType.CoinParabola,score);
|
||||
}
|
||||
AchievementDataManager.Instance.OnTrainUnit(actionParams.MapData, actionParams.PlayerData, actionParams.CityData, _newUnit);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e2e7f7aef51de4b44b702a2b02abf0df
|
||||
timeCreated: 1744256792
|
||||
@ -817,7 +817,8 @@ namespace Logic.Action
|
||||
if(unit == null || unit.UnitType != UnitType.Giant || unit.GiantType == GiantType.None || unit.UnitLevel >= 5) return false;
|
||||
if(!Table.Instance.UnitTypeDataAssets.GetUnitTypeInfo(unit.UnitType,unit.GiantType,unit.UnitLevel,out var info)) return false;
|
||||
//如果当前可以到达的level <= 当前的实际unitLevel
|
||||
if (Table.Instance.GiantExpToLevel(player.giantExp[(uint)info.ChessType]) <= unit.UnitLevel) return false;
|
||||
var realLv = actionParams.MapData.GetGiantRealLv(unit.GiantType,player);
|
||||
if (realLv <= unit.UnitLevel) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using RuntimeData;
|
||||
using TH1Renderer;
|
||||
|
||||
|
||||
namespace Logic.Skill
|
||||
@ -28,26 +29,52 @@ namespace Logic.Skill
|
||||
return SkillType.ALLYCOUNTER;
|
||||
}
|
||||
|
||||
public override void OnEvent(IdentifierBase identifier, SkillDamageEvent skillEvent, MapData mapData, SettlementInfo info)
|
||||
public override void OnUnitDamaged(IdentifierBase identifier, MapData mapData, SettlementInfo info)
|
||||
{
|
||||
if (skillEvent != SkillDamageEvent.ActiveAttackFinished) return;
|
||||
if (info == null) return;
|
||||
//必须是主动攻击
|
||||
if (info.DamageType != DamageType.ActiveAttack) return;
|
||||
if (info.DamageOrigin == null || info.DamageTarget == null) return;
|
||||
//不能打的是我,要打的别人
|
||||
if (identifier is not UnitData self) return;
|
||||
if (!mapData.GetGridDataByUnitId(self.Id, out var selfGrid)) return;
|
||||
|
||||
var selfUnitList = new HashSet<UnitData>();
|
||||
mapData.GetUnitDataListByPlayerId(mapData.PlayerMap.SelfPlayerId, selfUnitList);
|
||||
if (selfUnitList.Contains(info.DamageOrigin)) return;
|
||||
if (!selfUnitList.Contains(info.DamageTarget)) return;
|
||||
|
||||
if (!mapData.GetPlayerIdByUnitId(info.DamageOrigin.Id, out var originPlayer)) return;
|
||||
if (!mapData.GetPlayerIdByUnitId(info.DamageTarget.Id, out var targetPlayer)) return;
|
||||
if (!mapData.GetPlayerIdByUnitId( self.Id, out var selfPlayer)) return;
|
||||
//来源是友军就返回
|
||||
if (mapData.SameUnion(originPlayer,selfPlayer)) return;
|
||||
//目标不是友军就返回
|
||||
if (!mapData.SameUnion(targetPlayer,selfPlayer)) return;
|
||||
|
||||
if (!mapData.GetGridDataByUnitId(info.DamageOrigin.Id, out var originGrid)) return;
|
||||
if (!mapData.GetGridDataByUnitId(info.DamageTarget.Id, out var targetGrid)) return;
|
||||
//双方都必须在2格内
|
||||
var roundGrids = mapData.GridMap.GetAroundGridDataSet(2, 2, selfGrid);
|
||||
if (!roundGrids.Contains(originGrid) || !roundGrids.Contains(targetGrid)) return;
|
||||
//判定成功,开始增加追加伤害
|
||||
Main.UnitLogic.DamageSettlement(mapData, self, info.DamageOrigin, 5, DamageType.FollowAttack);
|
||||
_duration = 0.5f;
|
||||
self.AttackRenderMark = true;
|
||||
self.AttackRenderMarkAttackAnimType = self.GetAttackRange() switch
|
||||
{
|
||||
1 => AttackAnimType.Melee, 2 => AttackAnimType.Arrow, 3 => AttackAnimType.Bomb,
|
||||
_ => AttackAnimType.None
|
||||
};
|
||||
if (self.GiantType == GiantType.EgyptianRemilia)
|
||||
self.AttackRenderMarkAttackAnimType = AttackAnimType.RemiliaAttack;
|
||||
self.AttackRenderMarkTargetPos = Table.Instance.GridToWorld(originGrid,"isUnit");
|
||||
self.AttackRenderMarkNeedBack = false;
|
||||
Timer.Instance.TimerRegister(this,() =>
|
||||
{
|
||||
var t = new GridVFXRenderMark(GridVFXType.Damage);
|
||||
t.Damage = 5;
|
||||
originGrid.SetGridVFXRenderMark(t);
|
||||
originGrid.VFXRenderMarkHurt = true;
|
||||
},Table.Instance.AnimDataAssets.AttackArrowTime,"OnUnitDamaged Skill Attack");
|
||||
|
||||
Main.UnitLogic.DamageSettlement(mapData, self, self, 3, DamageType.FollowAttack);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -27,12 +27,12 @@ namespace Logic.Skill
|
||||
return SkillType.SWAP;
|
||||
}
|
||||
|
||||
public override void OnEvent(IdentifierBase identifier, SkillDamageEvent skillEvent, MapData mapData, SettlementInfo info)
|
||||
public override void OnDamageOther(MapData mapData, SettlementInfo info)
|
||||
{
|
||||
if (skillEvent != SkillDamageEvent.ActiveAttackBeforeStarted) return;
|
||||
|
||||
if (info == null) return;
|
||||
if (info.DamageOrigin == null || info.DamageTarget == null) return;
|
||||
|
||||
if (info.DamageType != DamageType.ActiveAttack) return;
|
||||
if (!mapData.GetGridDataByUnitId(info.DamageOrigin.Id, out var selfGrid)) return;
|
||||
if (!mapData.GetGridDataByUnitId(info.DamageTarget.Id, out var targetGrid)) return;
|
||||
mapData.SetUnitIdToGridId(info.DamageOrigin.Id, targetGrid.Id);
|
||||
|
||||
@ -108,16 +108,11 @@ namespace Logic.Skill
|
||||
// 获取暴击率
|
||||
public float GetCriticalHitRate(UnitData self, MapData mapData);
|
||||
|
||||
// 伤害相关事件触发
|
||||
public void OnEvent(SkillDamageEvent skillEvent, MapData mapData, SettlementInfo info);
|
||||
|
||||
// 全局技能
|
||||
// 当有单位受伤结算时
|
||||
public void OnUnitDamaged(IdentifierBase identifier, MapData mapData, SettlementInfo info);
|
||||
|
||||
// 伤害相关事件触发
|
||||
public void OnEvent(IdentifierBase identifier, SkillDamageEvent skillEvent, MapData mapData,
|
||||
SettlementInfo info);
|
||||
|
||||
// 当有单位移动时
|
||||
public void OnOtherUnitMove(IdentifierBase identifier, UnitData moveUnit, GridData target, MapData mapData);
|
||||
@ -131,6 +126,8 @@ namespace Logic.Skill
|
||||
[SerializeField] protected uint TurnsLimit;
|
||||
[SerializeField] protected float Score;
|
||||
|
||||
protected float _duration;
|
||||
|
||||
public SkillBase()
|
||||
{
|
||||
Turns = 0;
|
||||
@ -346,21 +343,13 @@ namespace Logic.Skill
|
||||
return 0;
|
||||
}
|
||||
|
||||
public virtual void OnEvent(SkillDamageEvent skillEvent, MapData mapData, SettlementInfo info)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
public virtual void OnUnitDamaged(IdentifierBase identifier, MapData mapData, SettlementInfo info)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public virtual void OnEvent(IdentifierBase identifier, SkillDamageEvent skillEvent, MapData mapData, SettlementInfo info)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public virtual void OnOtherUnitMove(IdentifierBase identifier, UnitData moveUnit, GridData target, MapData mapData)
|
||||
{
|
||||
|
||||
|
||||
@ -257,6 +257,11 @@ namespace Logic
|
||||
1 => AttackAnimType.Melee, 2 => AttackAnimType.Arrow, 3 => AttackAnimType.Bomb,
|
||||
_ => AttackAnimType.None
|
||||
};
|
||||
if (unit1.GiantType == GiantType.EgyptianPatchouli)
|
||||
unit1.AttackRenderMarkAttackAnimType = AttackAnimType.PatchouliAttack;
|
||||
/*if (unit1.GiantType == GiantType.EgyptianRemilia)
|
||||
unit1.AttackRenderMarkAttackAnimType = AttackAnimType.RemiliaAttack;*/
|
||||
|
||||
unit1.AttackRenderMarkTargetPos = Table.Instance.GridToWorld(grid2,"isUnit");
|
||||
unit1.AttackRenderMarkNeedBack = true;
|
||||
|
||||
@ -398,6 +403,15 @@ namespace Logic
|
||||
//如果是真map,才播放动画
|
||||
if(map == Main.MapData)
|
||||
DieAnimRenderMarkUpadate(targetGrid, unit, dmg,true);
|
||||
|
||||
//如果是伟人死亡,对应的player受到惩罚 penalty=4
|
||||
if (unit.UnitType == UnitType.Giant
|
||||
&& map.GetPlayerDataByUnitId(unit.Id, out var player) &&
|
||||
Table.Instance.UnitTypeDataAssets.GetUnitTypeInfo(unit.UnitType, unit.GiantType, unit.UnitLevel,
|
||||
out var info))
|
||||
player.giantPenalty[(uint)info.ChessType] = 4;
|
||||
|
||||
|
||||
Main.UnitLogic.Die(map, unit);
|
||||
}
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@ using Unity.Collections;
|
||||
namespace TH1Renderer
|
||||
{
|
||||
|
||||
public enum ProjectileType { Arrow, Bomb, MagicFireBall,CityExp,Coin, Faith}
|
||||
public enum ProjectileType { Arrow, Bomb, MagicFireBall,CityExp,Coin, Faith,RemiliaAttack,PatchouliAttack}
|
||||
public enum ProjectileMoveType { Straight, Parabola,HighParabola,CityExpHighParabola, CoinParabola,Spin, Curved,Bounce,SpecialAnimation}
|
||||
|
||||
public class ProjectileData
|
||||
|
||||
@ -36,6 +36,16 @@ namespace TH1Renderer
|
||||
foreach (Transform child in _ROprojectile.transform)
|
||||
child.gameObject.SetActive(false);
|
||||
|
||||
if (projectileData.ProjectileType == ProjectileType.PatchouliAttack)
|
||||
{
|
||||
_ROprojectile.transform.Find("PatchouliAttack").gameObject.SetActive(true);
|
||||
moveFullTime = Table.Instance.AnimDataAssets.ProjectileMoveTime;
|
||||
}
|
||||
if (projectileData.ProjectileType == ProjectileType.RemiliaAttack)
|
||||
{
|
||||
_ROprojectile.transform.Find("RemiliaAttack").gameObject.SetActive(true);
|
||||
moveFullTime = Table.Instance.AnimDataAssets.ProjectileMoveTime;
|
||||
}
|
||||
if (projectileData.ProjectileType == ProjectileType.Arrow)
|
||||
{
|
||||
_ROprojectile.transform.Find("Arrow").gameObject.SetActive(true);
|
||||
|
||||
@ -70,6 +70,11 @@ namespace TH1Renderer
|
||||
private bool _isAttackBack = false;
|
||||
private bool _isAttackArrow = false;
|
||||
private bool _isAttackBomb = false;
|
||||
private bool _isAttackRemilia = false;
|
||||
private bool _isAttackPatchouli = false;
|
||||
|
||||
|
||||
|
||||
private Vector3 _attackTargetPos, _attackBackPos;
|
||||
private bool _needBack;
|
||||
private float _attackGoFullTime = 0.15f;
|
||||
@ -294,14 +299,27 @@ namespace TH1Renderer
|
||||
else if (_isAttackArrow)
|
||||
{
|
||||
MapRenderer.Instance.ProjectileManager.CreateProjectile(_attackBackPos,_attackTargetPos,ProjectileType.Arrow,ProjectileMoveType.Parabola);
|
||||
|
||||
_isAttackArrow = false;
|
||||
_needAttack = false;
|
||||
}
|
||||
else if (_isAttackBomb)
|
||||
{
|
||||
MapRenderer.Instance.ProjectileManager.CreateProjectile(_attackBackPos,_attackTargetPos,ProjectileType.Bomb,ProjectileMoveType.Parabola);
|
||||
_isAttackBomb = false;
|
||||
_needAttack = false;
|
||||
}
|
||||
else if (_isAttackRemilia)
|
||||
{
|
||||
MapRenderer.Instance.ProjectileManager.CreateProjectile(_attackBackPos,_attackTargetPos,ProjectileType.RemiliaAttack,ProjectileMoveType.Straight);
|
||||
_isAttackRemilia = false;
|
||||
_needAttack = false;
|
||||
}
|
||||
else if (_isAttackPatchouli)
|
||||
{
|
||||
MapRenderer.Instance.ProjectileManager.CreateProjectile(_attackBackPos,_attackTargetPos,ProjectileType.PatchouliAttack,ProjectileMoveType.Straight);
|
||||
_isAttackPatchouli = false;
|
||||
_needAttack = false;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
@ -624,6 +642,17 @@ namespace TH1Renderer
|
||||
_isAttackBomb = true;
|
||||
_isAttackBack = false;
|
||||
}
|
||||
else if (attackAnimType == AttackAnimType.RemiliaAttack)
|
||||
{
|
||||
_isAttackRemilia = true;
|
||||
_isAttackBack = false;
|
||||
}
|
||||
else if (attackAnimType == AttackAnimType.PatchouliAttack)
|
||||
{
|
||||
_isAttackPatchouli = true;
|
||||
_isAttackBack = false;
|
||||
}
|
||||
|
||||
|
||||
_attackTargetPos = targetPos;
|
||||
_attackBackPos = _ROUnit.transform.position;
|
||||
|
||||
@ -6,6 +6,7 @@ using MongoDB.Driver;
|
||||
using RuntimeData;
|
||||
using TH1Resource;
|
||||
using UI;
|
||||
using UI.HintUI;
|
||||
using UnityEngine.UI;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEditor;
|
||||
@ -26,7 +27,7 @@ public class BottomBarUI
|
||||
public Transform ChooseFirstHeroPanel;
|
||||
public Transform TutorPanel;
|
||||
|
||||
private TechType _chooseFirstHeroType;
|
||||
private GiantType _chooseFirstHeroType;
|
||||
|
||||
private Main _main;
|
||||
|
||||
@ -193,29 +194,33 @@ public class BottomBarUI
|
||||
|
||||
var btn = child.Find("BG")?.GetComponent<Button>();
|
||||
if (btn == null) continue;
|
||||
var tech = child.Find("BG")?.GetComponent<TechTypeMono>()?.TechType;
|
||||
if(tech == null)continue;
|
||||
var giantType = child.Find("BG")?.GetComponent<UnitTypeMono>()?.GiantType;
|
||||
|
||||
if(giantType == null)continue;
|
||||
|
||||
btn.onClick.RemoveAllListeners();
|
||||
btn.onClick.AddListener(() =>
|
||||
{
|
||||
_chooseFirstHeroType = tech.Value;
|
||||
|
||||
_chooseFirstHeroType = giantType.Value;
|
||||
Debug.Log(_chooseFirstHeroType);
|
||||
foreach (Transform chd in choosedGroup)
|
||||
{
|
||||
chd.gameObject.SetActive(false);
|
||||
var chdtech = chd?.GetComponent<TechTypeMono>()?.TechType;
|
||||
if(chdtech== tech) chd.gameObject.SetActive(true);
|
||||
var chdgiant = chd.GetComponent<UnitTypeMono>()?.GiantType;
|
||||
Debug.Log(chdgiant + " & " + giantType);
|
||||
if(chdgiant == giantType) chd.gameObject.SetActive(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//step #3 默认选中蕾米莉亚
|
||||
_chooseFirstHeroType = TechType.EgyptRemilia;
|
||||
_chooseFirstHeroType = GiantType.EgyptianRemilia;
|
||||
foreach (Transform chd in choosedGroup)
|
||||
{
|
||||
chd.gameObject.SetActive(false);
|
||||
var chdtech2 = chd?.GetComponent<TechTypeMono>()?.TechType;
|
||||
if(chdtech2 == TechType.EgyptRemilia) chd.gameObject.SetActive(true);
|
||||
var chdgiant2 = chd.GetComponent<UnitTypeMono>().GiantType;
|
||||
if(chdgiant2 == _chooseFirstHeroType) chd.gameObject.SetActive(true);
|
||||
}
|
||||
|
||||
//step #4 绑定选中和取消按钮
|
||||
@ -223,7 +228,9 @@ public class BottomBarUI
|
||||
ChooseFirstHeroPanel.Find("YesButton").GetComponent<Button>()?.onClick.AddListener(() =>
|
||||
{
|
||||
Main.MapData.PlayerMap.SelfPlayerData.HasFirstHero = true;
|
||||
Main.PlayerLogic.ResearchTech(Main.MapData,Main.MapData.PlayerMap.SelfPlayerData,_chooseFirstHeroType,0);
|
||||
Main.MapData.PlayerMap.SelfPlayerData.FirstHero = _chooseFirstHeroType;
|
||||
//Main.PlayerLogic.ResearchTech(Main.MapData,Main.MapData.PlayerMap.SelfPlayerData,_chooseFirstHeroType,0);
|
||||
|
||||
ChooseFirstHeroButton.gameObject.SetActive(false);
|
||||
var anim = ChooseFirstHeroPanel.GetComponent<AnimancerComponent>();
|
||||
if (anim != null)
|
||||
|
||||
@ -661,8 +661,8 @@ public class BottomInfoUI// : MonoBehaviour
|
||||
if(Table.Instance.ActionDataAssets.GetActionInfo(fakeActionId, out var info) && info.Cost > Main.MapData.PlayerMap.SelfPlayerData.PlayerWealth)
|
||||
return;
|
||||
//如果没科技,退出
|
||||
if (!Main.MapData.PlayerMap.SelfPlayerData.TechTree.CheckActionCan(fakeActionId))
|
||||
return;
|
||||
/*if (!Main.MapData.PlayerMap.SelfPlayerData.TechTree.CheckActionCan(fakeActionId) )
|
||||
return;*/
|
||||
UnitData unitData = null;
|
||||
CityData cityData = null;
|
||||
GridData gridData = null;
|
||||
@ -750,13 +750,39 @@ public class BottomInfoUI// : MonoBehaviour
|
||||
//如果是city的action
|
||||
if (UIBottomInfoIsGrid)
|
||||
{
|
||||
//如果科技未解锁
|
||||
if (!Main.MapData.PlayerMap.SelfPlayerData.TechTree.CheckActionCan(tActionId))
|
||||
//如果科技未解锁 且不是firstHero
|
||||
if (!Main.MapData.PlayerMap.SelfPlayerData.TechTree.CheckActionCan(tActionId)
|
||||
&& (tActionId.GiantType != Main.MapData.PlayerMap.SelfPlayerData.FirstHero))
|
||||
{
|
||||
|
||||
|
||||
starImage.gameObject.SetActive(false);
|
||||
textUIComponent.gameObject.SetActive(false);
|
||||
backImage.sprite = ActionBGUnavailable;
|
||||
}
|
||||
|
||||
//如果是firstHero,或者其他hero,要考虑因为冷却时间导致的锁
|
||||
if (tActionId.GiantType != GiantType.None)
|
||||
{
|
||||
Table.Instance.UnitTypeDataAssets.GetUnitTypeInfo(UnitType.Giant, tActionId.GiantType, 0,
|
||||
out var info);
|
||||
//如果在冷却死亡惩罚时间内,也要显示灰色,并且加上漏斗
|
||||
if (info != null && Main.MapData.PlayerMap.SelfPlayerData.giantPenalty[(uint)info.ChessType] > 0)
|
||||
{
|
||||
Transform cd = child.Find("ColdDown");
|
||||
TextMeshProUGUI txt = cd?.Find("Text")?.GetComponent<TextMeshProUGUI>();
|
||||
if(cd != null) cd.gameObject.SetActive(true);
|
||||
if (txt != null) txt.text = Main.MapData.PlayerMap.SelfPlayerData.giantPenalty[(uint)info.ChessType].ToString();
|
||||
backImage.sprite = ActionBGUnavailable;
|
||||
}
|
||||
else
|
||||
{
|
||||
Transform cd = child.Find("ColdDown");
|
||||
if(cd != null) cd.gameObject.SetActive(false);
|
||||
|
||||
backImage.sprite = ActionBGAvailable;
|
||||
}
|
||||
}
|
||||
|
||||
CityData cityData;
|
||||
//如果是一个满员城市在grid上生产单位,要额外判断一下这个是不是生产单位的行为
|
||||
|
||||
27
Unity/Assets/Scripts/UI/UnitTypeMono.cs
Normal file
27
Unity/Assets/Scripts/UI/UnitTypeMono.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Logic.Action;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UI
|
||||
{
|
||||
public class UnitTypeMono : MonoBehaviour
|
||||
{
|
||||
public UnitType UnitType;
|
||||
public GiantType GiantType;
|
||||
|
||||
public uint UnitLevel;
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
11
Unity/Assets/Scripts/UI/UnitTypeMono.cs.meta
Normal file
11
Unity/Assets/Scripts/UI/UnitTypeMono.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3f4685a36cc58f248acfe87aa94c5984
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user