Commit ecc51c7a authored by kenan's avatar kenan

效果搜索

parent ca76bcc9
...@@ -126,21 +126,22 @@ class CardSearchInfo { ...@@ -126,21 +126,22 @@ class CardSearchInfo {
} }
if (types.length > 0) { if (types.length > 0) {
boolean st = false; boolean st = false;
boolean effect = false;
for (long cardType : types) { for (long cardType : types) {
if (cardType == CardType.Spell.value() || cardType == CardType.Trap.value()) { if (cardType == CardType.Spell.value() || cardType == CardType.Trap.value()) {
st = true; st = true;
break; break;
}else if(cardType == CardType.Effect.value()){
effect = true;
break;
} }
} }
if(types.length == 2){ if(effect){
if(types[0] == types[1]){ if (!card.isType(CardType.Effect)) {
long type = types[0];
if ((card.Type & type) != type) {
return false; return false;
} }
} }
}
for (long type : types) { for (long type : types) {
if (type > 0) { if (type > 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment