Commit b1d1b754 authored by 無名の凝泪's avatar 無名の凝泪 Committed by Unicorn369

Update OCG/TCG/Custom mark

parent c7a2bd22
......@@ -123,16 +123,16 @@ public class GameStringHelper
switch(card.Ot)
{
case 1:
limitot = "[OCG] ";
limitot = GameStringManager.get_unsafe(1240);
break;
case 2:
limitot = "[TCG] ";
limitot = GameStringManager.get_unsafe(1241);
break;
case 3:
limitot = "[OCG/TCG] ";
limitot = GameStringManager.get_unsafe(1242);
break;
case 4:
limitot = "[Anime] ";
limitot = GameStringManager.get_unsafe(1243);
break;
}
string re = "";
......@@ -140,7 +140,7 @@ public class GameStringHelper
{
re += "[b]" + card.Name + "[/b]";
re += "\n";
re += "[sup]" + limitot + "[/sup]";
re += "[sup][" + limitot + "] [/sup]";
re += "\r";
re += "[sup]" + card.Id.ToString() + "[/sup]";
re += "\n";
......
......@@ -81,7 +81,7 @@ public class DeckManager : ServantWithCardDescription
UIInput_def = UIHelper.getByName<UIInput>(gameObjectDetailedSearch, "def_");
for (int i = 0; i < 32; i++)
{
UIToggle_effects[i] = UIHelper.getByName<UIToggle>(gameObjectDetailedSearch, "T (" + (i+1).ToString() + ")");
UIToggle_effects[i] = UIHelper.getByName<UIToggle>(gameObjectDetailedSearch, "T (" + (i + 1).ToString() + ")");
UIHelper.trySetLableText(UIToggle_effects[i].gameObject, GameStringManager.get_unsafe(1100 + i));
UIToggle_effects[i].GetComponentInChildren<UILabel>().overflowMethod = UILabel.Overflow.ClampContent;
}
......@@ -101,6 +101,10 @@ public class DeckManager : ServantWithCardDescription
UIPopupList_ban.AddItem(GameStringManager.get_unsafe(1316));
UIPopupList_ban.AddItem(GameStringManager.get_unsafe(1317));
UIPopupList_ban.AddItem(GameStringManager.get_unsafe(1318));
UIPopupList_ban.AddItem(GameStringManager.get_unsafe(1240));
UIPopupList_ban.AddItem(GameStringManager.get_unsafe(1241));
UIPopupList_ban.AddItem(GameStringManager.get_unsafe(1242));
UIPopupList_ban.AddItem(GameStringManager.get_unsafe(1243));
clearAll();
UIHelper.registEvent(UIPopupList_main.gameObject, onUIPopupList_main);
UIHelper.registEvent(UIPopupList_second.gameObject, onUIPopupList_second);
......@@ -111,7 +115,8 @@ public class DeckManager : ServantWithCardDescription
itemOnListProducer,
86
);
Program.go(500, () => {
Program.go(500, () =>
{
List<MonoCardInDeckManager> cs = new List<MonoCardInDeckManager>();
for (int i = 0; i < 300; i++)
{
......@@ -342,7 +347,7 @@ public class DeckManager : ServantWithCardDescription
var rid = item.gameObject.GetComponent<Rigidbody>();
if (rid == null)
{
rid= item.gameObject.AddComponent<Rigidbody>();
rid = item.gameObject.AddComponent<Rigidbody>();
}
rid.AddForce(0.7f * (item.transform.position + new Vector3(0, 30 - Vector3.Distance(item.transform.position, Vector3.zero), 0)) / Program.deltaTime);
}
......@@ -373,11 +378,11 @@ public class DeckManager : ServantWithCardDescription
void shiftDetailPanel(bool dragged)
{
detailPanelShiftedTemp = dragged;
if (isShowed&&detailShowed)
if (isShowed && detailShowed)
{
if (dragged)
{
gameObjectDetailedSearch.GetComponent<UITexture>().color = new Color(1,1,1,0.7f);
gameObjectDetailedSearch.GetComponent<UITexture>().color = new Color(1, 1, 1, 0.7f);
}
else
{
......@@ -389,7 +394,7 @@ public class DeckManager : ServantWithCardDescription
void refreshDetail()
{
if (gameObjectDetailedSearch!=null)
if (gameObjectDetailedSearch != null)
{
if (isShowed)
{
......@@ -630,6 +635,7 @@ public class DeckManager : ServantWithCardDescription
getDefence_UP(),
getP_UP(),
getYear_UP(),
getOT(),
getPack(),
getBanFilter(),
currentBanlist,
......@@ -640,7 +646,7 @@ public class DeckManager : ServantWithCardDescription
);
print(result);
UIHelper.trySetLableText(gameObjectSearch, "title_", result.Count.ToString());
//UIInput_search.isSelected = true;
UIInput_search.isSelected = true;
}
public YGOSharp.Banlist currentBanlist = null;
......@@ -649,7 +655,7 @@ public class DeckManager : ServantWithCardDescription
void print(List<YGOSharp.Card> result)
{
if (superScrollView!=null)
if (superScrollView != null)
{
PrintedResult = result;
if (condition == Condition.editDeck)
......@@ -679,7 +685,7 @@ public class DeckManager : ServantWithCardDescription
bool re = false;
foreach (var item in seconds)
{
if (str==item)
if (str == item)
{
re = true;
break;
......@@ -820,6 +826,28 @@ public class DeckManager : ServantWithCardDescription
return returnValue;
}
int getOT()
{
int returnValue = 0;
if (UIPopupList_ban.value == GameStringManager.get_unsafe(1240))
{
returnValue = 1;
}
if (UIPopupList_ban.value == GameStringManager.get_unsafe(1241))
{
returnValue = 2;
}
if (UIPopupList_ban.value == GameStringManager.get_unsafe(1242))
{
returnValue = 3;
}
if (UIPopupList_ban.value == GameStringManager.get_unsafe(1243))
{
returnValue = 4;
}
return returnValue;
}
UInt32 getRaceFilter()
{
UInt32 returnValue = 0;
......@@ -1298,7 +1326,7 @@ public class DeckManager : ServantWithCardDescription
{
if (cardInDragging != null)
{
if (Input.GetKey(KeyCode.LeftControl)|| Input.GetKey(KeyCode.RightControl))
if (Input.GetKey(KeyCode.LeftControl) || Input.GetKey(KeyCode.RightControl))
{
//
}
......@@ -1340,7 +1368,7 @@ public class DeckManager : ServantWithCardDescription
bool isSide = false;
for (int i = 0; i < deck.ISide.Count; i++)
{
if (MonoCardInDeckManager_== deck.ISide[i])
if (MonoCardInDeckManager_ == deck.ISide[i])
{
isSide = true;
}
......@@ -1386,7 +1414,12 @@ public class DeckManager : ServantWithCardDescription
card.transform.position = card.getGoodPosition(4);
card.cardData = data;
card.gameObject.layer = 16;
if (
if (Input.GetKey(KeyCode.LeftShift) || (Input.GetKey(KeyCode.RightShift)))
{
deck.ISide.Add(card);
deck.Side.Add(card.cardData.Id);
}
else if (
(data.Type & (UInt32)YGOSharp.OCGWrapper.Enums.CardType.Fusion) > 0
||
(data.Type & (UInt32)YGOSharp.OCGWrapper.Enums.CardType.Synchro) > 0
......@@ -1453,25 +1486,32 @@ public class DeckManager : ServantWithCardDescription
{
switch (flag)
{
case 1:
case 3:
{
deck.Main.Add(code);
deck.Deck_O.Main.Add(code);
deck.Side.Add(code);
deck.Deck_O.Side.Add(code);
}
break;
case 2:
default:
{
YGOSharp.Card card = YGOSharp.CardsManager.Get(code);
if ((card.Type & (UInt32)YGOSharp.OCGWrapper.Enums.CardType.Fusion) > 0
||
(card.Type & (UInt32)YGOSharp.OCGWrapper.Enums.CardType.Synchro) > 0
||
(card.Type & (UInt32)YGOSharp.OCGWrapper.Enums.CardType.Xyz) > 0
||
(card.Type & (UInt32)YGOSharp.OCGWrapper.Enums.CardType.link) > 0)
{
deck.Extra.Add(code);
deck.Deck_O.Extra.Add(code);
}
break;
case 3:
else
{
deck.Side.Add(code);
deck.Deck_O.Side.Add(code);
deck.Main.Add(code);
deck.Deck_O.Main.Add(code);
}
}
break;
default:
break;
}
}
......@@ -1619,7 +1659,7 @@ public class DeckManager : ServantWithCardDescription
MonoCardInDeckManager createCard()
{
MonoCardInDeckManager r = null;
if (diedCards.Count>0)
if (diedCards.Count > 0)
{
r = diedCards[0].AddComponent<MonoCardInDeckManager>();
diedCards.RemoveAt(0);
......@@ -1674,14 +1714,14 @@ public class DeckManager : ServantWithCardDescription
card.cardData = data;
card.gameObject.layer = 16;
deck.IMain.Add(card);
card.tweenToVectorAndFall(toVector,new Vector3(90,0,0));
card.tweenToVectorAndFall(toVector, new Vector3(90, 0, 0));
});
indexOfLogic++;
}
indexOfLogic = 0;
foreach (var item in deck.Extra)
{
Vector3 toVector = new Vector3(UIHelper.get_left_right_indexZuo(-12.5f, 12.5f, indexOfLogic, deck.Extra.Count ,10), 0.5f + (float)indexOfLogic / 3f, -6.2f);
Vector3 toVector = new Vector3(UIHelper.get_left_right_indexZuo(-12.5f, 12.5f, indexOfLogic, deck.Extra.Count, 10), 0.5f + (float)indexOfLogic / 3f, -6.2f);
YGOSharp.Card data = YGOSharp.CardsManager.Get(item);
safeGogo(indexOfLogic * 90, () =>
{
......@@ -1755,12 +1795,12 @@ public class DeckManager : ServantWithCardDescription
toAngle = new Vector3(87f - (deck.ISide.Count - 10f) * 0.4f, -90, -90);
}
}
Vector3 toVector = new Vector3(UIHelper.get_left_right_indexZuo(-12.5f, 12.5f, i, deck.ISide.Count ,10), 0.6f + Mathf.Sin((90 - toAngle.x) / 180f * Mathf.PI) * k, -12f);
Vector3 toVector = new Vector3(UIHelper.get_left_right_indexZuo(-12.5f, 12.5f, i, deck.ISide.Count, 10), 0.6f + Mathf.Sin((90 - toAngle.x) / 180f * Mathf.PI) * k, -12f);
deck.ISide[i].tweenToVectorAndFall(toVector, toAngle);
}
}
public void FromObjectDeckToCodedDeck(bool order=false)
public void FromObjectDeckToCodedDeck(bool order = false)
{
ArrangeObjectDeck(order);
deck.Main.Clear();
......@@ -1780,7 +1820,7 @@ public class DeckManager : ServantWithCardDescription
}
}
public void setGoodLooking(bool side=false)
public void setGoodLooking(bool side = false)
{
try
{
......@@ -1829,7 +1869,7 @@ public class DeckManager : ServantWithCardDescription
else
{
UIInput_search.value = "";
//UIInput_search.isSelected = true;
UIInput_search.isSelected = true;
}
}
}
......@@ -103,6 +103,7 @@ namespace YGOSharp
int getDefence_UP,
int getP_UP,
int getYear_UP,
int getOT,
string getPack,
int getBAN,
Banlist banlist,
......@@ -127,7 +128,7 @@ namespace YGOSharp
{
if (((card.Type & getTypeFilter)) == getTypeFilter || getTypeFilter == 0)
{
if ((card.Race & getRaceFilter) >0 || getRaceFilter == 0)
if ((card.Race & getRaceFilter) > 0 || getRaceFilter == 0)
{
if ((card.Attribute & getAttributeFilter) > 0 || getAttributeFilter == 0)
{
......@@ -144,6 +145,8 @@ namespace YGOSharp
if (judgeint(getYear, getYear_UP, card.year))
{
if (getBAN == -233 || banlist == null || banlist.GetQuantity(card.Id) == getBAN)
{
if (getOT == 0 || getOT == card.Ot)
{
if (getPack == "" || card.packFullName == getPack)
{
......@@ -162,6 +165,7 @@ namespace YGOSharp
}
}
}
}
nameInSearch = getName;
returnValue.Sort(comparisonOfCard());
nameInSearch = "";
......
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