添加阵营
This commit is contained in:
@@ -15,6 +15,7 @@ namespace TcgEngine
|
||||
public CardType has_type;
|
||||
public TeamData has_team;
|
||||
public TraitData has_trait;
|
||||
public CardCamp has_camp;
|
||||
|
||||
public ConditionOperatorBool oper;
|
||||
|
||||
@@ -38,7 +39,8 @@ namespace TcgEngine
|
||||
bool is_type = target.type == has_type || has_type == CardType.None;
|
||||
bool is_team = target.team == has_team || has_team == 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)
|
||||
@@ -46,7 +48,8 @@ namespace TcgEngine
|
||||
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_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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user