Commit 3b57ab75 authored by 赤子奈落's avatar 赤子奈落

fix ui attribute bug

parent ef3f9b4e
......@@ -222,7 +222,7 @@ public class CardDescription : Servant
type_name.text = GameStringHelper.GetType(card);
FrameColor();
SetProperty(card, smallstr);
SetAttribute(card, smallstr);
SetAttribute(card);
picLoader.code = card.Id;
picLoader.defaults = def;
......@@ -230,14 +230,14 @@ public class CardDescription : Servant
shiftCardShower(true);
Program.go(50, () => { shiftCardShower(true); });
}
private void SetAttribute(Card data, string secondType)
private void SetAttribute(Card data)
{
if(type_name.text.Contains("魔法"))
if ((data.Type & (uint)CardType.Spell) > 0)
ai.ChangeAttribute("魔法");
else if (type_name.text.Contains("陷阱"))
else if ((data.Type & (uint)CardType.Trap) > 0)
ai.ChangeAttribute("陷阱");
else if (GameStringHelper.attribute(data.Attribute) != "")
ai.ChangeAttribute(GameStringHelper.attribute(data.Attribute));
ai.ChangeAttribute(GameStringHelper.attribute(data.Attribute));
else
ai.ChangeAttribute("无");
}
......
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