Commit 4904d2e5 authored by mercury233's avatar mercury233

updates

parent ff8d0bc2
[Ll]ibrary/
[Tt]emp/
[Oo]bj/
[Bb]uild/
[Bb]uilds/
Assets/AssetStoreTools*
# Visual Studio cache directory
/.vs/
# Autogenerated VS/MD/Consulo solution and project files
ExportedObj/
.consulo/
*.csproj
*.unityproj
*.sln
*.suo
*.tmp
*.user
*.userprefs
*.pidb
*.booproj
*.svd
*.pdb
# Unity3D generated meta files
*.pidb.meta
*.pdb.meta
# Unity3D Generated File On Crash Reports
sysinfo.txt
# Builds
*.apk
*.unitypackage
# ygopro
cdb/
deck/
pack/
texture/
config/
bin/
Release/
AI_core_vs2017solution/core.VC.db
AI_core_vs2017solution/core.VC.VC.opendb
AI_core_vs2017solution/System.Servicemodel.Faltexception.dll
......@@ -103,6 +103,7 @@ namespace Percy
SelectSum = 23,
SelectDisfield = 24,
SortCard = 25,
SelectUnselectCard = 26,
ConfirmDecktop = 30,
ConfirmCards = 31,
ShuffleDeck = 32,
......@@ -112,8 +113,10 @@ namespace Percy
ShuffleSetCard = 36,
ReverseDeck = 37,
DeckTop = 38,
ShuffleExtra = 39,
NewTurn = 40,
NewPhase = 41,
ConfirmExtratop = 42,
Move = 50,
PosChange = 53,
Set = 54,
......@@ -157,6 +160,8 @@ namespace Percy
ReleaseRelation = 123,
TossCoin = 130,
TossDice = 131,
RockPaperScissors = 132,
HandResult = 133,
AnnounceRace = 140,
AnnounceAttrib = 141,
AnnounceCard = 142,
......@@ -167,7 +172,7 @@ namespace Percy
ReloadField = 162,
AiName = 163,
ShowHint = 164,
PlayerHint=165,
PlayerHint = 165,
MatchKill = 170,
CustomMsg = 180,
DuelWinner = 200,
......@@ -1016,6 +1021,30 @@ namespace Percy
}
returnValue = true;
break;
case GameMessage.SelectUnselectCard:
player = move(1);
int buttonok = move(1);
move(3);
int count1 = move(1);
for (int i = 0; i < count1; i++)
{
int code = currentReader.ReadInt32();
int p = currentReader.ReadByte();
currentWriter.Write(((int)(p == player ? code : 0)));
currentWriter.Write((byte)p);
move(3);
}
int count2 = move(1);
for (int i = 0; i < count2; i++)
{
int code = currentReader.ReadInt32();
int p = currentReader.ReadByte();
//currentWriter.Write(((int)(p == player ? code : 0)));
//currentWriter.Write((byte)p);
move(3);
}
returnValue = true;
break;
case GameMessage.SelectChain:
move(1);
count = move(1);
......
fileFormatVersion: 2
guid: 868c8ef03b5990d4db7b7e891c456cee
folderAsset: yes
timeCreated: 1495457253
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 54794da7cdfb0db47899df0fdd1a8025
timeCreated: 1523725217
licenseType: Free
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 1
linearTexture: 0
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 8
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -1
maxTextureSize: 2048
textureSettings:
filterMode: -1
aniso: -1
mipBias: -1
wrapMode: -1
nPOTScale: 1
lightmap: 0
rGBM: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 0
textureType: -1
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: abb23a9422c4bcc4a9613864e7832e63
folderAsset: yes
timeCreated: 1475343881
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: b59e4f5f725a4484d84015652d7df76a
folderAsset: yes
timeCreated: 1470042630
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
......@@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.IO;
public static class Config
{
public static uint ClientVersion = 0x233c;
public static uint ClientVersion = 0x1343;
class oneString
{
......
......@@ -19,7 +19,7 @@ public class Menu : WindowServantSP
UIHelper.registEvent(gameObject, "online_", onClickOnline);
UIHelper.registEvent(gameObject, "replay_", onClickReplay);
UIHelper.registEvent(gameObject, "single_", onClickPizzle);
UIHelper.registEvent(gameObject, "ai_", onClickAI);
//UIHelper.registEvent(gameObject, "ai_", onClickAI);
UIHelper.registEvent(gameObject, "exit_", onClickExit);
(new Thread(up)).Start();
}
......
......@@ -3373,6 +3373,72 @@ public class Ocgcore : ServantWithCardDescription
gameField.setHint(InterString.Get("请选择卡片。") + " " + ES_min.ToString() + "-" + ES_max.ToString());
}
break;
case GameMessage.SelectUnselectCard:
if (inIgnoranceReplay() || inTheWorld())
{
break;
}
if (condition == Condition.record)
{
Sleep(60);
}
destroy(waitObject, 0, false, true);
player = localPlayer(r.ReadByte());
bool finish = (r.ReadByte() != 0);
cancalable = (r.ReadByte() != 0);
ES_min = r.ReadByte();
ES_max = r.ReadByte();
ES_min = finish ? 0 : 1; // SelectUnselectCard can actually always select 1 card
ES_max = 1; // SelectUnselectCard can actually always select 1 card
ES_level = 0;
count = r.ReadByte();
for (int i = 0; i < count; i++)
{
code = r.ReadInt32();
gps = r.ReadGPS();
card = GCS_cardGet(gps, false);
if (card != null)
{
card.set_code(code);
card.prefered = true;
card.forSelect = true;
card.selectPtr = i;
allCardsInSelectMessage.Add(card);
}
}
count = r.ReadByte();
for (int i = 0; i < count; i++)
{
code = r.ReadInt32();
gps = r.ReadGPS();
/*card = GCS_cardGet(gps, false);
if (card != null)
{
card.set_code(code);
card.prefered = true;
card.forSelect = true;
card.selectPtr = i;
allCardsInSelectMessage.Add(card);
}*/
}
if (cancalable)
{
gameInfo.addHashedButton("cancleSelected", -1, superButtonType.no, InterString.Get("取消选择@ui"));
}
else if (finish)
{
gameInfo.addHashedButton("cancleSelected", -1, superButtonType.no, "完成选择");
}
realizeCardsForSelect();
if (ES_selectHint != "")
{
gameField.setHint(ES_selectHint + " " + ES_min.ToString() + "-" + ES_max.ToString());
}
else
{
gameField.setHint(InterString.Get("请选择卡片。") + " " + ES_min.ToString() + "-" + ES_max.ToString());
}
break;
case GameMessage.SelectChain:
if (inIgnoranceReplay() || inTheWorld())
{
......@@ -5542,6 +5608,7 @@ public class Ocgcore : ServantWithCardDescription
}
break;
case GameMessage.SelectCard:
case GameMessage.SelectUnselectCard:
if (cardsSelectable.Count <= ES_min)
{
autoSendCards();
......@@ -5713,6 +5780,18 @@ public class Ocgcore : ServantWithCardDescription
real_send = true;
}
}
if (currentMessage == GameMessage.SelectUnselectCard)
{
if (cardsSelected.Count >= ES_min)
{
sendable = true;
}
if (cardsSelected.Count == ES_max || cardsSelected.Count == cardsSelectable.Count)
{
sendable = true;
real_send = true;
}
}
if (currentMessage == GameMessage.SelectTribute)
{
int all = 0;
......@@ -5771,7 +5850,7 @@ public class Ocgcore : ServantWithCardDescription
private void getSelectableCards()
{
if (currentMessage == GameMessage.SelectCard)
if (currentMessage == GameMessage.SelectCard || currentMessage == GameMessage.SelectUnselectCard)
{
for (int i = 0; i < allCardsInSelectMessage.Count; i++)
{
......@@ -6080,6 +6159,7 @@ public class Ocgcore : ServantWithCardDescription
switch (currentMessage)
{
case GameMessage.SelectCard:
case GameMessage.SelectUnselectCard:
case GameMessage.SelectTribute:
int c = ES_min;
if (cardsSelectable.Count < c)
......@@ -6119,6 +6199,7 @@ public class Ocgcore : ServantWithCardDescription
switch (currentMessage)
{
case GameMessage.SelectCard:
case GameMessage.SelectUnselectCard:
case GameMessage.SelectTribute:
case GameMessage.SelectSum:
m = new BinaryMaster();
......@@ -8108,6 +8189,8 @@ public class Ocgcore : ServantWithCardDescription
break;
case GameMessage.SelectCard:
break;
case GameMessage.SelectUnselectCard:
break;
case GameMessage.SelectChain:
break;
case GameMessage.SelectPlace:
......@@ -8178,6 +8261,7 @@ public class Ocgcore : ServantWithCardDescription
case GameMessage.SelectEffectYn:
case GameMessage.SelectYesNo:
case GameMessage.SelectCard:
case GameMessage.SelectUnselectCard:
case GameMessage.SelectTribute:
case GameMessage.SelectChain:
clearAllShowedB = true;
......@@ -8356,6 +8440,7 @@ public class Ocgcore : ServantWithCardDescription
}
break;
case GameMessage.SelectCard:
case GameMessage.SelectUnselectCard:
case GameMessage.SelectTribute:
case GameMessage.SelectSum:
if (card.forSelect)
......
......@@ -25,6 +25,7 @@
SelectSum = 23,
SelectDisfield = 24,
SortCard = 25,
SelectUnselectCard = 26,
ConfirmDecktop = 30,
ConfirmCards = 31,
ShuffleDeck = 32,
......@@ -34,8 +35,10 @@
ShuffleSetCard = 36,
ReverseDeck = 37,
DeckTop = 38,
ShuffleExtra = 39,
NewTurn = 40,
NewPhase = 41,
ConfirmExtratop = 42,
Move = 50,
PosChange = 53,
Set = 54,
......@@ -79,6 +82,8 @@
ReleaseRelation = 123,
TossCoin = 130,
TossDice = 131,
RockPaperScissors = 132,
HandResult = 133,
AnnounceRace = 140,
AnnounceAttrib = 141,
AnnounceCard = 142,
......
fileFormatVersion: 2
guid: 91fec1b28f9a91b42abd9257cd4d129b
folderAsset: yes
timeCreated: 1458307470
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 863f62626963a6445b92586f336ae65d
folderAsset: yes
timeCreated: 1458307470
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: bbaaaa822d3ceb2478f1431c4afd6867
folderAsset: yes
timeCreated: 1470080051
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
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