更新了埃及特性功能,更新了英雄技能效果

This commit is contained in:
daixiawu 2025-06-26 00:24:06 +08:00
parent 2228adb12c
commit 98f9934af3
32 changed files with 824 additions and 173 deletions

View File

@ -27,7 +27,7 @@ MonoBehaviour:
_version: 3.33
_category:
_comments:
_translation: {x: 294, y: 37}
_zoomFactor: 0.98072547
_translation: {x: 215.61038, y: 443.87662}
_zoomFactor: 1
_haltSerialization: 0
_externalSerializationFile: {fileID: 0}

View File

@ -18,7 +18,7 @@ MonoBehaviour:
_version: 3.33
_category:
_comments:
_translation: {x: -403, y: -2359}
_translation: {x: -663, y: -1810}
_zoomFactor: 1
_haltSerialization: 0
_externalSerializationFile: {fileID: 0}

View File

@ -18,7 +18,7 @@ MonoBehaviour:
_version: 3.33
_category:
_comments:
_translation: {x: -5292, y: 200}
_zoomFactor: 0.76336604
_translation: {x: -1572, y: 822}
_zoomFactor: 0.25009757
_haltSerialization: 0
_externalSerializationFile: {fileID: 0}

View File

@ -18,7 +18,7 @@ MonoBehaviour:
_version: 3.33
_category:
_comments:
_translation: {x: -976.96783, y: -62.574696}
_zoomFactor: 0.30881974
_translation: {x: -1692, y: -275}
_zoomFactor: 0.6342552
_haltSerialization: 0
_externalSerializationFile: {fileID: 0}

View File

@ -22,6 +22,10 @@ MonoBehaviour:
BetweenAttackCounterAnimTime: 0.2
MoveAnimTime: 0.15
ExplorerMoveDelay: 0.15
AIAfterMoveColdDownTime: 0.5
AIAfterAttackColdDownTime: 0.5
AIBeforeAnimWaitTime: 1
AIAnimCameraMoveTime: 0.5
ProjectileMoveTime: 0.3
ProjectileBombMoveTime: 0.5
ProjectileCityExpMoveTime: 0.5

View File

@ -88,7 +88,7 @@ MonoBehaviour:
- SkillType: 43
SkillDesc: "<color=yellow>\u5438\u8840\u9B3C</color>:\u88AB\u52A8\u6280\u80FD\u3002\u653B\u51FB\u65F6\u6062\u590D\u4F24\u5BB330%\u7684\u8840\u91CF\u3002"
- SkillType: 44
SkillDesc:
SkillDesc: "<color=yellow>\u94F6\u4E4B\u8DF3\u8DC3</color>:\u88AB\u52A8\u6280\u80FD\u3002\u79FB\u52A8\u5230\u53CB\u65B9\u4F1F\u4EBA\u9644\u8FD1\u540E\u53EF\u518D\u653B\u51FB\u4E00\u6B21\u3002\u51FB\u6740\u5355\u4F4D\u540E\u53EF\u518D\u79FB\u52A8\u4E00\u6B21\u3002"
- SkillType: 45
SkillDesc:
- SkillType: 46

View File

@ -1022,7 +1022,7 @@ MonoBehaviour:
AttackRange: 1
MoveRange: 1
Cost: 15
Skills: 250000002600000004000000200000000d000000
Skills: 260000002c000000200000000d000000
Sprite: {fileID: 21300000, guid: 869a247f7a81bff4c872f47d8e8e9cfe, type: 3}
SpriteGlow: {fileID: 21300000, guid: a03eb25b8ec6903448d09ffef670f2bd, type: 3}
IsSpriteVarient: 0

View File

@ -22,6 +22,10 @@ MonoBehaviour:
BetweenAttackCounterAnimTime: 0.2
MoveAnimTime: 0.15
ExplorerMoveDelay: 0.15
AIAfterMoveColdDownTime: 0.5
AIAfterAttackColdDownTime: 0.5
AIBeforeAnimWaitTime: 1
AIAnimCameraMoveTime: 0.5
ProjectileMoveTime: 0.3
ProjectileBombMoveTime: 0.5
ProjectileCityExpMoveTime: 0.5

View File

