修复击杀钩子,添加技能
This commit is contained in:
@@ -16,6 +16,8 @@ namespace TcgEngine
|
||||
public TeamData has_team;
|
||||
public TraitData has_trait;
|
||||
public CardCamp has_camp;
|
||||
public RarityData has_rarity;
|
||||
public RarityData exclude_rarity;
|
||||
|
||||
public ConditionOperatorBool oper;
|
||||
|
||||
@@ -40,7 +42,9 @@ namespace TcgEngine
|
||||
bool is_team = target.team == has_team || has_team == null;
|
||||
bool is_trait = target.HasTrait(has_trait) || has_trait == null;
|
||||
bool is_camp = target.camp == has_camp || has_camp == CardCamp.None;
|
||||
return (is_type && is_team && is_trait && is_camp);
|
||||
bool is_rarity = target.rarity == has_rarity || has_rarity == null;
|
||||
bool not_excluded_rarity = target.rarity != exclude_rarity || exclude_rarity == null;
|
||||
return (is_type && is_team && is_trait && is_camp && is_rarity && not_excluded_rarity);
|
||||
}
|
||||
|
||||
private bool IsTrait(Card card)
|
||||
@@ -49,7 +53,9 @@ namespace TcgEngine
|
||||
bool is_team = card.CardData.team == has_team || has_team == null;
|
||||
bool is_trait = card.HasTrait(has_trait) || has_trait == null;
|
||||
bool is_camp = card.CardData.camp == has_camp || has_camp == CardCamp.None;
|
||||
return (is_type && is_team && is_trait && is_camp);
|
||||
bool is_rarity = card.CardData.rarity == has_rarity || has_rarity == null;
|
||||
bool not_excluded_rarity = card.CardData.rarity != exclude_rarity || exclude_rarity == null;
|
||||
return (is_type && is_team && is_trait && is_camp && is_rarity && not_excluded_rarity);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user