Commit e381d83f authored by SherryChaos's avatar SherryChaos

bug fix

parent df48e913
MDPro3 v1.1.0更新:
1.添加决斗日志功能。
2.添加背景切换功能。
......@@ -6,10 +7,11 @@ MDPro3 v1.1.0更新:
5.现在能查看未知卡片了。
6.现在选择卡片框也支持鼠标滚轮翻页了。
7.现在能修改人机时的端口了。
8.连接箭头默认不再显示在立绘之上。
9.修复开启立绘后,对方的连接怪兽连接箭头方向与预期相反的错误。
10.修复选择表示形式时,里侧守备表示的选项为纯白的错误。
11.修复英语、西班牙语、繁体中文下,灵摆卡片描述文字分割时的错误。
8.新投稿动画:元素英雄 水手侠、元素英雄 永生侠、命运英雄 恐惧人。
9.连接箭头默认不再显示在立绘之上。
10.修复开启立绘后,对方的连接怪兽连接箭头方向与预期相反的错误。
11.修复选择表示形式时,里侧守备表示的选项为纯白的错误。
12.修复英语、西班牙语、繁体中文下,灵摆卡片描述文字没有被正确分割的错误。
MDPro3 v1.0.9更新:
1.设置中新增了超先行卡的一键下载功能。
......@@ -88,4 +90,4 @@ MDPro3 v1.0.2更新:
3.卡组编辑界面新增分享功能。
4.创建卡组时,支持剪切板中的卡组分享码转换为卡组。
5.修复普通稀有度卡片颜色过曝问题。
6.设置-关于更新-下载地址新增夸克网盘:https://pan.quark.cn/s/ca2e4e7a8c63
\ No newline at end of file
6.设置-关于更新-下载地址新增夸克网盘:https://pan.quark.cn/s/ca2e4e7a8c63
This diff is collapsed.
......@@ -19518,7 +19518,7 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 931169953}
m_HandleRect: {fileID: 931169952}
m_Direction: 2
m_Value: 0
m_Value: 1
m_Size: 1
m_NumberOfSteps: 0
m_OnValueChanged:
......@@ -37164,7 +37164,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0.000030517578}
m_AnchoredPosition: {x: 0, y: -0.000030517578}
m_SizeDelta: {x: 0, y: 300}
m_Pivot: {x: 0.5, y: 1}
--- !u!114 &702608002
......@@ -40529,7 +40529,7 @@ MonoBehaviour:
m_HandleRect: {fileID: 476827028}
m_Direction: 2
m_Value: 1
m_Size: 0.5972713
m_Size: 0.5774225
m_NumberOfSteps: 0
m_OnValueChanged:
m_PersistentCalls:
......@@ -42652,7 +42652,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0.000061035156}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 840}
m_Pivot: {x: 0, y: 1}
--- !u!1 &824349623
......@@ -57252,7 +57252,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: -0.000030517578}
m_SizeDelta: {x: 0, y: 300}
m_Pivot: {x: 0, y: 1}
--- !u!1 &1110086322
......@@ -57742,7 +57742,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0.000030517578}
m_SizeDelta: {x: 0, y: 300}
m_Pivot: {x: 0.5, y: 1}
--- !u!1 &1117266860
......@@ -74978,7 +74978,7 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 761159129}
m_HandleRect: {fileID: 761159127}
m_Direction: 2
m_Value: 0
m_Value: 1
m_Size: 1
m_NumberOfSteps: 0
m_OnValueChanged:
......@@ -312,7 +312,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 0}
m_AnchorMax: {x: 1, y: 0}
m_AnchoredPosition: {x: -8, y: 3}
m_AnchoredPosition: {x: -8, y: 3.5}
m_SizeDelta: {x: 0, y: 30}
m_Pivot: {x: 1, y: 0}
--- !u!222 &3706567525743764113
......
......@@ -120,10 +120,8 @@ namespace MDPro3
}
if (!hover && !clicked && !handDefault)
{
AnimationHandDefault(0.1f);
}
if (Math.Abs(Program.I().ocgcore.handOffset - Program.I().ocgcore.lastHandOffset) > 10)
SetHandDefault();
}
......@@ -880,7 +878,7 @@ namespace MDPro3
public GPS cacheP;
bool inAnimation;
static uint lastMovedLocation;
public float Move(GPS gps, bool rush = false)
public float Move(GPS gps, bool rush = false, float wait = 0f)
{
Program.I().ocgcore.lastMoveCard = this;
......@@ -951,6 +949,8 @@ namespace MDPro3
if (model == null)
{
CreateModel();
if ((cacheP.location & (uint)CardLocation.Deck) > 0)
cacheP.position = (int)CardPosition.FaceDownAttack;
ModelAt(cacheP);
}
......@@ -1156,16 +1156,37 @@ namespace MDPro3
goto SummonPass;
}
bool handAppeal = false;
bool fieldAppeal = false;
var ease = Ease.Unset;
switch (Program.I().ocgcore.currentMessage)
{
case GameMessage.Draw:
moveTime = 0.15f;
if (p.controller == 0)
{
moveTime = 0.5f;
handAppeal = true;
}
else
moveTime = 0.2f;
break;
case GameMessage.Move:
if ((p.location & (uint)CardLocation.Onfield) > 0)
if ((p.location & (uint)CardLocation.Onfield) > 0
&& cacheP != null
&& (cacheP.location & (uint)CardLocation.Onfield) == 0
&& (p.location & (uint)CardLocation.Overlay) == 0)
{
moveTime = 0.4f;
fieldAppeal = true;
}
else if ((p.location & (uint)CardLocation.Hand) > 0
&& p.controller == 0)
{
moveTime = 0.6f;
handAppeal = true;
}
else
moveTime = 0.2f;
moveTime = 0.25f;
break;
case GameMessage.FlipSummoning:
case GameMessage.PosChange:
......@@ -1182,7 +1203,19 @@ namespace MDPro3
var turn = manager.GetElement<Transform>("Turn");
//翋极痄雄
sequence.Append(model.transform.DOLocalMove(position, moveTime).OnStart(() =>
sequence.AppendInterval(wait);
var targetMainMoveTime = moveTime;
if (handAppeal)
{
targetMainMoveTime *= 0.666f;
ease = Ease.OutCubic;
}
if (fieldAppeal)
{
targetMainMoveTime *= 0.666f;
ease = Ease.OutSine;
}
sequence.Append(model.transform.DOLocalMove(position, targetMainMoveTime).SetEase(ease).OnStart(() =>
{
if ((cacheP.location & (uint)CardLocation.Extra) > 0
&& (p.location & (uint)CardLocation.Extra) == 0
......@@ -1192,47 +1225,49 @@ namespace MDPro3
|| (p.location & (uint)CardLocation.MonsterZone) == 0)
HideLabel();
}));
if((p.location & (uint)CardLocation.Onfield) > 0
&& cacheP != null
&& (cacheP.location & (uint)CardLocation.Onfield) == 0
&& (p.location & (uint)CardLocation.Overlay) == 0)
if(fieldAppeal)
{
sequence.Join(cardPlane.DOLocalMove(Vector3.up * 15f, moveTime * 0.5f).SetEase(Ease.InOutSine).OnComplete(() =>
sequence.Join(cardPlane.DOLocalMove(Vector3.up * 15f, targetMainMoveTime).SetEase(ease).OnComplete(() =>
{
sequence.Join(cardPlane.DOLocalMove(Vector3.zero, moveTime * 0.5f).SetEase(Ease.InOutSine));
sequence.Join(cardPlane.DOLocalMove(Vector3.zero, targetMainMoveTime * 0.5f).SetEase(Ease.InSine));
}));
}
sequence.Join(pivot.DOScale(GetCardScale(p), moveTime * 0.95f));
sequence.Join(pivot.DOScale(GetCardScale(p), targetMainMoveTime * 0.95f));
//Turn
if ((p.location & (uint)CardLocation.Removed) > 0
|| (p.location & (uint)CardLocation.Deck) > 0
|| (p.location & (uint)CardLocation.Extra) > 0)
sequence.Join(turn.DOLocalRotate(new Vector3(0, 0, rotation.z), moveTime * 0.5f));
sequence.Join(turn.DOLocalRotate(new Vector3(0, 0, rotation.z), targetMainMoveTime * 0.8f));
else
sequence.Join(turn.DOLocalRotate(new Vector3(0, (rotation.y == 0) || (rotation.y == 180) ? 0 : 270, rotation.z), moveTime * 0.5f));
sequence.Join(turn.DOLocalRotate(new Vector3(0, (rotation.y == 0) || (rotation.y == 180) ? 0 : 270, rotation.z), targetMainMoveTime * 0.8f).SetEase(ease));
if (handAppeal)
sequence.Join(turn.DOLocalMove(new Vector3(0, 0, 10), targetMainMoveTime).SetEase(Ease.OutCubic).OnComplete(() =>
{
turn.DOLocalMove(Vector3.zero, targetMainMoveTime * 0.5f).SetEase(Ease.InCubic);
}));
//CardPlane
if ((p.location & (uint)CardLocation.Deck) > 0
|| (p.location & (uint)CardLocation.Extra) > 0
|| (p.location & (uint)CardLocation.Removed) > 0)
sequence.Join(cardPlane.DOLocalRotate(new Vector3(rotation.x, rotation.y, 0), moveTime * 0.5f));
sequence.Join(cardPlane.DOLocalRotate(new Vector3(rotation.x, rotation.y, 0), targetMainMoveTime * 0.5f));
else
sequence.Join(cardPlane.DOLocalRotate(new Vector3(rotation.x, (rotation.y == 0 || rotation.y == 270) ? 0 : 180, 0), moveTime * 0.5f));
sequence.Join(cardPlane.DOLocalRotate(new Vector3(rotation.x, (rotation.y == 0 || rotation.y == 270) ? 0 : 180, 0), targetMainMoveTime * 0.5f));
//Pivot && Offset
if ((p.location & (uint)CardLocation.Hand) > 0)
{
sequence.Join(pivot.DOLocalMove(new Vector3(0, 0, HandOffsetPositionByX(position.x)), moveTime / 4));
sequence.Join(offset.DOLocalRotate(new Vector3(0, HandOffsetRotationByX(position.x), handAngle), moveTime / 4));
sequence.Join(turn.DOLocalRotate(new Vector3(0, 0, data.Id > 0 ? 0 : 180), moveTime / 4));
sequence.Join(pivot.DOLocalMove(new Vector3(0, 0, HandOffsetPositionByX(position.x)), targetMainMoveTime / 4));
sequence.Join(offset.DOLocalRotate(new Vector3(0, HandOffsetRotationByX(position.x), handAngle), targetMainMoveTime / 4));
handDefault = true;
}
else
{
sequence.Join(offset.DOLocalMove(Vector3.zero, moveTime / 4));
sequence.Join(offset.DOLocalMove(Vector3.zero, targetMainMoveTime / 4));
sequence.Join(offset.DOLocalRotate(Vector3.zero, 0.21f));
sequence.Join(pivot.DOLocalMove(Vector3.zero, moveTime / 4));
sequence.Join(pivot.DOLocalRotate(Vector3.zero, moveTime / 4));
sequence.Join(pivot.DOLocalMove(Vector3.zero, targetMainMoveTime / 4));
sequence.Join(pivot.DOLocalRotate(Vector3.zero, targetMainMoveTime / 4));
}
if ((p.location & ((uint)CardLocation.Grave + (uint)CardLocation.Removed)) > 0)
......@@ -1895,6 +1930,7 @@ namespace MDPro3
}
else
{
return;
model.transform.DOShakePosition(0.4f, Vector3.one * 0.2f, 10, 90, false, true, ShakeRandomnessMode.Harmonic);
model.transform.DOShakeRotation(0.4f, 5f);
Sequence sequence = DOTween.Sequence();
......
......@@ -32,6 +32,7 @@ namespace MDPro3
var random = Random.Range(0, backgrounds.Count);
id = Tools.GetNthElement(backgrounds, random).Key;
}
var endString = id.ToString("D4");
back = ABLoader.LoadFromFolder("wallpaper/back" + endString, "Background" + endString, true);
back.transform.GetChild(0).gameObject.AddComponent<AutoScale>();
......
......@@ -214,7 +214,7 @@ namespace MDPro3
}
else
{
Program.I().camera_.cameraMain.DOShakePosition(0.3f, 1, 100);
Program.I().camera_.cameraMain.DOShakePosition(0.2f, 0.5f, 50);
}
}
}
......
......@@ -1413,6 +1413,10 @@ namespace MDPro3
turns = 0;
handOffset = 0;
lastHandOffset = 0;
myPreHandCards.Clear();
opPreHandCards.Clear();
needRefreshHand0 = true;
needRefreshHand1 = true;
materialCards.Clear();
cardsInChain.Clear();
codesInChain.Clear();
......@@ -2230,6 +2234,7 @@ namespace MDPro3
if (psum)
{
psum = false;
cardsBeTarget.Clear();
item = Instantiate(chainSolving > 0 ? container.duelLogText2 : container.duelLogText);
item.transform.GetChild(1).GetComponent<Text>().text = InterString.Get("灵摆召唤结束");
log.AddLog(item);
......@@ -2410,13 +2415,13 @@ namespace MDPro3
item.transform.GetChild(5).GetComponent<Button>().onClick.AddListener(() =>
{
Debug.LogFormat("Location: {0:X}, Sequence: {1}, Position: {2}", from.location, from.sequence, from.position);
Debug.LogFormat("Location: {0:X}, Sequence: {1}, Position: {2:X}", from.location, from.sequence, from.position);
});
if(to != null)
{
item.transform.GetChild(7).GetComponent<Button>().onClick.AddListener(() =>
{
Debug.LogFormat("Location: {0:X}, Sequence: {1}, Position: {2}", to.location, to.sequence, to.position);
Debug.LogFormat("Location: {0:X}, Sequence: {1}, Position: {2:X}", to.location, to.sequence, to.position);
});
}
#endif
......@@ -2944,8 +2949,8 @@ namespace MDPro3
}
}
catch { }
needRefreshHand0 = true;
needRefreshHand1 = true;
myPreHandCards.Clear();
opPreHandCards.Clear();
RefreshHandCardPosition();
RefreshBgState();
break;
......@@ -4197,6 +4202,7 @@ namespace MDPro3
var deckCount = GetLocationCardCount(CardLocation.Deck, (uint)player);
var handCount = GetLocationCardCount(CardLocation.Hand, (uint)player);
sleep = 0;
List<GameCard> preHands = new List<GameCard>();
for (var i = 0; i < count; i++)
{
card = GCS_Get(
......@@ -4207,15 +4213,26 @@ namespace MDPro3
sequence = (uint)(deckCount - 1 - i),
});
card.SetCode(r.ReadInt32() & 0x7fffffff);
if (card != null)
sleep = card.Move(
preHands.Add(card);
}
if (player == 0)
{
needRefreshHand0 = true;
myPreHandCards = preHands;
}
else
{
needRefreshHand1 = true;
opPreHandCards = preHands;
}
for (var i = 0; i < preHands.Count; i++)
sleep = preHands[i].Move(
new GPS
{
controller = (uint)player,
location = (uint)CardLocation.Hand,
sequence = (uint)(handCount + i),
});
}
Sleep((int)(sleep * 100));
break;
case GameMessage.TagSwap:
......@@ -6119,14 +6136,19 @@ namespace MDPro3
public bool needRefreshHand1 = true;
public List<GameCard> myHandCards = new List<GameCard>();
public List<GameCard> opHandCards = new List<GameCard>();
List<GameCard> myPreHandCards = new List<GameCard>();
List<GameCard> opPreHandCards = new List<GameCard>();
public int GetMyHandCount()
{
if (needRefreshHand0)
{
myHandCards.Clear();
myHandCards = new List<GameCard>(myPreHandCards);
foreach (var card in cards)
if (card.p.controller == 0 && (card.p.location & (uint)CardLocation.Hand) > 0)
myHandCards.Add(card);
if (card.p.controller == 0)
if((card.p.location & (uint)CardLocation.Hand) > 0)
if(!myHandCards.Contains(card))
myHandCards.Add(card);
needRefreshHand0 = false;
}
return myHandCards.Count;
......@@ -6135,10 +6157,12 @@ namespace MDPro3
{
if (needRefreshHand1)
{
opHandCards.Clear();
opHandCards = new List<GameCard>(opPreHandCards);
foreach (var card in cards)
if (card.p.controller != 0 && (card.p.location & (uint)CardLocation.Hand) > 0)
opHandCards.Add(card);
if (card.p.controller != 0)
if ((card.p.location & (uint)CardLocation.Hand) > 0)
if (!opHandCards.Contains(card))
opHandCards.Add(card);
needRefreshHand1 = false;
}
return opHandCards.Count;
......
......@@ -196,7 +196,7 @@ namespace MDPro3
if (n >= dic.Count)
n = dic.Count - 1;
var enumerator = dic.GetEnumerator();
for (int i = 0; i < n; i++)
for (int i = 0; i < n + 1; i++)
enumerator.MoveNext();
return enumerator.Current;
}
......
......@@ -25,6 +25,11 @@ namespace MDPro3.UI
else
transform.localScale = new Vector3(width, height, transform.localScale.z);
}
private void OnDestroy()
{
Program.onScreenChanged -= Scale;
}
}
}
......@@ -537,3 +537,5 @@ Off->Off
更换背景->更换背景
更新内容->更新内容
查看更新内容->查看更新内容
检测到新版先行卡,请至 [游戏设置]-[扩展卡包]-[更新先行卡] 处进行更新。->检测到新版先行卡,请至 [游戏设置]-[扩展卡包]-[更新先行卡] 处进行更新。
攻击被无效->攻击被无效
......@@ -135,8 +135,7 @@ PlayerSettings:
16:9: 1
Others: 1
bundleVersion: 1.1.0
preloadedAssets:
- {fileID: 11400000, guid: 5fb02d2098f52054b89ce4a9f63ba9ee, type: 2}
preloadedAssets: []
metroInputSource: 0
wsaTransparentSwapchain: 0
m_HolographicPauseOnTrackingLoss: 1
......
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