@ -5536,3 +5536,165 @@ MonoBehaviour:
EN:
JP:
KR:
- ID: 887
ZH: "<color=yellow>\u548C\u5E73</color>:\u88AB\u52A8\u6280\u80FD\u3002\u65E0\u6CD5\u653B\u51FB\u4EFB\u4F55\u5355\u4F4D\u3002"
TDZH:
EN:
JP:
KR:
- ID: 888
ZH: "<color=yellow>\u51B2\u950B</color>:\u88AB\u52A8\u6280\u80FD\u3002\u6BCF\u56DE\u5408\u9996\u6B21\u79FB\u52A8\u540E\u53EF\u518D\u83B7\u5F97\u4E00\u6B21\u653B\u51FB\u673A\u4F1A\u3002"
TDZH:
EN:
JP:
KR:
- ID: 889
ZH: "<color=yellow>\u9003\u8131</color>:\u88AB\u52A8\u6280\u80FD\u3002\u6BCF\u56DE\u5408\u9996\u6B21\u653B\u51FB\u540E\u53EF\u518D\u83B7\u5F97\u4E00\u6B21\u79FB\u52A8\u673A\u4F1A\u3002"
TDZH:
EN:
JP:
KR:
- ID: 890
ZH: "<color=yellow>\u8FDE\u7EED\u51FB\u6740</color>:\u88AB\u52A8\u6280\u80FD\u3002\u51FB\u6740\u654C\u4EBA\u540E\u53EF\u518D\u83B7\u5F97\u4E00\u6B21\u653B\u51FB\u673A\u4F1A\u3002"
TDZH:
EN:
JP:
KR:
- ID: 891
ZH: "<color=yellow>\u6E85\u5C04</color>:\u88AB\u52A8\u6280\u80FD\u3002\u653B\u51FB\u76EE\u6807\u5355\u4F4D\u540E\u5BF9\u5468\u56F41\u683C\u9020\u6210\u6E85\u5C04\u4F24\u5BB3\u3002"
TDZH:
EN:
JP:
KR:
- ID: 892
ZH: "<color=yellow>\u6F5C\u884C</color>:\u88AB\u52A8\u6280\u80FD\u3002\u79FB\u52A8\u65F6\u65E0\u89C6\u654C\u4EBA\u7684\u63A7\u5236\u533A\u57DF\u3002"
TDZH:
EN:
JP:
KR:
- ID: 893
ZH: "<color=yellow>\u65E0\u6CD5\u53CD\u51FB</color>:\u88AB\u52A8\u6280\u80FD\u3002\u88AB\u653B\u51FB\u65F6\u65E0\u6CD5\u8FDB\u884C\u53CD\u51FB\u3002"
TDZH:
EN:
JP:
KR:
- ID: 894
ZH: "<color=yellow>\u57CE\u9632</color>:\u88AB\u52A8\u6280\u80FD\u3002\u4F4D\u4E8E\u57CE\u5E02\u4E2D\u5FC3\u83B7\u5F97\u989D\u5916\u9632\u5FA1\u3002"
TDZH:
EN:
JP:
KR:
- ID: 895
ZH: "<color=yellow>\u6108\u7597</color>:\u4E3B\u52A8\u6280\u80FD\u3002\u56DE\u590D1\u683C\u5185\u53CB\u65B9\u5355\u4F4D4\u70B9\u751F\u547D\u503C\u3002"
TDZH:
EN:
JP:
KR:
- ID: 896
ZH: "<color=yellow>\u8F6C\u5316</color>:\u4E3B\u52A8\u6280\u80FD\u3002\u653B\u51FB\u65F6\u80FD\u5C06\u76EE\u6807\u5355\u4F4D\u8F6C\u5316\u4E3A\u5DF1\u65B9\u5355\u4F4D\u3002"
TDZH:
EN:
JP:
KR:
- ID: 897
ZH: "<color=yellow>\u8FD0\u8F7D</color>:\u88AB\u52A8\u6280\u80FD\u3002\u53EF\u8FD0\u8F7D\u4E00\u4E2A\u5176\u4ED6\u5355\u4F4D\u3002"
TDZH:
EN:
JP:
KR:
- ID: 898
ZH: "<color=yellow>\u5DE1\u6D0B</color>:\u88AB\u52A8\u6280\u80FD\u3002\u62E5\u67092\u683C\u8DDD\u79BB\u89C6\u91CE\u3002"
TDZH:
EN:
JP:
KR:
- ID: 899
ZH: "<color=yellow>\u65E0\u6CD5\u5347\u7EA7</color>:\u88AB\u52A8\u6280\u80FD\u3002\u65E0\u6CD5\u901A\u8FC7\u51FB\u6740\u5355\u4F4D\u83B7\u5F97\u7ECF\u9A8C\u5E76\u5347\u7EA7\u3002"
TDZH:
EN:
JP:
KR:
- ID: 900
ZH: "<color=yellow>\u9690\u8EAB</color>:\u88AB\u52A8\u6280\u80FD\u3002\u65E0\u6CD5\u88AB\u654C\u65B9\u770B\u5230\u3002"
TDZH:
EN:
JP:
KR:
- ID: 901
ZH: "<color=yellow>\u8D8A\u91CE</color>:\u88AB\u52A8\u6280\u80FD\u3002\u79FB\u52A8\u65F6\u65E0\u89C6\u6811\u6797\u548C\u5C71\u8109\u5E26\u6765\u7684\u51CF\u635F\u3002"
TDZH:
EN:
JP:
KR:
- ID: 902
ZH: "<color=yellow>\u5F3A\u5316</color>:\u4E3B\u52A8\u6280\u80FD\u3002\u5F3A\u53161\u683C\u8DDD\u79BB\u5185\u7684\u6240\u6709\u53CB\u65B9\u5355\u4F4D\u3002"
TDZH:
EN:
JP:
KR:
- ID: 903
ZH: "<color=yellow>\u79FB\u52A8\u6E85\u5C04</color>:\u88AB\u52A8\u6280\u80FD\u3002\u79FB\u52A8\u65F6\uFF0C\u5BF9\u5468\u56F41\u683C\u8303\u56F4\u9020\u6210\u6E85\u5C04\u4F24\u5BB3\u3002"
TDZH:
EN:
JP:
KR:
- ID: 904
ZH: "<color=yellow>\u5077\u88AD</color>:\u88AB\u52A8\u6280\u80FD\u3002\u653B\u51FB\u65F6\uFF0C\u4E0D\u4F1A\u53D7\u5230\u5BF9\u65B9\u53CD\u51FB\u3002"
TDZH:
EN:
JP:
KR:
- ID: 905
ZH: "<color=yellow>\u57CE\u5E02\u4F20\u9001</color>:\u4E3B\u52A8\u6280\u80FD\u3002\u53EF\u79FB\u52A8\u5230\u4EFB\u610F\u9053\u8DEF\u8054\u901A\u7684\u57CE\u5E02\u3002"
TDZH:
EN:
JP:
KR:
- ID: 906
ZH: "<color=yellow>\u5E87\u62A4\u53CD\u51FB</color>:\u88AB\u52A8\u6280\u80FD\u3002\u9644\u8FD1\u53CB\u519B\u53D7\u5230\u653B\u51FB\u65F6\uFF0C\u4F1A\u5BF9\u653B\u51FB\u8005\u65BD\u52A0\u8FFD\u52A0\u4F24\u5BB3\u3002"
TDZH:
EN:
JP:
KR:
- ID: 907
ZH: "<color=yellow>\u53CB\u519B\u4F20\u9001</color>:\u4E3B\u52A8\u6280\u80FD\u3002\u53EF\u79FB\u52A8\u5230\u4EFB\u4F55\u53CB\u65B9\u4F1F\u4EBA\u9644\u8FD1\u3002"
TDZH:
EN:
JP:
KR:
- ID: 908
ZH: "<color=yellow>\u56DB\u91CD\u5B58\u5728</color>:\u88AB\u52A8\u6280\u80FD\u3002\u53EF\u540C\u65F6\u5B58\u5728\u6700\u591A4\u4E2A\u8BE5\u5355\u4F4D\u3002"
TDZH:
EN:
JP:
KR:
- ID: 909
ZH: "<color=yellow>\u592A\u6781</color>:\u88AB\u52A8\u6280\u80FD\u3002\u53D7\u5230\u4F24\u5BB3\u65F6\uFF0C\u5C06\u4F24\u5BB3\u989D\u5916\u8FD4\u56DE\u7ED9\u5BF9\u65B9\u3002"
TDZH:
EN:
JP:
KR:
- ID: 910
ZH: "<color=yellow>\u54EE\u5598</color>:\u88AB\u52A8\u6280\u80FD\u3002\u6BCF\u56DE\u5408\u81EA\u52A8\u5931\u53BB2\u70B9\u751F\u547D\u3002\u4E0D\u4F1A\u9020\u6210\u6B7B\u4EA1\u3002"
TDZH:
EN:
JP:
KR:
- ID: 911
ZH: "<color=yellow>\u7687\u5BB6\u70C8\u7130</color>:\u4E3B\u52A8\u6280\u80FD\u3002\u5BF9\u5468\u56F4\u4E00\u683C\u5355\u4F4D\u9020\u6210\u56FA\u5B9A8\u70B9\u4F24\u5BB3\u3002"
TDZH:
EN:
JP:
KR:
- ID: 912
ZH: "<color=yellow>\u5438\u8840\u9B3C</color>:\u88AB\u52A8\u6280\u80FD\u3002\u653B\u51FB\u65F6\u6062\u590D\u4F24\u5BB330%\u7684\u8840\u91CF\u3002"
TDZH:
EN:
JP:
KR:
- ID: 913
ZH: "<color=yellow>\u94F6\u4E4B\u8DF3\u8DC3</color>:\u88AB\u52A8\u6280\u80FD\u3002\u79FB\u52A8\u5230\u53CB\u65B9\u4F1F\u4EBA\u9644\u8FD1\u540E\u53EF\u518D\u653B\u51FB\u4E00\u6B21\u3002\u51FB\u6740\u5355\u4F4D\u540E\u53EF\u518D\u79FB\u52A8\u4E00\u6B21\u3002"
TDZH:
EN:
JP:
KR:

