添加阵营

This commit is contained in:
xianyi
2025-08-18 17:56:34 +08:00
parent 092355aa31
commit 4734c47c63
18 changed files with 242 additions and 9 deletions

View File

@@ -0,0 +1,43 @@
%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: 8ce5f81e5cc37f547af6923758602c8c, type: 3}
m_Name: activate_damage_all_1
m_EditorClassIdentifier:
id: activate_damage_all_1
trigger: 5
conditions_trigger:
- {fileID: 0}
target: 10
conditions_target:
- {fileID: 11400000, guid: 902733d12f434e94b904de5ebf4112de, type: 2}
- {fileID: 11400000, guid: 41c58513071a53b4e9066a58c439760f, type: 2}
- {fileID: 11400000, guid: be2974e94e2fbd144897429e0dd777b1, type: 2}
- {fileID: 11400000, guid: be2974e94e2fbd144897429e0dd777b1, type: 2}
filters_target: []
effects:
- {fileID: 11400000, guid: 4369324687c62ca488c57afd73a2be36, type: 2}
status: []
value: 1
duration: 0
chain_abilities: []
mana_cost: 1
exhaust: 1
board_fx: {fileID: 0}
caster_fx: {fileID: 0}
target_fx: {fileID: 9125387663047351618, guid: b66600b51774daa49964ead5c6a00c49,
type: 3}
projectile_fx: {fileID: 0}
cast_audio: {fileID: 0}
target_audio: {fileID: 0}
charge_target: 0
title: "\u4F24\u5BB3"
desc: "\u5BF9\u654C\u65B9\u5168\u4F53\u9020\u62101\u70B9\u4F24\u5BB3"

View File

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

View File

@@ -13,20 +13,24 @@ MonoBehaviour:
m_Name: firefox m_Name: firefox
m_EditorClassIdentifier: m_EditorClassIdentifier:
id: firefox id: firefox
title: 火狐 title: "\u706B\u72D0"
art_full: {fileID: 21300000, guid: d2ec197d4022ca94d8dc1ee2d7eda955, type: 3} art_full: {fileID: 21300000, guid: d2ec197d4022ca94d8dc1ee2d7eda955, type: 3}
art_board: {fileID: 21300000, guid: c3ac28cd1113c594ebe11a5f70251135, type: 3} art_board: {fileID: 21300000, guid: c3ac28cd1113c594ebe11a5f70251135, type: 3}
type: 10 type: 10
camp: 0
team: {fileID: 11400000, guid: 6bbb96863ece0314fb318c0fce569afc, type: 2} team: {fileID: 11400000, guid: 6bbb96863ece0314fb318c0fce569afc, type: 2}
rarity: {fileID: 11400000, guid: 72248f07232412e4db2f6864dbb4e271, type: 2} rarity: {fileID: 11400000, guid: 72248f07232412e4db2f6864dbb4e271, type: 2}
mana: 4 mana: 1
attack: 4 attack: 1
hp: 4 hp: 20
mana_fire: 0
mana_forest: 0
mana_water: 0
traits: [] traits: []
stats: [] stats: []
abilities: abilities:
- {fileID: 11400000, guid: 9eb611ce7c359b54abeb4d00b6cff5e0, type: 2} - {fileID: 11400000, guid: 91c599c9893ab47a69a039c0ed0215cc, type: 2}
text: <b>施放(2):</b> 将一张法术牌送回你的手牌。 text: "<b>\u65BD\u653E(2):</b> \u5C06\u4E00\u5F20\u6CD5\u672F\u724C\u9001\u56DE\u4F60\u7684\u624B\u724C\u3002"
desc: desc:
spawn_fx: {fileID: 9125387663047351618, guid: bac685160af4aff46ae561a51da6f5f4, spawn_fx: {fileID: 9125387663047351618, guid: bac685160af4aff46ae561a51da6f5f4,
type: 3} type: 3}

View File

@@ -0,0 +1,19 @@
%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: d028860b966ab8f44908a62e25280a39, type: 3}
m_Name: camp_diguojun
m_EditorClassIdentifier:
has_type: 0
has_team: {fileID: 0}
has_trait: {fileID: 11400000, guid: 9124c4a8561cfd14d812a55b3e885662, type: 2}
has_camp: -1
oper: 0

View File

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

View File

@@ -0,0 +1,19 @@
%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: d028860b966ab8f44908a62e25280a39, type: 3}
m_Name: camp_shouqun
m_EditorClassIdentifier:
has_type: 0
has_team: {fileID: 0}
has_trait: {fileID: 11400000, guid: 9124c4a8561cfd14d812a55b3e885662, type: 2}
has_camp: -1
oper: 0

View File

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