View File

@ -0,0 +1,129 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9e8b76b60ca69c5439c16c808a3a0c9e, type: 3}
m_Name: SkillDataAssets
m_EditorClassIdentifier:
SkillInfoList:
- SkillType: 1
SkillDesc: 887
- SkillType: 2
SkillDesc: 888
- SkillType: 3
SkillDesc: 889
- SkillType: 0
SkillDesc:
- SkillType: 4
SkillDesc: 890
- SkillType: 5
SkillDesc: 891
- SkillType: 6
SkillDesc: 892
- SkillType: 7
SkillDesc: 893
- SkillType: 8
SkillDesc: 894
- SkillType: 9
SkillDesc: 895
- SkillType: 10
SkillDesc: 896
- SkillType: 11
SkillDesc: 897
- SkillType: 12
SkillDesc: 898
- SkillType: 13
SkillDesc: 899
- SkillType: 14
SkillDesc: 900
- SkillType: 15
SkillDesc: 901
- SkillType: 16
SkillDesc:
- SkillType: 17
SkillDesc: 902
- SkillType: 18
SkillDesc:
- SkillType: 19
SkillDesc: 903
- SkillType: 20
SkillDesc:
- SkillType: 21
SkillDesc:
- SkillType: 29
SkillDesc: 904
- SkillType: 30
SkillDesc:
- SkillType: 31
SkillDesc:
- SkillType: 32
SkillDesc:
- SkillType: 33
SkillDesc:
- SkillType: 34
SkillDesc:
- SkillType: 35
SkillDesc: 905
- SkillType: 36
SkillDesc: 906
- SkillType: 37
SkillDesc:
- SkillType: 38
SkillDesc: 907
- SkillType: 39
SkillDesc: 908
- SkillType: 40
SkillDesc: 909
- SkillType: 41
SkillDesc: 910
- SkillType: 42
SkillDesc: 911
- SkillType: 43
SkillDesc: 912
- SkillType: 44
SkillDesc: 913
- SkillType: 45
SkillDesc:
- SkillType: 46
SkillDesc:
- SkillType: 47
SkillDesc:
- SkillType: 48
SkillDesc:
- SkillType: 49
SkillDesc:
- SkillType: 50
SkillDesc:
- SkillType: 51
SkillDesc:
- SkillType: 52
SkillDesc:
- SkillType: 53
SkillDesc:
- SkillType: 54
SkillDesc:
- SkillType: 55
SkillDesc:
- SkillType: 56
SkillDesc:
- SkillType: 57
SkillDesc:
- SkillType: 58
SkillDesc:
- SkillType: 59
SkillDesc:
- SkillType: 60
SkillDesc:
- SkillType: 61
SkillDesc:
- SkillType: 62
SkillDesc:
- SkillType: 63
SkillDesc:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3fb6abdb6cd0722498b1312838ed3e49
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -279,19 +279,6 @@ MonoBehaviour:
GiantTechSet:
FatherTechType: 2
techActions:
- ActionType: 4
WonderType: 0
ResourceType: 0
FeatureType: 0
TerrainType: 0
UnitType: 9
GiantType: 0
Vegetation: 0
UnitActionType: 0
CityLevelUpActionType: 0
GridMiscActionType: 0
SkillType: 0
TechType: 0
- ActionType: 2
WonderType: 2
ResourceType: 0

View File

@ -1022,7 +1022,7 @@ MonoBehaviour:
AttackRange: 1
MoveRange: 1
Cost: 15
Skills: 250000002600000004000000200000000d000000
Skills: 260000002c000000200000000d000000
Sprite: {fileID: 21300000, guid: 869a247f7a81bff4c872f47d8e8e9cfe, type: 3}
SpriteGlow: {fileID: 21300000, guid: a03eb25b8ec6903448d09ffef670f2bd, type: 3}
IsSpriteVarient: 0

View File

@ -11,6 +11,8 @@ GameObject:
- component: {fileID: 100665371080045127}
- component: {fileID: 149595193024331755}
- component: {fileID: 4236588376764678454}
- component: {fileID: 5690526825047985404}
- component: {fileID: 905261050489974595}
m_Layer: 5
m_Name: SkillIcon
m_TagString: Untagged
@ -64,6 +66,44 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 5547c34cc1bfb0f42b3edb35f70b045c, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!222 &5690526825047985404
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2217762578016407728}
m_CullTransparentMesh: 1
--- !u!114 &905261050489974595
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2217762578016407728}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 0}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 0}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &4075501085066031480
GameObject:
m_ObjectHideFlags: 0

View File

@ -108907,7 +108907,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 4c0a91e9c554c694791fbd5691165798, type: 3}
m_Name:
m_EditorClassIdentifier:
NoAI: 0
NoAI: 1
FullSight: 1
AIActionTime: 0.5
AIAllTech: 0
@ -243357,7 +243357,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 50, y: -210}
m_AnchoredPosition: {x: 1395, y: -19}
m_SizeDelta: {x: 80, y: 80}
m_Pivot: {x: 0, y: 1}
--- !u!114 &1601673899
@ -319277,7 +319277,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -673, y: -71}
m_AnchoredPosition: {x: 675, y: 131}
m_SizeDelta: {x: 500, y: 810}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2091217411

View File

@ -95,6 +95,7 @@ namespace RuntimeData
}
// 通过领土位置 ID 获取城市数据
//TODO 缓存优化!! 紧急优化
public bool GetCityDataByTerritoryGridId(uint gid, out CityData cityData)
{
foreach (var city in CityList)

View File

@ -451,6 +451,13 @@ namespace RuntimeData
}
//判断playerA和playerB是否同一个联盟
//TODO 加入外交系统后要更新这个函数
public bool SameUnion(uint pidA, uint pidB)
{
return pidA == pidB;
}
//-------------- 查询格子方法 -------------------//
// 通过小兵 uid 找格子 gid
public bool GetGridIdByUnitId(uint uid, out uint gid)

View File