View File

@@ -0,0 +1,19 @@
%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: d028860b966ab8f44908a62e25280a39, type: 3}
m_Name: camp_wangguojun
m_EditorClassIdentifier:
has_type: 0
has_team: {fileID: 0}
has_trait: {fileID: 11400000, guid: 9124c4a8561cfd14d812a55b3e885662, type: 2}
has_camp: -1
oper: 0

View File

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

View File

@@ -0,0 +1,19 @@
%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: d028860b966ab8f44908a62e25280a39, type: 3}
m_Name: camp_xiemo
m_EditorClassIdentifier:
has_type: 0
has_team: {fileID: 0}
has_trait: {fileID: 11400000, guid: 9124c4a8561cfd14d812a55b3e885662, type: 2}
has_camp: -1
oper: 0

View File

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

View File

@@ -0,0 +1,19 @@
%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: d028860b966ab8f44908a62e25280a39, type: 3}
m_Name: camp_yiyongjun
m_EditorClassIdentifier:
has_type: 0
has_team: {fileID: 0}
has_trait: {fileID: 11400000, guid: 9124c4a8561cfd14d812a55b3e885662, type: 2}
has_camp: -1
oper: 0

View File

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

View File

@@ -0,0 +1,19 @@
%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: d028860b966ab8f44908a62e25280a39, type: 3}
m_Name: camp_ziyouren
m_EditorClassIdentifier:
has_type: 0
has_team: {fileID: 0}
has_trait: {fileID: 11400000, guid: 9124c4a8561cfd14d812a55b3e885662, type: 2}
has_camp: -1
oper: 0

View File

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

View File

@@ -13,6 +13,7 @@ MonoBehaviour:
m_Name: is_dragon m_Name: is_dragon
m_EditorClassIdentifier: m_EditorClassIdentifier:
has_type: 0 has_type: 0
has_team: 0 has_team: {fileID: 0}
has_trait: {fileID: 11400000, guid: 9124c4a8561cfd14d812a55b3e885662, type: 2} has_trait: {fileID: 11400000, guid: 9124c4a8561cfd14d812a55b3e885662, type: 2}
has_camp: -1
oper: 0 oper: 0

View File

@@ -15,6 +15,7 @@ namespace TcgEngine
public CardType has_type; public CardType has_type;
public TeamData has_team; public TeamData has_team;
public TraitData has_trait; public TraitData has_trait;
public CardCamp has_camp;
public ConditionOperatorBool oper; public ConditionOperatorBool oper;
@@ -38,7 +39,8 @@ namespace TcgEngine
bool is_type = target.type == has_type || has_type == CardType.None; bool is_type = target.type == has_type || has_type == CardType.None;
bool is_team = target.team == has_team || has_team == null; bool is_team = target.team == has_team || has_team == null;
bool is_trait = target.HasTrait(has_trait) || has_trait == null; bool is_trait = target.HasTrait(has_trait) || has_trait == null;
return (is_type && is_team && is_trait); bool is_camp = target.camp == has_camp || has_camp == CardCamp.None;
return (is_type && is_team && is_trait && is_camp);
} }
private bool IsTrait(Card card) private bool IsTrait(Card card)
@@ -46,7 +48,8 @@ namespace TcgEngine
bool is_type = card.CardData.type == has_type || has_type == CardType.None; bool is_type = card.CardData.type == has_type || has_type == CardType.None;
bool is_team = card.CardData.team == has_team || has_team == null; bool is_team = card.CardData.team == has_team || has_team == null;
bool is_trait = card.HasTrait(has_trait) || has_trait == null; bool is_trait = card.HasTrait(has_trait) || has_trait == null;
return (is_type && is_team && is_trait); bool is_camp = card.CardData.camp == has_camp || has_camp == CardCamp.None;
return (is_type && is_team && is_trait && is_camp);
} }
} }
} }

View File

@@ -14,6 +14,17 @@ namespace TcgEngine
Equipment = 50, Equipment = 50,
} }
public enum CardCamp
{
None = -1, // 无阵营限制
ZiYouRen = 0, // 自由人
YiYongJun = 5, // 义勇军
WangGuoJun = 10, // 王国军
DiGuoJun = 20, // 帝国军
ShouQun = 30, // 兽群
XieMo = 40, // 邪魔
}
/// <summary> /// <summary>
/// Defines all card data /// Defines all card data
/// </summary> /// </summary>
@@ -30,6 +41,7 @@ namespace TcgEngine
[Header("Stats")] [Header("Stats")]
public CardType type; public CardType type;
public CardCamp camp;
public TeamData team; public TeamData team;
public RarityData rarity; public RarityData rarity;
public int mana; public int mana;