@ -466,6 +466,12 @@ namespace RuntimeData
//返回该unit是否能在terrain上移动
public bool IsCanMoveOnTerrain(MapData map, TerrainType terrainType)
{
var landType = GetLandType();
if (terrainType == TerrainType.Land && (landType == LandType.LandAndPort || landType == LandType.LandOnly))
return true;
if (terrainType == TerrainType.ShallowSea && (landType == LandType.WaterAndAshore || landType == LandType.WaterOnly))
return true;
foreach (var skill in Skills)
{
if (skill.IsCanMoveOnTerrain(this, map, terrainType)) return true;
@ -476,6 +482,8 @@ namespace RuntimeData
//返回该unit是否能在feature上移动
public bool IsCanMoveOnFeature(MapData map, TerrainFeature featureType)
{
if (featureType != TerrainFeature.Mountain)
return true;
foreach (var skill in Skills)
{
if (skill.IsCanMoveOnFeature(this, map,featureType)) return true;

View File

@ -19,6 +19,12 @@ public class AnimDataAssets : ScriptableObject
public float MoveAnimTime;
public float ExplorerMoveDelay;
//AI move或者attack后等待的时间
public float AIAfterMoveColdDownTime;
public float AIAfterAttackColdDownTime;
public float AIBeforeAnimWaitTime;
public float AIAnimCameraMoveTime;
//飞行道具移动的时间
public float ProjectileMoveTime;
public float ProjectileBombMoveTime;

View File

@ -103,6 +103,7 @@ public class Table
{
public int MaxMapSize = 36;
public TechDataAssets TechDataAssets;
public ActionDataAssets ActionDataAssets;
public UnitTypeDataAssets UnitTypeDataAssets;
@ -112,7 +113,7 @@ public class Table
public PlayerDataAssets PlayerDataAssets;
public CivDataAssets CivDataAssets;
public SkillDataAssets SkillDataAssets;
//TH1Resource路径相关
public string[] TH1HousePath = new string[16] { "RemiliaForces", "KaguyaForces", "KanakoForces", "SatoriForces", "ReimuForces", "ByakurenForces", "MikoForces", "ZanmuForces", "Zebasi", "Ai-Mo", "Aquarion", "Quetzali", "Elyrion", "Yadakk", "Polaris", "Cymanti" };

View File

@ -859,7 +859,7 @@ namespace Logic.AI
{
if (!action.CheckCan(newParam)) continue;
if (!Table.Instance.UnitTypeDataAssets.GetUnitTypeInfo(action.ActionId.UnitType, action.ActionId.GiantType, out var info)) return;
if (info.Defense + info.MaxHealth > result.Score[CalculateType.UnitMoveForTrain])
if (!result.Score.TryGetValue(CalculateType.UnitMoveForTrain,out var _) || info.Defense + info.MaxHealth > result.Score[CalculateType.UnitMoveForTrain])
result.Score[CalculateType.UnitMoveForTrain] = info.Defense + info.MaxHealth;
}
}

View File

@ -1130,6 +1130,7 @@ namespace Logic.Action
{
//必须平地必须是none或者
if (actionParam.GridData.Feature == TerrainFeature.Mountain
|| actionParam.GridData.Vegetation == Vegetation.Trees
|| actionParam.GridData.Terrain != TerrainType.Land
|| (actionParam.GridData.Resource != ResourceType.None
&& actionParam.GridData.Resource != ResourceType.Metal))
@ -1285,6 +1286,7 @@ namespace Logic.Action
{
//必须平地必须是none或者
if (actionParam.GridData.Feature == TerrainFeature.Mountain
|| actionParam.GridData.Vegetation == Vegetation.Trees
|| actionParam.GridData.Terrain != TerrainType.Land
|| (actionParam.GridData.Resource != ResourceType.None
&& actionParam.GridData.Resource != ResourceType.Metal))
@ -1364,15 +1366,42 @@ namespace Logic.Action
public override bool Execute(CommonActionParams actionParams)
{
if (actionParams.CityData == null)
return false;
if (!actionParams.MapData.GetGridDataByCityId(actionParams.CityData.Id, out var gridData))
return false;
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();
actionParams.MapData.AddUnitData(gridData.Id,actionParams.CityData.Id,_actionId.UnitType,_actionId.GiantType);
actionParams.CityData.CityInfoRenderMark = true;
actionParams.MapData.AddUnitData(gridData.Id,cityData.Id,_actionId.UnitType,_actionId.GiantType);
cityData.CityInfoRenderMark = true;
@ -1395,122 +1424,302 @@ namespace Logic.Action
public override bool CheckCan(CommonActionParams actionParam)
{
//必须是city主体行使这个权力
if (actionParam.MainObjectType != MainObjectType.City)
return false;
//魯棒性
if (actionParam.CityData == null || actionParam.PlayerData == null)
return false;
//如果player操作的city不是自己的city
if (!actionParam.MapData.GetPlayerDataByCityId(actionParam.CityData.Id, out var playerData)
|| playerData.Id != actionParam.PlayerData.Id)
return false;
if (!actionParam.MapData.GetGridDataByCityId(actionParam.CityData.Id, out var gridData))
return false;
//如果没科技return
if(!actionParam.PlayerData.TechTree.CheckActionCan(_actionId))
return false;
//如果是城市生产无法生产水生unit
if (Table.Instance.UnitTypeDataAssets.GetUnitTypeInfo(_actionId.UnitType,_actionId.GiantType,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)
PlayerData playerData;
GridData gridData;
CityData cityData;
//如果是城市产兵
if (actionParam.MainObjectType == MainObjectType.City)
{
//获取unitTypeInfo
if(!Table.Instance.UnitTypeDataAssets.GetUnitTypeInfo(_actionId.UnitType, _actionId.GiantType,
out var unitTypeInfo))
//鲁棒性
if (actionParam.CityData == null)
return false;
//如果有Unique且全场已经有1个了
if (unitTypeInfo.Skills.Contains(SkillType.UNIQUE))
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,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 (Main.PlayerLogic.GetMapUnitTypeCount(actionParam.MapData, _actionId.UnitType, _actionId.GiantType) > 0)
//获取unitTypeInfo
if(!Table.Instance.UnitTypeDataAssets.GetUnitTypeInfo(_actionId.UnitType, _actionId.GiantType,
out var unitTypeInfo))
return false;
}
//如果有QUARTER且全场已经有4个了
if (unitTypeInfo.Skills.Contains(SkillType.QUARTER))
//如果有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)
{
if(Main.PlayerLogic.GetMapUnitTypeCount(actionParam.MapData,_actionId.UnitType, _actionId.GiantType) > 3)
//获取unitTypeInfo
if(!Table.Instance.UnitTypeDataAssets.GetUnitTypeInfo(_actionId.UnitType, _actionId.GiantType,
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 (playerData.PlayerForceId == 0 && gridData.Vegetation == Vegetation.Trees
&& (gridData.Resource == ResourceType.Animal ||
gridData.Resource == ResourceType.None)
&& _actionId.UnitType == UnitType.Warrior)
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.MountainTemple)
return true;
if (_actionId.UnitType == UnitType.Giant
&& _actionId.GiantType == GiantType.EgyptianMeiling
&& playerData.PlayerForceId == 0
&& playerData.PlayerCivId == 0
&& gridData.Resource == ResourceType.ForestTemple)
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)
return false;
//魯棒性
if (actionParam.CityData == null)
return false;
if (!actionParam.MapData.GetPlayerDataByCityId(actionParam.CityData.Id, out var playerData)
|| playerData.Id != actionParam.PlayerData.Id)
return false;
if (!actionParam.MapData.GetGridDataByCityId(actionParam.CityData.Id, out var gridData))
return false;
//如果没科技return
if(!actionParam.PlayerData.TechTree.CheckActionCan(_actionId))
return false;
//如果是城市生产无法生产水生unit
if (Table.Instance.UnitTypeDataAssets.GetUnitTypeInfo(_actionId.UnitType,_actionId.GiantType,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.MainObjectType == MainObjectType.City)
{
//获取unitTypeInfo
if(!Table.Instance.UnitTypeDataAssets.GetUnitTypeInfo(_actionId.UnitType, _actionId.GiantType,
out var unitTypeInfo))
//魯棒性
if (actionParam.CityData == null)
return false;
//如果有Unique且全场已经有1个了
if (unitTypeInfo.Skills.Contains(SkillType.UNIQUE))
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,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 (Main.PlayerLogic.GetMapUnitTypeCount(actionParam.MapData, _actionId.UnitType, _actionId.GiantType) > 0)
//获取unitTypeInfo
if(!Table.Instance.UnitTypeDataAssets.GetUnitTypeInfo(_actionId.UnitType, _actionId.GiantType,
out var unitTypeInfo))
return false;
}
//如果有QUARTER且全场已经有4个了
if (unitTypeInfo.Skills.Contains(SkillType.QUARTER))
{
if(Main.PlayerLogic.GetMapUnitTypeCount(actionParam.MapData,_actionId.UnitType, _actionId.GiantType) > 3)
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;
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,
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 (_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.MountainTemple)
return true;
if (_actionId.UnitType == UnitType.Giant
&& _actionId.GiantType == GiantType.EgyptianMeiling
&& playerData.PlayerForceId == 0
&& playerData.PlayerCivId == 0
&& gridData.Resource == ResourceType.ForestTemple)
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;
}
@ -1666,9 +1875,10 @@ namespace Logic.Action
var endPos = Camera.main.ScreenToWorldPoint(moneyPanel.position);
//播放雾效
gridData.VFXRenderMarkFog = true;
//播放获得钱的动画
main.MapRenderer.ProjectileManager.CreateProjectileMulti(main,actionParams.MapData,startPos,endPos,ProjectileType.Coin,ProjectileMoveType.CoinParabola,earn,0.05f);
//main.MapRenderer.ProjectileManager.CreateProjectileMulti(main,actionParams.MapData,v1,v2,ProjectileType.CityExp,ProjectileMoveType.CityExpHighParabola,wonderInfo.Exp);
if(playerData.Id == actionParams.MapData.PlayerMap.SelfPlayerId)
main.MapRenderer.ProjectileManager.CreateProjectileMulti(main,actionParams.MapData,startPos,endPos,ProjectileType.Coin,ProjectileMoveType.CoinParabola,earn,0.05f);
}
Main.UnitLogic.Die(actionParams.MapData,actionParams.UnitData);
@ -2095,7 +2305,7 @@ namespace Logic.Action
public override float GetAnimTime(CommonActionParams actionParams)
{
return Table.Instance.AnimDataAssets.MoveAnimTime + 0.3f;
return Table.Instance.AnimDataAssets.MoveAnimTime + Table.Instance.AnimDataAssets.AIAfterMoveColdDownTime;// + Table.Instance.AnimDataAssets.AIBeforeAnimWaitTime;
}
}
@ -2136,8 +2346,9 @@ namespace Logic.Action
if(actionParams.UnitData == null || !actionParams.MapData.UnitMap.GetUnitDataByUnitId(actionParams.TargetUnitId, out var unit2))
return 0.05f;
var main = GameObject.Find("Main").GetComponent<Main>();
return Main.UnitLogic.AttackAnimTime(actionParams.MapData,unit1, unit2);
return Main.UnitLogic.AttackAnimTime(actionParams.MapData, unit1, unit2) +
Table.Instance.AnimDataAssets.AIAfterAttackColdDownTime;// + Table.Instance.AnimDataAssets.AIBeforeAnimWaitTime;
}
}

View File

@ -249,12 +249,12 @@ namespace Logic
var skillType = target.GetComponent<SkillIdMono>().SkillTpe;
if (!Table.Instance.SkillDataAssets.GetSkillInfo(skillType, out var skillInfo))
return;
//string skillDescFinal = "";
if (skillInfo.Desc != "")
skillInfo.Desc = MultilingualManager.Instance.GetMultilingualText(uint.Parse(skillInfo.Desc))
.Replace("\\n", "\n");
else
string skillDescFinal = MultilingualManager.Instance.GetMultilingualText(uint.Parse(skillInfo.SkillDesc))
.Replace("\\n", "\n");
_main.UIManager.BottomInfoUI._hintWindow.transform.Find("Text").GetComponent<TextMeshProUGUI>().text
= skillDescFinal;
if(skillDescFinal == "")
{
_main.UIManager.BottomInfoUI._hintWindow.SetActive(false);
return;

View File

@ -28,7 +28,10 @@ namespace Logic.Skill
public override bool IsCanMoveGiantNearbyGrid(UnitData unit,MapData map)
{
return unit.Skills.Contains(SkillFactory.GetSkillBySkillType(SkillType.ALLYTRANSPORT));
foreach(var s in unit.Skills)
if (s.GetSkillType() == SkillType.ALLYTRANSPORT)
return true;
return false;
}
}

View File

@ -8,6 +8,8 @@
using RuntimeData;
using System;
using UnityEngine;
using UnityEngine.UI;
namespace Logic.Skill
@ -28,8 +30,35 @@ namespace Logic.Skill
public override void OnMove(UnitData self, GridData grid, MapData mapData,MoveType moveType)
{
if(moveType == MoveType.ActiveMove)
self.AP = 1;
//移动到友方伟人身边的时候才会恢复AP点
if (moveType == MoveType.ActiveMove)
{
var gridList = mapData.GridMap.GetAroundGridData(1, 1, grid);
foreach (var gd in gridList)
{
//如果就是自己这个格子,跳过
if (gd.Id == grid.Id) continue;
if (mapData.GetUnitDataByGid(gd.Id, out var unit)
&& unit.UnitType == UnitType.Giant
&& mapData.GetPlayerDataByUnitId(unit.Id, out var player1)
&& mapData.GetPlayerDataByUnitId(self.Id, out var player2)
&& mapData.SameUnion(player1.Id, player2.Id))
{
Debug.Log("noooooo");
self.AP = 1;
}
}
}
}
public override void OnKill(UnitData self, UnitData target, MapData mapData)
{
self.MP = 1;
}
}
}

View File

@ -485,9 +485,17 @@ namespace Logic
if (unit != null)
{
if(!unit.IsCanMoveOnTerrain(map,grid.Terrain))return false;
if (unit.IsCanMoveOnFeature(map, grid.Feature))return false;
if(!unit.IsCanMoveOnFeature(map, grid.Feature))return false;
if (grid.Terrain == TerrainType.ShallowSea && grid.Resource != ResourceType.Port)
return false;
if (grid.Terrain == TerrainType.ShallowSea && grid.Resource == ResourceType.Port)
{
if (!map.GetPlayerDataByUnitId(unit.Id, out var playerA)) return false;
if (!map.GetPlayerDataByTerritoryGridId(grid.Id,out var playerB)) return false;
if (!map.SameUnion(playerA.Id, playerB.Id)) return false;
}
}
//否则可能是判断一个玩家的任意unit能否站在上面
//否则可能是判断一个玩家的任意unit能否站在上面(也就是玩家整个科技树是否支持站在上面)
else
{
if (grid.Feature == TerrainFeature.Mountain && !self.TechTree.CheckIfHasTech(TechType.Climbing)) return false;
@ -635,18 +643,19 @@ namespace Logic
foreach (var unitA in mapData.UnitMap.UnitList)
if(unitA.UnitType == UnitType.Giant
&& mapData.GetPlayerIdByUnitId(unitA.Id,out var pid)
&& pid == playerData.Id)
&& pid == playerData.Id && unitA.Id != unitData.Id)
{
mapData.GetGridDataByUnitId(unitA.Id, out var gridA);
var nearby = mapData.GridMap.GetAroundGridDataSet(1,1,gridA);
foreach (var gridDataA in nearby)
//如果能够站在gridA上并且格子上没人
if(CheckUnitCanStandOnGrid(mapData,playerData,unitData,gridDataA)
&& !mapData.GetUnitDataByGid(gridA.Id,out var tt))
mapData.GetGridDataByUnitId(unitA.Id, out var gridB);
var nearby = mapData.GridMap.GetAroundGridDataSet(1,1,gridB);
foreach (var gridC in nearby){
int xx = gridC.Pos.X, yy = gridC.Pos.Y;
if(CheckUnitCanStandOnGrid(mapData,playerData,unitData,gridC)
&& !mapData.GetUnitDataByGid(gridC.Id,out var tt))
{
int x = gridDataA.Pos.X, y = gridDataA.Pos.Y;
MoveInfoMap[x, y] = 999;
}
int x = gridC.Pos.X, y = gridC.Pos.Y;
MoveInfoMap[x, y] = 0;
}}
}
}
//TODO 接入CITYTRANSPORT

View File

@ -323,7 +323,23 @@ namespace TH1Renderer
//unitLogic.DebugOutputMoveInfo();
int r = Mathf.Max((Table.Instance.UnitTypeDataAssets.GetUnitTypeInfo(unitData.UnitType,unitData.GiantType,out var info)?info.MoveRange:0) * 2,
Table.Instance.UnitTypeDataAssets.GetUnitTypeInfo(unitData.UnitType,unitData.GiantType,out var info2)?info2.AttackRange:0);
//如果有citytransport或者是allytransport要把r设置为全图大小
if (unitData.UnitType == UnitType.Giant)
{
bool transport = false;
foreach(var skill in unitData.Skills)
if (skill.GetSkillType() == SkillType.ALLYTRANSPORT ||
skill.GetSkillType() == SkillType.CITYTRANSPORT)
{
transport = true;
break;
}
if(transport)
r = (int)(_mapData.MapConfig.Width > _mapData.MapConfig.Height ? _mapData.MapConfig.Width : _mapData.MapConfig.Height);
}
var targetGridDataList = _main.MapData.GridMap.GetAroundGridDataSet(r,r,gridData);
foreach(var targetGridData in targetGridDataList)
{
//如果不在视野 跳过

View File

@ -162,7 +162,6 @@ namespace TH1Renderer
public void Update()
{
//没有任何需要变化的情况直接return
if (!_needBounce && !_needMove && !_needAttack &&!_unitData.RenderMark && !_unitData.AttackRenderMark && !_unitData.BounceRenderMark)
return;

View File

@ -526,13 +526,24 @@ public class BottomInfoUI// : MonoBehaviour
if (UIBottomInfoIsGrid)
{
mainObjectType = MainObjectType.Grid;
if(_main.MapData.GetCityDataByGid(UIBottomInfoStatusObjectId,out cityData))
//如果是训练单位
if (fakeActionId.ActionType == CommonActionType.TrainUnit)
{
if (fakeActionId.ActionType == CommonActionType.TrainUnit &&
_main.MapData.CheckIfCityFullPopulation(cityData))
return;
mainObjectType = MainObjectType.City;
}
//如果是城市训练单位
if(_main.MapData.GetCityDataByGid(UIBottomInfoStatusObjectId,out cityData))
{
//城市满人口
if (_main.MapData.CheckIfCityFullPopulation(cityData)) return;
mainObjectType = MainObjectType.City;
}
else if (_main.MapData.GetCityDataByTerritoryGid(UIBottomInfoStatusObjectId, out cityData))
{
//城市满人口
if (_main.MapData.CheckIfCityFullPopulation(cityData)) return;
}
}
_main.MapData.GridMap.GetGridDataByGid(UIBottomInfoStatusObjectId,out gridData);
}
else
@ -597,9 +608,22 @@ public class BottomInfoUI// : MonoBehaviour
textUIComponent.gameObject.SetActive(false);
backImage.sprite = ActionBGUnavailable;
}
//如果是一个满员城市
if (_main.MapData.GetCityDataByGid(UIBottomInfoStatusObjectId,out var cityData) &&
_main.MapData.CheckIfCityFullPopulation(cityData))
CityData cityData;
//如果是一个满员城市在grid上生产单位要额外判断一下这个是不是生产单位的行为
if (!_main.MapData.GetCityDataByGid(UIBottomInfoStatusObjectId,out cityData)){
if(_main.MapData.GetCityDataByTerritoryGid(UIBottomInfoStatusObjectId,out cityData)
&& _main.MapData.CheckIfCityFullPopulation(cityData)
&& tActionId.ActionType == CommonActionType.TrainUnit)
{
textUIComponent.color = Color.gray;
backImage.sprite = ActionBGUnavailable;
starImage.gameObject.SetActive(false);
textUIComponent.gameObject.SetActive(false);
}
}
//如果是一个满员城市在市中心生产单位(不用在判断是不是生产单位了)
else if (_main.MapData.CheckIfCityFullPopulation(cityData))
{
textUIComponent.color = Color.gray;
backImage.sprite = ActionBGUnavailable;

View File

@ -26,7 +26,7 @@ public class CameraController : MonoBehaviour
private Vector3? _smoothTargetPosition = null; //记录相机平滑移动的起点
private Vector3 _startPos;
private float _moveProgress = 0f;
private float _moveDuration = 0.4f; // 可调节移动总时长
private float _moveDuration; // 可调节移动总时长
private bool _isMoving = false;
@ -42,6 +42,7 @@ public class CameraController : MonoBehaviour
void HandleSmoothMove()
{
if (_isMoving && _smoothTargetPosition.HasValue)
{
_moveProgress += Time.deltaTime / _moveDuration;
@ -101,11 +102,12 @@ public class CameraController : MonoBehaviour
public void CameraFocusOnGrid(GridData gridData, bool Center = false)
{
Center = false;
Vector3 worldPosition = Table.Instance.GridToWorld(gridData);
float vertExtent = Camera.main.orthographicSize;
float horzExtent = vertExtent * Camera.main.aspect;
_moveDuration = Table.Instance.AnimDataAssets.AIAnimCameraMoveTime;
//瞬间移到中心
if (Center)
{
float clampedX = Mathf.Clamp(worldPosition.x, minX + horzExtent, maxX - horzExtent);
@ -117,6 +119,7 @@ public class CameraController : MonoBehaviour
_moveProgress = 0f;
_isMoving = true;
}
//平滑移动到视觉框内
else
{
Vector3 camPos = Camera.main.transform.position;

Binary file not shown.

View File

@ -73,4 +73,4 @@ Harvest animal resources here and gain 1 city experience.%$#@!<狩猟> 技術を
开关%$#@!%$#@!%$#@!%$#@!!@#$%880%$#@!All Unit%$#@!%$#@!%$#@!%$#@!!@#$%881%$#@!All City%$#@!%$#@!%$#@!%$#@!!@#$%882%$#@!All Player%$#@!%$#@!%$#@!%$#@!!@#$%883%$#@!当前选中%$#@!%$#@!%$#@!%$#@!!@#$%884%$#@!All Unit Panel
(Coming soon)%$#@!%$#@!%$#@!%$#@!!@#$%885%$#@!All City Panel
(Coming soon)%$#@!%$#@!%$#@!%$#@!!@#$%886%$#@!All Player Panel
(Coming soon)%$#@!%$#@!%$#@!%$#@!!@#$%
(Coming soon)%$#@!%$#@!%$#@!%$#@!!@#$%887%$#@!<color=yellow>和平</color>:被动技能。无法攻击任何单位。%$#@!%$#@!%$#@!%$#@!!@#$%888%$#@!<color=yellow>冲锋</color>:被动技能。每回合首次移动后可再获得一次攻击机会。%$#@!%$#@!%$#@!%$#@!!@#$%889%$#@!<color=yellow>逃脱</color>:被动技能。每回合首次攻击后可再获得一次移动机会。%$#@!%$#@!%$#@!%$#@!!@#$%890%$#@!<color=yellow>连续击杀</color>:被动技能。击杀敌人后可再获得一次攻击机会。%$#@!%$#@!%$#@!%$#@!!@#$%891%$#@!<color=yellow>溅射</color>:被动技能。攻击目标单位后对周围1格造成溅射伤害。%$#@!%$#@!%$#@!%$#@!!@#$%892%$#@!<color=yellow>潜行</color>:被动技能。移动时无视敌人的控制区域。%$#@!%$#@!%$#@!%$#@!!@#$%893%$#@!<color=yellow>无法反击</color>:被动技能。被攻击时无法进行反击。%$#@!%$#@!%$#@!%$#@!!@#$%894%$#@!<color=yellow>城防</color>:被动技能。位于城市中心获得额外防御。%$#@!%$#@!%$#@!%$#@!!@#$%895%$#@!<color=yellow>愈疗</color>:主动技能。回复1格内友方单位4点生命值。%$#@!%$#@!%$#@!%$#@!!@#$%896%$#@!<color=yellow>转化</color>:主动技能。攻击时能将目标单位转化为己方单位。%$#@!%$#@!%$#@!%$#@!!@#$%897%$#@!<color=yellow>运载</color>:被动技能。可运载一个其他单位。%$#@!%$#@!%$#@!%$#@!!@#$%898%$#@!<color=yellow>巡洋</color>:被动技能。拥有2格距离视野。%$#@!%$#@!%$#@!%$#@!!@#$%899%$#@!<color=yellow>无法升级</color>:被动技能。无法通过击杀单位获得经验并升级。%$#@!%$#@!%$#@!%$#@!!@#$%900%$#@!<color=yellow>隐身</color>:被动技能。无法被敌方看到。%$#@!%$#@!%$#@!%$#@!!@#$%901%$#@!<color=yellow>越野</color>:被动技能。移动时无视树林和山脉带来的减损。%$#@!%$#@!%$#@!%$#@!!@#$%902%$#@!<color=yellow>强化</color>:主动技能。强化1格距离内的所有友方单位。%$#@!%$#@!%$#@!%$#@!!@#$%903%$#@!<color=yellow>移动溅射</color>:被动技能。移动时对周围1格范围造成溅射伤害。%$#@!%$#@!%$#@!%$#@!!@#$%904%$#@!<color=yellow>偷袭</color>:被动技能。攻击时,不会受到对方反击。%$#@!%$#@!%$#@!%$#@!!@#$%905%$#@!<color=yellow>城市传送</color>:主动技能。可移动到任意道路联通的城市。%$#@!%$#@!%$#@!%$#@!!@#$%906%$#@!<color=yellow>庇护反击</color>:被动技能。附近友军受到攻击时,会对攻击者施加追加伤害。%$#@!%$#@!%$#@!%$#@!!@#$%907%$#@!<color=yellow>友军传送</color>:主动技能。可移动到任何友方伟人附近。%$#@!%$#@!%$#@!%$#@!!@#$%908%$#@!<color=yellow>四重存在</color>:被动技能。可同时存在最多4个该单位。%$#@!%$#@!%$#@!%$#@!!@#$%909%$#@!<color=yellow>太极</color>:被动技能。受到伤害时,将伤害额外返回给对方。%$#@!%$#@!%$#@!%$#@!!@#$%910%$#@!<color=yellow>哮喘</color>:被动技能。每回合自动失去2点生命。不会造成死亡。%$#@!%$#@!%$#@!%$#@!!@#$%911%$#@!<color=yellow>皇家烈焰</color>:主动技能。对周围一格单位造成固定8点伤害。%$#@!%$#@!%$#@!%$#@!!@#$%912%$#@!<color=yellow>吸血鬼</color>:被动技能。攻击时恢复伤害30%的血量。%$#@!%$#@!%$#@!%$#@!!@#$%913%$#@!<color=yellow>银之跳跃</color>:被动技能。移动到友方伟人附近后可再攻击一次。击杀单位后可再移动一次。%$#@!%$#@!%$#@!%$#@!!@#$%